Browse Source

完善付款申请

master
yunuo970428 6 months ago
parent
commit
f9dc84bab8
  1. 24
      anrui-buscenter/anrui-finmanage-ui/src/views/anruifinmanagement/fukuanshenqing/paymentAdd.vue
  2. 24
      anrui-buscenter/anrui-finmanage-ui/src/views/workFlow/fukuanguanliFlow/fukuanguanli/fukuanEdit.vue

24
anrui-buscenter/anrui-finmanage-ui/src/views/anruifinmanagement/fukuanshenqing/paymentAdd.vue

@ -645,6 +645,19 @@ export default {
} }
}, },
saveOrUpdate() { saveOrUpdate() {
if (this.formobj.costTypeKey === '001' && this.formobj.isVeh === '1') {
if (this.formobj.vehicleList.length === 0) {
this.$message({ showClose: true, type: 'error', message: '车辆列表不能为空' })
return
} else {
for (var i = 0; i < this.formobj.vehicleList.length; i++) {
if (this.formobj.vehicleList[i].isSettle === '') {
this.$message({ showClose: true, type: 'error', message: '车辆列表中是否申请买断不能为空' })
return
}
}
}
}
this.$refs['form_obj'].validate((valid) => { this.$refs['form_obj'].validate((valid) => {
if (valid) { if (valid) {
this.submitdisabled = true this.submitdisabled = true
@ -652,6 +665,8 @@ export default {
if (resp.success) { if (resp.success) {
this.$message({ showClose: true, type: 'success', message: resp.msg }) this.$message({ showClose: true, type: 'success', message: resp.msg })
this.handleReturn('true') this.handleReturn('true')
} else {
this.submitdisabled = false
} }
}).catch(() => { }).catch(() => {
this.submitdisabled = false this.submitdisabled = false
@ -662,7 +677,11 @@ export default {
}) })
}, },
submitVehicleApply() { submitVehicleApply() {
if (this.formobj.vehicleList.length > 0) { if (this.formobj.costTypeKey === '001' && this.formobj.isVeh === '1') {
if (this.formobj.vehicleList.length === 0) {
this.$message({ showClose: true, type: 'error', message: '车辆列表不能为空' })
return
} else {
for (var i = 0; i < this.formobj.vehicleList.length; i++) { for (var i = 0; i < this.formobj.vehicleList.length; i++) {
if (this.formobj.vehicleList[i].isSettle === '') { if (this.formobj.vehicleList[i].isSettle === '') {
this.$message({ showClose: true, type: 'error', message: '车辆列表中是否申请买断不能为空' }) this.$message({ showClose: true, type: 'error', message: '车辆列表中是否申请买断不能为空' })
@ -670,6 +689,7 @@ export default {
} }
} }
} }
}
this.$refs['form_obj'].validate((valid) => { this.$refs['form_obj'].validate((valid) => {
if (valid) { if (valid) {
this.submitdisabled = true this.submitdisabled = true
@ -677,6 +697,8 @@ export default {
if (resp.success) { if (resp.success) {
this.$message({ showClose: true, type: 'success', message: resp.msg }) this.$message({ showClose: true, type: 'success', message: resp.msg })
this.handleReturn('true') this.handleReturn('true')
} else {
this.submitdisabled = false
} }
}).catch(() => { }).catch(() => {
this.submitdisabled = false this.submitdisabled = false

24
anrui-buscenter/anrui-finmanage-ui/src/views/workFlow/fukuanguanliFlow/fukuanguanli/fukuanEdit.vue

@ -636,6 +636,19 @@ export default {
} }
}, },
saveOrUpdate() { saveOrUpdate() {
if (this.formobj.costTypeKey === '001' && this.formobj.isVeh === '1') {
if (this.formobj.vehicleList.length === 0) {
this.$message({ showClose: true, type: 'error', message: '车辆列表不能为空' })
return
} else {
for (var i = 0; i < this.formobj.vehicleList.length; i++) {
if (this.formobj.vehicleList[i].isSettle === '') {
this.$message({ showClose: true, type: 'error', message: '车辆列表中是否申请买断不能为空' })
return
}
}
}
}
this.$refs['form_obj'].validate((valid) => { this.$refs['form_obj'].validate((valid) => {
if (valid) { if (valid) {
this.submitdisabled = true this.submitdisabled = true
@ -650,6 +663,8 @@ export default {
code: 1 code: 1
} }
}, '*') }, '*')
} else {
this.submitdisabled = false
} }
}).catch(() => { }).catch(() => {
this.submitdisabled = false this.submitdisabled = false
@ -660,7 +675,11 @@ export default {
}) })
}, },
submitVehicleApply() { submitVehicleApply() {
if (this.formobj.vehicleList.length > 0) { if (this.formobj.costTypeKey === '001' && this.formobj.isVeh === '1') {
if (this.formobj.vehicleList.length === 0) {
this.$message({ showClose: true, type: 'error', message: '车辆列表不能为空' })
return
} else {
for (var i = 0; i < this.formobj.vehicleList.length; i++) { for (var i = 0; i < this.formobj.vehicleList.length; i++) {
if (this.formobj.vehicleList[i].isSettle === '') { if (this.formobj.vehicleList[i].isSettle === '') {
this.$message({ showClose: true, type: 'error', message: '车辆列表中是否申请买断不能为空' }) this.$message({ showClose: true, type: 'error', message: '车辆列表中是否申请买断不能为空' })
@ -668,6 +687,7 @@ export default {
} }
} }
} }
}
this.$refs['form_obj'].validate((valid) => { this.$refs['form_obj'].validate((valid) => {
if (valid) { if (valid) {
this.submitdisabled = true this.submitdisabled = true
@ -682,6 +702,8 @@ export default {
code: 1 code: 1
} }
}, '*') }, '*')
} else {
this.submitdisabled = false
} }
}).catch(() => { }).catch(() => {
this.submitdisabled = false this.submitdisabled = false

Loading…
Cancel
Save