Commit 7d601d36 authored by qhr's avatar qhr

是否免税bug修改

parent b58dd8c3
...@@ -283,6 +283,9 @@ export default { ...@@ -283,6 +283,9 @@ export default {
} else { } else {
isVirtualFlag = false isVirtualFlag = false
} }
if(this.header.hasTaxExemption === '是'){
isVirtualFlag = true
}
const targetArr = this.formFileds[0].data.filter(item => item.title === '税率' || item.title === '含税单价') const targetArr = this.formFileds[0].data.filter(item => item.title === '税率' || item.title === '含税单价')
targetArr.forEach(item => (item.component.disabled = isVirtualFlag)) targetArr.forEach(item => (item.component.disabled = isVirtualFlag))
} }
...@@ -389,6 +392,7 @@ export default { ...@@ -389,6 +392,7 @@ export default {
}, },
// 重设表单 // 重设表单
resetForm() { resetForm() {
console.log('resetForm');
this.header = this.basicData this.header = this.basicData
if (!this.header) return if (!this.header) return
this.$set(this.form, 'supplier', this.header.supplierFullName.label || '') this.$set(this.form, 'supplier', this.header.supplierFullName.label || '')
......
...@@ -857,8 +857,9 @@ export default { ...@@ -857,8 +857,9 @@ export default {
}) })
} }
}) })
// 默认取第一个明细的是否免税状态 // 默认取第一个明细的是否免税状态,用this.$set才能触发computed方法
this.form.hasTaxExemption = data[0].hasTaxExemption this.$set(this.form, 'hasTaxExemption', data[0].hasTaxExemption)
// this.form.hasTaxExemption = data[0].hasTaxExemption
if (data.length > 0) { if (data.length > 0) {
this.formData[0].data.forEach(item => { this.formData[0].data.forEach(item => {
item.component.disabled = true item.component.disabled = true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment