|
@@ -1036,16 +1036,19 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if (!this.deptBudgetList.seller) {
|
|
|
+ if (!this.deptBudgetList.settlementMethod) {
|
|
|
this.$message({
|
|
|
- message: '请输入卖方名称!',
|
|
|
+ message: '请输入结算方式!',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if (this.deptBudgetList.seller.length > 30) {
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.settlementMethod.length < 1 ||
|
|
|
+ this.deptBudgetList.settlementMethod.length > 20
|
|
|
+ ) {
|
|
|
this.$message({
|
|
|
- message: '卖方名称长度不符合要求,请输入30个字符之内!',
|
|
|
+ message: '结算方式长度不符合要求,请输入1到20个字符之内!',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
return
|
|
@@ -1074,6 +1077,20 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
+ if (!this.deptBudgetList.seller) {
|
|
|
+ this.$message({
|
|
|
+ message: '请输入卖方名称!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.deptBudgetList.seller.length > 30) {
|
|
|
+ this.$message({
|
|
|
+ message: '卖方名称长度不符合要求,请输入30个字符之内!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
if (!this.deptBudgetList.sellerPhone) {
|
|
|
this.$message({
|
|
|
message: '请输入卖方电话!',
|
|
@@ -1098,6 +1115,13 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
+ if (!this.deptBudgetList.acceptanceMethod) {
|
|
|
+ this.$message({
|
|
|
+ message: '请选择验收方式',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
if (!this.deptBudgetList.weight) {
|
|
|
this.$message({
|
|
|
message: '请输入交易数量!',
|
|
@@ -1120,152 +1144,158 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if (!this.deptBudgetList.basisPrice) {
|
|
|
+ if (!this.deptBudgetList.warehousingFee) {
|
|
|
this.$message({
|
|
|
- message: '请输入基差!',
|
|
|
+ message: '请输入入库费!',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
if (
|
|
|
- isNaN(this.deptBudgetList.basisPrice) ||
|
|
|
- (String(this.deptBudgetList.basisPrice).indexOf('.') != -1 &&
|
|
|
- String(this.deptBudgetList.basisPrice).length -
|
|
|
- (String(this.deptBudgetList.basisPrice).indexOf('.') + 1) >
|
|
|
+ isNaN(this.deptBudgetList.warehousingFee) ||
|
|
|
+ (String(this.deptBudgetList.warehousingFee).indexOf('.') != -1 &&
|
|
|
+ String(this.deptBudgetList.warehousingFee).length -
|
|
|
+ (String(this.deptBudgetList.warehousingFee).indexOf('.') + 1) >
|
|
|
3) ||
|
|
|
- this.deptBudgetList.basisPrice < 0 ||
|
|
|
- this.deptBudgetList.basisPrice > 10000
|
|
|
+ this.deptBudgetList.warehousingFee < 0 ||
|
|
|
+ this.deptBudgetList.warehousingFee > 1000
|
|
|
) {
|
|
|
this.$message({
|
|
|
- message: '基差输入错误!',
|
|
|
+ message: '入库费输入错误!',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if (!this.deptBudgetList.transactionsPlace) {
|
|
|
+ if (!this.deptBudgetList.measurementStandard) {
|
|
|
this.$message({
|
|
|
- message: '请输入交易所!',
|
|
|
+ message: '请输入计量标准!',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
if (
|
|
|
- this.deptBudgetList.transactionsPlace.length < 2 ||
|
|
|
- this.deptBudgetList.transactionsPlace.length > 15
|
|
|
+ this.deptBudgetList.measurementStandard.length < 1 ||
|
|
|
+ this.deptBudgetList.measurementStandard.length > 20
|
|
|
) {
|
|
|
this.$message({
|
|
|
- message: '交易所长度不符合要求,请输入2到15个字符之内!',
|
|
|
+ message: '计量标准长度不符合要求,请输入1到20个字符之内!',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if (!this.deptBudgetList.contractNumber) {
|
|
|
+ if (!this.deptBudgetList.basisPrice) {
|
|
|
this.$message({
|
|
|
- message: '请输入合约号!',
|
|
|
+ message: '请输入基差!',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
if (
|
|
|
- this.deptBudgetList.contractNumber.length < 2 ||
|
|
|
- this.deptBudgetList.contractNumber.length > 15
|
|
|
+ isNaN(this.deptBudgetList.basisPrice) ||
|
|
|
+ (String(this.deptBudgetList.basisPrice).indexOf('.') != -1 &&
|
|
|
+ String(this.deptBudgetList.basisPrice).length -
|
|
|
+ (String(this.deptBudgetList.basisPrice).indexOf('.') + 1) >
|
|
|
+ 3) ||
|
|
|
+ this.deptBudgetList.basisPrice < 0 ||
|
|
|
+ this.deptBudgetList.basisPrice > 10000
|
|
|
) {
|
|
|
this.$message({
|
|
|
- message: '合约号长度不符合要求,请输入2到15个字符之内!',
|
|
|
+ message: '基差输入错误!',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if (!this.deptBudgetList.pointPrice) {
|
|
|
+ if (!this.deptBudgetList.receiveWarehouse) {
|
|
|
this.$message({
|
|
|
- message: '请输入点价!',
|
|
|
+ message: '请选择收货库!',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if (
|
|
|
- isNaN(this.deptBudgetList.pointPrice) ||
|
|
|
- (String(this.deptBudgetList.pointPrice).indexOf('.') != -1 &&
|
|
|
- String(this.deptBudgetList.pointPrice).length -
|
|
|
- (String(this.deptBudgetList.pointPrice).indexOf('.') + 1) >
|
|
|
- 3) ||
|
|
|
- this.deptBudgetList.pointPrice < 0 ||
|
|
|
- this.deptBudgetList.pointPrice > 100000
|
|
|
- ) {
|
|
|
+ if (!this.deptBudgetList.transactionsPlace) {
|
|
|
this.$message({
|
|
|
- message: '输入点价有误!',
|
|
|
+ message: '请输入交易所!',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if (!this.deptBudgetList.warehousingFee) {
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.transactionsPlace.length < 2 ||
|
|
|
+ this.deptBudgetList.transactionsPlace.length > 15
|
|
|
+ ) {
|
|
|
this.$message({
|
|
|
- message: '请输入入库费!',
|
|
|
+ message: '交易所长度不符合要求,请输入2到15个字符之内!',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if (
|
|
|
- isNaN(this.deptBudgetList.warehousingFee) ||
|
|
|
- (String(this.deptBudgetList.warehousingFee).indexOf('.') != -1 &&
|
|
|
- String(this.deptBudgetList.warehousingFee).length -
|
|
|
- (String(this.deptBudgetList.warehousingFee).indexOf('.') + 1) >
|
|
|
- 3) ||
|
|
|
- this.deptBudgetList.warehousingFee < 0 ||
|
|
|
- this.deptBudgetList.warehousingFee > 1000
|
|
|
- ) {
|
|
|
+ if (this.selectedOptions.length == 0) {
|
|
|
this.$message({
|
|
|
- message: '入库费输入错误!',
|
|
|
+ message: '请选择交货所在地区!',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if (!this.deptBudgetList.measurementStandard) {
|
|
|
+ if (!this.deptBudgetList.contractNumber) {
|
|
|
this.$message({
|
|
|
- message: '请输入计量标准!',
|
|
|
+ message: '请输入合约号!',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
if (
|
|
|
- this.deptBudgetList.measurementStandard.length < 1 ||
|
|
|
- this.deptBudgetList.measurementStandard.length > 20
|
|
|
+ this.deptBudgetList.contractNumber.length < 2 ||
|
|
|
+ this.deptBudgetList.contractNumber.length > 15
|
|
|
) {
|
|
|
this.$message({
|
|
|
- message: '计量标准长度不符合要求,请输入1到20个字符之内!',
|
|
|
+ message: '合约号长度不符合要求,请输入2到15个字符之内!',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if (!this.deptBudgetList.settlementMethod) {
|
|
|
+ if (!this.deptBudgetList.placeDelivery) {
|
|
|
this.$message({
|
|
|
- message: '请输入结算方式!',
|
|
|
+ message: '请输入交货详细地址!',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if (!this.deptBudgetList.placeDelivery) {
|
|
|
+ if (!this.deptBudgetList.pointPrice) {
|
|
|
this.$message({
|
|
|
- message: '请输入交货详细地址!',
|
|
|
+ message: '请输入点价!',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if (this.selectedOptions.length == 0) {
|
|
|
+ if (
|
|
|
+ isNaN(this.deptBudgetList.pointPrice) ||
|
|
|
+ (String(this.deptBudgetList.pointPrice).indexOf('.') != -1 &&
|
|
|
+ String(this.deptBudgetList.pointPrice).length -
|
|
|
+ (String(this.deptBudgetList.pointPrice).indexOf('.') + 1) >
|
|
|
+ 3) ||
|
|
|
+ this.deptBudgetList.pointPrice < 0 ||
|
|
|
+ this.deptBudgetList.pointPrice > 100000
|
|
|
+ ) {
|
|
|
this.$message({
|
|
|
- message: '请选择交货所在地区!',
|
|
|
+ message: '输入点价有误!',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if (this.selectedOptions1.length == 0) {
|
|
|
+ if (!this.deptBudgetList.signingDate) {
|
|
|
this.$message({
|
|
|
- message: '请选择产地!',
|
|
|
+ message: '请选择签订日期',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.deptBudgetList.pointPriceDate) {
|
|
|
+ this.$message({
|
|
|
+ message: '请选择点价日期',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
if (!this.deptBudgetList.deliveryDateStart) {
|
|
|
this.$message({
|
|
|
message: '请选择交货日期(起)',
|
|
@@ -1291,9 +1321,10 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if (!this.deptBudgetList.signingDate) {
|
|
|
+ //货物信息
|
|
|
+ if (this.selectedOptions1.length == 0) {
|
|
|
this.$message({
|
|
|
- message: '请选择签订日期',
|
|
|
+ message: '请选择产地!',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
return
|
|
@@ -1312,6 +1343,19 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.contractGoodsInfo.waterContent &&
|
|
|
+ String(this.deptBudgetList.contractGoodsInfo.waterContent).indexOf('.') != -1 &&
|
|
|
+ String(this.deptBudgetList.contractGoodsInfo.waterContent).length -
|
|
|
+ (String(this.deptBudgetList.contractGoodsInfo.waterContent).indexOf('.') + 1) >
|
|
|
+ 2||this.deptBudgetList.contractGoodsInfo.waterContent>40||this.deptBudgetList.contractGoodsInfo.waterContent<1
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '水分输入错误',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
if (!this.deptBudgetList.contractGoodsInfo.grade) {
|
|
|
this.$message({
|
|
|
message: '请选择品级',
|
|
@@ -1326,16 +1370,19 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
+ if (!this.deptBudgetList.contractGoodsInfo.impurity) {
|
|
|
+ this.$message({
|
|
|
+ message: '请输入杂质',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
if (
|
|
|
- !this.deptBudgetList.contractGoodsInfo.impurity ||
|
|
|
- (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') !=
|
|
|
- -1 &&
|
|
|
- String(this.deptBudgetList.contractGoodsInfo.impurity).length -
|
|
|
- (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf(
|
|
|
- '.'
|
|
|
- ) +
|
|
|
- 1) >
|
|
|
- 2)
|
|
|
+ this.deptBudgetList.contractGoodsInfo.impurity &&
|
|
|
+ String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') != -1 &&
|
|
|
+ String(this.deptBudgetList.contractGoodsInfo.impurity).length -
|
|
|
+ (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') + 1) >
|
|
|
+ 2||this.deptBudgetList.contractGoodsInfo.impurity>40||this.deptBudgetList.contractGoodsInfo.impurity<1
|
|
|
) {
|
|
|
this.$message({
|
|
|
message: '杂质输入错误',
|
|
@@ -1343,17 +1390,19 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
+ if (!this.deptBudgetList.contractGoodsInfo.bulkDensity) {
|
|
|
+ this.$message({
|
|
|
+ message: '请输入容重',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
if (
|
|
|
- !this.deptBudgetList.contractGoodsInfo.bulkDensity ||
|
|
|
- (String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf(
|
|
|
- '.'
|
|
|
- ) != -1 &&
|
|
|
+ (this.deptBudgetList.contractGoodsInfo.bulkDensity &&
|
|
|
+ String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf('.') != -1 &&
|
|
|
String(this.deptBudgetList.contractGoodsInfo.bulkDensity).length -
|
|
|
- (String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf(
|
|
|
- '.'
|
|
|
- ) +
|
|
|
- 1) >
|
|
|
- 2)
|
|
|
+ (String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf('.') + 1) >
|
|
|
+ 2) || this.deptBudgetList.contractGoodsInfo.bulkDensity > 1000 || this.deptBudgetList.contractGoodsInfo.bulkDensity < 500
|
|
|
) {
|
|
|
this.$message({
|
|
|
message: '容重输入错误',
|
|
@@ -1361,6 +1410,13 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
+ if (!this.deptBudgetList.contractGoodsInfo.mildewGrain) {
|
|
|
+ this.$message({
|
|
|
+ message: '请输入霉变粒',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
if (
|
|
|
!this.deptBudgetList.contractGoodsInfo.mildewGrain ||
|
|
|
(String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf(
|
|
@@ -1371,7 +1427,7 @@ export default {
|
|
|
'.'
|
|
|
) +
|
|
|
1) >
|
|
|
- 2)
|
|
|
+ 2||this.deptBudgetList.contractGoodsInfo.mildewGrain>40||this.deptBudgetList.contractGoodsInfo.mildewGrain<1)
|
|
|
) {
|
|
|
this.$message({
|
|
|
message: '霉变粒输入错误',
|
|
@@ -1379,6 +1435,13 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
+ if (!this.deptBudgetList.contractGoodsInfo.jiaorenli) {
|
|
|
+ this.$message({
|
|
|
+ message: '请输入热损伤',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
if (
|
|
|
!this.deptBudgetList.contractGoodsInfo.jiaorenli ||
|
|
|
(String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf('.') !=
|
|
@@ -1388,7 +1451,7 @@ export default {
|
|
|
'.'
|
|
|
) +
|
|
|
1) >
|
|
|
- 2)
|
|
|
+ 2||this.deptBudgetList.contractGoodsInfo.jiaorenli>40||this.deptBudgetList.contractGoodsInfo.jiaorenli<1)
|
|
|
) {
|
|
|
this.$message({
|
|
|
message: '热损伤输入错误',
|
|
@@ -1396,6 +1459,13 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
+ if (!this.deptBudgetList.contractGoodsInfo.imperfectGrain) {
|
|
|
+ this.$message({
|
|
|
+ message: '请输入不完善粒',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
if (
|
|
|
!this.deptBudgetList.contractGoodsInfo.imperfectGrain ||
|
|
|
(String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).indexOf(
|
|
@@ -1406,7 +1476,7 @@ export default {
|
|
|
this.deptBudgetList.contractGoodsInfo.imperfectGrain
|
|
|
).indexOf('.') +
|
|
|
1) >
|
|
|
- 2)
|
|
|
+ 2||this.deptBudgetList.contractGoodsInfo.imperfectGrain>40||this.deptBudgetList.contractGoodsInfo.imperfectGrain<1)
|
|
|
) {
|
|
|
this.$message({
|
|
|
message: '不完整粒输入错误',
|
|
@@ -1414,16 +1484,24 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
+ if (!this.deptBudgetList.contractGoodsInfo.protein) {
|
|
|
+ this.$message({
|
|
|
+ message: '请输入蛋白',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
if (
|
|
|
!this.deptBudgetList.contractGoodsInfo.protein ||
|
|
|
- (String(this.deptBudgetList.contractGoodsInfo.protein).indexOf('.') !=
|
|
|
- -1 &&
|
|
|
+ (String(this.deptBudgetList.contractGoodsInfo.protein).indexOf(
|
|
|
+ '.'
|
|
|
+ ) != -1 &&
|
|
|
String(this.deptBudgetList.contractGoodsInfo.protein).length -
|
|
|
- (String(this.deptBudgetList.contractGoodsInfo.protein).indexOf(
|
|
|
- '.'
|
|
|
- ) +
|
|
|
+ (String(
|
|
|
+ this.deptBudgetList.contractGoodsInfo.protein
|
|
|
+ ).indexOf('.') +
|
|
|
1) >
|
|
|
- 2)
|
|
|
+ 2||this.deptBudgetList.contractGoodsInfo.protein>70||this.deptBudgetList.contractGoodsInfo.protein<1)
|
|
|
) {
|
|
|
this.$message({
|
|
|
message: '蛋白输入错误',
|
|
@@ -1443,7 +1521,8 @@ export default {
|
|
|
).indexOf('.') +
|
|
|
1) >
|
|
|
2)
|
|
|
- ) {
|
|
|
+ )
|
|
|
+ {
|
|
|
this.$message({
|
|
|
message: '合同收入金额输入错误',
|
|
|
type: 'warning',
|
|
@@ -1507,6 +1586,31 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
+ if (
|
|
|
+ (!this.deptBudgetList.contractProcessInfo.mildewGrain > 1000000000) ||
|
|
|
+ (this.deptBudgetList.contractProcessInfo.mildewGrain < 0) ||
|
|
|
+ (String(this.deptBudgetList.contractProcessInfo.mildewGrain).indexOf(
|
|
|
+ '.'
|
|
|
+ ) != -1 &&
|
|
|
+ String(this.deptBudgetList.contractProcessInfo.mildewGrain).length -
|
|
|
+ (String(
|
|
|
+ this.deptBudgetList.contractProcessInfo.mildewGrain
|
|
|
+ ).indexOf('.') +
|
|
|
+ 1) >
|
|
|
+ 2)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '未回款金额输入错误',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.$confirm(`确定提交本次修改?`, {
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
this.$refs.deptBudgetList.validate((valid) => {
|
|
|
if (valid) {
|
|
|
this.deptBudgetList.contractGoodsInfo.outputPrivate =
|
|
@@ -1545,6 +1649,7 @@ export default {
|
|
|
return false
|
|
|
}
|
|
|
})
|
|
|
+ })
|
|
|
},
|
|
|
},
|
|
|
}
|