فهرست منبع

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

howie 3 سال پیش
والد
کامیت
539f4977ff
35فایلهای تغییر یافته به همراه451 افزوده شده و 184 حذف شده
  1. 9 0
      src/api/common.js
  2. 9 0
      src/api/supply/sales.js
  3. 71 0
      src/components/Common/examine-dialog.vue
  4. 117 88
      src/components/Common/print-foshan.vue
  5. 2 2
      src/views/basic_data/dealer/dealer_apply.vue
  6. 1 0
      src/views/basic_data/dealer/dealer_deposit.vue
  7. 2 2
      src/views/basic_data/dealer/dealer_list.vue
  8. 23 8
      src/views/basic_data/dealer/dealer_stock.vue
  9. 1 0
      src/views/basic_data/supplier/supplier_list.vue
  10. 1 0
      src/views/basic_data/taker/taker_car.vue
  11. 1 0
      src/views/basic_data/taker/taker_list.vue
  12. 1 0
      src/views/finance/balance_sum.vue
  13. 1 1
      src/views/finance/change_apply.vue
  14. 1 1
      src/views/finance/components/change_list-examine.vue
  15. 3 1
      src/views/finance/rebate_form.vue
  16. 4 2
      src/views/finance/rebate_list.vue
  17. 1 0
      src/views/finance/standbook_list.vue
  18. 10 2
      src/views/sales_rebate/rebate_list_type.vue
  19. 2 1
      src/views/setting/account.vue
  20. 7 13
      src/views/supply/apply/components/engin_form.vue
  21. 19 15
      src/views/supply/deliver/components/commerce_detail.vue
  22. 1 1
      src/views/supply/deliver/components/home_detail.vue
  23. 3 3
      src/views/supply/engin/commerce_list.vue
  24. 8 5
      src/views/supply/engin/components/commerce_detail.vue
  25. 6 3
      src/views/supply/engin/components/commerce_examine.vue
  26. 6 2
      src/views/supply/engin/components/commerce_return.vue
  27. 25 3
      src/views/supply/engin/components/home_examine.vue
  28. 3 3
      src/views/supply/engin/home_list.vue
  29. 5 1
      src/views/supply/pickup/check.vue
  30. 5 1
      src/views/supply/pickup/components/pickup_form.vue
  31. 11 11
      src/views/supply/reserve/components/reserve_form.vue
  32. 2 2
      src/views/supply/retail/components/retail_detail.vue
  33. 5 5
      src/views/supply/retail/retail_list.vue
  34. 26 2
      src/views/supply/return/components/return_form.vue
  35. 59 6
      src/views/supply/sales/sales_list.vue

+ 9 - 0
src/api/common.js

@@ -52,4 +52,13 @@ export function getSmallList(params) {
     method: 'get',
     params
   })
+}
+
+// 获取经销商列表
+export function getDealerList(params) {
+  return request({
+    url: '/customer/list',
+    method: 'get',
+    params
+  })
 }

+ 9 - 0
src/api/supply/sales.js

@@ -34,4 +34,13 @@ export function examineJudge(params) {
     method: 'post',
     params
   })
+}
+
+// 批量审批
+export function examineBatch(params) {
+  return request({
+    url: '/sale/order/allApproval',
+    method: 'post',
+    params
+  })
 }

+ 71 - 0
src/components/Common/examine-dialog.vue

@@ -0,0 +1,71 @@
+<template>
+  <div>
+    <el-dialog title="批量审批" :visible.sync="isShow" :show-close="false" width="400px" :close-on-click-modal="false">
+      <el-form ref="examineForm" :model="examineForm" :rules="examineFormRules" label-position="left" label-width="80px">
+        <el-form-item label="审批状态" prop="status">
+          <el-radio-group v-model="examineForm.status">
+            <el-radio :label="'OK'">通过</el-radio>
+            <el-radio :label="'FAIL'">驳回</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="审批备注" prop="remark">
+          <el-input
+            type="textarea"
+            :autosize="{ minRows: 2, maxRows: 4}"
+            placeholder="请输入审批备注"
+            v-model="examineForm.remark">
+          </el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="cancelForm">取 消</el-button>
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+
+export default {
+  name: 'EditDateDialog',
+  props: {
+    isShow: {
+      type: Boolean,
+      default: false
+    },
+    examineForm: {
+      type: Object,
+      default: {
+        date: '',
+      }
+    }
+  },
+  data() {
+    return {
+      examineFormRules: {
+        status: [
+          { required: true, message: '请选择审批状态', trigger: 'change' }
+        ],
+      },
+    }
+  },
+  methods: {
+    cancelForm() {
+      this.$emit('update:isShow', false);
+    },
+
+    submitForm() {
+      this.$refs.examineForm.validate((valid) => {
+        if (valid) {
+          this.$parent.submitExamineForm();
+        }
+      })
+    }
+  }
+}
+</script>
+
+<style>
+
+</style>

+ 117 - 88
src/components/Common/print-foshan.vue

@@ -1,100 +1,106 @@
 <template>
   <div class="detail-container">
