lilei 3 лет назад
Родитель
Сommit
484d90272e
1 измененных файлов с 12 добавлено и 6 удалено
  1. 12 6
      src/views/salesManagement/salesQuery/chooseCustomModal.vue

+ 12 - 6
src/views/salesManagement/salesQuery/chooseCustomModal.vue

@@ -341,19 +341,24 @@ export default {
     editCust (data) {
       console.log(data)
       this.title = '编辑客户信息'
-      this.isEdit = true
+      this.isEdit = false
       this.priceTypeDisabled = true
-      if (data.shippingAddressProvinceSn) { this.getArea('city', data.shippingAddressProvinceSn) }
-      if (data.shippingAddressCitySn) { this.getArea('district', data.shippingAddressCitySn) }
-      this.form = Object.assign(this.form, data)
-      this.buyerSnBak = this.form.buyerSn
-      this.priceTypeBak = this.form.priceType
+
+      // if (data.shippingAddressProvinceSn) { this.getArea('city', data.shippingAddressProvinceSn) }
+      // if (data.shippingAddressCitySn) { this.getArea('district', data.shippingAddressCitySn) }
+      // this.form = Object.assign(this.form, data)
+      // this.buyerSnBak = this.form.buyerSn
+      // this.priceTypeBak = this.form.priceType
       this.$nextTick(() => {
+        this.custId = data.buyerSn
+        this.form.buyerName = data.buyerName
+        this.getDetail()
         this.$refs.custList.setData({ key: data.buyerSn, label: data.buyerName, row: data })
       })
     },
     //  获取详情
     getDetail () {
+      this.spinning = true
       custFindById({ id: this.custId }).then(res => {
         const data = res.data
         if (res.status == 200 && data) {
@@ -385,6 +390,7 @@ export default {
           this.$refs.ruleForm.resetFields()
         }
         this.$refs.ruleForm.clearValidate()
+        this.spinning = false
       })
     },
     // 保存客户信息