Explorar el Código

收款单,返利单更改

chen hace 3 años
padre
commit
7959e2e89d

+ 8 - 0
src/api/finance/receipt_list.js

@@ -7,4 +7,12 @@ export function getK3ReceiptList(params) {
       method: 'get',
       params
     })
+  }
+// 收款单详情
+export function getK3ReceiptDetail(params) {
+    return request({
+      url: '/k3/receipt/detail',
+      method: 'get',
+      params
+    })
   }

+ 8 - 0
src/api/finance/wallet.js

@@ -23,4 +23,12 @@ export function getfinanceInit(params) {
       method: 'post',
       params
     })
+  }
+// 设置特定的经销商返利钱包的返利额度
+export function getWalletRebateRateUpdate(params) {
+    return request({
+      url: '/wallet/rebate_rate/update',
+      method: 'post',
+      params
+    })
   }

+ 33 - 11
src/views/finance/balance_sum.vue

@@ -41,10 +41,6 @@
     <div class="btn-group clearfix">
       <div class="fr">
         <el-button type="primary" size="small">导出</el-button>
-        <el-button type="primary" size="small" @click="seeFN">明细</el-button>
-        <el-button type="primary" size="small" @click="walletFn"
-          >余额</el-button
-        >
       </div>
     </div>
     <!-- 列表 -->
@@ -94,9 +90,22 @@
             min-width="160"
             show-overflow-tooltip
           >
-            <template slot-scope=""> </template>
-            <el-button type="text" class="textColor"> 余额 </el-button>
-            <el-button type="text" class="textColor"> 明细 </el-button>
+            <template v-slot="{ row }">
+              <el-button
+                type="text"
+                class="textColor"
+                @click="walletFn(row.customerId)"
+              >
+                余额
+              </el-button>
+              <el-button
+                type="text"
+                class="textColor"
+                @click="seeFN(row.customerName,row.customerNumber)"
+              >
+                明细
+              </el-button>
+            </template>
           </el-table-column>
         </el-table>
       </div>
@@ -146,11 +155,24 @@ export default {
       this.dataList = res.data;
     },
     //余额
-    walletFn() {
-      this.$router.push("/finance/wallet");
+    walletFn(v) {
+      this.$router.push({
+        path: "/finance/wallet",
+
+        query: {
+          id: v,
+        },
+      });
     },
-    seeFN() {
-      this.$router.push("/finance/standbook_list");
+    //明细
+    seeFN(customerName,customerNumber) {
+      this.$router.push({
+        path: "/finance/standbook_list",
+        query: {
+          customerName,
+          customerNumber
+        },
+      });
     },
   },
 };

+ 46 - 20
src/views/finance/components/rebate_list-apply.vue

@@ -15,61 +15,78 @@
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="返利单号" prop="">
               <el-input
+                disabled
                 v-model="searchForm.rebateOrderId"
-                placeholder="请输入"
+                placeholder=""
               ></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="返利日期" prop="">
               <el-input
+                disabled
                 v-model="searchForm.theTime"
-                placeholder="请输入"
+                placeholder=""
               ></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="备注" prop="">
               <el-input
+                disabled
                 v-model="searchForm.remark"
-                placeholder="请输入"
+                placeholder=""
               ></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="制单人" prop="">
               <el-input
+                disabled
                 v-model="searchForm.createBy"
-                placeholder="请输入"
+                placeholder=""
               ></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="制单日期" prop="">
               <el-input
+                disabled
                 v-model="searchForm.createTime"
-                placeholder="请输入"
+                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-input
+                v-if="this.searchForm.secondExamineBy != null"
+                disabled
+                v-model="searchForm.secondExamineBy"
+                placeholder=""
+              ></el-input>
+              <el-input
+                v-if="this.searchForm.examineBy != null"
+                disabled
+                v-model="searchForm.examineBy"
+                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>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="关闭人" prop="">
-              <el-input 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-input
+                v-if="this.searchForm.secondExamineTime != null"
+                disabled
+                v-model="searchForm.secondExamineTime"
+                placeholder=""
+              ></el-input>
+              <el-input
+                v-if="this.searchForm.examineTime != null"
+                disabled
+                v-model="searchForm.examineTime"
+                placeholder=""
+              ></el-input>
             </el-form-item>
           </el-col>
         </el-row>
