|
|
@ -346,33 +346,66 @@ export default { |
|
|
|
}, |
|
|
|
changeOpenTickType(val) { |
|
|
|
const choose = this.openTickType_list.filter((item) => item.dictValue === val) |
|
|
|
this.formobj.openTickTypeKey = choose[0].dictKey |
|
|
|
if (this.formobj.finBillVehicles.length > 0) { |
|
|
|
for (var i = 0; i < this.formobj.finBillVehicles.length; i++) { |
|
|
|
this.formobj.finBillVehicles[i].billTypeValue = choose[0].dictValue |
|
|
|
this.formobj.finBillVehicles[i].billTypeKey = choose[0].dictKey |
|
|
|
if (choose !== null && choose.length > 0) { |
|
|
|
this.formobj.openTickTypeKey = choose[0].dictKey |
|
|
|
if (this.formobj.finBillVehicles.length > 0) { |
|
|
|
for (var i = 0; i < this.formobj.finBillVehicles.length; i++) { |
|
|
|
this.formobj.finBillVehicles[i].billTypeValue = choose[0].dictValue |
|
|
|
this.formobj.finBillVehicles[i].billTypeKey = choose[0].dictKey |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.formobj.openTickTypeKey = '' |
|
|
|
} |
|
|
|
}, |
|
|
|
changeOpenTick(val) { |
|
|
|
if (this.formobj.openTickTypeValue === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请选择开票类型' }) |
|
|
|
return |
|
|
|
} |
|
|
|
const choose = this.openTick_list.filter((item) => item.name === val) |
|
|
|
this.formobj.openTickSid = choose[0].sid |
|
|
|
if (this.formobj.finBillVehicles.length > 0) { |
|
|
|
for (var i = 0; i < this.formobj.finBillVehicles.length; i++) { |
|
|
|
this.formobj.finBillVehicles[i].openTickName = choose[0].name |
|
|
|
this.formobj.finBillVehicles[i].openTickSid = choose[0].sid |
|
|
|
this.formobj.finBillVehicles[i].openTickRemarks = choose[0].openTickRemarks |
|
|
|
if (choose !== null && choose.length > 0) { |
|
|
|
if (choose[0].openTickTypeValue !== this.formobj.openTickTypeValue) { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '因开票信息与所选开票类型不符,请维护开票信息' }) |
|
|
|
} else { |
|
|
|
this.formobj.openTickSid = choose[0].sid |
|
|
|
if (this.formobj.finBillVehicles.length > 0) { |
|
|
|
for (var i = 0; i < this.formobj.finBillVehicles.length; i++) { |
|
|
|
this.formobj.finBillVehicles[i].openTickName = choose[0].name |
|
|
|
this.formobj.finBillVehicles[i].openTickSid = choose[0].sid |
|
|
|
this.formobj.finBillVehicles[i].openTickRemarks = choose[0].openTickRemarks |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.formobj.openTickSid = '' |
|
|
|
} |
|
|
|
}, |
|
|
|
changeBillType(val, row) { |
|
|
|
const choose = this.openTickType_list.filter((item) => item.dictValue === val) |
|
|
|
row.billTypeKey = choose[0].dictKey |
|
|
|
if (choose !== null && choose.length > 0) { |
|
|
|
row.billTypeKey = choose[0].dictKey |
|
|
|
} else { |
|
|
|
row.billTypeKey = '' |
|
|
|
} |
|
|
|
}, |
|
|
|
changeOpenTickName(val, row) { |
|
|
|
if (row.billTypeValue === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请选择开票类型' }) |
|
|
|
return |
|
|
|
} |
|
|
|
const choose = this.openTick_list.filter((item) => item.name === val) |
|
|
|
row.openTickSid = choose[0].sid |
|
|
|
row.openTickRemarks = choose[0].openTickRemarks |
|
|
|
if (choose !== null && choose.length > 0) { |
|
|
|
if (choose[0].openTickTypeValue !== row.billTypeValue) { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '因开票信息与所选开票类型不符,请维护开票信息' }) |
|
|
|
} else { |
|
|
|
row.openTickSid = choose[0].sid |
|
|
|
row.openTickRemarks = choose[0].openTickRemarks |
|
|
|
} |
|
|
|
} else { |
|
|
|
row.openTickSid = '' |
|
|
|
row.openTickRemarks = '' |
|
|
|
} |
|
|
|
}, |
|
|
|
handleLookByDingDan() { |
|
|
|
this.viewState = 2 |
|
|
|