Browse Source

修改从表移除状态

lichao 3 years ago
parent
commit
69a29bb172

+ 370 - 92
src/views/Warehousing/outStock/AddOrUpdate.vue

@@ -914,13 +914,14 @@
                   打印单据<i class="el-icon-arrow-down el-icon--right"></i>
                 </el-button>
                 <el-dropdown-menu slot="dropdown">
-                  <el-dropdown-item command="d">标准出库单</el-dropdown-item>
-                  <el-dropdown-item command="i">标准出库单(详情)</el-dropdown-item>
+                  <el-dropdown-item command="d" v-if="showPrint != 1">标准出库单</el-dropdown-item>
+                  <el-dropdown-item command="i" v-if="showPrint != 1">标准出库单(详情)</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="w">叉车出库单(空白)</el-dropdown-item>
                   <el-dropdown-item command="g">单车出库单</el-dropdown-item>
                   <el-dropdown-item command="h">装车存档出库单</el-dropdown-item>
                   <el-dropdown-item command="q">签收单</el-dropdown-item>
@@ -1211,7 +1212,7 @@
             >
               <template slot-scope="scope">
                 <el-button
-                    :disabled="browseStatus || scope.row.fBillstatus >= 20"
+                    :disabled="browseStatus || scope.row.fBillstatus == 40"
                     type="text"
                     @click.native.prevent="wDeleteRow(scope.$index, detailList)"
                     size="small"
@@ -2789,7 +2790,7 @@
               </el-date-picker>
             </el-form-item>
           </el-col>
-          <el-col span="2">
+          <el-col :span="2">
             <div class="tabSetting">
               <el-button
                 type="cyan"
@@ -4000,6 +4001,124 @@
       </span>
     </el-dialog>
     <el-dialog
+      :visible.sync="print_kbccd"
+      width="70%"
+      :close-on-click-modal="false"
+      :modal="false"
+    >
+      <el-radio v-model="radio" :label="1">吨(T)</el-radio>
+      <el-radio v-model="radio" :label="2">千克(KG)</el-radio>
+      <div id="print_area9" class="print-div">
+        <div
+          class="print-title"
+          style="
+            display: flex;
+            justify-content: center;
+            font-size: 24px;
+            margin-bottom: 5px;
+          "
+        >
+          {{ fCompanyName? fCompanyName: company }}
+        </div>
+
+        <div
+          style="
+            display: flex;
+            justify-content: center;
+            margin-bottom: 5px;
+            margin-left: 170px;
+            width: 100%;
+          "
+        >
+          <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%; line-height: 30px"
+          >
+            <tr>
+              <td>品名</td>
+              <td colspan="3">{{ form.fProductName }}</td>
+              <td>清单号</td>
+              <td colspan="4">{{ form.fCustomsdeclartion }}</td>
+            </tr>
+            <tr>
+              <td>提单号</td>
+              <td colspan="3">{{ form.fMblno }}</td>
+              <td>出库日期</td>
+              <td colspan="4">{{ fBsdate }}</td>
+            </tr>
+            <tr>
+              <td>原入库箱号</td>
+              <td>出库车号</td>
+              <td>铅封号</td>
+              <td>垛位</td>
+              <td>件数</td>
+              <td v-if="radio == 1">净重(吨)</td>
+              <td v-else>净重(千克)</td>
+              <td>提货人</td>
+              <td>提货人电话</td>
+              <td>备注</td>
+            </tr>
+            <tr v-for="(item, index) in 28" :key="index">
+              <td style="height: 20px"></td>
+              <td></td>
+              <td></td>
+              <td></td>
+              <td></td>
+              <td v-if="radio == 1"></td>
+              <td v-else></td>
+              <td></td>
+              <td></td>
+              <td></td>
+            </tr>
+            <tr>
+              <td colspan="4">合计:</td>
+              <td></td>
+              <td v-if="radio == 1"></td>
+              <td v-else></td>
+              <td></td>
+              <td></td>
+              <td></td>
+            </tr>
+          </table>
+        </div>
+        <div
+          style="display: flex; justify-content: space-between; font-size: 12px"
+        >
+          <div>库管:{{ form.fStorekeeper | fStorekeeperFormat(userOptions) }}</div>
+          <div style="width: 130px;margin-right: 20px">叉车:</div>
+        </div>
+        <div
+          style="display: flex; justify-content: space-between; font-size: 12px"
+        >
+          <div>制单人:{{ form.createBy }}</div>
+          <div style="width: 100px">初审核人:{{ firstReviewer }}</div>
+          <div style="width: 130px;margin-right: 20px">复式审核人:{{ secondReviewer }}</div>
+        </div>
+      </div>
+
+      <span slot="footer" class="dialog-footer">
+        <el-button
+          type="primary"
+          @click="
+            addprint('kbccd');
+            print_kbccd = false;
+          "
+        >打印
+        </el-button>
+        <el-button @click="print_kbccd = false">取消 </el-button>
+      </span>
+    </el-dialog>
+    <el-dialog
         :visible.sync="print_dcckd"
         width="70%"
         :close-on-click-modal="false"
