diff --git a/src/components/Table/src/components/TableHeader.vue b/src/components/Table/src/components/TableHeader.vue index 042a6f3f..de634e09 100644 --- a/src/components/Table/src/components/TableHeader.vue +++ b/src/components/Table/src/components/TableHeader.vue @@ -16,6 +16,7 @@ @@ -52,6 +53,10 @@ type: [String, Array] as PropType, default: '', }, + id: { + type: Number, + default: 0 + } }, emits: ['columns-change'], setup(_, { emit }) { diff --git a/src/components/Table/src/components/settings/ColumnSetting.vue b/src/components/Table/src/components/settings/ColumnSetting.vue index 106b5cc2..9eb3bd89 100644 --- a/src/components/Table/src/components/settings/ColumnSetting.vue +++ b/src/components/Table/src/components/settings/ColumnSetting.vue @@ -161,8 +161,14 @@ Icon, }, emits: ['columns-change'], + props: { + id: { + type: Number, + default: 0 + } + }, - setup(_, { emit, attrs }) { + setup(props, { emit, attrs }) { const { t } = useI18n() const table = useTableContext() @@ -505,6 +511,7 @@ }) if (!type) { let Apidata = { + id: props.id, permissionId: '', content: JSON.stringify({ columns: data, diff --git a/src/components/Table/src/components/settings/index.vue b/src/components/Table/src/components/settings/index.vue index 44a3d8f7..8e93e5cd 100644 --- a/src/components/Table/src/components/settings/index.vue +++ b/src/components/Table/src/components/settings/index.vue @@ -5,6 +5,7 @@ @@ -34,6 +35,10 @@ type: Object as PropType, default: () => ({}), }, + id: { + type: Number, + default: 0 + } }, emits: ['columns-change'], setup(props, { emit }) { diff --git a/src/components/Table/src/hooks/useTableHeader.ts b/src/components/Table/src/hooks/useTableHeader.ts index 6c214385..99ac2ecb 100644 --- a/src/components/Table/src/hooks/useTableHeader.ts +++ b/src/components/Table/src/hooks/useTableHeader.ts @@ -11,7 +11,7 @@ export function useTableHeader( handlers: InnerHandlers, ) { const getHeaderProps = computed((): Recordable => { - const { title, showTableSetting, titleHelpMessage, tableSetting } = unref(propsRef) + const { title, showTableSetting, titleHelpMessage, tableSetting, id } = unref(propsRef) const hideTitle = !slots.tableTitle && !title && !slots.toolbar && !showTableSetting if (hideTitle && !isString(title)) { return {} @@ -25,6 +25,7 @@ export function useTableHeader( TableHeader, { title, + id, titleHelpMessage, showTableSetting, tableSetting, diff --git a/src/components/Table/src/props.ts b/src/components/Table/src/props.ts index c91e3c10..e007ff86 100644 --- a/src/components/Table/src/props.ts +++ b/src/components/Table/src/props.ts @@ -151,5 +151,10 @@ export const basicProps = { showSearchForm: { type: Boolean, default: true + }, + // 表格的id增加全选使用 + id: { + type: Number, + default: 0 } } diff --git a/src/components/Table/src/types/table.ts b/src/components/Table/src/types/table.ts index 582d99f4..d945b311 100644 --- a/src/components/Table/src/types/table.ts +++ b/src/components/Table/src/types/table.ts @@ -214,7 +214,8 @@ export interface BasicTableProps { // 分页配置 pagination?: PaginationProps | boolean // loading加载 - loading?: boolean + loading?: boolean, + id?: Number, /** * The column contains children to display diff --git a/src/hooks/web/common.ts b/src/hooks/web/common.ts index 0f71d69e..5435a377 100644 --- a/src/hooks/web/common.ts +++ b/src/hooks/web/common.ts @@ -1,3 +1,5 @@ +import { router } from "/@/router" +import { useMultipleTabStore } from '/@/store/modules/multipleTab' // 格式表格时间 export function formatTableData(v) { if (v) { @@ -8,3 +10,27 @@ export function formatTableData(v) { return '' } } + +/* 关闭当前标签页 (默认关闭当前标签页面返回上一级路由) + * topath: 指定跳转的path +*/ +export function closePage(topath) { + const tabStore = useMultipleTabStore() + // 当前路由 + const fullPath = router?.currentRoute?._value?.fullPath + // 有目标路径则跳转 + if (topath) { + router.push(topath) + } else { + // 父级路由 + const parent = router?.options?.history?.state?.back + console.log(router) + // 如果存在父级路由,直接返回父级 + if (parent) { + router.push(parent) + } else { + // 否则返回上一级路由 + router.back() + } + } +} \ No newline at end of file diff --git a/src/views/baseinfo/accountMaintenance/columns.tsx b/src/views/baseinfo/accountMaintenance/columns.tsx index 687118c1..9f6fe324 100644 --- a/src/views/baseinfo/accountMaintenance/columns.tsx +++ b/src/views/baseinfo/accountMaintenance/columns.tsx @@ -13,6 +13,12 @@ import { getDictOption } from '/@/utils/dictUtil' const customTypeDict = ref([]) // 账号类型下拉数据 const accountTypeDict = ref([]) +getDictOption('account_type').then(data => { + accountTypeDict.value = data +}) +getDictOption('djy_cust_prop').then(data => { + customTypeDict.value = data +}) // 客户名称下拉框数据 const companyDict = ref([]) export const columns: BasicColumn[] = [ @@ -76,9 +82,6 @@ export const formSchema: FormSchema[] = [ component: 'Select', colProps: { span: 12 }, componentProps: () => { - getDictOption('account_type').then(data => { - accountTypeDict.value = data - }) return { options: accountTypeDict.value, allowClear: true, @@ -100,12 +103,8 @@ export const formSchema: FormSchema[] = [ field: 'customerType', label: '客户类型', component: 'Select', - required: true, colProps: { span: 12 }, componentProps: () => { - getDictOption('djy_cust_prop').then(data => { - customTypeDict.value = data - }) return { options: customTypeDict.value, allowClear: true, @@ -129,7 +128,6 @@ export const formSchema: FormSchema[] = [ { field: 'customerName', label: '客户名称', - required: true, component: 'Select', colProps: { span: 12 }, componentProps: ({ formModel }) => { diff --git a/src/views/fee/template/columns.tsx b/src/views/fee/template/columns.tsx index cc4987fb..0a692993 100644 --- a/src/views/fee/template/columns.tsx +++ b/src/views/fee/template/columns.tsx @@ -9,6 +9,12 @@ import { BasicColumn, FormSchema } from '/@/components/Table' import { getDictOption } from '/@/utils/dictUtil' // 业务种类字典 const opTypeDict = ref([]) +getDictOption('business_type').then(data => { + data.forEach(res => { + res.value = String(res.value) + }) + opTypeDict.value = data +}) export const columns: BasicColumn[] = [ { title: '模版名称', @@ -100,12 +106,6 @@ export const formSchema: FormSchema[] = [ required: true, colProps: { span: 8 }, componentProps: ({ formActionType }) => { - getDictOption('business_type').then(data => { - data.forEach(res => { - res.value = String(res.value) - }) - opTypeDict.value = data - }) return { options: opTypeDict.value, allowClear: true, diff --git a/src/views/operation/paidApply/api.ts b/src/views/operation/paidApply/api.ts index 9bc01ba2..a803e00b 100644 --- a/src/views/operation/paidApply/api.ts +++ b/src/views/operation/paidApply/api.ts @@ -12,7 +12,12 @@ enum Api { info = '/feeApi/FeeCurrency/GetFeeCurrencyInfo', GetBizList = '/feeApi/PaymentApplication/GetBizList', Save = '/feeApi/PaymentApplication/Save', - Get = '/feeApi/PaymentApplication//Get' + Get = '/feeApi/PaymentApplication/Get', + GetExchangeRate = '/feeApi/FeeCurrencyExchange/GetExchangeRate', + BizSave = '/feeApi/PaymentApplication/BizSave', + Delete = '/feeApi/PaymentApplication/Delete', + ApplyAudit = '/feeApi/PaymentApplication/ApplyAudit', + Withdraw = '/feeApi/PaymentApplication/Withdraw' } // 列表 (Auth) export function GetList(data: PageRequest) { @@ -61,4 +66,44 @@ export function Get(query) { method: 'get', params: query }) +} +// 根据两种币别计算汇率接口 +export function GetExchangeRate(query) { + return request({ + url: Api.GetExchangeRate, + method: 'get', + params: query + }) +} +// 按业务申请 +export function BizSave(data: PageRequest) { + return request({ + url: Api.BizSave, + method: 'post', + data + }) +} +// 删除申请单 +export function Delete(data: PageRequest) { + return request({ + url: Api.Delete, + method: 'post', + data + }) +} +// 申请单提交审核 +export function ApplyAudit(data: PageRequest) { + return request({ + url: Api.ApplyAudit, + method: 'post', + data + }) +} +// 撤销审批 +export function Withdraw(data: PageRequest) { + return request({ + url: Api.Withdraw, + method: 'post', + data + }) } \ No newline at end of file diff --git a/src/views/operation/paidApply/columns.tsx b/src/views/operation/paidApply/columns.tsx index 74d41dde..5d627859 100644 --- a/src/views/operation/paidApply/columns.tsx +++ b/src/views/operation/paidApply/columns.tsx @@ -29,7 +29,7 @@ export const columns: BasicColumn[] = [ }, { title: '状态', - dataIndex: 'status', + dataIndex: 'statusText', width: 100, align: 'left' }, diff --git a/src/views/operation/paidApply/components/tableActionBar.vue b/src/views/operation/paidApply/components/tableActionBar.vue index 20051147..e530c2ee 100644 --- a/src/views/operation/paidApply/components/tableActionBar.vue +++ b/src/views/operation/paidApply/components/tableActionBar.vue @@ -11,25 +11,35 @@ - - 提交审核 + + - - - - - - + + + + + + + + diff --git a/src/views/operation/paidApply/detail/columns.tsx b/src/views/operation/paidApply/detail/columns.tsx index 8b8ac3ca..68ff9f41 100644 --- a/src/views/operation/paidApply/detail/columns.tsx +++ b/src/views/operation/paidApply/detail/columns.tsx @@ -7,8 +7,11 @@ import { ref, h, ComponentOptions, resolveComponent } from 'vue' import { BasicColumn, FormSchema } from '/@/components/Table' import { useOptionsStore } from '/@/store/modules/options' const optionsStore = useOptionsStore() +import { useRoute } from 'vue-router' +const route = useRoute() // 引入字典数据 import { getDictOption } from '/@/utils/dictUtil' +import { placeholderSign } from 'element-plus/es/components/table-v2/src/private' // 业务表格列 export const businessColumns: BasicColumn[] = [ @@ -189,6 +192,12 @@ export const businessColumns: BasicColumn[] = [ ] export const formSchema: FormSchema[] = [ + { + field: 'id', + label: '申请编号', + component: 'Input', + show: false + }, { field: 'applicationNO', label: '申请编号', @@ -226,7 +235,6 @@ export const formSchema: FormSchema[] = [ labelField: 'shortName', valueField: 'id', resultField: 'data', - immediate: false, filterOption: (input: string, option: any) => { return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 } @@ -266,7 +274,13 @@ export const formSchema: FormSchema[] = [ label: '申请日期', component: 'DatePicker', dynamicDisabled: false, - colProps: { span: 3 } + colProps: { span: 3 }, + componentProps: { + showTime: true, + allowClear: true, + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'YYYY-MM-DD HH:mm:ss' + }, }, { field: 'currency', @@ -274,12 +288,14 @@ export const formSchema: FormSchema[] = [ component: 'ApiSelect', required: false, dynamicDisabled: false, + defaultValue: null, colProps: { span: 3 }, componentProps: () => { return { option: optionsStore.getOptionsByCode('GetFeeCurrencySelectList'), labelField: 'name', valueField: 'codeName', + placeholder: '原币申请', resultField: 'data', immediate: false, filterOption: (input: string, option: any) => { @@ -355,7 +371,13 @@ export const formSchema: FormSchema[] = [ label: '申请支付日期', component: 'DatePicker', dynamicDisabled: false, - colProps: { span: 3 } + colProps: { span: 3 }, + componentProps: { + showTime: true, + allowClear: true, + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'YYYY-MM-DD HH:mm:ss' + }, }, // { // field: 'createBy', @@ -374,7 +396,7 @@ export const formSchema: FormSchema[] = [ ] export const searchFormSchema: FormSchema[] = [ { - label: '结算单位', + label: '结算对象', field: 'customerId', component: 'ApiSelect', dynamicDisabled: false, @@ -382,9 +404,8 @@ export const searchFormSchema: FormSchema[] = [ componentProps: () => { return { option: optionsStore.getOptionsByCode('GetClientListByCode'), - immediate: false, labelField: 'shortName', - valueField: 'codeName', + valueField: 'id', resultField: 'data', filterOption: (input: string, option: any) => { return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 diff --git a/src/views/operation/paidApply/detail/components/applyInfo.vue b/src/views/operation/paidApply/detail/components/applyInfo.vue index 47fe8753..4155c804 100644 --- a/src/views/operation/paidApply/detail/components/applyInfo.vue +++ b/src/views/operation/paidApply/detail/components/applyInfo.vue @@ -95,7 +95,8 @@ showIndexColumn: true, canResize: false, rowSelection: { type: 'checkbox' }, - immediate: false + immediate: false, + id: 1 }) // 添加明细 const add = () => { diff --git a/src/views/operation/paidApply/detail/components/businessTable.vue b/src/views/operation/paidApply/detail/components/businessTable.vue index c24645ba..6443e4c7 100644 --- a/src/views/operation/paidApply/detail/components/businessTable.vue +++ b/src/views/operation/paidApply/detail/components/businessTable.vue @@ -5,37 +5,45 @@ --> + + \ No newline at end of file diff --git a/src/views/operation/paidApply/detail/index.vue b/src/views/operation/paidApply/detail/index.vue index 0b62da29..1fe39f3f 100644 --- a/src/views/operation/paidApply/detail/index.vue +++ b/src/views/operation/paidApply/detail/index.vue @@ -6,8 +6,9 @@