Browse Source

【新增】
1.发货单接口
2.退货单接口
3.提货管理接口-50%

莫绍宝 3 years ago
parent
commit
aff1400acd

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

@@ -0,0 +1,19 @@
+import request from '@/utils/request'
+
+// 获取列表
+export function getList(params) {
+  return request({
+    url: '/ship/list',
+    method: 'get',
+    params
+  })
+}
+
+// 获取详情
+export function getDetail(params) {
+  return request({
+    url: '/ship/detail',
+    method: 'get',
+    params
+  })
+}

+ 73 - 0
src/api/supply/pickup.js

@@ -0,0 +1,73 @@
+import request from '@/utils/request'
+
+// 获取列表
+export function getPickupList(params) {
+  return request({
+    url: '/pick/list',
+    method: 'get',
+    params
+  })
+}
+
+// 获取详情
+export function getDetail(params) {
+  return request({
+    url: '/retreat/detail',
+    method: 'get',
+    params
+  })
+}
+
+// 获取仓库列表
+export function getWarehouseList(params) {
+  return request({
+    url: '/stock/listStock',
+    method: 'get',
+    params
+  })
+}
+
+// 获取发货单列表
+export function getDeliverList(params) {
+  return request({
+    url: '/pick/listShip',
+    method: 'get',
+    params
+  })
+}
+
+// 获取提货人列表
+export function getPickupManList(params) {
+  return request({
+    url: '/taker-record/list',
+    method: 'get',
+    params
+  })
+}
+
+// 获取提货车辆列表
+export function getPickupCarList(params) {
+  return request({
+    url: '/take-car-record/list',
+    method: 'get',
+    params
+  })
+}
+
+// 获取物流公司列表
+export function getCompanyList(params) {
+  return request({
+    url: '/logistics/list',
+    method: 'get',
+    params
+  })
+}
+
+// 提交提货预约
+export function addPickupBook(params) {
+  return request({
+    url: '/pick/add',
+    method: 'post',
+    data: params
+  })
+}

+ 19 - 0
src/api/supply/return.js

@@ -0,0 +1,19 @@
+import request from '@/utils/request'
+
+// 获取列表
+export function getList(params) {
+  return request({
+    url: '/retreat/list',
+    method: 'get',
+    params
+  })
+}
+
+// 获取详情
+export function getDetail(params) {
+  return request({
+    url: '/retreat/detail',
+    method: 'get',
+    params
+  })
+}

+ 95 - 56
src/views/supply/deliver/components/deliver_detail.vue

@@ -4,73 +4,117 @@
 
 
     <div id="printMe">
     <div id="printMe">
       <div class="main-title">
       <div class="main-title">
-        <div class="title">退货单信息</div>
+        <div class="title">货单信息</div>
       </div>
       </div>
       <div class="diy-table-1">
       <div class="diy-table-1">
         <el-row :gutter="0">
         <el-row :gutter="0">
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
-            <div class="label">退货单号</div>
-            <div class="value">2022123233435342</div>
+            <div class="label">货单号</div>
+            <div class="value">{{detailData.retreatOrderNo}}</div>
           </el-col>
           </el-col>
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
-            <div class="label">退换日期</div>
-            <div class="value">2022123233435342</div>
+            <div class="label">发货日期</div>
+            <div class="value">{{detailData.shipTime}}</div>
           </el-col>
           </el-col>
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
             <div class="label">业务类型</div>
             <div class="label">业务类型</div>
-            <div class="value">2022123233435342</div>
+            <div class="value">{{detailData.type}}</div>
           </el-col>
           </el-col>
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
             <div class="label">销售类型</div>
             <div class="label">销售类型</div>
-            <div class="value">万豪仓</div>
+            <div class="value">{{detailData.salesType}}</div>
           </el-col>
           </el-col>
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
             <div class="label">订单号</div>
             <div class="label">订单号</div>
-            <div class="value">2022123233435342</div>
+            <div class="value">{{detailData.orderNo}}</div>
           </el-col>
           </el-col>
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
             <div class="label">发票号</div>
             <div class="label">发票号</div>
-            <div class="value">广州格匠机电有限公司</div>
+            <div class="value">{{detailData.billNumber}}</div>
           </el-col>
           </el-col>
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
             <div class="label">客户名称</div>
             <div class="label">客户名称</div>
-            <div class="value">广州格匠机电有限公司</div>
+            <div class="value">{{detailData.clientName}}</div>
           </el-col>
           </el-col>
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
             <div class="label">销售部门</div>
             <div class="label">销售部门</div>
-            <div class="value">广州格匠机电有限公司</div>
+            <div class="value">{{detailData.salesDep}}</div>
           </el-col>
           </el-col>
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
             <div class="label">业务员</div>
             <div class="label">业务员</div>
-            <div class="value">广州格匠机电有限公司</div>
+            <div class="value">{{detailData.salesman}}</div>
           </el-col>
           </el-col>
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
             <div class="label">工程编号</div>
             <div class="label">工程编号</div>
-            <div class="value">广州格匠机电有限公司</div>
+            <div class="value">{{detailData.projectNumber}}</div>
           </el-col>
           </el-col>
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
             <div class="label">币种</div>
             <div class="label">币种</div>
-            <div class="value">广州格匠机电有限公司</div>
+            <div class="value">{{detailData.currency}}</div>
           </el-col>
           </el-col>
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
             <div class="label">订单类型</div>
             <div class="label">订单类型</div>
-            <div class="value">广州格匠机电有限公司</div>
+            <div class="value">{{detailData.orderType}}</div>
           </el-col>
           </el-col>
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
             <div class="label">仓库</div>
             <div class="label">仓库</div>
-            <div class="value">广州格匠机电有限公司</div>
+            <div class="value">{{detailData.stockName}}</div>
           </el-col>
           </el-col>
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
-            <div class="label">发货单号</div>
-            <div class="value">广州格匠机电有限公司</div>
+            <div class="label">发货申请单号</div>
+            <div class="value">{{detailData.invoiceOrderNo}}</div>
           </el-col>
           </el-col>
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
             <div class="label">台账备注</div>
             <div class="label">台账备注</div>
-            <div class="value">广州格匠机电有限公司</div>
+            <div class="value">{{detailData.iedgerRemark}}</div>
           </el-col>
           </el-col>
-          <el-col :xs="24" :sm="24" :lg="24" class="item">
+          <el-col :span="16" class="item">
             <div class="label">备注</div>
             <div class="label">备注</div>
