| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163 |
- <!-- 用户编辑弹窗 -->
- <template>
- <ele-modal :title="title" :visible.sync="visible" :before-close="handleClose" :close-on-click-modal="false"
- :close-on-press-escape="false" append-to-body width="80%" :maxable="true">
- <el-table :data="tableData" :default-expand-all="true">
- <el-table-column type="expand">
- <template slot-scope="props">
- <div style="padding: 10px;">
- <el-table :data="props.row.children" border>
- <el-table-column label="质检方案编码" prop="qualitySchemeTemplateCode" align="center">
- </el-table-column>
- <el-table-column label="质检方案名称" prop="qualitySchemeTemplateName"
- align="center"></el-table-column>
- <el-table-column label="质检类型" prop="categoryLevelClassName"
- align="center"></el-table-column>
- <el-table-column label="质检项编码" prop="inspectionCode" align="center"></el-table-column>
- <el-table-column label="质检项名称" prop="inspectionName" align="center"></el-table-column>
- <el-table-column label="工艺参数" prop="defaultValue" align="center">
- </el-table-column>
- <el-table-column label="质检内容" prop="qualityResultContent" align="center" fixed="right"
- width="360">
- <template slot-scope="scope">
- <el-input v-model="scope.row.qualityResultContent" placeholder="请输入内容"
- :disabled="type == 'detail'"></el-input>
- </template>
- </el-table-column>
- <el-table-column label="质检结果" prop="qualityResults" align="center" fixed="right">
- <template slot-scope="scope">
- <el-select v-model="scope.row.qualityResults" placeholder="请选择" style="width: 100%;"
- :disabled="type == 'detail'">
- <el-option v-for="item in qualityResultsList" :key="item.value"
- :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </template>
- </el-table-column>
- </el-table>
- </div>
- </template>
- </el-table-column>
- <template v-for="column in tableColumns">
- <el-table-column :label="column.label" :prop="column.prop" :fixed="column.fixed"
- :show-overflow-tooltip="true" :width="column.width" :align="column.align">
- </el-table-column>
- </template>
- <el-table-column label="操作" align="center" width="80">
- <template slot-scope="scope">
- <el-link :underline="false" type="primary">
- 处置
- </el-link>
- </template>
- </el-table-column>
- </el-table>
- <template v-slot:footer v-if="type == 'report'">
- <el-button @click="handleClose">取消</el-button>
- <el-button type="primary" @click="handleConfirm">
- 确认
- </el-button>
- </template>
- </ele-modal>
- </template>
- <script>
- export default {
- components: {
- },
- data() {
- return {
- title: '',
- visible: false,
- rowIndex: 0,
- type: '',
- tableData: [],
- tableColumns: [
- {
- label: '编码',
- prop: 'categoryCode',
- width: '150',
- align: 'center'
- },
- {
- label: '名称',
- prop: 'categoryName',
- width: '150',
- align: 'center'
- },
- { label: '批次号', prop: 'batchNo', align: 'center' },
- // { label: '发货条码', prop: 'barcodes', align: 'center' },
- { label: '包装编码', prop: 'packageNo', align: 'center' },
- { label: '包装数量', prop: 'packingQuantity', align: 'center' },
- // { label: '包装单位', prop: 'packingUnit', align: 'center' },
- { label: '计量数量', prop: 'measureQuantity', align: 'center' },
- // { label: '计量单位', prop: 'measureUnit', align: 'center' },
- { label: '物料代号', prop: 'materielDesignation', align: 'center' },
- { label: '客户代号', prop: 'clientCode', align: 'center' },
- { label: '刻码', prop: 'engrave', align: 'center' },
- { label: '重量', prop: 'weight', align: 'center' },
- { label: '重量单位', prop: 'weightUnit', align: 'center' },
- { label: '仓库', prop: 'warehouseName', align: 'center', },
- { label: '质检结果', prop: '', align: 'center', },
- // { label: '货区', prop: 'areaName', align: 'center', },
- // { label: '货架', prop: 'goodsShelfName', align: 'center', },
- // { label: '货位', prop: 'goodsAllocationName', align: 'center', },
- // { label: '生产日期', prop: 'productionDate', align: 'center', },
- // { label: '采购日期', prop: 'purchaseDate', align: 'center', }
- ],
- qualityResultsList: [
- {
- value: 1,
- label: '合格'
- },
- {
- value: 2,
- label: '不合格'
- },
- {
- value: 3,
- label: '让步接收'
- },
- ]
- };
- },
- computed: {
- },
- created() { },
- methods: {
- async openDia(index, row, type, list) {
- this.rowIndex = index
- this.type = type;
- for (let i = 0; i < list.length; i++) {
- const arr = list[i].children
- for (let j = 0; j < arr.length; j++) {
- arr[j].qualityResults = 1
- }
- }
- this.tableData = list;
- this.visible = true;
- },
- handleClose() {
- this.tableData.forEach((item) => {
- item.children.forEach((child) => {
- child.qualityResultContent = '';
- child.qualityResults = ''
- })
- })
- this.visible = false;
- },
- handleConfirm() {
- this.visible = false;
- this.$emit('handleConfirm', this.tableData, this.rowIndex);
- },
- }
- };
- </script>
|