This commit is contained in:
‘huanghaiixia’
2025-10-23 17:41:19 +08:00
parent 6f2a425ef4
commit 3df6e12184
8 changed files with 198 additions and 95 deletions

View File

@ -24,32 +24,32 @@ export const searchFormSchema: FormSchema[] = [
getPopupContainer: () => document.body,
},
},
{
field: 'code',
label: '编码',
component: 'Input',
},
{
field: 'rate',
label: '税率%',
component: 'InputNumber',
componentProps: {
style: { width: '100%' },
},
},
{
field: 'sort',
label: '显示顺序',
component: 'InputNumber',
componentProps: {
style: { width: '100%' },
},
},
{
field: 'note',
label: '备注',
component: 'Input',
},
// {
// field: 'code',
// label: '编码',
// component: 'Input',
// },
// {
// field: 'rate',
// label: '税率%',
// component: 'InputNumber',
// componentProps: {
// style: { width: '100%' },
// },
// },
// {
// field: 'sort',
// label: '显示顺序',
// component: 'InputNumber',
// componentProps: {
// style: { width: '100%' },
// },
// },
// {
// field: 'note',
// label: '备注',
// component: 'Input',
// },
];
export const columns: BasicColumn[] = [
@ -182,7 +182,7 @@ export const formProps: FormProps = {
label: '编码',
type: 'input',
component: 'Input',
colProps: { span: 24 },
colProps: { span: 8 },
defaultValue: '',
componentProps: {
width: '100%',
@ -216,7 +216,7 @@ export const formProps: FormProps = {
label: '名称',
type: 'input',
component: 'Input',
colProps: { span: 24 },
colProps: { span: 8 },
defaultValue: '',
componentProps: {
width: '100%',
@ -250,7 +250,7 @@ export const formProps: FormProps = {
label: '税率%',
type: 'number',
component: 'InputNumber',
colProps: { span: 24 },
colProps: { span: 8 },
defaultValue: null,
componentProps: {
labelWidthMode: 'fix',
@ -280,7 +280,7 @@ export const formProps: FormProps = {
label: '显示顺序',
type: 'number',
component: 'InputNumber',
colProps: { span: 24 },
colProps: { span: 8 },
defaultValue: null,
componentProps: {
labelWidthMode: 'fix',
@ -310,7 +310,7 @@ export const formProps: FormProps = {
label: '有效标志',
type: 'select',
component: 'XjrSelect',
colProps: { span: 24 },
colProps: { span: 8 },
componentProps: {
width: '100%',
span: '',

View File

@ -39,7 +39,7 @@
import { useFormConfig } from '/@/hooks/web/useFormConfig';
import { useRouter } from 'vue-router';
import { setIndexFlowStatus } from '/@/utils/flow/index'
import { getLngBTax } from '/@/api/mdm/TaxRate';
import { getLngBTax, disableLngBTax, enableLngBTax } from '/@/api/mdm/TaxRate';
import { useModal } from '/@/components/Modal';
import TaxRateModal from './components/TaxRateModal.vue';
import {formConfig, searchFormSchema, columns } from './components/config';
@ -48,7 +48,7 @@
import { cloneDeep } from 'lodash-es';
const { bus, CREATE_FLOW, FLOW_PROCESSED, FORM_LIST_MODIFIED } = useEventBus();
const { notification } = useMessage();
const { t } = useI18n();
defineEmits(['register']);
@ -60,6 +60,7 @@
const customSearchFormSchema =ref(searchFormSchema);
const tableRef = ref();
const selectedKeys = ref<string[]>([]);
//所有按钮
const buttons = ref([{"isUse":true,"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"type":"primary"},{"isUse":true,"name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true},{"isUse":true,"name":"启用","code":"enable","icon":"ant-design:form-outlined","isDefault":true,"type":"primary"},{"isUse":true,"name":"作废","code":"disable","icon":"ant-design:stop-outlined","isDefault":true,"type":"dashed"},{"isUse":true,"name":"刷新","code":"refresh","icon":"ant-design:reload-outlined","isDefault":true},{"isUse":true,"name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true},{"isUse":true,"name":"数据日志","code":"datalog","icon":"ant-design:profile-outlined","isDefault":true},{"isUse":true,"name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true}]);
//展示在列表内的按钮
@ -97,7 +98,7 @@
},
schemas: customSearchFormSchema,
fieldMapToTime: [],
showResetButton: false,
showResetButton: true,
},
beforeFetch: (params) => {
return { ...params, FormId: formIdComputedRef.value, PK: 'id' };
@ -116,13 +117,22 @@
dataIndex: 'action',
slots: { customRender: 'action' },
},
rowSelection: {
type: 'checkbox',
onChange: onSelectChange
},
tableSetting: {
size: false,
setting: false,
},
});
function onSelectChange(rowKeys: string[]) {
selectedKeys.value = rowKeys;
}
function handleDatalog () {
}
function dbClickRow(record) {
if (!actionButtonConfig?.value.some(element => element.code == 'view')) {
return;