Commit 284f5b3b by 张权

第一轮bug修改

1 parent 3eb020be
......@@ -279,11 +279,11 @@ export default {
this.$set(this.serviceItemsList[id], 'approveAmount' , e.target.value.substr(0 ,len-1))
}
const minPrice = 1
if(parseInt(e.target.value)<minPrice){
if(Number(e.target.value)<minPrice){
this.$set(this.serviceItemsList[id], 'approveAmount' , 1)
}
const maxPrice = 2000000
if(parseInt(e.target.value)>maxPrice){
if(Number(e.target.value)>maxPrice){
this.$set(this.serviceItemsList[id], 'approveAmount' , maxPrice)
}
}
......
......@@ -138,6 +138,9 @@ export default {
if (e.value) {
this.updateTimeLimit(e.value, 'reportDate')
}
},
handleDateChange: e => {
if (e) this.$refs.editFormRefReport.$refs.formRef.validateField('reimbursementDate')
}
},
{
......@@ -222,6 +225,9 @@ export default {
if (e.value) {
this.updateTimeLimit(e.value, 'reportDate')
}
},
handleDateChange: e => {
if (e) this.$refs.editFormRefReport.$refs.formRef.validateField('reimbursementDate')
}
},
{
......
......@@ -191,16 +191,25 @@ export default {
}
})
})
if (!valid) return valid
let requirePrice = true
this.serviceItemsList.forEach(item => {
if (item.approveAmount > 0) {
requirePrice = false
}
})
if (requirePrice) {
this.$message({
message: '至少输入一项服务的定损批准金额',
type: 'error'
})
return false
}
let tipObj = {
isTip: false,
tipMsg: ''
}
this.serviceItemsList.forEach(item => {
if (item.approveAmount <= 0 && !tipObj.isTip) {
tipObj.isTip = true
tipObj.tipMsg = `请输入大于等于1的${item.serviceItemName}价格`
}
})
for (let key in this.materialForm) {
if (this.materialForm[key].length < 1 && !tipObj.isTip) {
tipObj.isTip = true
......@@ -214,7 +223,6 @@ export default {
})
return false
}
return valid
},
// 提交核赔
confirmSubmit(type) {
......@@ -229,6 +237,9 @@ export default {
return
}
const params = { ...this.editForm, ...this.accountForm }
if (params.objectType !== 1) {
params.accountType = 0
}
params.operation = type
params.reimbursementDate = params.reimbursementDate ? util.dateFormat(params.reimbursementDate, 'YYYY-MM-DD HH:mm:ss') : ''
params.reportDate = params.reportDate ? util.dateFormat(params.reportDate, 'YYYY-MM-DD HH:mm:ss') : ''
......
......@@ -191,16 +191,25 @@ export default {
}
})
})
if (!valid) return valid
let requirePrice = true
this.serviceItemsList.forEach(item => {
if (item.approveAmount > 0) {
requirePrice = false
}
})
if (requirePrice) {
this.$message({
message: '至少输入一项服务的定损批准金额',
type: 'error'
})
return false
}
let tipObj = {
isTip: false,
tipMsg: ''
}
this.serviceItemsList.forEach(item => {
if (item.approveAmount <= 0 && !tipObj.isTip) {
tipObj.isTip = true
tipObj.tipMsg = `请输入大于等于1的${item.serviceItemName}价格`
}
})
for (let key in this.materialForm) {
if (this.materialForm[key].length < 1 && !tipObj.isTip) {
tipObj.isTip = true
......@@ -214,7 +223,6 @@ export default {
})
return false
}
return valid
},
// 提交核赔
confirmSubmit(type) {
......@@ -229,6 +237,9 @@ export default {
return
}
const params = { ...this.editForm, ...this.accountForm }
if (params.objectType !== 1) {
params.accountType = 0
}
params.operation = type
params.reimbursementDate = params.reimbursementDate ? util.dateFormat(params.reimbursementDate, 'YYYY-MM-DD HH:mm:ss') : ''
params.reportDate = params.reportDate ? util.dateFormat(params.reportDate, 'YYYY-MM-DD HH:mm:ss') : ''
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!