From 7207ef22748a8fecfde5e7ded828dc9b6bcfefe7 Mon Sep 17 00:00:00 2001 From: cuilei <ray_tsu1@163.com> Date: 星期一, 15 九月 2025 15:37:40 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/views/mes/modules/MesProductionWorkOrderEquipmentInspectionModal.vue | 31 ++++++++++++++++++++++++++++++- 1 files changed, 30 insertions(+), 1 deletions(-) diff --git a/src/views/mes/modules/MesProductionWorkOrderEquipmentInspectionModal.vue b/src/views/mes/modules/MesProductionWorkOrderEquipmentInspectionModal.vue index a13c5c0..7d2d55e 100644 --- a/src/views/mes/modules/MesProductionWorkOrderEquipmentInspectionModal.vue +++ b/src/views/mes/modules/MesProductionWorkOrderEquipmentInspectionModal.vue @@ -40,6 +40,11 @@ </a-form-model-item> </a-col> </a-row> + <a-row :gutter="24" v-if="selectedCount > 1" style="margin-bottom: 10px;"> + <a-col :span="24"> + <a-button type="primary" @click="batchSetNormal">鎵归噺鐐规姝e父</a-button> + </a-col> + </a-row> <a-row :gutter="24"> <vxe-table ref="table" @@ -50,7 +55,11 @@ :data="dataSource" :edit-config="{trigger: 'click', mode: 'cell'}" :edit-rules="editRules" + :checkbox-config="{trigger: 'cell', highlight: true}" + @checkbox-change="onSelectChange" + @checkbox-all="onSelectChange" > + <vxe-table-column type="checkbox" width="40"></vxe-table-column> <vxe-table-column title="搴忓彿" field="itemCode" width="50" align="center"></vxe-table-column> <vxe-table-column title="閮ㄤ綅" field="itemPart" align="center"></vxe-table-column> <vxe-table-column title="淇濆吇椤圭洰" field="itemName" align="center"></vxe-table-column> @@ -142,7 +151,8 @@ updateOrderInspectionStatus: '/mes/mesProductionWorkOrder/edit' }, inspectionEquipmentOptions: [], - workOrderId: null + workOrderId: null, + selectedCount: 0 } }, computed: { @@ -183,12 +193,27 @@ } }) }, + onSelectChange({records}) { + this.selectedCount = records.length; + }, + batchSetNormal() { + const selectRecords = this.$refs.table.getCheckboxRecords(); + selectRecords.forEach(record => { + record.inspectionResult = '1' + record.exceptionDescription = '' + }); + this.$refs.table.syncData() + }, handleOk () { this.$refs.table.validate((valid) => { if (valid) { this.$message.error("璇峰畬鎴愭墍鏈夊繀濉俊鎭悗鍐嶆彁浜わ紒") } else { let tableData = this.$refs.table.getTableData().fullData + if (!tableData || tableData.length === 0) { + this.$message.error("鐐规椤逛负绌猴紝鏃犳硶鎻愪氦锛�") + return + } const data = { ...this.model, workOrderId: this.workOrderId, @@ -230,6 +255,10 @@ } this.model = {} this.dataSource = [] + this.selectedCount = 0 + if (this.$refs.table) { + this.$refs.table.clearCheckboxRow() + } }, submitCallback(){ this.$emit('ok'); -- Gitblit v1.9.3