Browse Source

修改bug

chenrui 5 months ago
parent
commit
300b19343c
1 changed files with 13 additions and 6 deletions
  1. 13 6
      src/views/supplierManagement/supplierInfo/editModal.vue

+ 13 - 6
src/views/supplierManagement/supplierInfo/editModal.vue

@@ -200,12 +200,18 @@ export default {
         if (res.status == 200) {
           if (res.data.provinceSn) { this.getArea('city', res.data.provinceSn) }
           if (res.data.citySn) { this.getArea('district', res.data.citySn) }
-          this.form = Object.assign(this.form, res.data)
-          this.form.enabledFlag = Number(this.form.enabledFlag)
-          if (!this.itemId) {
-            this.form.supplierSn = undefined
-            this.form.sysFlag = undefined
-          }
+          this.form.supplierName = res.data.supplierName
+          this.form.provinceSn = res.data.provinceSn
+          this.form.provinceName = res.data.provinceName
+          this.form.citySn = res.data.citySn
+          this.form.cityName = res.data.cityName
+          this.form.countySn = res.data.countySn
+          this.form.countyName = res.data.countyName
+          this.form.supplierAddress = res.data.supplierAddress
+          this.form.contactPerson = res.data.contactPerson
+          this.form.contactTel = res.data.contactTel
+          this.form.businessScope = res.data.businessScope
+          this.form.enabledFlag = Number(res.data.enabledFlag)
         }
       })
     },
@@ -307,6 +313,7 @@ export default {
       this.form.businessScope = undefined
       this.form.enabledFlag = 1
       this.form.supplierSn = undefined
+      this.form.sysFlag = undefined
       this.addrCityList = []
       this.addrDistrictList = []
       this.$refs.ruleForm.resetFields()