Parcourir la source

前端解决部分bug sdy

zhongtianhaoyuan il y a 4 ans
Parent
commit
0471d659a4

+ 2 - 0
src/views/warehouse/warehouseManagementAdd.vue

@@ -310,6 +310,7 @@ export default {
     },
     returnsales() {
       this.$router.push({ path: 'warehouseManagementList' })
+      this.deptBudgetList = {}
     },
     // confirmPosition() {
     //   this.draggable = false
@@ -460,6 +461,7 @@ export default {
                 .then((response) => {
                   this.$message.success('添加成功')
                   this.$router.push({ path: 'warehouseManagementList' })
+                  this.deptBudgetList = {}
                 })
             } else {
               EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))

+ 3 - 3
src/views/warehouse/warehouseManagementDelivery.vue

@@ -365,7 +365,7 @@ export default {
         return
       }
       if (
-        this.deptBudgetList.grossWeight < 0 ||
+        this.deptBudgetList.grossWeight <= 0 ||
         this.deptBudgetList.grossWeight > 10000 ||
         (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
           String(this.deptBudgetList.grossWeight).length -
@@ -684,7 +684,7 @@ export default {
         return
       }
       if (
-        this.deptBudgetList.grossWeight < 0 ||
+        this.deptBudgetList.grossWeight <= 0 ||
         this.deptBudgetList.grossWeight > 10000 ||
         (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
           String(this.deptBudgetList.grossWeight).length -
@@ -726,7 +726,7 @@ export default {
         return
       }
       if (
-        this.deptBudgetList.netWeight < 0 ||
+        this.deptBudgetList.netWeight <= 0 ||
         this.deptBudgetList.netWeight >= 10000
       ) {
         this.$message({

+ 3 - 2
src/views/warehouse/warehouseManagementEdit.vue

@@ -270,6 +270,7 @@ computed : {
     //返回按钮
     returnWarehouse() {
       this.$router.push({ path: 'warehouseManagementList' })
+      this.deptBudgetList = {}
     },
     marker: function (item) {
       this.deptBudgetList.warehousePositioning =
@@ -468,9 +469,9 @@ computed : {
           edit(this.deptBudgetList)
             .toPromise()
             .then((response) => {
-              this.$message.success('编辑成功')
-              this.deptBudgetList = {}
+              this.$message.success('编辑成功')     
               this.$router.push({ path: 'warehouseManagementList' })
+              this.deptBudgetList = {}
             })
         } else {
           //EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))

+ 2 - 2
src/views/warehouse/warehouseManagementIoss.vue

@@ -279,7 +279,7 @@ export default {
   methods: {
     //返回按钮
     returnWarehouse() {
-       this.deptBudgetList.goodsName = ""
+       this.deptBudgetList= {}
       this.$router.push({ path: 'warehouseManagementList' })
     },
     //提交按钮
@@ -320,7 +320,7 @@ export default {
             .toPromise()
             .then((response) => {
               this.$message.success('提交成功')
-              this.deptBudgetList.goodsName = ""
+              this.deptBudgetList = {}
               this.$router.push({ path: 'warehouseManagementList' })
             })
         } else {

+ 2 - 0
src/views/warehouse/warehouseManagementList.vue

@@ -170,6 +170,7 @@
         </el-table-column>
       </el-table>
     </div>
+   
   </div>
 </template>
 <script>
@@ -227,6 +228,7 @@ export default {
       warehouseList: [],
       deptBudgetList: {},
       historyList: [],
+      deptBudgetTotal: 0,
       pickerBeginDateBefore: {
         disabledDate: (time) => {
           return time.getTime() > Date.now()

+ 4 - 25
src/views/warehouse/warehouseManagementLook.vue

@@ -87,12 +87,6 @@
               prop="binNumber"
               class="forlist"
             >
-              <!-- <ws-input
-              v-model.number="item.binNumber"
-              placeholder="请输入仓位编号"
-              maxlength="100"
-              size="small"
-            /> -->
               {{ item.binNumber }}
             </ws-form-item>
             <!--最大储量(吨)-->
@@ -102,32 +96,15 @@
               prop="maxStorage"
               class="forlist"
             >
-              <!-- <ws-input
-              v-model="item.maxStorage"
-              placeholder="请输入最大储量(吨)"
-              maxlength="20"
-              size="small"
-            /> -->
               {{ item.maxStorage }}
             </ws-form-item>
             <!--现有储量-->
             <ws-form-item label="现有储量" span="1" prop="nowStorage">
-              <!-- <ws-input
-              v-model="item.nowStorage"
-              placeholder="请输入现有储量"
-              maxlength="100"
-              size="small"
-            /> -->
+    
               {{ item.nowStorage }}
             </ws-form-item>
             <!--备注(选填)-->
             <ws-form-item label="备注(选填)" span="1" prop="remark">
-              <!-- <ws-input
-              v-model="item.remark"
-              placeholder="请输入备注(选项)"
-              maxlength="100"
-              size="small"
-            /> -->
               {{ item.remark }}
             </ws-form-item>
           </ws-info-table>
@@ -144,6 +121,7 @@
         >关闭</el-button
       >
     </div>
+    
   </div>
 </template>
 <script>
@@ -211,7 +189,7 @@ export default {
     }
   },
   activated() {
-    this.loaddata()
+    this.selectpackingMethod()
     this.showType = this.isShow
   },
   computed : {
@@ -229,6 +207,7 @@ export default {
     //返回按钮
     returnWarehouse() {
       this.$router.push({ path: 'warehouseManagementList' })
+      this.deptBudgetList = {}
     },
     dateFormat(fmt, date) {
       let ret

+ 310 - 18
src/views/warehouse/warehouseManagementPerfectDelivery.vue

@@ -431,6 +431,316 @@ export default {
     },
     //提交按钮
     submit() {
+        if (!this.dataList.goodsName) {
+        this.$message({
+          message: '货名不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.grossWeight) {
+        this.$message({
+          message: '毛重不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.dataList.grossWeight <= 0 ||
+        this.dataList.grossWeight > 10000 ||
+        (String(this.dataList.grossWeight).indexOf('.') != -1 &&
+          String(this.dataList.grossWeight).length -
+            (String(this.dataList.grossWeight).indexOf('.') + 1) >
+            3)
+      ) {
+        this.$message({
+          message: '毛重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.dataList.tare < 0 ||
+        this.dataList.tare > 10000 ||
+        (String(this.dataList.tare).indexOf('.') != -1 &&
+          String(this.dataList.tare).length -
+            (String(this.dataList.tare).indexOf('.') + 1) >
+            3)
+      ) {
+        this.$message({
+          message: '皮重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.agent) {
+        this.$message({
+          message: '经办人不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.dataList.agent.length < 2 ||
+        this.dataList.agent.length > 10
+      ) {
+        this.$message({
+          message: '经办人输入有误',
+          type: 'warning',
+        })
+        return
+      }
+       if (!this.dataList.grade) {
+        this.$message({
+          message: '品级不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.inOutDate) {
+        this.$message({
+          message: '入库日期不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.inOutType) {
+        this.$message({
+          message: '入库类型不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.carNo) {
+        this.$message({
+          message: '车牌号不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.dataList.carNo.length > 7) {
+        this.$message({
+          message: '车牌号输入错误,请输入7个字符之内',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.contractNo) {
+        this.$message({
+          message: '合同编号不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.dataList.contractNo.length < 6 ||
+        this.dataList.contractNo.length > 20
+      ) {
+        this.$message({
+          message: '合同编号长度不符合要求,请输入6-20个字符之内',
+          type: 'warning',
+        })
+        return
+      }
+
+      if (this.dataList.netWeight > this.$route.query.capacity) {
+        this.$message({
+          message: '入库量大于该仓库容量!',
+          type: 'warning',
+        })
+        return
+      }
+       //自检员
+      if (this.dataList.warehouseInOutDetail.qualityInspector) {
+        if (
+          this.dataList.warehouseInOutDetail.qualityInspector.length <
+            2 ||
+          this.dataList.warehouseInOutDetail.qualityInspector.length > 10
+        ) {
+          this.$message({
+            message: '质检员姓名长度错误!',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      if (this.dataList.warehouseInOutDetail.waterContent) {
+        if (isNaN(this.dataList.warehouseInOutDetail.waterContent)) {
+          this.$message({
+            message: '水分(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.waterContent < 1 ||
+          this.dataList.warehouseInOutDetail.waterContent > 40 ||
+          (String(
+            this.dataList.warehouseInOutDetail.waterContent
+          ).indexOf('.') != -1 &&
+            String(this.dataList.warehouseInOutDetail.waterContent)
+              .length -
+              (String(
+                this.dataList.warehouseInOutDetail.waterContent
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+      //杂质
+      if (this.dataList.warehouseInOutDetail.impurity) {
+        if (isNaN(this.dataList.warehouseInOutDetail.impurity)) {
+          this.$message({
+            message: '杂质(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.impurity < 1 ||
+          this.dataList.warehouseInOutDetail.impurity > 40 ||
+          (String(this.dataList.warehouseInOutDetail.impurity).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.dataList.warehouseInOutDetail.impurity).length -
+              (String(
+                this.dataList.warehouseInOutDetail.impurity
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+       //霉变
+      if (this.dataList.warehouseInOutDetail.mildewGrain) {
+        if (isNaN(this.dataList.warehouseInOutDetail.mildewGrain)) {
+          this.$message({
+            message: '霉变粒(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.mildewGrain < 1 ||
+          this.dataList.warehouseInOutDetail.mildewGrain > 40 ||
+          (String(this.dataList.warehouseInOutDetail.mildewGrain).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.dataList.warehouseInOutDetail.mildewGrain).length -
+              (String(
+                this.dataList.warehouseInOutDetail.mildewGrain
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+       //热损伤
+      if (this.dataList.warehouseInOutDetail.jiaorenli) {
+        if (isNaN(this.dataList.warehouseInOutDetail.jiaorenli)) {
+          this.$message({
+            message: '热损伤(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.jiaorenli < 1 ||
+          this.dataList.warehouseInOutDetail.jiaorenli > 40 ||
+          (String(this.dataList.warehouseInOutDetail.jiaorenli).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.dataList.warehouseInOutDetail.jiaorenli).length -
+              (String(
+                this.dataList.warehouseInOutDetail.jiaorenli
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+        //不完整粒(%)
+      if (this.dataList.warehouseInOutDetail.imperfectGrain) {
+        if (isNaN(this.dataList.warehouseInOutDetail.imperfectGrain)) {
+          this.$message({
+            message: '不完整粒(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.imperfectGrain < 1 ||
+          this.dataList.warehouseInOutDetail.imperfectGrain > 40 ||
+          (String(this.dataList.warehouseInOutDetail.imperfectGrain).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.dataList.warehouseInOutDetail.imperfectGrain).length -
+              (String(
+                this.dataList.warehouseInOutDetail.imperfectGrain
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '不完整粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      //容重
+       if (this.dataList.warehouseInOutDetail.bulkDensity) {
+        if (isNaN(this.dataList.warehouseInOutDetail.bulkDensity)) {
+          this.$message({
+            message: '容重(克/升)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.bulkDensity < 1 ||
+          this.dataList.warehouseInOutDetail.bulkDensity > 40 ||
+          (String(this.dataList.warehouseInOutDetail.bulkDensity).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.dataList.warehouseInOutDetail.bulkDensity).length -
+              (String(
+                this.dataList.warehouseInOutDetail.bulkDensity
+              ).indexOf('.') +
+                1) >
+              0)
+        ) {
+          this.$message({
+            message: '容重(克/升)输入错误! 取值范围1-40之间且是整数',
+            type: 'warning',
+          })
+          return
+        }
+      }
       this.$refs.dataList.validate((valid) => {
         if (valid) {
           this.dataList.compId = sessionStorage.getItem('ws-pf_compId')
@@ -448,24 +758,6 @@ export default {
         }
       })
     },
-    // //暂存按钮
-    // returnWarehouse() {
-    //   this.$refs.dataList.validate((valid) => {
-    //     if (valid) {
-    //       this.dataList.compId = sessionStorage.getItem('ws-pf_compId')
-    //       this.dataList.statusFlag = 1
-    //       addstorageputList(this.dataList)
-    //         .toPromise()
-    //         .then((response) => {
-    //           this.$message.success('添加成功')
-    //           this.$router.push({ path: 'warehouseManagementList' })
-    //         })
-    //     } else {
-    //       EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-    //       return false
-    //     }
-    //   })
-    // },
     tarechange(e) {
       if (this.dataList.grossWeight && this.dataList.tare) {
         this.dataList.netWeight = Number(

+ 311 - 1
src/views/warehouse/warehouseManagementPerfectput.vue

@@ -392,7 +392,6 @@ export default {
     this.dataList.inOutTypeKey = Number(this.$route.query.inOutTypeKey)
     this.dataList.statusFlag = this.$route.statusFlag
     this.dataList.warehouseInOutDetail = this.$route.query.warehouseInOutDetail
-    console.log(this.$route.query.warehouseInOutDetail,12121212121)
   },
   methods: {
     //返回按钮
@@ -432,6 +431,317 @@ export default {
     },
     //提交按钮
     submit() {
+       if (!this.dataList.goodsName) {
+        this.$message({
+          message: '货名不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.grossWeight) {
+        this.$message({
+          message: '毛重不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.dataList.grossWeight <= 0 ||
+        this.dataList.grossWeight > 10000 ||
+        (String(this.dataList.grossWeight).indexOf('.') != -1 &&
+          String(this.dataList.grossWeight).length -
+            (String(this.dataList.grossWeight).indexOf('.') + 1) >
+            3)
+      ) {
+        this.$message({
+          message: '毛重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+    
+      if (
+        this.dataList.tare < 0 ||
+        this.dataList.tare > 10000 ||
+        (String(this.dataList.tare).indexOf('.') != -1 &&
+          String(this.dataList.tare).length -
+            (String(this.dataList.tare).indexOf('.') + 1) >
+            3)
+      ) {
+        this.$message({
+          message: '皮重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.agent) {
+        this.$message({
+          message: '经办人不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.dataList.agent.length < 2 ||
+        this.dataList.agent.length > 10
+      ) {
+        this.$message({
+          message: '经办人输入有误',
+          type: 'warning',
+        })
+        return
+      }
+       if (!this.dataList.grade) {
+        this.$message({
+          message: '品级不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.inOutDate) {
+        this.$message({
+          message: '入库日期不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.inOutType) {
+        this.$message({
+          message: '入库类型不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.carNo) {
+        this.$message({
+          message: '车牌号不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.dataList.carNo.length > 7) {
+        this.$message({
+          message: '车牌号输入错误,请输入7个字符之内',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.contractNo) {
+        this.$message({
+          message: '合同编号不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.dataList.contractNo.length < 6 ||
+        this.dataList.contractNo.length > 20
+      ) {
+        this.$message({
+          message: '合同编号长度不符合要求,请输入6-20个字符之内',
+          type: 'warning',
+        })
+        return
+      }
+
+      if (this.dataList.netWeight > this.$route.query.capacity) {
+        this.$message({
+          message: '入库量大于该仓库容量!',
+          type: 'warning',
+        })
+        return
+      }
+       //自检员
+      if (this.dataList.warehouseInOutDetail.qualityInspector) {
+        if (
+          this.dataList.warehouseInOutDetail.qualityInspector.length <
+            2 ||
+          this.dataList.warehouseInOutDetail.qualityInspector.length > 10
+        ) {
+          this.$message({
+            message: '质检员姓名长度错误!',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      if (this.dataList.warehouseInOutDetail.waterContent) {
+        if (isNaN(this.dataList.warehouseInOutDetail.waterContent)) {
+          this.$message({
+            message: '水分(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.waterContent < 1 ||
+          this.dataList.warehouseInOutDetail.waterContent > 40 ||
+          (String(
+            this.dataList.warehouseInOutDetail.waterContent
+          ).indexOf('.') != -1 &&
+            String(this.dataList.warehouseInOutDetail.waterContent)
+              .length -
+              (String(
+                this.dataList.warehouseInOutDetail.waterContent
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+      //杂质
+      if (this.dataList.warehouseInOutDetail.impurity) {
+        if (isNaN(this.dataList.warehouseInOutDetail.impurity)) {
+          this.$message({
+            message: '杂质(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.impurity < 1 ||
+          this.dataList.warehouseInOutDetail.impurity > 40 ||
+          (String(this.dataList.warehouseInOutDetail.impurity).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.dataList.warehouseInOutDetail.impurity).length -
+              (String(
+                this.dataList.warehouseInOutDetail.impurity
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+       //霉变
+      if (this.dataList.warehouseInOutDetail.mildewGrain) {
+        if (isNaN(this.dataList.warehouseInOutDetail.mildewGrain)) {
+          this.$message({
+            message: '霉变粒(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.mildewGrain < 1 ||
+          this.dataList.warehouseInOutDetail.mildewGrain > 40 ||
+          (String(this.dataList.warehouseInOutDetail.mildewGrain).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.dataList.warehouseInOutDetail.mildewGrain).length -
+              (String(
+                this.dataList.warehouseInOutDetail.mildewGrain
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+       //热损伤
+      if (this.dataList.warehouseInOutDetail.jiaorenli) {
+        if (isNaN(this.dataList.warehouseInOutDetail.jiaorenli)) {
+          this.$message({
+            message: '热损伤(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.jiaorenli < 1 ||
+          this.dataList.warehouseInOutDetail.jiaorenli > 40 ||
+          (String(this.dataList.warehouseInOutDetail.jiaorenli).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.dataList.warehouseInOutDetail.jiaorenli).length -
+              (String(
+                this.dataList.warehouseInOutDetail.jiaorenli
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+        //不完整粒(%)
+      if (this.dataList.warehouseInOutDetail.imperfectGrain) {
+        if (isNaN(this.dataList.warehouseInOutDetail.imperfectGrain)) {
+          this.$message({
+            message: '不完整粒(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.imperfectGrain < 1 ||
+          this.dataList.warehouseInOutDetail.imperfectGrain > 40 ||
+          (String(this.dataList.warehouseInOutDetail.imperfectGrain).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.dataList.warehouseInOutDetail.imperfectGrain).length -
+              (String(
+                this.dataList.warehouseInOutDetail.imperfectGrain
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '不完整粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      //容重
+       if (this.dataList.warehouseInOutDetail.bulkDensity) {
+        if (isNaN(this.dataList.warehouseInOutDetail.bulkDensity)) {
+          this.$message({
+            message: '容重(克/升)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.bulkDensity < 1 ||
+          this.dataList.warehouseInOutDetail.bulkDensity > 40 ||
+          (String(this.dataList.warehouseInOutDetail.bulkDensity).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.dataList.warehouseInOutDetail.bulkDensity).length -
+              (String(
+                this.dataList.warehouseInOutDetail.bulkDensity
+              ).indexOf('.') +
+                1) >
+              0)
+        ) {
+          this.$message({
+            message: '容重(克/升)输入错误! 取值范围1-40之间且是整数',
+            type: 'warning',
+          })
+          return
+        }
+      }
       this.$confirm(`确定提交入库信息`, {
         cancelButtonText: '取消',
         confirmButtonText: '确定',

+ 21 - 2
src/views/warehouse/warehouseManagementPut.vue

@@ -446,6 +446,27 @@ export default {
           type: 'warning',
         })
         return
+      }
+       if (!this.deptBudgetList.grade) {
+        this.$message({
+          message: '品级不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.inOutDate) {
+        this.$message({
+          message: '入库日期不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.inOutType) {
+        this.$message({
+          message: '入库类型不能为空!',
+          type: 'warning',
+        })
+        return
       }
       if (!this.deptBudgetList.carNo) {
         this.$message({
@@ -678,8 +699,6 @@ export default {
         }
       }
       this.deptBudgetList.id = this.$route.query.id
-      console.log(this.deptBudgetList.id,1111111111)
-
         this.$confirm(`确定提交入库信息`, {
         cancelButtonText: '取消',
         confirmButtonText: '确定',

+ 1 - 1
src/views/warehouse/warehouseManagementRecord.vue

@@ -187,7 +187,7 @@
               <span style="color: #8890b1">{{ scope.row.carNo }}</span>
             </template>
           </el-table-column>
-          <el-table-column prop="qualityInspector" label="经办人">
+          <el-table-column prop="agent" label="经办人">
           </el-table-column>
           <el-table-column prop="buyer" label="内勤"> </el-table-column>
           <el-table-column prop="addressUrl" label="附件">