瀏覽代碼

修改作业单 增加进仓单

lichao 3 年之前
父節點
當前提交
8afe7dae57
共有 2 個文件被更改,包括 287 次插入56 次删除
  1. 197 14
      src/views/Warehousing/inStock/AddOrUpdate.vue
  2. 90 42
      src/views/Warehousing/outStock/AddOrUpdate.vue

+ 197 - 14
src/views/Warehousing/inStock/AddOrUpdate.vue

@@ -1216,7 +1216,8 @@
                   <el-dropdown-item command="g">标准入库单</el-dropdown-item>
                   <el-dropdown-item command="y">标准入库单(件数)</el-dropdown-item>
                   <el-dropdown-item command="z">标准入库单(详情)</el-dropdown-item>
-                  <!--                  <el-dropdown-item command="b">入库单</el-dropdown-item>-->
+<!--                  <el-dropdown-item command="o">标准入库单(其他)</el-dropdown-item>-->
+                  <el-dropdown-item command="b">进仓单</el-dropdown-item>
                   <!--                  <el-dropdown-item command="c">理货单</el-dropdown-item>-->
                   <!--                  <el-dropdown-item command="d">货物确认</el-dropdown-item>-->
                   <!--                  <el-dropdown-item command="e">劳务确认</el-dropdown-item>-->
@@ -1815,13 +1816,19 @@
           {{ company }}作业单
         </div>
         <div
-            style="
+          style="
             display: flex;
-            justify-content: center;
-            font-size: 18px;
+            justify-content: space-between;
             margin-bottom: 5px;
           "
-        ></div>
+        >
+          <div>
+          </div>
+          <div>
+            <div>流水号:{{form.fBillno }}</div>
+            <div>办单日期:{{ nowTime }}</div>
+          </div>
+        </div>
         <div class="print_table" style="display: flex">
           <table border="0" cellspacing="0" cellpadding="0" style="width: 100%; line-height: 30px">
             <tr>
@@ -1977,7 +1984,7 @@
         :close-on-click-modal="false"
         :modal="false"
     >
-      <div id="print_area1" class="print-div">
+      <div id="print_area18" class="print-div">
         <div
             class="print-title"
             style="
@@ -1995,7 +2002,7 @@
               <td>客户</td>
               <td>{{ form.fCorpidName }}</td>
               <td>仓库</td>
-              <td>{{ form.fWarehouseids }}</td>
+              <td>{{ form.fWarehouseid | warehouseFormat(warehouseOptions) }}</td>
               <td>地址</td>
               <td colspan="2">{{ stockaddr }}</td>
             </tr>
@@ -2017,6 +2024,15 @@
               <td>包装规格</td>
             </tr>
             <tr>
+              <td>{{ form.fMblno }}</td>
+              <td>{{ Printinglist.length > 0? Printinglist[0].fGoodsids: '' }}</td>
+              <td v-if="Printinglist.length > 0">{{Printinglist[0].fCntrtype | fCntrtypeFormat(cntrList)}}</td>
+              <td>{{ Printinglist.length > 0? Printinglist[0].fMarks: '' }}</td>
+              <td></td>
+              <td>吨</td>
+              <td>{{ Printinglist.length > 0? Printinglist[0].fPackagespecs: '' }}</td>
+            </tr>
+            <tr>
               <td></td>
               <td></td>
               <td></td>
@@ -2026,16 +2042,16 @@
               <td></td>
             </tr>
             <tr>
-              <td>号</td>
+              <td>车号/箱号</td>
               <td>入货日期</td>
-              <td>箱量(20GP)</td>
+              <td>箱量</td>
               <td>重量</td>
               <td>件数</td>
               <td>入库重量</td>
               <td>入库件数</td>
             </tr>
             <tr v-for="(item, index) in Printinglist" :key="index">
