Преглед на файлове

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

chen преди 3 години
родител
ревизия
e8a81e19c7
променени са 42 файла, в които са добавени 938 реда и са изтрити 421 реда
  1. 9 0
      src/api/policy_list.js
  2. 29 2
      src/api/supply/pickup.js
  3. 9 0
      src/api/supply/sales.js
  4. BIN
      src/assets/login/background.png
  5. BIN
      src/assets/login/logo.png
  6. 12 5
      src/views/pset/login_setting.vue
  7. 57 27
      src/views/sales_policy/components/AddPolicy.vue
  8. 21 24
      src/views/sales_policy/policy_list.vue
  9. 13 11
      src/views/setting/components/log-operation.vue
  10. 3 3
      src/views/setting/oplog.vue
  11. 47 5
      src/views/setting/other.vue
  12. 2 2
      src/views/supply/deliver/commerce_list.vue
  13. 24 19
      src/views/supply/deliver/components/deliver_detail.vue
  14. 24 19
      src/views/supply/deliver/components/home_detail.vue
  15. 2 2
      src/views/supply/deliver/home_list.vue
  16. 5 5
      src/views/supply/engin/components/commerce_detail.vue
  17. 3 3
      src/views/supply/engin/components/commerce_examine.vue
  18. 11 11
      src/views/supply/engin/components/commerce_form.vue
  19. 3 3
      src/views/supply/engin/components/commerce_return.vue
  20. 13 1
      src/views/supply/engin/components/engin_detail.vue
  21. 13 1
      src/views/supply/engin/components/engin_examine.vue
  22. 35 11
      src/views/supply/engin/components/engin_form.vue
  23. 5 5
      src/views/supply/engin/components/home_detail.vue
  24. 3 3
      src/views/supply/engin/components/home_examine.vue
  25. 11 11
      src/views/supply/engin/components/home_form.vue
  26. 3 3
      src/views/supply/engin/components/home_return.vue
  27. 2 1
      src/views/supply/engin/engin_list.vue
  28. 151 110
      src/views/supply/pickup/check.vue
  29. 56 21
      src/views/supply/pickup/components/pickup_form.vue
  30. 152 0
      src/views/supply/pickup/components/pickup_print.vue
  31. 8 3
      src/views/supply/pickup/pickup_list.vue
  32. 34 17
      src/views/supply/pickup/statistics.vue
  33. 26 15
      src/views/supply/policy/components/retail_detail.vue
  34. 19 5
      src/views/supply/policy/components/retail_examine.vue
  35. 3 5
      src/views/supply/policy/components/retail_form2.vue
  36. 28 11
      src/views/supply/policy/components/retail_return.vue
  37. 1 1
      src/views/supply/policy/policy_list.vue
  38. 3 3
      src/views/supply/retail/components/retail_detail.vue
  39. 2 2
      src/views/supply/retail/components/retail_form.vue
  40. 8 7
      src/views/supply/sales/components/sales_detail.vue
  41. 56 30
      src/views/supply/sales/components/sales_examine.vue
  42. 32 14
      src/views/supply/sales/sales_list.vue

+ 9 - 0
src/api/policy_list.js

@@ -326,3 +326,12 @@ export function addCompany(params) {
     data: params
   })
 }
+
+//获取公司数据
+export function getCompanyList(params) {
+  return request({
+    url: '/record/company/list',
+    method: 'get',
+    params
+  })
+}

+ 29 - 2
src/api/supply/pickup.js

@@ -12,7 +12,7 @@ export function getPickupList(params) {
 // 获取详情
 export function getDetail(params) {
   return request({
-    url: '/retreat/detail',
+    url: '/pick/detail',
     method: 'get',
     params
   })
@@ -63,7 +63,7 @@ export function getCompanyList(params) {
   })
 }
 
-// 提交提货预约
+// 新增提货预约
 export function addPickupBook(params) {
   return request({
     url: '/pick/add',
@@ -72,6 +72,15 @@ export function addPickupBook(params) {
   })
 }
 
+// 编辑提货预约
+export function editPickupBook(params) {
+  return request({
+    url: '/pick/update',
+    method: 'post',
+    data: params
+  })
+}
+
 // 获取短信验证码
 export function getCode(params) {
   return request({
@@ -88,4 +97,22 @@ export function getPickupManInfo(params) {
     method: 'post',
     params
   })
+}
+
+// 增加打印次数
+export function addPrint(params) {
+  return request({
+    url: '/pick/printAdd',
+    method: 'post',
+    params
+  })
+}
+
+// 获取汇总
+export function getStatistics(params) {
+  return request({
+    url: '/pick/summary',
+    method: 'get',
+    params
+  })
 }

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

@@ -25,4 +25,13 @@ export function examineData(params) {
     method: 'post',
     data: params
   })
+}
+
+// 审批进入判断
+export function examineJudge(params) {
+  return request({
+    url: '/sale/order/approvalJudge',
+    method: 'post',
+    params
+  })
 }

BIN
src/assets/login/background.png


BIN
src/assets/login/logo.png


+ 12 - 5
src/views/pset/login_setting.vue

@@ -208,6 +208,7 @@
         delImgData,
         addCompany,
         editImgCarousel,
+        getCompanyList,
     } from "@/api/policy_list";
 
     export default {
@@ -306,11 +307,17 @@
                     mainId: "",
                     status: this.screenForm.status,
                 };