@@ -414,15 +431,24 @@ export default {
       this.searchForm.createBy = res.data.createBy;
       this.searchForm.createTime = res.data.createTime;
       this.searchForm.remark = res.data.remark;
+      this.searchForm.secondExamineBy = res.data.secondExamineBy;
+      this.searchForm.secondExamineTime = res.data.secondExamineTime;
+      this.searchForm.examineBy = res.data.examineBy;
+      this.searchForm.examineTime = res.data.examineTime;
+
       this.dataList = res.data.items;
       this.dataList2 = res.data.items;
       this.examineBy = res.data.examineBy;
       this.examineRemark = res.data.examineRemark;
-      this.examineStatus = res.data.examineStatus;
+      if (res.data.examineStatus == "OK_ONE") {
+        this.examineStatus = "OK";
+      }
+      if (res.data.examineStatus == "FAIL_ONE") {
+        this.examineStatus = "FAIL";
+      }
     },
   },
 };
 </script>
 
-<style>
-</style>
+<style></style>

+ 1 - 12
src/views/finance/components/rebate_list-confirm.vue

@@ -67,16 +67,6 @@
               <el-input 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>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="关闭日期" prop="">
-              <el-input placeholder="请输入"></el-input>
-            </el-form-item>
-          </el-col>
         </el-row>
       </el-form>
     </div>
@@ -216,5 +206,4 @@ export default {
 };
 </script>
 
-<style>
-</style>
+<style></style>

+ 8 - 14
src/views/finance/components/rebate_list-detail.vue

@@ -17,6 +17,7 @@
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="返利单号" prop="">
               <el-input
+                disabled
                 v-model="searchForm.rebateOrderId"
                 placeholder="请输入"
               ></el-input>
@@ -25,6 +26,7 @@
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="返利日期" prop="">
               <el-input
+                disabled
                 v-model="searchForm.theTime"
                 placeholder="请输入"
               ></el-input>
@@ -33,6 +35,7 @@
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="备注" prop="">
               <el-input
+                disabled
                 v-model="searchForm.remark"
                 placeholder="请输入"
               ></el-input>
@@ -41,6 +44,7 @@
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="制单人" prop="">
               <el-input
+                disabled
                 v-model="searchForm.createBy"
                 placeholder="请输入"
               ></el-input>
@@ -49,12 +53,13 @@
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="制单日期" prop="">
               <el-input
+                disabled
                 v-model="searchForm.createTime"
                 placeholder="请输入"
               ></el-input>
             </el-form-item>
           </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
+          <!-- <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="审批人" prop="">
               <el-input placeholder="请输入"></el-input>
             </el-form-item>
@@ -63,17 +68,7 @@
             <el-form-item label="审批日期" prop="">
               <el-input 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>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="关闭日期" prop="">
-              <el-input placeholder="请输入"></el-input>
-            </el-form-item>
-          </el-col>
+          </el-col> -->
         </el-row>
       </el-form>
     </div>
@@ -285,5 +280,4 @@ export default {
 };
 </script>
 
-<style>
-</style>
+<style></style>

+ 8 - 14
src/views/finance/components/rebate_list-examine.vue

@@ -17,6 +17,7 @@
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="返利单号" prop="">
               <el-input
+                disabled
                 v-model="searchForm.rebateOrderId"
                 placeholder="请输入"
               ></el-input>
@@ -25,6 +26,7 @@
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="返利日期" prop="">
               <el-input
+                disabled
                 v-model="searchForm.theTime"
                 placeholder="请输入"
               ></el-input>
@@ -33,6 +35,7 @@
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="备注" prop="">
               <el-input
+                disabled
                 v-model="searchForm.remark"
                 placeholder="请输入"
               ></el-input>
@@ -41,6 +44,7 @@
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="制单人" prop="">
               <el-input
+                disabled
                 v-model="searchForm.createBy"
                 placeholder="请输入"
               ></el-input>
@@ -49,12 +53,13 @@
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="制单日期" prop="">
               <el-input
+                disabled
                 v-model="searchForm.createTime"
                 placeholder="请输入"
               ></el-input>
             </el-form-item>
           </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
+          <!-- <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="审批人" prop="">
               <el-input placeholder="请输入"></el-input>
             </el-form-item>
@@ -63,17 +68,7 @@
             <el-form-item label="审批日期" prop="">
               <el-input 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>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="关闭日期" prop="">
