qukaidi 4 lat temu
rodzic
commit
b6e7f9a36e
1 zmienionych plików z 195 dodań i 168 usunięć
  1. 195 168
      src/views/Warehousing/outStock/AddOrUpdate.vue

+ 195 - 168
src/views/Warehousing/outStock/AddOrUpdate.vue

@@ -859,13 +859,13 @@
                 </el-button>
                 <el-dropdown-menu slot="dropdown">
                   <el-dropdown-item command="d">标准出库单</el-dropdown-item>
-                  <el-dropdown-item command="b">出库单</el-dropdown-item>
+                  <!-- <el-dropdown-item command="b">出库单</el-dropdown-item> -->
                   <el-dropdown-item command="c">理货单</el-dropdown-item>
                   <el-dropdown-item command="e">出库确认</el-dropdown-item>
                   <el-dropdown-item command="e">劳务确认</el-dropdown-item>
-<!--                  <el-dropdown-item command="f">叉车出库单</el-dropdown-item>-->
-<!--                  <el-dropdown-item command="g">单车出库单</el-dropdown-item>-->
-<!--                  <el-dropdown-item command="h">装车存档出库单</el-dropdown-item>-->
+                  <!--                  <el-dropdown-item command="f">叉车出库单</el-dropdown-item>-->
+                  <!--                  <el-dropdown-item command="g">单车出库单</el-dropdown-item>-->
+                  <!--                  <el-dropdown-item command="h">装车存档出库单</el-dropdown-item>-->
                 </el-dropdown-menu>
               </el-dropdown>
               <div style="margin: 0 10px">
@@ -2189,7 +2189,7 @@
       :close-on-click-modal="false"
       :modal="false"
     >
-      <div id="print_area1" class="print-div">
+      <div id="print_area2" class="print-div">
         <div
           class="print-title"
           style="
@@ -2299,7 +2299,7 @@
           :disabled="browseStatus"
           @click="
             print_rkd = false;
-            addprint();
+            addprint('rkd');
           "
           >打印
         </el-button>
@@ -2312,7 +2312,7 @@
       :close-on-click-modal="false"
       :modal="false"
     >
-      <div id="print_area1" class="print-div">
+      <div id="print_area3" class="print-div">
         <div
           class="print-title"
           style="
@@ -2322,7 +2322,7 @@
             margin-bottom: 5px;
           "
         >
-          {{ company }}有限公司出库单
+          {{ company }}有限公司出库单
         </div>
         <div class="print_table" style="display: flex">
           <table border="0" cellspacing="0" cellpadding="0" style="width: 100%">
@@ -2330,7 +2330,9 @@
               <td>公司名称</td>
               <td colspan="3">{{ form.fCorpidName }}</td>
               <td>出库日期</td>
-              <td colspan="2" v-if="Printinglist.length">{{Printinglist[0].fBsdate | fBsdateFormat }}</td>
+              <td colspan="2" v-if="Printinglist.length">
+                {{ Printinglist[0].fBsdate | fBsdateFormat }}
+              </td>
               <td colspan="2" v-else></td>
             </tr>
             <tr>
@@ -2356,7 +2358,9 @@
             </tr>
             <tr>
               <td>车号</td>
-              <td colspan="2" v-if="Printinglist.length">{{ Printinglist[0].fTruckno }}</td>
+              <td colspan="2" v-if="Printinglist.length">
+                {{ Printinglist[0].fTruckno }}
+              </td>
               <td colspan="2" v-else></td>
               <td colspan="2">身份证号</td>
               <td colspan="2"></td>
@@ -2388,7 +2392,7 @@
           :disabled="browseStatus"
           @click="
             print_bzckd = false;
-            addprint();
+            addprint('bzckd');
           "
           >打印
         </el-button>
@@ -2401,7 +2405,7 @@
       :close-on-click-modal="false"
       :modal="false"
     >
-      <div id="print_area1" class="print-div">
+      <div id="print_area5" class="print-div">
         <div
           class="print-title"
           style="
@@ -2499,7 +2503,7 @@
           type="primary"
           :disabled="browseStatus"
           @click="
-            addprint();
+            addprint('lhd');
             print_lhd = false;
           "
           >打印
@@ -2513,7 +2517,7 @@
       :close-on-click-modal="false"
       :modal="false"
     >
-      <div id="print_area1" class="print-div">
+      <div id="print_area10" class="print-div">
         <div
           class="print-title"
           style="
@@ -2589,7 +2593,7 @@
           type="primary"
           :disabled="browseStatus"
           @click="
