| | |
| | | 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 --> |
| | |
| | | align: 'center', |
| | | dataIndex: 'teamName', |
| | | }, |
| | | { |
| | | title: '派工方式', |
| | | align: 'center', |
| | | dataIndex: 'assignModeName', |
| | | }, |
| | | // { |
| | | // title: '派工方式', |
| | | // align: 'center', |
| | | // dataIndex: 'assignModeName', |
| | | // }, |
| | | { |
| | | title: '审核意见', |
| | | align: 'center', |
| | |
| | | align: 'center', |
| | | fixed: 'right', |
| | | scopedSlots: { customRender: 'action' }, |
| | | width: 200, |
| | | width: 230, |
| | | } |
| | | ], |
| | | url: { |
| | |
| | | deleteBatch: '/eam/inspectionStandard/deleteBatch', |
| | | versionTakeEffect: "/eam/inspectionStandard/versionTakeEffect", |
| | | importExcelUrl: "/eam/inspectionStandard/importExcel", |
| | | passBatch: '/eam/inspectionStandard/auditApprovalBatch', |
| | | }, |
| | | version: '1.0', |
| | | dictOptions: {}, |
| | |
| | | }, |
| | | searchReset() { |
| | | this.inspectionStandardId = '-1' |
| | | this.queryParam = {} |
| | | this.queryParam = { versionStatus: '2' } |
| | | this.loadData(1); |
| | | }, |
| | | modalFormOk() { |
| | |
| | | //清空列表选中 |
| | | // 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; |
| | | }) |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | } |
| | | } |