فهرست منبع

退押审批及部分功能修改

chen 3 سال پیش
والد
کامیت
11d1ff3f2e

+ 21 - 13
src/api/finance/standbook_list.js

@@ -1,18 +1,26 @@
-import request from '@/utils/request'
+import request from "@/utils/request";
 
 // 台账列表
 export function getStandbookList(params) {
-    return request({
-      url: '/finance/standing/book/list',
-      method: 'get',
-      params
-    })
-  }
+  return request({
+    url: "/finance/standing/book/list",
+    method: "get",
+    params,
+  });
+}
 // 字典
 export function getDictList(params) {
-    return request({
-      url: '/common/dict/list',
-      method: 'get',
-      params
-    })
-  }
+  return request({
+    url: "/common/dict/list",
+    method: "get",
+    params,
+  });
+}
+// 经销商列表
+export function getCustomerList(params) {
+  return request({
+    url: "/customer/list",
+    method: "get",
+    params,
+  });
+}

+ 33 - 25
src/api/finance/wallet.js

@@ -1,34 +1,42 @@
-import request from '@/utils/request'
+import request from "@/utils/request";
 
 // 返利钱包列表
 export function getRebateList(params) {
-    return request({
-      url: '/wallet/rebate/list',
-      method: 'get',
-      params
-    })
-  }
+  return request({
+    url: "/wallet/rebate/list",
+    method: "get",
+    params,
+  });
+}
 // 钱包列表(非返利钱包)
 export function getWalletList(params) {
-    return request({
-      url: '/wallet/list',
-      method: 'get',
-      params
-    })
-  }
+  return request({
+    url: "/wallet/list",
+    method: "get",
+    params,
+  });
+}
 // 经销商一键生成钱包
 export function getfinanceInit(params) {
-    return request({
-      url: '/finance/init',
-      method: 'post',
-      params
-    })
-  }
+  return request({
+    url: "/finance/init",
+    method: "post",
+    params,
+  });
+}
 // 设置特定的经销商返利钱包的返利额度
 export function getWalletRebateRateUpdate(params) {
-    return request({
-      url: '/wallet/rebate_rate/update',
-      method: 'post',
-      params
-    })
-  }
+  return request({
+    url: "/wallet/rebate_rate/update",
+    method: "post",
+    params,
+  });
+}
+// 经销商列表
+export function getCustomerList(params) {
+  return request({
+    url: "/customer/list",
+    method: "get",
+    params,
+  });
+}

+ 9 - 5
src/views/basic_data/dealer/dealer_stock.vue

@@ -190,7 +190,7 @@
         label-width="100px"
         label-position="right"
       >
-        <el-form-item label="经销商编码" prop="">
+        <el-form-item label="经销商编码" prop="customerId">
           <el-select
             filterable
             class="selectStyle"
@@ -200,14 +200,14 @@
             <el-option
               v-for="item in dealerList"
               :key="item.id"
-              :label="item.number"
+              :label="item.name"
               :value="item.id"
             >
             </el-option>
           </el-select>
         </el-form-item>
         <el-form-item label="经销商名称" prop="">
-          <el-input disabled v-model="addForm.customerName"></el-input>
+          <el-input disabled v-model="addForm.customerNumber"></el-input>
           <!-- <template slot-scope="scope">
             {{ scope.row }}
           </template> -->
