瀏覽代碼

运港通修改,打印取消限制

lichao 3 年之前
父節點
當前提交
d549941184

+ 0 - 1
src/views/Warehousing/inAndOutStock/AddOrUpdate.vue

@@ -3634,7 +3634,6 @@
       <span slot="footer" class="dialog-footer">
         <el-button
           type="primary"
-          :disabled="browseStatus"
           @click="
             addprint();
             print_bzrkd = false;

+ 77 - 1
src/views/Warehousing/inStock/AddOrUpdate.vue

@@ -135,7 +135,9 @@
                 style="width: 80%"
                 placeholder="请输入提单号"
                 v-Space
-            />
+            >
+              <el-button slot="append" icon="el-icon-search" :disabled="!form.fMblno" @click="getData"></el-button>
+            </el-input>
           </el-form-item>
         </el-col>
       </el-row>
@@ -6321,6 +6323,7 @@ import payMoney from "../components/payMoney";
 import uploadExcel from "./uploadExcel";
 import noUpload from "./noUpload";
 import { getDept } from "@/api/basicdata/dept";
+import axios from "axios";
 
 export default {
   name: "inStock",
@@ -6752,6 +6755,7 @@ export default {
         fTax: '',
       },
       noUploadVisible: false, //上传弹窗
+      bigDataToken: null,
     };
   },
   created() {
@@ -6795,6 +6799,9 @@ export default {
     this.getDicts("data_ifweigh_status").then((response) => {
       this.ifweightRecoveryList = response.data;
     });
+    this.getConfigKey("bigData.token").then((response) => {
+      this.bigDataToken = response.msg;
+    });
     this.getConfigKey("stockoi").then((response) => {
       this.stockoi = response.msg;
     });
@@ -9467,6 +9474,75 @@ export default {
     fStorekeeperChange() {
       this.$set(this.form, 'fContacts', this.form.fStorekeeper)
     },
+    async fMblnoSearch() {
+      let form = {};
+      await axios({
+          url: 'https://crawler.tubaosoft.com/prod-api/crawler/data',
+          method: 'post',
+          data: {
+            token: this.bigDataToken,
+            param: this.form.fMblno
+          },
+          headers: {
+            "Content-Type":'application/json'
+          }
+        }
+      ).then(res => {
+        if (res.data.code == 500) {
+          return this.$message.error(res.data.msg)
+        }
+        if (res.data.data[1].data.length != 0) {
+          form = {
+            fPlanqty: res.data.data[1].data[0].CARGO_QUANTITY,
+            fPlangrossweight: res.data.data[1].data[0].TOTAL_GROSS_WEIGHT,
+            fPlannetweight: res.data.data[1].data[0].TOTAL_GROSS_WEIGHT,
+          }
+          axios({
+            url: 'https://crawler.tubaosoft.com/prod-api/crawler/charge',
+            method: 'post',
+            data: {
+              token: this.bigDataToken,
+              param: this.form.fMblno,
+            },
+          }).then(() => {
+            if (res.data.code == 500) {
+              return this.$message.error(res.data.msg)
+            }
+          })
+        } else {
+          form = null
+        }
+      })
+      return form;
+    },
+    // 点击提单号旁边的查询
+    async getData() {
+      if (this.form.fPlanqty || this.form.fPlangrossweight || this.form.fPlannetweight) {
+        this.$confirm('计划已填写,是否进行覆盖?',  '提示',{
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(async () => {
+          const data = await this.fMblnoSearch();
+          if (!data) {
+            return
+          }
+          this.form.fPlanqty = data.fPlanqty;
+          this.form.fPlangrossweight = data.fPlangrossweight;
+          this.form.fPlannetweight = data.fPlannetweight;
+        }).catch(() => {
+          this.$message.info('已取消')
+        })
+      } else {
+        const data = await this.fMblnoSearch();
+        if (!data) {
+          return
+        }
+        this.form.fPlanqty = data.fPlanqty;
+        this.form.fPlangrossweight = data.fPlangrossweight;
+        this.form.fPlannetweight = data.fPlannetweight;
+      }
+    }
   },
   watch: {
     // 监听 addOrUpdateVisible 改变

+ 0 - 3
src/views/Warehousing/inStock/noUpload.vue

@@ -473,13 +473,10 @@ export default {
         if (res.data.data[1].data.length == 0) {
           // XH 箱号
           // QFH1 铅封号
-          // MZ 箱整重
           //TDH 提单号
           res.data.data[0].data.map(e => {
             e.fMblno = e.TDH;
             e.fSealno = e.QFH1;
-            e.fGrossweight = e.MZ;
-            e.fNetweight = e.MZ;
             e.fCntrno = e.XH;
           })
           // if (res.data.data[0].data.length == 1) {