diff --git a/src/components/CostEntry/actionBar.vue b/src/components/CostEntry/actionBar.vue index 7fd0bcea..13bfa9c8 100644 --- a/src/components/CostEntry/actionBar.vue +++ b/src/components/CostEntry/actionBar.vue @@ -13,19 +13,36 @@ 复制 - + 保存 - - - 删除 - - - - 取消 - - + + + + 删除 + + + + + + 取消 + + + 刷新 @@ -45,8 +62,10 @@ diff --git a/src/components/CostEntry/api.ts b/src/components/CostEntry/api.ts index 6d1c35b4..bd5fd684 100644 --- a/src/components/CostEntry/api.ts +++ b/src/components/CostEntry/api.ts @@ -7,12 +7,13 @@ import { request } from '/@/utils/request' import { DataResult, PageRequest } from '/@/api/model/baseModel' enum Api { - list = '/feeApi/FeeRecord/GetFeeRecordList', - edit = '/feeApi/FeeRecord/EditFeeRecord', - info = '/feeApi/FeeRecord/GetFeeRecordInfo' + list = '/feeApi/FeeRecord/GetList', + edit = '/feeApi/FeeRecord/Submit', + delete = '/feeApi/FeeRecord/Delete', + statistic = '/feeApi/FeeRecord/FeeStatistics' } // 列表 (Auth) -export function GetFeeRecordList(data: PageRequest) { +export function GetList(data: PageRequest) { return request({ url: Api.list, method: 'post', @@ -20,7 +21,7 @@ export function GetFeeRecordList(data: PageRequest) { }) } // 编辑 (Auth) -export function EditFeeRecord(data: PageRequest) { +export function SubmitFee(data: PageRequest) { return request({ url: Api.edit, method: 'post', @@ -28,11 +29,19 @@ export function EditFeeRecord(data: PageRequest) { }) } // 详情 (Auth) -export function GetFeeRecordInfo(query) { +export function DeleteFee(data) { return request({ - url: Api.info, - method: 'get', - params: query + url: Api.delete, + method: 'post', + data }) } +// 统计 +export function FeeStatistics(data: PageRequest) { + return request({ + url: Api.statistic, + method: 'post', + data + }) +} \ No newline at end of file diff --git a/src/components/CostEntry/feeStatistic.vue b/src/components/CostEntry/feeStatistic.vue new file mode 100644 index 00000000..fae5f6d0 --- /dev/null +++ b/src/components/CostEntry/feeStatistic.vue @@ -0,0 +1,167 @@ + + + + + + \ No newline at end of file diff --git a/src/components/CostEntry/receiveTable.vue b/src/components/CostEntry/feeTable.vue similarity index 60% rename from src/components/CostEntry/receiveTable.vue rename to src/components/CostEntry/feeTable.vue index c49647c4..43ad941b 100644 --- a/src/components/CostEntry/receiveTable.vue +++ b/src/components/CostEntry/feeTable.vue @@ -1,22 +1,28 @@ - \ No newline at end of file diff --git a/src/views/fee/code/columns.tsx b/src/views/fee/code/columns.tsx index dcc2fd14..e060826d 100644 --- a/src/views/fee/code/columns.tsx +++ b/src/views/fee/code/columns.tsx @@ -9,10 +9,10 @@ import { BasicColumn, FormSchema } from '/@/components/Table' import { getDictOption } from '/@/utils/dictUtil' // 下拉框数据接口 import { GetFeeCurrencySelectList } from '/@/api/common' +// 引入计费标准字典 +import { feeUnitDict } from '/@/hooks/dict/index' // 客户类别下拉框数据 const customTypeDict = ref([]) -// 计费标准下拉框数据 -const feeUnitDict = ref([]) // 付费方式字典 const payMethodsDict = ref([]) // 费用分组字典 @@ -21,6 +21,12 @@ const reconciliationCategorygDict = ref([]) const costGroupingDict = ref([]) // 发票商品名称字典 const productNameDict = ref([]) +// 自定义绑定参数 +export const dsParams = { + defaultCreditName: '', + defaultDebitName: '', + defaultUnitName: '' +} export const columns: BasicColumn[] = [ { title: '费用代码', @@ -214,18 +220,16 @@ export const formSchema: FormSchema[] = [ field: 'defaultUnit', label: '默认计费标准', defaultValue: '', - component: 'Select', + component: 'ApiSelect', colProps: { span: 8 }, componentProps: () => { - getDictOption('fee_unit').then(data => { - feeUnitDict.value = data - }) return { - options: feeUnitDict.value, - allowClear: true, - showSearch: true, - filterOption: (input: string, option: any) => { - return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + api: feeUnitDict, + labelField: 'name', + valueField: 'value', + resultField: 'data', + onChange: (v, obj) => { + dsParams.defaultUnitName = obj?.label || '' } } } @@ -245,6 +249,9 @@ export const formSchema: FormSchema[] = [ showSearch: true, filterOption: (input: string, option: any) => { return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, + onChange: (v, obj) => { + dsParams.defaultDebitName = obj?.label || '' } } } @@ -264,6 +271,9 @@ export const formSchema: FormSchema[] = [ showSearch: true, filterOption: (input: string, option: any) => { return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, + onChange: (v, obj) => { + dsParams.defaultCreditName = obj?.label || '' } } } diff --git a/src/views/fee/code/components/Modal.vue b/src/views/fee/code/components/Modal.vue index f844c2ad..38343c3b 100644 --- a/src/views/fee/code/components/Modal.vue +++ b/src/views/fee/code/components/Modal.vue @@ -64,7 +64,7 @@ import { BasicModal, useModalInner } from '/@/components/Modal' import { BasicForm, useForm } from '/@/components/Form/index' // 币别字段数据 - import { formSchema } from '../columns' + import { formSchema, dsParams } from '../columns' // 币别相关接口 import { EditFeeCode, GetFeeCodeInfo } from '../api' // 提升消息混入 @@ -128,7 +128,7 @@ const values = await validate() loading.value = true setModalProps({ confirmLoading: true, loading: true }) - const res: API.DataResult = await EditFeeCode(Object.assign(values, formData)) + const res: API.DataResult = await EditFeeCode(Object.assign(values, formData, dsParams)) loading.value = false if (res.succeeded) { createMessage.success(res.message) diff --git a/src/views/fee/currency/index.vue b/src/views/fee/currency/index.vue index 4cac08fb..cf4c37df 100644 --- a/src/views/fee/currency/index.vue +++ b/src/views/fee/currency/index.vue @@ -21,7 +21,11 @@ - + + + + + @@ -34,7 +38,8 @@ import { columns, searchFormSchema } from './columns' const [registerModal, { openModal }] = useModal() // 应收表格组件 - import ReceiveTable from '/@/components/CostEntry/receiveTable.vue' + import FeeTable from '/@/components/CostEntry/feeTable.vue' + import FeeStatistic from '/@/components/CostEntry/feeStatistic.vue' const [registerTable, { reload, getForm, getPaginationRef }] = useTable({ title: '币别设置', // api: getSysDictTypeList, diff --git a/src/views/fee/template/components/feeField.vue b/src/views/fee/template/components/feeField.vue index 17151fca..9fac3d72 100644 --- a/src/views/fee/template/components/feeField.vue +++ b/src/views/fee/template/components/feeField.vue @@ -224,11 +224,23 @@ } else { const types = await getDictOption('djy_cust_prop') const dict = types.filter(item => { - console.log(item) - return item.name + return rowData.customerTypeName == item.name }) + if (dict && dict.length) { + GetClientListByCode({ code: dict[0].value }).then(res => { + const { data } = res + data.forEach(item => { + item['label'] = item.shortName + item['value'] = item.codeName + }) + companyDict.value = data + const results = data.map(item => { + return item.label + }) + process(results) + }) + } } - // process(dict) } }], licenseKey: 'non-commercial-and-evaluation',