zxz 3 år sedan
förälder
incheckning
751a4d4734

+ 18 - 29
src/views/outboundManagement/collectionManagement.vue

@@ -331,30 +331,28 @@ export default {
     varietyClick(row) {
        if (
         row.actualCollectionment < 0 ||
-        row.actualCollectionment > 100000 ||
+        row.actualCollectionment > 1000000 ||
         (String(row.actualCollectionment).indexOf('.') != -1 &&
           String(row.actualCollectionment).length -
             (String(row.actualCollectionment).indexOf('.') + 1) >
             2)
       ) {
         this.$message({
-          message: '金额输入错误',
+          message: '实际应收输入错误',
           type: 'warning',
         })
         return
       }
-      if (row.actualCollectionment) {
-        if (isNaN(row.actualCollectionment)) {
-          this.$message({
-            message: '金额非数字!',
-            type: 'warning',
-          })
-          return
-        }
-      }
       if (!row.actualCollectionment) {
         this.$message({
-          message: '金额不能为空!',
+          message: '实际应收不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (row.actualCollectionment < row.amountEdCollectionable) {
+        this.$message({
+          message: '实际应收不能小于已收款',
           type: 'warning',
         })
         return
@@ -413,7 +411,13 @@ export default {
       }
     },
     collectSubmit() {
-     
+     if (!this.collectionScreenshot) {
+        this.$message({
+          message: '请上传收款截图',
+          type: 'warning',
+        })
+        return
+      }
       this.$confirm(`确定提交收款信息?`, {
         cancelButtonText: '取消',
         confirmButtonText: '确定',
@@ -471,22 +475,6 @@ export default {
             })
         })
     },
-    //     disableReasons() {
-    //   this.outerVisible = false
-    //   this.disablieForm.disableStatusFlag = 0
-    //   disableDriver(this.disablieForm)
-    //     .toPromise()
-    //     .then((response) => {
-    //       this.$notify.success({
-    //         title: '成功',
-    //         message: '禁用成功',
-    //       })
-    //       this.getList()
-    //     })
-    //     .catch((response) => {
-    //       EventBus.$emit('error', response.message)
-    //     })
-    // },
     handlePictureCardPreview1(file) {
       this.collectionScreenshot = file.url
     },
@@ -532,6 +520,7 @@ export default {
       }).toPromise().then((response) => {
           for (var i = 0; i < response.records.length; i++) {
             response.records[i].identification = 'false'
+            response.records[i].contractPrice =  response.records[i].contractPrice/1000
           }
            this.collectList = response.records
         })

+ 2 - 10
src/views/outboundManagement/collectionment.vue

@@ -60,7 +60,7 @@
             </ws-form-item>
             <ws-form-item label="单价(元/公斤)" span="1" prop="contractPrice">
               <ws-input 
-              v-model="collectionList.contractPrice" placeholder="请输入单价" maxlength="100" size="small" disabled/>
+              v-model="collectionList.weighingManagement.contractPrice" placeholder="请输入单价" maxlength="100" size="small" disabled/>
             </ws-form-item>
             <ws-form-item label="车牌号" span="1" prop="carNo">
               <ws-input 
@@ -189,18 +189,10 @@ export default {
         id:this.$route.query.id,
         relationId: this.$route.query.relationId,
         compId: sessionStorage.getItem('ws-pf_compId'),
-      })
+      })     
       .toPromise()
       .then((response) => {
           this.collectionList = response
-          // this.qualityInspectionManagement = response
-          // this.paymentList.qualityInspectionManagement.waterMin=this.$route.query.waterMin
-          // this.paymentList.qualityInspectionManagement.weightDeduction=(this.paymentList.qualityInspectionManagement.waterContent-this.paymentList.qualityInspectionManagement.waterMin)*this.paymentList.buckleWeightRatio
-          // this.paymentList.base=(100-this.paymentList.qualityInspectionManagement.weightDeduction)/100
-          // this.paymentList.pureWeight=this.paymentList.base*this.paymentList.weighingManagement.netWeight
-          // if(!this.paymentList.solidGrainPrice){
-          //   this.paymentList.solidGrainPrice=this.paymentList.qualityInspectionManagement.tidalGrainPrice/this.paymentList.base
-          // }
         })
     },
   },

