Переглянути джерело

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

chen 3 роки тому
батько
коміт
4bb7952789
29 змінених файлів з 758 додано та 390 видалено
  1. 7 0
      src/api/basic_data/material.js
  2. 41 4
      src/views/basic_data/material/price_list.vue
  3. 46 73
      src/views/pset/login_setting.vue
  4. 4 2
      src/views/sales_policy/components/AddCondition.vue
  5. 1 3
      src/views/sales_policy/components/AddPolicy.vue
  6. 2 3
      src/views/sales_policy/components/Examine.vue
  7. 27 18
      src/views/sales_policy/policy_list.vue
  8. 6 10
      src/views/supply/adjust/adjust_list.vue
  9. 1 1
      src/views/supply/adjust/components/adjust_detail.vue
  10. 2 2
      src/views/supply/apply/components/apply_detail.vue
  11. 46 1
      src/views/supply/apply/components/apply_examine.vue
  12. 37 22
      src/views/supply/apply/components/apply_form.vue
  13. 3 3
      src/views/supply/apply/components/engin_detail.vue
  14. 113 7
      src/views/supply/apply/components/engin_examine.vue
  15. 48 24
      src/views/supply/apply/components/engin_form.vue
  16. 2 2
      src/views/supply/apply/engin_list.vue
  17. 53 49
      src/views/supply/deliver/components/deliver_detail.vue
  18. 5 9
      src/views/supply/deliver/deliver_list.vue
  19. 118 31
      src/views/supply/deliver/engin_list.vue
  20. 5 3
      src/views/supply/engin/commerce_list.vue
  21. 5 3
      src/views/supply/engin/home_list.vue
  22. 32 5
      src/views/supply/policy/components/retail_detail.vue
  23. 89 65
      src/views/supply/policy/components/retail_form.vue
  24. 28 8
      src/views/supply/policy/policy_list.vue
  25. 9 5
      src/views/supply/reserve/components/reserve_form.vue
  26. 2 2
      src/views/supply/retail/components/retail_detail.vue
  27. 2 2
      src/views/supply/retail/components/retail_examine.vue
  28. 20 33
      src/views/supply/retail/components/retail_form.vue
  29. 4 0
      src/views/supply/retail/retail_list.vue

+ 7 - 0
src/api/basic_data/material.js

@@ -33,6 +33,13 @@ export function getMaterialDetail(params) {
   })
 }
 
