|
|
|
@ -47,7 +47,7 @@
|
|
|
|
|
defineComponent,
|
|
|
|
|
onMounted,
|
|
|
|
|
nextTick,
|
|
|
|
|
provide,
|
|
|
|
|
provide
|
|
|
|
|
} from 'vue'
|
|
|
|
|
// 下拉框数据接口
|
|
|
|
|
import { GetFeeCurrencySelectList, GetFeeCodeSelectList, GetClientSelectInfoByCode, GetUnitSelectInfo } from '/@/api/common'
|
|
|
|
@ -57,8 +57,6 @@
|
|
|
|
|
// 操作栏
|
|
|
|
|
import ActionBar from './actionBar.vue'
|
|
|
|
|
import { feeStatusList } from './columns'
|
|
|
|
|
// 引入计费标准字典
|
|
|
|
|
import { feeUnitDict } from '/@/hooks/dict/index'
|
|
|
|
|
import { GetList, SubmitFee, DeleteFee, ApplyAudit, Withdraw, SubmitWithAudit } from './api'
|
|
|
|
|
// 结算对象下拉数据
|
|
|
|
|
import { GetClientListByCode } from '/@/api/common'
|
|
|
|
@ -105,18 +103,22 @@
|
|
|
|
|
const feeDict = ref([])
|
|
|
|
|
// 费用标准字典
|
|
|
|
|
const unitDict = ref([])
|
|
|
|
|
getDictOption('fee_unit').then(res => {
|
|
|
|
|
let b = []
|
|
|
|
|
if (props.details.ctnInfo && props.details.ctnInfo.length) {
|
|
|
|
|
const a = props.details.ctnInfo.filter(item => {
|
|
|
|
|
return item.ctn
|
|
|
|
|
})
|
|
|
|
|
b = a.map(item => {
|
|
|
|
|
return { label: item.ctn, value: item.ctn, name: item.ctnCode }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
unitDict.value = [...b, ...res]
|
|
|
|
|
})
|
|
|
|
|
// 获取单位字典
|
|
|
|
|
const getUnitList = () => {
|
|
|
|
|
getDictOption('fee_unit').then(res => {
|
|
|
|
|
let b = []
|
|
|
|
|
if (props.details.ctnInfo && props.details.ctnInfo.length) {
|
|
|
|
|
const a = props.details.ctnInfo.filter(item => {
|
|
|
|
|
return item.ctn
|
|
|
|
|
})
|
|
|
|
|
b = a.map(item => {
|
|
|
|
|
return { label: item.ctn, value: item.ctnCode, name: item.ctn }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
unitDict.value = [...b, ...res]
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
getUnitList()
|
|
|
|
|
// 币别字典
|
|
|
|
|
const currencyDict = ref([])
|
|
|
|
|
// 费用对象字典数据
|
|
|
|
@ -204,7 +206,7 @@
|
|
|
|
|
return item.value + '-' + item.name
|
|
|
|
|
})
|
|
|
|
|
process(dict)
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '结算对象',
|
|
|
|
@ -213,10 +215,7 @@
|
|
|
|
|
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, queryKey: query }).then((res) => {
|
|
|
|
|
GetClientListByCode({ queryKey: query }).then((res) => {
|
|
|
|
|
const { data } = res
|
|
|
|
|
data.forEach((item) => {
|
|
|
|
|
item['label'] = item.shortName
|
|
|
|
@ -230,7 +229,7 @@
|
|
|
|
|
console.log(dict)
|
|
|
|
|
process(dict)
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '单位标准',
|
|
|
|
@ -597,7 +596,6 @@
|
|
|
|
|
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
|
|
|
|
@ -629,7 +627,7 @@
|
|
|
|
|
})
|
|
|
|
|
if (item) dict = item[0]
|
|
|
|
|
list.value[changes[0][0]]['unit'] = dict?.value
|
|
|
|
|
list.value[changes[0][0]]['unitText'] = changes[0][3].split('-')[1]
|
|
|
|
|
list.value[changes[0][0]]['unitText'] = changes[0][3].split('-')[0]
|
|
|
|
|
GetUnitSelectInfo({ code: dict?.value, businessId: props.id, businessType: props.type }).then(res => {
|
|
|
|
|
list.value[changes[0][0]]['quantity'] = res.data.quantity
|
|
|
|
|
})
|
|
|
|
@ -741,9 +739,9 @@
|
|
|
|
|
SubmitFee(postData)
|
|
|
|
|
.then((res) => {
|
|
|
|
|
loading.value = false
|
|
|
|
|
init()
|
|
|
|
|
// 刷新统计表格数据
|
|
|
|
|
emits('refreshStatic')
|
|
|
|
|
init()
|
|
|
|
|
if (!b) createMessage.success(res.message)
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
@ -1089,7 +1087,8 @@
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
defineExpose({
|
|
|
|
|
allSave
|
|
|
|
|
allSave,
|
|
|
|
|
getUnitList
|
|
|
|
|
})
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|