Procházet zdrojové kódy

Merge branch 'feature/Feature-basic_data' into develop

莫绍宝 před 3 roky
rodič
revize
8443b0ad47

+ 31 - 17
src/views/basic_data/taker/taker_car.vue

@@ -41,24 +41,30 @@
     <!-- 按钮 -->
     <div class="btn-group clearfix">
       <div class="fl">
-        <el-button type="primary" size="small" @click="addDataList"
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          size="small"
+          @click="addDataList"
           >新增</el-button
         >
 
-        <el-popconfirm @onConfirm="delFn" title="这是一段内容确定删除吗?">
+        <el-popconfirm
+          class="delClass"
+          @onConfirm="delFn"
+          title="这是一段内容确定删除吗?"
+        >
           <el-button
-            size="small"
-            type="primary"
-            class="textColor"
             slot="reference"
+            type="danger"
+            icon="el-icon-minus"
+            size="small"
             >批量删除</el-button
           >
         </el-popconfirm>
       </div>
       <div class="fr">
-        <el-button type="primary" size="small" @click="exportFn"
-          >导出</el-button
-        >
+        <ExportButton :exUrl="'/take-car-record/export'" :exParams="exParams" />
       </div>
     </div>
     <!-- 列表 -->
@@ -281,6 +287,14 @@ export default {
       ids: [],
     };
   },
