浏览代码

Merge branch 'master' of http://47.100.3.209:3000/gdc/yiliangyiyun-pc

zhongtianhaoyuan 3 年之前
父节点
当前提交
854cbaec6d
共有 1 个文件被更改,包括 91 次插入85 次删除
  1. 91 85
      src/views/houseSelfCollect/inspectionManagementNew.vue

+ 91 - 85
src/views/houseSelfCollect/inspectionManagementNew.vue

@@ -307,7 +307,9 @@
 
               </ws-info-table>
 
-              <div class="title">质检数据 <span class="bulu">补录:</span><el-switch v-model="value1"></el-switch></div>
+              <div class="title">质检数据 <span class="bulu">补录:</span>
+                <el-switch v-model="value1"></el-switch>
+              </div>
               <ws-info-table>
                 <ws-form-item label="等级" span="1" prop="outType">
                   <ws-select style="margin-right:10px;" v-if='statusTypetext!="复检"' v-model="deptBudgetList.grade"
@@ -471,31 +473,34 @@
     },
     watch: {
       '$route'(to, from) {
-        console.log(this)
-        this.selectWarehouse()
-        var _saomaData = JSON.parse(localStorage.getItem('saoma_data'))
-        if (_saomaData) { //缓存中有值,证明扫码进来的
-          this.warehouseName = _saomaData.warehouseName
-          this.warehouseNameChange(this.warehouseName)
-          let ids = {}
-          ids.id = _saomaData.id
-          this.listclick(ids)
-          if (_saomaData.type == 1) {
-            this.statusTypetext = '初检'
-          } else if (_saomaData.type == 2) {
-            this.statusTypetext = '确认'
-          } else if (_saomaData.type == 3) {
-            this.statusTypetext = '复检'
-          }
-          this.serviceManagementType = _saomaData.managementType
-          localStorage.removeItem('saoma_data'); //第一次进来结束后清除缓存
-        } else {
-          let _WarehouseName = localStorage.getItem('houseSelfCollect_house1')
-          _WarehouseName = JSON.parse(_WarehouseName)
-          if (_WarehouseName) {
-            this.warehouseNameChange(_WarehouseName.value)
+        if (to.name == 'inspectionManagementNew') {
+          console.log(this)
+          this.selectWarehouse()
+          var _saomaData = JSON.parse(localStorage.getItem('saoma_data'))
+          if (_saomaData) { //缓存中有值,证明扫码进来的
+            this.warehouseName = _saomaData.warehouseName
+            this.warehouseNameChange(this.warehouseName)
+            let ids = {}
+            ids.id = _saomaData.id
+            this.listclick(ids)
+            if (_saomaData.type == 1) {
+              this.statusTypetext = '初检'
+            } else if (_saomaData.type == 2) {
+              this.statusTypetext = '确认'
+            } else if (_saomaData.type == 3) {
+              this.statusTypetext = '复检'
+            }
+            this.serviceManagementType = _saomaData.managementType
+            localStorage.removeItem('saoma_data'); //第一次进来结束后清除缓存
+          } else {
+            let _WarehouseName = localStorage.getItem('houseSelfCollect_house1')
+            _WarehouseName = JSON.parse(_WarehouseName)
+            if (_WarehouseName) {
+              this.warehouseNameChange(_WarehouseName.value)
+            }
           }
         }
+
         // 对路由变化作出响应...
         // this.routerParms.id=to.query.id
         // this.reload()
@@ -630,7 +635,7 @@
           },
         ],
         // searchKeyWord:''
-        value1:false,
+        value1: false,
       }
     },
     mounted() {
@@ -1678,22 +1683,22 @@
         // }
         if (this.value1 == false && this.statusTypetext == '初检') {
           this.deptBudgetList.warehouseInOutDetail.grade = this.deptBudgetList.grade
-      if (!this.deptBudgetList.grade) {
-        this.$message({
-          message: '等级不能为空!',
-          type: 'warning',
-        })
-        return
-      }
-        this.deptBudgetList.warehouseInOutDetail.waterContent =
-          this.deptBudgetList.waterContent
-        if (!this.deptBudgetList.waterContent) {
-           this.$message({
+          if (!this.deptBudgetList.grade) {
+            this.$message({
+              message: '等级不能为空!',
+              type: 'warning',
+            })
+            return
+          }
+          this.deptBudgetList.warehouseInOutDetail.waterContent =
+            this.deptBudgetList.waterContent
+          if (!this.deptBudgetList.waterContent) {
+            this.$message({
               message: '请输入水分',
               type: 'warning',
             })
             return
-        }
+          }
           if (isNaN(this.deptBudgetList.waterContent)) {
             this.$message({
               message: '水分(%)非数字!',
@@ -1706,8 +1711,8 @@
             this.deptBudgetList.waterContent > 40 ||
             (String(this.deptBudgetList.waterContent).indexOf('.') != -1 &&
               String(this.deptBudgetList.waterContent).length -
-                (String(this.deptBudgetList.waterContent).indexOf('.') + 1) >
-                2)
+              (String(this.deptBudgetList.waterContent).indexOf('.') + 1) >
+              2)
           ) {
             this.$message({
               message: '水分(%)输入错误! 取值范围0-40之间且可以保留2小数',
@@ -1716,16 +1721,16 @@
             return
           }
 
-        //杂质
-        this.deptBudgetList.warehouseInOutDetail.impurity =
-          this.deptBudgetList.impurity
-        if (!this.deptBudgetList.impurity) {
-           this.$message({
+          //杂质
+          this.deptBudgetList.warehouseInOutDetail.impurity =
+            this.deptBudgetList.impurity
+          if (!this.deptBudgetList.impurity) {
+            this.$message({
               message: '请输入杂质!',
               type: 'warning',
             })
             return
-        }
+          }
           if (isNaN(this.deptBudgetList.impurity)) {
             this.$message({
               message: '杂质(%)非数字!',
@@ -1738,8 +1743,8 @@
             this.deptBudgetList.impurity > 40 ||
             (String(this.deptBudgetList.impurity).indexOf('.') != -1 &&
               String(this.deptBudgetList.impurity).length -
-                (String(this.deptBudgetList.impurity).indexOf('.') + 1) >
-                2)
+              (String(this.deptBudgetList.impurity).indexOf('.') + 1) >
+              2)
           ) {
             this.$message({
               message: '杂质(%)输入错误! 取值范围0-40之间且可以保留2小数',
@@ -1748,16 +1753,16 @@
             return
           }
 
-        //霉变
-        this.deptBudgetList.warehouseInOutDetail.mildewGrain =
-          this.deptBudgetList.mildewGrain
-        if (!this.deptBudgetList.mildewGrain) {
-           this.$message({
+          //霉变
+          this.deptBudgetList.warehouseInOutDetail.mildewGrain =
+            this.deptBudgetList.mildewGrain
+          if (!this.deptBudgetList.mildewGrain) {
+            this.$message({
               message: '请输入霉变粒!',
               type: 'warning',
             })
             return
-        }
+          }
           if (isNaN(this.deptBudgetList.mildewGrain)) {
             this.$message({
               message: '霉变粒(%)非数字!',
@@ -1770,8 +1775,8 @@
             this.deptBudgetList.mildewGrain > 40 ||
             (String(this.deptBudgetList.mildewGrain).indexOf('.') != -1 &&
               String(this.deptBudgetList.mildewGrain).length -
-                (String(this.deptBudgetList.mildewGrain).indexOf('.') + 1) >
-                2)
+              (String(this.deptBudgetList.mildewGrain).indexOf('.') + 1) >
+              2)
           ) {
             this.$message({
               message: '霉变粒(%)输入错误! 取值范围0-40之间且可以保留2小数',
@@ -1780,17 +1785,17 @@
             return
           }
 
-        this.deptBudgetList.warehouseInOutDetail.jiaorenli =
-          this.deptBudgetList.jiaorenli
-        //热损伤
-        if (!this.deptBudgetList.jiaorenli) {
-           this.$message({
+          this.deptBudgetList.warehouseInOutDetail.jiaorenli =
+            this.deptBudgetList.jiaorenli
+          //热损伤
+          if (!this.deptBudgetList.jiaorenli) {
+            this.$message({
               message: '请输入热损伤!',
               type: 'warning',
             })
             return
 
-        }
+          }
           if (isNaN(this.deptBudgetList.jiaorenli)) {
             this.$message({
               message: '热损伤(%)非数字!',
@@ -1803,8 +1808,8 @@
             this.deptBudgetList.jiaorenli > 40 ||
             (String(this.deptBudgetList.jiaorenli).indexOf('.') != -1 &&
               String(this.deptBudgetList.jiaorenli).length -
-                (String(this.deptBudgetList.jiaorenli).indexOf('.') + 1) >
-                2)
+              (String(this.deptBudgetList.jiaorenli).indexOf('.') + 1) >
+              2)
           ) {
             this.$message({
               message: '热损伤(%)输入错误! 取值范围0-40之间且可以保留2小数',
@@ -1813,16 +1818,16 @@
             return
           }
 
-        this.deptBudgetList.warehouseInOutDetail.imperfectGrain =
-          this.deptBudgetList.imperfectGrain
-        //不完善粒(%)
-        if (!this.deptBudgetList.imperfectGrain) {
-           this.$message({
+          this.deptBudgetList.warehouseInOutDetail.imperfectGrain =
+            this.deptBudgetList.imperfectGrain
+          //不完善粒(%)
+          if (!this.deptBudgetList.imperfectGrain) {
+            this.$message({
               message: '请输入不完善粒!',
               type: 'warning',
             })
             return
-        }
+          }
           if (isNaN(this.deptBudgetList.imperfectGrain)) {
             this.$message({
               message: '不完善粒(%)非数字!',
@@ -1835,8 +1840,8 @@
             this.deptBudgetList.imperfectGrain > 40 ||
             (String(this.deptBudgetList.imperfectGrain).indexOf('.') != -1 &&
               String(this.deptBudgetList.imperfectGrain).length -
-                (String(this.deptBudgetList.imperfectGrain).indexOf('.') + 1) >
-                2)
+              (String(this.deptBudgetList.imperfectGrain).indexOf('.') + 1) >
+              2)
           ) {
             this.$message({
               message: '不完善粒(%)输入错误! 取值范围0-40之间且可以保留2小数',
@@ -1845,16 +1850,16 @@
             return
           }
 
-        //容重
-        this.deptBudgetList.warehouseInOutDetail.bulkDensity =
-          this.deptBudgetList.bulkDensity
-        if (!this.deptBudgetList.bulkDensity) {
-           this.$message({
+          //容重
+          this.deptBudgetList.warehouseInOutDetail.bulkDensity =
+            this.deptBudgetList.bulkDensity
+          if (!this.deptBudgetList.bulkDensity) {
+            this.$message({
               message: '请输入容重!',
               type: 'warning',
             })
             return
-        }
+          }
           if (isNaN(this.deptBudgetList.bulkDensity)) {
             this.$message({
               message: '容重(克/升)非数字!',
@@ -1866,8 +1871,8 @@
             (this.deptBudgetList.bulkDensity &&
               String(this.deptBudgetList.bulkDensity).indexOf('.') != -1 &&
               String(this.deptBudgetList.bulkDensity).length -
-                (String(this.deptBudgetList.bulkDensity).indexOf('.') + 1) >
-                2) ||
+              (String(this.deptBudgetList.bulkDensity).indexOf('.') + 1) >
+              2) ||
             this.deptBudgetList.bulkDensity > 1000 ||
             this.deptBudgetList.bulkDensity < 0
           ) {
@@ -1878,7 +1883,7 @@
             return
           }
 
-      }
+        }
         this.deptBudgetList.warehouseInOutDetail.reWaterContent = this.deptBudgetList.reWaterContent
         if (this.deptBudgetList.reWaterContent) {
           if (isNaN(this.deptBudgetList.reWaterContent)) {
@@ -2701,7 +2706,7 @@
           .then((response) => {
             this.gradeList = response
           })
-        
+
         this.multiSelector1 = []
         getinspectcontractno({
             compId: localStorage.getItem('ws-pf_compId'),
@@ -2717,15 +2722,15 @@
             // this.options1 = response
             // this.outContractNo = response
           })
-        
+
         getinspectList({
             compId: localStorage.getItem('ws-pf_compId'),
             currentPage: this.currentPage,
             pageSize: this.pageSize,
             warehouseName: this.warehouseName,
             managementType: 1,
-            statusType:this.statusType,
-            serviceManagementType:this.serviceManagementType
+            statusType: this.statusType,
+            serviceManagementType: this.serviceManagementType
           })
           .toPromise()
           .then((response) => {
@@ -2792,7 +2797,8 @@
   /deep/.ws-info-table .el-form-item.rememo .el-form-item__content {
     height: 76px;
   }
-  .bulu{
+
+  .bulu {
     font-size: 16px;
     font-weight: 500;
     margin-left: 10px;