From 784509796f016bc9a87541300fa47025770c223d Mon Sep 17 00:00:00 2001 From: caoyizhong <1270296080@qq.com> Date: Wed, 19 Oct 2022 18:10:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BE=9B=E5=BA=94=E5=95=86?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/supplier/ProcessSupplierList.vue | 7 +-- .../supplier/modules/ProcessSupplierForm.vue | 45 +++++++++++++++---- .../supplier/modules/ProcessSupplierModal.vue | 2 +- 3 files changed, 42 insertions(+), 12 deletions(-) diff --git a/src/views/supplier/ProcessSupplierList.vue b/src/views/supplier/ProcessSupplierList.vue index 9b2785c..e6d91b4 100644 --- a/src/views/supplier/ProcessSupplierList.vue +++ b/src/views/supplier/ProcessSupplierList.vue @@ -85,12 +85,13 @@ 编辑 + 更多 - - 详情 - + + + 删除 diff --git a/src/views/supplier/modules/ProcessSupplierForm.vue b/src/views/supplier/modules/ProcessSupplierForm.vue index a834701..b1b2ea6 100644 --- a/src/views/supplier/modules/ProcessSupplierForm.vue +++ b/src/views/supplier/modules/ProcessSupplierForm.vue @@ -15,19 +15,20 @@ - + + - - - - - - + + + + + + 提 交 @@ -121,9 +122,26 @@ this.edit({}); }, edit (record) { + console.log(record); + let dis = false; + if(record.state !== undefined ){ + dis =true; + } this.form.resetFields(); this.model = Object.assign({}, record); this.visible = true; + if(dis){ + if(record.state === 0){ + record.state = "正常"; + }else{ + record.state = "停用" + } + if(record.rank === 0){ + record.rank = "一级物资供应商"; + }else{ + record.rank = "非集中采购物资供应商" + } + } this.$nextTick(() => { this.form.setFieldsValue(pick(this.model,'coding','supplierName','rank','state','delFlag')) }) @@ -144,7 +162,7 @@ // 触发表单验证 this.form.validateFields((err, values) => { if (!err) { - that.confirmLoading = true; + // that.confirmLoading = true; let httpurl = ''; let method = ''; if(!this.model.id){ @@ -155,6 +173,17 @@ method = 'put'; } let formData = Object.assign(this.model, values); + console.log(formData); + if(formData.state === "正常"){ + formData.state = "0"; + }else if(formData.state === "冻结"){ + formData.state = "1" + } + if(formData.rank === "一级物资供应商"){ + formData.rank = "0"; + }else if(formData.rank === "非集中采购物资供应商"){ + formData.rank = "1" + } console.log("表单提交数据",formData) httpAction(httpurl,formData,method).then((res)=>{ if(res.success){ diff --git a/src/views/supplier/modules/ProcessSupplierModal.vue b/src/views/supplier/modules/ProcessSupplierModal.vue index 75f85b8..5e9760b 100644 --- a/src/views/supplier/modules/ProcessSupplierModal.vue +++ b/src/views/supplier/modules/ProcessSupplierModal.vue @@ -23,7 +23,7 @@ data () { return { title:'', - width:1024, + width:1200, visible: false, disableSubmit: false }