Prechádzať zdrojové kódy

Merge branch 'feature/Feature-sales' of https://gogs.zfire.top/zfire-front/supply-front into feature/Feature-sales

howie 3 rokov pred
rodič
commit
1ee75351c5
39 zmenil súbory, kde vykonal 1069 pridanie a 493 odobranie
  1. 8 0
      src/api/finance/receipt_list.js
  2. 8 0
      src/api/finance/wallet.js
  3. 4 5
      src/views/basic_data/material/components/modify_list-apply.vue
  4. 33 11
      src/views/finance/balance_sum.vue
  5. 57 24
      src/views/finance/components/rebate_list-apply.vue
  6. 1 12
      src/views/finance/components/rebate_list-confirm.vue
  7. 43 46
      src/views/finance/components/rebate_list-detail.vue
  8. 8 14
      src/views/finance/components/rebate_list-examine.vue
  9. 43 19
      src/views/finance/components/rebate_list-review.vue
  10. 53 26
      src/views/finance/components/receipt_list-detail.vue
  11. 0 1
      src/views/finance/components/receivable_list-add.vue
  12. 1 1
      src/views/finance/components/receivable_list-approval.vue
  13. 1 1
      src/views/finance/credit_list.vue
  14. 0 1
      src/views/finance/rebate_form.vue
  15. 2 0
      src/views/finance/rebate_list.vue
  16. 106 27
      src/views/finance/receipt_list.vue
  17. 16 2
      src/views/finance/receivable_list.vue
  18. 18 7
      src/views/finance/standbook_list.vue
  19. 132 13
      src/views/finance/wallet.vue
  20. 46 73
      src/views/pset/login_setting.vue
  21. 6 10
      src/views/supply/adjust/adjust_list.vue
  22. 1 1
      src/views/supply/adjust/components/adjust_detail.vue
  23. 2 2
      src/views/supply/apply/components/apply_detail.vue
  24. 46 1
      src/views/supply/apply/components/apply_examine.vue
  25. 41 22
      src/views/supply/apply/components/apply_form.vue
  26. 3 3
      src/views/supply/apply/components/engin_detail.vue
  27. 113 7
      src/views/supply/apply/components/engin_examine.vue
  28. 51 24
      src/views/supply/apply/components/engin_form.vue
  29. 2 2
      src/views/supply/apply/engin_list.vue
  30. 53 49
      src/views/supply/deliver/components/deliver_detail.vue
  31. 5 9
      src/views/supply/deliver/deliver_list.vue
  32. 118 31
      src/views/supply/deliver/engin_list.vue
  33. 5 3
      src/views/supply/engin/commerce_list.vue
  34. 5 3
      src/views/supply/engin/home_list.vue
  35. 9 5
      src/views/supply/reserve/components/reserve_form.vue
  36. 2 2
      src/views/supply/retail/components/retail_detail.vue
  37. 2 2
      src/views/supply/retail/components/retail_examine.vue
  38. 21 34
      src/views/supply/retail/components/retail_form.vue
  39. 4 0
      src/views/supply/retail/retail_list.vue

+ 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
+    })
   }

+ 4 - 5
src/views/basic_data/material/components/modify_list-apply.vue

@@ -1046,6 +1046,7 @@ export default {
         pageNum: 1,
         pageSize: 10,
         keyword: "",
+        bindMain: true,
       };
       getMaterialList(params).then((res) => {
         this.materialLis = res.data.records;
@@ -1070,6 +1071,7 @@ export default {
         pageNum: this.currentPage,
         pageSize: 5 || this.pageSize,
         keyword: this.screenForm.keyword,
+        bindMain: true,
       };
       getMaterialList(params).then((res) => {
         this.dataList = res.data.records;
@@ -1078,9 +1080,6 @@ export default {
       });
     },
     hanleSbumit() {
-
-
-
       for (let i = 0; i < this.items.length; i++) {
         this.items[i].wallets = [
           ...this.items[i].rebateWallets,
@@ -1108,8 +1107,8 @@ export default {
         this.$successMsg("成功");
         getProductRriceDetail({ id: res.data }).then((res) => {
           this.base.billId = res.data.billId;
-          this.$parent.show = 1
-          this.$parent.getList()
+          this.$parent.show = 1;
+          this.$parent.getList();
         });
       });
     },

+ 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
+        },
+      });
     },
   },
 };

+ 57 - 24
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>
@@ -286,9 +303,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"
@@ -297,9 +314,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"
@@ -414,15 +431,31 @@ 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" ||
+        res.data.examineStatus == "OK"
+      ) {
+        this.examineStatus = "OK";
+      }
+      if (
+        res.data.examineStatus == "FAIL_ONE" ||
+        res.data.examineStatus == "FAIL"
+      ) {
+        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>

+ 43 - 46
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>
@@ -204,32 +199,34 @@
         </el-table>
       </div>
     </div>
-    <span>审批记录</span>
-    <el-divider></el-divider>
-    <div class="diy-table-1">
-      <el-row :gutter="0">
-        <el-col :span="12" class="item">
-          <div class="label">审批人</div>
-          <div class="value">{{ examineBy }}</div>
-        </el-col>
-        <el-col :span="12" class="item">
-          <div class="label">审批结果</div>
-          <div class="value">
-            <el-radio v-model="examineStatus" label="OK">通过</el-radio>
-            <el-radio v-model="examineStatus" label="FAIL">驳回</el-radio>
-          </div>
-        </el-col>
-        <el-col :span="24" class="item">
-          <div class="label">审批说明</div>
-          <div class="value">
-            <el-input
-              v-model="examineRemark"
-              placeholder="请输入内容"
-            ></el-input>
-          </div>
-        </el-col>
-      </el-row>
-    </div>
+    <!-- <div v-if="isShow">
+      <span>审批记录</span>
+      <el-divider></el-divider>
+      <div class="diy-table-1">
+        <el-row :gutter="0">
+          <el-col :span="12" class="item">
+            <div class="label">审批人</div>
+            <div class="value">{{ examineBy }}</div>
+          </el-col>
+          <el-col :span="12" class="item">
+            <div class="label">审批结果</div>
+            <div class="value">
+              <el-radio v-model="examineStatus" label="OK">通过</el-radio>
+              <el-radio v-model="examineStatus" label="FAIL">驳回</el-radio>
+            </div>
+          </el-col>
+          <el-col :span="24" class="item">
+            <div class="label">审批说明</div>
+            <div class="value">
+              <el-input
+                v-model="examineRemark"
+                placeholder="请输入内容"
+              ></el-input>
+            </div>
+          </el-col>
+        </el-row>
+      </div>
+    </div> -->
   </div>
 </template>
 
@@ -253,6 +250,7 @@ export default {
       examineBy: "",
       examineRemark: "",
       examineStatus: "",
+      isShow: false,
     };
   },
   created() {
@@ -274,16 +272,15 @@ export default {
       this.dataList = res.data.items;
       this.examineBy = res.data.examineBy;
       this.examineRemark = res.data.examineRemark;
-      if (res.data.examineStatus == "OK_ONE") {
-        this.examineStatus = "OK";
-      }
-      if (res.data.examineStatus == "FAIL_ONE") {
-        this.examineStatus = "FAIL";
-      }
+      // if (
+      //   res.data.examineStatus == "SAVE" ||
+      //   res.data.examineStatus == "WAIT"
+      // ) {
+      //   this.isShow = false;
+      // }
     },
   },
 };
 </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;
     },
   },

+ 46 - 73
src/views/pset/login_setting.vue

@@ -16,88 +16,58 @@
 
     </div>
     <div class="mymain-container">
-      <el-table
-        v-loading="listLoading"
-        :data="dataList"
-        element-loading-text="Loading"
-        border
-        fit
-        highlight-current-row
-        stripe
-        @selection-change="handleSelectionChange"
-      >
-        <el-table-column type="selection" width="55" align="center">
+      <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
+        <el-table-column align="center" label="轮播图名称" prop="imgCarouselName" min-width="120" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="轮播图" prop="imgCarouselUrl" min-width="120" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <a :href="scope.row.imgCarouselUrl" >
+              <img :src="scope.row.imgCarouselUrl" alt="轮播图"  class="el-image__inner el-image__preview"/>
+            </a>
+          </template>
+
+        </el-table-column>
+        <el-table-column align="center" label="排序" prop="imgCarouselOrder" min-width="160" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="创建时间" prop="createTime" min-width="160" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="状态" prop="status" min-width="160" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <div style="z-index: 99">
+              <el-tag type="success"   v-if="scope.row.status == '1'"  >显示</el-tag>
+              <el-tag type="danger"  v-else-if="scope.row.status == '0'">隐藏 </el-tag>
+            </div>
+          </template>
         </el-table-column>
