From b4d09a09d2a8ffc939e97f8b400ff94a64d13eb7 Mon Sep 17 00:00:00 2001 From: zhuzhuanzhuan Date: 星期一, 04 三月 2024 17:46:01 +0800 Subject: [PATCH] 优化用户管理页面表单填写界面选择设备功能,车间重新选择后重置选择设备 --- src/views/eam/DailyInspectionStandardList.vue | 133 +++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 124 insertions(+), 9 deletions(-) diff --git a/src/views/eam/DailyInspectionStandardList.vue b/src/views/eam/DailyInspectionStandardList.vue index 2ba59ba..3db495e 100644 --- a/src/views/eam/DailyInspectionStandardList.vue +++ b/src/views/eam/DailyInspectionStandardList.vue @@ -92,6 +92,22 @@ icon="reload" style="margin-left: 8px" >閲嶇疆</a-button> + <a-button + v-show="this.selectedRowKeys.length > 0 && this.queryParam.versionStatus == '1'" + type="primary" + @click="batchHandleOK" + icon="reload" + style="margin-left: 8px" + v-has="'dailyInspectionStandard:batchHandleOK'" + >鎵归噺閫氳繃</a-button> + <a-button + v-show="this.selectedRowKeys.length > 0 && this.queryParam.versionStatus == '1'" + type="primary" + @click="batchHandleReject" + icon="reload" + style="margin-left: 8px" + v-has="'dailyInspectionStandard:batchHandleReject'" + >鎵归噺椹冲洖</a-button> </div> <!-- table鍖哄煙-begin --> @@ -262,6 +278,11 @@ dataIndex: 'num', }, { + title: '绠$悊鍒跺害', + align: 'center', + dataIndex: 'disUda1', + }, + { title: '绛惧鐘舵��', align: 'center', dataIndex: 'approvalStatusName', @@ -292,11 +313,11 @@ align: 'center', dataIndex: 'teamName', }, - { - title: '娲惧伐鏂瑰紡', - align: 'center', - dataIndex: 'assignModeName', - }, + // { + // title: '娲惧伐鏂瑰紡', + // align: 'center', + // dataIndex: 'assignModeName', + // }, { title: '瀹℃牳鎰忚', align: 'center', @@ -377,7 +398,7 @@ align: 'center', fixed: 'right', scopedSlots: { customRender: 'action' }, - width: 200, + width: 230, } ], url: { @@ -386,14 +407,15 @@ deleteBatch: '/eam/inspectionStandard/deleteBatch', versionTakeEffect: "/eam/inspectionStandard/versionTakeEffect", importExcelUrl: "/eam/inspectionStandard/importExcel", + passBatch: '/eam/inspectionStandard/auditApprovalBatch', }, version: '1.0', dictOptions: {}, /* 鍒嗛〉鍙傛暟 */ ipagination: { current: 1, - pageSize: 5, - pageSizeOptions: ['5', '10', '50'], + pageSize: 20, + pageSizeOptions: ['5', '10', '20', '50'], showTotal: (total, range) => { return range[0] + '-' + range[1] + ' 鍏�' + total + '鏉�' }, @@ -514,7 +536,7 @@ }, searchReset() { this.inspectionStandardId = '-1' - this.queryParam = {} + this.queryParam = { versionStatus: '2' } this.loadData(1); }, modalFormOk() { @@ -523,6 +545,99 @@ //娓呯┖鍒楄〃閫変腑 // this.onClearSelected() }, + batchHandleReject: function () { + if (this.selectedRowKeys.length <= 0) { + // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); + this.$notification.warning({ + message: '娑堟伅', + description: "璇烽�夋嫨涓�鏉¤褰�" + }); + return; + } else { + + var that = this; + this.$confirm({ + title: "纭鎵归噺椹冲洖", + content: "鏄惁鎵归噺椹冲洖閫変腑鏁版嵁?", + onOk: function () { + that.loading = true; + that.confirmLoading = true; + let formData = {}; + let dailyInspectionStandardlist = that.selectionRows + for (var i = 0; i < dailyInspectionStandardlist.length; i++) { + let record = dailyInspectionStandardlist[i] + if (record.approvalStatus == '1') { + record.approvalStatus = '2' + } else if (record.approvalStatus == '3') { + record.approvalStatus = '4' + } else if (record.approvalStatus == '4') { + record.approvalStatus = '2' + } + } + formData.dailyInspectionStandardlist = dailyInspectionStandardlist + requestPut(that.url.passBatch, formData).then((res) => { + if (res.success) { + that.$message.success("鎵归噺椹冲洖鎴愬姛锛�") + that.loadData(1) + } else { + that.$message.warning("鎵归噺閫氳繃澶辫触锛�") + } + }).finally(() => { + that.confirmLoading = false; + that.loading = false; + }) + } + }); + } + }, + + batchHandleOK: function () { + if (this.selectedRowKeys.length <= 0) { + // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); + this.$notification.warning({ + message: '娑堟伅', + description: "璇烽�夋嫨涓�鏉¤褰�" + }); + return; + } else { + + var that = this; + this.$confirm({ + title: "纭鎵归噺閫氳繃", + content: "鏄惁鎵归噺閫氳繃閫変腑鏁版嵁?", + onOk: function () { + that.loading = true; + that.confirmLoading = true; + let formData = {}; + let dailyInspectionStandardlist = that.selectionRows + for (var i = 0; i < dailyInspectionStandardlist.length; i++) { + let record = dailyInspectionStandardlist[i] + if (record.approvalStatus == '1') { + record.approvalStatus = '3' + } else if (record.approvalStatus == '2') { + record.approvalStatus = '3' + } else if (record.approvalStatus == '3') { + record.approvalStatus = '5' + } else if (record.approvalStatus == '4') { + record.approvalStatus = '3' + } + } + formData.dailyInspectionStandardlist = dailyInspectionStandardlist + requestPut(that.url.passBatch, formData).then((res) => { + if (res.success) { + that.$message.success("鎵归噺閫氳繃鎴愬姛锛�") + that.loadData(1) + } else { + that.$message.warning("鎵归噺閫氳繃澶辫触锛�") + } + }).finally(() => { + that.confirmLoading = false; + that.loading = false; + }) + } + }); + } + }, } } -- Gitblit v1.9.3