Просмотр исходного кода

Merge branch 'feature/Feature-supply' into develop

莫绍宝 3 лет назад
Родитель
Сommit
59a408696f

+ 18 - 0
src/api/supply/deliver.js

@@ -18,6 +18,24 @@ export function getDeliverDetail(params) {
   })
 }
 
+// 获取密码
+export function getPassword(params) {
+  return request({
+    url: '/ship/shipPassword',
+    method: 'post',
+    params
+  })
+}
+
+// 获取密码记录
+export function getPasswordRecord(params) {
+  return request({
+    url: '/ship/listShipPassword',
+    method: 'get',
+    params
+  })
+}
+
 // 获取列表 - 工程发货单
 export function getEnginList(params) {
   return request({

+ 27 - 9
src/api/supply/engin.js

@@ -18,7 +18,7 @@ export function getDetail(params) {
   })
 }
 
-// 获取列表
+// 工程信息单 - 获取列表
 export function getEnginList(params) {
   return request({
     url: '/engin-info-order/list',
@@ -27,7 +27,7 @@ export function getEnginList(params) {
   })
 }
 
-// 获取详情
+// 工程信息单 - 获取详情
 export function getEnginDetail(params) {
   return request({
     url: '/engin-info-order/detail',
@@ -36,7 +36,7 @@ export function getEnginDetail(params) {
   })
 }
 
-// 审批
+// 工程信息单 - 审批
 export function examineEngin(params) {
   return request({
     url: '/engin-info-order/examine',
@@ -54,7 +54,7 @@ export function getRetailProductList(params) {
   })
 }
 
-// 新增
+// 工程信息单 - 新增
 export function addEngin(params) {
   return request({
     url: '/engin-info-order/add',
@@ -63,7 +63,7 @@ export function addEngin(params) {
   })
 }
 
-// 编辑
+// 工程信息单 - 编辑
 export function editEngin(params) {
   return request({
     url: '/engin-info-order/edit',
@@ -72,7 +72,7 @@ export function editEngin(params) {
   })
 }
 
-// 提交审核
+// 工程信息单 - 提交审核
 export function submitEngin(params) {
   return request({
     url: '/engin-info-order/submit',
@@ -81,7 +81,7 @@ export function submitEngin(params) {
   })
 }
 
-// 申请
+// 工程信息单 - 申请
 export function applyEngin(params) {
   return request({
     url: '/engin-info-order/submit-on-list',
@@ -90,7 +90,7 @@ export function applyEngin(params) {
   })
 }
 
-// 撤回
+// 工程信息单 - 撤回
 export function withdrawEngin(params) {
   return request({
     url: '/engin-info-order/revoke',
@@ -99,11 +99,29 @@ export function withdrawEngin(params) {
   })
 }
 
-// 删除
+// 工程信息单 - 删除
 export function deleteEngin(params) {
   return request({
     url: '/engin-info-order/del',
     method: 'post',
     params
   })
+}
+
+// 工程订单 - 获取列表
+export function getOrderList(params) {
+  return request({
+    url: '/engin-order/list',
+    method: 'get',
+    params
+  })
+}
+
+// 工程订单 - 获取详情
+export function getOrderDetail(params) {
+  return request({
+    url: '/engin-order/detail',
+    method: 'get',
+    params
+  })
 }

+ 1 - 1
src/api/supply/pickup.js

@@ -30,7 +30,7 @@ export function getWarehouseList(params) {
 // 获取发货单列表
 export function getDeliverList(params) {
   return request({
-    url: '/pick/listShip',
+    url: '/pick/listInvoice',
     method: 'get',
     params
   })

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

@@ -159,7 +159,7 @@
 
 <script>
 import print from 'vue-print-nb'
-import { getDeliverDetail } from "@/api/supply/return";
+import { getDeliverDetail } from "@/api/supply/deliver";
 
 export default {
   name: 'DeliverDetail',

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

@@ -62,24 +62,26 @@
         </div>
         <div class="table">
           <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
-            <el-table-column align="center" label="发货单号" prop="shipOrderNo" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="发货日期" prop="shipTime" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="仓库" prop="stockName" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="发货单号" prop="id" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="发货日期" prop="orderTime" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="仓库" prop="correspondName" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="经销商" prop="customerName" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="产品名称" prop="productName" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="价税合计" prop="totalPrice" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="无税金额" prop="price" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
-                {{ scope.row.number * scope.row.price }}
+                {{ scope.row.qty * scope.row.price }}
               </template>
             </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="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="200" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="操作" width="120" fixed="right">
+            <el-table-column align="center" label="操作" width="200" fixed="right">
               <template slot-scope="scope">
                 <el-button type="text" @click="toDetail(scope.row)">详情</el-button>
+                <el-button type="text" @click="getPassword(scope.row.id)">获取密码</el-button>
+                <el-button type="text" @click="openShareDetail(scope.row.id)">密码记录</el-button>
               </template>
             </el-table-column>
           </el-table>
@@ -99,6 +101,39 @@
         </div>
       </div>
     </div>
+
+    <!-- 密码记录 -->
+    <el-dialog title="密码记录" :visible.sync="isShowDialog" :show-close="false" width="50%" :close-on-click-modal="false">
+      <div class="table" style="margin: 10px 0 20px;">
+        <el-table 
+          v-loading="dialogTable_listLoading" 
+          :data="dialogTable_dataList" 
+          element-loading-text="Loading" 
+          tooltip-effect="dark" 
+          style="width: 100%" 
+          max-height="270">
+          <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
+          <el-table-column align="center" prop="printPassword" label="密码"></el-table-column>
+          <el-table-column align="center" prop="createTime" label="打印时间"></el-table-column>
+        </el-table>
+      </div>
+      <div class="pagination clearfix">
+        <div class="fr">
+          <el-pagination
+            @current-change="dialogTableCurrentChange"
+            :current-page="dialogTable_currentPage"
+            :page-size="dialogTable_pageSize"
+            background
+            layout="prev, pager, next"
+            :total="dialogTable_listTotal">
+          </el-pagination>
+        </div>
+      </div>
+
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="isShowDialog = false">关 闭</el-button>
+      </div>
+    </el-dialog>
     
     <DeliverDetail :listItem="queryItem" v-if="isShowDetail" @backListFormDetail="backList" />
 
@@ -106,8 +141,7 @@
 </template>
 
 <script>
-import { COMMON_SELECT } from '@/utils/select_data'
-import { getDeliverList } from "@/api/supply/deliver";
+import { getDeliverList, getPassword, getPasswordRecord } from "@/api/supply/deliver";
 import DeliverDetail from "@/views/supply/deliver/components/deliver_detail";
 
 export default {
@@ -130,6 +164,13 @@ export default {
         date: '',
       },
 
+      isShowDialog: false, // 密码记录 - 弹窗
+      dialogTable_dataList: null, // 密码记录 - 列表数据
+      dialogTable_listLoading: true, // 密码记录 - 列表加载loading
+      dialogTable_currentPage: 1, // 密码记录 - 当前页码
+      dialogTable_pageSize: 10, // 密码记录 - 每页数量
+      dialogTable_listTotal: 0, // 密码记录 - 列表总数
+
       queryItem: {},
     }
   },
@@ -221,6 +262,42 @@ export default {
     backList() {
       this.queryItem = {};
     },
+
+    // 获取密码
+    getPassword(id) {
+      getPassword({id}).then(res => {
+        this.$alert(res.data, '新密码', {
+          confirmButtonText: '确定',
+          callback: action => {}
+        });
+      })
+    },
+
+    // 密码记录 - 获取列表
+    getPasswordRecord(id) {
+      getPasswordRecord({
+        pageNum: this.dialogTable_currentPage,
+        pageSize: this.dialogTable_pageSize,
+        id
+      }).then(res => {
+        this.dialogTable_dataList = res.data.records;
+        this.dialogTable_listTotal = res.data.total;
+        this.dialogTable_listLoading = false;
+      })
+    },
+
+    // 密码记录 - 打开弹窗
+    openShareDetail(id) {
+      this.isShowDialog = true;
+      this.dialogTable_currentPage = 1;
+      this.getPasswordRecord(id);
+    },
+
+    // 密码记录 - 更改列表当前页
+    dialogTableCurrentChange(val) {
+      this.dialogTable_currentPage = val;
+      this.getPasswordRecord();
+    },
   }
 }
 </script>

+ 86 - 38
src/views/supply/engin/components/home_form.vue

@@ -9,14 +9,14 @@
     <el-form ref="mainForm" :model="mainForm" label-width="100px" size="small" label-position="left">
       <el-row :gutter="20">
         <el-col :xs="24" :sm="12" :lg="8">
-          <el-form-item label="工程订单" prop="warehouse">
-            <el-input v-model="mainForm.remark" placeholder="请输入工程订单"></el-input>
+          <el-form-item label="工程订单" prop="orderNum">
+            <el-input v-model="mainForm.orderNum" placeholder="系统自动生成" readonly></el-input>
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8" style="height: 51px;">
-          <el-form-item label="单据日期" prop="date">
+          <el-form-item label="单据日期" prop="orderDate">
             <el-date-picker
-              v-model="mainForm.date"
+              v-model="mainForm.orderDate"
               type="date"
               value-format="yyyy-MM-dd"
               style="width: 100%;"
@@ -25,79 +25,98 @@
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8">
-          <el-form-item label="品类" prop="warehouse">
-            <el-input v-model="mainForm.remark" placeholder="请输入品类"></el-input>
+          <el-form-item label="产品大类" prop="type">
+            <el-select v-model="mainForm.type" placeholder="选择产品大类" style="width: 100%" clearable>
+              <el-option v-for="item in typeList" :key="item.dictCode" :label="item.dictValue" :value="item.dictCode"></el-option>
+            </el-select>
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8">
-          <el-form-item label="工程登录单号" prop="warehouse">
-            <el-input v-model="mainForm.remark" placeholder="请输入工程登录单号"></el-input>
+          <el-form-item label="经销商编码" prop="jxsNum">
+            <el-input v-model="mainForm.jxsNum" placeholder="请输入经销商编码"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="16">
+          <el-form-item label="经销商名称" prop="jxsName">
+            <el-input v-model="mainForm.jxsName" placeholder="请输入经销商名称"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="8">
+          <el-form-item label="工程登录单号" prop="loginNum">
+            <el-input v-model="mainForm.loginNum" placeholder="请输入工程登录单号"></el-input>
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8">
-          <el-form-item label="项目名称" prop="warehouse">
-            <el-input v-model="mainForm.remark" placeholder="请输入项目名称"></el-input>
+          <el-form-item label="工程项目名称" prop="enginName">
+            <el-input v-model="mainForm.enginName" placeholder="请输入工程项目名称"></el-input>
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8">
-          <el-form-item label="单据类型" prop="warehouse">
-            <el-input v-model="mainForm.remark" placeholder="请输入单据类型"></el-input>
+          <el-form-item label="工程登录类型" prop="loginType">
+            <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="warehouse">
-            <el-input v-model="mainForm.remark" placeholder="请输入经销商编码"></el-input>
+          <el-form-item label="厂工程编码" prop="factoryNum">
+            <el-input v-model="mainForm.factoryNum" placeholder="请输入厂工程编码"></el-input>
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8">
-          <el-form-item label="使用单位" prop="warehouse">
-            <el-input v-model="mainForm.remark" placeholder="请输入使用单位"></el-input>
+          <el-form-item label="使用单位" prop="company">
+            <el-input v-model="mainForm.company" placeholder="请输入使用单位"></el-input>
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8">
-          <el-form-item label="安装地址" prop="warehouse">
-            <el-input v-model="mainForm.remark" placeholder="请输入安装地址"></el-input>
+          <el-form-item label="销售类型" prop="saleType">
+            <el-select v-model="mainForm.saleType" placeholder="选择销售类型" style="width: 100%" clearable>
+              <el-option v-for="item in salesTypeList" :key="item.id" :label="item.saleName" :value="item.id"></el-option>
+            </el-select>
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8">
-          <el-form-item label="工程编号" prop="warehouse">
-            <el-input v-model="mainForm.remark" placeholder="请输入工程编号"></el-input>
+          <el-form-item label="联系人" prop="contactMan">
+            <el-input v-model="mainForm.contactMan" placeholder="请输入联系人"></el-input>
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8">
-          <el-form-item label="厂工程编码" prop="warehouse">
-            <el-input v-model="mainForm.remark" placeholder="请输入厂工程编码"></el-input>
+          <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="12" :lg="8">
-          <el-form-item label="工程登录类型" prop="warehouse">
-            <el-input v-model="mainForm.remark" placeholder="请输入工程登录类型"></el-input>
+          <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="24" :lg="24">
+          <el-form-item label="安装地址" prop="address">
+            <el-input v-model="mainForm.address" placeholder="请输入安装地址"></el-input>
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="24" :lg="24">
-          <el-form-item label="格力回复" prop="warehouse">
-            <el-input v-model="mainForm.remark" placeholder="请输入格力回复"></el-input>
+          <el-form-item label="格力内部备注" prop="greeRemark">
+            <el-input v-model="mainForm.greeRemark" placeholder="请输入格力内部备注"></el-input>
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="24" :lg="24">
-          <el-form-item label="格力内部备注" prop="warehouse">
-            <el-input v-model="mainForm.remark" placeholder="请输入格力内部备注"></el-input>
+          <el-form-item label="格力回复" prop="greeReply">
+            <el-input v-model="mainForm.greeReply" placeholder="请输入格力回复"></el-input>
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="24" :lg="24">
-          <el-form-item label="备注" prop="warehouse">
+          <el-form-item label="备注" prop="remark">
             <el-input v-model="mainForm.remark" placeholder="请输入备注"></el-input>
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8">
-          <el-form-item label="制单人" prop="warehouse">
-            <el-input v-model="mainForm.remark" placeholder="请输入制单人"></el-input>
+          <el-form-item label="制单人" prop="createMan">
+            <el-input v-model="mainForm.createMan" placeholder="请输入制单人"></el-input>
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8" style="height: 51px;">
-          <el-form-item label="制单日期" prop="date">
+          <el-form-item label="制单日期" prop="createDate">
             <el-date-picker
-              v-model="mainForm.date"
+              v-model="mainForm.createDate"
               type="date"
               value-format="yyyy-MM-dd"
               style="width: 100%;"
@@ -106,8 +125,8 @@
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8">
-          <el-form-item label="文件编号" prop="warehouse">
-            <el-input v-model="mainForm.remark" placeholder="请输入文件编号"></el-input>
+          <el-form-item label="文件编号" prop="fileNum">
+            <el-input v-model="mainForm.fileNum" placeholder="请输入文件编号"></el-input>
           </el-form-item>
         </el-col>
       </el-row>
@@ -154,7 +173,8 @@
 </template>
 
 <script>
-import { getDetail } from "@/api/supply/engin";
+import { getOrderDetail,  } from "@/api/supply/engin";
+import { getDictList, getTypeList } from '@/api/common'
 
 export default {
   name: 'HomeForm',
@@ -166,6 +186,8 @@ export default {
       mainForm: {
 
       },
+      salesTypeList: [],
+      typeList: [],
     }
   },
 
@@ -182,7 +204,16 @@ export default {
   },
 
   created() {
-    this.getDetail();
+    this.getDictList();
+    this.getSalesTypeList();
+
+    if(this.listItem) {
+      this.getDetail();
+    }else {
+      this.mainForm.jxsNum = JSON.parse(localStorage.getItem("supply_user")).customerId;
+      this.mainForm.jxsName = JSON.parse(localStorage.getItem("supply_user")).customerName;
+      this.mainForm.createMan = JSON.parse(localStorage.getItem("supply_user")).nickName;
+    }
   },
 
   methods: {
@@ -191,9 +222,26 @@ export default {
       this.$emit('backListFormDetail');
     },
 
+    // 获取产品大类列表
+    getDictList() {
+      getDictList({sysDictEnum: 'PRODUCT_TYPE'}).then(res => {
+        this.typeList = res.data;
+      })
+    },
+
+    // 获取销售类型列表
+    getSalesTypeList() {
+      getTypeList({
+        pageNum: 1,
+        pageSize: -1
+      }).then((res) => {
+        this.salesTypeList = res.data.records;
+      })
+    },
+
     // 获取详情
     getDetail() {
-      getDetail({id: this.listItem.id}).then(res => {
+      getOrderDetail({id: this.listItem.id}).then(res => {
         this.detailData = res.data;
       })
     },

+ 105 - 71
src/views/supply/engin/home_list.vue

@@ -6,14 +6,10 @@
         <el-form ref="screenForm" :model="screenForm" label-width="100px" size="small" label-position="left">
           <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="1">全部</el-radio-button>
-                  <el-radio-button label="2">已保存</el-radio-button>
-                  <el-radio-button label="3">待审核</el-radio-button>
-                  <el-radio-button label="3">审核通过</el-radio-button>
-                  <el-radio-button label="3">审核驳回</el-radio-button>
-                  <el-radio-button label="3">已退单</el-radio-button>
+              <el-form-item prop="status" label-width="0">
+                <el-radio-group v-model="screenForm.status" size="medium" @change="getList()">
+                  <el-radio-button label="">全部</el-radio-button>
+                  <el-radio-button v-for="(item, index) in statusList" :key="index" :label="item.value">{{item.label}}</el-radio-button>
                 </el-radio-group>
               </el-form-item>
             </el-col>
@@ -23,18 +19,18 @@
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="工程编码" prop="orderNum">
-                <el-input v-model="screenForm.orderNum" placeholder="请输入工程编码"></el-input>
+              <el-form-item label="工程编码" prop="enginNum">
+                <el-input v-model="screenForm.enginNum" placeholder="请输入工程编码"></el-input>
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="工程登录单号" prop="jxsName">
-                <el-input v-model="screenForm.jxsName" placeholder="请输入工程登录单号"></el-input>
+              <el-form-item label="工程登录单号" prop="loginNum">
+                <el-input v-model="screenForm.loginNum" placeholder="请输入工程登录单号"></el-input>
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="工程名称" prop="jxsNum">
-                <el-input v-model="screenForm.jxsNum" placeholder="请输入工程名称"></el-input>
+              <el-form-item label="工程名称" prop="enginName">
+                <el-input v-model="screenForm.enginName" placeholder="请输入工程名称"></el-input>
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
@@ -51,27 +47,22 @@
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="销售类型" prop="chName">
-                <el-input v-model="screenForm.chName" placeholder="请输入销售类型"></el-input>
+              <el-form-item label="销售类型" prop="saleType">
+                <el-input v-model="screenForm.saleType" placeholder="请输入销售类型"></el-input>
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="使用单位" prop="model">
-                <el-input v-model="screenForm.model" placeholder="请输入使用单位"></el-input>
+              <el-form-item label="制表人" prop="createMan">
+                <el-input v-model="screenForm.createMan" placeholder="请输入制表人"></el-input>
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="制表人" prop="model">
-                <el-input v-model="screenForm.model" placeholder="请输入制表人"></el-input>
-              </el-form-item>
-            </el-col>
-            <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="审核人" prop="model">
-                <el-input v-model="screenForm.model" placeholder="请输入审核人"></el-input>
+              <el-form-item label="审核人" prop="examineMan">
+                <el-input v-model="screenForm.examineMan" placeholder="请输入审核人"></el-input>
               </el-form-item>
             </el-col>
             
-            <el-col :xs="24" :sm="12" :lg="18" class="tr">
+            <el-col :xs="24" :sm="24" :lg="24" class="tr">
               <el-form-item label="">
                 <el-button size="small" @click="resetScreenForm">清空</el-button>
                 <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
@@ -92,28 +83,41 @@
         </div>
         <div class="table">
           <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
-            <el-table-column align="center" label="工程订单号" prop="shipOrderNo" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="单据日期" prop="shipTime" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="工程编码" prop="stockName" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="工程登录单号" prop="projectNumber" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="工程名称" prop="projectName" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="使用单位" prop="unit" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="销售类型" prop="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="number" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="总数量" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="是否直调" prop="customerNumber" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="直调数量" prop="customerName" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="单价" prop="productName" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="金额" prop="createBy" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="返利使用比例" prop="createTime" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="返利" prop="createBy" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="制表人" prop="createTime" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="制表日期" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="审核人" prop="aaa" min-width="200" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="审核日期" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="审核状态" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="审核状态" prop="examineStatus" min-width="100" show-overflow-tooltip>
+              <template slot-scope="scope">
+                {{scope.row.examineStatus | statusFilter}}
+              </template>
+            </el-table-column>
+            <el-table-column align="center" label="工程订单号" prop="enginOrderNo" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="订单日期" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="工程登录单号" prop="refEnginRecordNo" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="订单类型" prop="enginOrderType" min-width="160" show-overflow-tooltip>
+              <template slot-scope="scope">
+                {{scope.row.enginOrderType | typeFilter}}
+              </template>
+            </el-table-column>
+            <el-table-column align="center" label="工程名称" prop="refProjectName" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="销售类型" prop="saleTypeId" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="货品名称" prop="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="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="总数量" prop="qty" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="是否直调" prop="isDirectTransfer" min-width="160" show-overflow-tooltip>
+              <template slot-scope="scope">
+                {{scope.row.isDirectTransfer ? '是':'否'}}
+              </template>
+            </el-table-column>
+            <el-table-column align="center" label="直调数量" prop="directTransferQty" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="出库数量" prop="hasSendQty" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="单价" prop="enginPrice" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="金额" prop="enginTotality" min-width="160" 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="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="业务员" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="制表人" prop="createName" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="制表日期" prop="createTime" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="审核人" prop="confirmName" min-width="200" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="审核日期" prop="confirmTime" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="操作" width="160" fixed="right">
               <template slot-scope="scope">
                 <el-button type="text" @click="toForm(scope.row)">编辑</el-button>
@@ -148,15 +152,29 @@
 </template>
 
 <script>
-import { getList } from "@/api/supply/engin";
+import { getOrderList } from "@/api/supply/engin";
 import HomeDetail from "@/views/supply/engin/components/home_detail";
 import HomeForm from "@/views/supply/engin/components/home_form";
 
+let that
 export default {
   components: {
     HomeDetail,
     HomeForm,
   },
+  filters: {
+    statusFilter(val) {
+      let obj = that.statusList.find(o => o.value == val);
+      return obj ? obj.label : ''
+    },
+    typeFilter(val) {
+      const MAP = {
+        TRADE: '商用',
+        HOME: '家用',
+      }
+      return MAP[val];
+    }
+  },
   data() {
     return {
       currentPage: 1, // 当前页码
@@ -166,13 +184,21 @@ export default {
       listLoading: false, // 列表加载loading
       screenForm: { // 筛选表单数据
         orderNum: '',
-        jxsName: '',
-        chName: '',
-        model: '',
+        enginNum: '',
+        loginNum: '',
+        enginName: '',
         date: '',
-        jxsNum: '',
-        status: '',
+        saleType: '',
+        createMan: '',
+        examineMan: '',
       },
+      statusList: [
+        { label: '已保存', value: 'SAVE' },
+        { label: '待审核', value: 'WAIT' },
+        { label: '审核通过', value: 'OK' },
+        { label: '审核驳回', value: 'FAIL' },
+        { label: '已关闭', value: 'CLOSE' },
+      ],
 
       queryItem: {},
       isShowDetail: false,
@@ -183,18 +209,24 @@ export default {
   computed: {
     exParams() {
       return {
-        retreatOrderNo: this.screenForm.orderNum,
-        customerNumber: this.screenForm.jxsNum,
-        customerName: this.screenForm.jxsName,
-        productName: this.screenForm.chName,
-        specification: this.screenForm.model,
-        startTime: this.screenForm.date ? this.screenForm.date[0] : '',
-        endTime: this.screenForm.date ? this.screenForm.date[1] : '',
-        status: 2, // 1:发货单,2:工程发货单
+        enginOrderNo: this.screenForm.orderNum,
+        refProjectNo: this.screenForm.enginNum,
+        refEnginRecordNo: this.screenForm.loginNum,
+        refProjectName: this.screenForm.enginName,
+        startCreateTime: this.screenForm.date ? this.screenForm.date[0] : '',
+        endCreateTime: this.screenForm.date ? this.screenForm.date[1] : '',
+        saleTypeId: this.screenForm.saleType,
+        createName: this.screenForm.createMan,
+        confirmName: this.screenForm.examineMan,
+        enginOrderType: 'HOME', // TRADE=商用 HOME=家用
       }
     },
   },
 
+  beforeCreate() {
+    that = this;
+  },
+
   created() {
     this.getList();
   },
@@ -216,16 +248,18 @@ export default {
       let params = {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
-        retreatOrderNo: this.screenForm.orderNum,
-        customerNumber: this.screenForm.jxsNum,
-        customerName: this.screenForm.jxsName,
-        productName: this.screenForm.chName,
-        specification: this.screenForm.model,
-        startTime: this.screenForm.date ? this.screenForm.date[0] : '',
-        endTime: this.screenForm.date ? this.screenForm.date[1] : '',
-        status: 2, // 1:发货单,2:工程发货单
+        enginOrderNo: this.screenForm.orderNum,
+        refProjectNo: this.screenForm.enginNum,
+        refEnginRecordNo: this.screenForm.loginNum,
+        refProjectName: this.screenForm.enginName,
+        startCreateTime: this.screenForm.date ? this.screenForm.date[0] : '',
+        endCreateTime: this.screenForm.date ? this.screenForm.date[1] : '',
+        saleTypeId: this.screenForm.saleType,
+        createName: this.screenForm.createMan,
+        confirmName: this.screenForm.examineMan,
+        enginOrderType: 'HOME', // TRADE=商用 HOME=家用
       };
-      getList(params).then((res) => {
+      getOrderList(params).then((res) => {
         this.dataList = res.data.records;
         this.listTotal = res.data.total;
         this.listLoading = false;

+ 43 - 57
src/views/supply/pickup/book.vue → src/views/supply/pickup/components/pickup_form.vue

@@ -1,13 +1,16 @@
 <template>
-  <div class="app-container">
-    <!-- 筛选条件 -->
+  <div class="detail-container">
+
+    <el-page-header @back="goBack" :content="listItem ? '编辑':'新增'"></el-page-header>
+    <el-divider></el-divider>
+    
     <div>
       <el-form ref="mainForm" :model="mainForm" :rules="mainFormRules" label-width="80px" size="small" label-position="left">
         <el-row :gutter="20">
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="选择仓库" prop="warehouse">
               <el-select v-model="mainForm.warehouse" placeholder="请选择仓库">
-                <el-option :label="item.name" :value="item.name" v-for="(item, index) in warehouseList" :key="index"></el-option>
+                <el-option :label="item.name" :value="item.id" v-for="(item, index) in warehouseList" :key="index"></el-option>
               </el-select>
             </el-form-item>
           </el-col>
@@ -29,29 +32,21 @@
           </el-col>
           <el-col :xs="24" :sm="12" :lg="12" style="height: 51px;">
             <el-form-item label="预约时段" prop="timeSlot">
-              <el-time-picker
-                is-range
-                v-model="mainForm.timeSlot"
-                style="width: 100%"
-                value-format="HH:mm:ss"
-                range-separator="至"
-                start-placeholder="开始时间"
-                end-placeholder="结束时间"
-                placeholder="选择时间范围">
-              </el-time-picker>
+              <el-radio-group v-model="mainForm.timeSlot">
+                <el-radio :label="1">上午</el-radio>
+                <el-radio :label="2">下午</el-radio>
+              </el-radio-group>
             </el-form-item>
           </el-col>
         </el-row>
         <el-row :gutter="20">
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="提货方式" prop="pickupWay">
-              <el-select v-model="mainForm.pickupWay" placeholder="全部" style="width: 100%">
-                <el-option :label="item.dictValue" :value="item.dictCode" v-for="(item, index) in pickupWayList" :key="index"></el-option>
-              </el-select>
+              <el-radio-group v-model="mainForm.pickupWay">
+                <el-radio :label="item.dictCode" v-for="(item, index) in pickupWayList" :key="index">{{item.dictValue}}</el-radio>
+              </el-radio-group>
             </el-form-item>
           </el-col>
-        </el-row>
-        <el-row :gutter="20">
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="提货人" prop="pickupMan">
               <el-select v-model="mainForm.pickupMan" placeholder="全部" style="width: 100%">
@@ -73,7 +68,9 @@
               </el-select>
             </el-form-item>
           </el-col>
-          <el-col :xs="24" :sm="12" :lg="12">
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :xs="24" :sm="24" :lg="24">
             <el-form-item label="备注内容" prop="remark">
               <el-input v-model="mainForm.remark" placeholder="请输入备注内容"></el-input>
             </el-form-item>
@@ -86,37 +83,20 @@
       <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-column align="center" type="selection" width="55"></el-table-column>
-          <el-table-column type="expand">
-            <template slot-scope="props">
-              <div style="display: flex; margin: 0 -30px 0 -20px;">
-                <div style="line-height: 50px; font-weight: 600">产品信息</div>
-                <div class="diy-table-2" style="margin: 0 0 0 14px; flex: 1">
-                  <div class="head">
-                    <el-row :gutter="20">
-                      <el-col :span="5">产品编号</el-col>
-                      <el-col :span="10">产品名称</el-col>
-                      <el-col :span="3">规格型号</el-col>
-                      <el-col :span="3">单位</el-col>
-                      <el-col :span="3">数量</el-col>
-                    </el-row>
-                  </div>
-                  <div class="body">
-                    <el-row v-for="(item, index) in props.row.shipDocumentOrders" :key="index" :gutter="20">
-                      <el-col :span="5">{{ item.productNumber }}</el-col>
-                      <el-col :span="10">{{ item.productName }}</el-col>
-                      <el-col :span="3">{{ item.specification }}</el-col>
-                      <el-col :span="3">{{ item.unit }}</el-col>
-                      <el-col :span="3">{{ item.number }}</el-col>
-                    </el-row>
-                  </div>
-                </div>
-              </div>
+          <el-table-column align="center" label="发货申请单" prop="invoiceOrderId" 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="shipOrderNo" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="单据日期" prop="createTime" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="工程编号" prop="factoryNumber" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="销售类型" prop="salesType" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="销售订单号" prop="retailOrderId" min-width="180" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="工程编号" prop="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>
+          <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>
       </div>
     </div>
@@ -139,6 +119,9 @@ import { getDictList } from "@/api/common";
 import { findElem } from "@/utils/util";
 
 export default {
+  name: 'PickupForm',
+  componentName: 'PickupForm',
+  props: ['listItem'],
   data() {
     return {
       deliverList: null, // 列表数据
@@ -207,6 +190,11 @@ export default {
       return true
     },
 
+    // 返回列表
+    goBack() {
+      this.$emit('backListFormDetail');
+    },
+
     // 获取仓库列表
     getWarehouseList() {
       getWarehouseList({
@@ -260,7 +248,7 @@ export default {
         return this.$errorMsg('请选择仓库');
       }
       this.listLoading = true;
-      getDeliverList({stockName: this.mainForm.warehouse}).then((res) => {
+      getDeliverList({correspondId: this.mainForm.warehouse}).then((res) => {
         this.deliverList = res.data;
         this.listLoading = false;
       })
@@ -274,7 +262,7 @@ export default {
       this.$refs.mainForm.validate((valid) => {
         if (valid) {
           if(this.tableSelection.length < 1) {
-            return this.$errorMsg('请选择发货单');
+            return this.$errorMsg('请选择发货申请单');
           }
 
           this.formLoading = true;
@@ -285,18 +273,17 @@ export default {
           }
           let orderList = [];
           this.tableSelection.forEach(item => {
-            orderList.push(item.id);
+            orderList.push(item.invoiceOrderId);
           });
           let params = {
             stockName: this.mainForm.warehouse,
             pickTime: this.mainForm.date,
-            pickStartTime: this.mainForm.timeSlot[0],
-            pickEndTime: this.mainForm.timeSlot[1],
+            pickStatus: Number(this.mainForm.timeSlot),
             pickType: Number(this.mainForm.pickupWay),
             takerId: this.mainForm.pickupMan,
             takerName,
             remark: this.mainForm.remark,
-            shipDocumentBeans: orderList,
+            invoiceOrderIds: orderList,
           }
           if(this.mainForm.pickupWay == '1') {
             params.takerCarId = this.mainForm.pickupCar;
@@ -306,9 +293,8 @@ export default {
           }
           addPickupBook(params).then(res => {
             this.$successMsg('提交成功');
-            setTimeout(() => {
-              this.resetForm();
-            }, 1500)
+            this.goBack();
+            this.$parent.getList();
           }).finally(res => {
             this.formLoading = false;
           })

+ 120 - 91
src/views/supply/pickup/pickup_list.vue

@@ -1,109 +1,123 @@
 <template>
   <div class="app-container">
-    <!-- 筛选条件 -->
-    <div class="screen-container">
-      <el-form ref="screenForm" :model="screenForm" label-width="100px" size="small" label-position="left">
-        <el-row :gutter="20">
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="申请发货单号" prop="orderNum">
-              <el-input v-model="screenForm.orderNum" placeholder="请输入申请发货单号"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="申请人" prop="applyName">
-              <el-input v-model="screenForm.applyName" placeholder="请输入申请人"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="提货仓库" prop="warehouse">
-              <el-input v-model="screenForm.warehouse" placeholder="请输入提货仓库"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="提货日期" prop="date">
-              <el-date-picker
-                v-model="screenForm.date"
-                type="datetimerange"
-                range-separator="至"
-                style="width: 100%;"
-                value-format="yyyy-MM-dd HH:mm:ss"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期">
-              </el-date-picker>
-            </el-form-item>
-          </el-col>
-          
-          <el-col :xs="24" :sm="24" :lg="24" class="tr">
-            <el-form-item label="">
-              <el-button size="small" @click="resetScreenForm">清空</el-button>
-              <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-    </div>
+    <div v-show="!isShowForm">
+      <!-- 筛选条件 -->
+      <div class="screen-container">
+        <el-form ref="screenForm" :model="screenForm" label-width="100px" size="small" label-position="left">
+          <el-row :gutter="20">
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="申请发货单号" prop="orderNum">
+                <el-input v-model="screenForm.orderNum" placeholder="请输入申请发货单号"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="申请人" prop="applyName">
+                <el-input v-model="screenForm.applyName" placeholder="请输入申请人"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="提货仓库" prop="warehouse">
+                <el-input v-model="screenForm.warehouse" placeholder="请输入提货仓库"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="提货日期" prop="date">
+                <el-date-picker
+                  v-model="screenForm.date"
+                  type="datetimerange"
+                  range-separator="至"
+                  style="width: 100%;"
+                  value-format="yyyy-MM-dd HH:mm:ss"
+                  start-placeholder="开始日期"
+                  end-placeholder="结束日期">
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+            
+            <el-col :xs="24" :sm="24" :lg="24" class="tr">
+              <el-form-item label="">
+                <el-button size="small" @click="resetScreenForm">清空</el-button>
+                <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
 
-    <div class="mymain-container">
-      <div class="btn-group clearfix">
-        <div class="fr">
-          <ExportButton :exUrl="'admin/user/mch/export'" :exParams="exParams" />
+      <div class="mymain-container">
+        <div class="btn-group clearfix">
+          <div class="fl">
+            <el-button size="small" type="primary" icon="el-icon-plus" @click="toForm()">新增</el-button>
+          </div>
+          <div class="fr">
+            <ExportButton :exUrl="'admin/user/mch/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="状态" min-width="160" show-overflow-tooltip>
+              <template slot-scope="scope">
+                {{ scope.row.printNum ? '已打单':'未打单' }}
+              </template>
+            </el-table-column>
+            <el-table-column align="center" label="打单日期" prop="createTime" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="信息密钥" prop="informationKey" min-width="180" 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="pickTime" min-width="120" show-overflow-tooltip></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="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="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="enginOrderNo" min-width="180" 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="number" 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>
         </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="状态" min-width="160" show-overflow-tooltip>
-            <template slot-scope="scope">
-              {{ scope.row.printNum ? '已打单':'未打单' }}
-            </template>
-          </el-table-column>
-          <el-table-column align="center" label="打单日期" prop="createTime" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="提货单号" prop="pickOrderNo" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="预约日期" prop="pickTime" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="提货时段" min-width="160" show-overflow-tooltip>
-            <template slot-scope="scope">
-              {{ scope.row.pickStartTime }} 至 {{ scope.row.pickEndTime }}
-            </template>
-          </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="pickType" min-width="160" show-overflow-tooltip>
-            <template slot-scope="scope">
-              {{ scope.row.pickType == '1' ? '自提':'物流快递' }}
-            </template>
-          </el-table-column>
-          <el-table-column align="center" label="发货单号" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="单据日期" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="发货申请单号" prop="invoiceOrderNo" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="工程编号" prop="projectNumber" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="产品编号" prop="productNumber" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="产品名称" prop="productName" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="规格型号" prop="specification" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="提货总数量" prop="number" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="总体积" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="备注" prop="remark" min-width="100" show-overflow-tooltip></el-table-column>
-        </el-table>
-      </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>
 
+    <PickupForm :listItem="queryItem" v-if="isShowForm" @backListFormDetail="backList" />
+
   </div>
 </template>
 
 <script>
 import { getPickupList } from "@/api/supply/pickup";
+import PickupForm from "@/views/supply/pickup/components/pickup_form";
 
 export default {
+  components: {
+    PickupForm
+  },
   data() {
     return {
       currentPage: 1, // 当前页码
@@ -117,6 +131,10 @@ export default {
         warehouse: '',
         date: '',
       },
+
+      queryItem: {},
+      isShowForm: false,
+
     }
   },
 
@@ -191,6 +209,17 @@ export default {
       this.currentPage = val;
       this.getList();
     },
+
+    // 进入表单
+    toForm(item) {
+      this.queryItem = item;
+      this.isShowForm = true;
+    },
+
+    backList() {
+      this.queryItem = {};
+      this.isShowForm = false;
+    },
   }
 }
 </script>

+ 18 - 15
src/views/supply/pickup/sum_list.vue

@@ -56,29 +56,32 @@
               {{ scope.row.printNum ? '已打单':'未打单' }}
             </template>
           </el-table-column>
-          <el-table-column align="center" label="申请发货单号" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="申请日期" prop="createTime" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="发货单号" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="提货单号" prop="pickOrderNo" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="经销商名称" prop="customerName" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="经销商编码" prop="customerNumber" 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="pickType" min-width="160" show-overflow-tooltip>
+          <el-table-column align="center" label="打单日期" prop="createTime" min-width="160" show-overflow-tooltip></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="invoiceOrderId" min-width="180" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="预约日期" prop="pickTime" min-width="120" show-overflow-tooltip></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="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="pickTime" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="提货时段" min-width="160" show-overflow-tooltip>
+          <el-table-column align="center" label="单据日期" prop="orderTime" min-width="120" show-overflow-tooltip>
             <template slot-scope="scope">
-              {{ scope.row.pickStartTime }} 至 {{ scope.row.pickEndTime }}
+              {{ scope.row.orderTime | dateToDayFilter }}
             </template>
           </el-table-column>
-          <el-table-column align="center" label="产品编号" prop="productNumber" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="产品名称" prop="productName" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="规格型号" prop="specification" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="销售订单号" prop="retailOrderId" min-width="180" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="工程编号" prop="enginOrderNo" min-width="180" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="产品编号" prop="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="number" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="总体积" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="备注" prop="remark" min-width="100" show-overflow-tooltip></el-table-column>
         </el-table>
       </div>

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

@@ -134,12 +134,12 @@
         <el-table-column align="center" label="税率" prop="tax" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="总仓库" prop="status1" min-width="100" show-overflow-tooltip v-if="!listItem">
           <template slot-scope="scope">
-            <el-tag :type="scope.row.status1 | statusTagFilter">{{ scope.row.status1 | statusFilter }}</el-tag>
+            <div>{{ scope.row.status1 | status1Filter }}</div>
           </template>
         </el-table-column>
         <el-table-column align="center" label="仓库状态" prop="status2" min-width="100" show-overflow-tooltip v-if="!listItem">
           <template slot-scope="scope">
-            <el-tag :type="scope.row.status2 | statusTagFilter">{{ scope.row.status2 | statusFilter }}</el-tag>
+            <div>{{ status2Filter(scope.row) }}</div>
           </template>
         </el-table-column>
         <el-table-column align="center" label="操作" width="100" fixed="right">
@@ -164,14 +164,14 @@
         <el-row :gutter="20">
           <el-col :xs="12" :sm="6" :lg="6">
             <el-form-item prop="type">
-              <el-select v-model="mainForm.type" placeholder="选择品类" style="width: 100%">
+              <el-select v-model="mainForm.type" placeholder="选择品类" style="width: 100%" clearable>
                 <el-option v-for="item in typeList" :key="item.dictCode" :label="item.dictValue" :value="item.dictCode"></el-option>
               </el-select>
             </el-form-item>
           </el-col>
           <el-col :xs="12" :sm="6" :lg="6">
             <el-form-item prop="salesType">
-              <el-select v-model="screenForm.salesType" placeholder="选择销售类型" style="width: 100%">
+              <el-select v-model="screenForm.salesType" placeholder="选择销售类型" style="width: 100%" clearable>
                 <el-option v-for="item in salesTypeList" :key="item.id" :label="item.saleName" :value="item.id"></el-option>
               </el-select>
             </el-form-item>
@@ -266,22 +266,13 @@ export default {
   componentName: 'RetailForm',
   props: ['listItem'],
   filters: {
-    statusFilter(val) {
-      if (val === '') return '未检查';
-      const MAP = {
-        0: '库存不足',
-        1: '库存充足'
-      }
-      return MAP[val];
+    status1Filter(val) {
+      if (val === '' || val === null || val === undefined) return '未检查';
+      else if (val === 0) return '无货';
+      else if (val > 0 && val <= 30) return val;
+      else if (val > 30 && val <= 1000) return '有货';
+      else if (val > 1000) return '充足';
     },
-    statusTagFilter(val) {
-      if (val === '') return 'info';
-      const MAP = {
-        0: 'danger',
-        1: 'success'
-      }
-      return MAP[val];
-    }
   },
   data() {
     return {
@@ -594,13 +585,19 @@ export default {
       }).then(res => {
         if(res.data) {
           this.goodsList.forEach((item, index) => {
-            item.status1 = res.data[index].allStockStatus;
-            item.status2 = res.data[index].stockStatus;
+            item.status1 = res.data[index].allStockNum;
+            item.status2 = res.data[index].stockNum;
           })
         }
       })
     },
 
+    status2Filter(item) {
+      if (item.status2 === '' || item.status2 === null || item.status2 === undefined) return '未检查';
+      else if (item.status2 >= item.qty) return '可用';
+      else return '短缺';
+    },
+
     // 保存
     clickSubmitForm() {
       this.$refs.mainForm.validate((valid) => {