Browse Source

出入库修改打印

qukaidi 4 years ago
parent
commit
210c640bfc

+ 45 - 30
src/views/Warehousing/inStock/AddOrUpdate.vue

@@ -1097,19 +1097,13 @@
                 @click="addRelevant('copy')"
                 >复制录入</el-button
               >
-              <el-button type="primary" size="small">
-                下载模板
-              </el-button>
+              <el-button type="primary" size="small"> 下载模板 </el-button>
               <el-button size="small" type="primary" @click="openUploadExcel"
                 >导入Execl</el-button
               >
             </el-col>
             <el-col style="display: flex; justify-content: flex-end">
-              <el-button
-                size="small"
-                type="info"
-                prop="打印"
-                @click="printZyd"
+              <el-button size="small" type="info" prop="打印" @click="printZyd"
                 >作业单
               </el-button>
               <el-button
@@ -1682,7 +1676,7 @@
           "
         ></div>
         <div class="print_table" style="display: flex">
-          <table border="0" cellspacing="0" cellpadding="0" style="width: 100%">
+          <table border="0" cellspacing="0" cellpadding="0" style="width: 100%;line-height:30px">
             <tr>
               <td>作业类型</td>
               <td colspan="2">
@@ -1701,7 +1695,7 @@
             </tr>
             <tr v-for="(item, index) in Printinglist" :key="index">
               <td>{{ item.fTruckno }}</td>
-              <td>{{ item.fGoodsid|goodsFormat(goodsOptions)}}</td>
+              <td>{{ item.fGoodsid | goodsFormat(goodsOptions) }}</td>
               <td>{{ item.fMblno }}</td>
               <td>
                 {{ item.fBusinessType | fStorageFormat }}/{{ item.fMarks }}
@@ -1774,7 +1768,7 @@
           {{ company }}有限公司收货单
         </div>
         <div class="print_table" style="display: flex">
-          <table border="0" cellspacing="0" cellpadding="0" style="width: 100%">
+          <table border="0" cellspacing="0" cellpadding="0" style="width: 100%;line-height:30px">
             <tr>
               <td>车号</td>
               <td>{{ fTruckno }}</td>
@@ -1783,7 +1777,7 @@
             </tr>
             <tr v-for="(item, index) in Printinglist" :key="index">
               <td>货物品名</td>
-              <td>{{ item.fGoodsid|goodsFormat(goodsOptions)}}</td>
+              <td>{{ item.fGoodsid | goodsFormat(goodsOptions) }}</td>
               <td>件数</td>
               <td>{{ item.fQty }}件</td>
             </tr>
@@ -1843,7 +1837,7 @@
           {{ company }}有限公司进仓单
         </div>
         <div class="print_table" style="display: flex">
-          <table border="0" cellspacing="0" cellpadding="0" style="width: 100%">
+          <table border="0" cellspacing="0" cellpadding="0" style="width: 100%;line-height:30px">
             <tr>
               <td>客户</td>
               <td>{{ form.fCorpidName }}</td>
@@ -1965,17 +1959,20 @@
           {{ company }}有限公司入库单
         </div>
         <div class="print_table" style="display: flex">
-          <table border="0" cellspacing="0" cellpadding="0" style="width: 100%">
+          <table border="0" cellspacing="0" cellpadding="0" style="width: 100%;line-height:30px">
             <tr>
               <td>客户名称</td>
               <td>{{ form.fCorpidName }}</td>
               <td>入库日期</td>
               <td colspan="2" v-if="Printinglist.length">
-                {{ Printinglist[0].fBsdate | fBsdateFormat }}
+                {{ Printinglist[0].fBsdate | fBsdateFormat }}{{ " " + rkTime }}
               </td>
               <td colspan="2" v-else></td>
               <td>流水号</td>
-              <td colspan="2">{{ form.fBillno }}</td>
+              <td colspan="2" v-if="form.fBillno">
+                {{ form.fBillno }}{{ lsTime }}
+              </td>
+              <td colspan="2" v-else></td>
             </tr>
             <tr>
               <td>车号</td>
@@ -1991,10 +1988,10 @@
               <td>毛重</td>
               <td>规格</td>
               <td>区位</td>
-              <td>备注</td>
+              <td style="width:20%">备注</td>
             </tr>
             <tr v-for="(item, index) in Printinglist" :key="index">
-              <td>{{ item.fGoodsid|goodsFormat(goodsOptions)}}</td>
+              <td>{{ item.fGoodsid | goodsFormat(goodsOptions) }}</td>
               <td>{{ item.fCntrno }}</td>
               <td>{{ item.fCntqty }}</td>
               <td>{{ item.fQty }}</td>
