Browse Source

计划毛重计划净重 连动

lichao 3 năm trước cách đây
mục cha
commit
707d01002f
1 tập tin đã thay đổi với 31 bổ sung17 xóa
  1. 31 17
      src/views/Warehousing/inStock/AddOrUpdate.vue

+ 31 - 17
src/views/Warehousing/inStock/AddOrUpdate.vue

@@ -136,7 +136,7 @@
                 placeholder="请输入提单号"
                 v-Space
             >
-              <el-button slot="append" icon="el-icon-search" :disabled="!form.fMblno" @click="getData"></el-button>
+              <el-button slot="append" icon="el-icon-search" :disabled="!form.fMblno || browseStatus" @click="getData"></el-button>
             </el-input>
           </el-form-item>
         </el-col>
@@ -319,7 +319,8 @@
               :disabled="
                 browseStatus || current !== before || form.warehouseStatus > 3
               "
-              @change="tfGrossweight"
+              @input="tfGrossweight"
+              @change="changePlangrossweight"
             >
               <template slot="append">{{ tfGrossweightnum }}吨</template>
             </el-input>
@@ -333,11 +334,11 @@
                 maxlength="16"
                 v-input-limit="2"
                 placeholder="计划净重"
-                @input="changePlannetWeight"
+                @change="changePlannetWeight"
                 :disabled="
                 browseStatus || current !== before || form.warehouseStatus > 3
               "
-                @change="tfNetweight"
+                @input="tfNetweight"
             >
               <template slot="append">{{ tfNetweightnum }}吨</template>
             </el-input>
@@ -9388,8 +9389,21 @@ export default {
       })
     },
     changePlannetWeight() {
-      if (this.bring == '0') {
+      if (this.form.fPlangrossweight) {
+        return
+      } else {
         this.$set(this.form, 'fPlangrossweight', this.form.fPlannetweight)
+        this.tfGrossweightnum = (Number(this.form.fPlangrossweight) / 1000).toFixed(4);
+      }
+      if (this.bring == '0') {
+      }
+    },
+    changePlangrossweight() {
+      if (this.form.fPlannetweight) {
+        return
+      } else {
+        this.$set(this.form, 'fPlannetweight', this.form.fPlangrossweight)
+        this.tfNetweightnum = (Number(this.form.fPlannetweight) / 1000).toFixed(4);
       }
     },
     // 费用明细撤销请核
@@ -9524,24 +9538,24 @@ export default {
           type: "warning"
         }).then(async () => {
           const data = await this.fMblnoSearch();
-                this.$nextTick(() => {
-                        if (!data) {
-                                return
-                        }
-                        this.$set(this.form, 'fPlanqty', data.fPlanqty)
-                        this.$set(this.form, 'fPlangrossweight', data.fPlangrossweight)
-                        this.$set(this.form, 'fPlannetweight', data.fPlannetweight)
-                })//PASUQ046992263
+            this.$nextTick(() => {
+              if (!data) {
+                return this.$message.error('该提单号未查到数据')
+              }
+              this.$set(this.form, 'fPlanqty', data.fPlanqty)
+              this.$set(this.form, 'fPlangrossweight', data.fPlangrossweight)
+              this.$set(this.form, 'fPlannetweight', data.fPlannetweight)
+            })//PASUQ046992263
         }).catch(() => {
           this.$message.info('已取消')
         })
       } else {
         const data = await this.fMblnoSearch();
 	      this.$nextTick(() => {
-                      if (!data) {
-                              return
-                      }
-	              this.$set(this.form, 'fPlanqty', data.fPlanqty)
+          if (!data) {
+            return this.$message.error('该提单号未查到数据')
+          }
+          this.$set(this.form, 'fPlanqty', data.fPlanqty)
 		      this.$set(this.form, 'fPlangrossweight', data.fPlangrossweight)
 		      this.$set(this.form, 'fPlannetweight', data.fPlannetweight)
 	      })