-    <div class="print-form-1">
-      <el-row :gutter="0">
-        <el-col :span="6" class="item">
-          <div class="label">经销商编码:</div>
-          <div class="value">{{detailData.customerId}}</div>
-        </el-col>
-        <el-col :span="6" class="item">
-          <div class="label">出库日期:</div>
-          <div class="value">{{nowDate}}</div>
-        </el-col>
-        <el-col :span="6" class="item">
-          <div class="label">仓库:</div>
-          <div class="value">{{detailData.correspondName}}</div>
-        </el-col>
-        <el-col :span="6" class="item">
-          <div class="label">信息密钥:</div>
-          <div class="value">{{detailData.informationKey}}</div>
-        </el-col>
-        <el-col :span="24" class="item">
-          <div class="label">经销商:</div>
-          <div class="value">{{detailData.customerName}}</div>
-        </el-col>
-      </el-row>
-    </div>
-
-    <div class="print-table-1">
-      <div class="head">
-        <el-row :gutter="20">
-          <el-col :span="4">发货单号/订单号</el-col>
-          <el-col :span="3">销售类型</el-col>
-          <el-col :span="3">文件编号</el-col>
-          <el-col :span="8">规格型号</el-col>
-          <el-col :span="3">单位</el-col>
-          <el-col :span="3">数量</el-col>
+    <div class="print-page" v-for="(item, index) in showData" :key="index">
+      <div class="print-title">
+        <div class="title1">佛山盛世欣兴格力贸易有限公司</div>
+        <div class="title2">商品发货单</div>
+      </div>
+      <div class="print-form-1">
+        <el-row :gutter="0">
+          <el-col :span="6" class="item">
+            <div class="label">经销商编码:</div>
+            <div class="value">{{ item.customerId }}</div>
+          </el-col>
+          <el-col :span="6" class="item">
+            <div class="label">出库日期:</div>
+            <div class="value">{{nowDate}}</div>
+          </el-col>
+          <el-col :span="6" class="item">
+            <div class="label">仓库:</div>
+            <div class="value">{{ item.correspondName }}</div>
+          </el-col>
+          <el-col :span="6" class="item">
+            <div class="label">信息密钥:</div>
+            <div class="value">{{ item.informationKey }}</div>
+          </el-col>
+          <el-col :span="24" class="item">
+            <div class="label">经销商:</div>
+            <div class="value">{{ item.customerName }}</div>
+          </el-col>
         </el-row>
       </div>
-      <div class="body">
-        <div v-for="(item, index) in detailData.invoicePickBeans" :key="index">
+
+      <div class="print-table-1">
+        <div class="head">
           <el-row :gutter="20">
-            <el-col :span="4">{{ item.invoiceId || '' }}</el-col>
-            <el-col :span="3">{{ item.saleTypeName || '' }}</el-col>
-            <el-col :span="3">{{ item.fileNo || '' }}</el-col>
-            <el-col :span="8">{{ item.specification || '' }}</el-col>
-            <el-col :span="3">{{ item.unit || '' }}</el-col>
-            <el-col :span="3">{{ item.refundableQty || 0 }}</el-col>
+            <el-col :span="4">发货单号/订单号</el-col>
+            <el-col :span="3">销售类型</el-col>
+            <el-col :span="3">文件编号</el-col>
+            <el-col :span="8">规格型号</el-col>
+            <el-col :span="3">单位</el-col>
+            <el-col :span="3">数量</el-col>
           </el-row>
+        </div>
+        <div class="body">
+          <div v-for="(item, index) in item.invoicePickBeans" :key="index">
+            <el-row :gutter="20">
+              <el-col :span="4">{{ item.invoiceId || '' }}</el-col>
+              <el-col :span="3">{{ item.saleTypeName || '' }}</el-col>
+              <el-col :span="3">{{ item.fileNo || '' }}</el-col>
+              <el-col :span="8">{{ item.specification || '' }}</el-col>
+              <el-col :span="3">{{ item.unit || '' }}</el-col>
+              <el-col :span="3">{{ item.refundableQty || 0 }}</el-col>
+            </el-row>
+            <el-row :gutter="20">
+              <el-col :span="4">{{ item.invoiceId || '' }}</el-col>
+              <el-col :span="2">发货日期</el-col>
+              <el-col :span="4">{{ item.theTime || '' }}</el-col>
+              <el-col :span="2">工程编号</el-col>
+              <el-col :span="4">{{ item.refEnginRecordNo || '' }}</el-col>
+              <el-col :span="2">备注</el-col>
+              <el-col :span="6">{{ item.remark || '' }}</el-col>
+            </el-row>
+          </div>
+        </div>
+        <div class="foot">
           <el-row :gutter="20">
-            <el-col :span="4">{{ item.invoiceId || '' }}</el-col>
-            <el-col :span="2">发货日期</el-col>
-            <el-col :span="4">{{ item.theTime || '' }}</el-col>
-            <el-col :span="2">工程编号</el-col>
-            <el-col :span="4">{{ item.refEnginRecordNo || '' }}</el-col>
-            <el-col :span="2">备注</el-col>
-            <el-col :span="6">{{ item.remark || '' }}</el-col>
+            <el-col :span="21">合计</el-col>
+            <el-col :span="3">{{ item.total }}</el-col>
           </el-row>
         </div>
       </div>
-      <div class="foot">
-        <el-row :gutter="20">
-          <el-col :span="21">合计</el-col>
-          <el-col :span="3">{{total}}</el-col>
+
+      <div class="print-form-2">
+        <el-row :gutter="30">
+          <el-col :span="8" class="item">
+            <div class="label">销售公司</div>
+            <div class="value">
+              <el-input readonly></el-input>
+            </div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">仓库</div>
+            <div class="value">
+              <el-input readonly></el-input>
+            </div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">经销商</div>
+            <div class="value">
+              <el-input readonly></el-input>
+            </div>
+          </el-col>
         </el-row>
       </div>
     </div>
 
