From f8668b057747f2982afafcc1ce9a2842a4abd50c Mon Sep 17 00:00:00 2001 From: zhuzhuanzhuan Date: 星期三, 29 十一月 2023 16:36:39 +0800 Subject: [PATCH] 1、设备车间管理页面车间名称新增、修改以及批量删除成功后提示为warning图标 2、设备车间管理页面调整修改车间信息中的排序字段由departOrder为productionOrder 3、删除树节点时需判断节点下是否有子节点,若有子节点则不能删除并提示 4、大屏车间管理页面左右两侧卡片区域布局保持一致 5、设备综合效率分析页面由于ant-design-vie的table组件固定列功能导致导出报表布局混乱 --- src/views/eam/modules/dailyMaintenanceOrder/FinishDevolutionModal.vue | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 102 insertions(+), 3 deletions(-) diff --git a/src/views/eam/modules/dailyMaintenanceOrder/FinishDevolutionModal.vue b/src/views/eam/modules/dailyMaintenanceOrder/FinishDevolutionModal.vue index f5f1581..ecea2ac 100644 --- a/src/views/eam/modules/dailyMaintenanceOrder/FinishDevolutionModal.vue +++ b/src/views/eam/modules/dailyMaintenanceOrder/FinishDevolutionModal.vue @@ -7,6 +7,7 @@ cancelText="鍏抽棴" @cancel="handleCancel" :confirmLoading="confirmLoading" + title="闄勫綍2" > <a-spin :spinning="confirmLoading"> <a-form :form="form"> @@ -151,12 +152,39 @@ 鍏抽棴 </a-button> - <a-button + <!-- <a-button @click="handleOk()" type="primary" :loading="confirmLoading" :disabled="disableSubmit || confirmLoading" - >纭畾</a-button> + >纭畾</a-button> --> + <a-popconfirm + @confirm="() => handleReject()" + title="纭灏嗗綋鍓嶄簩淇濆畬宸ョЩ浜ゅ崟椹冲洖锛�" + :disabled="this.model.confirmStatus == '0' || this.model.confirmStatus == '2'|| this.model.confirmStatus == '7'" + > + <a-button + :loading='confirmLoading' + :style="{marginRight: '8px'}" + :disabled="this.model.confirmStatus == '0' || this.model.confirmStatus == '2'|| this.model.confirmStatus == '7'" + > + 椹冲洖 + </a-button> + </a-popconfirm> + <a-popconfirm + @confirm="() => handleOk()" + title="纭灏嗗綋鍓嶄簩淇濆畬宸ョЩ浜ゅ崟瀹℃牳閫氳繃锛�" + :disabled="this.model.confirmStatus == '7'" + > + <a-button + type='primary' + :loading='confirmLoading' + :style="{marginRight: '8px'}" + :disabled="this.model.confirmStatus == '7'" + > + 閫氳繃 + </a-button> + </a-popconfirm> </template> </a-modal> @@ -293,12 +321,24 @@ this.close(); }, - handleOk() { + + handleReject() { const that = this; this.form.validateFields((err, values) => { if (!err) { that.confirmLoading = true; let formData = Object.assign(this.model, values); + if (this.model.confirmStatus == '1') { + formData.confirmStatus = '2' + } else if (this.model.confirmStatus == '3') { + formData.confirmStatus = '4' + } else if (this.model.confirmStatus == '5') { + formData.confirmStatus = '6' + } else if (this.model.confirmStatus == '6') { + formData.confirmStatus = '4' + } else if (this.model.confirmStatus == '4') { + formData.confirmStatus = '2' + } requestPut(this.url.edit, formData, { id: this.model.id }).then((res) => { if (res.success) { that.$message.success(res.message); @@ -314,6 +354,65 @@ }) }, + + handleOk() { + const that = this; + that.form.validateFields((err, values) => { + if (!err) { + this.confirmLoading = true; + let formData = Object.assign(this.model, values); + if (this.model.confirmStatus == '0') { + formData.confirmStatus = '1' + } else if (this.model.confirmStatus == '2') { + formData.confirmStatus = '1' + } else if (this.model.confirmStatus == '1') { + formData.confirmStatus = '3' + } else if (this.model.confirmStatus == '4') { + formData.confirmStatus = '3' + } else if (this.model.confirmStatus == '3') { + formData.confirmStatus = '5' + } else if (this.model.confirmStatus == '6') { + formData.confirmStatus = '5' + } else if (this.model.confirmStatus == '5') { + formData.confirmStatus = '7' + } + requestPut(this.url.edit, formData, { id: this.model.id }).then((res) => { + if (res.success) { + that.$message.success(res.message); + that.$emit('ok'); + } else { + that.$message.warning(res.message); + } + }).finally(() => { + that.confirmLoading = false; + that.close(); + }) + } + }) + }, + + + // handleOk() { + // const that = this; + // this.form.validateFields((err, values) => { + // if (!err) { + // that.confirmLoading = true; + // let formData = Object.assign(this.model, values); + // requestPut(this.url.edit, formData, { id: this.model.id }).then((res) => { + // if (res.success) { + // that.$message.success(res.message); + // that.$emit('ok'); + // } else { + // that.$message.warning(res.message); + // } + // }).finally(() => { + // that.confirmLoading = false; + // that.close(); + // }) + // } + // }) + // }, + handleDelete(text, record, index) { this.dataSource.splice(index, 1); }, -- Gitblit v1.9.3