-        <template v-for="col in columns">
-          <el-table-column
-            align="center"
-            :label="col.lable"
-            :prop="col.prop"
-            :min-width="col.widht"
-            show-overflow-tooltip
-            v-if="col.prop == 'status'"
-          >
-            <template slot-scope="scope">
-              <div style="z-index: 99">
-                <el-tag type="success"   v-if="scope.row.status == '1'"  >显示</el-tag>
-                <el-tag type="danger"  v-else-if="scope.row.status == '0'">隐藏 </el-tag>
-              </div>
-            </template>
-          </el-table-column>
 
           <el-table-column
             align="center"
-            :label="col.lable"
-            :prop="col.prop"
-            :min-width="col.widht"
-            show-overflow-tooltip
-            v-if="col.prop == 'imgCarouselUrl'"
+            fixed="right"
+            label="操作"
+            min-width="160"
           >
             <template slot-scope="scope">
-              <a :href="scope.row.imgCarouselUrl" >
-                <img :src="scope.row.imgCarouselUrl" alt="轮播图"  class="el-image__inner el-image__preview"/>
-              </a>
-            </template>
-          </el-table-column>
+              <el-button type="text" size="small" @click="hanleEdit(scope.row)"
+              >编辑</el-button
+              >
 
-          <el-table-column
-            v-else
-            align="center"
-            :label="col.lable"
-            :prop="col.prop"
-            :min-width="col.widht"
-            show-overflow-tooltip
-          >
-          </el-table-column>
-        </template>
+              <el-button type="text" size="small" @click="hanleStatus(scope.row.id)"  v-if="scope.row.status === '1'">隐藏</el-button>
+              <el-button type="text" size="small" @click="hanleStatus(scope.row.id)"  v-if="scope.row.status === '0'">显示</el-button>
 
-        <el-table-column
-          align="center"
-          fixed="right"
-          label="操作"
-          min-width="160"
-        >
-          <template slot-scope="scope">
-            <el-button type="text" size="small" @click="hanleEdit(scope.row)"
-            >编辑</el-button
-            >
 
-            <el-button type="text" size="small" @click="hanleStatus(scope.row.id)"  v-if="scope.row.status === '1'">隐藏</el-button>
-            <el-button type="text" size="small" @click="hanleStatus(scope.row.id)"  v-if="scope.row.status === '0'">显示</el-button>
+              <el-popconfirm
+                title="确定要删除这张轮播图吗?"
+                style="margin-left: 10px"
+                @onConfirm="hanleDelete(scope.row.id)"
+              >
+                <el-button slot="reference" type="text" size="small"
+                >删除</el-button
+                >
+              </el-popconfirm>
+            </template>
+          </el-table-column>
 
 
-            <el-popconfirm
-              title="确定要删除这张轮播图吗?"
-              style="margin-left: 10px"
-              @onConfirm="hanleDelete(scope.row.id)"
-            >
-              <el-button slot="reference" type="text" size="small"
-              >删除</el-button
-              >
-            </el-popconfirm>
-          </template>
-        </el-table-column>
       </el-table>
+
+
       <!-- 分页 -->
       <!--      <div style="margin: 20px 0">-->
       <!--        <el-pagination-->
@@ -287,7 +257,7 @@
                     {
                         prop: "imgCarouselUrl",
                         lable: "轮播图",
-                        widht: 160,
+                        widht: 200,
                     },
 
                     {
@@ -303,11 +273,11 @@
                     {
                         prop: "status",
                         lable: "状态",
-                        widht: 160,
+                        widht: 120,
                     },
-
                 ],
 
+
                 rules: {
                     imgCarouselName: [
                         { required: true, message: "请输入轮播图名称", trigger: "blur" },
@@ -483,6 +453,9 @@
             },
 
         },