-    <div class="print-form-2">
-      <el-row :gutter="30">
-        <el-col :span="8" class="item">
-          <div class="label">销售公司</div>
-          <div class="value">
-            <el-input readonly></el-input>
-          </div>
-        </el-col>
-        <el-col :span="8" class="item">
-          <div class="label">仓库</div>
-          <div class="value">
-            <el-input readonly></el-input>
-          </div>
-        </el-col>
-        <el-col :span="8" class="item">
-          <div class="label">经销商</div>
-          <div class="value">
-            <el-input readonly></el-input>
-          </div>
-        </el-col>
-      </el-row>
-    </div>
-
   </div>
 </template>
 
 <script>
 
 export default {
-  name: 'PrintGuangzhou',
+  name: 'PrintFoshan',
   props: {
     detailData: {
       type: Object,
@@ -103,6 +109,24 @@ export default {
   },
 
   computed: {
+    showData() {
+      var showData = [];
+      if(this.detailData && this.detailData.invoicePickBeans) {
+        for(var i=0; i<this.detailData.invoicePickBeans.length; i+=2){
+          let obj = JSON.parse(JSON.stringify(this.detailData));
+          obj.invoicePickBeans = this.detailData.invoicePickBeans.slice(i, i+2);
+          let num = 0;
+          obj.invoicePickBeans.forEach(item => {
+            num = num + item.refundableQty;
+          });
+          obj.total = num;
+          showData.push(obj);
+        }
+      }
+      console.log(showData);
+      return showData;
+    },
+    
     nowDate() {
       var date = new Date();
       var seperator1 = "-";
@@ -118,17 +142,6 @@ export default {
       var currentdate = year + seperator1 + month + seperator1 + strDate;
       return currentdate;
     },
-
-    total() {
-      if(!this.detailData.invoicePickBeans) {
-        return false;
-      }
-      let num = 0;
-      this.detailData.invoicePickBeans.forEach(item => {
-        num = num + item.refundableQty;
-      });
-      return num;
-    }
   },
 
   methods: {
@@ -142,6 +155,22 @@ export default {
     width: 100%;
     height: 100%;
   }
+  .print-page {
+    margin-bottom: 50px;
+    // min-height: 1020px;
+    page-break-after: always;
+  }
+  .print-title {
+    text-align: center;
+    .title1 {
+      font-size: 24px;
+      margin-bottom: 18px;
+    }
+    .title2 {
+      font-size: 18px;
+      margin-bottom: 24px;
+    }
+  }
   .print-form-1 {
     .item {
       display: flex;

+ 2 - 2
src/views/basic_data/dealer/dealer_apply.vue

@@ -150,6 +150,7 @@
               label="操作"
               min-width="160"
               show-overflow-tooltip
+              fixed="right"
             >
               <el-button type="text" class="textColor" @click="editFn"
                 >跟进</el-button
@@ -237,5 +238,4 @@ export default {
   },
 };
 </script>
-<style lang="scss" scoped>
-</style>
+<style lang="scss" scoped></style>

+ 1 - 0
src/views/basic_data/dealer/dealer_deposit.vue

@@ -149,6 +149,7 @@
             label="操作"
             min-width="160"
             show-overflow-tooltip
+            fixed="right"
           >
             <template slot-scope="scope">
               <el-button

+ 2 - 2
src/views/basic_data/dealer/dealer_list.vue

@@ -109,6 +109,7 @@
               prop="caozuo"
               min-width="160"
               show-overflow-tooltip
+              fixed="right"
             >
               <template slot-scope="scope">
                 <el-button
@@ -217,5 +218,4 @@ export default {
 };
 </script>
 
-<style lang="scss" scoped>
-</style>
+<style lang="scss" scoped></style>

+ 23 - 8
src/views/basic_data/dealer/dealer_stock.vue

@@ -38,18 +38,21 @@
           type="primary"
           size="small"
           @click="addFn"
+          class="add-right"
+          icon="el-icon-plus"
           >新增</el-button
         >
-
         <el-popconfirm
           v-if="$checkBtnRole('del', $route.meta.roles)"
           @onConfirm="deleFn"
           title="这是一段内容确定删除吗?"
         >
           <el-button
-            type="primary"
+            :disabled="ids.length < 1"
+            type="danger"
             size="small"
             class="textColor"
+            icon="el-icon-minus"
             slot="reference"
             >批量删除</el-button
           >
@@ -138,6 +141,7 @@
             prop="caozuo"
             min-width="160"
             show-overflow-tooltip
+            fixed="right"
           >
             <template slot-scope="scope">
               <el-button
@@ -323,6 +327,7 @@ import { getDealerList } from "@/api/basic_data/dealer";
 export default {
   data() {
     return {
+      isDisabled: true,
       title: "",
       dialogForm: false,
       addForm: {
@@ -489,7 +494,8 @@ export default {
       // this.ids = selection.map((k) => {
       //   return k.id;
       // });
-      console.log(selection);
+
+      // console.log(selection);
       this.ids = selection.map((v) => v.id);
     },
     // //存货分类
@@ -500,11 +506,20 @@ export default {
     // },
     //删除
     async deleFn(id) {
-      this.ids.push(id);
-      let res = this.ids.toString();
-      await deleDealerStockList({ ids: res });
+      if (id) {
+        let arr = [];
+        arr.push(id);
+        let res2 = arr.toString();
+        await deleDealerStockList({ ids: res2 });
+      } else {
+        let res = this.ids.toString();
+        await deleDealerStockList({ ids: res });
+      }
+
       this.getList({ pageNum: 1, pageSize: 10 });
+
       this.$message.success("删除成功");
+      this.ids = [];
     },
     addFn() {
       this.title = "经销商业务关系管理";
@@ -612,8 +627,8 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-::v-deep .el-popover__reference {
-  margin-left: 10px;
+.add-right {
+  margin-right: 10px;
 }
 // ::v-deep .selectStyle .el-input--suffix {
 //   width: 200%;

+ 1 - 0
src/views/basic_data/supplier/supplier_list.vue

@@ -82,6 +82,7 @@
               prop="caozuo"
               min-width="160"
               show-overflow-tooltip
+              fixed="right"
             >
               <template slot-scope="scope"
                 ><el-button

+ 1 - 0
src/views/basic_data/taker/taker_car.vue

@@ -135,6 +135,7 @@
             label="操作"
             min-width="160"
             show-overflow-tooltip
+            fixed="right"
           >
             <template slot-scope="scope">
               <el-button

+ 1 - 0
src/views/basic_data/taker/taker_list.vue

@@ -149,6 +149,7 @@
             prop="caozuo"
             min-width="160"
             show-overflow-tooltip
+            fixed="right"
           >
             <template slot-scope="scope"
               ><el-button

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

@@ -89,6 +89,7 @@
             label="操作"
             min-width="160"
             show-overflow-tooltip
+            fixed="right"
           >
             <template v-slot="{ row }">
               <el-button

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

@@ -14,7 +14,7 @@
         <el-row :gutter="20">
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="返利互转单号" prop="">
-              <el-input disabled></el-input>
+              <el-input disabled placeholder="系统自动生成"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">

+ 1 - 1
src/views/finance/components/change_list-examine.vue

@@ -137,7 +137,7 @@
           <div class="label">审批结果</div>
           <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>
         </el-col>
         <el-col :span="24" class="item">

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

@@ -14,7 +14,7 @@
         <el-row :gutter="20">
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="返利单号" prop="">
-              <el-input disabled placeholder=""></el-input>
+              <el-input disabled placeholder="系统自动生成"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
@@ -130,6 +130,7 @@
                 @change="changeCustomerFn($event, scope.$index, scope.row)"
                 v-model="scope.row.customerId"
                 placeholder="请选择"
+                filterable
               >
                 <el-option
                   v-for="item in customerData"
@@ -152,6 +153,7 @@
               <el-select
                 v-model="scope.row.customerWalletId"
                 placeholder="请选择"
+                filterable
               >
                 <el-option
                   v-for="item in scope.row.walletList"

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

@@ -396,7 +396,7 @@
             <el-table-column
               align="center"
               label="操作"
-              min-width="160"
+              min-width="240"
               show-overflow-tooltip
               fixed="right"
             >
@@ -445,7 +445,9 @@
                     $checkBtnRole('examine', $route.meta.roles)
                   "
                   @click="reviewFn(scope.row.rebateOrderId)"
-                  >复核</el-button
+                  >{{
+                    scope.row.examineStatus == "OK" ? "取消复核" : "复核"
+                  }}</el-button
                 >
                 <el-button
                   type="text"

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

@@ -51,6 +51,7 @@
                 class="selectStyle"
                 v-model="searchForm.customerWalletId"
                 placeholder="请选择"
+                filterable
               >
                 <el-option
                   v-for="(v, i) in walletList"

+ 10 - 2
src/views/sales_rebate/rebate_list_type.vue

@@ -141,6 +141,8 @@
     </div>
     <div>
       <el-dialog
+        v-loading="addLoading"
+        element-loading-text="Loading"
         :visible.sync="dialogVisible"
         width="30%"
         @close="hanelclose"
@@ -214,6 +216,8 @@ export default {
   mixins: [Mixin],
   data() {
     return {
+      addLoading: false,
+      listLoading: false,
       type: 0, // 0 1
       screenForm: {
         name: "",
@@ -401,19 +405,23 @@ export default {
       this.type = "";
     },
     handelInfo() {
-      console.log(this.$refs.dialogForm);
+      // console.log(this.$refs.dialogForm);
+      // this.listLoading = true;\
+
       this.$refs.dialogForm.validate((valid) => {
         if (valid) {
           if (this.type) {
+            this.addLoading = true;
             // this.hanleScreen(this.dialogForm.mainId);
             const params = {
               ...this.dialogForm,
             };
 
             addWallet(params).then((res) => {
-              console.log(res);
+              // console.log(res);
               this.$successMsg("添加成功");
               this.hanleReset();
+              this.addLoading = false;
             });
           } else {
             const upParams = {

+ 2 - 1
src/views/setting/account.vue

@@ -220,7 +220,8 @@
 </template>
 
 <script>
-import { getDepartmentList, getAccountList, addAccount, editAccount, deleteAccount, getAccountDetail, getRoleList, getMerchantList, getDealerList, changeAccountStatus, resetPassword } from '@/api/setting'
+import { getDepartmentList, getAccountList, addAccount, editAccount, deleteAccount, getAccountDetail, getRoleList, getMerchantList, changeAccountStatus, resetPassword } from '@/api/setting'
+import { getDealerList } from '@/api/common'
 import { findElem, downloadFiles, handleImport } from '@/utils/util'
 
 export default {

+ 7 - 13
src/views/supply/apply/components/engin_form.vue

@@ -43,7 +43,10 @@
       <el-row :gutter="20">
         <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="工程登录编号" prop="loginNum">
-            <el-input v-model="mainForm.loginNum" placeholder="请输入工程登录编号"></el-input>
+            <div style="display: flex;">
+              <el-input v-model="mainForm.loginNum" placeholder="请输入工程登录编号"></el-input>
+              <el-button style="margin-left: 10px;" @click="openDialog">引用</el-button>
+            </div>
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8">
@@ -124,14 +127,6 @@
 
     <div class="main-title">
       <div class="title">货品信息</div>
-      <div>
-        <span style="font-size: 14px; margin-right: 10px">仓库</span>
-        <el-select v-model="screenForm.warehouse" placeholder="请选择发货仓库" size="small" filterable clearable :disabled="goodsList.length > 0">
-          <el-option :label="item.name" :value="item.id" v-for="(item, index) in warehouseList" :key="index"></el-option>
-        </el-select>
-        <el-divider direction="vertical"></el-divider>
-        <el-button type="primary" size="small" icon="el-icon-plus" @click="openDialog">添加引用</el-button>
-      </div>
     </div>
 
     <div class="table" style="margin-top: 20px">
@@ -513,11 +508,10 @@ export default {
 
     // 点击 选择商品
     openDialog() {
-      if(!this.screenForm.warehouse) {
-        return this.$errorMsg('请选择仓库');
-      }
       this.isShowDialog = true;
-      this.getGoodsList();
+      if(this.screenForm.warehouse) {
+        this.getGoodsList();
+      }
     },
 
     // 提交筛选表单

+ 19 - 15
src/views/supply/deliver/components/commerce_detail.vue

@@ -18,21 +18,21 @@
           </el-col>
           <el-col :span="8" class="item">
             <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>
+            <div class="value">{{detailData.examineStatus | statusFilter}}</div>
           </el-col>
           <el-col :span="8" class="item">
             <div class="label">发货申请单号</div>
-            <div class="value">{{detailData.invoiceOrderNo}}</div>
+            <div class="value">{{detailData.id}}</div>
           </el-col>
           <el-col :span="8" class="item">
             <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"></div>
+          </el-col>
+          <el-col :span="8" class="item">
             <div class="label">经销商编码</div>
             <div class="value">{{detailData.customerNumber}}</div>
           </el-col>
@@ -111,20 +111,20 @@
         <div class="title">货品信息</div>
       </div>
       <div class="table">
-        <el-table :data="detailData.retreatDocumentOrder" element-loading-text="Loading" border fit highlight-current-row stripe>
+        <el-table :data="detailData.shipDocumentOrders" element-loading-text="Loading" border fit highlight-current-row stripe>
           <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
-          <el-table-column align="center" label="订单号" prop="mainOrderId" min-width="180" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="订单号" prop="enginOrderNo" min-width="180" 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="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="refundableQty" 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="refundableQty" 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.salesStatus ? 0 : scope.row.refundableQty}}
             </template>
           </el-table-column>
-          <el-table-column align="center" label="含税单价" prop="price" min-width="160" 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>
           <el-table-column align="center" label="价税合计" prop="payAmount" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="税率(%)" prop="tax" min-width="100" show-overflow-tooltip></el-table-column>
@@ -166,10 +166,14 @@ export default {
   },
   filters: {
     statusFilter(val) {
-      const MAP = {
-        1: '已受理'
-      }
-      return MAP[val];
+      const statusList = [
+        { label: '已保存', value: 'SAVE' },
+        { label: '待审核', value: 'WAIT' },
+        { label: '审核通过', value: 'OK' },
+        { label: '审核驳回', value: 'FAIL' },
+      ]
+      let obj = statusList.find(o => o.value == val);
+      return obj ? obj.label : ''
     },
     orderTypeFilter(val) {
       const MAP = {

+ 1 - 1
src/views/supply/deliver/components/home_detail.vue

@@ -113,7 +113,7 @@
       <div class="table">
         <el-table :data="detailData.shipDocumentOrders" element-loading-text="Loading" border fit highlight-current-row stripe>
           <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
-          <el-table-column align="center" label="订单号" prop="mainOrderId" min-width="180" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="订单号" prop="enginOrderNo" min-width="180" 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="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>

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

@@ -137,11 +137,11 @@
                 <el-popconfirm style="margin-right: 10px;" title="确定撤回吗?" @onConfirm="handleWithdraw(scope.row.parentId)" v-if="$checkBtnRole('apply', $route.meta.roles) && scope.row.examineStatus === 'WAIT'" >
                   <el-button slot="reference" type="text">撤回</el-button>
                 </el-popconfirm>
-                <el-button type="text" @click="toForm(scope.row)" v-if="$checkBtnRole('edit', $route.meta.roles) && scope.row.examineStatus === 'SAVE'">编辑</el-button>
-                <el-button type="text" @click="toExamine(scope.row)" v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'WAIT'">审批</el-button>
-                <el-popconfirm style="margin-left: 10px;" title="确定弃审吗?" @onConfirm="handleAbandon(scope.row.parentId)" v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'OK'" >
+                <el-popconfirm style="margin-right: 10px;" title="确定弃审吗?" @onConfirm="handleAbandon(scope.row.parentId)" v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'OK'" >
                   <el-button slot="reference" type="text">弃审</el-button>
                 </el-popconfirm>
+                <el-button type="text" @click="toForm(scope.row)" v-if="$checkBtnRole('edit', $route.meta.roles) && scope.row.examineStatus === 'SAVE'">编辑</el-button>
+                <el-button type="text" @click="toExamine(scope.row)" v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'WAIT'">审批</el-button>
                 <el-button type="text" @click="toReturn(scope.row)" v-if="$checkBtnRole('examine', $route.meta.roles)">退订</el-button>
                 <el-button type="text" @click="toDetail(scope.row)">详情</el-button>
                 <el-popconfirm style="margin-left: 10px;" title="确定删除吗?" @onConfirm="handleDelete(scope.row.parentId)" v-if="$checkBtnRole('del', $route.meta.roles)">

+ 8 - 5
src/views/supply/engin/components/commerce_detail.vue

@@ -143,10 +143,14 @@
           <el-table-column align="center" label="单位" prop="unit" 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="enginNum" min-width="120" 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="qty" min-width="100" show-overflow-tooltip>
+            <template slot-scope="scope">
+              {{ (scope.row.qty*100 - scope.row.directTransferQty*100 - scope.row.retiredQty*100) / 100 }}
+            </template>
+          </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="rebateAmount" min-width="120" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="使用返利金额" prop="payRebateAmount" min-width="120" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="格力折扣" prop="discAmount" 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="payAmount" min-width="100" show-overflow-tooltip></el-table-column>
@@ -156,8 +160,7 @@
             </template>
           </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="enginNum" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="已退数量" prop="retiredQty" 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="160" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="税率" prop="tax" min-width="100" show-overflow-tooltip></el-table-column>
         </el-table>
@@ -223,7 +226,7 @@
           </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="totalAmount" min-width="100" 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="payRebateAmount" 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>
       </div>

+ 6 - 3
src/views/supply/engin/components/commerce_examine.vue

@@ -129,10 +129,14 @@
         <el-table-column align="center" label="单位" prop="unit" 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="enginNum" min-width="120" 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="qty" min-width="100" show-overflow-tooltip>
+          <template slot-scope="scope">
+            {{ (scope.row.qty*100 - scope.row.directTransferQty*100 - scope.row.retiredQty*100) / 100 }}
+          </template>
+        </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="rebateAmount" min-width="120" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="使用返利金额" prop="payRebateAmount" min-width="120" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="格力折扣" prop="discAmount" 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="payAmount" min-width="100" show-overflow-tooltip></el-table-column>
@@ -143,7 +147,6 @@
         </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="retiredQty" 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="tax" min-width="100" show-overflow-tooltip></el-table-column>
       </el-table>

+ 6 - 2
src/views/supply/engin/components/commerce_return.vue

@@ -123,10 +123,14 @@
         <el-table-column align="center" label="单位" prop="unit" 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="enginNum" min-width="120" 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="qty" min-width="100" show-overflow-tooltip>
+          <template slot-scope="scope">
+            {{ (scope.row.qty*100 - scope.row.directTransferQty*100 - scope.row.retiredQty*100) / 100 }}
+          </template>
+        </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="rebateAmount" min-width="120" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="使用返利金额" prop="payRebateAmount" min-width="120" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="格力折扣" prop="discAmount" 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="payAmount" min-width="100" show-overflow-tooltip></el-table-column>

+ 25 - 3
src/views/supply/engin/components/home_examine.vue

@@ -50,7 +50,11 @@
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">销售类型</div>
-          <div class="value">{{detailData.saleTypeName}}</div>
+          <div class="value">
+            <el-select v-model="detailData.saleTypeId" placeholder="选择销售类型" style="width: 100%" clearable>
+              <el-option v-for="item in salesTypeList" :key="item.id" :label="item.saleName" :value="item.id"></el-option>
+            </el-select>
+          </div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">联系人</div>
@@ -187,6 +191,7 @@
 
 <script>
 import { getOrderDetail, examineHome } from "@/api/supply/engin";
+import { getTypeList } from '@/api/common'
 
 export default {
   name: 'HomeExamine',
@@ -213,11 +218,14 @@ export default {
       formLoading: false,
       examineForm: {
         remark: '',
-      }
+      },
+
+      salesTypeList: [],
     }
   },
 
   created() {
+    this.getSalesTypeList();
     this.getDetail();
   },
 
@@ -238,6 +246,16 @@ export default {
       return currentdate;
     },
 
+    // 获取销售类型列表
+    getSalesTypeList() {
+      getTypeList({
+        pageNum: 1,
+        pageSize: -1
+      }).then((res) => {
+        this.salesTypeList = res.data.records;
+      })
+    },
+
     // 返回列表
     goBack() {
       this.$emit('backListFormDetail');
@@ -257,9 +275,13 @@ export default {
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        let params = this.detailData;
+        let saleTypeItem = this.salesTypeList.find(o => o.id == this.detailData.saleTypeId);
+        let params = JSON.parse(JSON.stringify(this.detailData));
         params.examineNote = this.examineForm.remark;
         params.examineResult = val;
+        params.saleTypeId = this.detailData.saleTypeId;
+        params.saleTypeCode = saleTypeItem.saleCode;
+        params.saleTypeName = saleTypeItem.saleName;
         examineHome(params).then(res => {
           this.$successMsg();
           this.goBack();

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

@@ -137,11 +137,11 @@
                 <el-popconfirm style="margin-right: 10px;" title="确定撤回吗?" @onConfirm="handleWithdraw(scope.row.parentId)" v-if="scope.row.examineStatus === 'WAIT'" >
                   <el-button slot="reference" type="text">撤回</el-button>
                 </el-popconfirm>
-                <el-button type="text" @click="toForm(scope.row)" v-if="$checkBtnRole('edit', $route.meta.roles) && (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL')">编辑</el-button>
-                <el-button type="text" @click="toExamine(scope.row)" v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'WAIT'">审批</el-button>
-                <el-popconfirm style="margin-left: 10px;" title="确定弃审吗?" @onConfirm="handleAbandon(scope.row.parentId)" v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'OK'" >
+                <el-popconfirm style="margin-right: 10px;" title="确定弃审吗?" @onConfirm="handleAbandon(scope.row.parentId)" v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'OK'" >
                   <el-button slot="reference" type="text">弃审</el-button>
                 </el-popconfirm>
+                <el-button type="text" @click="toForm(scope.row)" v-if="$checkBtnRole('edit', $route.meta.roles) && (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL')">编辑</el-button>
+                <el-button type="text" @click="toExamine(scope.row)" v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'WAIT'">审批</el-button>
                 <el-button type="text" @click="toReturn(scope.row)" v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus !== 'FAIL'">退订</el-button>
                 <el-button type="text" @click="toDetail(scope.row)">详情</el-button>
                 <el-popconfirm style="margin-left: 10px;" title="确定删除吗?" @onConfirm="handleDelete(scope.row.parentId)" v-if="$checkBtnRole('del', $route.meta.roles)">

+ 5 - 1
src/views/supply/pickup/check.vue

@@ -59,7 +59,7 @@
 
       <div class="mymain-container">
         <div class="table">
-          <el-table ref="table" v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe @select="handleSelect">
+          <el-table ref="table" v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe @select="handleSelect" @select-all="handleSelectAll">
             <el-table-column align="center" type="selection" width="55"></el-table-column>
             <!-- <el-table-column align="center" label="操作" width="100" fixed="left">
               <template slot-scope="scope">
@@ -319,6 +319,10 @@ export default {
       this.tableSelection = this.$refs.table.selection;
     },
 
+    handleSelectAll(selection) {
+      this.tableSelection = this.$refs.table.selection;
+    },
+
     // 检查是否一致
     isAllEqual(array) {
       if (array.length > 0) {

+ 5 - 1
src/views/supply/pickup/components/pickup_form.vue

@@ -81,7 +81,7 @@
 
     <div class="mymain-container">
       <div class="table">
-        <el-table ref="table" v-loading="listLoading" :data="deliverList" element-loading-text="Loading" border fit highlight-current-row stripe @select="handleSelect">
+        <el-table ref="table" v-loading="listLoading" :data="deliverList" element-loading-text="Loading" border fit highlight-current-row stripe @select="handleSelect" @select-all="handleSelectAll">
           <el-table-column align="center" type="selection" width="55"></el-table-column>
           <el-table-column align="center" label="发货申请单" prop="invoiceId" min-width="180" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="单据日期" prop="orderTime" min-width="120" show-overflow-tooltip>
@@ -283,6 +283,10 @@ export default {
       this.tableSelection = this.$refs.table.selection;
     },
 
+    handleSelectAll(selection) {
+      this.tableSelection = this.$refs.table.selection;
+    },
+
     clickSubmitForm() {
       this.$refs.mainForm.validate((valid) => {
         if (valid) {

+ 11 - 11
src/views/supply/reserve/components/reserve_form.vue

@@ -64,12 +64,12 @@
             {{scope.row.orderTime | dateToDayFilter}}
           </template>
         </el-table-column>
-        <el-table-column align="center" label="经销商编码" prop="customerId" min-width="120" show-overflow-tooltip>
+        <el-table-column align="center" label="经销商编码" prop="customerNumber" min-width="120" show-overflow-tooltip>
           <template slot-scope="scope">
-            <div v-if="scope.row.orderId || listItem">{{scope.row.customerId}}</div>
+            <div v-if="scope.row.orderId || listItem">{{scope.row.customerNumber}}</div>
             <el-select 
               v-else
-              v-model="scope.row.customerId"
+              v-model="scope.row.customerNumber"
               placeholder="选择经销商"
               size="small"
               filterable
@@ -79,10 +79,10 @@
               @change="changeDealer(scope.$index)">
               <el-option
                 v-for="item in dealerList"
-                :key="item.id"
-                :label="item.id"
-                :value="item.id">
-                <span>{{ item.id }}</span>
+                :key="item.number"
+                :label="item.number"
+                :value="item.number">
+                <span>{{ item.number }}</span>
                 <span style="color: #8492a6; font-size: 13px; margin-left: 6px">{{ item.name }}</span>
               </el-option>
             </el-select>
@@ -527,13 +527,13 @@ export default {
 
     // 更改经销商
     changeDealer(index) {
-      if(this.goodsList[index].customerId) {
-        let obj = this.dealerList.find(o => o.id == this.goodsList[index].customerId);
+      if(this.goodsList[index].customerNumber) {
+        let obj = this.dealerList.find(o => o.number == this.goodsList[index].customerNumber);
         this.goodsList[index].customerName = obj.name;
-        this.goodsList[index].customerNumber = obj.number;
+        this.goodsList[index].customerId = obj.id;
       }else {
         this.goodsList[index].customerName = '';
-        this.goodsList[index].customerNumber = '';
+        this.goodsList[index].customerId = '';
       }
     },
 

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

@@ -119,7 +119,7 @@
     <div class="page-footer">
       <div class="footer" :class="classObj">
         <el-button type="primary" @click="openDirectDialog" :disabled="detailData.examineStatus !== 'OK'">提前开票</el-button>
-        <el-button type="primary" @click="openDeliverDialog" :disabled="detailData.examineStatus !== 'OK'">直调发货</el-button>
+        <el-button type="primary" @click="openDeliverDialog" :disabled="detailData.examineStatus !== 'OK' || detailData.directTransferStatus === true">直调发货</el-button>
         <el-button type="primary" @click="handleFinish" :disabled="detailData.examineStatus !== 'OK'">直调完成</el-button>
         <el-button @click="goBack">关 闭</el-button>
       </div>
@@ -173,7 +173,7 @@
         </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="totalAmount" min-width="100" 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="payRebateAmount" 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="remark" min-width="160" show-overflow-tooltip></el-table-column>
         </el-table>

+ 5 - 5
src/views/supply/retail/retail_list.vue

@@ -131,16 +131,16 @@
             <el-table-column align="center" label="审核日期" prop="examineTime" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="操作" width="180" fixed="right">
               <template slot-scope="scope">
-                <el-button type="text" @click="toForm(scope.row)" v-if="$checkBtnRole('edit', $route.meta.roles) && scope.row.examineStatus === 'SAVE'">编辑</el-button>
                 <el-button type="text" @click="toExamine(scope.row)" v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'WAIT'">审批</el-button>
-                <el-popconfirm style="margin-left: 10px;" title="确定弃审吗?" @onConfirm="handleAbandon(scope.row.id)" v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'OK'" >
+                <el-popconfirm style="margin-right: 10px;" title="确定申请吗?" @onConfirm="handleSubmit(scope.row.id)" v-if="$checkBtnRole('apply', $route.meta.roles) && scope.row.examineStatus === 'SAVE'" >
+                  <el-button slot="reference" type="text">申请</el-button>
+                </el-popconfirm>
+                <el-popconfirm style="margin-right: 10px;" title="确定弃审吗?" @onConfirm="handleAbandon(scope.row.id)" v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'OK'" >
                   <el-button slot="reference" type="text">弃审</el-button>
                 </el-popconfirm>
+                <el-button type="text" @click="toForm(scope.row)" v-if="$checkBtnRole('edit', $route.meta.roles) && scope.row.examineStatus === 'SAVE'">编辑</el-button>
                 <el-button type="text" @click="toReturn(scope.row)" v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'OK'">退订</el-button>
                 <el-button type="text" @click="toDetail(scope.row)">详情</el-button>
-                <el-popconfirm style="margin-left: 10px;" title="确定申请吗?" @onConfirm="handleSubmit(scope.row.id)" v-if="$checkBtnRole('apply', $route.meta.roles) && scope.row.examineStatus === 'SAVE'" >
-                  <el-button slot="reference" type="text">申请</el-button>
-                </el-popconfirm>
                 <el-popconfirm style="margin-left: 10px;" title="确定关闭吗?" @onConfirm="handleClose(scope.row.id)" v-if="$checkBtnRole('examine', $route.meta.roles) && !scope.row.closeTime" >
                   <el-button slot="reference" type="text">关闭</el-button>
                 </el-popconfirm>

+ 26 - 2
src/views/supply/return/components/return_form.vue

@@ -103,12 +103,19 @@
     <el-dialog title="添加引用" :visible.sync="isShowDialog" width="80%">
       <el-form ref="screenForm" :model="screenForm" size="small" label-position="left" label-width="70px">
         <el-row :gutter="20">
-          <el-col :xs="12" :sm="12" :lg="12">
+          <el-col :xs="12" :sm="6" :lg="6">
             <el-form-item prop="orderNum" label="发货单号">
               <el-input v-model="screenForm.orderNum" placeholder="请输入发货单号"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="12" :sm="6" :lg="6">
+            <el-form-item prop="dealer" label="经销商">
+              <el-select v-model="screenForm.dealer" placeholder="请选择经销商" style="width: 100%;" filterable>
+                <el-option :label="item.name" :value="item.id" v-for="(item, index) in dealerList" :key="index"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="12" :sm="6" :lg="6">
             <el-form-item label="">
               <el-button size="small" @click="resetScreenForm">清空</el-button>
               <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
@@ -166,6 +173,7 @@
 
 <script>
 import { getDetail, getGoodsList, addData } from "@/api/supply/return";
+import { getDealerList } from '@/api/common'
 
 export default {
   name: 'ReturnForm',
@@ -207,9 +215,11 @@ export default {
       isShowDialog: false,
       screenForm: {
         orderNum: '',
+        dealer: '',
       },
       currentPage: 1,
       listTotal: 0,
+      dealerList: [],
       
       tableGoodsList: [],
       tableSelection: [],
@@ -244,6 +254,16 @@ export default {
       this.$emit('backListFormDetail');
     },
 
+    // 获取经销商列表
+    getDealerList() {
+      getDealerList({
+        pageNum: 1,
+        pageSize: -1,
+      }).then(res => {
+        this.dealerList = res.data.records;
+      })
+    },
+
     // 获取详情
     getDetail() {
       getDetail({id: this.listItem.id}).then(res => {
@@ -256,7 +276,7 @@ export default {
       getGoodsList({
         pageNum: this.currentPage,
         pageSize: 10,
-        customerId: JSON.parse(localStorage.getItem("supply_user")).customerId,
+        customerId: this.screenForm.dealer,
         id: this.screenForm.orderNum,
       }).then(res => {
         res.data.records.forEach(item => {
@@ -294,6 +314,7 @@ export default {
     // 点击 选择商品
     openDialog() {
       this.isShowDialog = true;
+      this.getDealerList();
       if(this.screenForm.orderNum) {
         this.getGoodsList();
       }
@@ -304,6 +325,9 @@ export default {
       if(!this.screenForm.orderNum) {
         return this.$errorMsg('请填写发货申请单号');
       }
+      if(!this.screenForm.dealer) {
+        return this.$errorMsg('请选择经销商');
+      }
       this.currentPage = 1;
       this.getGoodsList();
     },

+ 59 - 6
src/views/supply/sales/sales_list.vue

@@ -29,8 +29,13 @@
               </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">
+              <el-form-item label="产品编码" prop="chNum">
+                <el-input v-model="screenForm.chNum" placeholder="请输入产品编码"></el-input>
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
@@ -39,6 +44,11 @@
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="仓库名称" prop="warehouse">
+                <el-input v-model="screenForm.warehouse" placeholder="请输入仓库名称"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="发货日期" prop="date">
                 <el-date-picker
                   v-model="screenForm.date"
@@ -52,7 +62,7 @@
               </el-form-item>
             </el-col>
             
-            <el-col :xs="24" :sm="12" :lg="12" class="tr">
+            <el-col :xs="24" :sm="24" :lg="24" class="tr">
               <el-form-item label="">
                 <el-button size="small" @click="resetScreenForm">清空</el-button>
                 <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
@@ -65,14 +75,15 @@
       <div class="mymain-container">
         <div class="btn-group clearfix">
           <div class="fl">
-            <!-- <el-button size="small" type="warning" icon="el-icon-close">退单</el-button> -->
+            <el-button size="small" type="warning" icon="el-icon-finished" @click="batchExamine" :disabled="multipleSelection.length < 1">批量审批</el-button>
           </div>
           <div class="fr">
             <ExportButton :exUrl="'sale/order/export'" :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 v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe @selection-change="handleSelectionChange">
+            <el-table-column align="center" type="selection" width="55"></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}}
@@ -117,6 +128,8 @@
         </div>
       </div>
     </div>
+
+    <ExamineDialog :isShow.sync="isShowExamineDialog" :examineForm.sync="examineForm" />
     
     <SalesDetail :listItem="queryItem" v-if="isShowDetail" @backListFormDetail="backList" />
     <SalesExamine :listItem="queryItem" v-if="isShowExamine" @backListFormExamine="backList" />
@@ -125,15 +138,17 @@
 </template>
 
 <script>
-import { getList, examineJudge } from "@/api/supply/sales";
+import { getList, examineJudge, examineBatch } from "@/api/supply/sales";
 import SalesDetail from "@/views/supply/sales/components/sales_detail";
 import SalesExamine from "@/views/supply/sales/components/sales_examine";
+import ExamineDialog from "@/components/Common/examine-dialog";
 
 let that
 export default {
   components: {
     SalesDetail,
     SalesExamine,
+    ExamineDialog,
   },
   filters: {
     statusFilter(val) {
@@ -160,7 +175,9 @@ export default {
         jxsName: '',
         jxsNum: '',
         chName: '',
+        chNum: '',
         model: '',
+        warehouse: '',
         date: '',
         status: '',
       },
@@ -174,6 +191,13 @@ export default {
       queryItem: {},
       isShowDetail: false,
       isShowExamine: false,
+
+      multipleSelection: [],
+      isShowExamineDialog: false,
+      examineForm: {
+        status: '',
+        remark: '',
+      }
     }
   },
 
@@ -185,7 +209,9 @@ export default {
         customerName: this.screenForm.jxsName,
         customerNumber: this.screenForm.jxsNum,
         materialName: this.screenForm.chName,
+        materialNumber: this.screenForm.chNum,
         specification: this.screenForm.model,
+        correspondName: this.screenForm.warehouse,
         startTime: this.screenForm.date ? this.screenForm.date[0] : '',
         endTime: this.screenForm.date ? this.screenForm.date[1] : '',
       }
@@ -213,7 +239,9 @@ export default {
         customerName: this.screenForm.jxsName,
         customerNumber: this.screenForm.jxsNum,
         materialName: this.screenForm.chName,
+        materialNumber: this.screenForm.chNum,
         specification: this.screenForm.model,
+        correspondName: this.screenForm.warehouse,
         startTime: this.screenForm.date ? this.screenForm.date[0] : '',
         endTime: this.screenForm.date ? this.screenForm.date[1] : '',
       };
@@ -284,6 +312,31 @@ export default {
       this.isShowDetail = false;
       this.isShowExamine = false;
     },
+
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+
+    // 打开 批量审批
+    batchExamine() {
+      this.isShowExamineDialog = true;
+    },
+
+    // 提交 批量审批
+    submitExamineForm() {
+      let ids = this.multipleSelection.map(item => {
+        return item.id;
+      });
+      examineBatch({
+        ids: ids.join(','),
+        examineStatus: this.examineForm.status,
+        approvalRemark: this.examineForm.remark,
+      }).then(res => {
+        this.isShowEditDateDialog = false;
+        this.getList();
+        this.$successMsg('修改成功');
+      })
+    },
   }
 }
 </script>