-                // getTypeList(params).then((res) => {
-                //   this.dataList = res.data.records;
-                //   this.listTotal = res.data.total;
-                //   this.listLoading = false;
-                // });
+                getCompanyList().then((res) => {
+                    if(res.data){
+                          this.comPanyDialogForm.id = res.data[0].id,
+                            this.comPanyDialogForm.icpRecord = res.data[0].icpRecord,
+                            this.comPanyDialogForm.icpRecordLink= res.data[0].icpRecordLink,
+                            this.comPanyDialogForm.pubSecurityRecord= res.data[0].pubSecurityRecord,
+                            this.comPanyDialogForm.pubSecurityRecordLink = res.data[0].pubSecurityRecordLink,
+                            this.comPanyDialogForm.companyName = res.data[0].companyName
+                    }
+                });
+
                 getImgCarouseList(params).then((res) => {
                     this.dataList = res.data;
                     this.listLoading = false;

+ 57 - 27
src/views/sales_policy/components/AddPolicy.vue

@@ -57,15 +57,18 @@
                 </el-form-item>
               </el-col>
               <el-col :xs="24" :ms="12" :lg="12">
-                <el-form-item label="产品品类" prop="name">
-                  <el-select v-model="value" placeholder="请选择">
+                <el-form-item label="产品品类" prop="mainId">
+                  <el-select
+                    v-model="searchForm.mainId"
+                    :disabled="dataList.length ? true : false"
+                    placeholder="请选择"
+                    @change="handelStop"
+                  >
                     <el-option
-                      v-for="(item, index) in walletList"
-                      :key="index"
-                      :label="item.mainName"
-                      :value="item.mainId"
-                    >
-                    </el-option>
+                      v-for="item in dictList"
+                      :label="item.dictValue"
+                      :value="item.sysDictId"
+                    ></el-option>
                   </el-select>
                 </el-form-item>
               </el-col>
@@ -115,15 +118,25 @@
                 <h4 style="display: inline-block; margin-right: 20px">
                   货品信息
                 </h4>
-                <el-upload
+                <template>
+                  <el-upload
+                    v-show="fang == true"
+                    class="import-btn"
+                    :action="baseURL + 'student/import'"
+                    :http-request="handleImport"
+                    :file-list="importFileList"
+                    :show-file-list="false"
+                  >
+                    <el-button size="small">导入货品价格表</el-button>
+                  </el-upload>
+                </template>
+                <el-button
+                  size="small"
                   class="import-btn"
-                  :action="baseURL + 'student/import'"
-                  :http-request="handleImport"
-                  :file-list="importFileList"
-                  :show-file-list="false"
+                  v-show="fang == false"
+                  @click="handelStop"
+                  >导入货品价格表</el-button
                 >
-                  <el-button size="small">导入货品价格表</el-button>
-                </el-upload>
                 <el-button size="small" @click="hanleDownloadFiles"
                   >下载模板</el-button
                 >
@@ -141,8 +154,7 @@
             stripe
           >
             <el-table-column
-              fixed
-              prop="num"
+              type="index"
               label="序号"
               width="50"
               align="center"
@@ -169,7 +181,6 @@
             <el-table-column
               prop="saleTypeCode"
               label="销售类型编码"
-              width="500"
               align="center"
             >
             </el-table-column>
@@ -179,6 +190,8 @@
               align="center"
             >
             </el-table-column>
+            <el-table-column prop="discAmount" label="格力折扣" align="center">
+            </el-table-column>
             <el-table-column prop="price" label="单价" align="center">
             </el-table-column>
             <el-table-column label="支付钱包" align="center">
@@ -268,7 +281,7 @@
               align="center"
             >
               <template slot-scope="scope">
-                                <!-- <el-button
+                <!-- <el-button
                   type="text"
                   size="small"
                   @click="isCondition=1"
@@ -317,6 +330,7 @@ import {
   getConditionList,
   deleteMaterialPolicy,
 } from "@/api/policy_list";
+import { getDictList } from "@/api/common";
 import { downloadFiles, handleImport } from "@/utils/util";
 import Transfer from "./Transfer";
 import AddCondition from "./AddCondition";
@@ -326,6 +340,7 @@ export default {
   mixins: [Minxin],
   data() {
     return {
+      fang: false,
       input: "",
       baseURL: "",
       isCondition: 0,
@@ -336,6 +351,8 @@ export default {
         remark: "",
         startTime: "",
         title: "",
+        mainId: "",
+        mainName: "",
         type: "",
       },
       listLoading: false,
@@ -362,6 +379,7 @@ export default {
         },
       ],
       conditionList: [],
+      dictList: [],
     };
   },
   computed: mapState({
@@ -381,11 +399,10 @@ export default {
     this.searchForm.code = this.comCode;
   },
   updated() {
-        console.log(this.comCode, "kkjk");
+    console.log(this.comCode, "kkjk");
     this.searchForm.code = this.comCode;
   },
   created() {
-
     this.getCommonApi();
     if (this.$parent.isFlag) {
       // this.handletwoList()
@@ -400,7 +417,10 @@ export default {
     handleCondition(id, index) {
       deleteCondition({ id }).then((res) => {
         this.conditionList.splice(index, 1);
-        Object.assign(this.$children[9].$data,this.$children[9].$options.data())
+        Object.assign(
+          this.$children[9].$data,
+          this.$children[9].$options.data()
+        );
         this.$successMsg("删除成功");
       });
     },
@@ -430,6 +450,9 @@ export default {
       getWalletList(walletParams).then((res) => {
         this.walletList = res.data.records;
       });
+      getDictList({ sysDictEnum: "PRODUCT_TYPE" }).then((res) => {
+        this.dictList = res.data;
+      });
     },
     handleSubmitCon() {
       const params = {
@@ -440,6 +463,13 @@ export default {
         this.conditionList = res.data;
       });
     },
+    handelStop() {
+      if (this.searchForm.mainId) {
+        this.fang = true;
+      } else {
+        this.$errorMsg("请选择产品品类");
+      }
+    },
     // 导入
     async handleImport(param) {
       this.importLoading = true;
@@ -491,9 +521,6 @@ export default {
     },
     // 提交审核
     handleAddPolicy(policyCustomers) {
-      //     console.log(this.fileList,'上传图片');
-      // return
-      console.log(policyCustomers, "选择的经销商");
       if (policyCustomers.length) {
         var arr = [];
 
@@ -510,15 +537,18 @@ export default {
             remark: "",
           });
         });
+        this.dictList.forEach((k) => {
+          if (k.mainId == this.searchForm.sysDictId) {
+            this.searchForm.mainName = k.dictValue;
+          }
+        });
         const params = {
           adminCompanyId: "",
           code: "",
           customerCount: 0,
-
           examineBy: "",
           examineRemark: "",
           examineStatus: "",
-
           id: "",
           imgSrc: this.fileList.length ? this.fileList[0].url : "",
           policyCustomers: arr,

+ 21 - 24
src/views/sales_policy/policy_list.vue

@@ -41,7 +41,7 @@
                   type="datetime"
                   size="small"
                   placeholder="生效日期"
-                   value-format="yyyy-MM-dd HH:mm:ss"
+                  value-format="yyyy-MM-dd HH:mm:ss"
                 >
                 </el-date-picker>
               </el-form-item>
@@ -55,7 +55,7 @@
                   type="datetime"
                   size="small"
                   placeholder="结束日期"
-                   value-format="yyyy-MM-dd HH:mm:ss"
+                  value-format="yyyy-MM-dd HH:mm:ss"
                 >
                 </el-date-picker>
               </el-form-item>
@@ -68,7 +68,7 @@
                   type="datetime"
                   size="small"
                   placeholder="制表日期"
-                   value-format="yyyy-MM-dd HH:mm:ss"
+                  value-format="yyyy-MM-dd HH:mm:ss"
                 >
                 </el-date-picker>
               </el-form-item>
@@ -95,8 +95,6 @@
             </el-col>
           </el-row>
           <el-row :gutter="20">
-
-
             <el-col :xs="24" :ms="6" :lg="6">
               <el-form-item label="" prop="status">
                 <el-select
@@ -134,9 +132,7 @@
                 </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"> </el-col>
             <el-col :xs="24" :ms="6" :lg="6" class="tr">
               <el-form-item>
                 <el-button type="primary" size="small" @click="submitScreenForm"
@@ -153,9 +149,11 @@
     </div>
     <div class="btn-group">
       <el-row type="flex">
-        <el-button  size="small"
-              type="primary"
-              icon="el-icon-plus"   @click="hanlenewInfo"
+        <el-button
+          size="small"
+          type="primary"
+          icon="el-icon-plus"
+          @click="hanlenewInfo"
           >新增</el-button
         >
       </el-row>
@@ -183,12 +181,10 @@
               type="text"
               v-if="scope.row.examineStatus == 'WAIT'"
               @click="
-
                 (isShow = 8),
                   (id = scope.row.id),
                   (policyId = scope.row.policyId),
                   (code = scope.row.code)
-
               "
               size="small"
               >审核</el-button
@@ -206,6 +202,7 @@
             </el-popconfirm>
 
             <el-popconfirm
+              v-if="scope.row.examineStatus != 'OK'"
               style="margin-left: 10px"
               title="删除吗?"
               @onConfirm="hanleDelete(scope.row.id)"
@@ -216,12 +213,12 @@
             </el-popconfirm>
           </template>
         </el-table-column>
-        <el-table-column label="状态" width="120" align="center">
+        <!-- <el-table-column label="状态" width="120" align="center">
           <template slot-scope="scope">
             <el-tag v-if="scope.row.status == '1'">已生效</el-tag>
             <el-tag v-else-if="scope.row.status == '0'">未生效 </el-tag>
           </template>
-        </el-table-column>
+        </el-table-column> -->
         <el-table-column label="状态" width="120" align="center">
           <template slot-scope="scope">
             <el-tag v-if="scope.row.examineStatus == 'SAVE'">保存</el-tag>
@@ -246,8 +243,11 @@
           align="center"
         >
         </el-table-column>
-        <!-- <el-table-column prop="address" label="部门" align="center"></el-table-column> -->
-
+        <el-table-column
+          prop="mainName"
+          label="产品品类"
+          align="center"
+        ></el-table-column>
         <el-table-column
           prop="remark"
           label="表头备注"
@@ -327,7 +327,7 @@ export default {
       id: "",
       code: "",
       codeId: "",
-listLoading:false,
+      listLoading: false,
       policyId: "",
 
       isShow: 1,
@@ -394,7 +394,7 @@ listLoading:false,
       this.$store.dispatch("sales/hanlenewInfo");
     },
     getList() {
-        this.listLoading = true
+      this.listLoading = true;
       const params = {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
@@ -411,15 +411,13 @@ listLoading:false,
         startTime2: this.screenForm.startTime2,
         status: this.screenForm.status,
         title: this.screenForm.title,
-
       };
-      console.log(params,123);
+      console.log(params, 123);
       getList(params).then((res) => {
         this.dataList = res.data.records;
         console.log(this.dataList);
         this.listTotal = res.data.total;
-        this.listLoading = false
-
+        this.listLoading = false;
       });
       const paramsType = {
         pageNum: 1,
@@ -473,7 +471,6 @@ listLoading:false,
       }
     },
     handlesubmit(e) {
-
       getpolicySubmit({ policyId: e.id }).then((res) => {
         this.$successMsg("已提交");
         this.getList();

+ 13 - 11
src/views/setting/components/log-operation.vue

@@ -47,7 +47,7 @@
       <div class="btn-group clearfix">
         <div class="fl" />
         <div class="fr">
-          <el-button size="small" type="primary" @click="handleExport">导出</el-button>
+          <ExportButton :exUrl="'admin/user/mch/export'" :exParams="exParams" />
         </div>
       </div>
 
@@ -83,7 +83,6 @@
 
 <script>
 import { getOplogList } from '@/api/setting'
-import { downloadFiles } from '@/utils/util'
 
 export default {
   data() {
@@ -103,6 +102,18 @@ export default {
     }
   },
 
+  computed: {
+    exParams() {
+      return {
+        account: this.screenForm.account,
+        name: this.screenForm.name,
+        obj: this.screenForm.obj,
+        startTime: this.screenForm.date ? this.screenForm.date[0] : '',
+        endTime: this.screenForm.date ? this.screenForm.date[1] : '',
+      }
+    },
+  },
+
   created() {
     this.getList();
   },
@@ -169,15 +180,6 @@ export default {
       this.getList();
     },
 
-    // 导出
-    handleExport() {
-      let screenData = {
-        orderId: this.screenForm.orderId,
-        status: this.screenForm.status,
-      };
-      downloadFiles('tax/export', screenData);
-    },
-
   }
 }
 </script>

+ 3 - 3
src/views/setting/oplog.vue

@@ -1,11 +1,11 @@
 <template>
   <div class="app-container">
-    <el-radio-group v-model="logType" size="small">
+    <!-- <el-radio-group v-model="logType" size="small">
       <el-radio-button label="login">登录日志</el-radio-button>
       <el-radio-button label="operation">操作日志</el-radio-button>
       <el-radio-button label="examine">审批日志</el-radio-button>
     </el-radio-group>
-    <el-divider></el-divider>
+    <el-divider></el-divider> -->
 
     <LoginLog v-if="logType === 'login'" />
     <OperationLog v-if="logType === 'operation'" />
@@ -27,7 +27,7 @@ export default {
   },
   data() {
     return {
-      logType: 'login',
+      logType: 'operation',
     }
   },
   created() {

+ 47 - 5
src/views/setting/other.vue

@@ -3,7 +3,8 @@
     <el-radio-group v-model="formType" size="small">
       <el-radio-button label="first">订单日期设置</el-radio-button>
       <el-radio-button label="second">工程登录二次引用设置</el-radio-button>
-      <el-radio-button label="third">提货单二次打印设置</el-radio-button>
+      <el-radio-button label="third">自动预留单生成</el-radio-button>
+      <el-radio-button label="fourth">库存显示规则设置</el-radio-button>
     </el-radio-group>
 
     <div v-show="formType === 'first'">
@@ -25,8 +26,43 @@
 
     <div v-show="formType === 'third'">
       <div style="margin: 40px 0 30px;">
-        <div>提货单二次打印密码设置</div>
-        <div><el-input v-model="thirdForm.password" placeholder="请输入密码" size="small" style="width: 150px; margin-top: 20px;"></el-input></div>
+        <div>预留单自动生成时间,从订单审单后,第</div>
+        <el-input v-model="thirdForm.day" type="number" size="small" style="width: 150px; margin-top: 20px; margin-right: 10px"></el-input>
+        <span>天零时起,按商家提交订单时间顺序,自动生成预留单</span>
+      </div>
+      <el-button type="primary" size="small">确 定</el-button>
+    </div>
+
+    <div v-show="formType === 'fourth'">
+      <div style="margin: 40px 0 30px;">
+        <div>总可发货数 = 总库存数-总预留数-总发货申请暂扣</div>
+        <div style="margin-top: 20px">订单查询库存时:</div>
+        <div style="margin-top: 10px">总可发货数为0,显示无货</div>
+        <div style="margin-top: 10px">
+          <span>总可发货数</span>
+          <el-input v-model="fourthForm.input1" type="number" size="small" style="width: 100px; margin: 0 10px;"></el-input>
+          <span>到</span>
+          <el-input v-model="fourthForm.input2" type="number" size="small" style="width: 100px; margin: 0 10px;"></el-input>
+          <span>,总库存显示具体数量</span>
+        </div>
+        <div style="margin-top: 10px">
+          <span>总可发货数</span>
+          <el-input v-model="fourthForm.input3" type="number" size="small" style="width: 100px; margin: 0 10px;"></el-input>
+          <span>到</span>
+          <el-input v-model="fourthForm.input4" type="number" size="small" style="width: 100px; margin: 0 10px;"></el-input>
+          <span>,总库存显示有货</span>
+        </div>
+        <div style="margin-top: 10px">
+          <span>总可发货数大于</span>
+          <el-input v-model="fourthForm.input5" type="number" size="small" style="width: 100px; margin: 0 10px;"></el-input>
+          <span>,总库存显示充足</span>
+        </div>
+        <div style="margin-top: 30px">发货申请查询库存时:</div>
+        <div style="margin-top: 10px">
+          <span>可发货数大于</span>
+          <el-input v-model="fourthForm.input6" type="number" size="small" style="width: 100px; margin: 0 10px;"></el-input>
+          <span>显示充足</span>
+        </div>
       </div>
       <el-button type="primary" size="small">确 定</el-button>
     </div>
@@ -46,8 +82,11 @@ export default {
         password: '',
       },
       thirdForm: {
-        password: '',
+        day: '',
       },
+      fourthForm: {
+
+      }
     }
   },
   created() {
@@ -68,7 +107,10 @@ export default {
 </script>
 
 <style scoped lang="scss">
-
+  .app-container {
+    color: #333333;
+    font-size: 14px;
+  }
 </style>
 <style>
   .demo-table-expand {

+ 2 - 2
src/views/supply/deliver/commerce_list.vue

@@ -40,7 +40,7 @@
                   v-model="screenForm.date"
                   type="datetimerange"
                   range-separator="至"
-                  style="width: 100%;"
+                  style="width: 100%; height: 33px;"
                   value-format="yyyy-MM-dd HH:mm:ss"
                   start-placeholder="开始日期"
                   end-placeholder="结束日期">
@@ -58,7 +58,7 @@
               </el-form-item>
             </el-col>
             
-            <el-col :xs="24" :sm="12" :lg="6" class="tr">
+            <el-col :xs="24" :sm="24" :lg="12" class="tr">
               <el-form-item label="">
                 <el-button size="small" @click="resetScreenForm">清空</el-button>
                 <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>

+ 24 - 19
src/views/supply/deliver/components/deliver_detail.vue

@@ -18,21 +18,21 @@
           </el-col>
           <el-col :span="8" class="item">
             <div class="label">单据状态</div>
-            <div class="value">{{detailData.type | statusFilter}}</div>
-          </el-col>
-          <el-col :span="8" class="item">
-            <div class="label">销售类型</div>
-            <div class="value">{{detailData.salesType}}</div>
+            <div class="value">{{detailData.examineStatus | statusFilter}}</div>
           </el-col>
           <el-col :span="8" class="item">
             <div class="label">发货申请单号</div>
-            <div class="value">{{detailData.invoiceOrderNo}}</div>
+            <div class="value">{{detailData.id}}</div>
           </el-col>
           <el-col :span="8" class="item">
             <div class="label">订单类型</div>
             <div class="value">{{detailData.orderType | orderTypeFilter}}</div>
           </el-col>
           <el-col :span="8" class="item">
+            <div class="label"></div>
+            <div class="value"></div>
+          </el-col>
+          <el-col :span="8" class="item">
             <div class="label">经销商编码</div>
             <div class="value">{{detailData.customerNumber}}</div>
           </el-col>
@@ -42,15 +42,15 @@
           </el-col>
           <el-col :span="8" class="item">
             <div class="label">工程编号</div>
-            <div class="value">{{detailData.projectNumber}}</div>
+            <div class="value">{{detailData.enginOrderNo}}</div>
           </el-col>
           <el-col :span="8" class="item">
             <div class="label">厂工程编码</div>
-            <div class="value">{{detailData.factoryNumber}}</div>
+            <div class="value">{{detailData.refFactoryNo}}</div>
           </el-col>
           <el-col :span="8" class="item">
             <div class="label">项目名称</div>
-            <div class="value">{{detailData.projectName}}</div>
+            <div class="value">{{detailData.refProjectName}}</div>
           </el-col>
           <el-col :span="8" class="item">
             <div class="label">仓库</div>
@@ -58,7 +58,7 @@
           </el-col>
           <el-col :span="8" class="item">
             <div class="label">税率</div>
-            <div class="value">{{detailData.taxRate}}</div>
+            <div class="value">{{detailData.tax}}</div>
           </el-col>
           <el-col :span="8" class="item">
             <div class="label">发票号</div>
@@ -102,7 +102,7 @@
           </el-col>
           <el-col :span="8" class="item">
             <div class="label">开票日期</div>
-            <div class="value">{{detailData.billingTime}}</div>
+            <div class="value">{{detailData.billTime}}</div>
           </el-col>
         </el-row>
       </div>
@@ -111,16 +111,17 @@
         <div class="title">货品信息</div>
       </div>
       <div class="table">
-        <el-table :data="detailData.retreatDocumentOrder" element-loading-text="Loading" border fit highlight-current-row stripe>
+        <el-table :data="detailData.shipDocumentOrders" element-loading-text="Loading" border fit highlight-current-row stripe>
           <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
           <el-table-column align="center" label="订单号" prop="orderNumber" 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="saleTypeName" min-width="160" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="产品编号" prop="productNumber" 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="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="includedPrice" 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="number" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="含税单价" prop="includedPrice" 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="totalPrice" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="税率(%)" prop="rate" min-width="100" show-overflow-tooltip></el-table-column>
@@ -158,10 +159,14 @@ export default {
   },
   filters: {
     statusFilter(val) {
-      const MAP = {
-        1: '已受理'
-      }
-      return MAP[val];
+      const statusList = [
+        { label: '已保存', value: 'SAVE' },
+        { label: '待审核', value: 'WAIT' },
+        { label: '审核通过', value: 'OK' },
+        { label: '审核驳回', value: 'FAIL' },
+      ]
+      let obj = statusList.find(o => o.value == val);
+      return obj ? obj.label : ''
     },
     orderTypeFilter(val) {
       const MAP = {

+ 24 - 19
src/views/supply/deliver/components/home_detail.vue

@@ -18,21 +18,21 @@
           </el-col>
           <el-col :span="8" class="item">
             <div class="label">单据状态</div>
-            <div class="value">{{detailData.type | statusFilter}}</div>
-          </el-col>
-          <el-col :span="8" class="item">
-            <div class="label">销售类型</div>
-            <div class="value">{{detailData.salesType}}</div>
+            <div class="value">{{detailData.examineStatus | statusFilter}}</div>
           </el-col>
           <el-col :span="8" class="item">
             <div class="label">发货申请单号</div>
-            <div class="value">{{detailData.invoiceOrderNo}}</div>
+            <div class="value">{{detailData.id}}</div>
           </el-col>
           <el-col :span="8" class="item">
             <div class="label">订单类型</div>
             <div class="value">{{detailData.orderType | orderTypeFilter}}</div>
           </el-col>
           <el-col :span="8" class="item">
+            <div class="label"></div>
+            <div class="value"></div>
+          </el-col>
+          <el-col :span="8" class="item">
             <div class="label">经销商编码</div>
             <div class="value">{{detailData.customerNumber}}</div>
           </el-col>
@@ -42,15 +42,15 @@
           </el-col>
           <el-col :span="8" class="item">
             <div class="label">工程编号</div>
-            <div class="value">{{detailData.projectNumber}}</div>
+            <div class="value">{{detailData.enginOrderNo}}</div>
           </el-col>
           <el-col :span="8" class="item">
             <div class="label">厂工程编码</div>
-            <div class="value">{{detailData.factoryNumber}}</div>
+            <div class="value">{{detailData.refFactoryNo}}</div>
           </el-col>
           <el-col :span="8" class="item">
             <div class="label">项目名称</div>
-            <div class="value">{{detailData.projectName}}</div>
+            <div class="value">{{detailData.refProjectName}}</div>
           </el-col>
           <el-col :span="8" class="item">
             <div class="label">仓库</div>
@@ -58,7 +58,7 @@
           </el-col>
           <el-col :span="8" class="item">
             <div class="label">税率</div>
-            <div class="value">{{detailData.taxRate}}</div>
+            <div class="value">{{detailData.tax}}</div>
           </el-col>
           <el-col :span="8" class="item">
             <div class="label">发票号</div>
@@ -102,7 +102,7 @@
           </el-col>
           <el-col :span="8" class="item">
             <div class="label">开票日期</div>
-            <div class="value">{{detailData.billingTime}}</div>
+            <div class="value">{{detailData.billTime}}</div>
           </el-col>
         </el-row>
       </div>
@@ -111,16 +111,17 @@
         <div class="title">货品信息</div>
       </div>
       <div class="table">
-        <el-table :data="detailData.retreatDocumentOrder" element-loading-text="Loading" border fit highlight-current-row stripe>
+        <el-table :data="detailData.shipDocumentOrders" element-loading-text="Loading" border fit highlight-current-row stripe>
           <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
           <el-table-column align="center" label="订单号" prop="orderNumber" 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="saleTypeName" min-width="160" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="产品编号" prop="productNumber" 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="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="includedPrice" 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="number" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="含税单价" prop="includedPrice" 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="totalPrice" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="税率(%)" prop="rate" min-width="100" show-overflow-tooltip></el-table-column>
@@ -158,10 +159,14 @@ export default {
   },
   filters: {
     statusFilter(val) {
-      const MAP = {
-        1: '已受理'
-      }
-      return MAP[val];
+      const statusList = [
+        { label: '已保存', value: 'SAVE' },
+        { label: '待审核', value: 'WAIT' },
+        { label: '审核通过', value: 'OK' },
+        { label: '审核驳回', value: 'FAIL' },
+      ]
+      let obj = statusList.find(o => o.value == val);
+      return obj ? obj.label : ''
     },
     orderTypeFilter(val) {
       const MAP = {

+ 2 - 2
src/views/supply/deliver/home_list.vue

@@ -35,7 +35,7 @@
                   v-model="screenForm.date"
                   type="datetimerange"
                   range-separator="至"
-                  style="width: 100%;"
+                  style="width: 100%; height: 33px;"
                   value-format="yyyy-MM-dd HH:mm:ss"
                   start-placeholder="开始日期"
                   end-placeholder="结束日期">
@@ -53,7 +53,7 @@
               </el-form-item>
             </el-col>
             
-            <el-col :xs="24" :sm="12" :lg="6" class="tr">
+            <el-col :xs="24" :sm="24" :lg="12" class="tr">
               <el-form-item label="">
                 <el-button size="small" @click="resetScreenForm">清空</el-button>
                 <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>

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

@@ -140,7 +140,7 @@
           <el-table-column align="center" label="物料代码" prop="materialOldNumber" 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="price" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="工程登录数量" prop="enginNum" min-width="120" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
@@ -161,9 +161,9 @@
           <el-table-column align="center" label="税率" prop="tax" min-width="100" show-overflow-tooltip></el-table-column>
         </el-table>
       </div>
-      
+
     </div>
-    
+
     <div class="page-footer">
       <div class="footer" :class="classObj">
         <el-button type="danger" @click="closeData">关闭订单</el-button>
@@ -479,7 +479,7 @@ export default {
       this.$refs.deliverForm.validate((valid) => {
         if (valid) {
           for(let i=0; i<this.deliverGoodsList.length; i++) {
-            if(!this.deliverGoodsList[i].directTransferQty) {
+            if(!this.deliverGoodsList[i].directTransferQty && this.deliverGoodsList[i].directTransferQty !== 0) {
               this.$errorMsg('请输入直调数量');
               return;
             }
@@ -603,4 +603,4 @@ export default {
       padding-left: 10px;
     }
   }
-</style>
+</style>

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

@@ -126,7 +126,7 @@
         <el-table-column align="center" label="物料代码" prop="materialOldNumber" 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="price" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="工程登录数量" prop="enginNum" min-width="120" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
@@ -167,7 +167,7 @@
         </el-col>
       </el-row>
     </div>
-    
+
     <div class="page-footer">
       <div class="footer" :class="classObj">
         <el-button type="primary" @click="clickSubmitForm(1)">审批通过</el-button>
@@ -299,4 +299,4 @@ export default {
       padding-left: 10px;
     }
   }
-</style>
+</style>

+ 11 - 11
src/views/supply/engin/components/commerce_form.vue

@@ -150,7 +150,7 @@
         <el-table-column align="center" label="物料代码" prop="materialOldNumber" 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="price" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="工程信息数量" prop="enginNum" min-width="120" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip>
@@ -232,7 +232,7 @@
         </el-table-column>
       </el-table>
     </div>
-    
+
     <div class="page-footer">
       <div class="footer" :class="classObj">
         <el-button type="primary" @click="clickSubmitForm(1)">保 存</el-button>
@@ -262,7 +262,7 @@
               <el-input v-model="screenForm.company" placeholder="使用单位"></el-input>
             </el-form-item>
           </el-col>
-          
+
           <el-col :xs="24" :sm="12" :lg="6" class="tr">
             <el-form-item label="">
               <el-button size="small" @click="resetScreenForm">清空</el-button>
@@ -272,12 +272,12 @@
         </el-row>
       </el-form>
       <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%" 
+        <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="" width="100">
             <template slot-scope="scope">
@@ -302,7 +302,7 @@
           </el-pagination>
         </div>
       </div>
-      
+
       <div slot="footer" class="dialog-footer">
         <el-button @click="isShowDialog = false">关 闭</el-button>
       </div>
@@ -727,4 +727,4 @@ export default {
   ::v-deep input[type='number'] {
     -moz-appearance: textfield;
   }
-</style>
+</style>

+ 3 - 3
src/views/supply/engin/components/commerce_return.vue

@@ -120,7 +120,7 @@
         <el-table-column align="center" label="物料代码" prop="materialOldNumber" 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="price" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="工程登录数量" prop="enginNum" min-width="120" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
@@ -166,7 +166,7 @@
         </el-col>
       </el-row>
     </div>
-    
+
     <div class="page-footer">
       <div class="footer" :class="classObj">
         <el-button type="primary" @click="clickSubmitForm()">确定退订</el-button>
@@ -299,4 +299,4 @@ export default {
       padding-left: 10px;
     }
   }
-</style>
+</style>

+ 13 - 1
src/views/supply/engin/components/engin_detail.vue

@@ -53,6 +53,18 @@
           <div class="value">{{detailData.enginSignType}}</div>
         </el-col>
         <el-col :span="8" class="item">
+          <div class="label">联系人</div>
+          <div class="value">{{detailData.linkman}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">联系电话</div>
+          <div class="value">{{detailData.phone}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">固定电话</div>
+          <div class="value">{{detailData.tel}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
           <div class="label">制单人</div>
           <div class="value">{{detailData.createName}}</div>
         </el-col>
@@ -86,7 +98,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="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>

+ 13 - 1
src/views/supply/engin/components/engin_examine.vue

@@ -57,6 +57,18 @@
           <div class="value">{{detailData.enginSignType}}</div>
         </el-col>
         <el-col :span="8" class="item">
+          <div class="label">联系人</div>
+          <div class="value">{{detailData.linkman}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">联系电话</div>
+          <div class="value">{{detailData.phone}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">固定电话</div>
+          <div class="value">{{detailData.tel}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
           <div class="label">制单人</div>
           <div class="value">{{detailData.createName}}</div>
         </el-col>
@@ -121,7 +133,7 @@
         </el-table-column>
         <el-table-column align="center" label="产品编码" prop="materialNumber" min-width="120" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="规格型号" prop="specification" min-width="200" 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="price" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             <el-input v-model="scope.row.price" size="small" type="number"></el-input>

+ 35 - 11
src/views/supply/engin/components/engin_form.vue

@@ -10,7 +10,7 @@
       <el-row :gutter="20">
         <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="工程信息单" prop="orderNum">
-            <el-input v-model="mainForm.orderNum" placeholder="系统自动生成" readonly></el-input>
+            <el-input v-model="mainForm.orderNum" placeholder="系统自动生成" disabled></el-input>
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8" style="height: 51px;">
@@ -33,7 +33,7 @@
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="经销商编码" prop="jxsNum">
-            <el-input v-model="mainForm.jxsNum" placeholder="请输入经销商编码" readonly></el-input>
+            <el-input v-model="mainForm.jxsNum" placeholder="请输入经销商编码" disabled></el-input>
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8">
@@ -48,7 +48,7 @@
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="经销商名称" prop="jxsName">
-            <el-input v-model="mainForm.jxsName" placeholder="请输入经销商名称" readonly></el-input>
+            <el-input v-model="mainForm.jxsName" placeholder="请输入经销商名称" disabled></el-input>
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8">
@@ -76,6 +76,21 @@
             <el-input v-model="mainForm.loginType" placeholder="请输入工程登录类型"></el-input>
           </el-form-item>
         </el-col>
+        <el-col :xs="24" :sm="12" :lg="8">
+          <el-form-item label="联系人" prop="linkman">
+            <el-input v-model="mainForm.linkman" placeholder="请输入联系人"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="8">
+          <el-form-item label="联系电话" prop="phone">
+            <el-input v-model="mainForm.phone" placeholder="请输入联系电话"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="8">
+          <el-form-item label="固定电话" prop="tel">
+            <el-input v-model="mainForm.tel" placeholder="请输入固定电话"></el-input>
+          </el-form-item>
+        </el-col>
         <el-col :xs="24" :sm="24" :lg="16">
           <el-form-item label="备注" prop="remark">
             <el-input v-model="mainForm.remark" placeholder="请输入备注"></el-input>
@@ -83,12 +98,12 @@
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="业务员" prop="salesMan">
-            <el-input v-model="mainForm.salesMan" placeholder="请输入业务员" readonly></el-input>
+            <el-input v-model="mainForm.salesMan" placeholder="请输入业务员" disabled></el-input>
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="制单人" prop="createMan">
-            <el-input v-model="mainForm.createMan" placeholder="请输入制单人" readonly></el-input>
+            <el-input v-model="mainForm.createMan" placeholder="请输入制单人" disabled></el-input>
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8" style="height: 51px;">
@@ -96,7 +111,7 @@
             <el-date-picker
               v-model="mainForm.createDate"
               type="date"
-              readonly
+              disabled
               value-format="yyyy-MM-dd"
               style="width: 100%;"
               placeholder="选择日期">
@@ -150,7 +165,7 @@
         </el-table-column>
         <el-table-column align="center" label="产品编码" prop="materialNumber" min-width="120" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="规格型号" prop="specification" min-width="200" 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="price" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
@@ -176,7 +191,7 @@
       </el-table>
       <div class="add"><el-button type="text" icon="el-icon-plus" @click="addGoods">添加产品</el-button></div>
     </div>
-    
+
     <div class="page-footer">
       <div class="footer" :class="classObj">
         <el-button type="primary" @click="clickSubmitForm(1)">保 存</el-button>
@@ -214,6 +229,9 @@ export default {
         enginNum: '',
         factoryNum: '',
         loginType: '',
+        linkman: '',
+        phone: '',
+        tel: '',
         remark: '',
         salesMan: '',
         createMan: '',
@@ -245,7 +263,7 @@ export default {
         openSidebar: this.sidebar.opened
       }
     },
-    
+
   },
 
   created() {
@@ -301,6 +319,9 @@ export default {
         this.mainForm.enginNum = data.projectNo;
         this.mainForm.factoryNum = data.enginFactoryNo;
         this.mainForm.loginType = data.enginSignType;
+        this.mainForm.linkman = data.linkman;
+        this.mainForm.phone = data.phone;
+        this.mainForm.tel = data.tel;
         this.mainForm.remark = data.remark;
         this.mainForm.salesMan = data.serviceId;
         this.mainForm.createMan = data.createName;
@@ -395,7 +416,7 @@ export default {
 
           let params = {
             orderDate: this.mainForm.orderDate + ' 00:00:00',
-            productCategoryId: this.mainForm.mainId,
+            mainId: this.mainForm.mainId,
             projectName: this.mainForm.enginName,
             orderType: this.mainForm.orderType,
             useUnit: this.mainForm.company,
@@ -403,6 +424,9 @@ export default {
             projectNo: this.mainForm.enginNum,
             enginFactoryNo: this.mainForm.factoryNum,
             enginSignType: this.mainForm.loginType,
+            linkman: this.mainForm.linkman,
+            phone: this.mainForm.phone,
+            tel: this.mainForm.tel,
             remark: this.mainForm.remark,
             contractExpireDate: this.mainForm.contractDate,
             items: this.goodsList
@@ -475,4 +499,4 @@ export default {
   ::v-deep input[type='number'] {
     -moz-appearance: textfield;
   }
-</style>
+</style>

+ 5 - 5
src/views/supply/engin/components/home_detail.vue

@@ -140,7 +140,7 @@
           <el-table-column align="center" label="物料代码" prop="materialOldNumber" 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="price" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="工程登录数量" prop="enginNum" min-width="120" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
@@ -161,9 +161,9 @@
           <el-table-column align="center" label="税率" prop="tax" min-width="100" show-overflow-tooltip></el-table-column>
         </el-table>
       </div>
-      
+
     </div>
-    
+
     <div class="page-footer">
       <div class="footer" :class="classObj">
         <el-button type="danger" @click="closeData">关闭订单</el-button>
@@ -479,7 +479,7 @@ export default {
       this.$refs.deliverForm.validate((valid) => {
         if (valid) {
           for(let i=0; i<this.deliverGoodsList.length; i++) {
-            if(!this.deliverGoodsList[i].directTransferQty) {
+            if(!this.deliverGoodsList[i].directTransferQty && this.deliverGoodsList[i].directTransferQty !== 0) {
               this.$errorMsg('请输入直调数量');
               return;
             }
@@ -603,4 +603,4 @@ export default {
       padding-left: 10px;
     }
   }
-</style>
+</style>

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

@@ -126,7 +126,7 @@
         <el-table-column align="center" label="物料代码" prop="materialOldNumber" 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="price" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="工程登录数量" prop="enginNum" min-width="120" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
@@ -167,7 +167,7 @@
         </el-col>
       </el-row>
     </div>
-    
+
     <div class="page-footer">
       <div class="footer" :class="classObj">
         <el-button type="primary" @click="clickSubmitForm(1)">审批通过</el-button>
@@ -299,4 +299,4 @@ export default {
       padding-left: 10px;
     }
   }
-</style>
+</style>

+ 11 - 11
src/views/supply/engin/components/home_form.vue

@@ -156,7 +156,7 @@
         <el-table-column align="center" label="物料代码" prop="materialOldNumber" 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="price" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="工程登录数量" prop="enginNum" min-width="120" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip>
@@ -238,7 +238,7 @@
         </el-table-column>
       </el-table>
     </div>
-    
+
     <div class="page-footer">
       <div class="footer" :class="classObj">
         <el-button type="primary" @click="clickSubmitForm(1)">保 存</el-button>
@@ -268,7 +268,7 @@
               <el-input v-model="screenForm.company" placeholder="使用单位"></el-input>
             </el-form-item>
           </el-col>
-          
+
           <el-col :xs="24" :sm="12" :lg="6" class="tr">
             <el-form-item label="">
               <el-button size="small" @click="resetScreenForm">清空</el-button>
@@ -278,12 +278,12 @@
         </el-row>
       </el-form>
       <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%" 
+        <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="" width="100">
             <template slot-scope="scope">
@@ -308,7 +308,7 @@
           </el-pagination>
         </div>
       </div>
-      
+
       <div slot="footer" class="dialog-footer">
         <el-button @click="isShowDialog = false">关 闭</el-button>
       </div>
@@ -761,4 +761,4 @@ export default {
   ::v-deep input[type='number'] {
     -moz-appearance: textfield;
   }
-</style>
+</style>

+ 3 - 3
src/views/supply/engin/components/home_return.vue

@@ -120,7 +120,7 @@
         <el-table-column align="center" label="物料代码" prop="materialOldNumber" 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="price" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="工程登录数量" prop="enginNum" min-width="120" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
@@ -166,7 +166,7 @@
         </el-col>
       </el-row>
     </div>
-    
+
     <div class="page-footer">
       <div class="footer" :class="classObj">
         <el-button type="primary" @click="clickSubmitForm()">确定退订</el-button>
@@ -299,4 +299,4 @@ export default {
       padding-left: 10px;
     }
   }
-</style>
+</style>

+ 2 - 1
src/views/supply/engin/engin_list.vue

@@ -93,10 +93,11 @@
             <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="projectName" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="使用单位" prop="useUnit" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="安装地址" prop="installAddress" 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="totalAmount" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="制表人" prop="createName" min-width="100" show-overflow-tooltip></el-table-column>

+ 151 - 110
src/views/supply/pickup/check.vue

@@ -1,129 +1,145 @@
 <template>
   <div class="app-container">
     
-    <div class="main-title">
-      <div class="title">仓库提货确认</div>
-    </div>
+    <div v-show="!isShowPrint">
+      <div class="main-title">
+        <div class="title">仓库提货确认</div>
+      </div>
 
-    <div>
-      <el-form ref="screenForm" :model="screenForm" label-width="96px" size="small" label-position="right">
-        <el-row :gutter="20">
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="提货人手机号" prop="phone">
-              <el-input v-model="screenForm.phone" placeholder="请输入提货人手机号"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="3">
-            <el-button size="small" type="primary" @click="getCode" :disabled="!screenForm.phone || countDown != 60">{{countDown == 60 ? getCodeText : '重新获取('+countDown+'s)'}}</el-button>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="8">
-            <el-form-item label="验证码" prop="code">
-              <el-input v-model="screenForm.code" placeholder="请输入验证码"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="3">
-            <el-button size="small" type="primary" :disabled="!screenForm.phone || !screenForm.code" @click="getPickupManInfo">确 认</el-button>
-          </el-col>
-        </el-row>
-        <el-row :gutter="20">
-          <el-col :xs="24" :sm="12" :lg="9">
-            <el-form-item label="提货人姓名" prop="name">
-              <el-input v-model="screenForm.name" placeholder="请通过手机验证获取" readonly></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="8">
-            <el-form-item label="提货人身份证" prop="idCard">
-              <el-input v-model="screenForm.idCard" placeholder="请通过手机验证获取" readonly></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="3">
-            <el-button size="small" type="primary" @click="getList">查 询</el-button>
-          </el-col>
-        </el-row>
-        <el-row :gutter="20">
-          <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="0">未打印</el-radio-button>
-                <el-radio-button label="1">已打印</el-radio-button>
-              </el-radio-group>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-    </div>
+      <div>
+        <el-form ref="screenForm" :model="screenForm" label-width="96px" size="small" label-position="right">
+          <el-row :gutter="20">
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="提货人手机号" prop="phone">
+                <el-input v-model="screenForm.phone" placeholder="请输入提货人手机号"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="3">
+              <el-button size="small" type="primary" @click="getCode" :disabled="!screenForm.phone || countDown != 60">{{countDown == 60 ? getCodeText : '重新获取('+countDown+'s)'}}</el-button>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="8">
+              <el-form-item label="验证码" prop="code">
+                <el-input v-model="screenForm.code" placeholder="请输入验证码"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="3">
+              <el-button size="small" type="primary" :disabled="!screenForm.phone || !screenForm.code" @click="getPickupManInfo">确 认</el-button>
+            </el-col>
+          </el-row>
+          <el-row :gutter="20">
+            <el-col :xs="24" :sm="12" :lg="9">
+              <el-form-item label="提货人姓名" prop="name">
+                <el-input v-model="screenForm.name" placeholder="请通过手机验证获取" readonly></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="8">
+              <el-form-item label="提货人身份证" prop="idCard">
+                <el-input v-model="screenForm.idCard" placeholder="请通过手机验证获取" readonly></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="3">
+              <el-button size="small" type="primary" @click="getList">查 询</el-button>
+            </el-col>
+          </el-row>
+          <el-row :gutter="20">
+            <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="0">未打印</el-radio-button>
+                  <el-radio-button label="1">已打印</el-radio-button>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
 
-    <div class="main-title">
-      <div class="title">提货单</div>
-    </div>
+      <div class="main-title">
+        <div class="title">提货单</div>
+      </div>
 
-    <div class="mymain-container">
-      <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="状态" min-width="160" show-overflow-tooltip>
-            <template slot-scope="scope">
-              {{ scope.row.printNum ? '已打单':'未打单' }}
-            </template>
-          </el-table-column>
-          <el-table-column align="center" label="信息密钥" prop="informationKey" min-width="180" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="预约日期" prop="pickTime" min-width="120" show-overflow-tooltip>
-            <template slot-scope="scope">
-              {{ scope.row.pickTime | dateToDayFilter }}
-            </template>
-          </el-table-column>
-          <el-table-column align="center" label="提货时段" min-width="100" show-overflow-tooltip>
-            <template slot-scope="scope">
-              {{ scope.row.pickStatus == '1' ? '上午':'下午' }}
-            </template>
-          </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="invoiceOrderId" min-width="180" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="120" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="产品大类" prop="mainName" min-width="120" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="产品编码" prop="materialCode" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="单位" prop="unit" min-width="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="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="payRebateAmount" min-width="120" 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="correspondName" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="提货方式" prop="pickType" min-width="100" show-overflow-tooltip>
-            <template slot-scope="scope">
-              {{ scope.row.pickType == '1' ? '自提':'物流快递' }}
-            </template>
-          </el-table-column>
-          <el-table-column align="center" label="提货人/物流公司" prop="takerName" min-width="160" show-overflow-tooltip>
-            <template slot-scope="scope">
-              {{ scope.row.pickType == '1' ? scope.row.takerName:scope.row.pickLogistics }}
-            </template>
-          </el-table-column>
-        </el-table>
+      <div class="mymain-container">
+        <div class="table">
+          <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe @selection-change="handleSelectionChange">
+            <el-table-column align="center" type="selection" width="55"></el-table-column>
+            <el-table-column align="center" label="状态" min-width="100" show-overflow-tooltip>
+              <template slot-scope="scope">
+                {{ scope.row.printNum ? '已打单(' + scope.row.printNum + ')' : '未打单' }}
+              </template>
+            </el-table-column>
+            <el-table-column align="center" label="信息密钥" prop="informationKey" min-width="180" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="预约日期" prop="pickTime" min-width="120" show-overflow-tooltip>
+              <template slot-scope="scope">
+                {{ scope.row.pickTime | dateToDayFilter }}
+              </template>
+            </el-table-column>
+            <el-table-column align="center" label="提货时段" min-width="100" show-overflow-tooltip>
+              <template slot-scope="scope">
+                {{ scope.row.pickStatus == '1' ? '上午':'下午' }}
+              </template>
+            </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="invoiceOrderId" min-width="180" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="120" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="产品大类" prop="mainName" min-width="120" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="产品编码" prop="materialCode" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="单位" prop="unit" min-width="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="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="payRebateAmount" min-width="120" 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="correspondName" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="提货方式" prop="pickType" min-width="100" show-overflow-tooltip>
+              <template slot-scope="scope">
+                {{ scope.row.pickType == '1' ? '自提':'物流快递' }}
+              </template>
+            </el-table-column>
+            <el-table-column align="center" label="提货人/物流公司" prop="takerName" min-width="160" show-overflow-tooltip>
+              <template slot-scope="scope">
+                {{ scope.row.pickType == '1' ? scope.row.takerName:scope.row.pickLogistics }}
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
       </div>
-    </div>
-    <div class="pagination clearfix">
-      <div class="fr">
-        <el-pagination
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-          :current-page="currentPage"
-          :page-sizes="[10, 20, 30, 50]"
-          :page-size="10"
-          layout="total, sizes, prev, pager, next, jumper"
-          :total="listTotal">
-        </el-pagination>
+      <div class="pagination clearfix">
+        <div class="fr">
+          <el-pagination
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+            :current-page="currentPage"
+            :page-sizes="[10, 20, 30, 50]"
+            :page-size="10"
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="listTotal">
+          </el-pagination>
+        </div>
+      </div>
+
+      <div class="page-footer">
+        <div class="footer" :class="classObj">
+          <el-button type="primary" @click="printData" :disabled="multipleSelection.length < 1">打印发货单</el-button>
+        </div>
       </div>
+
     </div>
 
+    <PickupPrint :listItem="queryItem" v-if="isShowPrint" @backListFormDetail="backList" />
+
   </div>
 </template>
 
 <script>
-import { getPickupList, getCode, getPickupManInfo } from "@/api/supply/pickup";
+import { getPickupList, getCode, getPickupManInfo, addPrint } from "@/api/supply/pickup";
+import PickupPrint from "@/views/supply/pickup/components/pickup_print";
 
 export default {
+  components: {
+    PickupPrint
+  },
   data() {
     return {
       currentPage: 1, // 当前页码
@@ -144,6 +160,11 @@ export default {
       getCodeText: '获取验证码',
       countDown: 60,
 			timer: null,
+
+      multipleSelection: [],
+
+      queryItem: {},
+      isShowPrint: false,
     }
   },
 
@@ -225,6 +246,26 @@ export default {
       this.currentPage = val;
       this.getList();
     },
+
+    backList() {
+      this.queryItem = {};
+      this.isShowPrint = false;
+    },
+
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+
+    // 点击打印
+    printData() {
+      // if(!item.printNum) {
+        // this.queryItem = item;
+        this.isShowPrint = true;
+        // addPrint({ids: item.id}).then(res => {
+
+        // })
+      // }
+    },
   }
 }
 </script>

+ 56 - 21
src/views/supply/pickup/components/pickup_form.vue

@@ -81,15 +81,15 @@
 
     <div class="mymain-container">
       <div class="table">
-        <el-table v-loading="listLoading" :data="deliverList" element-loading-text="Loading" border fit highlight-current-row stripe @selection-change="handleSelectionChange">
+        <el-table ref="table" v-loading="listLoading" :data="deliverList" element-loading-text="Loading" border fit highlight-current-row stripe @select="handleSelect">
           <el-table-column align="center" type="selection" width="55"></el-table-column>
-          <el-table-column align="center" label="发货申请单" prop="invoiceOrderId" min-width="180" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="发货申请单" prop="invoiceId" min-width="180" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="单据日期" prop="orderTime" min-width="120" show-overflow-tooltip>
             <template slot-scope="scope">
               {{ scope.row.orderTime | dateToDayFilter }}
             </template>
           </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="mainOrderId" min-width="200" 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="saleTypeName" min-width="160" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="产品编码" prop="materialCode" min-width="160" show-overflow-tooltip></el-table-column>
@@ -114,9 +114,8 @@
 </template>
 
 <script>
-import { getWarehouseList, getDeliverList, getPickupManList, getPickupCarList, getCompanyList, addPickupBook } from "@/api/supply/pickup";
+import { getWarehouseList, getDeliverList, getPickupManList, getPickupCarList, getCompanyList, addPickupBook, editPickupBook, getDetail } from "@/api/supply/pickup";
 import { getDictList } from "@/api/common";
-import { findElem } from "@/utils/util";
 
 export default {
   name: 'PickupForm',
@@ -178,6 +177,9 @@ export default {
     this.getPickupManList();
     this.getPickupCarList();
     this.getCompanyList();
+    if(this.listItem) {
+      this.getDetail();
+    }
   },
 
   methods: {
@@ -195,6 +197,23 @@ export default {
       this.$emit('backListFormDetail');
     },
 
+    // 获取详情
+    getDetail() {
+      getDetail({id: this.listItem.id}).then(res => {
+        let data = res.data;
+        this.mainForm.warehouse = data.correspondId;
+        this.mainForm.date = data.pickTime.slice(0, 10);
+        this.mainForm.timeSlot = Number(data.pickStatus);
+        this.mainForm.pickupWay = String(data.pickType);
+        this.mainForm.pickupMan = data.takerId;
+        this.mainForm.pickupCar = data.takerCarId;
+        this.mainForm.company = data.pickLogistics;
+        this.mainForm.remark = data.remark;
+
+        this.deliverList = data.invoicePickBeans;
+      })
+    },
+
     // 获取仓库列表
     getWarehouseList() {
       getWarehouseList({
@@ -254,8 +273,14 @@ export default {
       })
     },
 
-    handleSelectionChange(val) {
-      this.tableSelection = val;
+    handleSelect(selection, row) {
+      this.$refs.table.toggleRowSelection(row);
+      this.deliverList.forEach(item => {
+        if (item.invoiceId === row.invoiceId) {
+          this.$refs.table.toggleRowSelection(item);
+        }
+      })
+      this.tableSelection = this.$refs.table.selection;
     },
 
     clickSubmitForm() {
@@ -264,19 +289,18 @@ export default {
           if(this.tableSelection.length < 1) {
             return this.$errorMsg('请选择发货申请单');
           }
-
           this.formLoading = true;
-          let takerName = '';
-          if(this.mainForm.pickupMan) {
-            let index = findElem(this.pickupManList, 'id', this.mainForm.pickupMan);
-            takerName = this.pickupManList[index].takerName;
-          }
+
+          let takerName = this.pickupManList.find(o => o.id == this.mainForm.pickupMan).takerName;
+          let correspondName = this.warehouseList.find(o => o.id == this.mainForm.warehouse).name;
+
           let orderList = [];
           this.tableSelection.forEach(item => {
             orderList.push(item.invoiceOrderId);
           });
           let params = {
-            stockName: this.mainForm.warehouse,
+            correspondId: this.mainForm.warehouse,
+            correspondName,
             pickTime: this.mainForm.date + ' 00:00:00',
             pickStatus: Number(this.mainForm.timeSlot),
             pickType: Number(this.mainForm.pickupWay),
@@ -291,13 +315,24 @@ export default {
           if(this.mainForm.pickupWay == '2') {
             params.pickLogistics = this.mainForm.company;
           }
-          addPickupBook(params).then(res => {
-            this.$successMsg('提交成功');
-            this.goBack();
-            this.$parent.getList();
-          }).finally(res => {
-            this.formLoading = false;
-          })
+          if(this.listItem) {
+            params.id = this.listItem.id;
+            editPickupBook(params).then(res => {
+              this.$successMsg('提交成功');
+              this.goBack();
+              this.$parent.getList();
+            }).finally(res => {
+              this.formLoading = false;
+            })
+          }else {
+            addPickupBook(params).then(res => {
+              this.$successMsg('提交成功');
+              this.goBack();
+              this.$parent.getList();
+            }).finally(res => {
+              this.formLoading = false;
+            })
+          }
         }
       })
     },

+ 152 - 0
src/views/supply/pickup/components/pickup_print.vue

@@ -0,0 +1,152 @@
+<template>
+  <div class="detail-container">
+    <div id="printMe">
+      <div class="print-table-1">
+        <el-row :gutter="0">
+          <el-col :span="6" class="item">
+            <div class="label">经销商编码:</div>
+            <div class="value">{{detailData.id}}</div>
+          </el-col>
+          <el-col :span="6" class="item">
+            <div class="label">出库日期:</div>
+            <div class="value">{{detailData.createBy}}</div>
+          </el-col>
+          <el-col :span="6" class="item">
+            <div class="label">仓库:</div>
+            <div class="value">{{detailData.retreatTime}}</div>
+          </el-col>
+          <el-col :span="6" class="item">
+            <div class="label">信息密钥:</div>
+            <div class="value">{{detailData.customerNumber}}</div>
+          </el-col>
+          <el-col :span="24" class="item">
+            <div class="label">经销商:</div>
+            <div class="value">{{detailData.customerName}}</div>
+          </el-col>
+        </el-row>
+      </div>
+
+      <div class="table" style="margin-top: 20px">
+        <el-table :data="detailData.retreatDocumentOrder" element-loading-text="Loading" border fit highlight-current-row stripe>
+          <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
+          <el-table-column align="center" label="订单号" prop="mainOrderId" min-width="200" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="发货单号" prop="invoiceId" min-width="180" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="仓库名称" prop="correspondName" min-width="120" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="产品编号" prop="materialCode" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="数量" prop="num" 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="afterTaxPrice" min-width="100" show-overflow-tooltip></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="payAmount" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="税率(%)" prop="tax" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="使用返利金额" prop="payRebateAmount" min-width="120" 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="status" min-width="100" 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="serviceName" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
+        </el-table>
+      </div>
+    </div>
+    
+    <div class="page-footer">
+      <div class="footer" :class="classObj">
+        <el-button  type="primary" icon="el-icon-printer" v-print="printObj">打 印</el-button>
+        <el-button @click="goBack">关 闭</el-button>
+      </div>
+    </div>
+
+  </div>
+</template>
+
+<script>
+import print from 'vue-print-nb'
+import { getDetail } from "@/api/supply/return";
+
+export default {
+  name: 'ReturnDetail',
+  componentName: 'ReturnDetail',
+  props: ['listItem'],
+  directives: {
+    print
+  },
+  data() {
+    return {
+      printObj: {
+        id: 'printMe'
+      },
+      detailData: {},
+    }
+  },
+
+  computed: {
+    sidebar() {
+      return this.$store.state.app.sidebar
+    },
+    classObj() {
+      return {
+        hideSidebar: !this.sidebar.opened,
+        openSidebar: this.sidebar.opened
+      }
+    },
+  },
+
+  created() {
+    this.getDetail();
+  },
+
+  methods: {
+    // 返回列表
+    goBack() {
+      this.$emit('backListFormDetail');
+    },
+
+    // 获取详情
+    getDetail() {
+      getDetail({id: this.listItem.id}).then(res => {
+        this.detailData = res.data;
+      })
+    },
+  }
+}
+</script>
+
+<style scoped lang="scss">
+  .detail-container {
+    width: 100%;
+    height: 100%;
+  }
+  .print-table-1 {
+    .item {
+      display: flex;
+      .label {
+        width: 120px;
+        height: 40px;
+        display: flex;
+        align-items: center;
+        padding: 0 10px;
+        box-sizing: border-box;
+        font-size: 14px;
+        color: #333333;
+      }
+      .value {
+        flex: 1;
+        height: 40px;
+        display: flex;
+        align-items: center;
+        padding: 0 10px;
+        box-sizing: border-box;
+        font-size: 14px;
+        color: #333333;
+        input {
+          border: none;
+          padding: 0;
+        }
+      }
+    }
+  }
+</style>

+ 8 - 3
src/views/supply/pickup/pickup_list.vue

@@ -79,9 +79,9 @@
                 {{ scope.row.pickType == '1' ? '自提':'物流快递' }}
               </template>
             </el-table-column>
-            <el-table-column align="center" label="单据日期" prop="orderTime" min-width="120" show-overflow-tooltip>
+            <el-table-column align="center" label="单据日期" prop="theTime" min-width="120" show-overflow-tooltip>
               <template slot-scope="scope">
-                {{ scope.row.orderTime | dateToDayFilter }}
+                {{ scope.row.theTime | dateToDayFilter }}
               </template>
             </el-table-column>
             <el-table-column align="center" label="销售订单号" prop="mainOrderId" min-width="180" show-overflow-tooltip></el-table-column>
@@ -90,8 +90,13 @@
             <el-table-column align="center" label="产品编号" prop="materialCode" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="提货总数量" prop="number" 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="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="操作" width="100" fixed="right">
+              <template slot-scope="scope">
+                <el-button type="text" @click="toForm(scope.row)">编辑</el-button>
+              </template>
+            </el-table-column>
           </el-table>
         </div>
       </div>

+ 34 - 17
src/views/supply/pickup/statistics.vue

@@ -24,109 +24,126 @@
         <el-col :span="8">
           <el-card shadow="hover">
             <div class="title">每日预约出货单</div>
-            <div class="num"><span>123</span>(单)</div>
+            <div class="num"><span>{{detailData.pickOrderNum || 0}}</span>(单)</div>
           </el-card>
         </el-col>
         <el-col :span="8">
           <el-card shadow="hover">
             <div class="title">每日提货货品种类</div>
-            <div class="num"><span>123</span>(种)</div>
+            <div class="num"><span>{{detailData.pickCategoryNum || 0}}</span>(种)</div>
           </el-card>
         </el-col>
         <el-col :span="8">
           <el-card shadow="hover">
             <div class="title">每日预约经销商</div>
-            <div class="num"><span>123</span>(家)</div>
+            <div class="num"><span>{{detailData.pickCustomNum || 0}}</span>(家)</div>
           </el-card>
         </el-col>
         <el-col :span="8">
           <el-card shadow="hover">
             <div class="title">每日提货经销商</div>
-            <div class="num"><span>123</span>(家)</div>
+            <div class="num"><span>{{detailData.pickOrderCustomNum || 0}}</span>(家)</div>
           </el-card>
         </el-col>
         <el-col :span="8">
           <el-card shadow="hover">
             <div class="title">每日出库货品种类</div>
-            <div class="num"><span>123</span>(种)</div>
+            <div class="num"><span>{{detailData.pickCategoryNum || 0}}</span>(种)</div>
           </el-card>
         </el-col>
         <el-col :span="8">
           <el-card shadow="hover">
             <div class="title">每日出库货品台数</div>
-            <div class="num"><span>123</span>(台)</div>
+            <div class="num"><span>{{detailData.shipOrderNum || 0}}</span>(台)</div>
           </el-card>
         </el-col>
         <el-col :span="8">
           <el-card shadow="hover">
             <div class="title">每日出库家用空调货品单数</div>
-            <div class="num"><span>123</span>(单)</div>
+            <div class="num"><span>{{detailData.shipHomeConditionerNum || 0}}</span>(单)</div>
           </el-card>
         </el-col>
         <el-col :span="8">
           <el-card shadow="hover">
             <div class="title">每日出库商用空调货品单数</div>
-            <div class="num"><span>123</span>(单)</div>
+            <div class="num"><span>{{detailData.shipTradeConditionerNum || 0}}</span>(单)</div>
           </el-card>
         </el-col>
         <el-col :span="8">
           <el-card shadow="hover">
             <div class="title">每日出库生活电器品单数</div>
-            <div class="num"><span>123</span>(单)</div>
+            <div class="num"><span>{{detailData.pickLifeNum || 0}}</span>(单)</div>
           </el-card>
         </el-col>
         <el-col :span="8">
           <el-card shadow="hover">
             <div class="title">每日出库家用空调货品台数</div>
-            <div class="num"><span>123</span>(台)</div>
+            <div class="num"><span>{{detailData.shipHomeConditionerTower || 0}}</span>(台)</div>
           </el-card>
         </el-col>
         <el-col :span="8">
           <el-card shadow="hover">
             <div class="title">每日出库商用空调货品台数</div>
-            <div class="num"><span>123</span>(台)</div>
+            <div class="num"><span>{{detailData.shipTradeConditionerTower || 0}}</span>(台)</div>
           </el-card>
         </el-col>
         <el-col :span="8">
           <el-card shadow="hover">
             <div class="title">每日出库生活电器品台数</div>
-            <div class="num"><span>123</span>(台)</div>
+            <div class="num"><span>{{detailData.pickLifeTower || 0}}</span>(台)</div>
           </el-card>
         </el-col>
         <el-col :span="8">
           <el-card shadow="hover">
             <div class="title">每日出库家用空调货品金额</div>
-            <div class="num"><span>123</span>(元)</div>
+            <div class="num"><span>{{detailData.shipHomeConditionerPrice || 0}}</span>(元)</div>
           </el-card>
         </el-col>
         <el-col :span="8">
           <el-card shadow="hover">
             <div class="title">每日出库商用空调货品金额</div>
-            <div class="num"><span>123</span>(元)</div>
+            <div class="num"><span>{{detailData.shipTradeConditionerPrice || 0}}</span>(元)</div>
           </el-card>
         </el-col>
         <el-col :span="8">
           <el-card shadow="hover">
             <div class="title">每日出库生活电器品金额</div>
-            <div class="num"><span>123</span>(元)</div>
+            <div class="num"><span>{{detailData.pickLifePrice || 0}}</span>(元)</div>
           </el-card>
         </el-col>
       </el-row>
     </div>
 
-
   </div>
 </template>
 
 <script>
+import { getStatistics } from "@/api/supply/pickup";
+
 export default {
   data() {
     return {
-      screenForm: { // 筛选表单数据
+      screenForm: {
         date: '',
       },
+      detailData: {},
     }
   },
+
+  created() {
+    this.getDetail();
+  },
+
+  methods: {
+    getDetail() {
+      getStatistics({
+        startTime: this.screenForm.date ? this.screenForm.date[0] : '',
+        endTime: this.screenForm.date ? this.screenForm.date[1] : '',
+      }).then(res => {
+        this.detailData = res.data;
+      })
+    }
+  }
 }
 </script>
 

+ 26 - 15
src/views/supply/policy/components/retail_detail.vue

@@ -141,22 +141,19 @@
           min-width="100"
           show-overflow-tooltip
         ></el-table-column>
-        <el-table-column
+         <el-table-column
           align="center"
           label="返利类型"
-          prop="customerWalletName2"
-          min-width="200"
+          prop="rebateWallets"
+          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>
+        <template slot-scope="scope">
+          <el-tag type="success" size="small" v-for="item in scope.row.rebateWallets">
+          {{item.name}}
+          </el-tag>
+
+        </template>
         </el-table-column>
         <el-table-column
           align="center"
@@ -172,13 +169,20 @@
           min-width="100"
           show-overflow-tooltip
         ></el-table-column>
-        <el-table-column
+       <el-table-column
           align="center"
           label="现金钱包"
-          prop="customerWalletName"
+          prop="wallets"
           min-width="100"
           show-overflow-tooltip
-        ></el-table-column>
+        >
+          <template slot-scope="scope">
+          <el-tag type="success" size="small" v-for="item in scope.row.wallets">
+          {{item.name}}
+          </el-tag>
+
+        </template>
+        </el-table-column>
         <el-table-column
           align="center"
           label="金额"
@@ -408,11 +412,18 @@
             show-overflow-tooltip
           >
             <template slot-scope="scope">
+
+              <template v-if="scope.row.isDirectTransfer == '是'">
               <el-input
                 v-model="scope.row.adjustNum"
                 size="small"
                 type="number"
               ></el-input>
+              </template>
+              <template v-else>
+                {{scope.row.adjustNum || 0 }}
+              </template>
+
             </template>
           </el-table-column>
           <el-table-column

+ 19 - 5
src/views/supply/policy/components/retail_examine.vue

@@ -122,10 +122,17 @@
         <el-table-column
           align="center"
           label="返利类型"
-          prop="walletRebateName"
+          prop="rebateWallets"
           min-width="100"
           show-overflow-tooltip
-        ></el-table-column>
+        >
+        <template slot-scope="scope">
+          <el-tag type="success" size="small" v-for="item in scope.row.rebateWallets">
+          {{item.name}}
+          </el-tag>
+
+        </template>
+        </el-table-column>
         <el-table-column
           align="center"
           label="返利金额"
@@ -136,17 +143,24 @@
         <el-table-column
           align="center"
           label="格力折扣"
-          prop="deductAmount"
+          prop="discAmount"
           min-width="100"
           show-overflow-tooltip
         ></el-table-column>
         <el-table-column
           align="center"
           label="现金钱包"
-          prop="walletRebateName2"
+          prop="wallets"
           min-width="100"
           show-overflow-tooltip
-        ></el-table-column>
+        >
+          <template slot-scope="scope">
+          <el-tag type="success" size="small" v-for="item in scope.row.wallets">
+          {{item.name}}
+          </el-tag>
+
+        </template>
+        </el-table-column>
         <el-table-column
           align="center"
           label="实付金额"

+ 3 - 5
src/views/supply/policy/components/retail_form2.vue

@@ -172,9 +172,9 @@
           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"
@@ -833,7 +833,7 @@ export default {
     },
     hanlePopData() {
       this.multipleData.push(this.multipleSelection);
-      if (this.multipleData.length) {
+      if (this.multipleData.length && this.multipleSelection.length) {
         let arrData = [];
         console.log(this.multipleData, "datga");
         for (let i = 0; i < this.multipleData.length; i++) {
@@ -844,8 +844,6 @@ export default {
           }else{
             this.goodsList = arrData
           }
-
-         console.log(this.goodsList,'jjjj');
         this.goodsList.forEach((item) => {
           this.$set(item, "status1", "");
           this.$set(item, "status2", "");

+ 28 - 11
src/views/supply/policy/components/retail_return.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="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="deductAmount" 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="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="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">
@@ -69,7 +69,12 @@
           </template>
         </el-table-column>
         <el-table-column align="center" label="直调数量" prop="directTransferQty" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="原订单数量" prop="oldQty" 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="tdQty" min-width="100" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <el-input v-model="scope.row.tdQty" size="small" type="number"></el-input>
+          </template>
+        </el-table-column>
         <el-table-column align="center" label="备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="税率" prop="tax" min-width="100" show-overflow-tooltip></el-table-column>
       </el-table>
@@ -88,10 +93,10 @@
           <div class="label">退订日期</div>
           <div class="value">{{nowDate}}</div>
         </el-col>
-        <el-col :span="24" class="item">
+        <!-- <el-col :span="24" class="item">
           <div class="label">退订说明</div>
           <div class="value"><el-input v-model="mainForm.remark" placeholder="请输入内容"></el-input></div>
-        </el-col>
+        </el-col> -->
       </el-row>
     </div>
 
@@ -106,7 +111,7 @@
 </template>
 
 <script>
-import { getDetail, returnData } from "@/api/supply/policy";
+import { getDetail, returnData } from "@/api/supply/retail";
 
 export default {
   name: 'RetailReturn',
@@ -131,7 +136,6 @@ export default {
 
       formLoading: false,
       mainForm: {
-        status: true,
         remark: '',
       }
     }
@@ -181,13 +185,26 @@ export default {
       })
     },
 
-    // 提交审批
+    // 提交
     clickSubmitForm() {
+      for(let i=0; i<this.detailData.retailOrderItemList.length; i++) {
+        if(this.detailData.retailOrderItemList[i].tdQty === '' || this.detailData.retailOrderItemList[i].tdQty === null) {
+          this.$errorMsg('请填写退订数量');
+          return;
+        }
+        if(Number(this.detailData.retailOrderItemList[i].tdQty) < 0) {
+          this.$errorMsg('退订数量不可为负数');
+          return;
+        }
+      }
+
       this.formLoading = true;
       returnData({
         id: this.listItem.id,
-        examineStatus: this.mainForm.status ? 'OK' : 'FAIL',
-        examineRemark: this.mainForm.remark,
+        type: 1, // 1:普通零售单,2:政策零售单
+        // examineRemark: this.mainForm.remark,
+        theTime: this.detailData.theTime,
+        retailOrderItemList: this.detailData.retailOrderItemList
       }).then(res => {
         this.$successMsg('退订成功');
         this.goBack();

+ 1 - 1
src/views/supply/policy/policy_list.vue

@@ -170,7 +170,7 @@
             <el-table-column
               align="center"
               label="销售政策说明"
-              prop="policyRemark"
+              prop="policyTitle"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>

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

@@ -167,7 +167,7 @@
         <el-table-column align="center" label="发货数量" prop="hasSendQty" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="直调数量" prop="adjustNum" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
-            <el-input v-model="scope.row.adjustNum" size="small" type="number"></el-input>
+            <el-input v-model="scope.row.adjustNum" size="small" type="number" :disabled="!scope.row.isDirectTransfer"></el-input>
           </template>
         </el-table-column>
         <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
@@ -299,7 +299,7 @@ export default {
       this.$refs.deliverForm.validate((valid) => {
         if (valid) {
           for(let i=0; i<this.goodsList.length; i++) {
-            if(!this.goodsList[i].adjustNum) {
+            if(!this.goodsList[i].adjustNum && this.goodsList[i].isDirectTransfer) {
               this.$errorMsg('请输入直调数量');
               return;
             }
@@ -307,7 +307,7 @@ export default {
           let goodsList = this.goodsList.map((item) => {
             return {
               itemId: item.id,
-              qty: item.adjustNum,
+              qty: item.adjustNum || 0,
             }
           });
           let params = {

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

@@ -411,7 +411,7 @@ export default {
           let oldItem = oldGoodsList[i]
           for(let j = 0; j < newGoodsList.length; j++) {
             let newItem = newGoodsList[j]
-            if(newItem.materialId === oldItem.materialId){
+            if(newItem.id === oldItem.id){
               newGoodsList[j].selected = true;
               break;
             }
@@ -499,7 +499,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].id == newArr[j].id){ // 让allArr数组对象的内容与新数组的内容作比较,相同的话,改变标记为false
             flag = false;
           }
         }

+ 8 - 7
src/views/supply/sales/components/sales_detail.vue

@@ -10,7 +10,7 @@
         <el-row :gutter="0">
           <el-col :span="8" class="item">
             <div class="label">出库单号</div>
-            <div class="value">{{detailData.retailOrderId}}</div>
+            <div class="value">{{detailData.id}}</div>
           </el-col>
           <el-col :span="8" class="item">
             <div class="label">单据日期</div>
@@ -18,7 +18,7 @@
           </el-col>
           <el-col :span="8" class="item">
             <div class="label">单据状态</div>
-          <div class="value">{{detailData.status | statusFilter}}</div>
+          <div class="value">{{detailData.examineStatus | statusFilter}}</div>
           </el-col>
           <el-col :span="8" class="item">
             <div class="label">仓库</div>
@@ -51,7 +51,7 @@
           <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="数量" prop="approvalNumber" 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="totalAmount" 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>
       </div>
 
@@ -66,7 +66,7 @@
           </el-col>
           <el-col :xs="12" :sm="8" :lg="8" class="item">
             <div class="label">审批结果</div>
-            <div class="value">{{detailData.status | statusFilter}}</div>
+            <div class="value">{{detailData.examineStatus | statusFilter}}</div>
           </el-col>
           <el-col :xs="12" :sm="8" :lg="8" class="item">
             <div class="label">审批时间</div>
@@ -99,9 +99,10 @@ export default {
   filters: {
     statusFilter(val) {
       const statusList = [
-        { label: '待审核', value: 1 },
-        { label: '审核通过', value: 2 },
-        { label: '审核驳回', value: 3 },
+        { label: '已保存', value: 'SAVE' },
+        { label: '待审核', value: 'WAIT' },
+        { label: '审核通过', value: 'OK' },
+        { label: '审核驳回', value: 'FAIL' },
       ];
       let obj = statusList.find(o => o.value == val);
       return obj ? obj.label : ''

+ 56 - 30
src/views/supply/sales/components/sales_examine.vue

@@ -9,7 +9,7 @@
       <el-row :gutter="0">
         <el-col :span="8" class="item">
           <div class="label">出库单号</div>
-          <div class="value">{{detailData.retailOrderId}}</div>
+          <div class="value">{{detailData.id}}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">单据日期</div>
@@ -17,7 +17,7 @@
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">单据状态</div>
-        <div class="value">{{detailData.status | statusFilter}}</div>
+        <div class="value">{{detailData.examineStatus | statusFilter}}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">仓库</div>
@@ -50,7 +50,7 @@
         <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="数量" prop="approvalNumber" 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="totalAmount" 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>
     </div>
 
@@ -64,13 +64,8 @@
           <div class="value">{{userName}}</div>
         </el-col>
         <el-col :span="12" class="item">
-          <div class="label">审批结果</div>
-          <div class="value">
-            <el-radio-group v-model="examineForm.status">
-              <el-radio :label="true">通过</el-radio>
-              <el-radio :label="false">驳回</el-radio>
-            </el-radio-group>
-          </div>
+          <div class="label">审批日期</div>
+          <div class="value">{{getDate()}}</div>
         </el-col>
         <el-col :span="24" class="item">
           <div class="label">审批说明</div>
@@ -83,12 +78,9 @@
     
     <div class="page-footer">
       <div class="footer" :class="classObj">
-        <el-button type="primary" @click="clickSubmitForm" :loading="formLoading">{{ formLoading ? '提交中 ...' : '提 交' }}</el-button>
-        <el-popconfirm
-          title="确定关闭吗?"
-          @onConfirm="goBack"
-          style="margin-left: 10px;"
-        >
+        <el-button type="primary" @click="clickSubmitForm('OK')">审批通过</el-button>
+        <el-button type="warning" @click="clickSubmitForm('FAIL')">审批驳回</el-button>
+        <el-popconfirm title="确定关闭吗?" @onConfirm="goBack" style="margin-left: 10px;">
           <el-button slot="reference">关 闭</el-button>
         </el-popconfirm>
       </div>
@@ -104,13 +96,24 @@ export default {
   name: 'SalesDetail',
   componentName: 'SalesDetail',
   props: ['listItem'],
+  filters: {
+    statusFilter(val) {
+      const statusList = [
+        { label: '已保存', value: 'SAVE' },
+        { label: '待审核', value: 'WAIT' },
+        { label: '审核通过', value: 'OK' },
+        { label: '审核驳回', value: 'FAIL' },
+      ];
+      let obj = statusList.find(o => o.value == val);
+      return obj ? obj.label : ''
+    }
+  },
   data() {
     return {
       userName: JSON.parse(localStorage.getItem("supply_user")).nickName,
       detailData: {},
       formLoading: false,
       examineForm: {
-        status: true,
         remark: '',
       }
     }
@@ -133,6 +136,22 @@ export default {
   },
 
   methods: {
+    getDate() {
+      var date = new Date();
+      var seperator1 = "-";
+      var year = date.getFullYear();
+      var month = date.getMonth() + 1;
+      var strDate = date.getDate();
+      if (month >= 1 && month <= 9) {
+          month = "0" + month;
+      }
+      if (strDate >= 0 && strDate <= 9) {
+          strDate = "0" + strDate;
+      }
+      var currentdate = year + seperator1 + month + seperator1 + strDate;
+      return currentdate;
+    },
+
     // 返回列表
     goBack() {
       this.$emit('backListFormExamine');
@@ -146,19 +165,26 @@ export default {
     },
 
     // 提交审批
-    clickSubmitForm() {
-      this.formLoading = true;
-      examineData({
-        id: this.listItem.id,
-        status: this.examineForm.status ? 2 : 3,
-        approvalRemark: this.examineForm.remark,
-      }).then(res => {
-        this.$successMsg('审批成功');
-        this.goBack();
-        this.$parent.getList();
-      }).finally(res => {
-        this.formLoading = false;
-      })
+    clickSubmitForm(val) {
+      this.$confirm('此操作将审批订单, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        let params = {
+          id: this.listItem.id,
+          approvalRemark: this.examineForm.remark,
+          examineStatus: val,
+        };
+        this.formLoading = true;
+        examineData(params).then(res => {
+          this.$successMsg();
+          this.goBack();
+          this.$parent.getList();
+        }).finally(res => {
+          this.formLoading = false;
+        })
+      }).catch(() => {});
     },
   }
 }

+ 32 - 14
src/views/supply/sales/sales_list.vue

@@ -68,14 +68,14 @@
             <!-- <el-button size="small" type="warning" icon="el-icon-close">退单</el-button> -->
           </div>
           <div class="fr">
-            <ExportButton :exUrl="'admin/user/mch/export'" :exParams="exParams" />
+            <ExportButton :exUrl="'sale/order/export'" :exParams="exParams" />
           </div>
         </div>
         <div class="table">
           <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
-            <el-table-column align="center" label="状态" prop="status" min-width="100" show-overflow-tooltip>
+            <el-table-column align="center" label="状态" prop="examineStatus" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
-                {{scope.row.status | statusFilter}}
+                {{scope.row.examineStatus | statusFilter}}
               </template>
             </el-table-column>
             <el-table-column align="center" label="开票状态" prop="billStatus" min-width="100" show-overflow-tooltip>
@@ -83,21 +83,21 @@
                 {{scope.row.billStatus | billStatusFilter}}
               </template>
             </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="id" min-width="180" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="发货单号" prop="orderNo" min-width="180" 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="correspondName" 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="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="approvalNumber" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="单价" prop="price" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="订单金额" prop="totalAmount" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="备注" prop="remark" min-width="200" 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="remark" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="操作" width="120" fixed="right">
               <template slot-scope="scope">
                 <el-button type="text" @click="toDetail(scope.row)">详情</el-button>
-                <el-button type="text" @click="toExamine(scope.row)">审批</el-button>
+                <el-button type="text" @click="toExamine(scope.row)" v-if="scope.row.examineStatus === 'WAIT'">审批</el-button>
               </template>
             </el-table-column>
           </el-table>
@@ -125,7 +125,7 @@
 </template>
 
 <script>
-import { getList } from "@/api/supply/sales";
+import { getList, examineJudge } from "@/api/supply/sales";
 import SalesDetail from "@/views/supply/sales/components/sales_detail";
 import SalesExamine from "@/views/supply/sales/components/sales_examine";
 
@@ -165,9 +165,10 @@ export default {
         status: '',
       },
       statusList: [
-        { label: '待审核', value: 1 },
-        { label: '审核通过', value: 2 },
-        { label: '审核驳回', value: 3 },
+        { label: '已保存', value: 'SAVE' },
+        { label: '待审核', value: 'WAIT' },
+        { label: '审核通过', value: 'OK' },
+        { label: '审核驳回', value: 'FAIL' },
       ],
 
       queryItem: {},
@@ -258,6 +259,19 @@ export default {
       this.getList();
     },
 
+    // 判断是否可以审批
+    async examineJudge(item) {
+      // 获取页面模版
+      const result = await new Promise((resolve, reject)=>{
+        examineJudge({id: item.id}).then(res => {
+          resolve(res.data);
+        }).catch(res => {
+          resolve(0);
+        })
+      })
+      return result;
+    },
+
     // 进入详情
     toDetail(item) {
       this.queryItem = item;
@@ -265,7 +279,11 @@ export default {
     },
 
     // 进入审批
-    toExamine(item) {
+    async toExamine(item) {
+      const canExamine = await this.examineJudge(item);
+      if(!canExamine) {
+        return false;
+      }
       this.queryItem = item;
       this.isShowExamine = true;
     },