-              <el-input placeholder="请输入"></el-input>
-            </el-form-item>
-          </el-col>
+          </el-col> -->
         </el-row>
       </el-form>
     </div>
@@ -301,5 +296,4 @@ export default {
 };
 </script>
 
-<style>
-</style>
+<style></style>

+ 43 - 19
src/views/finance/components/rebate_list-review.vue

@@ -17,6 +17,7 @@
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="返利单号" prop="">
               <el-input
+                disabled
                 v-model="searchForm.rebateOrderId"
                 placeholder="请输入"
               ></el-input>
@@ -25,6 +26,7 @@
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="返利日期" prop="">
               <el-input
+                disabled
                 v-model="searchForm.theTime"
                 placeholder="请输入"
               ></el-input>
@@ -33,6 +35,7 @@
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="备注" prop="">
               <el-input
+                disabled
                 v-model="searchForm.remark"
                 placeholder="请输入"
               ></el-input>
@@ -41,6 +44,7 @@
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="制单人" prop="">
               <el-input
+                disabled
                 v-model="searchForm.createBy"
                 placeholder="请输入"
               ></el-input>
@@ -49,6 +53,7 @@
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="制单日期" prop="">
               <el-input
+                disabled
                 v-model="searchForm.createTime"
                 placeholder="请输入"
               ></el-input>
@@ -56,22 +61,34 @@
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="审批人" prop="">
-              <el-input placeholder="请输入"></el-input>
+              <el-input
+                v-if="this.searchForm.secondExamineBy != null"
+                disabled
+                v-model="searchForm.secondExamineBy"
+                placeholder=""
+              ></el-input>
+              <el-input
+                v-if="this.searchForm.examineBy != null"
+                disabled
+                v-model="searchForm.examineBy"
+                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>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="关闭人" prop="">
-              <el-input 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-input
+                v-if="this.searchForm.secondExamineTime != null"
+                disabled
+                v-model="searchForm.secondExamineTime"
+                placeholder=""
+              ></el-input>
+              <el-input
+                v-if="this.searchForm.examineTime != null"
+                disabled
+                v-model="searchForm.examineTime"
+                placeholder=""
+              ></el-input>
             </el-form-item>
           </el-col>
         </el-row>
@@ -289,9 +306,9 @@
             min-width="160"
             show-overflow-tooltip
           >
-            <template slot-scope="scope">
+            <!-- <template slot-scope="scope">
               <el-input v-model="scope.row.allowanceCode"></el-input>
-            </template>
+            </template> -->
           </el-table-column>
           <el-table-column
             align="center"
@@ -300,9 +317,9 @@
             min-width="160"
             show-overflow-tooltip
           >
-            <template slot-scope="scope">
+            <!-- <template slot-scope="scope">
               <el-input v-model="scope.row.allowanceAccount"></el-input>
-            </template>
+            </template> -->
           </el-table-column>
           <el-table-column
             align="center"
@@ -402,7 +419,7 @@ export default {
       },
       dataList: [],
       dataList2: [],
-      selectArr: null,
+      selectArr: [],
       listLoading: false, // 列表加载loading
     };
   },
