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

feat(库存调拨): 新增送货单打印功能

liujt 7 месяцев назад
Родитель
Сommit
d76af5588f

+ 16 - 13
src/views/warehouseManagement/inventoryAllocation/components/print-template-bs-car.vue

@@ -37,9 +37,9 @@
             text-align: center;
             width: 100%;
           "
-          >{{ groupName || '长沙宝盛汽车配件有限公司' }}</div
+          >{{ groupName || '长沙宝盛汽车配件有限公司' }}送货单</div
         >
-        <div
+        <!-- <div
           style="
             font-size: 18px;
             font-weight: 800;
@@ -47,7 +47,7 @@
             width: 100%;
           "
           >送货单</div
-        >
+        > -->
       </div>
       <div
         style="
@@ -74,11 +74,11 @@
       >
         <span style="width: 40%">发货日期:{{ formData.createTime }}</span>
         <span style="width: 40%"
-          >联系人:{{ formData.linkName }}
+          >收货联系人:{{ formData.linkName }}
 
-          联系电话:{{ formData.linkPhone }}
+          <!-- 联系电话:{{ formData.linkPhone }} -->
         </span>
-        <span> 车牌号:{{ formData.carNo }} </span>
+        <!-- <span> 车牌号:{{ formData.carNo }} </span> -->
       </div>
       <table
         cellspacing="0"
@@ -94,18 +94,21 @@
         <tbody>
           <tr align="center">
             <td style="padding: 5px; width: 35px"> 序号 </td>
-            <td style="padding: 5px"> 编码 </td>
-            <td style="padding: 5px"> 零件名 </td>
+            <td style="padding: 5px;"> 车型 </td>
+            <td style="padding: 5px;"> 料号 </td>
             <td style="padding: 5px; width: 50px"> 单位</td>
-            <td style="padding: 5px"> 送货数量</td>
-            <td style="padding: 5px"> 验收数量</td>
+            <td style="padding: 5px"> 交货数</td>
+            <td style="padding: 5px"> 实收数量</td>
+            <td style="padding: 5px"> 客户订单号</td>
+            <td style="padding: 5px"> 重量</td>
+            <td style="padding: 5px"> 工艺</td>
             <td style="padding: 5px"> 备注</td>
-            <td style="padding: 5px"> 订单号</td>
-            <td style="padding: 5px"> 加工工艺</td>
           </tr>
 
           <tr align="center" v-for="(item, index) in formData.productList">
             <td style="padding: 5px"> {{ index + 1 }} </td>
+            <td style="padding: 5px"> </td>
+            <td style="padding: 5px"> {{ item.productName }} </td>
             <td style="padding: 5px">
               {{ item.productCode }}
             </td>
@@ -171,7 +174,7 @@
     methods: {
       async open(id) {
         // this.formData = await getSendSaleOrderrecordDetailSplit(id);
-        // this.QRvisible = true;
+        this.QRvisible = true;
         // let dataArray = await getInfoBySourceBizNoAll(this.formData.docNo);
         // this.outBound = JSON.parse(JSON.stringify(dataArray[0]));
         // this.outBound['outInDetailRecordRequestList'] = [];

+ 19 - 3
src/views/warehouseManagement/inventoryAllocation/index.vue

@@ -16,9 +16,14 @@
           <el-button icon="el-icon-plus" type="primary" @click="add"
             >新建</el-button
           >
-          <!-- <el-button :disabled="selection.length > 1" icon="el-icon-download" type="primary" @click="printExl"
-            >打印</el-button
+          <!-- <el-button :disabled="selection.length > 1" icon="el-icon-download" type="primary"  @click="printExl"
+            >打印送货单</el-button
           > -->
+          <!-- v-if="$hasPermission('wms:inventoryAllocation:print1')" -->
+          <!-- <el-button :disabled="selection.length > 1" icon="el-icon-download" type="primary"  @click="printExl2"
+            >打印送货单</el-button
+          > -->
+          <!-- v-if="$hasPermission('wms:inventoryAllocation:print2')" -->
         </template>
         <!-- 单号链接 -->
         <template v-slot:allotCode="{ row }">
@@ -67,6 +72,7 @@
     </el-card>
     <!-- 打印弹窗 -->
     <printTemplateBs ref="printTemplateBsRef"></printTemplateBs>
+    <printTemplateBsCar ref="printTemplateBsCarRef"></printTemplateBsCar>
   </div>
 </template>
 
@@ -75,12 +81,14 @@
   import storageApi from '@/api/warehouseManagement/index.js';
   import InventorySearch from './components/inventory-search.vue';
   import printTemplateBs from './components/print-template-bs.vue';
+  import printTemplateBsCar from './components/print-template-bs-car.vue';
   import warehouseDefinition from '@/api/warehouseManagement/warehouseDefinition';
   import { pageRoles } from '@/api/system/role';
   export default {
     components: {
       InventorySearch,
-      printTemplateBs
+      printTemplateBs,
+      printTemplateBsCar 
     },
     data() {
       return {
@@ -211,6 +219,14 @@
         }
         this.$refs.printTemplateBsRef.open(this.selection[0]);
       },
+      printExl2() {
+        console.log('selection', this.selection)
+        if (this.selection.length == 0) {
+          this.$message.warning('请选择要打印的记录');
+          return;
+        }
+        this.$refs.printTemplateBsCarRef.open(this.selection[0]);
+      },
       // 删除
       async deleted(row) {
         const data = await storageApi.deleteAllot([row.id]);