@@ -4901,6 +5020,7 @@ export default {
       print_zccdckd: false,
       print_bzckd: false,
       print_xqckd: false,
+      print_kbccd: false,
       company: "",
       Printinglist: [],
       // 收款信息明细
@@ -5669,6 +5789,7 @@ export default {
           width: 150,
         },
       ],
+      showPrint: null,
     };
   },
   computed: {
@@ -5708,6 +5829,9 @@ export default {
     this.getConfigKey("warehouse.show.feesConfirm").then((response) => {
       this.isShowFeesConfirm = response.msg;
     });
+    this.getConfigKey("warehouse.inStock.showPrint").then((response) => {
+      this.showPrint = response.msg;
+    });
     this.getDicts("st_out_type").then((response) => {
       this.businessTypeOption = response.data;
       localStorage.setItem("businessTypeList", JSON.stringify(response.data));
@@ -6181,90 +6305,207 @@ export default {
       //   this.$message({message: "未勾选信息", type: "warning"});
       //   return false;
       // }
+      let judge = false;
       if (this.stagingList.length > 0) {
-        this.stagingList.map((e) => {
-          this.detailList.push({
-            // fBsdate: this.form.fBsdate,
-            fBsdate: this.form.fBstime,
-            fId: null,
-            fMblno: e.fMblno,
-            fGoodsid: e.fGoodsid,
-            fCntrtype: null,
-            fPlanqty: e.fQtyblc,
-            fPlannetweight: e.fNetweightblc,
-            fPlangrossweight: e.fGrossweightblc,
-            fWarehouseLocationids: e.fWarehouseLocationids,
-            fGoodsids: e.fGoodsids,
-            fBillingway: e.fBillingway,
-            fChargedate: e.fChargedate,
-            fMarks: e.fMarks,
-            fOriginalbilldate: e.fOriginalbilldate,
-            fOriginalbillno: e.fOriginalbillno,
-            fPackagespecs: e.fPackagespecs,
-            fGrossweight: e.fGrossweightblc2,
-            fNetweight: e.fNetweightblc2,
-            fQty: e.fQtyblc2,
-            fCntqty: 1,
-            fBillstatus: 10,
-            fWarehouselocid: e.fWarehouseLocationid,
-            fWarehouselocids: e.fWarehouseLocationids,
-            fCntrno: e.fCntrno,
-            fGoodsval: null,
-            fTruckno: this.whgenlegList.fTruckno,
-            remark: null,
-            fIsPass: "F",
-            fDriverName: this.whgenlegList.fDriverName,
-            fDriverTel: this.whgenlegList.fDriverTel,
-            fDriverIdCar: this.whgenlegList.fDriverIdCar,
-            fBusinessType: e.fBusinessType ? e.fBusinessType.toString() : null,
-            fWarehouseInformation: e.fWarehouseids,
-            fSrcid: e.fId,
-            fSrcBsdate: e.fBsdate,
-            fShipper: e.fShipper,
+        this.stagingList.forEach(item => {
+          const index = this.detailList.some(e => e.fSrcid == item.fId)
+          if (index) {
+            judge = true
+          }
+        })
+        if (judge) {
+          this.$confirm('选中数据已存在明细列表,是否添加?', '提示', {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(() => {
+            this.stagingList.map((e) => {
+              this.detailList.push({
+                // fBsdate: this.form.fBsdate,
+                fBsdate: this.form.fBstime,
+                fId: null,
+                fMblno: e.fMblno,
+                fGoodsid: e.fGoodsid,
+                fCntrtype: null,
+                fPlanqty: e.fQtyblc,
+                fPlannetweight: e.fNetweightblc,
+                fPlangrossweight: e.fGrossweightblc,
+                fWarehouseLocationids: e.fWarehouseLocationids,
+                fGoodsids: e.fGoodsids,
+                fBillingway: e.fBillingway,
+                fChargedate: e.fChargedate,
+                fMarks: e.fMarks,
+                fOriginalbilldate: e.fOriginalbilldate,
+                fOriginalbillno: e.fOriginalbillno,
+                fPackagespecs: e.fPackagespecs,
+                fGrossweight: e.fGrossweightblc2,
+                fNetweight: e.fNetweightblc2,
+                fQty: e.fQtyblc2,
+                fCntqty: 1,
+                fBillstatus: 10,
+                fWarehouselocid: e.fWarehouseLocationid,
+                fWarehouselocids: e.fWarehouseLocationids,
+                fCntrno: e.fCntrno,
+                fGoodsval: null,
+                fTruckno: this.whgenlegList.fTruckno,
+                remark: null,
+                fIsPass: "F",
+                fDriverName: this.whgenlegList.fDriverName,
+                fDriverTel: this.whgenlegList.fDriverTel,
+                fDriverIdCar: this.whgenlegList.fDriverIdCar,
+                fBusinessType: e.fBusinessType ? e.fBusinessType.toString() : null,
+                fWarehouseInformation: e.fWarehouseids,
+                fSrcid: e.fId,
+                fSrcBsdate: e.fBsdate,
+                fShipper: e.fShipper,
+              });
+            });
+          }).catch(() => {
+            this.whgenlegVisible = false;
+          })
+        } else {
+          this.stagingList.map((e) => {
+            this.detailList.push({
+              // fBsdate: this.form.fBsdate,
+              fBsdate: this.form.fBstime,
+              fId: null,
+              fMblno: e.fMblno,
+              fGoodsid: e.fGoodsid,
+              fCntrtype: null,
+              fPlanqty: e.fQtyblc,
+              fPlannetweight: e.fNetweightblc,
+              fPlangrossweight: e.fGrossweightblc,
+              fWarehouseLocationids: e.fWarehouseLocationids,
+              fGoodsids: e.fGoodsids,
+              fBillingway: e.fBillingway,
+              fChargedate: e.fChargedate,
+              fMarks: e.fMarks,
+              fOriginalbilldate: e.fOriginalbilldate,
+              fOriginalbillno: e.fOriginalbillno,
+              fPackagespecs: e.fPackagespecs,
+              fGrossweight: e.fGrossweightblc2,
+              fNetweight: e.fNetweightblc2,
+              fQty: e.fQtyblc2,
+              fCntqty: 1,
+              fBillstatus: 10,
+              fWarehouselocid: e.fWarehouseLocationid,
+              fWarehouselocids: e.fWarehouseLocationids,
+              fCntrno: e.fCntrno,
+              fGoodsval: null,
+              fTruckno: this.whgenlegList.fTruckno,
+              remark: null,
+              fIsPass: "F",
+              fDriverName: this.whgenlegList.fDriverName,
+              fDriverTel: this.whgenlegList.fDriverTel,
+              fDriverIdCar: this.whgenlegList.fDriverIdCar,
+              fBusinessType: e.fBusinessType ? e.fBusinessType.toString() : null,
+              fWarehouseInformation: e.fWarehouseids,
+              fSrcid: e.fId,
+              fSrcBsdate: e.fBsdate,
+              fShipper: e.fShipper,
+            });
           });
-        });
+        }
       } else {
-        this.dialogWhgenlegList.map((e) => {
-          this.detailList.push({
-            // fBsdate: this.form.fBsdate,
-            fBsdate: this.form.fBstime,
-            fId: null,
-            fMblno: e.fMblno,
-            fGoodsid: e.fGoodsid,
-            fCntrtype: null,
-            fPlanqty: e.fQtyblc,
-            fPlannetweight: e.fNetweightblc,
-            fPlangrossweight: e.fGrossweightblc,
-            fWarehouseLocationids: e.fWarehouseLocationids,
-            fGoodsids: e.fGoodsids,
-            fBillingway: e.fBillingway,
-            fChargedate: e.fChargedate,
-            fMarks: e.fMarks,
-            fOriginalbilldate: e.fOriginalbilldate,
-            fOriginalbillno: e.fOriginalbillno,
-            fPackagespecs: e.fPackagespecs,
-            fGrossweight: e.fGrossweightblc2,
-            fNetweight: e.fNetweightblc2,
-            fQty: e.fQtyblc2,
-            fCntqty: 1,
-            fBillstatus: 10,
-            fWarehouselocid: e.fWarehouseLocationid,
-            fWarehouselocids: e.fWarehouseLocationids,
-            fCntrno: e.fCntrno,
-            fGoodsval: null,
-            fTruckno: this.whgenlegList.fTruckno,
-            remark: null,
-            fIsPass: "F",
-            fDriverName: this.whgenlegList.fDriverName,
-            fDriverTel: this.whgenlegList.fDriverTel,
-            fDriverIdCar: this.whgenlegList.fDriverIdCar,
-            fBusinessType: e.fBusinessType ? e.fBusinessType.toString() : null,
-            fWarehouseInformation: e.fWarehouseids,
-            fSrcid: e.fId,
-            fSrcBsdate: e.fBsdate,
-            fShipper: e.fShipper,
+        this.dialogWhgenlegList.forEach(item => {
+          const index = this.detailList.some(e => e.fSrcid == item.fId)
+          if (index) {
+            judge = true
+          }
+        })
+        if (judge) {
+          this.$confirm('选中数据已存在明细列表,是否添加?', '提示', {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(() => {
+            this.dialogWhgenlegList.map((e) => {
+              this.detailList.push({
+                // fBsdate: this.form.fBsdate,
+                fBsdate: this.form.fBstime,
+                fId: null,
+                fMblno: e.fMblno,
+                fGoodsid: e.fGoodsid,
+                fCntrtype: null,
+                fPlanqty: e.fQtyblc,
+                fPlannetweight: e.fNetweightblc,
+                fPlangrossweight: e.fGrossweightblc,
+                fWarehouseLocationids: e.fWarehouseLocationids,
+                fGoodsids: e.fGoodsids,
+                fBillingway: e.fBillingway,
+                fChargedate: e.fChargedate,
+                fMarks: e.fMarks,
+                fOriginalbilldate: e.fOriginalbilldate,
+                fOriginalbillno: e.fOriginalbillno,
+                fPackagespecs: e.fPackagespecs,
+                fGrossweight: e.fGrossweightblc2,
+                fNetweight: e.fNetweightblc2,
+                fQty: e.fQtyblc2,
+                fCntqty: 1,
+                fBillstatus: 10,
+                fWarehouselocid: e.fWarehouseLocationid,
+                fWarehouselocids: e.fWarehouseLocationids,
+                fCntrno: e.fCntrno,
+                fGoodsval: null,
+                fTruckno: this.whgenlegList.fTruckno,
+                remark: null,
+                fIsPass: "F",
+                fDriverName: this.whgenlegList.fDriverName,
+                fDriverTel: this.whgenlegList.fDriverTel,
+                fDriverIdCar: this.whgenlegList.fDriverIdCar,
+                fBusinessType: e.fBusinessType ? e.fBusinessType.toString() : null,
+                fWarehouseInformation: e.fWarehouseids,
+                fSrcid: e.fId,
+                fSrcBsdate: e.fBsdate,
+                fShipper: e.fShipper,
+              });
+            });
+          }).catch(() => {
+            this.whgenlegVisible = false;
+          })
+        } else {
+          this.dialogWhgenlegList.map((e) => {
+            this.detailList.push({
+              // fBsdate: this.form.fBsdate,
+              fBsdate: this.form.fBstime,
+              fId: null,
+              fMblno: e.fMblno,
+              fGoodsid: e.fGoodsid,
+              fCntrtype: null,
+              fPlanqty: e.fQtyblc,
+              fPlannetweight: e.fNetweightblc,
+              fPlangrossweight: e.fGrossweightblc,
+              fWarehouseLocationids: e.fWarehouseLocationids,
+              fGoodsids: e.fGoodsids,
+              fBillingway: e.fBillingway,
+              fChargedate: e.fChargedate,
+              fMarks: e.fMarks,
+              fOriginalbilldate: e.fOriginalbilldate,
+              fOriginalbillno: e.fOriginalbillno,
+              fPackagespecs: e.fPackagespecs,
+              fGrossweight: e.fGrossweightblc2,
+              fNetweight: e.fNetweightblc2,
+              fQty: e.fQtyblc2,
+              fCntqty: 1,
+              fBillstatus: 10,
+              fWarehouselocid: e.fWarehouseLocationid,
+              fWarehouselocids: e.fWarehouseLocationids,
+              fCntrno: e.fCntrno,
+              fGoodsval: null,
+              fTruckno: this.whgenlegList.fTruckno,
+              remark: null,
+              fIsPass: "F",
+              fDriverName: this.whgenlegList.fDriverName,
+              fDriverTel: this.whgenlegList.fDriverTel,
+              fDriverIdCar: this.whgenlegList.fDriverIdCar,
+              fBusinessType: e.fBusinessType ? e.fBusinessType.toString() : null,
+              fWarehouseInformation: e.fWarehouseids,
+              fSrcid: e.fId,
+              fSrcBsdate: e.fBsdate,
+              fShipper: e.fShipper,
+            });
           });
-        });
+        }
       }
       this.whgenlegVisible = false;
       this.stagingList = []
@@ -6448,7 +6689,7 @@ export default {
       this.judgmentWarehouse()
       this.fMblnoOptions.map((e) => {
         if (row == e.fId) {
-          this.$set(this.form, "fStltypeid", e.fStltypeid.toString());
+          e.fStltypeid? this.$set(this.form, "fStltypeid", e.fStltypeid.toString()): this.$set(this.form, "fStltypeid", null)
           // 选完客户带入发货方
           // this.$set(this.form, 'fShipper', e.fName)
         }
@@ -7879,15 +8120,19 @@ export default {
           e.fNetweightblc2 = e.fNetweightblc;
           const index = this.detailList.findIndex(item => item.fSrcid === e.fId)
           if (index == -1) {
-            arr.push(e)
+            // arr.push(e)
           } else {
-            response.total --
+            // judge = true;
+            // response.total --
           }
         });
-        // this.whgenlegList = response.rows;
-        this.whgenlegTotal = response.total;
-        this.whgenlegList = arr;
-        // this.whgenlegTotal = total;
+        // if (judge) {
+        //   this.$message.warning('该提单号已有数据存在在明细')
+        // }
+        this.whgenlegTotal = total;
+        this.whgenlegList = response.rows;
+        // this.whgenlegTotal = response.total;
+        // this.whgenlegList = arr;
       });
     },
     async printZyd() {
@@ -8136,11 +8381,36 @@ export default {
                   : date.getMinutes();
               this.ckTime = hours + ":" + minutes;
               this.print_xqckd = true;
+            } else if (command == "w") {
+              this.print_kbccd = true;
             }
           }
         });
       } else {
-        this.$message.error("请选择需要打印的明细!");
+        if (command == 'w') {
+          this.$refs["form"].validate((valid) => {
+            if (valid) {
+              this.warehouseOptions.map((e) => {
+                if (e.fId == this.form.fWarehouseid) {
+                  this.stockName = e.fName;
+                  this.stockaddr = e.fAddr;
+                }
+              });
+              if (!this.form.fBsdate) this.$set(this.form, 'fBsdate', this.form.fBstime)
+              let date = new Date(this.form.fBsdate);
+              let Y = date.getFullYear();
+              let M =
+                date.getMonth() + 1 < 10
+                  ? "0" + (date.getMonth() + 1)
+                  : date.getMonth() + 1;
+              let D = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
+              this.fBsdate = Y + "-" + M + "-" + D;
+              this.print_kbccd = true
+            }
+          })
+        } else {
+          this.$message.error("请选择需要打印的明细!");
+        }
       }
     },
     //计算仓储费日期变更
@@ -8658,6 +8928,14 @@ export default {
             scanStyles: false,
           });
           break;
+        case "kbccd":
+          print({
+            printable: "print_area9",
+            type: "html",
+            style: style, // 亦可使用引入的外部css;
+            scanStyles: false,
+          });
+          break;
         case "fyqrd":
           print({
             printable: "print_fyqr",

+ 0 - 2
src/views/Warehousing/stockTransfer/AddOrUpdate.vue

@@ -1435,8 +1435,6 @@
                 <el-button
                   :disabled="
                     browseStatus ||
-                    scope.row.fBillstatus === 20 ||
-                    scope.row.fBillstatus === 30 ||
                     scope.row.fBillstatus === 40
                   "
                   type="text"