+export function getProductDelete(params) {
+  return request({
+    url: '/product-price/delete',
+    method: 'post',
+    params: {ids:params.join(',')}
+  })
+}
 
 export function getMachineLlist(params) {
   return request({

+ 41 - 4
src/views/basic_data/material/price_list.vue

@@ -50,10 +50,20 @@
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="销售类型" prop="saleTypeId">
-              <el-input
-                placeholder="请输入销售类型"
+              <el-select
                 v-model="screenForm.saleTypeId"
-              ></el-input>
+                filterable
+                placeholder="选择销售类型"
+                style="width: 100%"
+              >
+                <el-option label="全部" value=""></el-option>
+                <el-option
+                  v-for="item in ztypeList"
+                  :key="item.id"
+                  :label="item.saleName"
+                  :value="item.id"
+                ></el-option>
+              </el-select>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
@@ -250,6 +260,13 @@
           ></el-table-column>
           <el-table-column
             align="center"
+            label="格力折扣"
+            prop="discAmount"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
             label="备注"
             prop="remark"
             min-width="160"
@@ -268,7 +285,12 @@
                 @click="handleRevoke(scope.row.id)"
                 >作废</el-button
               >
-              <el-button type="text" size="small" @click="">删除</el-button>
+              <el-button
+                type="text"
+                size="small"
+                @click="handleDelete(scope.row.id)"
+                >删除</el-button
+              >
             </template>
           </el-table-column>
         </el-table>
@@ -295,6 +317,8 @@ import Mixin from "@/mixin/index";
 import {
   getProductPriceList,
   handlePriceRevoke,
+  getProductDelete,
+  getTypeList,
 } from "@/api/basic_data/material";
 import { getDictList } from "@/api/common";
 import { downloadFiles, parseTime } from "@/utils/util";
@@ -315,6 +339,7 @@ export default {
         specification: "",
         startDate: "",
       },
+      ztypeList: [],
       dictList: {},
     };
   },
@@ -327,6 +352,14 @@ export default {
     addFn() {
       this.showDialogForm = true;
     },
+    handleDelete(id) {
+      this.hanleDeleteAllPromise(id).then((ids) => {
+        getProductDelete(ids).then((res) => {
+          this.$successMsg("删除成功");
+          this.getList();
+        });
+      });
+    },
     getList() {
       this.listLoading = true;
       let params = {
@@ -346,6 +379,10 @@ export default {
         this.listTotal = res.data.total;
         this.listLoading = false;
       });
+      getTypeList(params).then((res) => {
+        this.ztypeList = res.data.records;
+        // console.log(this.ztypeList, "type1111");
+      });
     },
     handleRevoke(id) {
       handlePriceRevoke({ id }).then((res) => {

+ 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

+ 4 - 2
src/views/sales_policy/components/AddCondition.vue

@@ -510,7 +510,7 @@ export default {
       }
     },
     hanleAddModel() {
-      this.conditionBox.push([{}]);
+      this.conditionBox.push([]);
     },
     handleSubmit() {
       var tableData = [];
@@ -543,6 +543,7 @@ export default {
         this.$successMsg("添加成功");
         this.$parent.isCondition = 0;
         this.$parent.isFlag = 1;
+        Object.assign(this.$data,this.$options.data())
         this.$emit("handleSubmitCon", this.comCode);
       });
     },
@@ -594,11 +595,12 @@ export default {
               for (let k = 0; k < datas.length; k++) {
                 if (datas[k].id == this.conditList[i].id) {
                   this.conditList.splice(i,1)
+
                 }
               }
           }
         }
-
+         this.listTotal = this.conditList.length;
       }
     },
     handleSelectionAllChange(e) {

+ 1 - 3
src/views/sales_policy/components/AddPolicy.vue

@@ -400,9 +400,7 @@ export default {
     handleCondition(id, index) {
       deleteCondition({ id }).then((res) => {
         this.conditionList.splice(index, 1);
-        this.$children[9].conditionBox= [[], []]
-         this.$children[9].conditionBox.limit= ''
-          this.$children[9].conditionBox.popArr ={}
+        Object.assign(this.$children[9].$data,this.$children[9].$options.data())
         this.$successMsg("删除成功");
       });
     },

+ 2 - 3
src/views/sales_policy/components/Examine.vue

@@ -7,7 +7,6 @@
     </el-header>
     <div class="app-container">
       <div class="descriptions">
-
         <el-row>
           <el-col :span="4">销售政策编号</el-col>
           <el-col :span="4">{{ detail.code }}</el-col>
@@ -23,9 +22,9 @@
           <el-col :span="4">{{
             detail.type == "PROVISION" ? "配提" : "限量"
           }}</el-col>
-          <el-col :span="4">现金钱包</el-col>
-          <el-col :span="4"></el-col>
+          <el-col :span="4" style="background-color:#fff"></el-col>
           <el-col :span="4"></el-col>
+          <el-col :span="4" style="background-color:#fff"></el-col>
           <el-col :span="4"></el-col>
         </el-row>
         <el-row>

+ 27 - 18
src/views/sales_policy/policy_list.vue

@@ -41,6 +41,7 @@
                   type="datetime"
                   size="small"
                   placeholder="生效日期"
+                   value-format="yyyy-MM-dd HH:mm:ss"
                 >
                 </el-date-picker>
               </el-form-item>
@@ -48,12 +49,13 @@
           </el-row>
           <el-row :gutter="20">
             <el-col :xs="24" :ms="6" :lg="6">
-              <el-form-item label="" prop="startTime2">
+              <el-form-item label="" prop="endTime1">
                 <el-date-picker
-                  v-model="screenForm.startTime2"
+                  v-model="screenForm.endTime1"
                   type="datetime"
                   size="small"
                   placeholder="结束日期"
+                   value-format="yyyy-MM-dd HH:mm:ss"
                 >
                 </el-date-picker>
               </el-form-item>
@@ -66,6 +68,7 @@
                   type="datetime"
                   size="small"
                   placeholder="制表日期"
+                   value-format="yyyy-MM-dd HH:mm:ss"
                 >
                 </el-date-picker>
               </el-form-item>
@@ -92,15 +95,7 @@
             </el-col>
           </el-row>
           <el-row :gutter="20">
-            <el-col :xs="24" :ms="6" :lg="6">
-              <el-form-item label="" prop="inpu">
-                <el-input
-                  v-model="screenForm.input"
-                  placeholder="关闭人"
-                  size="small"
-                ></el-input>
-              </el-form-item>
-            </el-col>
+
 
             <el-col :xs="24" :ms="6" :lg="6">
               <el-form-item label="" prop="status">
@@ -139,6 +134,9 @@
                 </el-select>
               </el-form-item>
             </el-col>
+            <el-col :xs="24" :ms="6" :lg="6">
+
+            </el-col>
             <el-col :xs="24" :ms="6" :lg="6" class="tr">
               <el-form-item>
                 <el-button type="primary" size="small" @click="submitScreenForm"
@@ -246,8 +244,8 @@
           align="center"
         >
         </el-table-column>
-        <el-table-column prop="address" label="部门" align="center">
-        </el-table-column>
+        <!-- <el-table-column prop="address" label="部门" align="center"></el-table-column> -->
+
         <el-table-column
           prop="remark"
           label="表头备注"
@@ -327,7 +325,7 @@ export default {
       id: "",
       code: "",
       codeId: "",
-
+listLoading:false,
       policyId: "",
 
       isShow: 1,
@@ -350,16 +348,24 @@ export default {
       fileList: [],
       statusOptions: [
         {
-          value: 1,
+          vlaue: "",
+          label: "全部",
+        },
+        {
+          value: true,
           label: "已生效",
         },
         {
-          value: 0,
+          value: false,
           label: "未生效",
         },
       ],
       typeOptions: [
         {
+          vlaue: "",
+          label: "全部",
+        },
+        {
           vlaue: "PROVISION",
           label: "配提",
         },
@@ -386,10 +392,12 @@ export default {
       this.$store.dispatch("sales/hanlenewInfo");
     },
     getList() {
+        this.listLoading = true
       const params = {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
         code: this.screenForm.code,
+        type: this.screenForm.type,
         createBy: this.screenForm.createBy,
         endCreateTime: this.screenForm.endCreateTime,
         endTime1: this.screenForm.endTime1,
@@ -401,12 +409,13 @@ export default {
         startTime2: this.screenForm.startTime2,
         status: this.screenForm.status,
         title: this.screenForm.title,
-        type: this.screenForm.type,
+
       };
+      console.log(params,123);
       getList(params).then((res) => {
         this.dataList = res.data.records;
-
         this.listTotal = res.data.total;
+        this.listLoading = false
 
       });
       const paramsType = {

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

+ 37 - 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: [],
@@ -307,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;
+      })
     },
 
     // 获取经销商列表
@@ -319,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() {
@@ -329,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++) {
@@ -415,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;
           }
         }
@@ -428,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 = [];
@@ -466,10 +483,8 @@ export default {
               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();

+ 48 - 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 = [];
@@ -632,10 +658,8 @@ export default {
               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,

+ 32 - 5
src/views/supply/policy/components/retail_detail.vue

@@ -5,7 +5,7 @@
       <div class="title">提货进度</div>
     </div>
     <div class="progress-container">
-      <el-progress :text-inside="true" :stroke-width="26" :percentage="detailData.thjd || 0"></el-progress>
+      <el-progress :text-inside="true" :stroke-width="26" :percentage="detailData.thjd ? (detailData.thjd * 1000 / 10) : 0"></el-progress>
     </div>
 
     <div class="main-title">
@@ -76,8 +76,15 @@
         <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="rebateAmount" min-width="100" show-overflow-tooltip></el-table-column>
+<el-table-column align="center" label="返利类型" prop="customerWalletName2" min-width="100" show-overflow-tooltip>
+                <template slot-scope="scope">
+
+                  <el-tag type="success" size="small"  v-if="scope.row.customerWalletName2">
+                      {{scope.row.customerWalletName2}}
+                  </el-tag>
+
+                </template>
+               </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="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>
@@ -92,7 +99,13 @@
         <el-table-column align="center" label="税率" prop="tax" min-width="100" show-overflow-tooltip></el-table-column>
       </el-table>
     </div>
-
+  <div class="page-footer">
+      <div class="footer" :class="classObj">
+        <!-- <el-button type="primary" @click="openDeliverDialog" :disabled="detailData.examineStatus !== 'OK'">直调发货</el-button> -->
+        <el-button type="primary" @click="handleFinish" :disabled="detailData.examineStatus !== 'OK'">直调完成</el-button>
+        <!-- <el-button @click="goBack">关 闭</el-button> -->
+      </div>
+    </div>
     <div v-if="isExamine">
       <div class="main-title">
         <div class="title">审批记录</div>
@@ -259,7 +272,21 @@ export default {
         this.detailData = res.data;
       })
     },
-
+ // 直调完成
+    handleFinish() {
+      this.$confirm('此操作将直调完成, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        finishData({
+          id: this.listItem.id
+        }).then(res => {
+          this.$successMsg();
+          this.getDetail();
+        })
+      }).catch(() => {});
+    },
     // 打开 直调发货
     openDeliverDialog() {
       this.isShowDeliverDialog = true;

+ 89 - 65
src/views/supply/policy/components/retail_form.vue

@@ -54,8 +54,10 @@
           <el-form-item label="单据日期" prop="date">
             <el-date-picker
               v-model="mainForm.date"
-              type="date"
-              value-format="yyyy-MM-dd"
+              type="datetime"
+
+              :picker-options="pickerOptions"
+                value-format="yyyy-MM-dd HH:mm:ss"
               style="width: 100%"
               placeholder="选择日期"
             >
@@ -222,14 +224,14 @@
         ></el-table-column>
         <el-table-column
           align="center"
-          label="数量"
+          label="数量"
           prop="qty"
           min-width="100"
           show-overflow-tooltip
         >
-          <template slot-scope="scope">
+          <!-- <template slot-scope="scope">
             <el-input v-model="scope.row.qty" size="small"></el-input>
-          </template>
+          </template> -->
         </el-table-column>
         <el-table-column
           align="center"
@@ -343,7 +345,7 @@
             <el-checkbox v-model="scope.row.isDirectTransfer"></el-checkbox>
           </template>
         </el-table-column>
-        <el-table-column
+        <!-- <el-table-column
           align="center"
           label="直调数量"
           prop="directTransferQty"
@@ -355,7 +357,7 @@
               size="small"
             ></el-input>
           </template>
-        </el-table-column>
+        </el-table-column> -->
         <el-table-column
           align="center"
           label="备注"
@@ -550,7 +552,7 @@
             :page-sizes="[10]"
             :page-size="10"
             layout="total, sizes, prev, pager, next, jumper"
-            :total="dataList.length"
+            :total="total"
           >
           </el-pagination>
         </div>
@@ -613,11 +615,10 @@
             </el-col>
           </el-row>
         </el-form>
-        <el-row type="flex" :gutter="20" style="margin: 10px 0">
-          <el-col>已选择限定机型</el-col>
-          <el-col>{{ comText("mainName") }}</el-col>
-          <el-col>{{ comText("specification") }}</el-col>
-          <el-col></el-col>
+        <el-row type="flex" :gutter="30" style="margin: 10px 0">
+          <el-col :span="10">已选择限定机型</el-col>
+          <el-col :span="8" class="ellipsis">{{ comText("materialName") }}</el-col>
+          <el-col :span="12" class="ellipsis">{{ comText("specification") }}</el-col>
           <el-col style="text-align: right">配提比例:{{ pop }}</el-col>
         </el-row>
         <template v-for="(item, index) in popArr">
@@ -635,7 +636,14 @@
               ><template slot-scope="scope">
                 <el-radio
                   v-model="radioObj['radio' + cusIndex]"
-                  :label="scope.row.id"
+                  :label=" scope.row.id +
+                  '&' +
+                  scope.row.policyId +
+                  '&' +
+                  scope.row.materialId +
+                  '&' +
+                  scope.row.policyConditionId
+                ""
                   >{{ "" }}</el-radio
                 >
               </template>
@@ -677,15 +685,10 @@
             </template>
           </el-table>
           <!-- 分页 -->
-          <div style="margin: 10px 0">
+          <div style="margin: 10px 0"   v-if="index + 1 == cusIndex">
             <el-pagination
-              @size-change="handleSizeChange"
-              @current-change="handleCurrentChange"
-              :current-page="currentPage"
-              :page-sizes="[10]"
-              :page-size="10"
-              layout="total, sizes, prev, pager, next, jumper"
-              :total="popDataArr[cusIndex - 1].length || 0"
+              layout="total"
+              :total="popDataArr[cusIndex - 1]?popDataArr[cusIndex - 1].length:0"
             >
             </el-pagination>
           </div>
@@ -694,7 +697,7 @@
           <el-button type="primary" @click="cusIndex -= 1">上一步</el-button>
           <el-button
             type="primary"
-            @click="handleCondition()"
+            @click="handleCondition"
             v-if="popArr.length != cusIndex"
             >下一步</el-button
           >
@@ -750,6 +753,7 @@ export default {
       pageSize: 10, // 每页数量
       listTotal: 0, // 列表总数
       cusIndex: 0,
+      total:0,
       radio: "",
       pop: "",
       popArr: [],
@@ -828,6 +832,7 @@ export default {
       popDataArr: [],
       radioObj: {},
       step: 0,
+      policyId:''
     };
   },
 
@@ -858,20 +863,32 @@ export default {
     },
     comText() {
       return (val) => {
-        const params = this.radio.split("&");
-        if (this.cusIndex - 1 == 0) {
+        if (this.cusIndex-1 ==0) {
+           const params = this.radio.split("&");
           return this.dataList.filter((k) => {
-            console.log(k, params[0]);
             return k.id == params[0];
-          })[0][val];
-        } else {
-          return this.popDataArr[this.cusIndex - 1].filter((k) => {
-            return k.id == params[0];
-          })[0][val];
+          })[0][val]
+
+        }else{
+          const  params =  this.radioObj['radio' + (this.cusIndex-1)].split("&")
+          return this.popDataArr[this.cusIndex - 2].filter(k=>{
+            return k.id == params[0]
+           })[0][val]
+
         }
+
+
       };
-      // console.log();
     },
+      pickerOptions({ $props }) {
+            return {
+               disabledDate: (time) => {
+            return time.getTime() < Date.now()-1 * 24 * 60 * 60 * 1000
+          }
+            };
+        }
+
+
   },
 
   created() {
@@ -884,9 +901,7 @@ export default {
       this.getDetail();
     }
   },
