qukaidi vor 4 Jahren
Ursprung
Commit
b37037311a

+ 213 - 119
src/views/warehouseBusiness/inStock/index.vue

@@ -3268,7 +3268,6 @@
             {{ company }}有限公司
           </div>
           <div
-            class="print-title2"
             style="
               display: flex;
               justify-content: center;
@@ -3281,27 +3280,26 @@
           <div
             style="
               display: flex;
-              justify-content: space-around;
+              justify-content: space-between;
               margin-bottom: 5px;
             "
+            class="print_form"
           >
             <div>
               <div>提单号:{{ form.fMblno }}</div>
               <div>客户名称:{{ form.fCorpidName }}</div>
-              <div>货物名称:{{ form.fGoodsid }}</div>
+              <div>货物名称:{{ form.fProductName }}</div>
               <div>预计净重:{{ form.fPlannetweight }}</div>
             </div>
             <div>
               <div>入库计划单号:{{ form.fBillno }}</div>
               <div>计划入库日期:{{ form.fBstime }}</div>
-              <div>制单日期:{{ warehouseOptions[0].createTime }}</div>
+              <div>制单日期:{{ makeDate }}</div>
               <div>实际毛重:</div>
             </div>
             <div>
-              <div>清单号:</div>
-              <div>
-                存放仓库:{{ warehouseOptions[0].fWarehouseInformation }}
-              </div>
+              <div>清单号:{{ form.fCustomno }}</div>
+              <div>存放仓库:{{ stockName }}</div>
               <div>预计毛重:{{ form.fPlangrossweight }}</div>
               <div>实际净重:</div>
             </div>
@@ -3324,23 +3322,39 @@
                 <td>送货司机</td>
                 <td>备注</td>
               </tr>
+              <tr v-for="(item, index) in Printinglist" :key="index">
+                <td>{{ item.fCntrno }}</td>
+                <td></td>
+                <td>{{ item.fQty }}</td>
+                <td></td>
+                <td>{{ item.fWarehouseInformation }}</td>
+                <td>{{ item.fChargedate }}</td>
+                <td>{{ item.fTruckno }}</td>
+                <td>{{ item.fDriverName }}</td>
+                <td>{{ item.remark }}</td>
+              </tr>
               <tr>
-                <td>箱号</td>
-                <td>铅封号</td>
-                <td>预计件数</td>
-                <td>实际件数</td>
-                <td>垛位</td>
-                <td>实际入库日期</td>
-                <td>送货车号</td>
-                <td>送货司机</td>
-                <td>备注</td>
+                <td colspan="2">合计:</td>
+                <td>{{ allFqty }}</td>
+                <td></td>
+                <td></td>
+                <td></td>
+                <td></td>
+                <td></td>
+                <td></td>
               </tr>
             </table>
           </div>
-          <div style="display: flex; justify-content: space-around">
-            <div>操作:</div>
-            <div>库管:</div>
-            <div>叉车:</div>
+          <div
+            style="
+              display: flex;
+              justify-content: space-between;
+              font-size: 12px;
+            "
+          >
+            <div>操作:{{ form.createBy }}</div>
+            <div>库管:{{ form.fContacts }}</div>
+            <div style="width: 100px">叉车:</div>
           </div>
         </div>
         <span slot="footer" class="dialog-footer">
@@ -3369,7 +3383,6 @@
             {{ company }}有限公司
           </div>
           <div
-            class="print-title2"
             style="
               display: flex;
               justify-content: center;
@@ -3379,8 +3392,8 @@
           >
             <div>入&nbsp;库&nbsp;单</div>
           </div>
-          <div style="margin-bottom: 5px">
-            <div>客户名称:{{ form.fCorpid }}</div>
+          <div style="margin-bottom: 5px" class="print_form">
+            <div>客户名称:{{ form.fCorpidName }}</div>
           </div>
           <div class="print_table" style="display: flex">
             <table
@@ -3400,22 +3413,35 @@
                 <td>净重</td>
                 <td>备注</td>
               </tr>
