|
|
|
@ -133,8 +133,7 @@
|
|
|
|
|
feeEnName: '',
|
|
|
|
|
quantity: 1,
|
|
|
|
|
exchangeRate: 1,
|
|
|
|
|
taxRate: 0.00,
|
|
|
|
|
accTaxRate: 0.00,
|
|
|
|
|
taxRate: 0,
|
|
|
|
|
feeType: props.tbType == 'receive' ? 1 : 2,
|
|
|
|
|
}
|
|
|
|
|
// 表格绑定数据
|
|
|
|
@ -222,19 +221,22 @@
|
|
|
|
|
data: 'customerName',
|
|
|
|
|
type: 'dropdown',
|
|
|
|
|
source: async (query, process) => {
|
|
|
|
|
if (query && query.indexOf('-') > -1) query = query.split('-')[1]
|
|
|
|
|
// 获取当前选中行
|
|
|
|
|
const rowIndex = hotTb.value.hotInstance.getActiveEditor().row
|
|
|
|
|
const code = list.value[rowIndex]?.customerType || null
|
|
|
|
|
GetClientListByCode({ code }).then((res) => {
|
|
|
|
|
GetClientListByCode({ code, queryKey: query }).then((res) => {
|
|
|
|
|
const { data } = res
|
|
|
|
|
data.forEach((item) => {
|
|
|
|
|
item['label'] = item.shortName
|
|
|
|
|
item['value'] = item.codeName
|
|
|
|
|
})
|
|
|
|
|
companyDict.value = data
|
|
|
|
|
console.log(companyDict)
|
|
|
|
|
const dict = data.map((item) => {
|
|
|
|
|
return item.codeName + '-' + item.shortName
|
|
|
|
|
})
|
|
|
|
|
console.log(dict)
|
|
|
|
|
process(dict)
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
@ -258,18 +260,13 @@
|
|
|
|
|
width: 60,
|
|
|
|
|
data: 'taxRate',
|
|
|
|
|
type: 'numeric',
|
|
|
|
|
numericFormat: {
|
|
|
|
|
pattern: '0,0.00'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '单价',
|
|
|
|
|
width: 70,
|
|
|
|
|
data: 'taxUnitPrice',
|
|
|
|
|
type: 'numeric',
|
|
|
|
|
numericFormat: {
|
|
|
|
|
pattern: '0,0.00'
|
|
|
|
|
}
|
|
|
|
|
format: '0.00',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '数量',
|
|
|
|
@ -333,9 +330,6 @@
|
|
|
|
|
width: 100,
|
|
|
|
|
data: 'accTaxRate',
|
|
|
|
|
type: 'numeric',
|
|
|
|
|
numericFormat: {
|
|
|
|
|
pattern: '0,0.00'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '销项税额',
|
|
|
|
@ -561,11 +555,13 @@
|
|
|
|
|
// 修改费用英文名称
|
|
|
|
|
if (changes[0][1] === 'feeEnName') {
|
|
|
|
|
}
|
|
|
|
|
// 修改费用对象
|
|
|
|
|
// 修改结算对象
|
|
|
|
|
if (changes[0][1] === 'customerName') {
|
|
|
|
|
console.log(companyDict.value)
|
|
|
|
|
const item = companyDict.value.filter((item) => {
|
|
|
|
|
return changes[0][3].includes(item.label)
|
|
|
|
|
})
|
|
|
|
|
console.log(item)
|
|
|
|
|
if (item) dict = item[0]
|
|
|
|
|
console.log(dict)
|
|
|
|
|
list.value[changes[0][0]]['customerId'] = dict?.id
|
|
|
|
|