Commit aeff5ba99f25fd48a43d1ec6e2295e272f36e42b

Authored by sanmu
1 parent ebed9690

feat: 新增业务员支持审核

src/views/project/approve/FieldPanel.vue
@@ -24,35 +24,38 @@ @@ -24,35 +24,38 @@
24 </BasicTable> 24 </BasicTable>
25 <BasicDrawer 25 <BasicDrawer
26 width="500" 26 width="500"
27 - :showFooter="!isApproved && role === ROLE.ADMIN" 27 + :showFooter="!isApproved && (role === ROLE.ADMIN || role === ROLE.BUSINESS)"
28 @register="registerDrawer" 28 @register="registerDrawer"
29 title="申请信息" 29 title="申请信息"
30 okText="通过" 30 okText="通过"
31 @ok="handleTrue" 31 @ok="handleTrue"
32 > 32 >
33 <BaseInfo :baseInfos="baseInfos" /> 33 <BaseInfo :baseInfos="baseInfos" />
34 - <h2 className="mt-8">基本信息申请字段</h2>  
35 - <div>{{ fieldInfos.baseFields.join(' , ') }}</div>  
36 -  
37 - <h2 className="mt-8">利润分析表申请字段</h2>  
38 - <div>  
39 - {{ fieldInfos.profitFields.join(' , ') }}  
40 - </div> 34 + <template v-if="fieldInfos.auditRoleCodes.includes('business_user')">
  35 + <h2 className="mt-8">基本信息申请字段</h2>
  36 + <div>{{ fieldInfos.baseFields.join(' , ') }}</div>
  37 + </template>
  38 + <template v-if="!fieldInfos.auditRoleCodes.includes('business_user')">
  39 + <h2 className="mt-8">利润分析表申请字段</h2>
  40 + <div>
  41 + {{ fieldInfos.profitFields.join(' , ') }}
  42 + </div>
41 43
42 - <h2 className="mt-8">项目报告书申请字段</h2>  
43 - <div>  
44 - <span>{{ fieldInfos.reportFields.join(' , ') }}</span>  
45 - </div> 44 + <h2 className="mt-8">项目报告书申请字段</h2>
  45 + <div>
  46 + <span>{{ fieldInfos.reportFields.join(' , ') }}</span>
  47 + </div>
46 48
47 - <h2 className="mt-8">跟单信息申请字段</h2>  
48 - <div>  
49 - <span>{{ fieldInfos.trackStageFields.join(' , ') }}</span>  
50 - </div> 49 + <h2 className="mt-8">跟单信息申请字段</h2>
  50 + <div>
  51 + <span>{{ fieldInfos.trackStageFields.join(' , ') }}</span>
  52 + </div>
51 53
52 - <h2 className="mt-8">质量检测申请字段</h2>  
53 - <div>  
54 - <span>{{ fieldInfos.inspectionStageFields.join(' , ') }}</span>  
55 - </div> 54 + <h2 className="mt-8">质量检测申请字段</h2>
  55 + <div>
  56 + <span>{{ fieldInfos.inspectionStageFields.join(' , ') }}</span>
  57 + </div>
  58 + </template>
56 <template #appendFooter> 59 <template #appendFooter>
57 <a-button @click="handleFalse"> 不通过</a-button> 60 <a-button @click="handleFalse"> 不通过</a-button>
58 </template> 61 </template>
@@ -100,6 +103,7 @@ @@ -100,6 +103,7 @@
100 const currentKey = ref('1'); 103 const currentKey = ref('1');
101 const [registerDrawer, { openDrawer, closeDrawer }] = useDrawer(); 104 const [registerDrawer, { openDrawer, closeDrawer }] = useDrawer();
102 const fieldInfos = ref({ 105 const fieldInfos = ref({
  106 + auditRoleCodes: 'business_user',
103 baseFields: [], 107 baseFields: [],
104 reportFields: [], 108 reportFields: [],
105 profitFields: [], 109 profitFields: [],
@@ -116,6 +120,15 @@ @@ -116,6 +120,15 @@
116 width: 150, 120 width: 150,
117 }, 121 },
118 { 122 {
  123 + title: '审核字段类型',
  124 + dataIndex: 'auditRoleCodes',
  125 + width: 150,
  126 + customRender: (column) => {
  127 + const { record } = column || {};
  128 + return record?.auditRoleCodes.includes('business_user') ? '基本信息' : '其他模块';
  129 + },
  130 + },
  131 + {
119 title: '内部编号', 132 title: '内部编号',
120 dataIndex: 'innerNo', 133 dataIndex: 'innerNo',
121 width: 150, 134 width: 150,
@@ -124,6 +137,7 @@ @@ -124,6 +137,7 @@
124 return record?.orderBaseInfo?.innerNo; 137 return record?.orderBaseInfo?.innerNo;
125 }, 138 },
126 }, 139 },
  140 +