+        created() {
+            this.getList();
+        },
         components: {
             Pagination,
             ImageUpload

+ 6 - 10
src/views/supply/adjust/adjust_list.vue

@@ -60,7 +60,7 @@
         </div>
         <div class="table">
           <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
-            <el-table-column align="center" label="发货单号" prop="deliverNo" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="发货单号" prop="deliverNo" min-width="180" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="发货日期" prop="deliverDate" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="仓库" prop="correspondName" min-width="120" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="订单类型" prop="orderType" min-width="120" show-overflow-tooltip>
@@ -68,20 +68,16 @@
                 {{ scope.row.orderType | typeFilter }}
               </template>
             </el-table-column>
-            <el-table-column align="center" label="订单号" prop="orderNo" min-width="120" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="订单号" prop="orderNo" min-width="200" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="经销商" prop="customerName" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="规格型号" prop="specification" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="计量单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="直调数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="价税合计" prop="mustTotalAmount" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="无税金额" min-width="100" show-overflow-tooltip>
-              <template slot-scope="scope">
-                {{ scope.row.qty * scope.row.afterTaxPrice }}
-              </template>
-            </el-table-column>
+            <el-table-column align="center" label="无税金额" prop="noTaxTotalAmount" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="无税单价" prop="afterTaxPrice" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="备注" prop="remark" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="备注" prop="remark" min-width="180" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="制表人" prop="createBy" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="制表日期" prop="createTime" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="操作" width="100" fixed="right">

+ 1 - 1
src/views/supply/adjust/components/adjust_detail.vue

@@ -86,7 +86,7 @@
           <el-table-column align="center" label="产品编号" prop="materialNumber" min-width="160" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="单位" prop="baseUnitId" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="申请数量" prop="directTransferQty" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="含税单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="无税单价" prop="afterTaxPrice" min-width="100" show-overflow-tooltip></el-table-column>

+ 2 - 2
src/views/supply/apply/components/apply_detail.vue

@@ -39,7 +39,7 @@
         <el-col :span="24" class="item file">
           <div class="label">附件</div>
           <div class="value">
-            <div class="file-list">
+            <div class="file-list" v-if="detailData.fileUrl">
               <div class="file-item">
                 <el-image v-if="checkFileType(detailData.fileUrl) == 'image'" class="img" :src="imageURL + detailData.fileUrl" :preview-src-list="[imageURL + detailData.fileUrl]"></el-image>
                 <div v-else class="box2" @click="openLink(detailData.fileUrl)">
@@ -90,7 +90,7 @@
           </template>
         </el-table-column>
         <el-table-column align="center" label="库存数" prop="stockNumber" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="销售订单号" prop="retailOrderId" min-width="180" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="销售订单号" prop="orderId" min-width="180" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="产品编码" prop="materialCode" min-width="120" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>

+ 46 - 1
src/views/supply/apply/components/apply_examine.vue

@@ -36,6 +36,23 @@
           <div class="label">备注</div>
           <div class="value">{{detailData.remark}}</div>
         </el-col>
+        <el-col :span="24" class="item file">
+          <div class="label">附件</div>
+          <div class="value">
+            <div class="file-list" v-if="detailData.fileUrl">
+              <div class="file-item">
+                <el-image v-if="checkFileType(detailData.fileUrl) == 'image'" class="img" :src="imageURL + detailData.fileUrl" :preview-src-list="[imageURL + detailData.fileUrl]"></el-image>
+                <div v-else class="box2" @click="openLink(detailData.fileUrl)">
+                  <img src="@/assets/common/word.png" v-if="checkFileType(detailData.fileUrl) == 'word'" />
+                  <img src="@/assets/common/excel.png" v-if="checkFileType(detailData.fileUrl) == 'excel'" />
+                  <img src="@/assets/common/ppt.png" v-if="checkFileType(detailData.fileUrl) == 'ppt'" />
+                  <img src="@/assets/common/pdf.png" v-if="checkFileType(detailData.fileUrl) == 'pdf'" />
+                  <div class="name ellipsis-3">{{ detailData.fileName }}</div>
+                </div>
+              </div>
+            </div>
+          </div>
+        </el-col>
         <el-col :span="8" class="item">
           <div class="label">制单人</div>
           <div class="value">{{detailData.createBy}}</div>
@@ -67,7 +84,7 @@
           </template>
         </el-table-column>
         <el-table-column align="center" label="库存数" prop="stockNumber" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="销售订单号" prop="retailOrderId" min-width="180" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="销售订单号" prop="orderId" min-width="180" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="产品编码" prop="materialCode" min-width="120" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
@@ -149,6 +166,7 @@ export default {
   },
   data() {
     return {
+      imageURL: this.$imageUrl,
       detailData: {},
       goodsList: [],
       userName: JSON.parse(localStorage.getItem("supply_user")).nickName,
@@ -225,6 +243,33 @@ export default {
       }
     },
 
+    // 检查文件类型
+    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 '';
+      }
+		},
+
+    // 打开链接
+    openLink(url) {
+      getFileUrl({key: url}).then(res => {
+        window.open(res.data);
+      })
+    },
+
     // 提交审批
     clickSubmitForm() {
       for(let i=0; i<this.goodsList.length; i++) {

+ 41 - 22
src/views/supply/apply/components/apply_form.vue

@@ -139,7 +139,7 @@
       <div class="table">
         <el-table :data="tableGoodsList" element-loading-text="Loading" border fit highlight-current-row stripe height="400" @selection-change="tableSelectionChange">
           <el-table-column align="center" type="selection" width="55" :selectable='checkboxSelect'></el-table-column>
-          <el-table-column align="center" label="订单号" prop="orderId" min-width="180" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="订单号" prop="mainOrderId" min-width="200" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
@@ -151,13 +151,18 @@
             </template>
           </el-table-column>
           <el-table-column align="center" label="已申请数量" prop="alreadyInvoiceNum" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="已申请未出货数量" prop="sendQty" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="未申请数量" prop="refundableQty" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="总库存数量" prop="stockAdequate" min-width="100" show-overflow-tooltip>
             <template slot-scope="scope">
-              {{scope.row.stockAdequate | stockFilter}}
+              {{stockFilter(scope.row, 1)}}
+            </template>
+          </el-table-column>
+          <el-table-column align="center" label="对应库存数量" prop="stockCorrespond" min-width="110" show-overflow-tooltip>
+            <template slot-scope="scope">
+              {{stockFilter(scope.row, 2)}}
             </template>
           </el-table-column>
-          <el-table-column align="center" label="对应库存数量" prop="stockCorrespond" min-width="110" show-overflow-tooltip></el-table-column>
         </el-table>
         <div class="pagination clearfix" style="margin-top: 10px">
           <div class="fr">
@@ -195,15 +200,6 @@ export default {
   name: 'ApplyForm',
   componentName: 'ApplyForm',
   props: ['listItem'],
-  filters: {
-    stockFilter(val) {
-      const MAP = {
-        0: '不充足',
-        1: '充足'
-      }
-      return MAP[val]
-    }
-  },
   data() {
     return {
       mainForm: {
@@ -233,6 +229,7 @@ export default {
       currentPage: 1,
       listTotal: 0,
       typeList: [],
+      stockList: [],
       
       tableGoodsList: [],
       tableSelection: [],
@@ -289,6 +286,7 @@ export default {
           item.orderId = item.id;
         })
         this.goodsList = data.orders;
+        this.screenForm.type = data.mainId;
       })
     },
 
@@ -306,6 +304,9 @@ export default {
       getDictList({sysDictEnum: 'PRODUCT_TYPE'}).then(res => {
         this.typeList = res.data;
       })
+      getDictList({sysDictEnum: 'STOCK_ORDER'}).then(res => {
+        this.stockList = res.data;
+      })
     },
 
     // 获取经销商列表
@@ -318,6 +319,17 @@ export default {
         this.dealerList = res.data.records;
       })
     },
+    
+    // 库存字段
+    stockFilter(item, type) {
+      let STOCK_ORDER_INVOICE = this.stockList.find(o => o.dictCode == 'STOCK_ORDER_INVOICE').dictValue;
+      if(type === 1) {
+        return item.stockAdequate > STOCK_ORDER_INVOICE ? '充足' : item.stockAdequate;
+      }
+      if(type === 2) {
+        return item.stockCorrespond > STOCK_ORDER_INVOICE ? '充足' : item.stockCorrespond;
+      }
+    },
 
     // 获取商品列表
     getGoodsList() {
@@ -328,11 +340,6 @@ export default {
         mainId: this.screenForm.type,
         id: this.screenForm.orderNum,
       }).then(res => {
-        res.data.records.forEach(item => {
-          item.mainOrderId = item.id;
-          delete item.id;
-        });
-
         let oldGoodsList = this.goodsList;
         let newGoodsList = res.data.records;
         for(let i = 0; i < oldGoodsList.length; i++) {
@@ -414,7 +421,7 @@ export default {
       for(let i=0; i<allArr.length; i++){  // 循环allArr数组对象的内容
         let flag = true;  // 建立标记,判断数据是否重复,true为不重复
         for(let j=0; j<newArr.length; j++){  // 循环新数组的内容
-          if(allArr[i].materialId == newArr[j].materialId){ // 让allArr数组对象的内容与新数组的内容作比较,相同的话,改变标记为false
+          if(allArr[i].orderId == newArr[j].orderId){ // 让allArr数组对象的内容与新数组的内容作比较,相同的话,改变标记为false
             flag = false;
           }
         }
@@ -427,6 +434,17 @@ export default {
 
     // 确定 添加产品
     submitAddGoods() {
+      for(let i=0; i<this.tableSelection.length; i++) {
+        if(!this.tableSelection[i].invoiceNum) {
+          this.$errorMsg('请输入申请数量');
+          return;
+        }
+        if(this.tableSelection[i].invoiceNum > this.tableSelection[i].refundableQty) {
+          this.$errorMsg('申请数量不能大于未申请数量');
+          return;
+        }
+      }
+
       let allList = this.tableGoodsList;
       let selectList = this.tableSelection;
       let submitList = [];
@@ -457,15 +475,16 @@ export default {
     clickSubmitForm(status) {
       this.$refs.mainForm.validate((valid) => {
         if (valid) {
+          if(this.goodsList.length < 1) {
+            return this.$errorMsg('请添加引用');
+          }
           for(let i=0; i<this.goodsList.length; i++) {
             if(!this.goodsList[i].invoiceNum) {
               this.$errorMsg('请输入申请数量');
               return;
             }
-          }
-          for(let i=0; i<this.goodsList.length; i++) {
-            if(this.goodsList[i].invoiceNum > this.goodsList[i].qty) {
-              this.$errorMsg('申请数量不能大于总数量');
+            if(this.goodsList[i].invoiceNum > this.goodsList[i].refundableQty) {
+              this.$errorMsg('申请数量不能大于未申请数量');
               return;
             }
           }

+ 3 - 3
src/views/supply/apply/components/engin_detail.vue

@@ -75,7 +75,7 @@
         <el-col :span="24" class="item file">
           <div class="label">附件</div>
           <div class="value">
-            <div class="file-list">
+            <div class="file-list" v-if="detailData.fileUrl">
               <div class="file-item">
                 <el-image v-if="checkFileType(detailData.fileUrl) == 'image'" class="img" :src="imageURL + detailData.fileUrl" :preview-src-list="[imageURL + detailData.fileUrl]"></el-image>
                 <div v-else class="box2" @click="openLink(detailData.fileUrl)">
@@ -120,8 +120,8 @@
       <el-table :data="detailData.orders" element-loading-text="Loading" border fit highlight-current-row stripe max-height="400">
         <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
         <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="订单日期" prop="theTime" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="销售订单号" prop="retailOrderId" min-width="180" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="订单日期" prop="theTime" min-width="160" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="销售订单号" prop="orderId" min-width="180" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="物料代码" prop="materialOldNumber" min-width="120" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="产品编码" prop="materialCode" min-width="120" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>

+ 113 - 7
src/views/supply/apply/components/engin_examine.vue

@@ -75,7 +75,7 @@
         <el-col :span="24" class="item file">
           <div class="label">附件</div>
           <div class="value">
-            <div class="file-list">
+            <div class="file-list" v-if="detailData.fileUrl">
               <div class="file-item">
                 <el-image v-if="checkFileType(detailData.fileUrl) == 'image'" class="img" :src="imageURL + detailData.fileUrl" :preview-src-list="[imageURL + detailData.fileUrl]"></el-image>
                 <div v-else class="box2" @click="openLink(detailData.fileUrl)">
@@ -117,11 +117,19 @@
     </div>
 
     <div class="table" style="margin-top: 20px">
-      <el-table :data="detailData.orders" element-loading-text="Loading" border fit highlight-current-row stripe max-height="400">
+      <el-table :data="goodsList" element-loading-text="Loading" border fit highlight-current-row stripe max-height="400">
         <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
         <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="订单日期" prop="theTime" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="销售订单号" prop="retailOrderId" min-width="180" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="发货仓库" prop="stockIds" min-width="160" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <el-select v-model="scope.row.stockIds" placeholder="请选择发货仓库" size="small" multiple filterable @change="changeWarehouse(scope.$index)">
+              <el-option :label="item.name" :value="item.id" v-for="(item, index) in positionList" :key="index"></el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+        <el-table-column align="center" label="库存数" prop="stockNumber" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="订单日期" prop="theTime" min-width="160" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="销售订单号" prop="orderId" min-width="180" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="物料代码" prop="materialOldNumber" min-width="120" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="产品编码" prop="materialCode" min-width="120" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
@@ -175,20 +183,42 @@
 </template>
 
 <script>
-import { getEnginDetail, examineEngin } from "@/api/supply/apply";
+import { getEnginDetail, examineEngin, getPositionList, checkStock } from "@/api/supply/apply";
 
 export default {
   name: 'EnginExamine',
   componentName: 'EnginExamine',
   props: ['listItem'],
+  filters: {
+    statusFilter(val) {
+      const statusList = [
+        { label: '已保存', value: 'SAVE' },
+        { label: '待审核', value: 'WAIT' },
+        { label: '审核通过', value: 'OK' },
+        { label: '审核驳回', value: 'FAIL' },
+        { label: '已关闭', value: 'CLOSE' },
+      ];
+      let obj = statusList.find(o => o.value == val);
+      return obj ? obj.label : ''
+    },
+    enginTypeFilter(val) {
+      const MAP = {
+        HOME: '家用',
+        TRADE: '商用',
+      }
+      return MAP[val];
+    }
+  },
   data() {
     return {
+      imageURL: this.$imageUrl,
       detailData: {},
       userName: JSON.parse(localStorage.getItem("supply_user")).nickName,
 
       examineForm: {
         remark: '',
-      }
+      },
+      positionList: [],
     }
   },
 
@@ -234,11 +264,87 @@ export default {
     getDetail() {
       getEnginDetail({id: this.listItem.id}).then(res => {
         this.detailData = res.data;
+
+        res.data.orders.forEach((item, index) => {
+          if(item.stockIds && item.stockIds.length > 0) {
+            item.stockIds = item.stockIds.map((it, idx) => {
+              return it.id;
+            });
+          }
+        });
+
+        this.goodsList = res.data.orders;
+        this.getPositionList();
+      })
+    },
+
+    // 获取仓位列表
+    getPositionList() {
+      getPositionList({
+        correspondId: this.detailData.correspondId
+      }).then((res) => {
+        this.positionList = res.data;
+      })
+    },
+
+    // 修改仓位
+    changeWarehouse(index) {
+      if(this.goodsList[index].stockIds && this.goodsList[index].stockIds.length > 0) {
+        checkStock({
+          materialId: this.goodsList[index].materialId,
+          StockIds: this.goodsList[index].stockIds.join(',')
+        }).then(res => {
+          this.goodsList[index].stockNumber = res.data;
+        })
+      }else {
+        this.goodsList[index].stockNumber = 0;
+      }
+    },
+
+    // 检查文件类型
+    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 '';
+      }
+		},
+
+    // 打开链接
+    openLink(url) {
+      getFileUrl({key: url}).then(res => {
+        window.open(res.data);
       })
     },
 
     // 提交审批
     clickSubmitForm(val) {
+      for(let i=0; i<this.goodsList.length; i++) {
+        if(!this.goodsList[i].approvalNumber) {
+          this.$errorMsg('请填写审批数量');
+          return;
+        }
+        if(this.goodsList[i].approvalNumber > this.goodsList[i].stockNumber) {
+          this.$errorMsg('审批数量不可大于库存数');
+          return;
+        }
+        if(this.goodsList[i].approvalNumber > this.goodsList[i].invoiceNum) {
+          this.$errorMsg('审批数量不可大于申请数量');
+          return;
+        }
+      }
+
       this.$confirm('此操作将审批订单, 是否继续?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
@@ -248,7 +354,7 @@ export default {
           id: this.detailData.id,
           examineStatus: val,
           approvalRemark: this.examineForm.remark,
-          orders: this.detailData.orders,
+          orders: this.goodsList,
         };
         examineEngin(params).then(res => {
           this.$successMsg();

+ 51 - 24
src/views/supply/apply/components/engin_form.vue

@@ -234,6 +234,7 @@
           <el-table-column align="center" label="单位" prop="unit" min-width="80" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="订单数量" prop="qty" min-width="80" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="已申请数量" prop="alreadyInvoiceNum" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="已申请未出货数量" prop="sendQty" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="未申请数量" prop="refundableQty" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="本次申请数量" prop="invoiceNum" min-width="110" show-overflow-tooltip>
             <template slot-scope="scope">
@@ -242,12 +243,12 @@
           </el-table-column>
           <el-table-column align="center" label="总库存数量" prop="stockAdequate" min-width="100" show-overflow-tooltip>
             <template slot-scope="scope">
-              {{scope.row.stockAdequate | stockFilter}}
+              {{stockFilter(scope.row, 1)}}
             </template>
           </el-table-column>
           <el-table-column align="center" label="对应库存数量" prop="stockCorrespond" min-width="110" show-overflow-tooltip>
             <template slot-scope="scope">
-              {{scope.row.stockCorrespond | stockFilter}}
+              {{stockFilter(scope.row, 1)}}
             </template>
           </el-table-column>
         </el-table>
@@ -289,15 +290,18 @@ export default {
   props: ['listItem'],
   filters: {
     orderTypeFilter(val) {
-      
-    },
-    stockFilter(val) {
-      if(val > 50) {
-        return '充足';
-      }else {
-        return '紧缺';
+      const MAP = {
+        TRADE: '商用',
+        HOME: '家用',
+        RETAIL: '零售单',
+        RETAIL_POLICY: '销售政策单',
+        PERMU_HOME: '置换单家用',
+        PERMU_TRADE: '置换商用',
+        PERMU_RETAIL: '置换零售',
+        PERMU_RETAIL_POLICY: '置换销售政策单',
       }
-    }
+      return MAP[val];
+    },
   },
   data() {
     return {
@@ -338,6 +342,7 @@ export default {
       currentPage: 1,
       listTotal: 0,
       typeList: [],
+      stockList: [],
       
       tableGoodsList: [],
       tableSelection: [],
@@ -439,6 +444,9 @@ export default {
       getDictList({sysDictEnum: 'PRODUCT_TYPE'}).then(res => {
         this.typeList = res.data;
       })
+      getDictList({sysDictEnum: 'STOCK_ORDER'}).then(res => {
+        this.stockList = res.data;
+      })
     },
 
     // 获取经销商列表
@@ -452,6 +460,17 @@ export default {
       })
     },
 
+    // 库存字段
+    stockFilter(item, type) {
+      let STOCK_ORDER_INVOICE = this.stockList.find(o => o.dictCode == 'STOCK_ORDER_INVOICE').dictValue;
+      if(type === 1) {
+        return item.stockAdequate > STOCK_ORDER_INVOICE ? '充足' : item.stockAdequate;
+      }
+      if(type === 2) {
+        return item.stockCorrespond > STOCK_ORDER_INVOICE ? '充足' : item.stockCorrespond;
+      }
+    },
+
     // 获取商品列表
     getGoodsList() {
       getEnginGoodsList({
@@ -464,11 +483,6 @@ export default {
         endTime: this.screenForm.date ? this.screenForm.date[1] : '',
         correspondId: this.screenForm.warehouse,
       }).then(res => {
-        res.data.records.forEach(item => {
-          item.mainOrderId = item.id;
-          delete item.id;
-        });
-
         let oldGoodsList = this.goodsList;
         let newGoodsList = res.data.records;
         for(let i = 0; i < oldGoodsList.length; i++) {
@@ -548,7 +562,7 @@ export default {
       for(let i=0; i<allArr.length; i++){  // 循环allArr数组对象的内容
         let flag = true;  // 建立标记,判断数据是否重复,true为不重复
         for(let j=0; j<newArr.length; j++){  // 循环新数组的内容
-          if(allArr[i].materialId == newArr[j].materialId){ // 让allArr数组对象的内容与新数组的内容作比较,相同的话,改变标记为false
+          if(allArr[i].orderId == newArr[j].orderId){ // 让allArr数组对象的内容与新数组的内容作比较,相同的话,改变标记为false
             flag = false;
           }
         }
@@ -572,6 +586,22 @@ export default {
 
     // 确定 添加产品
     submitAddGoods() {
+      let list = this.goodsList.concat(this.tableSelection);
+      if(!this.isAllEqual(list)) {
+        return this.$errorMsg('只能选择同一个工程编号的订单');
+      }
+
+      for(let i=0; i<this.tableSelection.length; i++) {
+        if(!this.tableSelection[i].invoiceNum) {
+          this.$errorMsg('请输入申请数量');
+          return;
+        }
+        if(this.tableSelection[i].invoiceNum > this.tableSelection[i].refundableQty) {
+          this.$errorMsg('申请数量不能大于未申请数量');
+          return;
+        }
+      }
+
       let allList = this.tableGoodsList;
       let selectList = this.tableSelection;
       let submitList = [];
@@ -585,10 +615,6 @@ export default {
       }
       // this.goodsList = this.goodsList.concat(submitList);
 
-      if(!this.isAllEqual(submitList)) {
-        return this.$errorMsg('只能选择同一个工程编号的订单');
-      }
-
       this.goodsList = this.delRepeat(submitList, this.goodsList);
       this.isShowDialog = false;
       this.tableGoodsList = [];
@@ -624,15 +650,16 @@ export default {
     clickSubmitForm(status) {
       this.$refs.mainForm.validate((valid) => {
         if (valid) {
+          if(this.goodsList.length < 1) {
+            return this.$errorMsg('请添加引用');
+          }
           for(let i=0; i<this.goodsList.length; i++) {
             if(!this.goodsList[i].invoiceNum) {
               this.$errorMsg('请输入申请数量');
               return;
             }
-          }
-          for(let i=0; i<this.goodsList.length; i++) {
-            if(this.goodsList[i].invoiceNum > this.goodsList[i].qty) {
-              this.$errorMsg('申请数量不能大于总数量');
+            if(this.goodsList[i].invoiceNum > this.goodsList[i].refundableQty) {
+              this.$errorMsg('申请数量不能大于未申请数量');
               return;
             }
           }

+ 2 - 2
src/views/supply/apply/engin_list.vue

@@ -81,7 +81,7 @@
             <el-table-column align="center" label="发货申请单" prop="id" min-width="180" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="发货申请日期" prop="createTime" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="仓库" prop="correspondName" min-width="120" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="工程登录编码" prop="enginOrderNo" min-width="120" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="工程登录编码" prop="enginOrderNo" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="工程名称" prop="refProjectName" min-width="120" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="使用单位" prop="refUseUnit" min-width="120" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="经销商编码" prop="customerNumber" min-width="160" show-overflow-tooltip></el-table-column>
@@ -89,7 +89,7 @@
             <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="计量单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="数量" prop="refundableQty" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="备注信息" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="制单人" prop="createBy" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="制单日期" prop="createTime" min-width="160" show-overflow-tooltip></el-table-column>

+ 53 - 49
src/views/supply/deliver/components/deliver_detail.vue

@@ -10,111 +10,99 @@
         <el-row :gutter="0">
           <el-col :span="8" class="item">
             <div class="label">发货单号</div>
-            <div class="value">{{detailData.retreatOrderNo}}</div>
+            <div class="value">{{detailData.id}}</div>
           </el-col>
           <el-col :span="8" class="item">
             <div class="label">发货日期</div>
-            <div class="value">{{detailData.shipTime}}</div>
+            <div class="value">{{detailData.orderTime}}</div>
           </el-col>
           <el-col :span="8" class="item">
-            <div class="label">业务类型</div>
-            <div class="value">{{detailData.type}}</div>
+            <div class="label">单据状态</div>
+            <div class="value">{{detailData.type | statusFilter}}</div>
           </el-col>
           <el-col :span="8" class="item">
             <div class="label">销售类型</div>
             <div class="value">{{detailData.salesType}}</div>
           </el-col>
           <el-col :span="8" class="item">
-            <div class="label">订单号</div>
-            <div class="value">{{detailData.orderNo}}</div>
-          </el-col>
-          <el-col :span="8" class="item">
-            <div class="label">发票号</div>
-            <div class="value">{{detailData.billNumber}}</div>
+            <div class="label">发货申请单号</div>
+            <div class="value">{{detailData.invoiceOrderNo}}</div>
           </el-col>
           <el-col :span="8" class="item">
-            <div class="label">客户名称</div>
-            <div class="value">{{detailData.clientName}}</div>
+            <div class="label">订单类型</div>
+            <div class="value">{{detailData.orderType | orderTypeFilter}}</div>
           </el-col>
           <el-col :span="8" class="item">
-            <div class="label">销售部门</div>
-            <div class="value">{{detailData.salesDep}}</div>
+            <div class="label">经销商编码</div>
+            <div class="value">{{detailData.customerNumber}}</div>
           </el-col>
-          <el-col :span="8" class="item">
-            <div class="label">业务员</div>
-            <div class="value">{{detailData.salesman}}</div>
+          <el-col :span="16" class="item">
+            <div class="label">经销商名称</div>
+            <div class="value">{{detailData.customerName}}</div>
           </el-col>
           <el-col :span="8" class="item">
             <div class="label">工程编号</div>
             <div class="value">{{detailData.projectNumber}}</div>
           </el-col>
           <el-col :span="8" class="item">
-            <div class="label">币种</div>
-            <div class="value">{{detailData.currency}}</div>
+            <div class="label">厂工程编码</div>
+            <div class="value">{{detailData.factoryNumber}}</div>
           </el-col>
           <el-col :span="8" class="item">
-            <div class="label">订单类型</div>
-            <div class="value">{{detailData.orderType}}</div>
+            <div class="label">项目名称</div>
+            <div class="value">{{detailData.projectName}}</div>
           </el-col>
           <el-col :span="8" class="item">
             <div class="label">仓库</div>
-            <div class="value">{{detailData.stockName}}</div>
+            <div class="value">{{detailData.correspondName}}</div>
           </el-col>
           <el-col :span="8" class="item">
-            <div class="label">发货申请单号</div>
-            <div class="value">{{detailData.invoiceOrderNo}}</div>
+            <div class="label">税率</div>
+            <div class="value">{{detailData.taxRate}}</div>
           </el-col>
           <el-col :span="8" class="item">
-            <div class="label">台账备注</div>
-            <div class="value">{{detailData.iedgerRemark}}</div>
+            <div class="label">发票号</div>
+            <div class="value">{{detailData.billNumber}}</div>
           </el-col>
           <el-col :span="16" class="item">
             <div class="label">备注</div>
             <div class="value">{{detailData.remark}}</div>
           </el-col>
           <el-col :span="8" class="item">
-            <div class="label">项目名称</div>
-            <div class="value">{{detailData.projectName}}</div>
+            <div class="label">币种</div>
+            <div class="value">{{detailData.currency}}</div>
           </el-col>
           <el-col :span="8" class="item">
             <div class="label">外仓印刷单号</div>
             <div class="value">{{detailData.printingSheet}}</div>
           </el-col>
           <el-col :span="8" class="item">
-            <div class="label">厂工程编码</div>
-            <div class="value">{{detailData.factoryNumber}}</div>
+            <div class="label">制单人</div>
+            <div class="value">{{detailData.createBy}}</div>
           </el-col>
           <el-col :span="8" class="item">
-            <div class="label">开票日期</div>
-            <div class="value">{{detailData.billingTime}}</div>
+            <div class="label">制单日期</div>
+            <div class="value">{{detailData.createTime}}</div>
           </el-col>
           <el-col :span="16" class="item">
             <div class="label">文件编号</div>
             <div class="value">{{detailData.fileNumber}}</div>
           </el-col>
           <el-col :span="8" class="item">
-            <div class="label">税率</div>
-            <div class="value">{{detailData.taxRate}}</div>
-          </el-col>
-          <el-col :span="8" class="item">
-            <div class="label">订单日期</div>
-            <div class="value">{{detailData.createTime}}</div>
+            <div class="label">出库日期</div>
+            <div class="value">{{detailData.outTime}}</div>
           </el-col>
           <el-col :span="8" class="item">
-            <div class="label">制单人</div>
-            <div class="value">{{detailData.createBy}}</div>
+            <div class="label">审核人</div>
+            <div class="value">{{detailData.approvalName}}</div>
           </el-col>
           <el-col :span="8" class="item">
-            <div class="label">制单时间</div>
-            <div class="value">{{detailData.createTime}}</div>
+            <div class="label">审核日期</div>
+            <div class="value">{{detailData.approvalTime}}</div>
           </el-col>
           <el-col :span="8" class="item">
-            <div class="label">审核人</div>
-            <div class="value">{{detailData.retreatOrderNo}}</div>
-          </el-col>
-          <el-col :span="16" class="item">
-            <div class="label">审核时间</div>
-            <div class="value">{{detailData.retreatOrderNo}}</div>
+            <div class="label">开票日期</div>
+            <div class="value">{{detailData.billingTime}}</div>
           </el-col>
         </el-row>
       </div>
@@ -147,7 +135,7 @@
     
     <div class="page-footer">
       <div class="footer" :class="classObj">
-        <el-button  type="primary" icon="el-icon-printer" v-print="printObj">打 印</el-button>
+        <!-- <el-button  type="primary" icon="el-icon-printer" v-print="printObj">打 印</el-button> -->
         <el-popconfirm title="确定关闭吗?" @onConfirm="goBack" style="margin-left: 10px;">
           <el-button slot="reference">关 闭</el-button>
         </el-popconfirm>
@@ -168,6 +156,22 @@ export default {
   directives: {
     print
   },
+  filters: {
+    statusFilter(val) {
+      const MAP = {
+        1: '已受理'
+      }
+      return MAP[val];
+    },
+    orderTypeFilter(val) {
+      const MAP = {
+        1: '零售订单',
+        2: '家用工程订单',
+        3: '商用工程订单',
+      }
+      return MAP[val];
+    }
+  },
   data() {
     return {
       printObj: {

+ 5 - 9
src/views/supply/deliver/deliver_list.vue

@@ -21,8 +21,8 @@
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="存货名称" prop="chName">
-                <el-input v-model="screenForm.chName" placeholder="请输入存货名称"></el-input>
+              <el-form-item label="产品名称" prop="chName">
+                <el-input v-model="screenForm.chName" placeholder="请输入产品名称"></el-input>
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
@@ -57,23 +57,19 @@
       <div class="mymain-container">
         <div class="btn-group clearfix">
           <div class="fr">
-            <ExportButton :exUrl="'admin/user/mch/export'" :exParams="exParams" />
+            <ExportButton :exUrl="'ship/eExport'" :exParams="exParams" />
           </div>
         </div>
         <div class="table">
           <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
-            <el-table-column align="center" label="发货单号" prop="id" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="发货单号" prop="id" min-width="180" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="发货日期" prop="orderTime" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="仓库" prop="correspondName" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="经销商" prop="customerName" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="价税合计" prop="totalPrice" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="无税金额" prop="price" min-width="100" show-overflow-tooltip>
-              <template slot-scope="scope">
-                {{ scope.row.qty * scope.row.price }}
-              </template>
-            </el-table-column>
+            <el-table-column align="center" label="无税金额" prop="noTotalAmount" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="无税单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="备注" prop="remark" min-width="200" show-overflow-tooltip></el-table-column>

+ 118 - 31
src/views/supply/deliver/engin_list.vue

@@ -5,7 +5,7 @@
       <div class="screen-container">
         <el-form ref="screenForm" :model="screenForm" label-width="90px" size="small" label-position="left">
           <el-row :gutter="20">
-            <el-col :xs="24" :sm="24" :lg="24">
+            <!-- <el-col :xs="24" :sm="24" :lg="24">
               <el-form-item prop="orderNum" label-width="0">
                 <el-radio-group v-model="screenForm.status" size="medium">
                   <el-radio-button label="1">全部</el-radio-button>
@@ -13,7 +13,7 @@
                   <el-radio-button label="3">已取消</el-radio-button>
                 </el-radio-group>
               </el-form-item>
-            </el-col>
+            </el-col> -->
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="发货单号" prop="orderNum">
                 <el-input v-model="screenForm.orderNum" placeholder="请输入发货单号"></el-input>
@@ -57,16 +57,8 @@
                 <el-input v-model="screenForm.model" placeholder="请输入规格型号"></el-input>
               </el-form-item>
             </el-col>
-            <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="状态" prop="status">
-                <el-select v-model="screenForm.status" placeholder="全部">
-                  <el-option label="全部" value=""></el-option>
-                  <el-option :label="item.label" :value="item.value" v-for="(item, index) in select_status" :key="index"></el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
             
-            <el-col :xs="24" :sm="24" :lg="24" class="tr">
+            <el-col :xs="24" :sm="12" :lg="6" class="tr">
               <el-form-item label="">
                 <el-button size="small" @click="resetScreenForm">清空</el-button>
                 <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
@@ -87,27 +79,33 @@
         </div>
         <div class="table">
           <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
-            <el-table-column align="center" label="发货单号" prop="shipOrderNo" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="发货申请日期" prop="shipTime" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="仓库" prop="stockName" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="工程登录编码" prop="projectNumber" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="工程名称" prop="projectName" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="使用单位" prop="unit" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="发货单号" prop="id" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="发货日期" prop="orderTime" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="仓库" prop="correspondName" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="工程登录编码" prop="enginOrderNo" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="工程名称" prop="refProjectName" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="使用单位" prop="refUseUnit" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="经销商编码" prop="customerNumber" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="经销商名称" prop="customerName" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="产品名称" prop="productName" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="计量单位" prop="unit" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="数量" prop="number" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="单位" prop="unit" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="数量" prop="qty" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="备注信息" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="制单人" prop="createBy" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="制单日期" prop="createTime" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="审单人" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="审单日期" prop="aaa" min-width="200" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="状态" prop="aaa" min-width="200" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="操作" width="120" fixed="right">
+            <el-table-column align="center" label="审单人" prop="approvalName" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="审单日期" prop="approvalTime" min-width="200" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="状态" prop="examineStatus" min-width="100" show-overflow-tooltip>
+              <template slot-scope="scope">
+                {{scope.row.examineStatus | statusFilter}}
+              </template>
+            </el-table-column>
+            <el-table-column align="center" label="操作" width="200" fixed="right">
               <template slot-scope="scope">
                 <el-button type="text" @click="toDetail(scope.row)">详情</el-button>
+                <el-button type="text" @click="getPassword(scope.row.id)">获取密码</el-button>
+                <el-button type="text" @click="openShareDetail(scope.row.id)">密码记录</el-button>
               </template>
             </el-table-column>
           </el-table>
@@ -127,6 +125,39 @@
         </div>
       </div>
     </div>
+
+    <!-- 密码记录 -->
+    <el-dialog title="密码记录" :visible.sync="isShowDialog" :show-close="false" width="50%" :close-on-click-modal="false">
+      <div class="table" style="margin: 10px 0 20px;">
+        <el-table 
+          v-loading="dialogTable_listLoading" 
+          :data="dialogTable_dataList" 
+          element-loading-text="Loading" 
+          tooltip-effect="dark" 
+          style="width: 100%" 
+          max-height="270">
+          <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
+          <el-table-column align="center" prop="printPassword" label="密码"></el-table-column>
+          <el-table-column align="center" prop="createTime" label="打印时间"></el-table-column>
+        </el-table>
+      </div>
+      <div class="pagination clearfix">
+        <div class="fr">
+          <el-pagination
+            @current-change="dialogTableCurrentChange"
+            :current-page="dialogTable_currentPage"
+            :page-size="dialogTable_pageSize"
+            background
+            layout="prev, pager, next"
+            :total="dialogTable_listTotal">
+          </el-pagination>
+        </div>
+      </div>
+
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="isShowDialog = false">关 闭</el-button>
+      </div>
+    </el-dialog>
     
     <EnginDetail :listItem="queryItem" v-if="isShowDetail" @backListFormDetail="backList" />
 
@@ -134,14 +165,20 @@
 </template>
 
 <script>
-import { COMMON_SELECT } from '@/utils/select_data'
-import { getEnginList } from "@/api/supply/deliver";
+import { getEnginList, getPassword, getPasswordRecord } from "@/api/supply/deliver";
 import EnginDetail from "@/views/supply/deliver/components/engin_detail";
 
+let that
 export default {
   components: {
     EnginDetail,
   },
+  filters: {
+    statusFilter(val) {
+      let obj = that.statusList.find(o => o.value == val);
+      return obj ? obj.label : ''
+    },
+  },
   data() {
     return {
       currentPage: 1, // 当前页码
@@ -158,11 +195,21 @@ export default {
         jxsNum: '',
         status: '',
       },
-      select_status: [ // 筛选字段 - 状态
-        { label: '正常', value: true },
-        { label: '冻结', value: false }
+      statusList: [
+        { label: '已保存', value: 'SAVE' },
+        { label: '待审核', value: 'WAIT' },
+        { label: '审核通过', value: 'OK' },
+        { label: '审核驳回', value: 'FAIL' },
+        { label: '已关闭', value: 'CLOSE' },
       ],
 
+      isShowDialog: false, // 密码记录 - 弹窗
+      dialogTable_dataList: null, // 密码记录 - 列表数据
+      dialogTable_listLoading: true, // 密码记录 - 列表加载loading
+      dialogTable_currentPage: 1, // 密码记录 - 当前页码
+      dialogTable_pageSize: 10, // 密码记录 - 每页数量
+      dialogTable_listTotal: 0, // 密码记录 - 列表总数
+
       queryItem: {},
     }
   },
@@ -173,7 +220,7 @@ export default {
         id: this.screenForm.orderNum,
         customerNumber: this.screenForm.jxsNum,
         customerName: this.screenForm.jxsName,
-        productName: this.screenForm.chName,
+        materialName: this.screenForm.chName,
         specification: this.screenForm.model,
         startTime: this.screenForm.date ? this.screenForm.date[0] : '',
         endTime: this.screenForm.date ? this.screenForm.date[1] : '',
@@ -185,6 +232,10 @@ export default {
     },
   },
 
+  beforeCreate() {
+    that = this;
+  },
+
   created() {
     this.getList();
   },
@@ -209,7 +260,7 @@ export default {
         id: this.screenForm.orderNum,
         customerNumber: this.screenForm.jxsNum,
         customerName: this.screenForm.jxsName,
-        productName: this.screenForm.chName,
+        materialName: this.screenForm.chName,
         specification: this.screenForm.model,
         startTime: this.screenForm.date ? this.screenForm.date[0] : '',
         endTime: this.screenForm.date ? this.screenForm.date[1] : '',
@@ -256,6 +307,42 @@ export default {
     backList() {
       this.queryItem = {};
     },
+
+    // 获取密码
+    getPassword(id) {
+      getPassword({id}).then(res => {
+        this.$alert(res.data, '新密码', {
+          confirmButtonText: '确定',
+          callback: action => {}
+        });
+      })
+    },
+
+    // 密码记录 - 获取列表
+    getPasswordRecord(id) {
+      getPasswordRecord({
+        pageNum: this.dialogTable_currentPage,
+        pageSize: this.dialogTable_pageSize,
+        id
+      }).then(res => {
+        this.dialogTable_dataList = res.data.records;
+        this.dialogTable_listTotal = res.data.total;
+        this.dialogTable_listLoading = false;
+      })
+    },
+
+    // 密码记录 - 打开弹窗
+    openShareDetail(id) {
+      this.isShowDialog = true;
+      this.dialogTable_currentPage = 1;
+      this.getPasswordRecord(id);
+    },
+
+    // 密码记录 - 更改列表当前页
+    dialogTableCurrentChange(val) {
+      this.dialogTable_currentPage = val;
+      this.getPasswordRecord();
+    },
   }
 }
 </script>

+ 5 - 3
src/views/supply/engin/commerce_list.vue

@@ -91,7 +91,7 @@
               </template>
             </el-table-column>
             <el-table-column align="center" label="工程订单号" prop="enginOrderNo" min-width="200" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="订单日期" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="订单日期" prop="orderDate" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="工程登录单号" prop="refEnginRecordNo" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="订单类型" prop="enginOrderType" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
@@ -99,10 +99,10 @@
               </template>
             </el-table-column>
             <el-table-column align="center" label="工程名称" prop="refProjectName" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="销售类型" prop="saleTypeId" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="货品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="单位" prop="baseUnitId" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="总数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="是否直调" prop="isDirectTransfer" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
@@ -230,6 +230,7 @@ export default {
   computed: {
     exParams() {
       return {
+        examineStatus: this.screenForm.status,
         enginOrderNo: this.screenForm.orderNum,
         refProjectNo: this.screenForm.enginNum,
         refEnginRecordNo: this.screenForm.loginNum,
@@ -269,6 +270,7 @@ export default {
       let params = {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
+        examineStatus: this.screenForm.status,
         enginOrderNo: this.screenForm.orderNum,
         refProjectNo: this.screenForm.enginNum,
         refEnginRecordNo: this.screenForm.loginNum,

+ 5 - 3
src/views/supply/engin/home_list.vue

@@ -91,7 +91,7 @@
               </template>
             </el-table-column>
             <el-table-column align="center" label="工程订单号" prop="enginOrderNo" min-width="200" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="订单日期" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="订单日期" prop="orderDate" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="工程登录单号" prop="refEnginRecordNo" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="订单类型" prop="enginOrderType" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
@@ -99,10 +99,10 @@
               </template>
             </el-table-column>
             <el-table-column align="center" label="工程名称" prop="refProjectName" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="销售类型" prop="saleTypeId" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="货品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="单位" prop="baseUnitId" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="总数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="是否直调" prop="isDirectTransfer" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
@@ -230,6 +230,7 @@ export default {
   computed: {
     exParams() {
       return {
+        examineStatus: this.screenForm.status,
         enginOrderNo: this.screenForm.orderNum,
         refProjectNo: this.screenForm.enginNum,
         refEnginRecordNo: this.screenForm.loginNum,
@@ -269,6 +270,7 @@ export default {
       let params = {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
+        examineStatus: this.screenForm.status,
         enginOrderNo: this.screenForm.orderNum,
         refProjectNo: this.screenForm.enginNum,
         refEnginRecordNo: this.screenForm.loginNum,

+ 9 - 5
src/views/supply/reserve/components/reserve_form.vue

@@ -65,11 +65,15 @@
         <el-table-column align="center" label="经销商编码" prop="customerId" min-width="120" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="经销商名称" prop="customerName" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="物料代码" prop="materialOldNumber" min-width="160" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="产品编码" prop="materialNumber" min-width="160" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="产品编码" prop="materialCode" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="规格型号" prop="specification" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="预留数量" prop="reservedNum" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="预留数量" prop="reservedNum" min-width="100" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <el-input v-model="scope.row.reservedNum" size="small"></el-input>
+          </template>
+        </el-table-column>
         <el-table-column align="center" label="订单数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="备注" prop="reservedRemark" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="状态" prop="status" min-width="100" show-overflow-tooltip>
@@ -161,11 +165,11 @@
       <div class="table">
         <el-table :data="dialogGoodsList" element-loading-text="Loading" border fit highlight-current-row stripe height="400" @selection-change="dialogSelectionChange">
           <el-table-column align="center" type="selection" width="55" :selectable='checkboxSelect'></el-table-column>
-          <el-table-column align="center" label="经销商编码" prop="customerId" min-width="120" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="经销商编码" prop="customerNumber" min-width="120" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="经销商名称" prop="customerName" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="订单日期" prop="orderDate" min-width="120" show-overflow-tooltip>
+          <el-table-column align="center" label="订单日期" prop="orderTime" min-width="120" show-overflow-tooltip>
             <template slot-scope="scope">
-              {{scope.row.orderDate | dateToDayFilter}}
+              {{scope.row.orderTime | dateToDayFilter}}
             </template>
           </el-table-column>
           <el-table-column align="center" label="订单类型" prop="orderType" min-width="100" show-overflow-tooltip>

+ 2 - 2
src/views/supply/retail/components/retail_detail.vue

@@ -77,10 +77,10 @@
         <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="返利钱包" prop="customerWalletName2" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="返利类型" prop="customerWalletName2" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="返利金额" prop="rebateAmount" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="格力折扣" prop="totalDiscAmount" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="现金钱包" prop="customerWalletName" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="现金钱包" prop="customerWalletName" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="实付金额" prop="payAmount" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="是否直调" prop="isDirectTransfer" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">

+ 2 - 2
src/views/supply/retail/components/retail_examine.vue

@@ -58,10 +58,10 @@
         <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="返利类型" prop="walletRebateName" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="返利类型" prop="customerWalletName2" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="返利金额" prop="rebateAmount" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="格力折扣" prop="totalDiscAmount" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="现金钱包" prop="walletRebateName2" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="现金钱包" prop="customerWalletName" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="实付金额" prop="payAmount" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="是否直调" prop="isDirectTransfer" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">

+ 21 - 34
src/views/supply/retail/components/retail_form.vue

@@ -26,7 +26,7 @@
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="产品大类" prop="type">
-            <el-select v-model="mainForm.type" placeholder="选择产品大类" style="width: 100%">
+            <el-select v-model="mainForm.type" placeholder="选择产品大类" style="width: 100%" :disabled="goodsList.length > 0">
               <el-option v-for="item in typeList" :key="item.dictCode" :label="item.dictValue" :value="item.dictCode"></el-option>
             </el-select>
           </el-form-item>
@@ -75,6 +75,7 @@
             <el-input v-model="scope.row.qty" size="small"></el-input>
           </template>
         </el-table-column>
+        <el-table-column align="center" label="订货待提数量" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="订单金额" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{scope.row.price * scope.row.qty}}
@@ -84,9 +85,9 @@
           <template slot-scope="scope">
             <el-select v-model="scope.row.customerWalletId2" placeholder="选择返利类型" size="small" clearable @change="changeWallet(scope.$index)">
               <el-option
-                v-for="item in flWalletList"
+                v-for="item in scope.row.rebateWallets"
                 :key="item.customerWalletId"
-                :label="item.name"
+                :label="item.customerWalletName"
                 :value="item.customerWalletId">
               </el-option>
             </el-select>
@@ -106,9 +107,9 @@
           <template slot-scope="scope">
             <el-select v-model="scope.row.customerWalletId" placeholder="选择现金钱包" size="small" clearable>
               <el-option
-                v-for="item in xjWalletList"
+                v-for="item in scope.row.wallets"
                 :key="item.customerWalletId"
-                :label="item.name"
+                :label="item.customerWalletName"
                 :value="item.customerWalletId">
               </el-option>
             </el-select>
@@ -124,11 +125,7 @@
             <el-checkbox v-model="scope.row.isDirectTransfer"></el-checkbox>
           </template>
         </el-table-column>
-        <!-- <el-table-column align="center" label="直调数量" prop="directTransferQty" min-width="100">
-          <template slot-scope="scope">
-            <el-input v-model="scope.row.directTransferQty" size="small"></el-input>
-          </template>
-        </el-table-column> -->
+        <el-table-column align="center" label="直调数量" prop="directTransferQty" min-width="100"></el-table-column>
         <el-table-column align="center" label="备注" prop="remark" min-width="160">
           <template slot-scope="scope">
             <el-input v-model="scope.row.remark" size="small"></el-input>
@@ -167,7 +164,7 @@
         <el-row :gutter="20">
           <el-col :xs="12" :sm="6" :lg="6">
             <el-form-item prop="type">
-              <el-select v-model="mainForm.type" placeholder="选择品类" style="width: 100%" clearable>
+              <el-select v-model="mainForm.type" placeholder="选择类" style="width: 100%" clearable :disabled="goodsList.length > 0 || rightGoodsList.length > 0">
                 <el-option v-for="item in typeList" :key="item.dictCode" :label="item.dictValue" :value="item.dictCode"></el-option>
               </el-select>
             </el-form-item>
@@ -260,7 +257,7 @@
 </template>
 
 <script>
-import { getDetail, addData, editData, getSalesTypeList, getGoodsList, getWalletList, getWarehouseList, checkStock } from "@/api/supply/retail";
+import { getDetail, addData, editData, getSalesTypeList, getGoodsList, getWarehouseList, checkStock } from "@/api/supply/retail";
 import { getDictList } from '@/api/common'
 import { findElem } from '@/utils/util'
 
@@ -320,9 +317,6 @@ export default {
 
       leftSelection: [],
       rightSelection: [],
-
-      xjWalletList: [],
-      flWalletList: [],
     }
   },
 
@@ -340,7 +334,6 @@ export default {
 
   created() {
     this.getDictList();
-    this.getWalletList();
     this.getWarehouseList();
     if(this.listItem) {
       this.getDetail();
@@ -384,22 +377,6 @@ export default {
       })
     },
 
-    // 获取钱包列表
-    getWalletList() {
-      getWalletList({
-        customerId: JSON.parse(localStorage.getItem("supply_user")).customerId,
-        type: 'COMMONLY'
-      }).then(res => {
-        this.xjWalletList = res.data;
-      })
-      getWalletList({
-        customerId: JSON.parse(localStorage.getItem("supply_user")).customerId,
-        type: 'REBATE'
-      }).then(res => {
-        this.flWalletList = res.data;
-      })
-    },
-
     // 获取销售类型列表
     getSalesTypeList() {
       getSalesTypeList({
@@ -473,12 +450,17 @@ export default {
     // 点击 选择商品
     openDialog() {
       this.getSalesTypeList();
-      this.getGoodsList();
       this.isShowDialog = true;
+      if(this.mainForm.type) {
+        this.getGoodsList();
+      }
     },
 
     // 提交筛选表单
     submitScreenForm() {
+      if(!this.mainForm.type) {
+        return this.$errorMsg('请选择产品大类');
+      }
       this.currentPage = 1;
       this.getGoodsList();
     },
@@ -573,7 +555,7 @@ export default {
     // 修改返利钱包
     changeWallet(index) {
       if(this.goodsList[index].customerWalletId2) {
-        let obj = this.flWalletList.find(o => o.customerWalletId == this.goodsList[index].customerWalletId2);
+        let obj = this.goodsList[index].rebateWallets.find(o => o.customerWalletId == this.goodsList[index].customerWalletId2);
         this.goodsList[index].rebateRate = obj.rebateRate;
       }else {
         this.goodsList[index].rebateRate = '';
@@ -622,6 +604,11 @@ export default {
             }
           }
 
+          this.goodsList.forEach(item => {
+            delete item.rebateWallets;
+            delete item.wallets;
+          })
+
           let mainName = this.typeList[findElem(this.typeList, 'dictCode', this.mainForm.type)].dictValue;
           let params = {
             theTime: this.mainForm.date + ' 00:00:00',

+ 4 - 0
src/views/supply/retail/retail_list.vue

@@ -111,6 +111,7 @@
             <el-table-column align="center" label="总数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="直调数量" prop="directTransferQty" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="出库数量" prop="hasSendQty" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="可退数量" prop="refundableQty" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="金额" prop="payAmount" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="返利类型" prop="customerWalletName2" min-width="120" show-overflow-tooltip></el-table-column>
@@ -324,6 +325,9 @@ export default {
 
     // 进入退订
     toReturn(item) {
+      if(item.refundableQty < 1) {
+        return this.$errorMsg('可退数量为0');
+      }
       this.queryItem = item;
       this.isShowReturn = true;
     },