-              <td>{{ index + 1 }}</td>
+              <td>{{ item.fTruckno }}/{{ item.fCntrno }}</td>
               <td>{{ item.fBsdate }}</td>
               <td>{{ item.fCntqty }}</td>
               <td v-if="item.fGrossweight">
@@ -2069,15 +2085,15 @@
           </table>
         </div>
         <div
-            style="display: flex; justify-content: space-between; font-size: 12px"
+            style="display: flex; justify-content: space-between; font-size: 12px;margin-bottom: 5px"
         >
           <div>开单员:</div>
-          <div style="width: 150px">仓管员:</div>
+          <div style="width: 150px">仓管员:{{ form.fStorekeeper }}</div>
         </div>
         <div
             style="display: flex; justify-content: space-between; font-size: 12px"
         >
-          <div>开单时间:</div>
+          <div>开单时间:{{ nowTime }}</div>
           <div style="width: 150px">(盖章)</div>
         </div>
       </div>
@@ -2086,7 +2102,7 @@
             type="primary"
             :disabled="browseStatus"
             @click="
-            addprint();
+            addprint('jcd');
             print_rkd = false;
           "
         >打印
@@ -2395,6 +2411,133 @@
         <el-button @click="print_bzrkd_xq = false">取消 </el-button>
       </span>
     </el-dialog>
+<!--    标准入库单-其他-->
+    <el-dialog
+      :visible.sync="print_bzrkd_qt"
+      width="70%"
+      :close-on-click-modal="false"
+      :modal="false"
+    >
+      <div id="print_area17" class="print-div">
+        <div
+          class="print-title"
+          style="
+            display: flex;
+            justify-content: center;
+            font-size: 24px;
+            margin-bottom: 5px;
+          "
+        >
+          {{ company }}入库单
+        </div>
+        <div style="width: 100%">
+          <div style="width: 100%;display: flex">
+            <div style="width: 33.333333%">
+              货权方:{{ form.fCorpidName }}
+            </div>
+            <div style="width: 33.333333%">
+              仓库:
+            </div>
+            <div style="width: 33.333333%">
+              地址:
+            </div>
+          </div>
+          <div style="width: 100%;display: flex">
+            <div style="width: 33.333333%">
+              保管方:{{ company }}
+            </div>
+            <div style="width: 33.333333%">
+              联系人:
+            </div>
+            <div style="width: 33.333333%">
+              电话:
+            </div>
+          </div>
+        </div>
+        <div class="print_table" style="display: flex">
+          <table border="0" cellspacing="0" cellpadding="0" style="width: 100%; line-height: 30px">
+            <tr>
+              <td>客户名称</td>
+              <td>{{ form.fCorpidName }}</td>
+              <td>入库日期</td>
+              <td>{{ form.fBsdate | fBsdateFormat }}</td>
+              <td>流水号</td>
+              <td colspan="5" v-if="form.fBillno">
+                {{ form.fBillno }}-{{ lsTime }}
+              </td>
+              <td colspan="5" v-else></td>
+            </tr>
+            <tr>
+              <td>车号</td>
+              <td>{{ form.fTruckno }}</td>
+              <td>提单号</td>
+              <td>{{ form.fMblno }}</td>
+              <td>箱号</td>
+              <td colspan="5" v-if="Printinglist.length">
+                {{ Printinglist[0].fCntrno }}
+              </td>
+              <td colspan="5" v-else></td>
+            </tr>
+            <tr>
+              <td>货名</td>
+              <td>箱量</td>
+              <td>货物属性</td>
+              <td>属性详情</td>
+              <td>件数</td>
+              <td>毛重(吨)</td>
+              <td>净重(吨)</td>
+              <td>规格</td>
+              <td>区位</td>
+              <td>备注</td>
+            </tr>
+            <tr v-for="(item, index) in Printinglist" :key="index">
+              <td>{{ item.fGoodsids }}</td>
+              <td>{{ item.fCntqty }}</td>
+              <td>{{ item.fBusinessType | fStorageTypeFormat(fStorageTypeOptions) }}</td>
+              <td>{{ item.fMarks }}</td>
+              <td>{{ item.fQty }}</td>
+              <td v-if="item.fGrossweight">
+                {{ (item.fGrossweight / 1000).toFixed(4) }}
+              </td>
+              <td v-else></td>
+              <td>{{ (item.fNetweight/1000).toFixed(4)}}</td>
+              <td>{{ item.fPackagespecs }}</td>
+              <td>{{ item.fWarehouseInformation }}</td>
+              <td>{{ item.remark }}</td>
+            </tr>
+            <tr>
+              <td>备注</td>
+              <!--              <td colspan="4">不贴标签不卸货</td>-->
+              <td colspan="4">{{ form.remark }}</td>
+              <td>总件数</td>
+              <td colspan="4">{{ allfQty }}</td>
+            </tr>
+          </table>
+        </div>
+        <div
+          style="display: flex; justify-content: space-between; font-size: 12px"
+        >
+          <div>操作:</div>
+          <div>理货:</div>
+          <div>叉车:</div>
+          <div>司机:</div>
+
+          <div style="width: 150px">电话:</div>
+        </div>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button
+          type="primary"
+          :disabled="browseStatus"
+          @click="
+            addprint('bzrkd_qt');
+            print_bzrkd_qt = false;
+          "
+        >打印
+        </el-button>
+        <el-button @click="print_bzrkd_qt = false">取消 </el-button>
+      </span>
+    </el-dialog>
     <el-dialog
         :visible.sync="print_lhd"
         width="70%"