@@ -333,6 +333,9 @@ export default {
       },
       mainId: null,
       rules: {
+        customerId: [
+          { required: true, message: "请选择经销商名称", trigger: "blur" },
+        ],
         mainId: [
           { required: true, message: "请选择存货分类", trigger: "blur" },
         ],
@@ -497,10 +500,11 @@ export default {
       let data3 = this.userList.filter((v) => {
         return v.adminUserId == this.addForm.serviceId;
       });
+      console.log(data3);
 
       let value = {
         customerId: this.addForm.customerId,
-        customerName: this.addForm.cusotmerName,
+        customerName: this.addForm.customerName,
         customerNumber: this.addForm.customerNumber,
         mainId: this.addForm.mainId,
         mainName: data2[0].productCategoryName,
@@ -533,7 +537,7 @@ export default {
     async cancelFn() {
       await this.$refs.addForm.clearValidate();
       this.addForm.customerId = "";
-      this.addForm.customerName = "";
+      this.addForm.customerNumber = "";
       this.addForm.mainId = "";
       this.addForm.oneParentId = "";
       this.addForm.twoParentId = "";

+ 1 - 1
src/views/basic_data/wallet/wallet_list.vue

@@ -104,7 +104,7 @@
                 class="textColor"
                 v-if="$checkBtnRole('edit', $route.meta.roles)"
                 @click="setFn(scope.row)"
-                >设置产品大类</el-button
+                >设置</el-button
               >
             </template>
           </el-table-column>

+ 7 - 7
src/views/dashboard/index.vue

@@ -295,7 +295,7 @@ export default {
     this.getDataList({
       pageSize: this.pageSize,
       pageNum: this.currentPage,
-      readFlag: true,
+      readFlag: false,
     });
   },
   computed: {
@@ -334,7 +334,7 @@ export default {
         this.getDataList({
           pageSize: this.pageSize,
           pageNum: this.currentPage,
-          readFlag: true,
+          readFlag: false,
         });
       });
     },
@@ -387,7 +387,7 @@ export default {
         this.getDataList({
           pageSize: this.pageSize,
           pageNum: this.currentPage,
-          readFlag: true,
+          readFlag: false,
         });
       }
       if (this.type == 2) {
@@ -401,7 +401,7 @@ export default {
         this.getRebateList({
           pageSize: this.pageSize,
           pageNum: this.currentPage,
-          isSecondExamine: true,
+          isSecondExamine: false,
         });
       }
     },
@@ -412,7 +412,7 @@ export default {
         this.getDataList({
           pageSize: this.pageSize,
           pageNum: this.currentPage,
-          readFlag: true,
+          readFlag: false,
         });
       }
       if (this.type == 2) {
@@ -426,7 +426,7 @@ export default {
         this.getRebateList({
           pageSize: this.pageSize,
           pageNum: this.currentPage,
-          isSecondExamine: true,
+          isSecondExamine: false,
         });
       }
     },
@@ -450,7 +450,7 @@ export default {
         this.getDataList({
           pageSize: this.pageSize,
           pageNum: this.currentPage,
-          readFlag: true,
+          readFlag: false,
         });
       }
       if (v == 2) {

+ 124 - 5
src/views/engin_deposit/components/refund_list-detail.vue

@@ -234,7 +234,38 @@
             prop="fileUrl"
             min-width="160"
             show-overflow-tooltip
-          ></el-table-column>
+          >
+            <template slot-scope="scope">
+              <el-image
+                ref="img"
+                :src="imageURL + item.url"
+                :preview-src-list="previewImages"
+                v-if="checkFileType(scope.row.fileUrl) == 'image'"
+                style="width: 120px; height: 120px"
+                fit="cover"
+              ></el-image>
+              <img
+                class="file"
+                src="@/assets/common/word.png"
+                v-if="checkFileType(scope.row.fileUrl) == 'word'"
+              />
+              <img
+                class="file"
+                src="@/assets/common/excel.png"
+                v-if="checkFileType(scope.row.fileUrl) == 'excel'"
+              />
+              <img
+                class="file"
+                src="@/assets/common/ppt.png"
+                v-if="checkFileType(scope.row.fileUrl) == 'ppt'"
+              />
+              <img
+                class="file"
+                src="@/assets/common/pdf.png"
+                v-if="checkFileType(scope.row.fileUrl) == 'pdf'"
+              />
+            </template>
+          </el-table-column>
           <el-table-column
             align="center"
             label="下载文件名称"
@@ -248,8 +279,11 @@
             min-width="160"
             show-overflow-tooltip
           >
-            <template slot-scope="">
-              <el-button type="text" class="textColor" slot="reference"
+            <template slot-scope="scope">
+              <el-button
+                type="text"
+                class="textColor"
+                @click="downLoadFn(scope.row.fileUrl)"
                 >下载</el-button
               >
             </template>
@@ -276,7 +310,7 @@
     </div>
     <h3>审批</h3>
     <el-divider></el-divider>
-    <div class="diy-table-1">
+    <div v-if="detailList.examineStatus == 'WAIT'" class="diy-table-1">
       <el-row :gutter="0">
         <el-col :xs="12" :sm="12" :lg="12" class="item">
           <div class="label">验收人</div>
@@ -313,9 +347,61 @@
         </el-col>
       </el-row>
     </div>
+    <div
+      v-if="
+        detailList.examineStatus == 'OK' || detailList.examineStatus == 'FAIL'
+      "
+      class="diy-table-1"
+    >
+      <el-row :gutter="0">
+        <el-col :xs="12" :sm="12" :lg="12" class="item">
+          <div class="label">验收人</div>
+          <div class="value">{{ detailList.checkBy }}</div>
+        </el-col>
+        <el-col :xs="12" :sm="12" :lg="12" class="item">
+          <div class="label">验收日期</div>
+          <div class="value">
+            <el-date-picker
+              prefix-icon="''"
+              class="selectStyle"
+              v-model="detailList.checkDate"
+              type="datetime"
+              placeholder=""
+              default-time="00:00:00"
+              value-format="yyyy-MM-dd HH:mm:ss"
+            >
+            </el-date-picker>
+          </div>
+        </el-col>
+        <el-col :xs="12" :sm="24" :lg="24" class="item">
+          <div class="label">是否退押</div>
+          <div class="value">
+            <el-radio-group v-model="detailList.isRefundDeposit">
+              <el-radio :label="true">是</el-radio>
+              <el-radio :label="false">否</el-radio>
+            </el-radio-group>
+          </div>
+        </el-col>
+        <el-col :xs="12" :sm="24" :lg="24" class="item">
+          <div class="label">验收说明</div>
+          <div class="value">
+            <el-input
+              v-model="detailList.checkNote"
+              placeholder="请输入内容"
+            ></el-input>
+          </div>
+        </el-col>
+      </el-row>
+    </div>
     <br />
     <!-- 按钮 -->
-    <div class="btn-group clearfix">
+    <!-- detailList.examineStatus != 'OK' || detailList.examineStatus != 'FAIL' -->
+    <div
+      class="btn-group clearfix"
+      v-if="
+        detailList.examineStatus == 'SAVE' || detailList.examineStatus == 'WAIT'
+      "
+    >
       <div class="fl">
         <el-button type="primary" size="small" @click="adoptFn"
           >审批通过</el-button
@@ -329,6 +415,7 @@
 </template>
 
 <script>
+import IMAGEUPLOAD from "@/components/Common/image-upload.vue";
 import { mapGetters } from "vuex";
 import {
   getDepositManageDetail,
@@ -341,11 +428,13 @@ export default {
       required: true,
     },
   },
+  components: { IMAGEUPLOAD },
   computed: {
     ...mapGetters(["name"]),
   },
   data() {
     return {
+      imageURL: this.$imageUrl,
       listLoading: false, // 列表加载loading
       dataList: [], // 列表数据
       detailList: {},
@@ -356,10 +445,36 @@ export default {
     };
   },
   created() {
+    console.log(this.$imageUrl, 8888);
     this.checkBy = this.name;
     this.getData({ id: this.detailId });
   },
   methods: {
+    //下载
+    downLoadFn(v) {
+      window.open(this.imageURL + v);
+    },
+    // 检查文件类型
+    checkFileType(url) {
+      if (!url) return "";
+      const fileSuffix = url.substring(url.lastIndexOf(".") + 1);
+
+      if (["jpg", "jpeg", "png"].includes(fileSuffix)) {
+        return "image";
+      } else if (["doc", "docx", "dot", "wps", "wpt"].includes(fileSuffix)) {
+        return "word";
+      } else if (["xls", "xlsx", "xlt", "et", "ett"].includes(fileSuffix)) {
+        return "excel";
+      } else if (
+        ["ppt", "pptx", "dps", "dpt", "pot", "pps"].includes(fileSuffix)
+      ) {
+        return "ppt";
+      } else if (["pdf"].includes(fileSuffix)) {
+        return "pdf";
+      } else {
+        return "";
+      }
+    },
     //审批驳回
     async rejectFn() {
       let data = {
@@ -371,6 +486,8 @@ export default {
         examineResult: 0,
       };
       await getDepositManageExamine(data);
+      this.$message.success("审批驳回");
+      this.$parent.showSurrender = true;
     },
     //审批通过
     async adoptFn() {
@@ -383,6 +500,8 @@ export default {
         examineResult: 1,
       };
       await getDepositManageExamine(data);
+      this.$message.success("审批驳回");
+      this.$parent.showSurrender = false;
     },
     async getData(data) {
       const res = await getDepositManageDetail(data);

+ 87 - 17
src/views/engin_deposit/refund_list.vue

@@ -20,13 +20,19 @@
         >
           <el-row :gutter="20">
             <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="工程登录(信息)编号" prop="">
-                <el-input placeholder="请输入"></el-input>
+              <el-form-item label="工程登录(信息)编号" prop="refEnginRecordNo">
+                <el-input
+                  v-model="searchForm.refEnginRecordNo"
+                  placeholder="请输入"
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="经销商编码" prop="">
-                <el-input placeholder="请输入"></el-input>
+              <el-form-item label="经销商编码" prop="customerKeyword">
+                <el-input
+                  v-model="searchForm.customerKeyword"
+                  placeholder="请输入"
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
@@ -35,16 +41,35 @@
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="工程名称" prop="">
-                <el-input placeholder="请输入"></el-input>
+              <el-form-item label="工程名称" prop="refProjectName">
+                <el-input
+                  v-model="searchForm.refProjectName"
+                  placeholder="请输入"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="发货申请开始日期" prop="startDeliverTime">
+                <el-date-picker
+                  class="dateStyle"
+                  v-model="searchForm.startDeliverTime"
+                  type="datetime"
+                  placeholder=""
+                  default-time="00:00:00"
+                  value-format="yyyy-MM-dd HH:mm:ss"
+                >
+                </el-date-picker>
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="发货申请日期" prop="">
+              <el-form-item label="发货申请结束日期" prop="endDeliverTime">
                 <el-date-picker
+                  v-model="searchForm.endDeliverTime"
                   class="dateStyle"
-                  type="date"
-                  placeholder="选择日期"
+                  type="datetime"
+                  placeholder=""
+                  default-time="23:59:59"
+                  value-format="yyyy-MM-dd HH:mm:ss"
                 >
                 </el-date-picker>
               </el-form-item>
@@ -60,10 +85,12 @@
               </el-form-item>
             </el-col>
 
-            <el-col :xs="24" :sm="24" :lg="6">
+            <el-col :xs="24" :sm="24" :lg="24">
               <el-form-item label="" class="fr">
-                <el-button size="small">清空</el-button>
-                <el-button size="small" type="primary">搜索</el-button>
+                <el-button size="small" @click="resetFn">清空</el-button>
+                <el-button size="small" type="primary" @click="searchFn"
+                  >搜索</el-button
+                >
               </el-form-item>
             </el-col>
           </el-row>
@@ -131,9 +158,9 @@
             >
               <template v-slot="{ row }">
                 <el-tag v-show="row.examineStatus == 'SAVE'">保存</el-tag>
-                <el-tag v-show="row.examineStatus == 'WAIT'">保存</el-tag>
-                <el-tag v-show="row.examineStatus == 'OK'">保存</el-tag>
-                <el-tag v-show="row.examineStatus == 'FAIL'">保存</el-tag>
+                <el-tag v-show="row.examineStatus == 'WAIT'">待审核</el-tag>
+                <el-tag v-show="row.examineStatus == 'OK'">通过</el-tag>
+                <el-tag v-show="row.examineStatus == 'FAIL'">不通过</el-tag>
               </template>
             </el-table-column>
             <el-table-column
@@ -146,11 +173,25 @@
                 <el-button
                   type="text"
                   class="textColor"
+                  v-if="
+                    scope.row.examineStatus == 'WAIT' &&
+                    $checkBtnRole('examine', $route.meta.roles)
+                  "
                   @click="examineFn(scope.row.depositManageId)"
                   >审批</el-button
                 >
 
-                <el-button type="text" class="textColor">详情</el-button>
+                <el-button
+                  type="text"
+                  class="textColor"
+                  v-if="
+                    scope.row.examineStatus == 'SAVE' ||
+                    scope.row.examineStatus == 'OK' ||
+                    scope.row.examineStatus == 'FAIL'
+                  "
+                  @click="infoFn(scope.row.depositManageId)"
+                  >详情</el-button
+                >
               </template>
             </el-table-column>
           </el-table>
@@ -185,7 +226,13 @@ export default {
       pageSize: 10, // 每页数量
       listTotal: 0, // 列表总数
       dataList: [], // 列表数据
-      searchForm: {}, //搜索表单
+      searchForm: {
+        refEnginRecordNo: "",
+        customerKeyword: "",
+        refProjectName: "",
+        startDeliverTime: "",
+        endDeliverTime: "",
+      }, //搜索表单
       listLoading: false, // 列表加载loading
       examine: "全部",
       showSurrender: true,
@@ -210,6 +257,29 @@ export default {
     });
   },
   methods: {
+    //重置
+    resetFn() {
+      this.$refs.searchForm.resetFields();
+    },
+    //搜索
+    searchFn() {
+      this.getDataList({
+        pageSize: this.pageSize,
+        pageNum: this.currentPage,
+        confirmName: "",
+        createName: "",
+        enginOrderNo: "",
+        enginOrderType: "",
+        examineStatus: "",
+        refUseUnit: "",
+        ...this.searchForm,
+      });
+    },
+    //详情
+    infoFn(id) {
+      this.detailId = id;
+      this.showSurrender = false;
+    },
     async getDataList(data) {
       const res = await getDepositManageList(data);
       this.dataList = res.data.records;

+ 23 - 22
src/views/finance/change_apply.vue

@@ -230,10 +230,13 @@ export default {
     // },
 
     resetFn() {
+      this.searchForm.theTime = null;
       this.dataList.forEach((v) => {
         v.money = "";
         v.bz = "";
+        v.name = "";
       });
+      this.dataList[1].customerId = "";
     },
 
     // //返利类型数据
@@ -282,30 +285,27 @@ export default {
       let initiatorRemark;
       let receiverRemark;
       let amount;
-      // let res = this.func(this.dataList, 0);
-      // console.log(res);
-      // if (this.dataList[res[0]].money > 0) {
-      //   receiverWalletRebateId = this.dataList[res[0]].customerWalletId;
-      //   initiatorWalletRebateId = this.dataList[res[1]].customerWalletId;
-      //   receiverRemark = this.dataList[res[0]].bz;
-      //   initiatorRemark = this.dataList[res[1]].bz;
-      //   amount = this.dataList[res[0]].money;
-      // } else {
-      //   receiverWalletRebateId = this.dataList[res[1]].customerWalletId;
-      //   initiatorWalletRebateId = this.dataList[res[0]].customerWalletId;
-      //   receiverRemark = this.dataList[res[1]].bz;
-      //   initiatorRemark = this.dataList[res[0]].bz;
-      //   amount = this.dataList[res[1]].money;
-      // }
-      // await getTransferAdd({
-      //   receiverWalletRebateId,
-      //   initiatorWalletRebateId,
-      //   receiverRemark,
-      //   initiatorRemark,
-      //   amount: amount * 1,
-      // });
 
       await this.$refs.searchForm.validate(["theTime"]);
+      let aaa = this.dataList.find((v) => {
+        if (v.money == "") {
+          this.$message.error("请输入返利金额");
+          return v;
+        }
+        if (v.customerId == "") {
+          this.$message.error("请选择经销商");
+          return v;
+        }
+        if (v.name == "") {
+          this.$message.error("请选择返利类型");
+          return v;
+        }
+      });
+      console.log(aaa);
+      if (aaa != undefined) {
+        return;
+      }
+
       if (this.dataList[0].money > 0) {
         receiverWalletRebateId = this.dataList[0].name;
         initiatorWalletRebateId = this.dataList[1].name;
@@ -327,6 +327,7 @@ export default {
         initiatorRemark,
         amount: amount * 1,
       });
+      this.$router.push("/finance/change_list");
       this.$message.success("申请成功");
     },
     async getUserInfoFn() {

+ 19 - 7
src/views/finance/components/receivable_list-add.vue

@@ -325,25 +325,37 @@ export default {
 
     //新增
     async addFn() {
-      let aaa = this.dataList.map((v) => {
+      if (this.dataList.length == 0) {
+        this.$message.error("请添加数据");
+        return;
+      }
+      let aaa = this.dataList.find((v) => {
         if (v.afterTaxAmount == "") {
           this.$message.error("请输入不含税金额");
-          return 1;
+          return v;
+        }
+        if (v.customerId == "") {
+          this.$message.error("请选择经销商");
+          return v;
+        }
+        if (!v.walletId) {
+          this.$message.error("请选择现金钱包");
+          return v;
         }
         if (v.tax == "") {
           this.$message.error("请输入税额");
-          return 1;
+          return v;
         }
         if (v.totalAmount == "") {
           this.$message.error("请输入总金额");
-          return 1;
+          return v;
         }
       });
-
-      let bbb = aaa.indexOf(1);
-      if (bbb != -1) {
+      console.log(aaa);
+      if (aaa != undefined) {
         return;
       }
+
       this.dataList.forEach((v) => {
         let res = this.customerList.filter((i) => i.id == v.customerId);
         console.log(res);

+ 43 - 15
src/views/finance/standbook_list.vue

@@ -27,6 +27,24 @@
       >
         <el-row :gutter="20">
           <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="经销商名称" prop="customerId">
+              <el-select
+                class="selectStyle"
+                v-model="searchForm.customerId"
+                placeholder="请选择"
+                filterable
+              >
+                <el-option
+                  v-for="(v, i) in customerList"
+                  :key="i"
+                  :label="v.name"
+                  :value="v.id"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="钱包" prop="walletRebateId">
               <el-select
                 class="selectStyle"
@@ -78,7 +96,7 @@
             </el-form-item>
           </el-col>
 
-          <el-col :xs="24" :sm="24" :lg="24">
+          <el-col :xs="24" :sm="24" :lg="18">
             <el-form-item label="" class="fr">
               <el-button size="small" @click="resetFn">清空</el-button>
               <el-button size="small" type="primary" @click="searchFn"
@@ -417,10 +435,15 @@
 <script>
 import { mapGetters } from "vuex";
 import { getWalletCustomerList } from "@/api/finance/change_apply";
-import { getStandbookList, getDictList } from "@/api/finance/standbook_list";
+import {
+  getStandbookList,
+  getDictList,
+  getCustomerList,
+} from "@/api/finance/standbook_list";
 export default {
   data() {
     return {
+      customerList: [],
       currentPage: 1, // 当前页码
       pageSize: 10, // 每页数量
       listTotal: 0, // 列表总数
@@ -431,6 +454,7 @@ export default {
       dictList: [],
 
       searchForm: {
+        customerId: "",
         startTime: "",
         endTime: "",
         billNo: "",
@@ -460,11 +484,20 @@ export default {
         type: this.bill,
       });
     }
+    this.getCustomerDataList();
     this.getWalletList();
     this.getDataDict();
-    console.log(this.$route.query, 1111111);
   },
   methods: {
+    //获取经销商列表
+    async getCustomerDataList() {
+      let res = await getCustomerList({
+        pageNum: 1,
+        pageSize: -1,
+      });
+      this.customerList = res.data.records;
+    },
+
     // 更改每页数量
     handleSizeChange(val) {
       this.pageSize = val;
@@ -527,19 +560,12 @@ export default {
     },
     //查询
     searchFn() {
-      console.log(this.mainId);
-      // console.log(this.searchForm);
-      // const res = this.selectList.filter(
-      //   (v) => v.walletRebateId == this.searchForm.walletRebateId
-      // );
+      let res = this.customerList.filter((v) => {
+        return v.id == this.searchForm.customerId;
+      });
       // console.log(res);
-      // this.getDataList({
-      //   ...this.searchForm,
-      //   mainId: this.mainId,
-      //   type: this.bill,
-      //   pageSize: this.pageSize,
-      //   pageNum: this.currentPage,
-      // });
+      // return;
+
       if (this.$route.query.customerName && this.$route.query.customerNumber) {
         this.getDataList({
           ...this.searchForm,
@@ -553,6 +579,8 @@ export default {
       } else {
         this.getDataList({
           ...this.searchForm,
+          customerName: res[0].name,
+          customerNumber: res[0].number,
           mainId: this.mainId,
           pageSize: this.pageSize,
           pageNum: this.currentPage,

+ 16 - 62
src/views/finance/tax_rate.vue

@@ -12,7 +12,7 @@
           label-width="120px"
           label-position="right"
         >
-          <el-form-item label="仓存费税率" prop="nickName">
+          <el-form-item label="仓存费税率" prop="">
             <el-input
               v-model="mainForm.storageFeeTax"
               autocomplete="off"
@@ -20,7 +20,7 @@
               ><i class="el-input__icon" slot="suffix">% </i></el-input
             >
           </el-form-item>
-          <el-form-item label="工程价差税率" prop="nickName">
+          <el-form-item label="工程价差税率" prop="">
             <el-input
               v-model="mainForm.enginPriceDifTax"
               autocomplete="off"
@@ -28,7 +28,7 @@
               ><i class="el-input__icon" slot="suffix">% </i></el-input
             >
           </el-form-item>
-          <el-form-item label="运输费税率" prop="nickName">
+          <el-form-item label="运输费税率" prop="">
             <el-input
               v-model="mainForm.transportTax"
               autocomplete="off"
@@ -36,7 +36,7 @@
               ><i class="el-input__icon" slot="suffix">% </i></el-input
             >
           </el-form-item>
-          <el-form-item label="安装费税率" prop="nickName">
+          <el-form-item label="安装费税率" prop="">
             <el-input
               v-model="mainForm.installTax"
               autocomplete="off"
@@ -44,7 +44,7 @@
               ><i class="el-input__icon" slot="suffix">% </i></el-input
             >
           </el-form-item>
-          <el-form-item label="库存商品税率" prop="nickName">
+          <el-form-item label="库存商品税率" prop="">
             <el-input
               v-model="mainForm.stockTax"
               autocomplete="off"
@@ -52,63 +52,15 @@
               ><i class="el-input__icon" slot="suffix">% </i></el-input
             >
           </el-form-item>
+          <el-form-item label="押金通用比例" prop="">
+            <el-input
+              v-model="mainForm.depositTax"
+              autocomplete="off"
+              placeholder="请输入"
+              ><i class="el-input__icon" slot="suffix">% </i></el-input
+            >
+          </el-form-item>
         </el-form>
-        <!-- <el-form label-position="left" label-width="100px">
-          <el-row>
-            <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="仓存费税率" prop="">
-                <el-input placeholder="请输入">
-                  <i class="el-input__icon" slot="suffix">% </i>
-                </el-input>
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row>
-            <el-col :xs="24" :sm="24" :lg="6">
-              <el-form-item label="工程价差税率" prop="">
-                <el-input placeholder="请输入">
-                  <i class="el-input__icon" slot="suffix">% </i>
-                </el-input>
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row>
-            <el-col :xs="24" :sm="24" :lg="6">
-              <el-form-item label="运输费税率" prop="">
-                <el-input placeholder="请输入">
-                  <i class="el-input__icon" slot="suffix">% </i>
-                </el-input>
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row>
-            <el-col :xs="24" :sm="24" :lg="6">
-              <el-form-item label="安装费税率" prop="">
-                <el-input placeholder="请输入">
-                  <i class="el-input__icon" slot="suffix">% </i>
-                </el-input>
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row>
-            <el-col :xs="24" :sm="24" :lg="6">
-              <el-form-item label="库存商品税率" prop="">
-                <el-input placeholder="请输入">
-                  <i class="el-input__icon" slot="suffix">% </i>
-                </el-input>
-              </el-form-item>
-            </el-col>
-          </el-row>
-
-          <el-row>
-            <el-col :xs="24" :sm="24" :lg="24">
-              <el-form-item label="" class="">
-                <el-button size="small">修改</el-button>
-                <el-button size="small" type="primary">确定</el-button>
-              </el-form-item>
-            </el-col>
-          </el-row>
-        </el-form> -->
       </el-card>
     </div>
 
@@ -132,6 +84,7 @@ export default {
         transportTax: "",
         installTax: "",
         stockTax: "",
+        depositTax: "",
       },
     };
   },
@@ -153,6 +106,7 @@ export default {
         transportTax: res.data.transportTax,
         installTax: res.data.installTax,
         stockTax: res.data.stockTax,
+        depositTax: res.data.depositTax,
       };
     },
   },
@@ -199,4 +153,4 @@ export default {
   cursor: pointer;
   user-select: none;
 }
-</style>
+</style>

+ 94 - 10
src/views/finance/wallet.vue

@@ -3,18 +3,59 @@
     <div class="sty" v-show="this.$route.query.id">
       <el-page-header @back="goBack"> </el-page-header>
     </div>
+    <br />
+    <!-- 筛选条件 -->
+    <div>
+      <el-form
+        ref="searchForm"
+        :model="searchForm"
+        label-width="100px"
+        size="small"
+        label-position="left"
+      >
+        <el-row :gutter="20">
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="经销商名称" prop="customerId">
+              <el-select
+                class="selectStyle"
+                v-model="searchForm.customerId"
+                placeholder="请选择"
+                filterable
+              >
+                <el-option
+                  v-for="(v, i) in customerList"
+                  :key="i"
+                  :label="v.name"
+                  :value="v.id"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+
+          <el-col :xs="24" :sm="24" :lg="18">
+            <el-form-item label="" class="fr">
+              <el-button size="small" @click="resetFn">清空</el-button>
+              <el-button size="small" type="primary" @click="searchFn"
+                >搜索</el-button
+              >
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </div>
 
     <el-row>
       <el-col :xs="24" :sm="12" :lg="12">
         <div class="styl">现金钱包</div>
       </el-col>
-      <el-col :xs="24" :sm="12" :lg="12">
+      <!-- <el-col :xs="24" :sm="12" :lg="12">
         <div class="fr">
           <el-button size="small" type="primary" @click="generateFn"
             >一键生成钱包</el-button
           >
         </div>
-      </el-col>
+      </el-col> -->
     </el-row>
     <el-divider></el-divider>
     <!-- 列表 -->
@@ -186,11 +227,16 @@ import { mapGetters } from "vuex";
 import {
   getfinanceInit,
   getWalletRebateRateUpdate,
+  getCustomerList,
 } from "@/api/finance/wallet";
 import { getWalletCustomerList } from "@/api/finance/change_apply";
 export default {
   data() {
     return {
+      searchForm: {
+        customerId: "",
+      },
+      customerList: [],
       listLoading: false, // 列表加载loading
       walletList: [],
       rebateList: [],
@@ -221,20 +267,55 @@ export default {
         type: "REBATE",
       });
     } else {
-      this.getDataWallet({
-        customerId: this.customerId,
-        type: "COMMONLY",
-      });
-      this.getDataRebate({
-        customerId: this.customerId,
-        type: "REBATE",
-      });
+      this.$message("请选择经销商");
+      this.getCustomerDataList();
+      // this.getDataWallet({
+      //   customerId: this.customerId,
+      //   type: "COMMONLY",
+      // });
+      // this.getDataRebate({
+      //   customerId: this.customerId,
+      //   type: "REBATE",
+      // });
     }
   },
   computed: {
     ...mapGetters(["customerId"]),
   },
   methods: {
+    //清空
+    resetFn() {
+      this.$refs.searchForm.resetFields();
+    },
+    //搜索
+    async searchFn() {
+      // await this.$refs.searchForm.validate((valid, obj) => {
+      //   if (valid) {
+      //     console.log(valid, obj);
+      //     console.log(this.searchForm.customerId);
+      //     alert("submit!");
+      //   } else {
+      //     console.log("error submit!!");
+      //     return false;
+      //   }
+      // });
+      this.getDataWallet({
+        customerId: this.searchForm.customerId,
+        type: "COMMONLY",
+      });
+      this.getDataRebate({
+        customerId: this.searchForm.customerId,
+        type: "REBATE",
+      });
+    },
+    //获取经销商列表
+    async getCustomerDataList() {
+      let res = await getCustomerList({
+        pageNum: 1,
+        pageSize: -1,
+      });
+      this.customerList = res.data.records;
+    },
     //返回
     goBack() {
       this.$router.push("/finance/balance_sum");
@@ -294,4 +375,7 @@ export default {
 .styl {
   padding-top: 14px;
 }
+.selectStyle {
+  width: 100%;
+}
 </style>