浏览代码

Merge tag 'Hotfix-zh-227' into develop

Finish Hotfix-zh-227
Howie 3 年之前
父节点
当前提交
8c867503c7

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

@@ -28,6 +28,23 @@ export function getDetail(params) {
   })
 }
 
+// 获取打印详情
+export function getPrintDetail(params) {
+  return request({
+    url: '/pick/detailPrint',
+    method: 'get',
+    params
+  })
+}
+// 获取打印详情
+export function getDtailPrintDis(params) {
+  return request({
+    url: '/pick/detailPrintDis',
+    method: 'post',
+    data:params
+  })
+}
+
 // 获取仓库列表
 export function getWarehouseList(params) {
   return request({

+ 1 - 1
src/views/supply/deliver/components/design/print-data.js

@@ -12,7 +12,7 @@ function getDetail(ids,nickName) {
   let  invoicePickBeans = []
   let  start = 0
   let  end = 5
-  detailArr = []
+    detailArr = []
   // detailData = ids 
   let newIds = []
       newIds = ids

+ 22 - 20
src/views/supply/engin/engin_list.vue

@@ -113,18 +113,18 @@
             stripe
             show-summary
             :summary-method="$getSummaries">
-            <el-table-column align="left" label="审核状态" prop="examineStatus" min-width="100" show-overflow-tooltip>
+            <el-table-column align="left" label="审核状态" sortable prop="examineStatus" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
                 {{scope.row.examineStatus | statusFilter}}
               </template>
             </el-table-column>
-            <el-table-column align="left" label="工程信息单号" prop="enginInfoNo" min-width="150" show-overflow-tooltip>
+            <el-table-column align="left" label="工程信息单号" sortable prop="enginInfoNo" min-width="150" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copyText="scope.row.enginInfoNo" />
                 <span>{{scope.row.enginInfoNo}}</span>
               </template>
             </el-table-column>
-            <el-table-column align="left" label="订单日期" prop="orderDate" min-width="120" show-overflow-tooltip>
+            <el-table-column align="left" label="订单日期" sortable prop="orderDate" min-width="120" show-overflow-tooltip>
               <template slot-scope="scope">
                 <div>
                   <span>{{scope.row.orderDate | dateToDayFilter}}</span>
@@ -132,40 +132,40 @@
                 </div>
               </template>
             </el-table-column>
-            <el-table-column align="left" label="经销商编码" prop="customerNumber" min-width="100" show-overflow-tooltip>
+            <el-table-column align="left" label="经销商编码" sortable prop="customerNumber" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copyText="scope.row.customerNumber" />
                 <span>{{scope.row.customerNumber}}</span>
               </template>
             </el-table-column>
-            <el-table-column align="left" label="经销商名称" prop="customerName" min-width="250" show-overflow-tooltip>
+            <el-table-column align="left" label="经销商名称" sortable prop="customerName" min-width="250" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copyText="scope.row.customerName" />
                 <span>{{scope.row.customerName}}</span>
               </template>
             </el-table-column>
-            <el-table-column align="left" label="项目类别" prop="projectName" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="left" label="使用单位" prop="useUnit" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="left" label="安装地址" prop="installAddress" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="left" label="物料编码" prop="materialNumber" min-width="120" show-overflow-tooltip>
+            <el-table-column align="left" label="项目类别" sortable prop="projectName" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="left" label="使用单位" sortable prop="useUnit" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="left" label="安装地址" sortable prop="installAddress" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="left" label="物料编码" sortable prop="materialNumber" min-width="120" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copyText="scope.row.materialNumber" />
                 <span>{{scope.row.materialNumber}}</span>
               </template>
             </el-table-column>
-            <el-table-column align="left" label="产品编码" prop="materialOldNumber" min-width="140" show-overflow-tooltip>
+            <el-table-column align="left" label="产品编码" sortable prop="materialOldNumber" min-width="140" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copyText="scope.row.materialOldNumber" />
                 <span>{{scope.row.materialOldNumber}}</span>
               </template>
             </el-table-column>
-            <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip>
+            <el-table-column align="left" label="产品名称" sortable prop="materialName" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copyText="scope.row.materialName" />
                 <span>{{scope.row.materialName}}</span>
               </template>
             </el-table-column>
-            <el-table-column align="left" label="规格型号" prop="specification" min-width="350" show-overflow-tooltip>
+            <el-table-column align="left" label="规格型号" sortable prop="specification" min-width="350" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copyText="scope.row.specification" />
                 <span>{{scope.row.specification}}</span>
@@ -174,29 +174,31 @@
             <el-table-column align="left" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="right" label="数量" prop="qty" min-width="100" sortable show-overflow-tooltip></el-table-column>
             <el-table-column align="right" label="单价" prop="price" min-width="100" show-overflow-tooltip>
+
               <template slot-scope="scope">
                 {{scope.row.price | numToFixed}}
               </template>
             </el-table-column>
-
             <el-table-column align="right" label="金额" prop="totalAmount" min-width="100" sortable show-overflow-tooltip>
+
               <template slot-scope="scope">
                 {{scope.row.totalAmount | numToFixed}}
               </template>
             </el-table-column>
             <el-table-column align="right" label="已订数量" prop="hasOrderQty" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="right" label="可订数量" prop="compute_kdQty" min-width="100" show-overflow-tooltip>
+
               <template slot-scope="scope">
                 {{ computeAllowQty(scope.row.qty, scope.row.hasOrderQty)}}
               </template>
             </el-table-column>
-             <el-table-column align="left" label="表体业务员" prop="itemServiceName" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="left" label="表头业务员" prop="serviceName" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="left" label="备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="left" label="制表人" prop="createBy" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="left" label="制表日期" prop="createTime" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="left" label="审核人" prop="confirmBy" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="left" label="审核日期" prop="confirmTime" min-width="160" show-overflow-tooltip></el-table-column>
+             <el-table-column align="left" label="表体业务员" sortable prop="itemServiceName" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="left" label="表头业务员" sortable prop="serviceName" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="left" label="备注" sortable prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="left" label="制表人" sortable prop="createBy" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="left" label="制表日期" sortable prop="createTime" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="left" label="审核人" sortable prop="confirmBy" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="left" label="审核日期" sortable prop="confirmTime" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="操作" width="210" fixed="right">
               <template slot-scope="scope">
                 <el-popconfirm

+ 62 - 2
src/views/supply/pickup/components/design/print-data.js

@@ -1,5 +1,5 @@
 
-import { getDetail, addPrint } from "@/api/supply/pickup";
+import { getDetail, addPrint,getDtailPrintDis} from "@/api/supply/pickup";
 // import { addPrints } from '@/api/supply/pickup'
 import { getCompanyList } from '@/api/user'
 
@@ -18,12 +18,72 @@ function getDetails(ids, nickName) {
   let newIds = []
   newIds = ids
   let filterId = []
+  const obj = []
   filterId = newIds.map(k => {
+    obj.push(
+      {
+        id:k.id,
+        invoiceId:k.invoiceId
+      }
+    )
     return k.id
   })
-
   filterId = [...new Set(filterId)]
   cNewIds =JSON.parse(JSON.stringify(filterId)) 
+  getDtailPrintDis(obj).then(res=>{
+    const item = res.data
+      item.forEach(k=>{
+        detailData.push(JSON.parse(JSON.stringify(k)))
+        invoicePickBeans = k.invoicePickBeans
+        let len = Math.ceil(invoicePickBeans.length / 5)
+        console.log(len, '长度');
+        for (let index = 0; index < len; index++) {
+          const table = []
+          if (invoicePickBeans.length) {
+            invoicePickBeans.splice(0, 5).forEach(e => {
+              table.push({
+                salesId: e.salesOrderId,
+                invoiceId: e.invoiceId,
+                id: e.id,
+                createTime: e.id ? dateToDayFilter(k.createTime) : '',
+                enginOrderType: e.enginOrderType == 'HOME' || e.enginOrderType == 'TRADE' ? e.enginOrderNo : e.mainOrderId,
+                materialName: e.materialName || '',
+                specification: e.specification || '',
+                refundableQty: e.refundableQty || 0,
+                // headerRemark:e.headerRemark,
+                pjxh1Text: e.pjxh1Text || ''
+              })
+    
+            });
+          }
+          detailArr.push({
+            pageNumber:`${len}-${index+1}`,
+            type: k.type,
+            tiTui: k.type === 2 ? `退货人` : `提货人`,
+            takerPhone: k.takerPhone || '',
+            headerRemark: k.remark,
+            total_num: k.total_num,
+            company: k.type === 2 ? `${company}销售退货单` : `${company}销售发货单`,
+            pickOrderWater: k.pickOrderWater,
+            customerNumber: k.customerNumber,
+            takerDa: '',
+            nowDate: nowDate(),
+            takerName: k.type === 2 ? `退货人:${k.takerName || ''}` : `提货人:${k.takerName || ''}`,
+            customerName: k.customerName || '',
+            correspondName: k.correspondName,
+            correspondNames:'',
+            pickCar: k.pickCar || '',
+            createBy: JSON.parse(
+              localStorage.getItem("supply_user")
+            ).nickName,
+            table
+          })
+        }
+      })
+  })
+
+
+  return
   for (let i = 0; i < filterId.length; i++) {
     getDetail({ id: filterId[i] }).then(res => {
       const item = res.data

+ 1 - 1
src/views/supply/pickup/sum_list.vue

@@ -88,7 +88,7 @@
               {{ scope.row.printNum ? '已打单' : '未打单' }}
             </template>
           </el-table-column>
-          <el-table-column align="left" label="打单日期" prop="createTime" min-width="160" show-overflow-tooltip>
+          <el-table-column align="left" label="打单日期" prop="printTime" min-width="160" show-overflow-tooltip>
           </el-table-column>
           <!-- <el-table-column align="left" label="信息密钥" prop="informationKey" min-width="100" show-overflow-tooltip>
             <template slot-scope="scope">

+ 1 - 1
src/views/supply/policy/components/retail_form.vue

@@ -535,7 +535,7 @@ export default {
         {
           prop: 'specification',
           lable: '规格型号',
-          widht: 200,
+          widht: 350,
           align: 'left'
         },