+              <tr v-for="(item, index) in Printinglist" :key="index">
+                <td>{{ index + 1 }}</td>
+                <td>{{ item.fChargedate }}</td>
+                <td>{{ item.fGoodsids }}</td>
+                <td>{{ item.fMblno }}</td>
+                <td>{{ item.fCntrno }}</td>
+                <td>{{ item.fQty }}</td>
+                <td>{{ item.fGrossweight }}</td>
+                <td>{{ item.fNetweight }}</td>
+                <td>{{ item.remark }}</td>
+              </tr>
               <tr>
-                <td>序号</td>
-                <td>实际入库日期</td>
-                <td>商品名称</td>
-                <td>提单号</td>
-                <td>箱号</td>
-                <td>件数</td>
-                <td>毛重</td>
-                <td>净重</td>
-                <td>备注</td>
+                <td colspan="5">合计:</td>
+                <td>{{ allFqty }}</td>
+                <td>{{ allfGrossweight }}</td>
+                <td>{{ allfNetweight }}</td>
+                <td></td>
               </tr>
             </table>
           </div>
-          <div style="display: flex; justify-content: space-around">
-            <div>制单人:</div>
-            <div>审核人:</div>
+          <div
+            style="
+              display: flex;
+              justify-content: space-between;
+              font-size: 12px;
+            "
+          >
+            <div>制单人:{{ form.createBy }}</div>
+            <div style="width: 100px">审核人:</div>
           </div>
         </div>
         <span slot="footer" class="dialog-footer">
@@ -3444,7 +3470,6 @@
             {{ company }}有限公司
           </div>
           <div
-            class="print-title2"
             style="
               display: flex;
               justify-content: center;
@@ -3457,7 +3482,10 @@
           <div
             style="display: flex; justify-content: flex-end; margin-bottom: 5px"
           >
-            <div>存货地点:{{ form.fMblno }}</div>
+            <div>
+              <div>报关单号:{{ form.fCustomno }}</div>
+              <div>存货地点:</div>
+            </div>
           </div>
           <div class="print_table" style="display: flex">
             <table
@@ -3468,21 +3496,47 @@
             >
               <tr>
                 <td>品名</td>
-                <td>XXXXXXXXXXXX</td>
-                <td>清单号</td>
-                <td>XXXXXXXXXX</td>
+                <td colspan="3">{{ form.fProductName }}</td>
+                <td colspan="3">清单号</td>
+                <td colspan="2">{{ form.fCustomno }}</td>
               </tr>
               <tr>
-                <td>品名</td>
-                <td>XXXXXXXXXXXX</td>
-                <td>清单号</td>
-                <td>XXXXXXXXXX</td>
+                <td>提单号</td>
+                <td colspan="8">{{ form.fMblno }}</td>
+              </tr>
+              <tr>
+                <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.fChargedate }}</td>
+                <td>{{ item.fCntrno }}</td>
+                <td></td>
+                <td>{{ item.fQty }}</td>
+                <td>{{ item.fWarehouseInformation }}</td>
+                <td></td>
+                <td></td>
+                <td></td>
+                <td>{{ item.remark }}</td>
               </tr>
             </table>
           </div>
-          <div style="display: flex; justify-content: space-around">
-            <div>库管:</div>
-            <div>叉车:</div>
+          <div
+            style="
+              display: flex;
+              justify-content: space-between;
+              font-size: 12px;
+            "
+          >
+            <div>库管:{{ form.fContacts }}</div>
+            <div style="width: 100px">叉车:</div>
           </div>
         </div>
         <span slot="footer" class="dialog-footer">
@@ -3511,7 +3565,6 @@
             {{ company }}有限公司货物标识卡
           </div>
           <div
-            class="print-title2"
             style="
               display: flex;
               justify-content: center;
@@ -3521,32 +3574,6 @@
           >
             <div>入&nbsp;库&nbsp;计&nbsp;划&nbsp;单</div>
           </div>
