| | |
| | | @click="edit('edit',row)" |
| | | /> |
| | | </el-tooltip> |
| | | <!-- <el-tooltip class="item" effect="dark" content="编辑" placement="top">--> |
| | | <!-- <i class="el-icon-edit-outline" @click="edit('edit',row)" />--> |
| | | <!-- </el-tooltip>--> |
| | | <!-- <el-tooltip v-del-tab-index class="item" effect="dark" content="删除" placement="top">--> |
| | | <!-- <i class="el-icon-delete" @click="del(row)" />--> |
| | | <!-- </el-tooltip>--> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | v-el-drag-dialog |
| | | :title="operation==='add'?'新增':'检验明细'" |
| | | :visible.sync="dialogVisible" |
| | | width="800px" |
| | | width="1100px" |
| | | :close-on-click-modal="false" |
| | | top="15vh" |
| | | @closed="handleClose" |
| | |
| | | :cell-style="this.$cellStyle" |
| | | > |
| | | <el-table-column |
| | | type="index" |
| | | prop="checkitem_seq" |
| | | width="50" |
| | | fixed |
| | | label="序号" |
| | | /> |
| | | |
| | | <el-table-column |
| | | prop="stepcheckitem_code" |
| | | width="150" |
| | | prop="checkitem_name" |
| | | min-width="120" |
| | | fixed |
| | | show-tooltip-when-overflow |
| | | label="检验项目" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-select |
| | | v-if="row.isVisible===1" |
| | | v-model="row.stepcheckitem_code" |
| | | filterable |
| | | placeholder="请选择" |
| | | style="width: 100%;" |
| | | > |
| | | <!-- @change="val=>tableChange(val,row)"--> |
| | | <el-option |
| | | v-for="item in CheckItemSelectArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | <div v-else>{{ |
| | | CheckItemSelectAllArr.find(i => i.code === row.stepcheckitem_code).name |
| | | }} |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column |
| | | prop="stepcheckitem_desc" |
| | | prop="standvalue" |
| | | label="标准要求" |
| | | fixed |
| | | min-width="120" |
| | | show-tooltip-when-overflow |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-input |
| | | v-if="row.isVisible===1" |
| | | v-model="row.stepcheckitem_desc" |
| | | placeholder="请输入" |
| | | /> |
| | | <div v-else>{{ row.stepcheckitem_desc ? row.stepcheckitem_desc : '/' }}</div> |
| | | <!-- ~当三个值都有 --> |
| | | <div v-if="row.standvalue&&row.uppervalue&&row.lowervalue">{{ row.standvalue }}({{ |
| | | row.lowervalue |
| | | }}~{{ row.uppervalue }}) |
| | | </div> |
| | | <!-- ~当只有标准值和上限值时 --> |
| | | <div v-else-if="row.standvalue&&row.uppervalue">{{ row.standvalue }}(~{{ row.uppervalue }})</div> |
| | | <!-- ~当只有标准值和下限值时--> |
| | | <div v-else-if="row.standvalue&&row.lowervalue">{{ row.standvalue }}({{ row.lowervalue }}~)</div> |
| | | |
| | | <!-- ~当只有上限值和下限值时--> |
| | | <div v-else-if="row.uppervalue&&row.lowervalue">({{ row.lowervalue }}~{{ row.uppervalue }})</div> |
| | | <!-- ~当只有标准值时 --> |
| | | <div v-else-if="row.standvalue">{{ row.standvalue }}</div> |
| | | <!-- ~当只有上限值时 --> |
| | | <div v-else-if="row.uppervalue">(~{{ row.uppervalue }})</div> |
| | | <!-- ~当只有下限值时 --> |
| | | <div v-else-if="row.lowervalue">({{ row.lowervalue }}~)</div> |
| | | |
| | | <div v-else>/</div> |
| | | |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <!-- 这里写for循环遍历语句--> |
| | | |
| | | <el-table-column |
| | | v-if="operation!=='check'" |
| | | label="操作" |
| | | width="120" |
| | | fixed="right" |
| | | v-for="(item,index) in dialogTableArrayCol" |
| | | :key="index+dialogTableData" |
| | | :prop="(index+1)+'/'+ dialogTableNumberCol" |
| | | :label="'第'+(index+1)+'件'" |
| | | show-tooltip-when-overflow |
| | | min-width="100" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-button v-if="row.isVisible===1" v-waves type="text" @click="saveZjlbRow(row)">确认</el-button> |
| | | <el-button v-if="row.isVisible===1&&isCancel" v-waves type="text" @click="cancelZjlbRow(row)">取消 |
| | | </el-button> |
| | | <el-button v-if="row.isVisible!==1" v-waves type="text" @click="editZjlbRow(row)">编辑</el-button> |
| | | <el-button v-if="row.isVisible!==1" v-waves type="text" @click="delZjlbRow(row)">删除</el-button> |
| | | |
| | | <!-- ~当三个值都有 --> |
| | | <div v-if="row.standvalue&&row.uppervalue&&row.lowervalue&&parseFloat(row[(index + 1) + '/' + dialogTableNumberCol])>=parseFloat(row.lowervalue)&&parseFloat(row[(index + 1) + '/' + dialogTableNumberCol])<=parseFloat(row.uppervalue)"> |
| | | <!-- <div v-if="row[(index + 1) + '/' + dialogTableNumberCol]>=row.lowervalue&&row[(index + 1) + '/' + dialogTableNumberCol]<=row.uppervalue">--> |
| | | <div style="display: flex;align-items: center"> |
| | | <i class="el-icon-success" :style="{color:$store.state.settings.theme}" style="margin-right: 2px" /> |
| | | {{ row[(index + 1) + '/' + dialogTableNumberCol] }} |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- ~当只有标准值和上限值时 --> |
| | | <div v-else-if="row.standvalue&&row.uppervalue&&row.lowervalue===''&&parseFloat(row[(index + 1) + '/' + dialogTableNumberCol])<=parseFloat(row.uppervalue)"> |
| | | <div style="display: flex;align-items: center"> |
| | | <i class="el-icon-success" :style="{color:$store.state.settings.theme}" style="margin-right: 2px" /> |
| | | {{ row[(index + 1) + '/' + dialogTableNumberCol] }} |
| | | </div> |
| | | </div> |
| | | <!-- ~当只有标准值和下限值时--> |
| | | <div v-else-if="row.standvalue&&row.lowervalue&&row.uppervalue===''&&parseFloat(row[(index + 1) + '/' + dialogTableNumberCol])>=parseFloat(row.lowervalue)"> |
| | | <div style="display: flex;align-items: center"> |
| | | <i class="el-icon-success" :style="{color:$store.state.settings.theme}" style="margin-right: 2px" /> |
| | | {{ row[(index + 1) + '/' + dialogTableNumberCol] }} |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- ~当只有上限值和下限值时--> |
| | | <div v-else-if="row.uppervalue&&row.lowervalue&&row.standvalue===''&&parseFloat(row[(index + 1) + '/' + dialogTableNumberCol])>=parseFloat(row.lowervalue)&&parseFloat(row[(index + 1) + '/' + dialogTableNumberCol])<=parseFloat(row.uppervalue)"> |
| | | <div style="display: flex;align-items: center"> |
| | | <i class="el-icon-success" :style="{color:$store.state.settings.theme}" style="margin-right: 2px" /> |
| | | {{ row[(index + 1) + '/' + dialogTableNumberCol] }} |
| | | </div> |
| | | </div> |
| | | <!-- ~当只有标准值时 --> |
| | | <div v-else-if="row.standvalue&&row.uppervalue===''&&row.lowervalue===''&&parseFloat(row[(index + 1) + '/' + dialogTableNumberCol])===parseFloat(row.standvalue)"> |
| | | <div style="display: flex;align-items: center"> |
| | | <i class="el-icon-success" :style="{color:$store.state.settings.theme}" style="margin-right: 2px" /> |
| | | {{ row[(index + 1) + '/' + dialogTableNumberCol] }} |
| | | </div> |
| | | </div> |
| | | <!-- ~当只有上限值时 --> |
| | | <div v-else-if="row.uppervalue&&row.lowervalue===''&&row.standvalue===''&&parseFloat(row[(index + 1) + '/' + dialogTableNumberCol])<=parseFloat(row.uppervalue)"> |
| | | <div style="display: flex;align-items: center"> |
| | | <i class="el-icon-success" :style="{color:$store.state.settings.theme}" style="margin-right: 2px" /> |
| | | {{ row[(index + 1) + '/' + dialogTableNumberCol] }} |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- ~当只有下限值时 --> |
| | | <div v-else-if="row.lowervalue&& row.uppervalue===''&&row.standvalue===''&&parseFloat(row[(index + 1) + '/' + dialogTableNumberCol])>=parseFloat(row.lowervalue)"> |
| | | <div style="display: flex;align-items: center"> |
| | | <i class="el-icon-success" :style="{color:$store.state.settings.theme}" style="margin-right: 2px" /> |
| | | {{ row[(index + 1) + '/' + dialogTableNumberCol] }} |
| | | </div></div> |
| | | |
| | | <div v-else> |
| | | <div style="display: flex;align-items: center"> |
| | | <i class="el-icon-error" style="color: red;margin-right: 2px" /> |
| | | {{ row[(index + 1) + '/' + dialogTableNumberCol] }} |
| | | </div> |
| | | </div> |
| | | |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | </el-table> |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | |
| | | import ImportPicker from '@/components/ImportPicker' |
| | | import { handleDatetime } from '@/utils/global' |
| | | import { |
| | | MaintenanceDetailsReportExcelSearch, LogisticsCheckSearch |
| | | MaintenanceDetailsReportExcelSearch, LogisticsCheckSearch, LogisticsCheckSubSearch |
| | | } from '@/api/reportManager' |
| | | import elDragDialog from '@/directive/el-drag-dialog' |
| | | import waves from '@/directive/waves' |
| | |
| | | dialogVisible: false, |
| | | |
| | | operation: '', |
| | | dialogTableData: [] |
| | | dialogTableData: [], |
| | | dialogTableNumberCol: 0, // 对话框动态的列数 |
| | | dialogTableArrayCol: []// 对话框动态的数组 |
| | | |
| | | } |
| | | }, |
| | |
| | | async edit(operation, row) { |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | const { data: res } = await LogisticsCheckSubSearch({ checkid: row.id }) |
| | | this.dialogTableData = res |
| | | |
| | | this.dialogTableData.forEach((item, index) => { |
| | | for (const it in item) { |
| | | if (it.indexOf('/') !== -1) { |
| | | const i = it.split('/')[1] |
| | | this.dialogTableNumberCol = i |
| | | } |
| | | } |
| | | }) |
| | | |
| | | this.dialogTableArrayCol = [] |
| | | for (let i = 0; i < this.dialogTableNumberCol; i++) { |
| | | this.dialogTableArrayCol.push(i) |
| | | } |
| | | |
| | | this.$nextTick(() => { |
| | | this.$refs.tableDataRef2.doLayout() |
| | | }) |
| | | }, |
| | | // 对话框关闭事件 |
| | | handleClose() { |
| | | |
| | | this.dialogTableData = [] |
| | | }, |
| | | // 对话框取消 |
| | | dialogVisibleCancel() { |
| | |
| | | |
| | | ::v-deep .el-table__body-wrapper { |
| | | background-color: #f8f8fa; |
| | | z-index:2 |
| | | } |
| | | |
| | | ::v-deep .el-table__body .el-table__row.hover-row td { |