-            <div class="value">2022123233435342</div>
+            <div class="value">{{detailData.remark}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">项目名称</div>
+            <div class="value">{{detailData.projectName}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">外仓印刷单号</div>
+            <div class="value">{{detailData.printingSheet}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">厂工程编码</div>
+            <div class="value">{{detailData.factoryNumber}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">开票日期</div>
+            <div class="value">{{detailData.billingTime}}</div>
+          </el-col>
+          <el-col :span="16" class="item">
+            <div class="label">文件编号</div>
+            <div class="value">{{detailData.fileNumber}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">税率</div>
+            <div class="value">{{detailData.taxRate}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">订单日期</div>
+            <div class="value">{{detailData.createTime}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">制单人</div>
+            <div class="value">{{detailData.createBy}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">制单时间</div>
+            <div class="value">{{detailData.createTime}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">审核人</div>
+            <div class="value">{{detailData.retreatOrderNo}}</div>
+          </el-col>
+          <el-col :span="16" class="item">
+            <div class="label">审核时间</div>
+            <div class="value">{{detailData.retreatOrderNo}}</div>
           </el-col>
           </el-col>
         </el-row>
         </el-row>
       </div>
       </div>
@@ -78,36 +122,25 @@
       <div class="main-title">
       <div class="main-title">
         <div class="title">货品信息</div>
         <div class="title">货品信息</div>
       </div>
       </div>
-      <div class="diy-table-2">
-        <div class="head">
-          <el-row :gutter="20">
-            <el-col :span="2">序号</el-col>
-            <el-col :span="4">产品编号</el-col>
-            <el-col :span="8">产品名称</el-col>
-            <el-col :span="2">规格型号</el-col>
-            <el-col :span="2">内机编码</el-col>
-            <el-col :span="2">外机编码</el-col>
-            <el-col :span="2">单位</el-col>
-            <el-col :span="2">数量</el-col>
-          </el-row>
-        </div>
-        <div class="body">
-          <el-row v-for="(item, index) in goodsList" :key="item.goodsId" :gutter="20">
-            <el-col :span="2">{{ index + 1 }}</el-col>
-            <el-col :span="4">{{ item.goodsId || 0 }}</el-col>
-            <el-col :span="8">{{ item.goodsName || 0 }}</el-col>
-            <el-col :span="2">{{ item.salesUnit || 0 }}</el-col>
-            <el-col :span="2">{{ item.price || 0 }}</el-col>
-            <el-col :span="2">{{ item.saleQty || 0 }}</el-col>
-            <el-col :span="2">{{ item.saleValue || 0 }}</el-col>
-            <el-col :span="2">{{ item.saleValue || 0 }}</el-col>
-          </el-row>
-        </div>
-        <div class="foot">
-          <el-row :gutter="20">
-            <el-col :span="24">合计</el-col>
-          </el-row>
-        </div>
+      <div class="table">
+        <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="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="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="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>
+          <el-table-column align="center" label="折扣额" prop="discountPrice" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="折扣后单价" prop="discountPrice" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="退补标记" prop="refund" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="厂产品代码" prop="factoryNumber" min-width="100" show-overflow-tooltip></el-table-column>
+        </el-table>
       </div>
       </div>
 
 
     </div>
     </div>
@@ -126,7 +159,7 @@
 
 
 <script>
 <script>
 import print from 'vue-print-nb'
 import print from 'vue-print-nb'
-import { getList } from "@/api/supply/sales";
+import { getDetail } from "@/api/supply/return";
 
 
 export default {
 export default {
   name: 'DeliverDetail',
   name: 'DeliverDetail',
@@ -140,9 +173,7 @@ export default {
       printObj: {
       printObj: {
         id: 'printMe'
         id: 'printMe'
       },
       },
-      goodsList: [{
-        goodsId: 1,
-      }]
+      detailData: {},
     }
     }
   },
   },
 
 
@@ -159,7 +190,7 @@ export default {
   },
   },
 
 
   created() {
   created() {
-
+    this.getDetail();
   },
   },
 
 
   methods: {
   methods: {
@@ -167,6 +198,14 @@ export default {
     goBack() {
     goBack() {
       this.$emit('backListFormDetail');
       this.$emit('backListFormDetail');
     },
     },
+
+    // 获取详情
+    getDetail() {
+      getDetail({id: this.listItem.id}).then(res => {
+        this.detailData = res.data;
+      })
+    },
+
   }
   }
 }
 }
 </script>
 </script>

+ 110 - 59
src/views/supply/deliver/components/engin_detail.vue

@@ -4,61 +4,117 @@
 
 
     <div id="printMe">
     <div id="printMe">
       <div class="main-title">
       <div class="main-title">
-        <div class="title">退货单信息</div>
+        <div class="title">货单信息</div>
       </div>
       </div>
       <div class="diy-table-1">
       <div class="diy-table-1">
         <el-row :gutter="0">
         <el-row :gutter="0">
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
-            <div class="label">退货单号</div>
-            <div class="value">2022123233435342</div>
+            <div class="label">货单号</div>
+            <div class="value">{{detailData.retreatOrderNo}}</div>
           </el-col>
           </el-col>
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
-            <div class="label">退换日期</div>
-            <div class="value">2022123233435342</div>
+            <div class="label">发货日期</div>
+            <div class="value">{{detailData.shipTime}}</div>
           </el-col>
           </el-col>
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
-            <div class="label">发票号</div>
-            <div class="value">2022123233435342</div>
+            <div class="label">业务类型</div>
+            <div class="value">{{detailData.type}}</div>
           </el-col>
           </el-col>
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
             <div class="label">销售类型</div>
             <div class="label">销售类型</div>
-            <div class="value">万豪仓</div>
+            <div class="value">{{detailData.salesType}}</div>
           </el-col>
           </el-col>
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
-            <div class="label">电商订单号</div>
-            <div class="value">2022123233435342</div>
+            <div class="label">订单号</div>
+            <div class="value">{{detailData.orderNo}}</div>
           </el-col>
           </el-col>
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
-            <div class="label">业务员</div>
-            <div class="value">广州格匠机电有限公司</div>
+            <div class="label">发票号</div>
+            <div class="value">{{detailData.billNumber}}</div>
           </el-col>
           </el-col>
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
             <div class="label">客户名称</div>
             <div class="label">客户名称</div>
-            <div class="value">广州格匠机电有限公司</div>
+            <div class="value">{{detailData.clientName}}</div>
           </el-col>
           </el-col>
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
             <div class="label">销售部门</div>
             <div class="label">销售部门</div>
-            <div class="value">广州格匠机电有限公司</div>
+            <div class="value">{{detailData.salesDep}}</div>
           </el-col>
           </el-col>
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
-            <div class="label"></div>
-            <div class="value"></div>
+            <div class="label">业务员</div>
+            <div class="value">{{detailData.salesman}}</div>
           </el-col>
           </el-col>
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
-            <div class="label">仓库</div>
-            <div class="value">广州格匠机电有限公司</div>
+            <div class="label">工程编号</div>
+            <div class="value">{{detailData.projectNumber}}</div>
           </el-col>
           </el-col>
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
             <div class="label">币种</div>
             <div class="label">币种</div>
-            <div class="value">广州格匠机电有限公司</div>
+            <div class="value">{{detailData.currency}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">订单类型</div>
+            <div class="value">{{detailData.orderType}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">仓库</div>
+            <div class="value">{{detailData.stockName}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">发货申请单号</div>
+            <div class="value">{{detailData.invoiceOrderNo}}</div>
           </el-col>
           </el-col>
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
             <div class="label">台账备注</div>
             <div class="label">台账备注</div>
-            <div class="value">广州格匠机电有限公司</div>
+            <div class="value">{{detailData.iedgerRemark}}</div>
           </el-col>
           </el-col>
-          <el-col :xs="24" :sm="24" :lg="24" class="item">
+          <el-col :span="16" class="item">
             <div class="label">备注</div>
             <div class="label">备注</div>
-            <div class="value">2022123233435342</div>
+            <div class="value">{{detailData.remark}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">项目名称</div>
+            <div class="value">{{detailData.projectName}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">外仓印刷单号</div>
+            <div class="value">{{detailData.printingSheet}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">厂工程编码</div>
+            <div class="value">{{detailData.factoryNumber}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">开票日期</div>
+            <div class="value">{{detailData.billingTime}}</div>
+          </el-col>
+          <el-col :span="16" class="item">
+            <div class="label">文件编号</div>
+            <div class="value">{{detailData.fileNumber}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">税率</div>
+            <div class="value">{{detailData.taxRate}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">订单日期</div>
+            <div class="value">{{detailData.createTime}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">制单人</div>
+            <div class="value">{{detailData.createBy}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">制单时间</div>
+            <div class="value">{{detailData.createTime}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">审核人</div>
+            <div class="value">{{detailData.retreatOrderNo}}</div>
+          </el-col>
+          <el-col :span="16" class="item">
+            <div class="label">审核时间</div>
+            <div class="value">{{detailData.retreatOrderNo}}</div>
           </el-col>
           </el-col>
         </el-row>
         </el-row>
       </div>
       </div>
@@ -66,36 +122,25 @@
       <div class="main-title">
       <div class="main-title">
         <div class="title">货品信息</div>
         <div class="title">货品信息</div>
       </div>
       </div>
-      <div class="diy-table-2">
-        <div class="head">
-          <el-row :gutter="20">
-            <el-col :span="2">序号</el-col>
-            <el-col :span="4">产品编号</el-col>
-            <el-col :span="8">产品名称</el-col>
-            <el-col :span="2">规格型号</el-col>
-            <el-col :span="2">内机编码</el-col>
-            <el-col :span="2">外机编码</el-col>
-            <el-col :span="2">单位</el-col>
-            <el-col :span="2">数量</el-col>
-          </el-row>
-        </div>
-        <div class="body">
-          <el-row v-for="(item, index) in goodsList" :key="item.goodsId" :gutter="20">
-            <el-col :span="2">{{ index + 1 }}</el-col>
-            <el-col :span="4">{{ item.goodsId || 0 }}</el-col>
-            <el-col :span="8">{{ item.goodsName || 0 }}</el-col>
-            <el-col :span="2">{{ item.salesUnit || 0 }}</el-col>
-            <el-col :span="2">{{ item.price || 0 }}</el-col>
-            <el-col :span="2">{{ item.saleQty || 0 }}</el-col>
-            <el-col :span="2">{{ item.saleValue || 0 }}</el-col>
-            <el-col :span="2">{{ item.saleValue || 0 }}</el-col>
-          </el-row>
-        </div>
-        <div class="foot">
-          <el-row :gutter="20">
-            <el-col :span="24">合计</el-col>
-          </el-row>
-        </div>
+      <div class="table">
+        <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="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="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="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>
+          <el-table-column align="center" label="折扣额" prop="discountPrice" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="折扣后单价" prop="discountPrice" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="退补标记" prop="refund" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="厂产品代码" prop="factoryNumber" min-width="100" show-overflow-tooltip></el-table-column>
+        </el-table>
       </div>
       </div>
 
 
     </div>
     </div>
@@ -114,11 +159,11 @@
 
 
 <script>
 <script>
 import print from 'vue-print-nb'
 import print from 'vue-print-nb'
-import { getList } from "@/api/supply/sales";
+import { getDetail } from "@/api/supply/return";
 
 
 export default {
 export default {
-  name: 'OnlineDetail',
-  componentName: 'OnlineDetail',
+  name: 'EnginDetail',
+  componentName: 'EnginDetail',
   props: ['listItem'],
   props: ['listItem'],
   directives: {
   directives: {
     print
     print
@@ -128,9 +173,7 @@ export default {
       printObj: {
       printObj: {
         id: 'printMe'
         id: 'printMe'
       },
       },
-      goodsList: [{
-        goodsId: 1,
-      }]
+      detailData: {},
     }
     }
   },
   },
 
 
@@ -147,7 +190,7 @@ export default {
   },
   },
 
 
   created() {
   created() {
-
+    this.getDetail();
   },
   },
 
 
   methods: {
   methods: {
@@ -155,6 +198,14 @@ export default {
     goBack() {
     goBack() {
       this.$emit('backListFormDetail');
       this.$emit('backListFormDetail');
     },
     },
+
+    // 获取详情
+    getDetail() {
+      getDetail({id: this.listItem.id}).then(res => {
+        this.detailData = res.data;
+      })
+    },
+
   }
   }
 }
 }
 </script>
 </script>

+ 40 - 52
src/views/supply/deliver/deliver_list.vue

@@ -5,21 +5,17 @@
       <div class="screen-container">
       <div class="screen-container">
         <el-form ref="screenForm" :model="screenForm" label-width="90px" size="small" label-position="left">
         <el-form ref="screenForm" :model="screenForm" label-width="90px" size="small" label-position="left">
           <el-row :gutter="20">
           <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-group>
-              </el-form-item>
-            </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="发货单号" prop="orderNum">
               <el-form-item label="发货单号" prop="orderNum">
                 <el-input v-model="screenForm.orderNum" placeholder="请输入发货单号"></el-input>
                 <el-input v-model="screenForm.orderNum" placeholder="请输入发货单号"></el-input>
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
             <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>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="经销商名称" prop="jxsName">
               <el-form-item label="经销商名称" prop="jxsName">
                 <el-input v-model="screenForm.jxsName" placeholder="请输入经销商名称"></el-input>
                 <el-input v-model="screenForm.jxsName" placeholder="请输入经销商名称"></el-input>
               </el-form-item>
               </el-form-item>
@@ -47,21 +43,8 @@
                 </el-date-picker>
                 </el-date-picker>
               </el-form-item>
               </el-form-item>
             </el-col>
             </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>
-            </el-col>
-            <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="状态" prop="status">
-                <el-select v-model="screenForm.status" placeholder="全部">
-                  <el-option label="全部" value=""></el-option>
-                  <el-option :label="item.label" :value="item.value" v-for="(item, index) in select_status" :key="index"></el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
             
             
-            <el-col :xs="24" :sm="12" :lg="6" class="tr">
+            <el-col :xs="24" :sm="24" :lg="12" class="tr">
               <el-form-item label="">
               <el-form-item label="">
                 <el-button size="small" @click="resetScreenForm">清空</el-button>
                 <el-button size="small" @click="resetScreenForm">清空</el-button>
                 <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
                 <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
@@ -79,17 +62,21 @@
         </div>
         </div>
         <div class="table">
         <div class="table">
           <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
           <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
-            <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="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="aaa" 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="aaa" 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="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="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="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="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="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 }}
+              </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="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="120" fixed="right">
               <template slot-scope="scope">
               <template slot-scope="scope">
                 <el-button type="text" @click="toDetail(scope.row)">详情</el-button>
                 <el-button type="text" @click="toDetail(scope.row)">详情</el-button>
@@ -120,7 +107,7 @@
 
 
 <script>
 <script>
 import { COMMON_SELECT } from '@/utils/select_data'
 import { COMMON_SELECT } from '@/utils/select_data'
-import { getList } from "@/api/supply/sales";
+import { getList } from "@/api/supply/deliver";
 import DeliverDetail from "@/views/supply/deliver/components/deliver_detail";
 import DeliverDetail from "@/views/supply/deliver/components/deliver_detail";
 
 
 export default {
 export default {
@@ -136,17 +123,12 @@ export default {
       listLoading: false, // 列表加载loading
       listLoading: false, // 列表加载loading
       screenForm: { // 筛选表单数据
       screenForm: { // 筛选表单数据
         orderNum: '',
         orderNum: '',
+        jxsNum: '',
         jxsName: '',
         jxsName: '',
         chName: '',
         chName: '',
         model: '',
         model: '',
         date: '',
         date: '',
-        jxsNum: '',
-        status: '',
       },
       },
-      select_status: [ // 筛选字段 - 状态
-        { label: '正常', value: true },
-        { label: '冻结', value: false }
-      ],
 
 
       queryItem: {},
       queryItem: {},
     }
     }
@@ -155,15 +137,18 @@ export default {
   computed: {
   computed: {
     exParams() {
     exParams() {
       return {
       return {
-        userName: this.screenForm.account,
-        nickName: this.screenForm.nickName,
-        linkPhone: this.screenForm.phone,
-        email: this.screenForm.email,
-        status: this.screenForm.status,
+        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: 1, // 1:发货单,2:工程发货单
       }
       }
     },
     },
     isShowDetail() {
     isShowDetail() {
-      return this.queryItem.hasOwnProperty('adminUserId');
+      return this.queryItem.hasOwnProperty('id');
     },
     },
   },
   },
 
 
@@ -188,11 +173,14 @@ export default {
       let params = {
       let params = {
         pageNum: this.currentPage,
         pageNum: this.currentPage,
         pageSize: this.pageSize,
         pageSize: this.pageSize,
-        userName: this.screenForm.account,
-        nickName: this.screenForm.nickName,
-        linkPhone: this.screenForm.phone,
-        email: this.screenForm.email,
-        status: this.screenForm.status,
+        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: 1, // 1:发货单,2:工程发货单
       };
       };
       getList(params).then((res) => {
       getList(params).then((res) => {
         this.dataList = res.data.records;
         this.dataList = res.data.records;

+ 39 - 28
src/views/supply/deliver/engin_list.vue

@@ -87,19 +87,24 @@
         </div>
         </div>
         <div class="table">
         <div class="table">
           <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
           <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
-            <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="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="aaa" 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="aaa" 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="aaa" 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="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="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="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="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="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="remark" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="制单人" prop="createBy" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="制单日期" prop="createTime" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="审单人" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="审单日期" prop="aaa" min-width="200" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="状态" prop="aaa" min-width="200" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="操作" width="120" fixed="right">
             <el-table-column align="center" label="操作" width="120" fixed="right">
               <template slot-scope="scope">
               <template slot-scope="scope">
                 <el-button type="text" @click="toDetail(scope.row)">详情</el-button>
                 <el-button type="text" @click="toDetail(scope.row)">详情</el-button>
@@ -123,19 +128,19 @@
       </div>
       </div>
     </div>
     </div>
     
     
-    <OnlineDetail :listItem="queryItem" v-if="isShowDetail" @backListFormDetail="backList" />
+    <EnginDetail :listItem="queryItem" v-if="isShowDetail" @backListFormDetail="backList" />
 
 
   </div>
   </div>
 </template>
 </template>
 
 
 <script>
 <script>
 import { COMMON_SELECT } from '@/utils/select_data'
 import { COMMON_SELECT } from '@/utils/select_data'
-import { getList } from "@/api/supply/sales";
-import OnlineDetail from "@/views/supply/return/components/online_detail";
+import { getList } from "@/api/supply/deliver";
+import EnginDetail from "@/views/supply/deliver/components/engin_detail";
 
 
 export default {
 export default {
   components: {
   components: {
-    OnlineDetail,
+    EnginDetail,
   },
   },
   data() {
   data() {
     return {
     return {
@@ -165,15 +170,18 @@ export default {
   computed: {
   computed: {
     exParams() {
     exParams() {
       return {
       return {
-        userName: this.screenForm.account,
-        nickName: this.screenForm.nickName,
-        linkPhone: this.screenForm.phone,
-        email: this.screenForm.email,
-        status: this.screenForm.status,
+        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:工程发货单
       }
       }
     },
     },
     isShowDetail() {
     isShowDetail() {
-      return this.queryItem.hasOwnProperty('adminUserId');
+      return this.queryItem.hasOwnProperty('id');
     },
     },
   },
   },
 
 
@@ -198,11 +206,14 @@ export default {
       let params = {
       let params = {
         pageNum: this.currentPage,
         pageNum: this.currentPage,
         pageSize: this.pageSize,
         pageSize: this.pageSize,
-        userName: this.screenForm.account,
-        nickName: this.screenForm.nickName,
-        linkPhone: this.screenForm.phone,
-        email: this.screenForm.email,
-        status: this.screenForm.status,
+        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:工程发货单
       };
       };
       getList(params).then((res) => {
       getList(params).then((res) => {
         this.dataList = res.data.records;
         this.dataList = res.data.records;

+ 224 - 118
src/views/supply/pickup/book.vue

@@ -2,78 +2,80 @@
   <div class="app-container">
   <div class="app-container">
     <!-- 筛选条件 -->
     <!-- 筛选条件 -->
     <div>
     <div>
-      <el-form ref="screenForm" :model="screenForm" label-width="70px" size="small" label-position="left">
+      <el-form ref="mainForm" :model="mainForm" :rules="mainFormRules" label-width="80px" size="small" label-position="left">
         <el-row :gutter="20">
         <el-row :gutter="20">
           <el-col :xs="24" :sm="12" :lg="6">
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="仓库" prop="status">
-              <el-select v-model="screenForm.status" placeholder="全部">
-                <el-option label="全部" value=""></el-option>
-                <el-option :label="item.label" :value="item.value" v-for="(item, index) in select_status" :key="index"></el-option>
+            <el-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-select>
               </el-select>
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-button size="small" type="primary" @click="submitScreenForm">确定</el-button>
+            <el-button size="small" type="primary" @click="getDeliverList">确定</el-button>
           </el-col>
           </el-col>
         </el-row>
         </el-row>
         <el-row :gutter="20">
         <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" style="height: 51px;">
           <el-col :xs="24" :sm="12" :lg="6" style="height: 51px;">
             <el-form-item label="预约日期" prop="date">
             <el-form-item label="预约日期" prop="date">
               <el-date-picker
               <el-date-picker
-                v-model="screenForm.date"
+                v-model="mainForm.date"
                 type="date"
                 type="date"
+                value-format="yyyy-MM-dd"
                 style="width: 100%;"
                 style="width: 100%;"
                 placeholder="选择日期">
                 placeholder="选择日期">
               </el-date-picker>
               </el-date-picker>
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="12" style="height: 51px;">
           <el-col :xs="24" :sm="12" :lg="12" style="height: 51px;">
-            <el-form-item label="预约时段" prop="date">
-              <el-date-picker
-                v-model="screenForm.date"
-                type="datetimerange"
+            <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="至"
                 range-separator="至"
-                style="width: 100%;"
-                value-format="yyyy-MM-dd HH:mm:ss"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期">
-              </el-date-picker>
+                start-placeholder="开始时间"
+                end-placeholder="结束时间"
+                placeholder="选择时间范围">
+              </el-time-picker>
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
+        </el-row>
+        <el-row :gutter="20">
           <el-col :xs="24" :sm="12" :lg="6">
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="提货方式" prop="status">
-              <el-select v-model="screenForm.status" placeholder="全部">
-                <el-option label="全部" value=""></el-option>
-                <el-option :label="item.label" :value="item.value" v-for="(item, index) in select_status" :key="index"></el-option>
+            <el-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-select>
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
         </el-row>
         </el-row>
         <el-row :gutter="20">
         <el-row :gutter="20">
           <el-col :xs="24" :sm="12" :lg="6">
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="提货人" prop="status">
-              <el-select v-model="screenForm.status" placeholder="全部">
-                <el-option label="全部" value=""></el-option>
-                <el-option :label="item.label" :value="item.value" v-for="(item, index) in select_status" :key="index"></el-option>
+            <el-form-item label="提货人" prop="pickupMan">
+              <el-select v-model="mainForm.pickupMan" placeholder="全部" style="width: 100%">
+                <el-option :label="item.takerName" :value="item.id" v-for="(item, index) in pickupManList" :key="index"></el-option>
               </el-select>
               </el-select>
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="提货车辆" prop="status">
-              <el-select v-model="screenForm.status" placeholder="全部">
-                <el-option label="全部" value=""></el-option>
-                <el-option :label="item.label" :value="item.value" v-for="(item, index) in select_status" :key="index"></el-option>
+          <el-col :xs="24" :sm="12" :lg="6" v-if="mainForm.pickupWay == '1'">
+            <el-form-item label="提货车辆" prop="pickupCar">
+              <el-select v-model="mainForm.pickupCar" placeholder="全部" style="width: 100%">
+                <el-option :label="item.carBrand" :value="item.id" v-for="(item, index) in pickupCarList" :key="index"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6" v-if="mainForm.pickupWay == '2'">
+            <el-form-item label="物流公司" prop="company">
+              <el-select v-model="mainForm.company" placeholder="全部" style="width: 100%">
+                <el-option :label="item.logisticsCompany" :value="item.logisticsNumber" v-for="(item, index) in companyList" :key="index"></el-option>
               </el-select>
               </el-select>
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="12">
           <el-col :xs="24" :sm="12" :lg="12">
-            <el-form-item label="备注" prop="orderNum">
-              <el-input v-model="screenForm.orderNum" placeholder="请输入备注"></el-input>
+            <el-form-item label="备注内容" prop="remark">
+              <el-input v-model="mainForm.remark" placeholder="请输入备注内容"></el-input>
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
         </el-row>
         </el-row>
@@ -82,31 +84,49 @@
 
 
     <div class="mymain-container">
     <div class="mymain-container">
       <div class="table">
       <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="aaa" 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="aaa" 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="aaa" 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="aaa" 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="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 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>
+            </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>
         </el-table>
       </div>
       </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="page-footer">
+      <div class="footer" :class="classObj">
+        <el-button type="primary" @click="clickSubmitForm" :loading="formLoading">{{ formLoading ? '提交中 ...' : '提 交' }}</el-button>
+        <el-popconfirm title="确定重置吗?" @onConfirm="resetForm" style="margin-left: 10px;">
+          <el-button slot="reference">重 置</el-button>
+        </el-popconfirm>
       </div>
       </div>
     </div>
     </div>
 
 
@@ -114,50 +134,67 @@
 </template>
 </template>
 
 
 <script>
 <script>
-import { COMMON_SELECT } from '@/utils/select_data'
-import { getList } from "@/api/supply/purchase";
+import { getWarehouseList, getDeliverList, getPickupManList, getPickupCarList, getCompanyList, addPickupBook } from "@/api/supply/pickup";
+import { getDictList } from "@/api/common";
+import { findElem } from "@/utils/util";
 
 
 export default {
 export default {
   data() {
   data() {
     return {
     return {
-      currentPage: 1, // 当前页码
-      pageSize: 10, // 每页数量
-      listTotal: 0, // 列表总数
-      dataList: null, // 列表数据
+      deliverList: null, // 列表数据
       listLoading: false, // 列表加载loading
       listLoading: false, // 列表加载loading
-      screenForm: { // 筛选表单数据
-        orderNum: '',
-        jxsName: '',
-        chName: '',
-        model: '',
+      mainForm: { // 筛选表单数据
+        warehouse: '',
         date: '',
         date: '',
-        jxsNum: '',
-        status: '',
+        timeSlot: '',
+        pickupWay: '',
+        pickupMan: '',
+        pickupCar: '',
+        company: '',
+        remark: '',
       },
       },
-      select_status: [ // 筛选字段 - 状态
-        { label: '正常', value: true },
-        { label: '冻结', value: false }
-      ],
-
-      jumpType: '',
-      queryItem: {},
+      mainFormRules: {
+        date: [
+          { required: true, message: '请选择预约日期', trigger: 'change' }
+        ],
+        timeSlot: [
+          { required: true, message: '请选择预约时段', trigger: 'change' }
+        ],
+        pickupWay: [
+          { required: true, message: '请选择提货方式', trigger: 'change' }
+        ],
+        pickupMan: [
+          { required: true, message: '请选择提货人', trigger: 'change' }
+        ],
+      },
+      formLoading: false,
+      tableSelection: [],
+      warehouseList: [],
+      pickupWayList: [],
+      pickupManList: [],
+      pickupCarList: [],
+      companyList: [],
     }
     }
   },
   },
 
 
   computed: {
   computed: {
-    exParams() {
+    sidebar() {
+      return this.$store.state.app.sidebar
+    },
+    classObj() {
       return {
       return {
-        userName: this.screenForm.account,
-        nickName: this.screenForm.nickName,
-        linkPhone: this.screenForm.phone,
-        email: this.screenForm.email,
-        status: this.screenForm.status,
+        hideSidebar: !this.sidebar.opened,
+        openSidebar: this.sidebar.opened
       }
       }
     },
     },
   },
   },
 
 
   created() {
   created() {
-    this.getList();
+    this.getWarehouseList();
+    this.getPickupWayList();
+    this.getPickupManList();
+    this.getPickupCarList();
+    this.getCompanyList();
   },
   },
 
 
   methods: {
   methods: {
@@ -170,51 +207,120 @@ export default {
       return true
       return true
     },
     },
 
 
+    // 获取仓库列表
+    getWarehouseList() {
+      getWarehouseList({
+        pageNum: 1,
+        pageSize: -1
+      }).then((res) => {
+        this.warehouseList = res.data.records;
+      })
+    },
+
+    // 获取提货方式列表
+    getPickupWayList() {
+      getDictList({sysDictEnum: 'PICK'}).then(res => {
+        this.pickupWayList = res.data;
+      })
+    },
+
+    // 获取提货人列表
+    getPickupManList() {
+      getPickupManList({
+        pageNum: 1,
+        pageSize: -1
+      }).then(res => {
+        this.pickupManList = res.data.records;
+      })
+    },
+
+    // 获取提货车辆列表
+    getPickupCarList() {
+      getPickupCarList({
+        pageNum: 1,
+        pageSize: -1
+      }).then(res => {
+        this.pickupCarList = res.data.records;
+      })
+    },
+
+    // 获取物流公司列表
+    getCompanyList() {
+      getCompanyList({
+        pageNum: 1,
+        pageSize: -1
+      }).then(res => {
+        this.companyList = res.data.records;
+      })
+    },
+
     // 查询列表
     // 查询列表
-    getList() {
+    getDeliverList() {
+      if(!this.mainForm.warehouse) {
+        return this.$errorMsg('请选择仓库');
+      }
       this.listLoading = true;
       this.listLoading = true;
-
-      let params = {
-        pageNum: this.currentPage,
-        pageSize: this.pageSize,
-        userName: this.screenForm.account,
-        nickName: this.screenForm.nickName,
-        linkPhone: this.screenForm.phone,
-        email: this.screenForm.email,
-        status: this.screenForm.status,
-      };
-      getList(params).then((res) => {
-        this.dataList = res.data.records;
-        this.listTotal = res.data.total;
+      getDeliverList({stockName: this.mainForm.warehouse}).then((res) => {
+        this.deliverList = res.data;
         this.listLoading = false;
         this.listLoading = false;
       })
       })
     },
     },
 
 
-    // 提交筛选表单
-    submitScreenForm() {
-      this.currentPage = 1;
-      this.getList();
+    handleSelectionChange(val) {
+      this.tableSelection = val;
     },
     },
 
 
-    // 重置筛选表单
-    resetScreenForm() {
-      this.$refs.screenForm.resetFields();
-      this.currentPage = 1;
-      this.getList();
-    },
+    clickSubmitForm() {
+      this.$refs.mainForm.validate((valid) => {
+        if (valid) {
+          if(this.tableSelection.length < 1) {
+            return this.$errorMsg('请选择发货单');
+          }
 
 
-    // 更改每页数量
-    handleSizeChange(val) {
-      this.pageSize = val;
-      this.currentPage = 1;
-      this.getList();
+          this.formLoading = true;
+          let takerName = '';
+          if(this.mainForm.pickupMan) {
+            let index = findElem(this.pickupManList, 'id', this.mainForm.pickupMan);
+            takerName = this.pickupManList[index].takerName;
+          }
+          let orderList = [];
+          this.tableSelection.forEach(item => {
+            orderList.push(item.id);
+          });
+          let params = {
+            stockName: this.mainForm.warehouse,
+            pickTime: this.mainForm.date,
+            pickStartTime: this.mainForm.timeSlot[0],
+            pickEndTime: this.mainForm.timeSlot[1],
+            pickType: Number(this.mainForm.pickupWay),
+            takerId: this.mainForm.pickupMan,
+            takerName,
+            remark: this.mainForm.remark,
+            shipDocumentBeans: orderList,
+          }
+          if(this.mainForm.pickupWay == '1') {
+            params.takerCarId = this.mainForm.pickupCar;
+          }
+          if(this.mainForm.pickupWay == '2') {
+            params.pickLogistics = this.mainForm.company;
+          }
+          addPickupBook(params).then(res => {
+            this.$successMsg('提交成功');
+            setTimeout(() => {
+              this.resetForm();
+            }, 1500)
+          }).finally(res => {
+            this.formLoading = false;
+          })
+        }
+      })
     },
     },
 
 
-    // 更改当前页
-    handleCurrentChange(val) {
-      this.currentPage = val;
-      this.getList();
+    resetForm() {
+      this.$refs.mainForm.resetFields();
+      this.deliverList = [];
     },
     },
+
   }
   }
 }
 }
 </script>
 </script>

+ 39 - 51
src/views/supply/pickup/pickup_list.vue

@@ -4,28 +4,19 @@
     <div class="screen-container">
     <div class="screen-container">
       <el-form ref="screenForm" :model="screenForm" label-width="100px" size="small" label-position="left">
       <el-form ref="screenForm" :model="screenForm" label-width="100px" size="small" label-position="left">
         <el-row :gutter="20">
         <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-group>
-            </el-form-item>
-          </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="申请发货单号" prop="orderNum">
             <el-form-item label="申请发货单号" prop="orderNum">
               <el-input v-model="screenForm.orderNum" placeholder="请输入申请发货单号"></el-input>
               <el-input v-model="screenForm.orderNum" placeholder="请输入申请发货单号"></el-input>
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
           <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="applyName">
+              <el-input v-model="screenForm.applyName" placeholder="请输入申请人"></el-input>
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
           <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="warehouse">
+              <el-input v-model="screenForm.warehouse" placeholder="请输入提货仓库"></el-input>
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
           <el-col :xs="24" :sm="12" :lg="6">
@@ -60,23 +51,31 @@
       </div>
       </div>
       <div class="table">
       <div class="table">
         <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
         <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
-          <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="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="aaa" 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="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="状态" prop="aaa" 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="提货时段" prop="aaa" 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="aaa" 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="aaa" 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="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="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="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="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="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="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="remark" min-width="100" show-overflow-tooltip></el-table-column>
         </el-table>
         </el-table>
       </div>
       </div>
     </div>
     </div>
@@ -98,8 +97,7 @@
 </template>
 </template>
 
 
 <script>
 <script>
-import { COMMON_SELECT } from '@/utils/select_data'
-import { getList } from "@/api/supply/purchase";
+import { getPickupList } from "@/api/supply/pickup";
 
 
 export default {
 export default {
   data() {
   data() {
@@ -111,31 +109,21 @@ export default {
       listLoading: false, // 列表加载loading
       listLoading: false, // 列表加载loading
       screenForm: { // 筛选表单数据
       screenForm: { // 筛选表单数据
         orderNum: '',
         orderNum: '',
-        jxsName: '',
-        chName: '',
-        model: '',
+        applyName: '',
+        warehouse: '',
         date: '',
         date: '',
-        jxsNum: '',
-        status: '',
       },
       },
-      select_status: [ // 筛选字段 - 状态
-        { label: '正常', value: true },
-        { label: '冻结', value: false }
-      ],
-
-      jumpType: '',
-      queryItem: {},
     }
     }
   },
   },
 
 
   computed: {
   computed: {
     exParams() {
     exParams() {
       return {
       return {
-        userName: this.screenForm.account,
-        nickName: this.screenForm.nickName,
-        linkPhone: this.screenForm.phone,
-        email: this.screenForm.email,
-        status: this.screenForm.status,
+        shipOrderNo: this.screenForm.orderNum,
+        createBy: this.screenForm.applyName,
+        stockName: this.screenForm.warehouse,
+        pickStartTime: this.screenForm.date ? this.screenForm.date[0] : '',
+        pickEndTime: this.screenForm.date ? this.screenForm.date[1] : '',
       }
       }
     },
     },
   },
   },
@@ -161,13 +149,13 @@ export default {
       let params = {
       let params = {
         pageNum: this.currentPage,
         pageNum: this.currentPage,
         pageSize: this.pageSize,
         pageSize: this.pageSize,
-        userName: this.screenForm.account,
-        nickName: this.screenForm.nickName,
-        linkPhone: this.screenForm.phone,
-        email: this.screenForm.email,
-        status: this.screenForm.status,
+        shipOrderNo: this.screenForm.orderNum,
+        createBy: this.screenForm.applyName,
+        stockName: this.screenForm.warehouse,
+        pickStartTime: this.screenForm.date ? this.screenForm.date[0] : '',
+        pickEndTime: this.screenForm.date ? this.screenForm.date[1] : '',
       };
       };
-      getList(params).then((res) => {
+      getPickupList(params).then((res) => {
         this.dataList = res.data.records;
         this.dataList = res.data.records;
         this.listTotal = res.data.total;
         this.listTotal = res.data.total;
         this.listLoading = false;
         this.listLoading = false;

+ 54 - 53
src/views/supply/return/components/return_detail.vue

@@ -10,67 +10,67 @@
         <el-row :gutter="0">
         <el-row :gutter="0">
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
             <div class="label">退货单号</div>
             <div class="label">退货单号</div>
-            <div class="value">2022123233435342</div>
+            <div class="value">{{detailData.retreatOrderNo}}</div>
           </el-col>
           </el-col>
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
-            <div class="label">退日期</div>
-            <div class="value">2022123233435342</div>
+            <div class="label">退日期</div>
+            <div class="value">{{detailData.retreatTime}}</div>
           </el-col>
           </el-col>
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
             <div class="label">业务类型</div>
             <div class="label">业务类型</div>
-            <div class="value">2022123233435342</div>
+            <div class="value">{{detailData.aaa}}</div>
           </el-col>
           </el-col>
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
             <div class="label">销售类型</div>
             <div class="label">销售类型</div>
-            <div class="value">万豪仓</div>
+            <div class="value">{{detailData.salesType}}</div>
           </el-col>
           </el-col>
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
             <div class="label">订单号</div>
             <div class="label">订单号</div>
-            <div class="value">2022123233435342</div>
+            <div class="value">{{detailData.orderNo}}</div>
           </el-col>
           </el-col>
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
             <div class="label">发票号</div>
             <div class="label">发票号</div>
-            <div class="value">广州格匠机电有限公司</div>
+            <div class="value">{{detailData.billNumber}}</div>
           </el-col>
           </el-col>
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
             <div class="label">客户名称</div>
             <div class="label">客户名称</div>
-            <div class="value">广州格匠机电有限公司</div>
+            <div class="value">{{detailData.clientName}}</div>
           </el-col>
           </el-col>
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
             <div class="label">销售部门</div>
             <div class="label">销售部门</div>
-            <div class="value">广州格匠机电有限公司</div>
+            <div class="value">{{detailData.salesDep}}</div>
           </el-col>
           </el-col>
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
             <div class="label">业务员</div>
             <div class="label">业务员</div>
-            <div class="value">广州格匠机电有限公司</div>
+            <div class="value">{{detailData.salesman}}</div>
           </el-col>
           </el-col>
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
             <div class="label">工程编号</div>
             <div class="label">工程编号</div>
-            <div class="value">广州格匠机电有限公司</div>
+            <div class="value">{{detailData.projectNumber}}</div>
           </el-col>
           </el-col>
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
             <div class="label">币种</div>
             <div class="label">币种</div>
-            <div class="value">广州格匠机电有限公司</div>
+            <div class="value">{{detailData.currency}}</div>
           </el-col>
           </el-col>
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
             <div class="label">订单类型</div>
             <div class="label">订单类型</div>
-            <div class="value">广州格匠机电有限公司</div>
+            <div class="value">{{detailData.orderType}}</div>
           </el-col>
           </el-col>
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
             <div class="label">仓库</div>
             <div class="label">仓库</div>
-            <div class="value">广州格匠机电有限公司</div>
+            <div class="value">{{detailData.stockName}}</div>
           </el-col>
           </el-col>
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
             <div class="label">发货单号</div>
             <div class="label">发货单号</div>
-            <div class="value">广州格匠机电有限公司</div>
+            <div class="value">{{detailData.invoiceOrderNo}}</div>
           </el-col>
           </el-col>
           <el-col :span="8" class="item">
           <el-col :span="8" class="item">
             <div class="label">台账备注</div>
             <div class="label">台账备注</div>
-            <div class="value">广州格匠机电有限公司</div>
+            <div class="value">{{detailData.iedgerRemark}}</div>
           </el-col>
           </el-col>
           <el-col :xs="24" :sm="24" :lg="24" class="item">
           <el-col :xs="24" :sm="24" :lg="24" class="item">
             <div class="label">备注</div>
             <div class="label">备注</div>
-            <div class="value">2022123233435342</div>
+            <div class="value">{{detailData.remark}}</div>
           </el-col>
           </el-col>
         </el-row>
         </el-row>
       </div>
       </div>
@@ -78,38 +78,34 @@
       <div class="main-title">
       <div class="main-title">
         <div class="title">货品信息</div>
         <div class="title">货品信息</div>
       </div>
       </div>
-      <div class="diy-table-2">
-        <div class="head">
-          <el-row :gutter="20">
-            <el-col :span="2">序号</el-col>
-            <el-col :span="4">产品编号</el-col>
-            <el-col :span="8">产品名称</el-col>
-            <el-col :span="2">规格型号</el-col>
-            <el-col :span="2">内机编码</el-col>
-            <el-col :span="2">外机编码</el-col>
-            <el-col :span="2">单位</el-col>
-            <el-col :span="2">数量</el-col>
-          </el-row>
-        </div>
-        <div class="body">
-          <el-row v-for="(item, index) in goodsList" :key="item.goodsId" :gutter="20">
-            <el-col :span="2">{{ index + 1 }}</el-col>
-            <el-col :span="4">{{ item.goodsId || 0 }}</el-col>
-            <el-col :span="8">{{ item.goodsName || 0 }}</el-col>
-            <el-col :span="2">{{ item.salesUnit || 0 }}</el-col>
-            <el-col :span="2">{{ item.price || 0 }}</el-col>
-            <el-col :span="2">{{ item.saleQty || 0 }}</el-col>
-            <el-col :span="2">{{ item.saleValue || 0 }}</el-col>
-            <el-col :span="2">{{ item.saleValue || 0 }}</el-col>
-          </el-row>
-        </div>
-        <div class="foot">
-          <el-row :gutter="20">
-            <el-col :span="24">合计</el-col>
-          </el-row>
-        </div>
+      <div class="table">
+        <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="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="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="includedPrice" min-width="100" show-overflow-tooltip>
+            <template slot-scope="scope">
+              {{ scope.row.number * scope.row.includedPrice }}
+            </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="price" min-width="100" show-overflow-tooltip>
+            <template slot-scope="scope">
+              {{ scope.row.number * scope.row.price }}
+            </template>
+          </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>
+          <el-table-column align="center" label="退补标记" prop="refund" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="厂产品代码" prop="factoryNumber" min-width="100" show-overflow-tooltip></el-table-column>
+        </el-table>
       </div>
       </div>
-
     </div>
     </div>
     
     
     <div class="page-footer">
     <div class="page-footer">
@@ -126,7 +122,7 @@
 
 
 <script>
 <script>
 import print from 'vue-print-nb'
 import print from 'vue-print-nb'
-import { getList } from "@/api/supply/sales";
+import { getDetail } from "@/api/supply/return";
 
 
 export default {
 export default {
   name: 'ReturnDetail',
   name: 'ReturnDetail',
@@ -140,9 +136,7 @@ export default {
       printObj: {
       printObj: {
         id: 'printMe'
         id: 'printMe'
       },
       },
-      goodsList: [{
-        goodsId: 1,
-      }]
+      detailData: {},
     }
     }
   },
   },
 
 
@@ -159,7 +153,7 @@ export default {
   },
   },
 
 
   created() {
   created() {
-
+    this.getDetail();
   },
   },
 
 
   methods: {
   methods: {
@@ -167,6 +161,13 @@ export default {
     goBack() {
     goBack() {
       this.$emit('backListFormDetail');
       this.$emit('backListFormDetail');
     },
     },
+
+    // 获取详情
+    getDetail() {
+      getDetail({id: this.listItem.id}).then(res => {
+        this.detailData = res.data;
+      })
+    },
   }
   }
 }
 }
 </script>
 </script>

+ 190 - 0
src/views/supply/return/components/return_form.vue

@@ -0,0 +1,190 @@
+<template>
+  <div class="detail-container">
+    <el-page-header @back="goBack" content="退货"></el-page-header>
+
+    <div class="main-title">
+      <div class="title">退货申请</div>
+    </div>
+    <div class="diy-table-1">
+      <el-row :gutter="0">
+        <el-col :span="8" class="item">
+          <div class="label">发货申请单号</div>
+          <div class="value"><el-input v-model="mainForm.remark" placeholder="请输入发货申请单号"></el-input></div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">申请日期</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">单据状态</div>
+          <div class="value">2022123233435342</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">2022123233435342</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">仓库</div>
+          <div class="value">广州格匠机电有限公司</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="24" class="item">
+          <div class="label">备注</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">制单人</div>
+          <div class="value">广州格匠机电有限公司</div>
+        </el-col>
+        <el-col :span="16" class="item">
+          <div class="label">制表日期</div>
+          <div class="value">广州格匠机电有限公司</div>
+        </el-col>
+      </el-row>
+    </div>
+
+    <div class="main-title">
+      <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-column align="center" label="序号" type="index" width="50"></el-table-column>
+        <el-table-column align="center" label="销售类型" prop="salesType" min-width="160" show-overflow-tooltip>
+          <template slot-scope="scope">
+            {{ scope.row.salesType }}
+          </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="retreatTime" 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="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="number" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="是否退货" prop="isReturn" min-width="100" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <el-checkbox v-model="scope.row.isReturn"></el-checkbox>
+          </template>
+        </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="number" min-width="100" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <el-input v-model="scope.row.number" placeholder="请输入退货数量"></el-input>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+
+    <div class="main-title">
+      <div class="title">退货信息</div>
+    </div>
+    <div class="diy-table-1">
+      <el-row :gutter="0">
+        <el-col :span="12" class="item">
+          <div class="label">操作人</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :span="12" class="item">
+          <div class="label">退货日期</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <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-row>
+    </div>
+    
+    <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 slot="reference">关 闭</el-button>
+        </el-popconfirm>
+      </div>
+    </div>
+
+  </div>
+</template>
+
+<script>
+import { getDetail } from "@/api/supply/return";
+
+export default {
+  name: 'ReturnForm',
+  componentName: 'ReturnForm',
+  props: ['listItem'],
+  data() {
+    return {
+      detailData: {},
+      formLoading: false,
+      mainForm: {
+        remark: '',
+      },
+      goodsList: [{
+        goodsId: 1,
+      }]
+    }
+  },
+
+  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;
+      })
+    },
+
+    clickSubmitForm() {
+
+    },
+  }
+}
+</script>
+
+<style scoped lang="scss">
+  .detail-container {
+    width: 100%;
+    height: 100%;
+  }
+  .main-title {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    margin-top: 30px;
+    height: 60px;
+    border-bottom: 1px solid #DCDFE6;
+    margin-bottom: 20px;
+    .title {
+      font-size: 16px;
+      font-weight: 600;
+      padding-left: 10px;
+    }
+  }
+</style>

+ 43 - 48
src/views/supply/return/online_list.vue

@@ -5,28 +5,27 @@
       <div class="screen-container">
       <div class="screen-container">
         <el-form ref="screenForm" :model="screenForm" label-width="90px" size="small" label-position="left">
         <el-form ref="screenForm" :model="screenForm" label-width="90px" size="small" label-position="left">
           <el-row :gutter="20">
           <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="4">审核驳回</el-radio-button>
-                  <el-radio-button label="4">已退单</el-radio-button>
-                </el-radio-group>
-              </el-form-item>
-            </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="发货单号" prop="orderNum">
               <el-form-item label="发货单号" prop="orderNum">
                 <el-input v-model="screenForm.orderNum" placeholder="请输入发货单号"></el-input>
                 <el-input v-model="screenForm.orderNum" placeholder="请输入发货单号"></el-input>
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
             <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>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="经销商名称" prop="jxsName">
               <el-form-item label="经销商名称" prop="jxsName">
                 <el-input v-model="screenForm.jxsName" placeholder="请输入经销商名称"></el-input>
                 <el-input v-model="screenForm.jxsName" placeholder="请输入经销商名称"></el-input>
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
             <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="存货编号" prop="chNum">
+                <el-input v-model="screenForm.chNum" placeholder="请输入存货编号"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="存货名称" prop="chName">
               <el-form-item label="存货名称" prop="chName">
                 <el-input v-model="screenForm.chName" placeholder="请输入存货名称"></el-input>
                 <el-input v-model="screenForm.chName" placeholder="请输入存货名称"></el-input>
               </el-form-item>
               </el-form-item>
@@ -49,16 +48,6 @@
                 </el-date-picker>
                 </el-date-picker>
               </el-form-item>
               </el-form-item>
             </el-col>
             </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>
-            </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>
-            </el-col>
             
             
             <el-col :xs="24" :sm="12" :lg="6" class="tr">
             <el-col :xs="24" :sm="12" :lg="6" class="tr">
               <el-form-item label="">
               <el-form-item label="">
@@ -81,18 +70,22 @@
         </div>
         </div>
         <div class="table">
         <div class="table">
           <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
           <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
-            <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="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="retreatOrderNo" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="退货日期" prop="retreatTime" 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="aaa" 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="aaa" 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="aaa" 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="totalPrice" 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="aaa" 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="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="aaa" min-width="100" 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="price" min-width="100" show-overflow-tooltip>
+              <template slot-scope="scope">
+                {{ scope.row.number * 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="aaa" min-width="200" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="备注" prop="aaa" min-width="200" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="操作" width="120" fixed="right">
             <el-table-column align="center" label="操作" width="120" fixed="right">
               <template slot-scope="scope">
               <template slot-scope="scope">
@@ -124,7 +117,7 @@
 
 
 <script>
 <script>
 import { COMMON_SELECT } from '@/utils/select_data'
 import { COMMON_SELECT } from '@/utils/select_data'
-import { getList } from "@/api/supply/sales";
+import { getList } from "@/api/supply/return";
 import OnlineDetail from "@/views/supply/return/components/online_detail";
 import OnlineDetail from "@/views/supply/return/components/online_detail";
 
 
 export default {
 export default {
@@ -140,17 +133,13 @@ export default {
       listLoading: false, // 列表加载loading
       listLoading: false, // 列表加载loading
       screenForm: { // 筛选表单数据
       screenForm: { // 筛选表单数据
         orderNum: '',
         orderNum: '',
+        jxsNum: '',
         jxsName: '',
         jxsName: '',
+        chNum: '',
         chName: '',
         chName: '',
         model: '',
         model: '',
         date: '',
         date: '',
-        jxsNum: '',
-        status: '',
       },
       },
-      select_status: [ // 筛选字段 - 状态
-        { label: '正常', value: true },
-        { label: '冻结', value: false }
-      ],
 
 
       queryItem: {},
       queryItem: {},
     }
     }
@@ -159,11 +148,14 @@ export default {
   computed: {
   computed: {
     exParams() {
     exParams() {
       return {
       return {
-        userName: this.screenForm.account,
-        nickName: this.screenForm.nickName,
-        linkPhone: this.screenForm.phone,
-        email: this.screenForm.email,
-        status: this.screenForm.status,
+        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:电商退货单
       }
       }
     },
     },
     isShowDetail() {
     isShowDetail() {
@@ -192,11 +184,14 @@ export default {
       let params = {
       let params = {
         pageNum: this.currentPage,
         pageNum: this.currentPage,
         pageSize: this.pageSize,
         pageSize: this.pageSize,
-        userName: this.screenForm.account,
-        nickName: this.screenForm.nickName,
-        linkPhone: this.screenForm.phone,
-        email: this.screenForm.email,
-        status: this.screenForm.status,
+        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:电商退货单
       };
       };
       getList(params).then((res) => {
       getList(params).then((res) => {
         this.dataList = res.data.records;
         this.dataList = res.data.records;

+ 53 - 60
src/views/supply/return/return_list.vue

@@ -1,27 +1,21 @@
 <template>
 <template>
   <div class="app-container">
   <div class="app-container">
-    <div v-show="!isShowDetail">
+    <div v-show="!isShowDetail && !isShowForm">
       <!-- 筛选条件 -->
       <!-- 筛选条件 -->
       <div class="screen-container">
       <div class="screen-container">
         <el-form ref="screenForm" :model="screenForm" label-width="90px" size="small" label-position="left">
         <el-form ref="screenForm" :model="screenForm" label-width="90px" size="small" label-position="left">
           <el-row :gutter="20">
           <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="4">审核驳回</el-radio-button>
-                  <el-radio-button label="4">已退单</el-radio-button>
-                </el-radio-group>
-              </el-form-item>
-            </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="发货单号" prop="orderNum">
               <el-form-item label="发货单号" prop="orderNum">
                 <el-input v-model="screenForm.orderNum" placeholder="请输入发货单号"></el-input>
                 <el-input v-model="screenForm.orderNum" placeholder="请输入发货单号"></el-input>
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
             <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>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="经销商名称" prop="jxsName">
               <el-form-item label="经销商名称" prop="jxsName">
                 <el-input v-model="screenForm.jxsName" placeholder="请输入经销商名称"></el-input>
                 <el-input v-model="screenForm.jxsName" placeholder="请输入经销商名称"></el-input>
               </el-form-item>
               </el-form-item>
@@ -49,21 +43,8 @@
                 </el-date-picker>
                 </el-date-picker>
               </el-form-item>
               </el-form-item>
             </el-col>
             </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>
-            </el-col>
-            <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="状态" prop="status">
-                <el-select v-model="screenForm.status" placeholder="全部">
-                  <el-option label="全部" value=""></el-option>
-                  <el-option :label="item.label" :value="item.value" v-for="(item, index) in select_status" :key="index"></el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
             
             
-            <el-col :xs="24" :sm="12" :lg="6" class="tr">
+            <el-col :xs="24" :sm="24" :lg="12" class="tr">
               <el-form-item label="">
               <el-form-item label="">
                 <el-button size="small" @click="resetScreenForm">清空</el-button>
                 <el-button size="small" @click="resetScreenForm">清空</el-button>
                 <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
                 <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
@@ -75,29 +56,31 @@
 
 
       <div class="mymain-container">
       <div class="mymain-container">
         <div class="btn-group clearfix">
         <div class="btn-group clearfix">
-          <div class="fl">
-            <el-button size="small" type="warning" icon="el-icon-close">退货</el-button>
-          </div>
           <div class="fr">
           <div class="fr">
             <ExportButton :exUrl="'admin/user/mch/export'" :exParams="exParams" />
             <ExportButton :exUrl="'admin/user/mch/export'" :exParams="exParams" />
           </div>
           </div>
         </div>
         </div>
         <div class="table">
         <div class="table">
           <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
           <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
-            <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="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="aaa" 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="aaa" 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="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="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="retreatOrderNo" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="退货日期" prop="retreatTime" 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="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="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 }}
+              </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="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="120" fixed="right">
               <template slot-scope="scope">
               <template slot-scope="scope">
-                <el-button type="text" @click="toDetail(scope.row)">详情</el-button>
+                <el-button type="text" @click="toDetail('detail', scope.row)">详情</el-button>
+                <el-button type="text" @click="toDetail('form', scope.row)">退货</el-button>
               </template>
               </template>
             </el-table-column>
             </el-table-column>
           </el-table>
           </el-table>
@@ -119,18 +102,21 @@
     </div>
     </div>
     
     
     <ReturnDetail :listItem="queryItem" v-if="isShowDetail" @backListFormDetail="backList" />
     <ReturnDetail :listItem="queryItem" v-if="isShowDetail" @backListFormDetail="backList" />
+    <ReturnForm :listItem="queryItem" v-if="isShowForm" @backListFormDetail="backList" />
 
 
   </div>
   </div>
 </template>
 </template>
 
 
 <script>
 <script>
 import { COMMON_SELECT } from '@/utils/select_data'
 import { COMMON_SELECT } from '@/utils/select_data'
-import { getList } from "@/api/supply/sales";
+import { getList } from "@/api/supply/return";
 import ReturnDetail from "@/views/supply/return/components/return_detail";
 import ReturnDetail from "@/views/supply/return/components/return_detail";
+import ReturnForm from "@/views/supply/return/components/return_form";
 
 
 export default {
 export default {
   components: {
   components: {
     ReturnDetail,
     ReturnDetail,
+    ReturnForm,
   },
   },
   data() {
   data() {
     return {
     return {
@@ -141,18 +127,14 @@ export default {
       listLoading: false, // 列表加载loading
       listLoading: false, // 列表加载loading
       screenForm: { // 筛选表单数据
       screenForm: { // 筛选表单数据
         orderNum: '',
         orderNum: '',
+        jxsNum: '',
         jxsName: '',
         jxsName: '',
         chName: '',
         chName: '',
         model: '',
         model: '',
         date: '',
         date: '',
-        jxsNum: '',
-        status: '',
       },
       },
-      select_status: [ // 筛选字段 - 状态
-        { label: '正常', value: true },
-        { label: '冻结', value: false }
-      ],
 
 
+      jumpType: '',
       queryItem: {},
       queryItem: {},
     }
     }
   },
   },
@@ -160,15 +142,21 @@ export default {
   computed: {
   computed: {
     exParams() {
     exParams() {
       return {
       return {
-        userName: this.screenForm.account,
-        nickName: this.screenForm.nickName,
-        linkPhone: this.screenForm.phone,
-        email: this.screenForm.email,
-        status: this.screenForm.status,
+        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: 1, // 1:退货单,2:电商退货单
       }
       }
     },
     },
     isShowDetail() {
     isShowDetail() {
-      return this.queryItem.hasOwnProperty('adminUserId');
+      return this.queryItem.hasOwnProperty('id') && this.jumpType == 'detail';
+    },
+    isShowForm() {
+      return this.queryItem.hasOwnProperty('id') && this.jumpType == 'form';
     },
     },
   },
   },
 
 
@@ -193,11 +181,14 @@ export default {
       let params = {
       let params = {
         pageNum: this.currentPage,
         pageNum: this.currentPage,
         pageSize: this.pageSize,
         pageSize: this.pageSize,
-        userName: this.screenForm.account,
-        nickName: this.screenForm.nickName,
-        linkPhone: this.screenForm.phone,
-        email: this.screenForm.email,
-        status: this.screenForm.status,
+        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: 1, // 1:退货单,2:电商退货单
       };
       };
       getList(params).then((res) => {
       getList(params).then((res) => {
         this.dataList = res.data.records;
         this.dataList = res.data.records;
@@ -233,11 +224,13 @@ export default {
     },
     },
 
 
     // 进入详情
     // 进入详情
-    toDetail(item) {
+    toDetail(type, item) {
+      this.jumpType = type;
       this.queryItem = item;
       this.queryItem = item;
     },
     },
 
 
     backList() {
     backList() {
+      this.jumpType = '';
       this.queryItem = {};
       this.queryItem = {};
     },
     },
   }
   }