-          <div
-            style="
-              display: flex;
-              justify-content: space-around;
-              margin-bottom: 5px;
-            "
-          >
-            <div>
-              <div>提单号:{{ form.fMblno }}</div>
-              <div>客户名称:{{ form.fCorpid }}</div>
-              <div>货物名称:{{ form.fGoodsid }}</div>
-              <div>预计净重:{{ form.fPlannetweight }}</div>
-            </div>
-            <div>
-              <div>入库计划单号:</div>
-              <div>计划入库日期:{{ form.fBsdate }}</div>
-              <div>制单日期:</div>
-              <div>实际毛重:</div>
-            </div>
-            <div>
-              <div>清单号:</div>
-              <div>存放仓库:{{ form.fWarehouseid }}</div>
-              <div>预计毛重:{{ form.fPlangrossweight }}</div>
-              <div>实际净重:</div>
-            </div>
-          </div>
           <div class="print_table" style="display: flex">
             <table
               border="0"
@@ -3555,26 +3582,66 @@
               style="width: 100%"
             >
               <tr>
-                <td>箱号</td>
-                <td>铅封号</td>
-                <td>预计件数</td>
-                <td>实际件数</td>
-                <td>垛位</td>
-                <td>实际入库日期</td>
-                <td>送货车号</td>
-                <td>送货司机</td>
-                <td>备注</td>
+                <td>货物名称</td>
+                <td colspan="2">{{ form.fProductName }}</td>
+                <td>库位</td>
+                <td colspan="2">{{ stockName }}</td>
+              </tr>
+              <tr>
+                <td>提单号</td>
+                <td colspan="2">{{ form.fMblno }}</td>
+                <td>清单号</td>
+                <td colspan="2">{{ form.fCustomno }}</td>
               </tr>
               <tr>
                 <td>箱号</td>
-                <td>铅封号</td>
-                <td>预计件数</td>
-                <td>实际件数</td>
-                <td>垛位</td>
-                <td>实际入库日期</td>
-                <td>送货车号</td>
-                <td>送货司机</td>
+                <td colspan="2"></td>
+                <td>总箱量</td>
+                <td colspan="2"></td>
+              </tr>
+              <tr>
+                <td>总件数</td>
+                <td colspan="2">{{ form.fPlanqty }}</td>
+                <td>总净重</td>
+                <td colspan="2">{{ form.fPlannetweight }}</td>
+              </tr>
+              <tr>
+                <td>总毛重</td>
+                <td colspan="2">{{ form.fPlangrossweight }}</td>
+                <td>本垛件数</td>
+                <td colspan="2">{{ allFqty }}</td>
+              </tr>
+              <tr>
+                <td>本垛净重</td>
+                <td colspan="2">{{ allfGrossweight }}</td>
+                <td>本垛毛重</td>
+                <td colspan="2">{{ allfNetweight }}</td>
+              </tr>
+              <tr>
+                <td>入库日期</td>
+                <td colspan="2">{{ form.fBstime }}</td>
+                <td>仓管员</td>
+                <td colspan="2">{{ form.fContacts }}</td>
+              </tr>
+              <tr>
+                <td>出库日期</td>
+                <td>出库件数</td>
+                <td>剩余件数</td>
+                <td>出库仓管员</td>
+                <td>盘点日期</td>
+                <td>盘点人</td>
+              </tr>
+              <tr style="height:17.8px" v-for="(item,index) in 10" :key="index">
+                <td></td>
+                <td></td>
+                <td></td>
+                <td></td>
+                <td></td>
+                <td></td>
+              </tr>
+              <tr style="height:50px">
                 <td>备注</td>
+                <td colspan="5"></td>
               </tr>
             </table>
           </div>
