zhangyuewww 2 年之前
父节点
当前提交
99da5216f6

+ 17 - 23
src/views/outboundManagement/weighingManagementNew.vue

@@ -1534,27 +1534,23 @@
           //   })
           //   return
           // }
-          console.log(this.outContractNo)
+
           if(this.weighingList.agreementType!='代储合同'&&this.tpyeNo == 1){
-            if(this.weighingList.agreementType=='销售合同'&&this.outContractNo.settlementWeightMethod==1||this.weighingList.agreementType!='销售合同'){
-              if (!this.weighingList.contractPrice && this.weighingList.inOutType != '移库出库'
-              ||this.weighingList.inOutType == '移库出库'&&this.weighingList.priceType=='随行就市'&&this.weighingList.warehouseType==2) {
-                this.$message({
-                  message: '价格不能为空',
-                  type: 'warning',
-                })
-                return
-              }
-              console.log(this.isNumber(this.weighingList.contractPrice))
-              if(!this.isNumber(this.weighingList.contractPrice)&&!this.priceedit){
-                this.$message({
-                  message: '价格不能为非数字',
-                  type: 'warning',
-                })
-                return
-              }
+            if (!this.weighingList.contractPrice && this.weighingList.inOutType == '销售出库'&&this.weighingList.priceType=='随行就市'&&this.weighingList.settlementWeightMethod==1) {
+              this.$message({
+                message: '价格不能为空',
+                type: 'warning',
+              })
+              return
             }
-            
+            // console.log(this.isNumber(this.weighingList.contractPrice))
+            // if(!this.isNumber(this.weighingList.contractPrice)&&!this.priceedit){
+            //   this.$message({
+            //     message: '价格不能为非数字',
+            //     type: 'warning',
+            //   })
+            //   return
+            // }
           }
           
           if (
@@ -2477,13 +2473,12 @@
                   }
                 })
               }
-              
+              this.weighingList.priceType=this.outContractNo.priceType
+              this.weighingList.settlementWeightMethod=this.outContractNo.settlementWeightMethod
               if(this.outContractNo.priceType=='随行就市'){
                 this.priceedit=false
               }else if(this.outContractNo.priceType=='定价销售'){
                 this.priceedit=false
-              }{
-
               }
               this.warehouseCount = '000' + (Number(this.warehouseCount) + 1)
               this.weighingList.numberLetter = 'XSCK'
@@ -2516,7 +2511,6 @@
                    }
                 }
               }
-              this.weighingList.priceType=this.outContractNo.priceType
               this.warehouseCount = '000' + (Number(this.warehouseCount) + 1)
               this.weighingList.numberLetter = 'YKCK'
 

+ 7 - 7
src/views/tranManagement/tranManagementReceivingloading.vue

@@ -639,13 +639,13 @@ export default {
           return
         }
 
-        // if (this.deptBudgetList.priceType!=null&&this.deptBudgetList.priceType=='随行就市'&&!this.freightspace[i].contractPrice&&this.freightspace[i].unloadNetWeight>0) {
-            // this.$message({
-            //   message: '单价不能为空!',
-            //   type: 'warning',
-            // })
-            // return
-        // }
+        if (this.deptBudgetList.priceType!=null&&this.deptBudgetList.priceType=='随行就市'&&this.deptBudgetList.settlementWeightMethod=='2'&&!this.freightspace[i].contractPrice&&this.freightspace[i].unloadNetWeight>0) {
+            this.$message({
+              message: '单价不能为空!',
+              type: 'warning',
+            })
+            return
+        }
     }
       this.$confirm(
         `所有车辆完成卸车任务后,请及时修改任务状态,确定提交卸车信息?`,

+ 16 - 1
src/views/tranManagement/tranManagementthirdpartnarReceiving.vue

@@ -98,6 +98,14 @@
                 maxlength="20"
                 size="small"
               /></ws-form-item>
+              <ws-form-item label="单价(元/吨):" span="1" v-if="deptBudgetList.priceType!=null&&deptBudgetList.priceType=='随行就市'" prop="contractPrice">
+                <ws-input
+                  v-model="item.contractPrice"
+                  placeholder="请输入单价"
+                  maxlength="20"
+                  size="small"
+                />
+              </ws-form-item>
           </ws-info-table>
         </div>
       </div>
@@ -471,6 +479,13 @@ export default {
             })
             return
           }
+           if (this.deptBudgetList.priceType!=null&&this.deptBudgetList.priceType=='随行就市'&&this.deptBudgetList.settlementWeightMethod=='2'&&!this.freightspace[i].contractPrice&&this.freightspace[i].unloadNetWeight>0) {
+            this.$message({
+              message: '单价不能为空!',
+              type: 'warning',
+            })
+            return
+        }
           // if (
           //   this.freightspace[i].unloadNetWeight > 200 ||
           //   this.freightspace[i].unloadNetWeight < 0
@@ -559,7 +574,7 @@ export default {
         .then(() => {
           this.$refs.deptBudgetList.validate((valid) => {
             if (valid) {
-              posttranprocessinfo({id:this.deptBudgetList.id,contractNo:this.deptBudgetList.contractNo,tranCarInfoList1,tranCarInfoList2,tranCarInfoList3,tranCarInfoList4})
+              posttranprocessinfo({id:this.deptBudgetList.id,infoId:this.deptBudgetList.infoId,contractNo:this.deptBudgetList.contractNo,tranCarInfoList1,tranCarInfoList2,tranCarInfoList3,tranCarInfoList4})
                 .toPromise()
                 .then((response) => {
                   this.$message.success('提交成功')