@@ -2055,21 +2052,24 @@
           {{ company }}有限公司入库单
         </div>
         <div class="print_table" style="display: flex">
-          <table border="0" cellspacing="0" cellpadding="0" style="width: 100%">
+          <table border="0" cellspacing="0" cellpadding="0" style="width: 100%;line-height:30px">
             <tr>
               <td>客户名称</td>
               <td>{{ form.fCorpidName }}</td>
               <td>入库日期</td>
               <td colspan="2" v-if="Printinglist.length">
-                {{ Printinglist[0].fBsdate | fBsdateFormat }}
+                {{ Printinglist[0].fBsdate | fBsdateFormat }}{{ " " + rkTime }}
               </td>
               <td colspan="2" v-else></td>
               <td>流水号</td>
-              <td colspan="2">{{ form.fBillno }}</td>
+              <td colspan="2" v-if="form.fBillno">
+                {{ form.fBillno }}{{ lsTime }}
+              </td>
+              <td colspan="2" v-else></td>
             </tr>
             <tr>
               <td>车号</td>
-              <td colspan="3">{{ form.fTruckno }}</td>
+              <td colspan="2">{{ form.fTruckno }}</td>
               <td colspan="2">提单号</td>
               <td colspan="3">{{ form.fMblno }}</td>
             </tr>
@@ -2081,10 +2081,10 @@
               <td>毛重</td>
               <td>规格</td>
               <td>区位</td>
-              <td>备注</td>
+              <td style="width:20%">备注</td>
             </tr>
             <tr v-for="(item, index) in Printinglist" :key="index">
-              <td>{{ item.fGoodsid|goodsFormat(goodsOptions)}}</td>
+              <td>{{ item.fGoodsid | goodsFormat(goodsOptions) }}</td>
               <td>{{ item.fCntrno }}</td>
               <td>{{ item.fCntqty }}</td>
               <td>{{ item.fQty }}</td>
@@ -2179,7 +2179,7 @@
           </div>
         </div>
         <div class="print_table" style="display: flex">
-          <table border="0" cellspacing="0" cellpadding="0" style="width: 100%">
+          <table border="0" cellspacing="0" cellpadding="0" style="width: 100%;line-height:30px">
             <tr>
               <td>箱号</td>
               <td>铅封号</td>
@@ -2266,7 +2266,7 @@
           <div>客户名称:{{ form.fCorpidName }}</div>
         </div>
         <div class="print_table" style="display: flex">
-          <table border="0" cellspacing="0" cellpadding="0" style="width: 100%">
+          <table border="0" cellspacing="0" cellpadding="0" style="width: 100%;line-height:30px">
             <tr>
               <td>序号</td>
               <td>实际入库日期</td>
@@ -2281,7 +2281,7 @@
             <tr v-for="(item, index) in Printinglist" :key="index">
               <td>{{ index + 1 }}</td>
               <td>{{ item.fChargedate }}</td>
-              <td>{{ item.fGoodsid|goodsFormat(goodsOptions)}}</td>
+              <td>{{ item.fGoodsid | goodsFormat(goodsOptions) }}</td>
               <td>{{ item.fMblno }}</td>
               <td>{{ item.fCntrno }}</td>
               <td>{{ item.fQty }}</td>
@@ -2352,7 +2352,7 @@
           </div>
         </div>
         <div class="print_table" style="display: flex">
-          <table border="0" cellspacing="0" cellpadding="0" style="width: 100%">
+          <table border="0" cellspacing="0" cellpadding="0" style="width: 100%;line-height:30px">
             <tr>
               <td>品名</td>
               <td colspan="3">{{ form.fProductName }}</td>
@@ -2435,7 +2435,7 @@
           <div>入&nbsp;库&nbsp;计&nbsp;划&nbsp;单</div>
         </div>
         <div class="print_table" style="display: flex">
-          <table border="0" cellspacing="0" cellpadding="0" style="width: 100%">
+          <table border="0" cellspacing="0" cellpadding="0" style="width: 100%;line-height:30px">
             <tr>
               <td>货物名称</td>
               <td colspan="2">{{ form.fProductName }}</td>
@@ -3034,7 +3034,7 @@
           垛卡
         </div>
         <div class="print_table" style="display: flex">
