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