+ 136 - 48
src/views/outboundManagement/qualityInspection.vue

@@ -197,7 +197,6 @@ export default {
     this.inspect.carNumber = this.$route.query.carNumber
     this.inspect.goodsName = this.$route.query.goodsName
     this.inspect.storageTagNo = this.$route.query.storageTagNo
-    //this.inspect.personCharge = this.$route.query.personCharge
     let id = this.$route.query.id
     this.cangNo = this.$route.query.warehouseNo
     this.count = Number(this.$route.query.count)+1 
@@ -205,7 +204,6 @@ export default {
       this.disabled = true
       this.information = '查看'
     }
-    // this.calculation()
     this.getList(id)
   },
   methods: {
@@ -222,71 +220,161 @@ export default {
       }
       return year + mouth + datetime
     },
-    // calculation() {
-    //   let number ='000'+ this.count
-    //   number = number.substring(number.length - 4,number.length)
-    //   this.inspect.qualityNo = 'SGRK' + this.getdate()+this.cangNo+number //SGRK+8位时间+3位仓库编号+4位序列号
-    //   // + this.verifyinit()
-    // },
     print() {
       this.inspect.warehouseName = this.warehouseName
       this.inspect.id = this.$route.query.id
       this.inspect.qualityInspector = sessionStorage.getItem('ws-pf_staffName')
-          this.inspect.compId = sessionStorage.getItem('ws-pf_compId')
-      // if(this.types == null || this.types == ''){
-         this.$confirm('确定保存质检信息?', '提示', {
+      this.inspect.compId = sessionStorage.getItem('ws-pf_compId')
+              if (!this.inspect.grade) {
+          this.$message({
+            message: '等级不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.inspect.impurity) {
+          this.$message({
+            message: '杂质不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (String(this.inspect.impurity).indexOf('.') != -1 && String(this.inspect.impurity).length - (String(this.inspect.impurity).indexOf('.') + 1) > 1) {
+          this.$message({
+            message: '杂质输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        
+         if (this.inspect.impurity < 0 || this.inspect.impurity > 40) {
+          this.$message({
+            message: '杂质输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.inspect.waterContent) {
+          this.$message({
+            message: '水分不能为空',
+            type: 'warning',
+          })
+          return
+        }
+         if (this.inspect.waterContent < 0 || this.inspect.waterContent > 40) {
+          this.$message({
+            message: '水分输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (String(this.inspect.waterContent).indexOf('.') != -1 && String(this.inspect.waterContent).length - (String(this.inspect.waterContent).indexOf('.') + 1) > 1) {
+          this.$message({
+            message: '水分输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.inspect.mildewGrain) {
+          this.$message({
+            message: '霉变粒不能为空',
+            type: 'warning',
+          })
+          return
+        }
+         if (this.inspect.mildewGrain < 0 || this.inspect.mildewGrain > 40) {
+          this.$message({
+            message: '霉变粒输入错误',
+            type: 'warning',
+          })
+          return
+        }
+         if (String(this.inspect.mildewGrain).indexOf('.') != -1 && String(this.inspect.mildewGrain).length - (String(this.inspect.mildewGrain).indexOf('.') + 1) > 1) {
+          this.$message({
+            message: '霉变粒输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.inspect.bulkDensity) {
+          this.$message({
+            message: '容重不能为空',
+            type: 'warning',
+          })
+          return
+        }
+         if (this.inspect.bulkDensity < 500 || this.inspect.bulkDensity > 1000) {
+          this.$message({
+            message: '容重输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (String(this.inspect.bulkDensity).indexOf('.') != -1 && String(this.inspect.bulkDensity).length - (String(this.inspect.bulkDensity).indexOf('.') + 1) > 0) {
+          this.$message({
+            message: '容重需输入整数',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.inspect.jiaorenli) {
+          this.$message({
+            message: '热损伤不能为空',
+            type: 'warning',
+          })
+          return
+        }
+         if (this.inspect.jiaorenli < 0 || this.inspect.jiaorenli > 40) {
+          this.$message({
+            message: '热损伤输入错误',
+            type: 'warning',
+          })
+          return
+        }
+         if (String(this.inspect.jiaorenli).indexOf('.') != -1 && String(this.inspect.jiaorenli).length - (String(this.inspect.jiaorenli).indexOf('.') + 1) > 1) {
+          this.$message({
+            message: '热损伤输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.inspect.imperfectGrain) {
+          this.$message({
+            message: '不完善粒不能为空',
+            type: 'warning',
+          })
+          return
+        }
+         if (this.inspect.imperfectGrain < 0 || this.inspect.imperfectGrain > 40) {
+          this.$message({
+            message: '不完善粒输入错误',
+            type: 'warning',
+          })
+          return
+        }
+           if (String(this.inspect.imperfectGrain).indexOf('.') != -1 && String(this.inspect.imperfectGrain).length - (String(this.inspect.imperfectGrain).indexOf('.') + 1) > 1) {
+          this.$message({
+            message: '不完善粒输入错误',
+            type: 'warning',
+          })
+          return
+        }
+      this.$confirm('确定保存质检信息?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning',
       })
         .then(() => {
-          
           addOut(this.inspect)
             .toPromise()
             .then((response) => {
               this.$message.success('保存成功')
-              // this.xx = true;
-              // let newstr = document.getElementById('print').innerHTML
-              // let oldstr = document.body.innerHTML
-              // document.body.innerHTML = newstr
-              // window.print()
-              // document.body.innerHTML = oldstr
-              // // window.location.reload()
               this.$router.push({ path: 'qualityInspectionManagement' })
             })
         })
         .catch(() => {
           return false
         })
-
-      // }else if(this.types == 1){
-      //    this.$confirm('确定保存质检信息?', '提示', {
-      //   confirmButtonText: '确定',
-      //   cancelButtonText: '取消',
-      //   type: 'warning',
-      // })
-      //   .then(() => {
-      //     // return
-      //     getinspectEdit(this.inspect)
-      //       .toPromise()
-      //       .then((response) => {
-      //         this.$message.success('修改成功')
-      //         // this.xx = true;
-      //         // let newstr = document.getElementById('print').innerHTML
-      //         // let oldstr = document.body.innerHTML
-      //         // document.body.innerHTML = newstr
-      //         // window.print()
-      //         // document.body.innerHTML = oldstr
-      //         // window.location.reload()
-      //         this.$router.push({ path: 'paymentManagement' })
-      //       })
-      //   })
-      //   .catch(() => {
-      //     return false
-      //   })
-
-      // }
-     
     },
     cancel() {
       this.$router.push({ path: 'qualityInspectionManagement' })

+ 3 - 2
src/views/outboundManagement/qualityInspectionManagement.vue

@@ -66,7 +66,7 @@
       <el-table-column width="300" label="操作">
         <template slot-scope="scope">
           <span v-if="scope.row.status == '已质检'"><el-button @click="qualityInspection(scope.row, 2)">查看</el-button></span>
-          <span v-if="scope.row.status == '已称重' || scope.row.status == '' || scope.row.status == null"><el-button @click="qualityInspection(scope.row, 1)">质检</el-button></span>
+          <span v-if="scope.row.status == '已称重' || scope.row.status == '' || scope.row.status == null"><el-button @click="qualityInspection(scope.row, 1)">质检</el-button></span>
         </template>
       </el-table-column>
     </el-table>
@@ -99,7 +99,7 @@ export default {
       pageSize: 10,
       deptCircularPage: {},
       deptBudgetTotal: 0,
-
+      managementType:3,
       searchKeyWord: '',
       taskTypeList: [],
       searchType: 0,
@@ -163,6 +163,7 @@ export default {
         pageSize: this.pageSize,
         searchKeyWord: this.searchKeyWord,
         warehouseName: this.warehouseName,
+        managementType : this.managementType,
       })
         .toPromise()
         .then((response) => {