127 { 141 {
128 title: '图片', 142 title: '图片',
129 dataIndex: 'picUrl', 143 dataIndex: 'picUrl',
@@ -146,14 +160,13 @@ @@ -146,14 +160,13 @@
146 { title: '拒绝原因', dataIndex: 'refuseRemark', width: 250 }, 160 { title: '拒绝原因', dataIndex: 'refuseRemark', width: 250 },
147 ]); 161 ]);
148 } 162 }
149 -  
150 const [registerTable, { reload }] = useTable({ 163 const [registerTable, { reload }] = useTable({
151 scroll: false, 164 scroll: false,
152 api: props.isApproved ? getApprovedListApi : getWaitListApi, 165 api: props.isApproved ? getApprovedListApi : getWaitListApi,
153 searchInfo: { type: 0 }, 166 searchInfo: { type: 0 },
154 columns, 167 columns,
155 useSearchForm: true, 168 useSearchForm: true,
156 - formConfig: getFormConfig(), 169 + formConfig: getFormConfig(true),
157 rowKey: 'id', 170 rowKey: 'id',
158 actionColumn: { 171 actionColumn: {
159 width: 160, 172 width: 160,
@@ -189,6 +202,7 @@ @@ -189,6 +202,7 @@
189 202
190 async function handleDetail(data) { 203 async function handleDetail(data) {
191 fieldInfos.value = { 204 fieldInfos.value = {
  205 + auditRoleCodes: data.auditRoleCodes,
192 baseFields: [], 206 baseFields: [],
193 reportFields: [], 207 reportFields: [],
194 profitFields: [], 208 profitFields: [],
src/views/project/approve/data.ts
1 import { ref } from 'vue'; 1 import { ref } from 'vue';
2 import { queryNoOptions } from '../../../api/project/order'; 2 import { queryNoOptions } from '../../../api/project/order';
3 3
4 -export function getFormConfig() { 4 +export function getFormConfig(showFieldConfig: boolean) {
5 const innerNoOptions = ref([]); 5 const innerNoOptions = ref([]);
6 return { 6 return {
7 labelWidth: 100, 7 labelWidth: 100,
@@ -11,7 +11,7 @@ export function getFormConfig() { @@ -11,7 +11,7 @@ export function getFormConfig() {
11 label: `内部编号`, 11 label: `内部编号`,
12 component: 'Select', 12 component: 'Select',
13 colProps: { 13 colProps: {
14 - span: 8, 14 + span: 6,
15 }, 15 },
16 labelWidth: 70, 16 labelWidth: 70,
17 componentProps: { 17 componentProps: {
@@ -23,6 +23,25 @@ export function getFormConfig() { @@ -23,6 +23,25 @@ export function getFormConfig() {
23 }, 23 },
24 }, 24 },
25 }, 25 },
  26 + ...(showFieldConfig
  27 + ? [
  28 + {
  29 + field: `auditType`,
  30 + label: `审核字段类型`,
  31 + component: 'Select',
  32 + colProps: {
  33 + span: 6,
  34 + },
  35 + labelWidth: 140,
  36 + componentProps: {
  37 + options: [
  38 + { label: '基本信息字段', value: 1 },
  39 + { label: '其他信息字段', value: 0 },
  40 + ],
  41 + },
  42 + },
  43 + ]
  44 + : []),
26 ], 45 ],
27 }; 46 };
28 } 47 }
src/views/project/order/tableData.tsx
@@ -965,16 +965,16 @@ export const FIELDS_TRACK_STAGE_INFO = [ @@ -965,16 +965,16 @@ export const FIELDS_TRACK_STAGE_INFO = [
965 }, 965 },
966 { 966 {
967 field: 'aitexTestFinishResult', 967 field: 'aitexTestFinishResult',
968 - component: 'Select', 968 + component: 'Input',
969 label: 'Aitex测试结果', 969 label: 'Aitex测试结果',
970 - componentProps: {  
971 - options: [  
972 - {  
973 - label: 'ok',  
974 - value: 'ok',  
975 - },  
976 - ],  
977 - }, 970 + // componentProps: {
  971 + // options: [
  972 + // {
  973 + // label: 'ok',
  974 + // value: 'ok',
  975 + // },
  976 + // ],
  977 + // },
978 }, 978 },
979 { 979 {
980 field: 'sgsTestSendTime', 980 field: 'sgsTestSendTime',
@@ -1285,7 +1285,7 @@ export function getFormConfig(businessUsers: any[]): Partial&lt;FormProps&gt; { @@ -1285,7 +1285,7 @@ export function getFormConfig(businessUsers: any[]): Partial&lt;FormProps&gt; {
1285 field: `createStartTime`, 1285 field: `createStartTime`,
1286 label: `生成开始时间`, 1286 label: `生成开始时间`,
1287 component: 'DatePicker', 1287 component: 'DatePicker',
1288 - widhth: '100%', 1288 + width: '100%',
1289 style: { width: '100%' }, 1289 style: { width: '100%' },
1290 colProps: { 1290 colProps: {
1291 span: 6, 1291 span: 6,