From f849afc378a7a33db97b90041d8df6f1b9cc6114 Mon Sep 17 00:00:00 2001 From: cuilei <ray_tsu1@163.com> Date: 星期一, 15 九月 2025 15:37:30 +0800 Subject: [PATCH] 设备/工艺点检表单增加批量正常选择 --- src/views/mes/modules/MesProductionWorkOrderEquipmentInspectionModal.vue | 27 ++++++++++++++++++++++++++- 1 files changed, 26 insertions(+), 1 deletions(-) diff --git a/src/views/mes/modules/MesProductionWorkOrderEquipmentInspectionModal.vue b/src/views/mes/modules/MesProductionWorkOrderEquipmentInspectionModal.vue index 2211b9e..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: { @@ -182,6 +192,17 @@ this.dataSource = res.result.maintenanceStandardDetailList } }) + }, + 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) => { @@ -234,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