lilei 2 vuotta sitten
vanhempi
commit
102b232c4c

+ 22 - 9
src/views/financialManagement/financialCollection/fcDetailModal.vue

@@ -47,7 +47,7 @@
                 showType="radio"
                 code="PAYER_ACCOUNT_TYPE"
                 placeholder="请选择付款账户类型"
-                @change="payerTypeChange"
+                @change="accountTypeChange"
               ></v-select>
             </a-form-model-item>
           </a-col>
@@ -288,6 +288,15 @@ export default {
   methods: {
     payerTypeChange (v) {
       this.$refs.ruleForm.clearValidate()
+      // 回显客户
+      if (this.form.dealerSn && this.form.payerType == 'DEALER') {
+        this.$nextTick(() => {
+          this.$refs.settleClientName.getDetail(this.form.dealerSn)
+        })
+      }
+    },
+    accountTypeChange (v) {
+      this.$refs.ruleForm.clearValidate()
     },
     handleChange (v) {
       console.log(v)
@@ -297,12 +306,12 @@ export default {
     },
     // 客户
     custChange (v) {
-      this.form.dealerSn = v.key
-      this.form.payerName = v.name
-      this.form.dealerCode = v.row ? v.row.kdMidCustomerFnumber : ''
-      this.form.licenseName = v.row ? v.row.licenseName : ''
-
+      console.log(v)
       if (v && v.key) {
+        this.form.dealerSn = v.key
+        this.form.dealerCode = v.row ? v.row.kdMidCustomerFnumber : ''
+        this.form.licenseName = v.row ? v.row.licenseName : ''
+
         // 查询账户信息
         this.spinning = true
         this.confirmLoading = true
@@ -382,8 +391,10 @@ export default {
           this.form.payCreditFlag = this.form.payCreditFlag == 1
           this.form.useCreditFlag = this.form.useCreditFlag == 1
           // 回显客户
-          if (this.form.dealerSn) {
-            this.$refs.settleClientName.getDetail(this.form.dealerSn)
+          if (this.form.dealerSn && this.form.payerType == 'DEALER') {
+            this.$nextTick(() => {
+              this.$refs.settleClientName.getDetail(this.form.dealerSn)
+            })
           }
         }
         this.spinning = false
@@ -399,7 +410,9 @@ export default {
       this.$nextTick(() => {
         this.title = '新增收款明细'
         this.$refs.ruleForm.resetFields()
-        this.$refs.settleClientName.resetForm()
+        if (this.$refs.settleClientName) {
+          this.$refs.settleClientName.resetForm()
+        }
         this.bankNameList = []
         this.form = {
           payerType: 'DEALER',

+ 5 - 5
src/views/financialManagement/financialCollection/list.vue

@@ -33,7 +33,7 @@
               </a-col>
               <a-col :md="4" :sm="24">
                 <a-form-item label="付款方">
-                  <a-input id="financialCollectionList-dealerName" v-model.trim="queryParam.dealerName" allowClear placeholder="请输入付款方"/>
+                  <a-input id="financialCollectionList-payerNames" v-model.trim="queryParam.payerNames" allowClear placeholder="请输入付款方"/>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -179,7 +179,7 @@ export default {
         applyPersonSn: undefined,
         bookReason: '',
         status: undefined,
-        dealerName: ''
+        payerNames: ''
       },
       disabled: false, //  查询、重置按钮是否可操作
       creatDate: [], //  创建时间
@@ -217,9 +217,9 @@ export default {
         { title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '收款单号', scopedSlots: { customRender: 'bookNo' }, width: '8%', align: 'center' },
         { title: '关联备货单', scopedSlots: { customRender: 'dispatchNum' }, width: '6%', align: 'center' },
-        { title: '申请人', dataIndex: 'applyPersonName', align: 'center', width: '6%', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '申请人', dataIndex: 'applyPersonName', align: 'center', width: '5%', customRender: function (text) { return text || '--' } },
         { title: '收款事由', dataIndex: 'bookReason', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '付款方', dataIndex: 'dealerName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '付款方', dataIndex: 'payerNames', width: '9%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '订单总金额', dataIndex: 'orderTotalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '收款总金额', dataIndex: 'receiptTotalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '使用授信总金额', dataIndex: 'useTotalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -253,7 +253,7 @@ export default {
       if (this.advanced) {
         this.$refs.rangeAuditDate.resetDate(this.auditDate)
       }
-      this.queryParam.dealerName = ''
+      this.queryParam.payerNames = ''
       this.queryParam.auditBeginDate = ''
       this.queryParam.auditEndDate = ''
       this.queryParam.bookNo = ''