|
|
|
@ -82,6 +82,8 @@
|
|
|
|
|
type: String,
|
|
|
|
|
default: '',
|
|
|
|
|
},
|
|
|
|
|
// 业务数据
|
|
|
|
|
details: { type: [Object, Array] }
|
|
|
|
|
})
|
|
|
|
|
const emits = defineEmits(['broInsert'])
|
|
|
|
|
// 费用名称字典
|
|
|
|
@ -200,25 +202,19 @@
|
|
|
|
|
source: async (query, process) => {
|
|
|
|
|
// 获取当前选中行
|
|
|
|
|
const rowIndex = hotTb.value.hotInstance.getActiveEditor().row
|
|
|
|
|
const code = list.value[rowIndex - 1].customerType
|
|
|
|
|
console.log(list.value[rowIndex - 1])
|
|
|
|
|
if (code) {
|
|
|
|
|
GetClientListByCode({ code }).then((res) => {
|
|
|
|
|
const { data } = res
|
|
|
|
|
data.forEach((item) => {
|
|
|
|
|
item['label'] = item.shortName
|
|
|
|
|
item['value'] = item.codeName
|
|
|
|
|
})
|
|
|
|
|
companyDict.value = data
|
|
|
|
|
const dict = data.map((item) => {
|
|
|
|
|
return item.codeName + '-' + item.shortName
|
|
|
|
|
})
|
|
|
|
|
process(dict)
|
|
|
|
|
const code = list.value[rowIndex]?.customerType || null
|
|
|
|
|
GetClientListByCode({ code }).then((res) => {
|
|
|
|
|
const { data } = res
|
|
|
|
|
data.forEach((item) => {
|
|
|
|
|
item['label'] = item.shortName
|
|
|
|
|
item['value'] = item.codeName
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
createMessage.warning('请先选择客户类别!')
|
|
|
|
|
process([])
|
|
|
|
|
}
|
|
|
|
|
companyDict.value = data
|
|
|
|
|
const dict = data.map((item) => {
|
|
|
|
|
return item.codeName + '-' + item.shortName
|
|
|
|
|
})
|
|
|
|
|
process(dict)
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
@ -507,16 +503,36 @@
|
|
|
|
|
if (item) dict = item[0]
|
|
|
|
|
list.value[changes[0][0]]['customerType'] = dict?.value
|
|
|
|
|
list.value[changes[0][0]]['customerTypeText'] = changes[0][3].split('-')[1]
|
|
|
|
|
list.value[changes[0][0]]['customerCode'] = ''
|
|
|
|
|
list.value[changes[0][0]]['customerName'] = ''
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// 修改单位
|
|
|
|
|
if (changes[0][1] === 'unitText') {
|
|
|
|
|
const item = unitDict.value.filter((item) => {
|
|
|
|
|
return item.name === changes[0][3]
|
|
|
|
|
return changes[0][3].includes(item.name)
|
|
|
|
|
})
|
|
|
|
|
if (item) dict = item[0]
|
|
|
|
|
list.value[changes[0][0]]['unit'] = dict?.value
|
|
|
|
|
list.value[changes[0][0]]['unitText'] = changes[0][3].split('-')[1]
|
|
|
|
|
// 业务数据有件数,修改单位,带出件数
|
|
|
|
|
const text = list.value[changes[0][0]]['unitText']
|
|
|
|
|
if (text == '单票') {
|
|
|
|
|
list.value[changes[0][0]]['quantity'] = 1
|
|
|
|
|
} else if (text == '件数') {
|
|
|
|
|
list.value[changes[0][0]]['quantity'] = props.details.pkgs
|
|
|
|
|
} else if (text == '重量') {
|
|
|
|
|
list.value[changes[0][0]]['quantity'] = props.details.kgs
|
|
|
|
|
} else if (text == '尺码') {
|
|
|
|
|
list.value[changes[0][0]]['quantity'] = props.details.cbm
|
|
|
|
|
} else if (text == '计费吨') {
|
|
|
|
|
let r = props.details.kgs
|
|
|
|
|
const k = (props.details.pkgs || 0) / 1000
|
|
|
|
|
if (k > r) {
|
|
|
|
|
r = k
|
|
|
|
|
}
|
|
|
|
|
list.value[changes[0][0]]['quantity'] = r
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// 修改币别
|
|
|
|
|
if (changes[0][1] === 'currencyName') {
|
|
|
|
@ -769,13 +785,16 @@
|
|
|
|
|
// 结算完毕(STATUS=9)
|
|
|
|
|
if (data[row]?.feeStatus != 1 && col != 0) {
|
|
|
|
|
// 配置不同状态的行颜色
|
|
|
|
|
if (data[row]?.feeStatus == 0) {
|
|
|
|
|
if (data[row]?.feeStatus == 0 && col == 3) {
|
|
|
|
|
props['className'] = 'hot-green'
|
|
|
|
|
}
|
|
|
|
|
if (data[row]?.feeStatus == 2) {
|
|
|
|
|
if (data[row]?.feeStatus == 2 && col == 3) {
|
|
|
|
|
props['className'] = 'hot-yellow'
|
|
|
|
|
}
|
|
|
|
|
if (data[row]?.feeStatus == 7) {
|
|
|
|
|
if (data[row]?.feeStatus == 7 && col == 3) {
|
|
|
|
|
props['className'] = 'hot-red'
|
|
|
|
|
}
|
|
|
|
|
if ((data[row]?.feeStatus == 4 || data[row]?.feeStatus == 3) && col == 3) {
|
|
|
|
|
props['className'] = 'hot-red'
|
|
|
|
|
}
|
|
|
|
|
return props
|
|
|
|
|