税率
This commit is contained in:
@ -142,7 +142,7 @@ export async function disableLngBBank(ids: string[], mode: ErrorMessageMode = 'm
|
||||
* @description: 获取数据日志
|
||||
*/
|
||||
export async function getDataLog(id: string, mode: ErrorMessageMode = 'modal', path:string) {
|
||||
return defHttp.post<boolean>(
|
||||
return defHttp.get<boolean>(
|
||||
{
|
||||
url: path,
|
||||
params: { id },
|
||||
|
||||
@ -1,31 +1,44 @@
|
||||
<template>
|
||||
<div :style="{ height: '100%', background: '#fff' }">
|
||||
<div >
|
||||
<a-modal
|
||||
:width="1150"
|
||||
v-model:visible="visible"
|
||||
title="数据日志"
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
>
|
||||
<a-table :style="{ padding: '0 5px'}" :columns="columns" :data-source="data" :scroll="{y: 400}" :pagination="false" :row-key="record => record.id"/>
|
||||
</a-modal>
|
||||
|
||||
<a-table :columns="columns" :data-source="data" :scroll="{y: 500}" :row-key="record => record.id"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { getDataLog } from '/@/api/mdm/Bank';
|
||||
import { defineProps, ref, computed, onMounted, onUnmounted, createVNode, reactive, } from 'vue';
|
||||
import { watch, defineProps, ref, computed, onMounted, onUnmounted, createVNode, reactive, } from 'vue';
|
||||
const columns = [
|
||||
{
|
||||
title: '表名',
|
||||
dataIndex: 'tableName',
|
||||
key: 'tableName',
|
||||
width: 80
|
||||
width: 100,
|
||||
ellipsis: true,
|
||||
sorter: true
|
||||
},
|
||||
{
|
||||
title: '属性名称',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
width: 140
|
||||
width: 100,
|
||||
ellipsis: true,
|
||||
sorter: true
|
||||
|
||||
},
|
||||
{
|
||||
title: '操作类型',
|
||||
dataIndex: 'operationType',
|
||||
key: 'operationType',
|
||||
width: 100,
|
||||
width: 80,
|
||||
sorter: true,
|
||||
customRender: ({ record }) => {
|
||||
let text = record.operationType
|
||||
if (record.operationType == 'INSERT') text='新增'
|
||||
@ -38,43 +51,92 @@
|
||||
title: '原数据',
|
||||
dataIndex: 'oldValue',
|
||||
key: 'oldValue',
|
||||
width: 150
|
||||
width: 150,
|
||||
ellipsis: true,
|
||||
sorter: true
|
||||
},
|
||||
{
|
||||
title: '新数据',
|
||||
dataIndex: 'newValue',
|
||||
key: 'newValue',
|
||||
width: 150
|
||||
width: 150,
|
||||
ellipsis: true,
|
||||
sorter: true
|
||||
},
|
||||
{
|
||||
title: '操作人',
|
||||
dataIndex: 'operatorName',
|
||||
key: 'operatorName',
|
||||
width: 100
|
||||
width: 100,
|
||||
sorter: true
|
||||
},
|
||||
{
|
||||
title: '操作IP',
|
||||
dataIndex: 'operationIp',
|
||||
key: 'operationIp',
|
||||
width: 150
|
||||
width: 150,
|
||||
sorter: true
|
||||
},
|
||||
{
|
||||
title: '操作时间',
|
||||
dataIndex: 'operationTime',
|
||||
key: 'operationTime',
|
||||
width: 150
|
||||
width: 170,
|
||||
sorter: true
|
||||
},
|
||||
];
|
||||
const props = defineProps({
|
||||
// 定义props
|
||||
interface Props {
|
||||
visible: boolean;
|
||||
logId?: string;
|
||||
logPath?: string;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
logId: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
logPath: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
})
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
logPath: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
});
|
||||
|
||||
// 定义emit
|
||||
const emit = defineEmits<{
|
||||
(e: 'update:visible', value: boolean): void;
|
||||
(e: 'ok', value: string): void;
|
||||
(e: 'cancel'): void;
|
||||
}>();
|
||||
|
||||
// 使用ref来管理visible,因为需要响应式更新
|
||||
const visible = ref(props.visible);
|
||||
|
||||
// 监听props.visible的变化,同步到visible
|
||||
watch(() => props.visible, (newVal) => {
|
||||
visible.value = newVal;
|
||||
console.log(visible.value, 42424)
|
||||
getLogData()
|
||||
});
|
||||
|
||||
// 监听visible的变化,通知父组件更新
|
||||
watch(visible, (newVal) => {
|
||||
console.log(visible.value, 42425)
|
||||
emit('update:visible', newVal);
|
||||
});
|
||||
|
||||
const handleOk = () => {
|
||||
// 可以在这里处理确定按钮的逻辑,然后关闭弹框
|
||||
emit('ok', '来自子组件的消息');
|
||||
visible.value = false;
|
||||
};
|
||||
|
||||
const handleCancel = () => {
|
||||
emit('cancel');
|
||||
visible.value = false;
|
||||
};
|
||||
|
||||
console.log(props.logId, 444, props.logPath)
|
||||
interface DataItem {
|
||||
children?: DataItem[];
|
||||
@ -83,10 +145,14 @@ console.log(props.logId, 444, props.logPath)
|
||||
// const data: DataItem[] = [];
|
||||
const data = ref<DataItem[]>([]);
|
||||
|
||||
async function getLogData() {
|
||||
data.value = await getDataLog(props.logId, {},props.logPath)
|
||||
console.log(data.value, 88)
|
||||
}
|
||||
|
||||
onMounted( async() => {
|
||||
|
||||
data.value = await getDataLog(props.logId, {},props.logPath)
|
||||
console.log(data.value, 88)
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@ -21,18 +21,19 @@
|
||||
</template>
|
||||
</BasicTable>
|
||||
<BankModal @register="registerModal" @success="handleSuccess" />
|
||||
<!-- <div>
|
||||
|
||||
<DataLog :logId="logId" :logPath="logPath" />
|
||||
</div> -->
|
||||
|
||||
<DataLog :logId="logId" :logPath="logPath" v-model:visible="modalVisible"/>
|
||||
|
||||
</PageWrapper>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, computed, onMounted, onUnmounted, createVNode, reactive,
|
||||
|
||||
} from 'vue';
|
||||
const logId = ref('77773434')
|
||||
const logPath = ref('/bank/b')
|
||||
const modalVisible = ref(false);
|
||||
const logId = ref('')
|
||||
const logPath = ref('/mdm/bank/datalog');
|
||||
import { Modal } from 'ant-design-vue';
|
||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||
import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table';
|
||||
@ -191,8 +192,10 @@ const logPath = ref('/bank/b')
|
||||
|
||||
btnEvent[code]();
|
||||
}
|
||||
function handleDatalog () {
|
||||
dataObj.visible = true
|
||||
function handleDatalog (record: Recordable) {
|
||||
modalVisible.value = true
|
||||
logId.value = record.id
|
||||
console.log('日志', modalVisible.value, record)
|
||||
}
|
||||
function handleAdd() {
|
||||
if (schemaIdComputedRef.value) {
|
||||
|
||||
@ -121,7 +121,7 @@
|
||||
},
|
||||
schemas: customSearchFormSchema,
|
||||
fieldMapToTime: [],
|
||||
showResetButton: false,
|
||||
showResetButton: true,
|
||||
},
|
||||
beforeFetch: (params) => {
|
||||
return { ...params, FormId: formIdComputedRef.value, PK: 'id' };
|
||||
@ -305,14 +305,14 @@
|
||||
});
|
||||
}
|
||||
function handleRefresh() {
|
||||
reload();
|
||||
// reload();
|
||||
reload({ searchInfo: { pid: selectId.value=='0'?'': selectId.value } });
|
||||
fetchTree()
|
||||
}
|
||||
function handleSuccess() {
|
||||
|
||||
reload();
|
||||
fetchTree()
|
||||
console.log(77777777777)
|
||||
}
|
||||
|
||||
function handleView(record: Recordable) {
|
||||
@ -322,13 +322,26 @@
|
||||
}
|
||||
function handleSelect(selectIds, e) {
|
||||
selectId.value = selectIds[0];
|
||||
reload({ searchInfo: { pid: selectIds[0] } });
|
||||
curTreeId.value = selectIds[0]
|
||||
reload({ searchInfo: { pid: selectIds[0]=='0'?'': selectIds[0] } });
|
||||
curTreeId.value = selectIds[0]=='0'?'': selectIds[0]
|
||||
console.log(selectId.value, 777, selectIds, e,88, e.selectedNodes[0].parentId)
|
||||
}
|
||||
|
||||
async function fetchTree() {
|
||||
treeData.value = (await getTreeData({})) as unknown as TreeItem[];
|
||||
|
||||
let arr = [{
|
||||
children: treeData.value,
|
||||
code: "",
|
||||
fullName: "国家和地区",
|
||||
fullPath: "",
|
||||
id: "0",
|
||||
parentId: "",
|
||||
pid: null,
|
||||
regionTypeCode: "",
|
||||
valid: "Y"
|
||||
}]
|
||||
treeData.value = arr
|
||||
}
|
||||
onMounted(() => {
|
||||
fetchTree();
|
||||
|
||||
@ -24,24 +24,24 @@ export const searchFormSchema: FormSchema[] = [
|
||||
getPopupContainer: () => document.body,
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'code',
|
||||
label: '编码',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
field: 'sort',
|
||||
label: '显示顺序',
|
||||
component: 'InputNumber',
|
||||
componentProps: {
|
||||
style: { width: '100%' },
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'note',
|
||||
label: '备注',
|
||||
component: 'Input',
|
||||
},
|
||||
// {
|
||||
// field: 'code',
|
||||
// label: '编码',
|
||||
// component: 'Input',
|
||||
// },
|
||||
// {
|
||||
// field: 'sort',
|
||||
// label: '显示顺序',
|
||||
// component: 'InputNumber',
|
||||
// componentProps: {
|
||||
// style: { width: '100%' },
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// field: 'note',
|
||||
// label: '备注',
|
||||
// component: 'Input',
|
||||
// },
|
||||
];
|
||||
|
||||
export const columns: BasicColumn[] = [
|
||||
@ -165,7 +165,7 @@ export const formProps: FormProps = {
|
||||
label: '编码',
|
||||
type: 'input',
|
||||
component: 'Input',
|
||||
colProps: { span: 24 },
|
||||
colProps: { span: 8 },
|
||||
defaultValue: '',
|
||||
componentProps: {
|
||||
width: '100%',
|
||||
@ -199,7 +199,7 @@ export const formProps: FormProps = {
|
||||
label: '名称',
|
||||
type: 'input',
|
||||
component: 'Input',
|
||||
colProps: { span: 24 },
|
||||
colProps: { span: 8 },
|
||||
defaultValue: '',
|
||||
componentProps: {
|
||||
width: '100%',
|
||||
@ -233,7 +233,7 @@ export const formProps: FormProps = {
|
||||
label: '显示顺序',
|
||||
type: 'number',
|
||||
component: 'InputNumber',
|
||||
colProps: { span: 24 },
|
||||
colProps: { span: 8 },
|
||||
defaultValue: null,
|
||||
componentProps: {
|
||||
labelWidthMode: 'fix',
|
||||
@ -263,7 +263,7 @@ export const formProps: FormProps = {
|
||||
label: '有效标志',
|
||||
type: 'select',
|
||||
component: 'XjrSelect',
|
||||
colProps: { span: 24 },
|
||||
colProps: { span: 8 },
|
||||
componentProps: {
|
||||
width: '100%',
|
||||
span: '',
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
import { useFormConfig } from '/@/hooks/web/useFormConfig';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { setIndexFlowStatus } from '/@/utils/flow/index'
|
||||
import { getLngBFee } from '/@/api/mdm/ExpenseName';
|
||||
import { getLngBFee, enableLngBFee, disableLngBFee } from '/@/api/mdm/ExpenseName';
|
||||
import { useModal } from '/@/components/Modal';
|
||||
import ExpenseNameModal from './components/ExpenseNameModal.vue';
|
||||
import {formConfig, searchFormSchema, columns } from './components/config';
|
||||
@ -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}]);
|
||||
//展示在列表内的按钮
|
||||
@ -98,6 +99,7 @@
|
||||
schemas: customSearchFormSchema,
|
||||
fieldMapToTime: [],
|
||||
showResetButton: false,
|
||||
showResetButton: true,
|
||||
},
|
||||
beforeFetch: (params) => {
|
||||
return { ...params, FormId: formIdComputedRef.value, PK: 'id' };
|
||||
@ -116,13 +118,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;
|
||||
|
||||
@ -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: '',
|
||||
|
||||
@ -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';
|
||||
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user