@@ -3718,11 +3785,15 @@ export default {
   },
   data() {
     return {
+      allfGrossweight: 0,
+      allfNetweight: 0,
       idCopy: "",
       //全屏放大
       dialogFull: false,
       //自定义列宽属性
       drag: false,
+      stockName: "",
+      makeDate: "",
       setRowList: [
         {
           surface: "1",
@@ -4203,6 +4274,7 @@ export default {
       before: "",
       //控制选择库位弹出
       choiceWarehouse: false,
+      allFqty: 0,
       // 查询参数
       queryParams: {
         fWarehouselocid: null,
@@ -4360,19 +4432,28 @@ export default {
           this.$set(this.form, "fCorpidName", this.fMblnoOptions[corp].fName);
         }
       }
-      console.log(command);
-      if (command == "a") {
-        this.showEditDialog_ss();
-      } else if (command == "b") {
-        this.showEditDialog_s();
-      } else if (command == "c") {
-        this.print_lhd = true;
-      } else if (command == "d") {
-        this.print_hwqr = true;
-      } else if (command == "e") {
-        this.print_lwqr = true;
-      } else if (command == "f") {
-        this.print_dpxx = true;
+      this.stockName = this.warehouseOptions[0].fName;
+      this.makeDate = this.warehouseOptions[0].createTime;
+      if (this.Printinglist.length > 0) {
+        this.$refs["form"].validate((valid) => {
+          if (valid) {
+            if (command == "a") {
+              this.showEditDialog_ss();
+            } else if (command == "b") {
+              this.showEditDialog_s();
+            } else if (command == "c") {
+              this.print_lhd = true;
+            } else if (command == "d") {
+              this.print_hwqr = true;
+            } else if (command == "e") {
+              this.print_lwqr = true;
+            } else if (command == "f") {
+              this.print_dpxx = true;
+            }
+          }
+        });
+      } else {
+        this.$message.error("请选择需要打印的明细!");
       }
     },
     full() {
@@ -5747,6 +5828,15 @@ export default {
       for (let corp in this.warehouseOptions) {
         this.fAddr = this.warehouseOptions[corp].fAddr;
       }
+      // 合计
+      this.allFqty = 0;
+      this.allfGrossweight = 0;
+      this.allfNetweight = 0;
+      for (let corp in this.Printinglist) {
+        this.allFqty += this.Printinglist[corp].fQty;
+        this.allfGrossweight += this.Printinglist[corp].fGrossweight;
+        this.allfNetweight += this.Printinglist[corp].fNetweight;
+      }
     },
 
     // 收款选
@@ -6590,7 +6680,7 @@ export default {
     addprint() {
       const style =
         "@page {  } " +
-        "@media print { .print-div{ padding:8px;background-color:#cccccc;} .print-title{display:flex;justify-content: center;font-size:24px} .print_table table {border-right: 1px solid #000;border-bottom: 1px solid #000;} .print_table table td {border-left: 1px solid #000;border-top: 1px solid #000;padding:2px;vertical-align:middle;text-align: center;}";
+        "@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;}";
       print({
         printable: "print_area1",
         type: "html",
@@ -7525,20 +7615,6 @@ export default {
   border-bottom: 1px solid #dfe6ec !important;
   border-bottom: 1px solid #dfe6ec !important;
 }
-.print_table {
-  table {
-    border-right: 1px solid #000;
-    border-bottom: 1px solid #000;
-  }
-  table td {
-    border-left: 1px solid #000;
-    border-top: 1px solid #000;
-    vertical-align: middle;
-    padding: 2px;
-    text-align: center;
-  }
-}
-
 .el-table thead th {
   background: #1890ff;
   color: #fff;
@@ -7603,4 +7679,22 @@ export default {
 .print-div {
   color: #000;
 }
+.print_table {
+  table {
+    border-right: 1px solid #000;
+    border-bottom: 1px solid #000;
+    font-size: 12px;
+    margin-bottom: 5px;
+  }
+  table td {
+    border-left: 1px solid #000;
+    border-top: 1px solid #000;
+    vertical-align: middle;
+    padding: 2px;
+    text-align: center;
+  }
+}
+.print_form {
+  font-size: 12px;
+}
 </style>

+ 429 - 2
src/views/warehouseBusiness/outStock/index.vue

@@ -1095,13 +1095,27 @@
                 @click.prevent="withdrawClick"
                 >撤回出库</el-button
               >
-              <el-button
+              <!-- <el-button
                 type="warning"
                 prop="打印"
                 :disabled="printinglist.length <= 0 || browseStatus"
                 @click="showEditDialog_s"
                 >出库单
-              </el-button>
+              </el-button> -->
+              <el-dropdown @command="handleCommand">
+                <el-button
+                  type="warning"
+                  :disabled="printinglist.length <= 0 || browseStatus"
+                >
+                  打印单据<i class="el-icon-arrow-down el-icon--right"></i>
+                </el-button>
+                <el-dropdown-menu slot="dropdown">
+                  <el-dropdown-item command="a">出库单</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-menu>
+              </el-dropdown>
               <!-- <el-button type="primary" :disabled="browseStatus" @click="saveForm">保 存</el-button> -->
               <el-button
                 style="background-color: #008000; color: #fff"
@@ -3154,6 +3168,337 @@
           <el-button @click="closeWindow">取消</el-button>
         </div>
       </el-dialog>
+      <el-dialog
+        :visible.sync="print_lhd"
+        width="70%"
+        :close-on-click-modal="false"
+        :modal="false"
+      >
+        <div id="print_area1" class="print-div">
+          <div
+            class="print-title"
+            style="
+              display: flex;
+              justify-content: center;
+              font-size: 24px;
+              margin-bottom: 5px;
+            "
+          >
+            {{ company }}有限公司
+          </div>
+          <div
+            style="
+              display: flex;
+              justify-content: center;
+              font-size: 18px;
+              margin-bottom: 5px;
+            "
+          >
+            <div>出&nbsp;库&nbsp;计&nbsp;划&nbsp;单</div>
+          </div>
+          <div
+            style="
+              display: flex;
+              justify-content: space-between;
+              margin-bottom: 5px;
+            "
+            class="print_form"
+          >
+            <div>
+              <div>客户名称:{{ form.fCorpidName }}</div>
+            </div>
+            <div>
+              <div>存放仓库:{{ stockName }}</div>
+            </div>
+          </div>
+          <div class="print_table" style="display: flex">
+            <table
+              border="0"
+              cellspacing="0"
+              cellpadding="0"
+              style="width: 100%"
+            >
+              <tr>
+                <td>品名</td>
+                <td colspan="3">{{ form.fProductName }}</td>
+                <td colspan="2">清单号</td>
+                <td colspan="3">{{ form.fCustomno }}</td>
+              </tr>
+              <tr>
+                <td>提单号</td>
+                <td colspan="3">{{ form.fMblno }}</td>
+                <td colspan="2">预计出库日期</td>
+                <td colspan="3">{{ form.fChargedate }}</td>
+              </tr>
+              <tr>
+                <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.fCntrno }}</td>
+                <td>{{ item.fTruckno }}</td>
+                <td>{{ item.fWarehouseInformation }}</td>
+                <td>{{ item.fQty }}</td>
+                <td>{{ item.fGrossweight }}</td>
+                <td></td>
+                <td></td>
+                <td></td>
+                <td></td>
+              </tr>
+              <tr>
+                <td colspan="3">合计</td>
+                <td>{{ allFqty }}</td>
+                <td>{{ allfGrossweight }}</td>
+                <td></td>
+                <td></td>
+                <td></td>
+                <td></td>
+              </tr>
+            </table>
+          </div>
+          <div
+            style="
+              display: flex;
+              justify-content: space-between;
+              font-size: 12px;
+            "
+          >
+            <div>库管:{{ form.fContacts }}</div>
+            <div>制单人:{{ form.createBy }}</div>
+
+            <div style="width: 150px">叉车:</div>
+          </div>
+          <div
+            style="
+              display: flex;
+              justify-content: space-between;
+              font-size: 12px;
+            "
+          >
+            <div>初始审核人:</div>
+            <div style="width: 150px">复式审核人:</div>
+          </div>
+        </div>
+        <span slot="footer" class="dialog-footer">
+          <el-button type="primary" :disabled="browseStatus" @click="addprint"
+            >打印
+          </el-button>
+          <el-button @click="print_lhd = false">取消 </el-button>
+        </span>
+      </el-dialog>
+      <el-dialog
+        :visible.sync="print_hwqr"
+        width="70%"
+        :close-on-click-modal="false"
+        :modal="false"
+      >
+        <div id="print_area1" class="print-div">
+          <div
+            class="print-title"
+            style="
+              display: flex;
+              justify-content: center;
+              font-size: 24px;
+              margin-bottom: 5px;
+            "
+          >
+            {{ company }}有限公司
+          </div>
+          <div
+            style="
+              display: flex;
+              justify-content: center;
+              font-size: 18px;
+              margin-bottom: 5px;
+            "
+          >
+            <div>出&nbsp;库&nbsp;单</div>
+          </div>
+          <div style="margin-bottom: 5px" class="print_form">
+            <div style="width: 150px">存货地点:</div>
+          </div>
+          <div class="print_table" style="display: flex">
+            <table
+              border="0"
+              cellspacing="0"
+              cellpadding="0"
+              style="width: 100%"
+            >
+              <tr>
+                <td>品名</td>
+                <td colspan="2">{{ form.fProductName }}</td>
+                <td colspan="1">清单号</td>
+                <td colspan="3">{{ form.fCustomno }}</td>
+              </tr>
+              <tr>
+                <td>提单号</td>
+                <td colspan="2">{{ form.fMblno }}</td>
+                <td colspan="1">预计出库日期</td>
+                <td colspan="3">{{ form.fChargedate }}</td>
+              </tr>
+              <tr>
+                <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></td>
+                <td>{{ item.fTruckno }}</td>
+                <td></td>
+                <td>{{ item.fWarehouseInformation }}</td>
+                <td>{{ item.fQty }}</td>
+                <td>{{ item.fGrossweight }}</td>
+                <td>{{ item.remark }}</td>
+              </tr>
+              <tr>
+                <td colspan="3">合计:</td>
+                <td></td>
+                <td>{{ allFqty }}</td>
+                <td>{{ allfGrossweight }}</td>
+                <td>{{ allfNetweight }}</td>
+              </tr>
+            </table>
+          </div>
+          <div
+            style="
+              display: flex;
+              justify-content: space-between;
+              font-size: 12px;
+            "
+          >
+            <div>制单人:{{ form.createBy }}</div>
+            <div style="width: 100px">审核人:</div>
+          </div>
+        </div>
+        <span slot="footer" class="dialog-footer">
+          <el-button type="primary" :disabled="browseStatus" @click="addprint"
+            >打印
+          </el-button>
+          <el-button @click="print_hwqr = false">取消 </el-button>
+        </span>
+      </el-dialog>
+      <el-dialog
+        :visible.sync="print_lwqr"
+        width="70%"
+        :close-on-click-modal="false"
+        :modal="false"
+      >
+        <div id="print_area1" class="print-div">
+          <div
+            class="print-title"
+            style="
+              display: flex;
+              justify-content: center;
+              font-size: 24px;
+              margin-bottom: 5px;
+            "
+          >
+            {{ company }}有限公司
+          </div>
+          <div
+            style="
+              display: flex;
+              justify-content: center;
+              font-size: 18px;
+              margin-bottom: 5px;
+            "
+          >
+            <div>出&nbsp;库&nbsp;单</div>
+          </div>
+          <div
+            style="display: flex; justify-content: flex-end; margin-bottom: 5px"
+          >
+            <div>
+              <div style="width: 150px">存货地点:</div>
+            </div>
+          </div>
+          <div class="print_table" style="display: flex">
+            <table
+              border="0"
+              cellspacing="0"
+              cellpadding="0"
+              style="width: 100%"
+            >
+              <tr>
+                <td>品名</td>
+                <td colspan="2">{{ form.fProductName }}</td>
+                <td colspan="1">清单号</td>
+                <td colspan="3">{{ form.fCustomno }}</td>
+              </tr>
+              <tr>
+                <td>提单号</td>
+                <td colspan="2">{{ form.fMblno }}</td>
+                <td colspan="1">预计出库日期</td>
+                <td colspan="3">{{ form.fChargedate }}</td>
+              </tr>
+              <tr>
+                <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></td>
+                <td>{{ item.fTruckno }}</td>
+                <td></td>
+                <td>{{ item.fWarehouseInformation }}</td>
+                <td>{{ item.fQty }}</td>
+                <td>{{ item.fGrossweight }}</td>
+                <td>{{ item.remark }}</td>
+              </tr>
+              <tr>
+                <td colspan="3">合计:</td>
+                <td></td>
+                <td>{{ allFqty }}</td>
+                <td>{{ allfGrossweight }}</td>
+                <td>{{ allfNetweight }}</td>
+              </tr>
+            </table>
+          </div>
+          <div
+            style="
+              display: flex;
+              justify-content: space-between;
+              font-size: 12px;
+            "
+          >
+            <div>库管:{{ form.fContacts }}</div>
+            <div>制单人:{{ form.createBy }}</div>
+
+            <div style="width: 150px">叉车:</div>
+          </div>
+          <div
+            style="
+              display: flex;
+              justify-content: space-between;
+              font-size: 12px;
+            "
+          >
+            <div>初始审核人:</div>
+            <div style="width: 150px">复式审核人:</div>
+          </div>
+        </div>
+        <span slot="footer" class="dialog-footer">
+          <el-button type="primary" :disabled="browseStatus" @click="addprint"
+            >打印
+          </el-button>
+          <el-button @click="print_lwqr = false">取消 </el-button>
+        </span>
+      </el-dialog>
     </el-dialog>
     <el-dialog
       title="选择库位"
@@ -3296,6 +3641,15 @@ export default {
       //全屏放大
       dialogFull: false,
       drag: false,
+      allFqty: 0,
+      allfGrossweight: 0,
+      allfNetweight: 0,
+      print_lhd: false,
+      print_hwqr: false,
+      print_lwqr: false,
+      print_dpxx: false,
+      stockName: "",
+      makeDate: "",
       setRowList: [
         {
           surface: "1",
@@ -3893,6 +4247,45 @@ export default {
     }
   },
   methods: {
+    handleCommand(command) {
+      console.log(command);
+      for (let corp in this.fMblnoOptions) {
+        if (this.form.fCorpid === this.fMblnoOptions[corp].fId) {
+          this.$set(this.form, "fCorpidName", this.fMblnoOptions[corp].fName);
+        }
+      }
+      this.stockName = this.warehouseOptions[0].fName;
+      this.makeDate = this.warehouseOptions[0].createTime;
+      if (this.printinglist.length > 0) {
+        this.$refs["form"].validate((valid) => {
+          if (valid) {
+            if (command == "a") {
+              this.showEditDialog_s();
+            } else if (command == "b") {
+              this.print_lhd = true;
+            } else if (command == "c") {
+              this.print_hwqr = true;
+            } else if (command == "d") {
+              this.print_lwqr = true;
+            }
+          }
+        });
+      } else {
+        this.$message.error("请选择需要打印的明细!");
+      }
+    },
+    //打印
+    addprint() {
+      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;}";
+      print({
+        printable: "print_area1",
+        type: "html",
+        style: style, // 亦可使用引入的外部css;
+        scanStyles: false,
+      });
+    },
     full() {
       this.dialogFull = !this.dialogFull;
     },
@@ -6254,6 +6647,19 @@ export default {
       this.fTruckno = selection[0].fTruckno;
       this.fCntrtype = selection[0].fCntrtype;
       this.fGoodsids = selection[0].fGoodsids;
+      // 打印回显仓库
+      for (let corp in this.warehouseOptions) {
+        this.fAddr = this.warehouseOptions[corp].fAddr;
+      }
+      // 合计
+      this.allFqty = 0;
+      this.allfGrossweight = 0;
+      this.allfNetweight = 0;
+      for (let corp in this.printinglist) {
+        this.allFqty += this.printinglist[corp].fQty;
+        this.allfGrossweight += this.printinglist[corp].fGrossweight;
+        this.allfNetweight += this.printinglist[corp].fNetweight;
+      }
     },
     // 更新主表品名并去重
     updateDeduplication: function () {
@@ -6873,4 +7279,25 @@ export default {
 .el-icon-full-screen:before {
   content: "\e719";
 }
+.print-div {
+  color: #000;
+}
+.print_table {
+  table {
+    border-right: 1px solid #000;
+    border-bottom: 1px solid #000;
+    font-size: 12px;
+    margin-bottom: 5px;
+  }
+  table td {
+    border-left: 1px solid #000;
+    border-top: 1px solid #000;
+    vertical-align: middle;
+    padding: 2px;
+    text-align: center;
+  }
+}
+.print_form {
+  font-size: 12px;
+}
 </style>

+ 101 - 5
src/views/warehouseBusiness/stockTransfer/index.vue

@@ -745,7 +745,7 @@
               >
                 <el-option
                   v-for="(dict, index) in businessTypeOption"
-                  :key="dict.dictValue"
+                  :key="index.dictValue"
                   :label="dict.dictLabel"
                   :value="dict.dictValue"
                 ></el-option>
@@ -958,6 +958,9 @@
               <el-button size="small" type="warning" :disabled="browseStatus" prop="打印" @click="showEditDialog_s"
               >入库单
               </el-button>
+                <el-button size="small" type="warning" :disabled="browseStatus" prop="打印" @click="printYkd"
+              >移库单
+              </el-button>
               <el-button
                 style="background-color: #008000; color: #fff"
                 @click="submitForm"
@@ -1614,7 +1617,7 @@
                 >
                   <el-option
                     v-for="(dict,index) in businessTypeOption"
-                    :key="dict.dictValue"
+                    :key="index.dictValue"
                     :label="dict.dictLabel"
                     :value="dict.dictValue"
                   ></el-option>
@@ -1965,12 +1968,11 @@
                 >
                   <el-option
                     v-for="(dict,index) in businessTypeOption"
-                    :key="dict.dictValue"
+                    :key="index.dictValue"
                     :label="dict.dictLabel"
                     :value="dict.dictValue"
                   ></el-option>
                 </el-select>
-
               </template>
             </el-table-column>
 
@@ -2756,7 +2758,70 @@
       <el-button @click="printSomething1">打印</el-button>
       <el-button @click="editDialogVisible_s = false">取消 </el-button>
     </el-dialog>
-
+      <el-dialog
+        :visible.sync="print_ykd"
+        width="70%"
+        :close-on-click-modal="false"
+        :modal="false"
+      >
+        <div id="print_area1" class="print-div">
+          <div
+            class="print-title"
+            style="
+              display: flex;
+              justify-content: center;
+              font-size: 24px;
+              margin-bottom: 5px;
+            "
+          >
+            {{ company }}有限公司
+          </div>
+          <div
+            style="
+              display: flex;
+              justify-content: center;
+              font-size: 18px;
+              margin-bottom: 5px;
+            "
+          >
+            <div>出&nbsp;库&nbsp;单</div>
+          </div>
+          <div style="margin-bottom: 5px" class="print_form">
+            <div style="width: 150px">存货地点:</div>
+          </div>
+          <div class="print_table" style="display: flex">
+            <table
+              border="0"
+              cellspacing="0"
+              cellpadding="0"
+              style="width: 100%"
+            >
+              <tr>
+                <td>品名</td>
+                <td colspan="2">{{ form.fProductName }}</td>
+                <td colspan="1">清单号</td>
+                <td colspan="3">{{ form.fCustomno }}</td>
+              </tr>
+            </table>
+          </div>
+          <div
+            style="
+              display: flex;
+              justify-content: space-between;
+              font-size: 12px;
+            "
+          >
+            <div>制单人:{{ form.createBy }}</div>
+            <div style="width: 100px">审核人:</div>
+          </div>
+        </div>
+        <span slot="footer" class="dialog-footer">
+          <el-button type="primary" :disabled="browseStatus" @click="addprint"
+            >打印
+          </el-button>
+          <el-button @click="print_ykd = false">取消 </el-button>
+        </span>
+      </el-dialog>
     <el-dialog
       title="选择库位"
       :data="treeselectList"
@@ -2893,6 +2958,7 @@ export default {
       //全屏放大
       dialogFull:false,
       drag: false,
+      print_ykd:false,
       setRowList: [
         {
           surface: "1",
@@ -3433,6 +3499,36 @@ export default {
     this.Jump()
   },
   methods: {
+    printYkd(){
+      for (let corp in this.fMblnoOptions) {
+        if (this.form.fCorpid === this.fMblnoOptions[corp].fId) {
+          this.$set(this.form, "fCorpidName", this.fMblnoOptions[corp].fName);
+        }
+      }
+      this.stockName = this.warehouseOptions[0].fName;
+      this.makeDate = this.warehouseOptions[0].createTime;
+      if (this.printinglist.length > 0) {
+        this.$refs["form"].validate((valid) => {
+          if (valid) {
+           this.print_lwqr = true;
+          }
+        });
+      } else {
+        this.$message.error("请选择需要打印的明细!");
+      }
+    },
+    //打印
+    addprint() {
+      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;}";
+      print({
+        printable: "print_area1",
+        type: "html",
+        style: style, // 亦可使用引入的外部css;
+        scanStyles: false,
+      });
+    },
     //全屏放大
     full(){
       this.dialogFull = !this.dialogFull