-            addprint();
+            addprint('lwqr');
             print_lwqr = false;
           "
           >打印
@@ -2616,21 +2620,20 @@
           {{ company }}有限公司
         </div>
 
-          <div
-            style="
+        <div
+          style="
             display: flex;
             justify-content: center;
             margin-left: 350px;
             margin-bottom: 5px;
           "
-          >
-            <div style="font-size: 18px;">出&nbsp;库&nbsp;单</div>
-            <div  style="margin-left: 200px">
-              <div style="margin-bottom: 5px;">{{form.fBillno}}</div>
-              <div>存放地点:{{stockName}}</div>
-            </div>
-
+        >
+          <div style="font-size: 18px">出&nbsp;库&nbsp;单</div>
+          <div style="margin-left: 200px">
+            <div style="margin-bottom: 5px">{{ form.fBillno }}</div>
+            <div>存放地点:{{ stockName }}</div>
           </div>
+        </div>
 
         <div class="print_table" style="display: flex">
           <table border="0" cellspacing="0" cellpadding="0" style="width: 100%">
@@ -2644,7 +2647,7 @@
               <td>提单号</td>
               <td colspan="2">{{ form.fMblno }}</td>
               <td>出库日期</td>
-              <td colspan="3">{{ fBsdate}}</td>
+              <td colspan="3">{{ fBsdate }}</td>
             </tr>
             <tr>
               <td>原入库箱号</td>
@@ -2658,16 +2661,16 @@
             <tr v-for="(item, index) in Printinglist" :key="index">
               <td>{{ item.fCntrno }}</td>
               <td>{{ item.fTruckno }}</td>
-              <td>{{item.fSealno}}</td>
+              <td>{{ item.fSealno }}</td>
               <td>{{ item.fWarehouseInformation }}</td>
               <td>{{ item.fQty }}</td>
-              <td>{{item.fNetweight}}</td>
+              <td>{{ item.fNetweight }}</td>
               <td>{{ item.remark }}</td>
             </tr>
             <tr>
               <td colspan="4">合计:</td>
-              <td>{{allfQty}}</td>
-              <td>{{allfNetweight}}</td>
+              <td>{{ allfQty }}</td>
+              <td>{{ allfNetweight }}</td>
               <td></td>
             </tr>
           </table>
@@ -2695,7 +2698,7 @@
             addprint('ccckd');
             print_ccckd = false;
           "
-        >打印
+          >打印
         </el-button>
         <el-button @click="print_ccckd = false">取消 </el-button>
       </span>
@@ -2727,17 +2730,14 @@
             margin-bottom: 5px;
           "
         >
-          <div style="font-size: 18px;">出&nbsp;库&nbsp;单</div>
-          <div  style="margin-left: 200px">
-            <div style="margin-bottom: 5px;">{{form.fBillno}}</div>
+          <div style="font-size: 18px">出&nbsp;库&nbsp;单</div>
+          <div style="margin-left: 200px">
+            <div style="margin-bottom: 5px">{{ form.fBillno }}</div>
           </div>
         </div>
-        <div style="
-            display: flex;
-            margin-bottom: 5px;
-          ">
-          <div style="width: 50%">客户名称:{{form.fCorpidName}}</div>
-          <div style="margin-left: 250px">存放地点:{{stockName}}</div>
+        <div style="display: flex; margin-bottom: 5px">
+          <div style="width: 50%">客户名称:{{ form.fCorpidName }}</div>
+          <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%">
@@ -2751,7 +2751,7 @@
               <td>提单号</td>
               <td colspan="2">{{ form.fMblno }}</td>
               <td>出库日期</td>
-              <td colspan="3">{{ fBsdate}}</td>
+              <td colspan="3">{{ fBsdate }}</td>
             </tr>
             <tr>
               <td>原入库箱号</td>
@@ -2765,16 +2765,16 @@
             <tr v-for="(item, index) in Printinglist" :key="index">
               <td>{{ item.fCntrno }}</td>
               <td>{{ item.fTruckno }}</td>
-              <td>{{item.fSealno}}</td>
+              <td>{{ item.fSealno }}</td>
               <td>{{ item.fWarehouseInformation }}</td>
               <td>{{ item.fQty }}</td>
-              <td>{{item.fNetweight}}</td>
+              <td>{{ item.fNetweight }}</td>
               <td>{{ item.remark }}</td>
             </tr>
             <tr>
               <td colspan="4">合计:</td>