+  computed: {
+    exParams() {
+      return {
+        carBrand: this.searchForm.carBrand,
+        customerName: this.searchForm.customerName,
+      };
+    },
+  },
   async created() {
     this.getDataList({ pageNum: 1, pageSize: 10 });
     this.getDealerDataList({ pageNum: 1, pageSize: 10 });
@@ -295,14 +309,14 @@ export default {
       this.ids = selection.map((v) => v.id);
       console.log(this.ids);
     },
-    //导出
-    exportFn() {
-      let screenData = {
-        customerName: this.searchForm.customerName,
-        carBrand: this.searchForm.carBrand,
-      };
-      downloadFiles("/take-car-record/export", screenData);
-    },
+    // //导出
+    // exportFn() {
+    //   let screenData = {
+    //     customerName: this.searchForm.customerName,
+    //     carBrand: this.searchForm.carBrand,
+    //   };
+    //   downloadFiles("/take-car-record/export", screenData);
+    // },
     //取消
     async cancelFn() {
       if (this.addForm.id) {
@@ -430,4 +444,4 @@ export default {
 ::v-deep .el-dialog__header {
   background-color: #dddddd;
 }
-</style>
+</style>

+ 17 - 12
src/views/basic_data/taker/taker_list.vue

@@ -52,9 +52,7 @@
         <el-button type="primary" size="small" @click="addFn">新增</el-button>
       </div>
       <div class="fr">
-        <el-button type="primary" size="small" @click="exportFn"
-          >导出</el-button
-        >
+        <ExportButton :exUrl="'/taker-record/export'" :exParams="exParams" />
       </div>
     </div>
     <!-- 列表 -->
@@ -308,6 +306,13 @@ export default {
   },
   computed: {
     ...mapGetters(["customerId", "customerName"]),
+    exParams() {
+      return {
+        customerName: this.searchForm.customerName,
+        takerName: this.searchForm.takerName,
+        phoneKeyword: this.searchForm.phoneKeyword,
+      };
+    },
   },
   data() {
     return {
@@ -453,14 +458,14 @@ export default {
     handlefile(response, file, fileList) {
       console.log(response, file, fileList);
     },
-    //导出
-    exportFn() {
-      let screenData = {
-        customerName: this.searchForm.customerName,
-        takerName: this.searchForm.takerName,
-      };
-      downloadFiles("/taker-record/export", screenData);
-    },
+    // //导出
+    // exportFn() {
+    //   let screenData = {
+    //     customerName: this.searchForm.customerName,
+    //     takerName: this.searchForm.takerName,
+    //   };
+    //   downloadFiles("/taker-record/export", screenData);
+    // },
     //停用提货人档案
     async stopFn(id) {
       await stopTaker({ id });
@@ -607,4 +612,4 @@ export default {
 .right {
   float: right;
 }
-</style>
+</style>

+ 4 - 3
src/views/finance/components/rebate_list-edit.vue

@@ -495,8 +495,6 @@ export default {
           );
 
           v.walletName = arr[0].name;
-
-          delete v.walletList;
         });
       }
 
@@ -514,8 +512,11 @@ export default {
     //选择经销商名称事件
     async changeCustomerFn(v, index, value) {
       this.state2 = true;
+      this.$nextTick(function () {
+        value.customerWalletId = "";
+        value.walletName = "";
+      });
 
-      value.customerWalletId = "";
       const res = await getWalletCustomerList({
         customerId: v,
         type: "REBATE",

+ 17 - 13
src/views/finance/credit_list.vue

@@ -43,9 +43,11 @@
       <!-- 按钮 -->
       <div class="btn-group clearfix">
         <div class="fr">
-          <el-button type="primary" size="small" @click="exportList"
-            >导出</el-button
-          >
+          <ExportButton
+            :exUrl="'/wallet/customer/list/export'"
+            :exParams="exParams"
+            class="exportClass"
+          />
           <el-button type="primary" size="small">打印</el-button>
         </div>
       </div>
@@ -245,6 +247,14 @@ export default {
       },
     };
   },
+  computed: {
+    exParams() {
+      return {
+        customerId: this.searchForm.customerId,
+        type: "COMMONLY",
+      };
+    },
+  },
   created() {
     this.getDataList({
       type: "COMMONLY",
@@ -268,16 +278,6 @@ export default {
       };
       this.dialogForm = true;
     },
-    //导出
-    exportList() {
-      let screenData = {
-        amount: this.searchForm.amount,
-        customerNumber: this.searchForm.customerNumber,
-        customerName: this.searchForm.customerName,
-        walletName: this.searchForm.walletName,
-      };
-      downloadFiles("/credit/exportData", screenData);
-    },
     //清空
     clearFn() {
       this.$refs.searchForm.resetFields();
@@ -341,4 +341,8 @@ export default {
 .selectStyle {
   width: 100%;
 }
+.exportClass {
+  display: inline-block;
+  margin-right: 10px;
+}
 </style>

+ 5 - 4
src/views/finance/rebate_form.vue

@@ -379,23 +379,24 @@ export default {
     },
     //新增
     async addFn() {
+      let arr;
       await this.$refs.searchForm.validate();
       this.dataList.forEach((v) => {
-        const arr = v.walletList.filter(
+        arr = v.walletList.filter(
           (i) => i.customerWalletId == v.customerWalletId
         );
-
+        console.log(arr);
         v.walletName = arr[0].name;
-        delete v.walletList;
       });
       console.log(this.dataList);
       await getRebateOrderAdd({ ...this.searchForm, items: this.dataList });
       this.$message.success("保存成功");
+      this.$router.push("/finance/rebate_list");
     },
     //选择经销商名称事件
     async changeCustomerFn(v, index, value) {
       value.customerWalletId = "";
-      console.log(v, 322311);
+
       const res = await getWalletCustomerList({
         customerId: v,
         type: "REBATE",

+ 17 - 2
src/views/finance/receivable_list.vue

@@ -111,7 +111,10 @@
           </el-popconfirm>
         </div>
         <div class="fr">
-          <el-button type="primary" size="small">导出</el-button>
+          <ExportButton
+            :exUrl="'/finance/other/rece/listExport'"
+            :exParams="exParams"
+          />
         </div>
       </div>
       <!-- 列表 -->
@@ -294,6 +297,18 @@ export default {
       deleList: null,
     };
   },
+  computed: {
+    exParams() {
+      return {
+        source: this.searchForm.source,
+        code: this.searchForm.code,
+        userName: this.searchForm.userName,
+        startTime: this.searchForm.startTime,
+        endTime: this.searchForm.endTime,
+        examineStatus: this.examine,
+      };
+    },
+  },
   created() {
     this.getDataList({ pageSize: this.pageSize, pageNum: this.currentPage });
   },
@@ -375,4 +390,4 @@ export default {
 .delClass {
   margin-left: 10px;
 }
-</style>
+</style>