-  beforeUpdate() {
-
-  },
+  beforeUpdate() {},
   methods: {
     // 返回列表
     goBack() {
@@ -913,8 +928,10 @@ export default {
         pageSize: -1,
       }).then((res) => {
         console.log(res, "tyep");
-        this.policyList = res.data.records;
         this.screenForm.policyId = res.data.records[0].code;
+        this.policyList = res.data.records;
+        console.log(this.policyList,'policyList');
+
       });
     },
     getTypeList() {
@@ -957,6 +974,7 @@ export default {
           res.data.records[i].qty = 1;
         }
         this.dataList = res.data.records;
+        this.total = res.data.total
         console.log(this.dataList, "kkkk");
       });
     },
@@ -974,7 +992,7 @@ export default {
     },
     handleShow() {
       this.isShowDialog = true;
-      this.getPolicyList()
+      this.getPolicyList();
     },
     // 获取钱包列表
     getWalletList() {
@@ -1133,13 +1151,11 @@ export default {
           this.pop = res.data.pop;
           this.popArr = res.data.pop.split(":");
           this.popArr.splice(0, 1);
-          console.log(this.popArr);
-          console.log;
           for (let i = 0; i < this.popArr.length; i++) {
             this.$set(this.radioObj, "radio" + (i + 1), "");
           }
           this.step = this.cusIndex + 1;
-          this.screenForm.policyId = "";
+
           this.getConditionList(params[3], this.step);
         });
       } else {
@@ -1162,51 +1178,53 @@ export default {
       this.getConditionList(params[3], this.step);
     },
     getConditionList(policyConditionId, popType) {
-      let arr = []
+
       getConditionList({
         pageNum: this.currentPage,
         pageSize: this.pageSize,
         policyConditionId,
         popType,
       }).then((res) => {
-        console.log(this.cusIndex);
-         const datas = res.data.records
+
+        const datas = res.data.records;
         for (let i = 0; i < res.data.records.length; i++) {
           res.data.records[i].qty = 1;
         }
         if (this.popDataArr.length) {
+
           this.popDataArr.splice(this.cusIndex - 1, 1);
         }
         if (this.cusIndex == 0) {
+
           this.popDataArr = [];
         }
-
+    // this.popDataArr.push(datas)
         if (this.cusIndex == 1) {
-          for (let l = 0; l < this.dataList.length; l++) {
+           const params = this.radio.split("&");
+            for (let k = 0; k < datas.length; k++) {
 
-              for (let k = 0; k < datas.length; k++) {
-                            console.log(this.dataList[l].id == datas[k].id,'hahah',datas,this.dataList);
-                      if (this.dataList[l].id == datas[k].id) {
-                          datas.splice(k,1)
-                      }
+              if (params[2]== datas[k].materialId) {
+                datas.splice(k, 1);
               }
-          }
-           this.popDataArr.push(datas);
-        }else{
 
-          for (let j = 0; j <  this.popDataArr[this.cusIndex-1].length; j++) {
-             for (let k = 0; k < datas.length; k++) {
+            }
 
-                      if (this.dataList[l].id == datas[k].id) {
-                            datas.splice(k,1)
-                      }
-              }
+          this.popDataArr.push(datas);
 
+        } else {
+
+            const  params =  this.radioObj['radio' + (this.cusIndex-1)].split("&")
+            for (let k = 0; k < datas.length; k++) {
+              if (params[2] == datas[k].id) {
+                datas.splice(k, 1);
+              }
           }
+
           this.popDataArr.push(datas);
+
+
         }
 
-        // this.popDataArr.push(res.data.records);
 
       });
     },
@@ -1219,8 +1237,10 @@ export default {
 
         for (let j = 0; j < arrData.length; j++) {
           for (const key in this.radioObj) {
-            if (arrData[j].id == this.radioObj[key]) {
-              console.log(arrData[j], "xxxx");
+                  const params = this.radioObj[key].split("&");
+                  console.log(params);
+            if (arrData[j].id == params[0]) {
+
               this.goodsList = [...this.goodsList, arrData[j]];
             }
           }
@@ -1244,9 +1264,8 @@ export default {
         this.cusIndex = 0;
         this.radio = "";
         this.dataList = [];
-        this.screenForm.policyId = "";
-        this.screenForm.saleTypeCode = "";
 
+        this.policyId =this.screenForm.policyId
         this.isShowDialog = false;
       } else {
         this.$errorMsg("请选择");
@@ -1325,7 +1344,7 @@ export default {
             remark: this.mainForm.remark,
             type: 2, // 1:普通零售单,2:政策零售单
             retailOrderItemList: this.goodsList,
-            policyId: this.screenForm.policyId,
+            policyId:this.policyId,
           };
           if (this.listItem) {
             params.id = this.listItem.id;
@@ -1389,4 +1408,9 @@ export default {
     }
   }
 }
+.ellipsis{
+  overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+}
 </style>

+ 28 - 8
src/views/supply/policy/policy_list.vue

@@ -223,7 +223,7 @@
             <el-table-column
               align="center"
               label="总数量"
-              prop="totalQty"
+              prop="qty"
               min-width="100"
               show-overflow-tooltip
             ></el-table-column>
@@ -244,11 +244,22 @@
             ></el-table-column>
             <el-table-column
               align="center"
-              label="返利使用比例"
-              prop="rebateRate"
-              min-width="110"
+              label="返利类型"
+              prop="customerWalletName2"
+              min-width="100"
               show-overflow-tooltip
-            ></el-table-column>
+            >
+              <template slot-scope="scope">
+                <el-tag
+                  type="success"
+                  size="small"
+                  v-if="scope.row.customerWalletName2"
+                >
+                  {{ scope.row.customerWalletName2 }}
+                </el-tag>
+              </template>
+            </el-table-column>
+
             <el-table-column
               align="center"
               label="返利"
@@ -323,15 +334,24 @@
               fixed="right"
             >
               <template slot-scope="scope">
-                     <el-popconfirm
+                <el-popconfirm
                   v-if="scope.row.examineStatus === 'SAVE'"
                   style="margin-right: 10px"
-                  title="确定撤回?"
+                  title="确定提审?"
                   @onConfirm="handleSubmit(scope.row.id)"
                 >
                   <el-button slot="reference" type="text">提审</el-button>
                 </el-popconfirm>
-                <el-button type="text" @click="toForm(scope.row)"
+                <el-button
+                  v-if="scope.row.examineStatus == 'WAIT'"
+                  type="text"
+                  @click="toExamine(scope.row)"
+                  >审核</el-button
+                >
+                <el-button
+                  type="text"
+                  v-if="scope.row.examineStatus === 'SAVE'"
+                  @click="toForm(scope.row)"
                   >编辑</el-button
                 >
                 <el-popconfirm

+ 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">

+ 20 - 33
src/views/supply/retail/components/retail_form.vue

@@ -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 :disabled="goodsList.length > 0 || rightGoodsList.length > 0">
+              <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;
     },