|
|
|
@ -108,7 +108,7 @@
|
|
|
|
|
feeType: props.tbType == 'receive' ? 1 : 2,
|
|
|
|
|
}
|
|
|
|
|
// 表格绑定数据
|
|
|
|
|
const list = ref([])
|
|
|
|
|
const list = ref([]) as any
|
|
|
|
|
provide('temFieldData', list)
|
|
|
|
|
// 表格编辑前初始数据
|
|
|
|
|
let oldData = []
|
|
|
|
@ -132,21 +132,9 @@
|
|
|
|
|
readOnly: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '业务编号',
|
|
|
|
|
title: '货物或应税劳务名称',
|
|
|
|
|
width: 130,
|
|
|
|
|
data: 'businessId',
|
|
|
|
|
readOnly: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '费用状态',
|
|
|
|
|
width: 70,
|
|
|
|
|
data: 'feeStatusText',
|
|
|
|
|
readOnly: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: props.tbType == 'receive' ? '应收费用名称' : '应付费用名称',
|
|
|
|
|
width: 130,
|
|
|
|
|
data: 'feeName',
|
|
|
|
|
data: 'name',
|
|
|
|
|
type: 'dropdown',
|
|
|
|
|
// 下拉框数据,可以同步或者异步返回(异步需要process返回)
|
|
|
|
|
source: async (query, process) => {
|
|
|
|
@ -160,89 +148,14 @@
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '费用英文名称',
|
|
|
|
|
width: 130,
|
|
|
|
|
data: 'feeEnName',
|
|
|
|
|
type: 'dropdown',
|
|
|
|
|
source: async (query, process) => {
|
|
|
|
|
const res = feeDict.value.length ? feeDict.value : (await GetFeeCodeSelectList())?.data
|
|
|
|
|
if (!feeDict.value.length) feeDict.value = res
|
|
|
|
|
const dict = res.map((res) => {
|
|
|
|
|
return res.enName
|
|
|
|
|
})
|
|
|
|
|
process(dict)
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '客户类别',
|
|
|
|
|
width: 130,
|
|
|
|
|
data: 'customerTypeText',
|
|
|
|
|
type: 'dropdown',
|
|
|
|
|
source: async (query, process) => {
|
|
|
|
|
const results = await getDictOption('djy_cust_prop')
|
|
|
|
|
console.log(results)
|
|
|
|
|
const dict = results.map((item) => {
|
|
|
|
|
return item.value + '-' + item.name
|
|
|
|
|
})
|
|
|
|
|
process(dict)
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '结算对象',
|
|
|
|
|
width: 130,
|
|
|
|
|
data: 'customerName',
|
|
|
|
|
type: 'dropdown',
|
|
|
|
|
source: async (query, process) => {
|
|
|
|
|
// 获取当前选中行
|
|
|
|
|
const rowIndex = hotTb.value.hotInstance.getActiveEditor().row
|
|
|
|
|
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
|
|
|
|
|
})
|
|
|
|
|
companyDict.value = data
|
|
|
|
|
const dict = data.map((item) => {
|
|
|
|
|
return item.codeName + '-' + item.shortName
|
|
|
|
|
})
|
|
|
|
|
process(dict)
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '单位标准',
|
|
|
|
|
width: 130,
|
|
|
|
|
data: 'unitText',
|
|
|
|
|
type: 'dropdown',
|
|
|
|
|
source: async (query, process) => {
|
|
|
|
|
if (unitDict.value && unitDict.value.length) {
|
|
|
|
|
const dict = unitDict.value.map((item) => {
|
|
|
|
|
return item.value + '-' + item.name
|
|
|
|
|
})
|
|
|
|
|
process(dict)
|
|
|
|
|
} else {
|
|
|
|
|
const results = await feeUnitDict()
|
|
|
|
|
unitDict.value = results
|
|
|
|
|
const dict = results.map((item) => {
|
|
|
|
|
return item.value + '-' + item.name
|
|
|
|
|
})
|
|
|
|
|
process(dict)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '税率',
|
|
|
|
|
title: '规格型号',
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'taxRate',
|
|
|
|
|
type: 'numeric',
|
|
|
|
|
data: 'specification',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '单价',
|
|
|
|
|
title: '单位',
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'unitPrice',
|
|
|
|
|
type: 'numeric',
|
|
|
|
|
format: '0.00',
|
|
|
|
|
data: 'unit',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '数量',
|
|
|
|
@ -252,18 +165,17 @@
|
|
|
|
|
format: '0',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '不含税单价',
|
|
|
|
|
title: '单价',
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'noTaxPrice',
|
|
|
|
|
data: 'taxUnitPrice',
|
|
|
|
|
type: 'numeric',
|
|
|
|
|
readOnly: true,
|
|
|
|
|
format: '0.00',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '不含税金额',
|
|
|
|
|
title: '不含税单价',
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'noTaxAmount',
|
|
|
|
|
data: 'unitPrice',
|
|
|
|
|
type: 'numeric',
|
|
|
|
|
format: '0.00',
|
|
|
|
|
readOnly: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
@ -273,141 +185,16 @@
|
|
|
|
|
type: 'numeric',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '币别',
|
|
|
|
|
width: 80,
|
|
|
|
|
data: 'currency',
|
|
|
|
|
type: 'dropdown',
|
|
|
|
|
source: async (query, process) => {
|
|
|
|
|
if (currencyDict.value.length) {
|
|
|
|
|
process(currencyDict.value)
|
|
|
|
|
} else {
|
|
|
|
|
const results = await GetFeeCurrencySelectList()
|
|
|
|
|
const dict = results.data?.map((res) => {
|
|
|
|
|
return res.codeName
|
|
|
|
|
})
|
|
|
|
|
currencyDict.value = dict
|
|
|
|
|
process(dict)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '汇率',
|
|
|
|
|
title: '税率',
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'exchangeRate',
|
|
|
|
|
data: 'taxRate',
|
|
|
|
|
type: 'numeric',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '备注',
|
|
|
|
|
title: '税额',
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'note',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '销项税率',
|
|
|
|
|
width: 100,
|
|
|
|
|
data: 'accTaxRate',
|
|
|
|
|
data: 'taxAmount',
|
|
|
|
|
type: 'numeric',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '销项税额',
|
|
|
|
|
width: 100,
|
|
|
|
|
data: 'accTaxAmount',
|
|
|
|
|
readOnly: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '销项金额',
|
|
|
|
|
width: 100,
|
|
|
|
|
data: 'accAmount',
|
|
|
|
|
readOnly: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '是否机密',
|
|
|
|
|
width: 100,
|
|
|
|
|
data: 'isOpen',
|
|
|
|
|
type: 'checkbox',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '是否垫付',
|
|
|
|
|
width: 100,
|
|
|
|
|
data: 'isAdvancedPay',
|
|
|
|
|
type: 'checkbox',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '是否禁开发票',
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'isInvoice',
|
|
|
|
|
type: 'checkbox',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: 'FRT',
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'feeFrt',
|
|
|
|
|
type: 'dropdown',
|
|
|
|
|
source: ['PP', 'CC'],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '录入人',
|
|
|
|
|
width: 100,
|
|
|
|
|
data: 'createByName',
|
|
|
|
|
readOnly: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '录入日期',
|
|
|
|
|
width: 100,
|
|
|
|
|
data: 'createTime',
|
|
|
|
|
readOnly: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '结算金额',
|
|
|
|
|
width: 100,
|
|
|
|
|
data: 'settlementAmount',
|
|
|
|
|
readOnly: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '已开票金额',
|
|
|
|
|
width: 100,
|
|
|
|
|
data: 'invoiceAmount',
|
|
|
|
|
readOnly: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '对账编号',
|
|
|
|
|
width: 140,
|
|
|
|
|
data: 'debitNo',
|
|
|
|
|
readOnly: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '修改人',
|
|
|
|
|
width: 100,
|
|
|
|
|
data: 'updateByName',
|
|
|
|
|
readOnly: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '修改日期',
|
|
|
|
|
width: 100,
|
|
|
|
|
data: 'updateTime',
|
|
|
|
|
readOnly: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '发票申请金额',
|
|
|
|
|
width: 100,
|
|
|
|
|
data: 'orderInvoiceAmount',
|
|
|
|
|
readOnly: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '未开票金额',
|
|
|
|
|
width: 100,
|
|
|
|
|
data: 'invoiceAmountRest',
|
|
|
|
|
readOnly: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '审核人',
|
|
|
|
|
width: 100,
|
|
|
|
|
data: 'auditOperator',
|
|
|
|
|
readOnly: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '审核日期',
|
|
|
|
|
width: 100,
|
|
|
|
|
data: 'auditDate',
|
|
|
|
|
readOnly: true,
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|