linwenxin преди 1 година
родител
ревизия
861de79dcd
променени са 2 файла, в които са добавени 18 реда и са изтрити 2 реда
  1. 9 1
      src/views/finance/components/receivable_list-add.vue
  2. 9 1
      src/views/finance/components/receivable_list-detail.vue

+ 9 - 1
src/views/finance/components/receivable_list-add.vue

@@ -171,7 +171,13 @@
           </el-table-column>
           <el-table-column align="left" label="现金钱包" prop="walletId" min-width="160" show-overflow-tooltip>
             <template slot-scope="scope">
-              <el-select filterable v-model="scope.row.customerWalletId" placeholder="请选择">
+              <el-select filterable v-model="scope.row.customerWalletId" @change="(v)=>{
+                if(v && scope.row.walletList.find(d=>d.customerWalletId==v)){
+                  scope.row.customerWalletName = scope.row.walletList.find(d=>d.customerWalletId==v).customerWalletName
+                }else{
+                  scope.row.customerWalletName = ''
+                }
+              }" placeholder="请选择">
                 <el-option
                   v-for="item in scope.row.walletList"
                   :key="item.customerWalletId"
@@ -366,6 +372,7 @@ export default {
             projectName: Arr[v].projectName,
             departmentId: Arr[v].departmentId,
             customerWalletId: Arr[v].customerWalletId,
+            customerWalletName: Arr[v]?.customerWalletName,
             // invoiceType: Arr[v].invoiceType,
             invoiceType: Arr[v].invoiceType ? Arr[v].invoiceType : '',
             incomeDept: Arr[v].incomeDept,
@@ -524,6 +531,7 @@ export default {
         projectName: '材料成本',
         departmentId: '',
         customerWalletId: '',
+        customerWalletName: '',
         invoiceType: '',
         incomeDept: '',
         // afterTaxAmount: "",

+ 9 - 1
src/views/finance/components/receivable_list-detail.vue

@@ -209,7 +209,13 @@
           </el-table-column>
           <el-table-column align="left" label="现金钱包" prop="walletId" min-width="160" show-overflow-tooltip>
             <template slot-scope="scope">
-              <el-select filterable v-model="scope.row.customerWalletId" placeholder="请选择">
+              <el-select filterable v-model="scope.row.customerWalletId" @change="(v)=>{
+                if(v && scope.row.walletList.find(d=>d.customerWalletId==v)){
+                  scope.row.customerWalletName = scope.row.walletList.find(d=>d.customerWalletId==v).customerWalletName
+                }else{
+                  scope.row.customerWalletName = ''
+                }
+              }" placeholder="请选择">
                 <el-option
                   v-for="item in scope.row.walletList"
                   :key="item.customerWalletId"
@@ -394,6 +400,7 @@ export default {
     async changeCustomerFn(v, index) {
       // console.log(v, 322311);
       this.dataList[index].customerWalletId = ''
+      this.dataList[index].customerWalletName = ''
       const res = await getFinanceCustomerList({
         customerId: v,
         type: 'COMMONLY'
@@ -426,6 +433,7 @@ export default {
         projectName: '材料成本',
         departmentId: '',
         customerWalletId: '',
+        customerWalletName: '',
         invoiceType: '',
         incomeDept: '',
         // afterTaxAmount: "",