-              <td>{{allfQty}}</td>
-              <td>{{allfNetweight}}</td>
+              <td>{{ allfQty }}</td>
+              <td>{{ allfNetweight }}</td>
               <td></td>
             </tr>
           </table>
@@ -2793,7 +2793,7 @@
             addprint('dcckd');
             print_dcckd = false;
           "
-        >打印
+          >打印
         </el-button>
         <el-button @click="print_dcckd = false">取消 </el-button>
       </span>
@@ -2825,17 +2825,14 @@
             margin-bottom: 5px;
           "
         >
-          <div style="font-size: 18px;">出&nbsp;库&nbsp;单</div>
-          <div  style="margin-left: 200px">
-            <div style="margin-bottom: 5px;">{{form.fBillno}}</div>
+          <div style="font-size: 18px">出&nbsp;库&nbsp;单</div>
+          <div style="margin-left: 200px">
+            <div style="margin-bottom: 5px">{{ form.fBillno }}</div>
           </div>
         </div>
-        <div style="
-            display: flex;
-            margin-bottom: 5px;
-          ">
-          <div style="width: 50%">客户名称:{{form.fCorpidName}}</div>
-          <div style="margin-left: 250px">存放地点:{{stockName}}</div>
+        <div style="display: flex; margin-bottom: 5px">
+          <div style="width: 50%">客户名称:{{ form.fCorpidName }}</div>
+          <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%">
@@ -2849,7 +2846,7 @@
               <td>提单号</td>
               <td colspan="3">{{ form.fMblno }}</td>
               <td colspan="2">出库日期</td>
-              <td colspan="3">{{ fBsdate}}</td>
+              <td colspan="3">{{ fBsdate }}</td>
             </tr>
             <tr>
               <td>原入库箱号</td>
@@ -2867,7 +2864,7 @@
               <td>{{ item.fTruckno }}</td>
               <td>{{ item.fWarehouseInformation }}</td>
               <td>{{ item.fQty }}</td>
-              <td>{{item.fNetweight}}</td>
+              <td>{{ item.fNetweight }}</td>
               <td></td>
               <td></td>
               <td></td>
@@ -2875,8 +2872,8 @@
             </tr>
             <tr>
               <td colspan="3">合计:</td>
-              <td>{{allfQty}}</td>
-              <td>{{allfNetweight}}</td>
+              <td>{{ allfQty }}</td>
+              <td>{{ allfNetweight }}</td>
               <td></td>
               <td></td>
               <td></td>
@@ -2907,7 +2904,7 @@
             addprint('zccdckd');
             print_zccdckd = false;
           "
-        >打印
+          >打印
         </el-button>
         <el-button @click="print_zccdckd = false">取消 </el-button>
       </span>
@@ -3603,6 +3600,7 @@ export default {
       tfNetweightnum: 0,
       tfGrossweightnum: 0,
       showApproval: null,
+      allfPlanqty: 0,
     };
   },
   created() {
@@ -5326,11 +5324,14 @@ export default {
               }
             });
             this.fDriverTel = this.Printinglist[0].fDriverTel;
-            let date = new Date(this.Printinglist[0].fBsdate)
-            let Y = date.getFullYear()
-            let M = (date.getMonth() +1 <10 ?'0' + (date.getMonth() +1) : date.getMonth() +1)
-            let D = date.getDate()
-            this.fBsdate = Y + '-' + M + '-' + D
+            let date = new Date(this.Printinglist[0].fBsdate);
+            let Y = date.getFullYear();
+            let M =
+              date.getMonth() + 1 < 10
+                ? "0" + (date.getMonth() + 1)
+                : date.getMonth() + 1;
+            let D = date.getDate();
+            this.fBsdate = Y + "-" + M + "-" + D;
             // this.fBsdate = this.Printinglist[0].fBsdate;
             this.fTruckno = this.Printinglist[0].fTruckno;
             this.allfCntqty = 0;
@@ -5365,12 +5366,12 @@ export default {
               this.print_bzckd = true;
             } else if (command == "e") {
               this.print_lwqr = true;
-            } else if(command == "f"){
-              this.print_ccckd = true
-            } else if (command == "g"){
-              this.print_dcckd = true
-            } else if(command == "h"){
-              this.print_zccdckd = true
+            } else if (command == "f") {
+              this.print_ccckd = true;
+            } else if (command == "g") {
+              this.print_dcckd = true;
+            } else if (command == "h") {
+              this.print_zccdckd = true;
             }
           }
         });