-          <table border="0" cellspacing="0" cellpadding="0" style="width: 100%">
+          <table border="0" cellspacing="0" cellpadding="0" style="width: 100%;line-height:30px">
             <tr>
               <td>客户</td>
               <td colspan="2">{{ form.fCorpidName }}</td>
@@ -3568,6 +3568,8 @@ export default {
       showApproval: null,
       downloadTemplateVisible: false,
       uploadExcel: false,
+      rkTime: null,
+      lsTime: null,
     };
   },
   created() {
@@ -5261,6 +5263,19 @@ export default {
               //   console.log(this.container)
               //   this.print_zpdkrkd = true
             } else if (command == "z") {
+              let date = new Date();
+              let hours =
+                date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
+              let minutes =
+                date.getMinutes() < 10
+                  ? "0" + date.getMinutes()
+                  : date.getMinutes();
+              let seconds =
+                date.getSeconds() < 10
+                  ? "0" + date.getSeconds()
+                  : date.getSeconds();
+              this.rkTime = hours + ":" + minutes;
+              this.lsTime = hours + ":" + minutes + ":" + seconds;
               this.print_bzrkd = true;
             } else if (command == "h") {
               this.print_dk = true;

+ 8 - 8
src/views/Warehousing/outStock/AddOrUpdate.vue

@@ -2067,7 +2067,7 @@
           "
         ></div>
         <div class="print_table" style="display: flex">
-          <table border="0" cellspacing="0" cellpadding="0" style="width: 100%">
+          <table border="0" cellspacing="0" cellpadding="0" style="width: 100%;line-height:30px">
             <tr>
               <td>作业类型</td>
               <td colspan="2">
@@ -2159,7 +2159,7 @@
           {{ company }}有限公司出库单
         </div>
         <div class="print_table" style="display: flex">
-          <table border="0" cellspacing="0" cellpadding="0" style="width: 100%">
+          <table border="0" cellspacing="0" cellpadding="0" style="width: 100%;line-height:30px">
             <tr>
               <td>客户</td>
               <td>{{ form.fCorpidName }}</td>
@@ -2281,7 +2281,7 @@
           {{ company }}有限公司出库单
         </div>
         <div class="print_table" style="display: flex">
-          <table border="0" cellspacing="0" cellpadding="0" style="width: 100%">
+          <table border="0" cellspacing="0" cellpadding="0" style="width: 100%;line-height:30px">
             <tr>
               <td>公司名称</td>
               <td colspan="3">{{ form.fCorpidName }}</td>
@@ -2410,7 +2410,7 @@
           </div>
         </div>
         <div class="print_table" style="display: flex">
-          <table border="0" cellspacing="0" cellpadding="0" style="width: 100%">
+          <table border="0" cellspacing="0" cellpadding="0" style="width: 100%;line-height:30px">
             <tr>
               <td>箱号</td>
               <td>铅封号</td>
@@ -2500,7 +2500,7 @@
           </div>
         </div>
         <div class="print_table" style="display: flex">
-          <table border="0" cellspacing="0" cellpadding="0" style="width: 100%">
+          <table border="0" cellspacing="0" cellpadding="0" style="width: 100%;line-height:30px">
             <tr>
               <td>品名</td>
               <td colspan="3">{{ form.fProductName }}</td>
@@ -2589,7 +2589,7 @@
         </div>
 
         <div class="print_table" style="display: flex">
-          <table border="0" cellspacing="0" cellpadding="0" style="width: 100%">
+          <table border="0" cellspacing="0" cellpadding="0" style="width: 100%;line-height:30px">
             <tr>
               <td>品名</td>
               <td colspan="2">{{ form.fProductName }}</td>
@@ -2692,7 +2692,7 @@
           <div style="margin-left: 250px">存放地点:{{ stockName }}</div>
         </div>
         <div class="print_table" style="display: flex">
-          <table border="0" cellspacing="0" cellpadding="0" style="width: 100%">
+          <table border="0" cellspacing="0" cellpadding="0" style="width: 100%;line-height:30px">
             <tr>
               <td>品名</td>
               <td colspan="2">{{ form.fProductName }}</td>
@@ -2786,7 +2786,7 @@
           <div style="margin-left: 250px">存放地点:{{ stockName }}</div>
         </div>
         <div class="print_table" style="display: flex">
-          <table border="0" cellspacing="0" cellpadding="0" style="width: 100%">
+          <table border="0" cellspacing="0" cellpadding="0" style="width: 100%;line-height:30px">
             <tr>
               <td>品名</td>
               <td colspan="3">{{ form.fProductName }}</td>