|
@@ -239,12 +239,9 @@
|
|
<!--交货日期(起)-->
|
|
<!--交货日期(起)-->
|
|
<ws-form-item label="交货日期(起)" span="1" prop="deliveryDateStart">
|
|
<ws-form-item label="交货日期(起)" span="1" prop="deliveryDateStart">
|
|
<ws-date-picker
|
|
<ws-date-picker
|
|
- :picker-options="pickerBeginDateBefore"
|
|
|
|
v-model="deptBudgetList.deliveryDateStart"
|
|
v-model="deptBudgetList.deliveryDateStart"
|
|
type="date"
|
|
type="date"
|
|
- default-value="1980-01-01"
|
|
|
|
placeholder="请选择交货日期(起)"
|
|
placeholder="请选择交货日期(起)"
|
|
- format="yyyy-MM-dd"
|
|
|
|
value-format="yyyy-MM-dd"
|
|
value-format="yyyy-MM-dd"
|
|
/>
|
|
/>
|
|
</ws-form-item>
|
|
</ws-form-item>
|
|
@@ -267,12 +264,9 @@
|
|
<!--交货日期(止)-->
|
|
<!--交货日期(止)-->
|
|
<ws-form-item label="交货日期(止)" span="1" prop="deliveryDateEnd">
|
|
<ws-form-item label="交货日期(止)" span="1" prop="deliveryDateEnd">
|
|
<ws-date-picker
|
|
<ws-date-picker
|
|
- :picker-options="pickerBeginDateBefore"
|
|
|
|
v-model="deptBudgetList.deliveryDateEnd"
|
|
v-model="deptBudgetList.deliveryDateEnd"
|
|
type="date"
|
|
type="date"
|
|
- default-value="1980-01-01"
|
|
|
|
- placeholder="请选择交货日期(起)"
|
|
|
|
- format="yyyy-MM-dd"
|
|
|
|
|
|
+ placeholder="请选择交货日期(止)"
|
|
value-format="yyyy-MM-dd"
|
|
value-format="yyyy-MM-dd"
|
|
/>
|
|
/>
|
|
</ws-form-item>
|
|
</ws-form-item>
|
|
@@ -290,12 +284,9 @@
|
|
<!--签订日期-->
|
|
<!--签订日期-->
|
|
<ws-form-item label="签订日期" span="1" prop="signingDate">
|
|
<ws-form-item label="签订日期" span="1" prop="signingDate">
|
|
<ws-date-picker
|
|
<ws-date-picker
|
|
- :picker-options="pickerBeginDateBefore"
|
|
|
|
v-model="deptBudgetList.signingDate"
|
|
v-model="deptBudgetList.signingDate"
|
|
type="date"
|
|
type="date"
|
|
- default-value="1980-01-01"
|
|
|
|
placeholder="请选择合同签订日期"
|
|
placeholder="请选择合同签订日期"
|
|
- format="yyyy-MM-dd"
|
|
|
|
value-format="yyyy-MM-dd"
|
|
value-format="yyyy-MM-dd"
|
|
/>
|
|
/>
|
|
</ws-form-item>
|
|
</ws-form-item>
|
|
@@ -588,7 +579,7 @@ export default {
|
|
},
|
|
},
|
|
contractProcessInfo: {},
|
|
contractProcessInfo: {},
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+ acceptanceCheck: {},
|
|
pickerBeginDateBefore: {
|
|
pickerBeginDateBefore: {
|
|
disabledDate: (time) => {
|
|
disabledDate: (time) => {
|
|
return time.getTime() > Date.now()
|
|
return time.getTime() > Date.now()
|
|
@@ -707,6 +698,7 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
submit() {
|
|
submit() {
|
|
|
|
+ console.log(this.deptBudgetList)
|
|
if (!this.deptBudgetList.contractNo) {
|
|
if (!this.deptBudgetList.contractNo) {
|
|
this.$message({
|
|
this.$message({
|
|
message: '请输入合同编号',
|
|
message: '请输入合同编号',
|
|
@@ -856,7 +848,10 @@ export default {
|
|
|
|
|
|
if (
|
|
if (
|
|
isNaN(this.deptBudgetList.weight) ||
|
|
isNaN(this.deptBudgetList.weight) ||
|
|
- /\.\d{3}$/.test(this.deptBudgetList.weight) == false ||
|
|
|
|
|
|
+ (String(this.deptBudgetList.weight).indexOf('.') != -1 &&
|
|
|
|
+ String(this.deptBudgetList.weight).length -
|
|
|
|
+ (String(this.deptBudgetList.weight).indexOf('.') + 1) >
|
|
|
|
+ 3) ||
|
|
this.deptBudgetList.weight < 0 ||
|
|
this.deptBudgetList.weight < 0 ||
|
|
this.deptBudgetList.weight > 200000
|
|
this.deptBudgetList.weight > 200000
|
|
) {
|
|
) {
|
|
@@ -951,7 +946,14 @@ export default {
|
|
}
|
|
}
|
|
if (
|
|
if (
|
|
!this.deptBudgetList.contractGoodsInfo.impurity ||
|
|
!this.deptBudgetList.contractGoodsInfo.impurity ||
|
|
- /\.\d{2}$/.test(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.$message({
|
|
this.$message({
|
|
message: '杂质输入错误',
|
|
message: '杂质输入错误',
|
|
@@ -961,7 +963,15 @@ export default {
|
|
}
|
|
}
|
|
if (
|
|
if (
|
|
!this.deptBudgetList.contractGoodsInfo.bulkDensity ||
|
|
!this.deptBudgetList.contractGoodsInfo.bulkDensity ||
|
|
- /\.\d{2}$/.test(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)
|
|
) {
|
|
) {
|
|
this.$message({
|
|
this.$message({
|
|
message: '容重输入错误',
|
|
message: '容重输入错误',
|
|
@@ -971,7 +981,15 @@ export default {
|
|
}
|
|
}
|
|
if (
|
|
if (
|
|
!this.deptBudgetList.contractGoodsInfo.mildewGrain ||
|
|
!this.deptBudgetList.contractGoodsInfo.mildewGrain ||
|
|
- /\.\d{2}$/.test(this.deptBudgetList.contractGoodsInfo.mildewGrain)
|
|
|
|
|
|
+ (String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf(
|
|
|
|
+ '.'
|
|
|
|
+ ) != -1 &&
|
|
|
|
+ String(this.deptBudgetList.contractGoodsInfo.mildewGrain).length -
|
|
|
|
+ (String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf(
|
|
|
|
+ '.'
|
|
|
|
+ ) +
|
|
|
|
+ 1) >
|
|
|
|
+ 2)
|
|
) {
|
|
) {
|
|
this.$message({
|
|
this.$message({
|
|
message: '霉变粒输入错误',
|
|
message: '霉变粒输入错误',
|
|
@@ -981,7 +999,14 @@ export default {
|
|
}
|
|
}
|
|
if (
|
|
if (
|
|
!this.deptBudgetList.contractGoodsInfo.jiaorenli ||
|
|
!this.deptBudgetList.contractGoodsInfo.jiaorenli ||
|
|
- /\.\d{2}$/.test(this.deptBudgetList.contractGoodsInfo.jiaorenli)
|
|
|
|
|
|
+ (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf('.') !=
|
|
|
|
+ -1 &&
|
|
|
|
+ String(this.deptBudgetList.contractGoodsInfo.jiaorenli).length -
|
|
|
|
+ (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf(
|
|
|
|
+ '.'
|
|
|
|
+ ) +
|
|
|
|
+ 1) >
|
|
|
|
+ 2)
|
|
) {
|
|
) {
|
|
this.$message({
|
|
this.$message({
|
|
message: '热损伤输入错误',
|
|
message: '热损伤输入错误',
|
|
@@ -991,7 +1016,15 @@ export default {
|
|
}
|
|
}
|
|
if (
|
|
if (
|
|
!this.deptBudgetList.contractGoodsInfo.imperfectGrain ||
|
|
!this.deptBudgetList.contractGoodsInfo.imperfectGrain ||
|
|
- /\.\d{2}$/.test(this.deptBudgetList.contractGoodsInfo.imperfectGrain)
|
|
|
|
|
|
+ (String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).indexOf(
|
|
|
|
+ '.'
|
|
|
|
+ ) != -1 &&
|
|
|
|
+ String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).length -
|
|
|
|
+ (String(
|
|
|
|
+ this.deptBudgetList.contractGoodsInfo.imperfectGrain
|
|
|
|
+ ).indexOf('.') +
|
|
|
|
+ 1) >
|
|
|
|
+ 2)
|
|
) {
|
|
) {
|
|
this.$message({
|
|
this.$message({
|
|
message: '不完整粒输入错误',
|
|
message: '不完整粒输入错误',
|
|
@@ -1000,10 +1033,17 @@ export default {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
if (
|
|
if (
|
|
- (!this.deptBudgetList.contractProcessInfo.goodsNameKey > 1000000000) |
|
|
|
|
|
|
+ (this.deptBudgetList.contractProcessInfo.goodsNameKey > 1000000000) |
|
|
(this.deptBudgetList.contractProcessInfo.goodsNameKey < 0) ||
|
|
(this.deptBudgetList.contractProcessInfo.goodsNameKey < 0) ||
|
|
- /\.\d{2}$/.test(this.deptBudgetList.contractProcessInfo.goodsNameKey) ==
|
|
|
|
- false
|
|
|
|
|
|
+ (String(this.deptBudgetList.contractProcessInfo.goodsNameKey).indexOf(
|
|
|
|
+ '.'
|
|
|
|
+ ) != -1 &&
|
|
|
|
+ String(this.deptBudgetList.contractProcessInfo.goodsNameKey).length -
|
|
|
|
+ (String(
|
|
|
|
+ this.deptBudgetList.contractProcessInfo.goodsNameKey
|
|
|
|
+ ).indexOf('.') +
|
|
|
|
+ 1) >
|
|
|
|
+ 2)
|
|
) {
|
|
) {
|
|
this.$message({
|
|
this.$message({
|
|
message: '合同收入金额输入错误',
|
|
message: '合同收入金额输入错误',
|
|
@@ -1012,10 +1052,17 @@ export default {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
if (
|
|
if (
|
|
- (!this.deptBudgetList.contractProcessInfo.waterContent > 10000000) |
|
|
|
|
|
|
+ (this.deptBudgetList.contractProcessInfo.waterContent > 10000000) |
|
|
(this.deptBudgetList.contractProcessInfo.waterContent < 0) ||
|
|
(this.deptBudgetList.contractProcessInfo.waterContent < 0) ||
|
|
- /\.\d{2}$/.test(this.deptBudgetList.contractProcessInfo.waterContent) ==
|
|
|
|
- false
|
|
|
|
|
|
+ (String(this.deptBudgetList.ccontractProcessInfo.waterContent).indexOf(
|
|
|
|
+ '.'
|
|
|
|
+ ) != -1 &&
|
|
|
|
+ String(this.deptBudgetList.contractProcessInfo.waterContent).length -
|
|
|
|
+ (String(
|
|
|
|
+ this.deptBudgetList.contractProcessInfo.waterContent
|
|
|
|
+ ).indexOf('.') +
|
|
|
|
+ 1) >
|
|
|
|
+ 2)
|
|
) {
|
|
) {
|
|
this.$message({
|
|
this.$message({
|
|
message: '费用金额输入错误',
|
|
message: '费用金额输入错误',
|
|
@@ -1024,22 +1071,17 @@ export default {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
if (
|
|
if (
|
|
- (!this.deptBudgetList.contractProcessInfo.mildewGrain > 1000000000) |
|
|
|
|
- (this.deptBudgetList.contractProcessInfo.mildewGrain < 0) ||
|
|
|
|
- /\.\d{2}$/.test(this.deptBudgetList.contractProcessInfo.mildewGrain) ==
|
|
|
|
- false
|
|
|
|
- ) {
|
|
|
|
- this.$message({
|
|
|
|
- message: '未回款金额输入错误',
|
|
|
|
- type: 'warning',
|
|
|
|
- })
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if (
|
|
|
|
- (!this.deptBudgetList.contractProcessInfo.goodsName > 1000000000) |
|
|
|
|
|
|
+ (this.deptBudgetList.contractProcessInfo.goodsName > 1000000000) |
|
|
(this.deptBudgetList.contractProcessInfo.goodsName < 0) ||
|
|
(this.deptBudgetList.contractProcessInfo.goodsName < 0) ||
|
|
- /\.\d{2}$/.test(this.deptBudgetList.contractProcessInfo.goodsName) ==
|
|
|
|
- false
|
|
|
|
|
|
+ (String(this.deptBudgetList.contractProcessInfo.goodsName).indexOf(
|
|
|
|
+ '.'
|
|
|
|
+ ) != -1 &&
|
|
|
|
+ String(this.deptBudgetList.contractProcessInfo.goodsName).length -
|
|
|
|
+ (String(this.deptBudgetList.contractProcessInfo.goodsName).indexOf(
|
|
|
|
+ '.'
|
|
|
|
+ ) +
|
|
|
|
+ 1) >
|
|
|
|
+ 2)
|
|
) {
|
|
) {
|
|
this.$message({
|
|
this.$message({
|
|
message: '已开发票金额输入错误',
|
|
message: '已开发票金额输入错误',
|
|
@@ -1048,10 +1090,17 @@ export default {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
if (
|
|
if (
|
|
- (!this.deptBudgetList.contractProcessInfo.impurity > 1000000000) |
|
|
|
|
|
|
+ (this.deptBudgetList.contractProcessInfo.impurity > 1000000000) |
|
|
(this.deptBudgetList.contractProcessInfo.impurity < 0) ||
|
|
(this.deptBudgetList.contractProcessInfo.impurity < 0) ||
|
|
- /\.\d{2}$/.test(this.deptBudgetList.contractProcessInfo.impurity) ==
|
|
|
|
- false
|
|
|
|
|
|
+ (String(this.deptBudgetList.contractProcessInfo.impurity).indexOf(
|
|
|
|
+ '.'
|
|
|
|
+ ) != -1 &&
|
|
|
|
+ String(this.deptBudgetList.contractProcessInfo.impurity).length -
|
|
|
|
+ (String(this.deptBudgetList.contractProcessInfo.impurity).indexOf(
|
|
|
|
+ '.'
|
|
|
|
+ ) +
|
|
|
|
+ 1) >
|
|
|
|
+ 2)
|
|
) {
|
|
) {
|
|
this.$message({
|
|
this.$message({
|
|
message: '未开发票金额输入错误',
|
|
message: '未开发票金额输入错误',
|
|
@@ -1060,11 +1109,18 @@ export default {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
if (
|
|
if (
|
|
- (!this.deptBudgetList.contractProcessInfo.imperfectGrain > 200000) |
|
|
|
|
|
|
+ (this.deptBudgetList.contractProcessInfo.imperfectGrain > 200000) |
|
|
(this.deptBudgetList.contractProcessInfo.imperfectGrain < 0) ||
|
|
(this.deptBudgetList.contractProcessInfo.imperfectGrain < 0) ||
|
|
- /\.\d{3}$/.test(
|
|
|
|
- this.deptBudgetList.contractProcessInfo.imperfectGrain
|
|
|
|
- ) == false
|
|
|
|
|
|
+ (String(this.deptBudgetList.contractProcessInfo.imperfectGrain).indexOf(
|
|
|
|
+ '.'
|
|
|
|
+ ) != -1 &&
|
|
|
|
+ String(this.deptBudgetList.contractProcessInfo.imperfectGrain)
|
|
|
|
+ .length -
|
|
|
|
+ (String(
|
|
|
|
+ this.deptBudgetList.contractProcessInfo.imperfectGrain
|
|
|
|
+ ).indexOf('.') +
|
|
|
|
+ 1) >
|
|
|
|
+ 2)
|
|
) {
|
|
) {
|
|
this.$message({
|
|
this.$message({
|
|
message: '已完成发运量输入错误',
|
|
message: '已完成发运量输入错误',
|
|
@@ -1091,6 +1147,22 @@ export default {
|
|
resetForm(deptBudgetList) {
|
|
resetForm(deptBudgetList) {
|
|
this.$refs[deptBudgetList].resetFields()
|
|
this.$refs[deptBudgetList].resetFields()
|
|
},
|
|
},
|
|
|
|
+ addClick() {
|
|
|
|
+ // let [flag, constValue, constKey] = ['check', '', '']
|
|
|
|
+ // let obj = { flag, constValue, constKey }
|
|
|
|
+ // let objAdd = { flag: 'add', constValue: '新增项目', constKey: '' }
|
|
|
|
+ // let result = this.unitList.filter((item, val, arr) => {
|
|
|
|
+ // return item.id != '1'
|
|
|
|
+ // })
|
|
|
|
+ // result.push(obj)
|
|
|
|
+ // result.push(objAdd)
|
|
|
|
+ // this.unitList = result
|
|
|
|
+ this.unitList.push({
|
|
|
|
+ flag: 'add',
|
|
|
|
+ constValue: '',
|
|
|
|
+ constKey: '',
|
|
|
|
+ })
|
|
|
|
+ },
|
|
saveClick(item, index) {
|
|
saveClick(item, index) {
|
|
console.log(item)
|
|
console.log(item)
|
|
|
|
|
|
@@ -1108,23 +1180,23 @@ export default {
|
|
}
|
|
}
|
|
if (item.flag == 'add') {
|
|
if (item.flag == 'add') {
|
|
item.constKey = Math.random() * 20
|
|
item.constKey = Math.random() * 20
|
|
- this.trainingMethods.compId = sessionStorage.getItem('ws-pf_compId')
|
|
|
|
- this.trainingMethods.constKey = item.constKey
|
|
|
|
- this.trainingMethods.constCode = 'TYPEYAN'
|
|
|
|
- this.trainingMethods.constValue = item.constValue
|
|
|
|
- this.trainingMethods.id = item.id
|
|
|
|
- addxiala(this.trainingMethods)
|
|
|
|
|
|
+ this.acceptanceCheck.compId = this.compId
|
|
|
|
+ this.acceptanceCheck.constKey = item.constKey
|
|
|
|
+ this.acceptanceCheck.constCode = 'TYPEYAN'
|
|
|
|
+ this.acceptanceCheck.constValue = item.constValue
|
|
|
|
+ this.acceptanceCheck.id = item.id
|
|
|
|
+ addxiala(this.acceptanceCheck)
|
|
.toPromise()
|
|
.toPromise()
|
|
.then((response) => {
|
|
.then((response) => {
|
|
this.getUnitList()
|
|
this.getUnitList()
|
|
})
|
|
})
|
|
} else if (item.flag == 'check') {
|
|
} else if (item.flag == 'check') {
|
|
- this.trainingMethods.compId = sessionStorage.getItem('ws-pf_compId')
|
|
|
|
- this.trainingMethods.constKey = item.constKey
|
|
|
|
- this.trainingMethods.constCode = 'TYPEYAN'
|
|
|
|
- this.trainingMethods.constValue = item.constValue
|
|
|
|
- this.trainingMethods.id = item.id
|
|
|
|
- editxiala(this.trainingMethods)
|
|
|
|
|
|
+ this.acceptanceCheck.compId = this.compId
|
|
|
|
+ this.acceptanceCheck.constKey = item.constKey
|
|
|
|
+ this.acceptanceCheck.constCode = 'TYPEYAN'
|
|
|
|
+ this.acceptanceCheck.constValue = item.constValue
|
|
|
|
+ this.acceptanceCheck.id = item.id
|
|
|
|
+ editxiala(this.acceptanceCheck)
|
|
.toPromise()
|
|
.toPromise()
|
|
.then((response) => {
|
|
.then((response) => {
|
|
this.getUnitList()
|
|
this.getUnitList()
|