@@ -5631,93 +5632,93 @@ export default {
     //打印
     addprint(status) {
       // if (status == "zyd") {
-        // if (this.CntrTable.length > 0) {
-        //   let arr = [];
-        //   this.CntrTable.map((e) => {
-        //     this.cntrList.map((item) => {
-        //       if (item.fId == e.fCntrid) {
-        //         arr.push(item.fName + "X" + e.fCntrcount);
-        //       }
-        //     });
-        //   });
-        //   arr = [...new Set(arr)];
-        //   this.form.fCntval = arr.join(",");
-        // } else {
-        //   this.form.fCntval = null;
-        // }
-        // if (this.detailList.length > 0) {
-        //   let arr = [];
-        //   this.detailList.map((e) => {
-        //     this.goodsOptions.map((item) => {
-        //       if (e.fGoodsid == item.fId) {
-        //         arr.push(item.fName);
-        //       }
-        //     });
-        //   });
-        //   arr = [...new Set(arr)];
-        //   this.form.fProductName = arr.join(",");
-        // } else {
-        //   this.form.fProductName = "";
-        // }
-        // if (this.detailList.length > 0) {
-        //   let arr = [];
-        //   this.detailList.map((e) => {
-        //     arr.push(e.fMarks);
-        //   });
-        //   arr = [...new Set(arr)];
-        //   this.form.fMarks = arr.join(",");
-        // } else {
-        //   this.form.fMarks = "";
-        // }
-        // this.form.fBillingway = this.form.fFeetUnit;
-        // if (this.detailList.length == 0) {
-        //   this.form.fNetweight = 0;
-        //   this.form.fPlanvolumn = 0;
-        //   this.form.fGrossweight = 0;
-        // } else {
-        //   this.form.fNetweight = this.fNetweight;
-        //   this.form.fPlanvolumn = this.fPlanvolumn;
-        //   this.form.fGrossweight = this.fGrossweight;
-        // }
-        // let formData = new window.FormData();
-        // formData.append("warehouseBills", JSON.stringify(this.form));
-        // formData.append(
-        //   "warehousebillsitems",
-        //   JSON.stringify(this.Printinglist)
-        // );
-        // formData.append(
-        //   "warehousebillsfeesDr",
-        //   JSON.stringify(this.warehouseDrList)
-        // );
-        // formData.append(
-        //   "warehousebillsfeesCr",
-        //   JSON.stringify(this.warehouseCrList)
-        // );
-        // formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
-        // formData.append("tCntr", JSON.stringify(this.CntrTable));
-        // addJoblist(formData).then((response) => {
-        //   if (response.code == 200) {
-        //     this.detailList.map((e, index) => {
-        //       response.data.warehousebillsitems.map((item) => {
-        //         item.fBsdate = Date.parse(new Date(item.fBsdate));
-        //         if (item.fBusinessType) {
-        //           item.fBusinessType = item.fBusinessType.toString();
-        //         }
-        //         if (e.fId == item.fId) {
-        //           this.$set(this.detailList, index, item);
-        //         }
-        //       });
-        //     });
-        //     this.$set(this.form, "fItemsStatus", 2);
-        //   }
-        // });
+      // if (this.CntrTable.length > 0) {
+      //   let arr = [];
+      //   this.CntrTable.map((e) => {
+      //     this.cntrList.map((item) => {
+      //       if (item.fId == e.fCntrid) {
+      //         arr.push(item.fName + "X" + e.fCntrcount);
+      //       }
+      //     });
+      //   });
+      //   arr = [...new Set(arr)];
+      //   this.form.fCntval = arr.join(",");
+      // } else {
+      //   this.form.fCntval = null;
+      // }
+      // if (this.detailList.length > 0) {
+      //   let arr = [];
+      //   this.detailList.map((e) => {
+      //     this.goodsOptions.map((item) => {
+      //       if (e.fGoodsid == item.fId) {
+      //         arr.push(item.fName);
+      //       }
+      //     });
+      //   });
+      //   arr = [...new Set(arr)];
+      //   this.form.fProductName = arr.join(",");
+      // } else {
+      //   this.form.fProductName = "";
+      // }
+      // if (this.detailList.length > 0) {
+      //   let arr = [];
+      //   this.detailList.map((e) => {
+      //     arr.push(e.fMarks);
+      //   });
+      //   arr = [...new Set(arr)];
+      //   this.form.fMarks = arr.join(",");
+      // } else {
+      //   this.form.fMarks = "";
+      // }
+      // this.form.fBillingway = this.form.fFeetUnit;
+      // if (this.detailList.length == 0) {
+      //   this.form.fNetweight = 0;
+      //   this.form.fPlanvolumn = 0;
+      //   this.form.fGrossweight = 0;
+      // } else {
+      //   this.form.fNetweight = this.fNetweight;
+      //   this.form.fPlanvolumn = this.fPlanvolumn;
+      //   this.form.fGrossweight = this.fGrossweight;
+      // }
+      // let formData = new window.FormData();
+      // formData.append("warehouseBills", JSON.stringify(this.form));
+      // formData.append(
+      //   "warehousebillsitems",
+      //   JSON.stringify(this.Printinglist)
+      // );
+      // formData.append(
+      //   "warehousebillsfeesDr",
+      //   JSON.stringify(this.warehouseDrList)
+      // );
+      // formData.append(
+      //   "warehousebillsfeesCr",
+      //   JSON.stringify(this.warehouseCrList)
+      // );
+      // formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
+      // formData.append("tCntr", JSON.stringify(this.CntrTable));
+      // addJoblist(formData).then((response) => {
+      //   if (response.code == 200) {
+      //     this.detailList.map((e, index) => {
+      //       response.data.warehousebillsitems.map((item) => {
+      //         item.fBsdate = Date.parse(new Date(item.fBsdate));
+      //         if (item.fBusinessType) {
+      //           item.fBusinessType = item.fBusinessType.toString();
+      //         }
+      //         if (e.fId == item.fId) {
+      //           this.$set(this.detailList, index, item);
+      //         }
+      //       });
+      //     });
+      //     this.$set(this.form, "fItemsStatus", 2);
+      //   }
+      // });
       // }
       const style =
         "@page {  } " +
         "@media print { .print-div{ padding:8px;background-color:#cccccc;} .print-title{display:flex;justify-content: center;font-size:24px} .print_form{font-size:12px} .print_table table {border-right: 1px solid #000;border-bottom: 1px solid #000;font-size:12px} .print_table table td {border-left: 1px solid #000;border-top: 1px solid #000;padding:2px;vertical-align:middle;text-align: center;}";
 
-      switch (status){
-        case 'zyd':
+      switch (status) {
+        case "zyd":
           if (this.CntrTable.length > 0) {
             let arr = [];
             this.CntrTable.map((e) => {
@@ -5780,7 +5781,10 @@ export default {
             "warehousebillsfeesCr",
             JSON.stringify(this.warehouseCrList)
           );
-          formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
+          formData.append(
+            "tEnclosure",
+            JSON.stringify(this.relevantAttachments)
+          );
           formData.append("tCntr", JSON.stringify(this.CntrTable));
           addJoblist(formData).then((response) => {
             if (response.code == 200) {
@@ -5798,38 +5802,61 @@ export default {
               this.$set(this.form, "fItemsStatus", 2);
             }
           });
-          break
-        case 'ccckd':
           print({
-            printable: "print_area6",
+            printable: "print_area1",
             type: "html",
             style: style, // 亦可使用引入的外部css;
             scanStyles: false,
           });
-          break
-        case 'dcckd':
+          break;
+        case "rkd":
+          print({
+            printable: "print_area2",
+            type: "html",
+            style: style, // 亦可使用引入的外部css;
+            scanStyles: false,
+          });
+          break;
+        case "bzckd":
+          print({
+            printable: "print_area3",
+            type: "html",
+            style: style, // 亦可使用引入的外部css;
+            scanStyles: false,
+          });
+          break;
+        case "lhd":
+          print({
+            printable: "print_area5",
+            type: "html",
+            style: style, // 亦可使用引入的外部css;
+            scanStyles: false,
+          });
+          break;
+        case "dcckd":
           print({
             printable: "print_area7",
             type: "html",
             style: style, // 亦可使用引入的外部css;
             scanStyles: false,
           });
-          break
-        case 'zccdckd':
+          break;
+        case "zccdckd":
           print({
             printable: "print_area8",
             type: "html",
             style: style, // 亦可使用引入的外部css;
             scanStyles: false,
           });
-          break
-        default:
-        print({
-          printable: "print_area1",
-          type: "html",
-          style: style, // 亦可使用引入的外部css;
-          scanStyles: false,
-        });
+          break;
+        case "lwqr":
+          print({
+            printable: "print_area10",
+            type: "html",
+            style: style, // 亦可使用引入的外部css;
+            scanStyles: false,
+          });
+          break;
       }
     },
     cancel() {