@@ -417,6 +434,10 @@ export default {
     },
     //确定
     async btnFn() {
+      if (this.selectArr.length == 0) {
+        this.$message.warning("请选择复核单据");
+        return;
+      }
       await getRebateOrderExamine2({
         id: this.detailId,
         examineRemark: this.examineRemark,
@@ -434,6 +455,10 @@ export default {
       this.searchForm.createBy = res.data.createBy;
       this.searchForm.createTime = res.data.createTime;
       this.searchForm.remark = res.data.remark;
+      this.searchForm.secondExamineBy = res.data.secondExamineBy;
+      this.searchForm.secondExamineTime = res.data.secondExamineTime;
+      this.searchForm.examineBy = res.data.examineBy;
+      this.searchForm.examineTime = res.data.examineTime;
       this.dataList = res.data.items;
       this.dataList2 = res.data.items;
     },
@@ -444,5 +469,4 @@ export default {
 };
 </script>
 
-<style>
-</style>
+<style></style>

+ 53 - 26
src/views/finance/components/receipt_list-detail.vue

@@ -17,102 +17,108 @@
           <el-row :gutter="20">
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="单据类型" prop="">
-                <el-input placeholder="请输入"></el-input>
+                <el-input v-model="searchForm.billType" disabled></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-input v-model="searchForm.customerType" disabled></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-input v-model="searchForm.skzz" disabled></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-input v-model="searchForm.billNo" disabled></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-input v-model="searchForm.customerName" disabled></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-input v-model="searchForm.settleOrg" disabled></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-input v-model="searchForm.bibie" disabled></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-input v-model="searchForm.saleOrg" disabled></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-input v-model="searchForm.theTime" disabled></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-input
+                  v-model="searchForm.wlCompanyType"
+                  disabled
+                ></el-input>
               </el-form-item>
             </el-col>
-            <el-col :xs="24" :sm="12" :lg="6">
+            <!-- <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="应收金额" prop="">
-                <el-input placeholder="请输入"></el-input>
+                <el-input v-model="searchForm." disabledel-input>
               </el-form-item>
-            </el-col>
+            </el-col> -->
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="销售部门" prop="">
-                <el-input placeholder="请输入"></el-input>
+                <el-input
+                  v-model="searchForm.saleDepartment"
+                  disabled
+                ></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-input v-model="searchForm.saleGroup" disabled></el-input>
               </el-form-item>
             </el-col>
-            <el-col :xs="24" :sm="12" :lg="6">
+            <!-- <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="往来单位" prop="">
-                <el-input placeholder="请输入"></el-input>
+                <el-input v-model="searchForm." disabledel-input>
               </el-form-item>
-            </el-col>
+            </el-col> -->
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="实收金额" prop="">
-                <el-input placeholder="请输入"></el-input>
+                <el-input v-model="searchForm.amount" disabled></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-input v-model="searchForm.walletName" disabled></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-input v-model="searchForm.salePerson" disabled></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-input v-model="searchForm.remark" disabled></el-input>
               </el-form-item>
             </el-col>
           </el-row>
         </el-form>
       </div>
-      <br />
+      <!-- <br />
       <strong>明细</strong>
-      <el-divider></el-divider>
+      <el-divider></el-divider> -->
       <!-- 列表 -->
-      <div class="mymain-container">
+      <!-- <div class="mymain-container">
         <div class="table">
           <el-table
             v-loading="listLoading"
@@ -181,14 +187,35 @@
             ></el-table-column>
           </el-table>
         </div>
-      </div>
+      </div> -->
     </div>
   </div>
 </template>
 
 <script>
+import { getK3ReceiptDetail } from "@/api/finance/receipt_list";
 export default {
+  props: {
+    detailId: {
+      type: String,
+      required: true,
+    },
+  },
+  data() {
+    return {
+      searchForm: {},
+    };
+  },
+
+  created() {
+    this.getData();
+  },
   methods: {
+    async getData() {
+      const res = await getK3ReceiptDetail({ id: this.detailId });
+      console.log(res, 787787878);
+      this.searchForm = res.data;
+    },
     goBack() {
       this.$parent.showDetail = true;
     },

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

@@ -309,7 +309,6 @@ export default {
   methods: {
     //重置
     resetFn() {
-      this.dataList = [];
       this.searchForm = {};
     },
     rouClassNameFn({ row, rowIndex }) {

+ 1 - 1
src/views/finance/components/receivable_list-approval.vue

@@ -224,7 +224,7 @@
           <div class="value">
             <div class="value">
               <el-radio v-model="examineStatus" label="OK">通过</el-radio>
-              <el-radio v-model="examineStatus" label="FALL">驳回</el-radio>
+              <el-radio v-model="examineStatus" label="FAIL">驳回</el-radio>
             </div>
           </div>
         </el-col>

+ 1 - 1
src/views/finance/credit_list.vue

@@ -29,7 +29,7 @@
                 </el-select>
               </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="clearFn">清空</el-button>
                 <el-button size="small" type="primary" @click="searchFn"

+ 0 - 1
src/views/finance/rebate_form.vue

@@ -340,7 +340,6 @@ export default {
         remark: "",
         createBy: "",
       };
-      this.dataList = [];
     },
     rouClassNameFn({ row, rowIndex }) {
       //把每一行的索引放进row

+ 2 - 0
src/views/finance/rebate_list.vue

@@ -379,6 +379,8 @@
                   class="textColor"
                   v-show="
                     (scope.row.examineStatus == 'OK_ONE' ||
+                      scope.row.examineStatus == 'FAIL_ONE' ||
+                      scope.row.examineStatus == 'FAIL' ||
                       scope.row.examineStatus == 'OK') &&
                     !isCustomer
                   "

+ 106 - 27
src/views/finance/receipt_list.vue

@@ -12,45 +12,83 @@
         >
           <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="billType">
+                <el-input
+                  v-model="searchForm.billType"
+                  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="billNo">
+                <el-input
+                  v-model="searchForm.billNo"
+                  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="wlCompanyType">
+                <el-input
+                  v-model="searchForm.wlCompanyType"
+                  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="customerName">
+                <el-input
+                  v-model="searchForm.customerName"
+                  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="settleType">
+                <el-input
+                  v-model="searchForm.settleType"
+                  placeholder="请输入"
+                ></el-input>
               </el-form-item>
             </el-col>
-            <el-col :xs="24" :sm="12" :lg="6">
+            <!-- <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="收款用途" prop="">
-                <el-input placeholder="请输入"></el-input>
+                <el-input v-model="searchForm." placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col> -->
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="开始时间" prop="startTime">
+                <el-date-picker
+                  class="selectStyle"
+                  v-model="searchForm.startTime"
+                  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-input placeholder="请输入"></el-input>
+              <el-form-item label="结束时间" prop="endTime">
+                <el-date-picker
+                  class="selectStyle"
+                  v-model="searchForm.endTime"
+                  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="" class="fr">
-                <el-button size="small">清空</el-button>
-                <el-button size="small" type="primary">搜索</el-button>
+                <el-button size="small" @click="cancelFn">清空</el-button>
+                <el-button size="small" type="primary" @click="searchFn"
+                  >搜索</el-button
+                >
               </el-form-item>
             </el-col>
           </el-row>
@@ -59,7 +97,6 @@
       <!-- 按钮 -->
       <div class="btn-group clearfix">
         <div class="fr">
-          <el-button type="primary" size="small" @click="seeFn">查看</el-button>
           <el-button type="primary" size="small">导出</el-button>
         </div>
       </div>
@@ -138,17 +175,17 @@
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
-            <el-table-column
+            <!-- <el-table-column
               align="center"
               label="收款用途"
               prop=""
               min-width="160"
               show-overflow-tooltip
-            ></el-table-column>
+            ></el-table-column> -->
             <el-table-column
               align="center"
               label="付款单位"
-              prop="customerId"
+              prop="customerType"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
@@ -172,7 +209,20 @@
               prop="status"
               min-width="160"
               show-overflow-tooltip
-            ></el-table-column>
+            >
+              <template slot-scope="scope">
+                <el-tag v-show="scope.row.status == 'A'">保存</el-tag>
+                <el-tag v-show="scope.row.status == 'B'" type="info"
+                  >审核中</el-tag
+                >
+                <el-tag v-show="scope.row.status == 'C'" type="success"
+                  >已审核</el-tag
+                >
+                <el-tag v-show="scope.row.status == 'D'" type="warning"
+                  >重新审核</el-tag
+                >
+              </template>
+            </el-table-column>
             <el-table-column
               align="center"
               label="备注"
@@ -185,9 +235,13 @@
               label="操作"
               min-width="160"
               show-overflow-tooltip
+              fixed="right"
             >
-              <template slot-scope="">
-                <el-button type="text" class="textColor" slot="reference"
+              <template slot-scope="scope">
+                <el-button
+                  type="text"
+                  class="textColor"
+                  @click="seeFn(scope.row.id)"
                   >查看</el-button
                 >
               </template>
@@ -207,7 +261,7 @@
         </div>
       </div>
     </div>
-    <ReceiptListDetail v-else />
+    <ReceiptListDetail :detailId="detailId" v-else />
   </div>
 </template>
 
@@ -224,26 +278,51 @@ export default {
       pageSize: 10, // 每页数量
       listTotal: 0, // 列表总数
       dataList: [], // 列表数据
-      searchForm: {}, //搜索表单
+      searchForm: {
+        billType: "",
+        billNo: "",
+        wlCompanyType: "",
+        customerName: "",
+        settleType: "",
+        startTime: "",
+        endTime: "",
+      }, //搜索表单
       listLoading: false, // 列表加载loading
       showDetail: true,
+      detailId: null,
     };
   },
   created() {
     this.getDataList({ pageSize: this.pageSize, pageNum: this.currentPage });
   },
   methods: {
+    //清空
+    cancelFn() {
+      this.$refs.searchForm.resetFields();
+    },
+    //搜索
+    searchFn() {
+      this.getDataList({
+        ...this.searchForm,
+        pageSize: this.pageSize,
+        pageNum: this.currentPage,
+      });
+    },
     async getDataList(data) {
       const res = await getK3ReceiptList(data);
       console.log(res);
       this.dataList = res.data.records;
     },
-    seeFn() {
+    seeFn(id) {
+      this.detailId = id;
       this.showDetail = false;
     },
   },
 };
 </script>
 
-<style>
+<style lang="scss" scoped>
+.selectStyle {
+  width: 100%;
+}
 </style>

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

@@ -54,6 +54,7 @@
                   v-model="searchForm.startTime"
                   placeholder="选择日期"
                   type="datetime"
+                  default-time="00:00:00"
                   value-format="yyyy-MM-dd HH:mm:ss"
                 >
                 </el-date-picker>
@@ -66,6 +67,7 @@
                   v-model="searchForm.endTime"
                   placeholder="选择日期"
                   type="datetime"
+                  default-time="23:59:59"
                   value-format="yyyy-MM-dd HH:mm:ss"
                 >
                 </el-date-picker>
@@ -86,14 +88,24 @@
       <!-- 按钮 -->
       <div class="btn-group clearfix">
         <div class="fl">
-          <el-button type="primary" size="small" @click="addFn">新建</el-button>
+          <el-button
+            type="primary"
+            icon="el-icon-plus"
+            size="small"
+            @click="addFn"
+            >新建</el-button
+          >
 
           <el-popconfirm
             class="delClass"
             @onConfirm="deleFn"
             title="这是一段内容确定删除吗?"
           >
-            <el-button slot="reference" type="primary" size="small"
+            <el-button
+              slot="reference"
+              type="danger"
+              icon="el-icon-minus"
+              size="small"
               >批量删除</el-button
             >
           </el-popconfirm>
@@ -272,6 +284,8 @@ export default {
         source: "",
         code: "",
         userName: "",
+        startTime: "",
+        endTime: "",
       }, //搜索表单
       listLoading: false, // 列表加载loading
       examine: "",

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

@@ -71,7 +71,7 @@
                 v-model="searchForm.endTime"
                 type="datetime"
                 placeholder="选择日期时间"
-                default-time="00:00:00"
+                default-time="23:59:59"
                 value-format="yyyy-MM-dd HH:mm:ss"
               >
               </el-date-picker>
@@ -445,13 +445,24 @@ export default {
     ...mapGetters(["customerId"]),
   },
   created() {
-    this.getDataList({
-      pageSize: this.pageSize,
-      pageNum: this.currentPage,
-      type: this.bill,
-    });
+    if (this.$route.query.customerName && this.$route.query.customerNumber) {
+      this.getDataList({
+        pageSize: this.pageSize,
+        pageNum: this.currentPage,
+        type: this.bill,
+        customerName: this.$route.query.customerName,
+        customerNumber: this.$route.query.customerNumber,
+      });
+    } else {
+      this.getDataList({
+        pageSize: this.pageSize,
+        pageNum: this.currentPage,
+        type: this.bill,
+      });
+    }
     this.getWalletList();
     this.getDataDict();
+    console.log(this.$route.query, 1111111);
   },
   methods: {
     // 更改每页数量
@@ -558,4 +569,4 @@ export default {
 .color4 {
   background-color: #6bcfd7;
 }
-</style>
+</style>

+ 132 - 13
src/views/finance/wallet.vue

@@ -27,6 +27,13 @@
         >
           <el-table-column
             align="center"
+            label="经销商名称"
+            prop="customerName"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
             label="钱包类型"
             prop="mainName"
             min-width="160"
@@ -86,6 +93,13 @@
         >
           <el-table-column
             align="center"
+            label="经销商名称"
+            prop="customerName"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
             label="返利钱包"
             prop="name"
             min-width="160"
@@ -93,6 +107,13 @@
           ></el-table-column>
           <el-table-column
             align="center"
+            label="返利比例"
+            prop="rebateRate"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
             label="钱包余额"
             prop="amount"
             min-width="160"
@@ -106,15 +127,57 @@
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
+          <el-table-column
+            align="center"
+            label="操作"
+            min-width="160"
+            show-overflow-tooltip
+          >
+            <template v-slot="{ row }">
+              <el-button type="text" class="textColor" @click="editFn(row)">
+                修改
+              </el-button>
+            </template>
+          </el-table-column>
         </el-table>
       </div>
     </div>
+    <!-- 弹窗 -->
+    <el-dialog
+      title="配置返利比例"
+      :visible.sync="dialogForm"
+      width="30%"
+      :show-close="false"
+      :close-on-click-modal="false"
+    >
+      <el-form
+        ref="addForm"
+        :rules="rules"
+        :model="addForm"
+        label-width="100px"
+      >
+        <el-form-item label="返利比例" prop="rebateRate">
+          <el-input
+            v-model.number="addForm.rebateRate"
+            oninput="if(value>100)value=100;if(value<0)value=0"
+            ><i class="el-input__icon" slot="suffix">% </i></el-input
+          >
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="cancelFn">取 消</el-button>
+        <el-button type="primary" @click="determineFn">确 定</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
 <script>
 import { mapGetters } from "vuex";
-import { getfinanceInit } from "@/api/finance/wallet";
+import {
+  getfinanceInit,
+  getWalletRebateRateUpdate,
+} from "@/api/finance/wallet";
 import { getWalletCustomerList } from "@/api/finance/change_apply";
 export default {
   data() {
@@ -122,16 +185,78 @@ export default {
       listLoading: false, // 列表加载loading
       walletList: [],
       rebateList: [],
+      addForm: {
+        rebateRate: null,
+      },
+      dialogForm: false,
+      rules: {
+        rebateRate: [
+          {
+            required: true,
+            message: "请输入返利比例",
+            trigger: "blur",
+          },
+        ],
+      },
     };
   },
   created() {
-    this.getDataWallet();
-    this.getDataRebate();
+    console.log(this.$route.query.id, 11, this.customerId);
+    if (this.$route.query.id) {
+      this.getDataWallet({
+        customerId: this.$route.query.id,
+        type: "COMMONLY",
+      });
+      this.getDataRebate({
+        customerId: this.$route.query.id,
+        type: "REBATE",
+      });
+    } else {
+      this.getDataWallet({
+        customerId: this.customerId,
+        type: "COMMONLY",
+      });
+      this.getDataRebate({
+        customerId: this.customerId,
+        type: "REBATE",
+      });
+    }
   },
   computed: {
     ...mapGetters(["customerId"]),
   },
   methods: {
+    //取消
+    async cancelFn() {
+      this.dialogForm = false;
+      await this.$refs.addForm.clearValidate();
+    },
+    //确定
+    async determineFn() {
+      await this.$refs.addForm.validate();
+      const res = this.addForm.rebateRate / 100;
+      this.addForm.rebateRate = res;
+      await getWalletRebateRateUpdate({ ...this.addForm });
+      if (this.$route.query.id) {
+        this.getDataRebate({
+          customerId: this.$route.query.id,
+          type: "REBATE",
+        });
+      } else {
+        this.getDataRebate({
+          customerId: this.customerId,
+          type: "REBATE",
+        });
+      }
+      this.$message.success("修改成功");
+      this.dialogForm = false;
+    },
+    //修改
+    editFn(v) {
+      this.addForm.customerWalletId = v.customerWalletId;
+      this.addForm.rebateRate = v.rebateRate * 100;
+      this.dialogForm = true;
+    },
     //一键生成
     async generateFn() {
       await getfinanceInit({ customerId: this.customerId });
@@ -140,18 +265,12 @@ export default {
       this.$message.success("已生成");
     },
     //
-    async getDataRebate() {
-      let res = await getWalletCustomerList({
-        customerId: this.customerId,
-        type: "REBATE",
-      });
+    async getDataRebate(data) {
+      let res = await getWalletCustomerList(data);
       this.rebateList = res.data;
     },
-    async getDataWallet() {
-      let res = await getWalletCustomerList({
-        customerId: this.customerId,
-        type: "COMMONLY",
-      });
+    async getDataWallet(data) {
+      let res = await getWalletCustomerList(data);
       this.walletList = res.data;
     },
   },