@@ -5995,6 +6138,7 @@ export default {
   },
   data() {
     return {
+      nowTime: null,
       recordStatus: false,
       timeOut: '',
       plannedGrossWeight: 0,
@@ -6090,6 +6234,7 @@ export default {
       print_bzrkd: false,
       print_bzrkd_js: false,
       print_bzrkd_xq: false,
+      print_bzrkd_qt: false,
       print_dk: false,
       company: "",
       Printinglist: [],
@@ -6543,6 +6688,15 @@ export default {
       });
       return fCntrtype;
     },
+    storekeeper(row, userOptions) {
+      let name;
+      userOptions.map((e) => {
+        if (row == e.userName) {
+          name = e.nickName;
+        }
+      });
+      return name;
+    },
     goodsFormat(row, goodsOptions) {
       let goods;
       goodsOptions.map((e) => {
@@ -6552,6 +6706,15 @@ export default {
       });
       return goods;
     },
+    warehouseFormat(row, warehouseOptions) {
+      let warehouse;
+      warehouseOptions.map((e) => {
+        if (row == e.fId) {
+          warehouse = e.fName;
+        }
+      });
+      return warehouse;
+    },
     fLntypeFormat(row, unloadModes) {
       let name;
       unloadModes.map((e) => {
@@ -8139,6 +8302,7 @@ export default {
       });
     },
     printZyd() {
+      this.nowTime = new Date(+new Date() + 8 * 3600 * 1000 ).toJSON().substr(0, 19).replace("T"," ")
       if (this.Printinglist.length > 0) {
         for (let item in this.Printinglist) {
           if (!this.Printinglist[item].fId) {
@@ -8279,6 +8443,7 @@ export default {
             if (command == "a") {
               this.print_shd = true;
             } else if (command == "b") {
+              this.nowTime = new Date(+new Date() + 8 * 3600 * 1000 ).toJSON().substr(0, 19).replace("T"," ")
               this.print_rkd = true;
             } else if (command == "c") {
               this.print_lhd = true;
@@ -8344,6 +8509,8 @@ export default {
               this.print_bzrkd_js = true;
             } else if (command == "z") {
               this.print_bzrkd_xq = true;
+            } else if (command == "o") {
+              this.print_bzrkd_qt = true;
             }
           }
         })
@@ -8690,6 +8857,22 @@ export default {
             scanStyles: false,
           });
           break
+        case 'bzrkd_qt':
+          print({
+            printable: "print_area17",
+            type: "html",
+            style: style, // 亦可使用引入的外部css;
+            scanStyles: false,
+          });
+          break
+        case 'jcd':
+          print({
+            printable: "print_area18",
+            type: "html",
+            style: style, // 亦可使用引入的外部css;
+            scanStyles: false,
+          });
+          break
         case '001':
           print({
             printable: "print_area001",

+ 90 - 42
src/views/Warehousing/outStock/AddOrUpdate.vue

@@ -2488,8 +2488,12 @@
             margin-bottom: 5px;
           "
         >
-          <div></div>
-          <div>办单日期:{{ nowTime }}</div>
+          <div>
+          </div>
+          <div>
+            <div>流水号:{{ Printinglist.length > 0 ? Printinglist[0].fSerialNumber : '' }}</div>
+            <div>办单日期:{{ nowTime }}</div>
+          </div>
         </div>
         <div class="print_table" style="display: flex">
           <table
@@ -2511,7 +2515,7 @@
               <td>车号</td>
               <td>物品名称</td>
               <td>提单号</td>
-              <td>品牌/规格/产地</td>
+              <td>货物属性/属性详情</td>
               <td>净重(KG)</td>
               <td>件数/规格</td>
               <td>箱号</td>
@@ -2530,7 +2534,7 @@
               <td>{{ item.fQty }}/{{ item.fPackagespecs }}</td>
               <td>{{ item.fCntrno }}
               <td>{{ item.fWarehouseInformation }}</td>
-              <td>{{ form.fCartype | fCartypeFormat(fCartypeOptions) }}</td>
+              <td>{{ item.fCartypeId | fCartypeFormat(fCartypeOptions) }}</td>
             </tr>
             <tr>
               <td>备注</td>
@@ -2575,7 +2579,7 @@
           "
         >打印
         </el-button>
-        <el-button @click="print_zyd = false" size="mini">取消 </el-button>
+        <el-button @click="print_zyd = false;detailList = zcList.concat()" size="mini">取消 </el-button>
       </span>
     </el-dialog>
     <el-dialog
@@ -4278,6 +4282,7 @@ export default {
       isFlag: false,
       // Cr打印弹窗是否开启
       print_Cr: false,
+      zcList: [],
     };
   },
   computed: {
@@ -6304,7 +6309,7 @@ export default {
         this.isFlag = false
       }, 2000)
     },
-    printZyd() {
+    async printZyd() {
       this.nowTime = new Date(+new Date() + 8 * 3600 * 1000 ).toJSON().substr(0, 19).replace("T"," ")
       if (this.Printinglist.length > 0) {
         for (let item in this.Printinglist) {
@@ -6317,6 +6322,48 @@ export default {
             return this.$message.error("请选择车相同车号");
           }
         }
+        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));
+        await addJoblist(formData).then((response) => {
+          if (response.code == 200) {
+            this.Printinglist.forEach((item, index) => {
+              item.fSerialNumber = response.data.warehousebillsitems[index].fSerialNumber
+            })
+            for (let item in this.detailList) {
+              this.zcList[item] = this.detailList[item]
+            }
+              this.$set(this.form, "fDateChanged", response.data.fDateChanged);
+            this.zcList.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.zcList, index, item);
+                }
+              });
+            });
+            this.$set(this.form, "fItemsStatus", 2);
+          }
+        });
         this.print_zyd = true;
         this.warehouseOptions.map((e) => {
           if (e.fId == this.form.fWarehouseid) {
@@ -6869,42 +6916,43 @@ export default {
             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.$set(this.form, "fDateChanged", response.data.fDateChanged);
-              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);
-            }
-          });
+          this.detailList = this.zcList
+          // 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.$set(this.form, "fDateChanged", response.data.fDateChanged);
+          //     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);
+          //   }
+          // });
           print({
             printable: "print_area1",
             type: "html",