|
@@ -1,4 +1,6 @@
|
|
|
import { FormProps, BasicColumn } from '/@/components/Table';
|
|
|
+import { h } from 'vue';
|
|
|
+import { Tag } from 'ant-design-vue';
|
|
|
import { DescItem } from '/@/components/Description/index';
|
|
|
import moment from 'moment';
|
|
|
|
|
@@ -25,6 +27,18 @@ export const columns: BasicColumn[] = [
|
|
|
sorter: true,
|
|
|
},
|
|
|
{
|
|
|
+ title: '状态',
|
|
|
+ dataIndex: 'status',
|
|
|
+ width: 80,
|
|
|
+ customRender: ({ record }) => {
|
|
|
+ const status = record.status;
|
|
|
+ const color = status ? 'green' : 'red';
|
|
|
+ const text = status ? '通过' : '未通过';
|
|
|
+ return h(Tag, { color: color }, () => text);
|
|
|
+ },
|
|
|
+ sorter: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
title: '审批时间',
|
|
|
dataIndex: 'createtime',
|
|
|
width: 150,
|
|
@@ -64,6 +78,29 @@ export function getFormConfig(): Partial<FormProps> {
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
+ field: `status`,
|
|
|
+ label: `状态`,
|
|
|
+ component: 'Select',
|
|
|
+ componentProps: {
|
|
|
+ options: [
|
|
|
+ {
|
|
|
+ label: '通过',
|
|
|
+ value: 1,
|
|
|
+ key: 'status',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '未通过',
|
|
|
+ value: 0,
|
|
|
+ key: 'status',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ colProps: {
|
|
|
+ xl: 12,
|
|
|
+ xxl: 8,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
field: `createtime`,
|
|
|
label: `审批日期`,
|
|
|
component: 'RangePicker',
|
|
@@ -97,6 +134,13 @@ export const schemas: DescItem[] = [
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
+ field: 'status',
|
|
|
+ label: '审批结果',
|
|
|
+ render: (_, data) => {
|
|
|
+ return data.status ? '通过' : '未通过';
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
field: 'reason',
|
|
|
label: '审批信息',
|
|
|
},
|