Explorar o código

台账和返利互转申请修改

chen %!s(int64=3) %!d(string=hai) anos
pai
achega
5d18ad73d7
Modificáronse 2 ficheiros con 74 adicións e 15 borrados
  1. 18 7
      src/views/finance/change_apply.vue
  2. 56 8
      src/views/finance/standbook_list.vue

+ 18 - 7
src/views/finance/change_apply.vue

@@ -105,10 +105,10 @@
                 filterable
                 v-model="scope.row.name"
                 placeholder="请选择"
-                @focus="typeFn(scope.row)"
+                @click.native="changeCustomerFn(scope.row, scope.$index)"
               >
                 <el-option
-                  v-for="item in typeList"
+                  v-for="item in scope.row.typeList"
                   :key="item.id"
                   :label="item.name"
                   :value="item.id"
@@ -206,16 +206,27 @@ export default {
         v.bz = "";
       });
     },
-    //返利类型数据
-    async typeFn(row) {
-      console.log(row);
+
+    // //返利类型数据
+    async changeCustomerFn(v, index) {
+      console.log(v, index, 123456789);
+      v.name = "";
       let res = await getWalletCustomerList({
-        customerId: row.customerId,
+        customerId: v.customerId,
         type: "REBATE",
       });
-      this.typeList = res.data;
+      this.$set(this.dataList[index], "typeList", res.data);
     },
 
+    // async typeFn(row) {
+    //   console.log(row);
+    //   let res = await getWalletCustomerList({
+    //     customerId: row.customerId,
+    //     type: "REBATE",
+    //   });
+    //   this.typeList = res.data;
+    // },
+
     //查询同个集团的经销商数据
     async getCustomerData() {
       const res = await getCustomerGroupList();

+ 56 - 8
src/views/finance/standbook_list.vue

@@ -2,7 +2,7 @@
   <div class="app-container">
     <span>台账</span>
     <el-divider></el-divider>
-    <el-radio-group v-model="mainId" size="">
+    <!-- <el-radio-group v-model="mainId" size="">
       <el-radio-button
         v-for="(v, i) in dictList"
         :key="i"
@@ -10,7 +10,7 @@
         >{{ v.dictValue }}</el-radio-button
       >
     </el-radio-group>
-    <br /><br />
+    <br /><br /> -->
     <el-radio-group v-model="bill" @change="checkFn" size="">
       <el-radio-button label="COMMONLY">贷款台账</el-radio-button>
       <el-radio-button label="REBATE">返利台账</el-radio-button>
@@ -152,7 +152,15 @@
               show-overflow-tooltip
             >
               <template slot-scope="scope">
-                {{ scope.row.flag == 1 ? scope.row.amount : "-" }}
+                {{
+                  scope.row.flag == 1
+                    ? scope.row.amountType == "IN"
+                      ? scope.row.amount
+                      : scope.row.amountType == "OUT"
+                      ? -scope.row.amount
+                      : ""
+                    : "-"
+                }}
               </template>
             </el-table-column>
             <el-table-column
@@ -163,7 +171,15 @@
               show-overflow-tooltip
             >
               <template slot-scope="scope">
-                {{ scope.row.flag == 2 ? scope.row.amount : "-" }}
+                {{
+                  scope.row.flag == 2
+                    ? scope.row.amountType == "IN"
+                      ? scope.row.amount
+                      : scope.row.amountType == "OUT"
+                      ? -scope.row.amount
+                      : ""
+                    : "-"
+                }}
               </template>
             </el-table-column>
             <el-table-column
@@ -174,7 +190,15 @@
               show-overflow-tooltip
             >
               <template slot-scope="scope">
-                {{ scope.row.flag == 3 ? scope.row.amount : "-" }}
+                {{
+                  scope.row.flag == 3
+                    ? scope.row.amountType == "IN"
+                      ? scope.row.amount
+                      : scope.row.amountType == "OUT"
+                      ? -scope.row.amount
+                      : ""
+                    : "-"
+                }}
               </template>
             </el-table-column>
             <el-table-column
@@ -185,7 +209,15 @@
               show-overflow-tooltip
             >
               <template slot-scope="scope">
-                {{ scope.row.flag == 4 ? scope.row.amount : "-" }}
+                {{
+                  scope.row.flag == 4
+                    ? scope.row.amountType == "IN"
+                      ? scope.row.amount
+                      : scope.row.amountType == "OUT"
+                      ? -scope.row.amount
+                      : ""
+                    : "-"
+                }}
               </template>
             </el-table-column>
             <el-table-column
@@ -196,7 +228,15 @@
               show-overflow-tooltip
             >
               <template slot-scope="scope">
-                {{ scope.row.flag == 5 ? scope.row.amount : "-" }}
+                {{
+                  scope.row.flag == 5
+                    ? scope.row.amountType == "IN"
+                      ? scope.row.amount
+                      : scope.row.amountType == "OUT"
+                      ? -scope.row.amount
+                      : ""
+                    : "-"
+                }}
               </template>
             </el-table-column>
             <el-table-column
@@ -207,7 +247,15 @@
               show-overflow-tooltip
             >
               <template slot-scope="scope">
-                {{ scope.row.flag == 6 ? scope.row.amount : "-" }}
+                {{
+                  scope.row.flag == 6
+                    ? scope.row.amountType == "IN"
+                      ? scope.row.amount
+                      : scope.row.amountType == "OUT"
+                      ? -scope.row.amount
+                      : ""
+                    : "-"
+                }}
               </template>
             </el-table-column>
             <el-table-column