Commit aeff5ba99f25fd48a43d1ec6e2295e272f36e42b
1 parent
ebed9690
feat: 新增业务员支持审核
Showing
3 changed files
with
67 additions
and
34 deletions
src/views/project/approve/FieldPanel.vue
... | ... | @@ -24,35 +24,38 @@ |
24 | 24 | </BasicTable> |
25 | 25 | <BasicDrawer |
26 | 26 | width="500" |
27 | - :showFooter="!isApproved && role === ROLE.ADMIN" | |
27 | + :showFooter="!isApproved && (role === ROLE.ADMIN || role === ROLE.BUSINESS)" | |
28 | 28 | @register="registerDrawer" |
29 | 29 | title="申请信息" |
30 | 30 | okText="通过" |
31 | 31 | @ok="handleTrue" |
32 | 32 | > |
33 | 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 | 59 | <template #appendFooter> |
57 | 60 | <a-button @click="handleFalse"> 不通过</a-button> |
58 | 61 | </template> |
... | ... | @@ -100,6 +103,7 @@ |
100 | 103 | const currentKey = ref('1'); |
101 | 104 | const [registerDrawer, { openDrawer, closeDrawer }] = useDrawer(); |
102 | 105 | const fieldInfos = ref({ |
106 | + auditRoleCodes: 'business_user', | |
103 | 107 | baseFields: [], |
104 | 108 | reportFields: [], |
105 | 109 | profitFields: [], |
... | ... | @@ -116,6 +120,15 @@ |
116 | 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 | 132 | title: '内部编号', |
120 | 133 | dataIndex: 'innerNo', |
121 | 134 | width: 150, |
... | ... | @@ -124,6 +137,7 @@ |
124 | 137 | return record?.orderBaseInfo?.innerNo; |
125 | 138 | }, |
126 | 139 | }, |
140 | + | |
127 | 141 | { |
128 | 142 | title: '图片', |
129 | 143 | dataIndex: 'picUrl', |
... | ... | @@ -146,14 +160,13 @@ |
146 | 160 | { title: '拒绝原因', dataIndex: 'refuseRemark', width: 250 }, |
147 | 161 | ]); |
148 | 162 | } |
149 | - | |
150 | 163 | const [registerTable, { reload }] = useTable({ |
151 | 164 | scroll: false, |
152 | 165 | api: props.isApproved ? getApprovedListApi : getWaitListApi, |
153 | 166 | searchInfo: { type: 0 }, |
154 | 167 | columns, |
155 | 168 | useSearchForm: true, |
156 | - formConfig: getFormConfig(), | |
169 | + formConfig: getFormConfig(true), | |
157 | 170 | rowKey: 'id', |
158 | 171 | actionColumn: { |
159 | 172 | width: 160, |
... | ... | @@ -189,6 +202,7 @@ |
189 | 202 | |
190 | 203 | async function handleDetail(data) { |
191 | 204 | fieldInfos.value = { |
205 | + auditRoleCodes: data.auditRoleCodes, | |
192 | 206 | baseFields: [], |
193 | 207 | reportFields: [], |
194 | 208 | profitFields: [], | ... | ... |
src/views/project/approve/data.ts
1 | 1 | import { ref } from 'vue'; |
2 | 2 | import { queryNoOptions } from '../../../api/project/order'; |
3 | 3 | |
4 | -export function getFormConfig() { | |
4 | +export function getFormConfig(showFieldConfig: boolean) { | |
5 | 5 | const innerNoOptions = ref([]); |
6 | 6 | return { |
7 | 7 | labelWidth: 100, |
... | ... | @@ -11,7 +11,7 @@ export function getFormConfig() { |
11 | 11 | label: `内部编号`, |
12 | 12 | component: 'Select', |
13 | 13 | colProps: { |
14 | - span: 8, | |
14 | + span: 6, | |
15 | 15 | }, |
16 | 16 | labelWidth: 70, |
17 | 17 | componentProps: { |
... | ... | @@ -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 | 965 | }, |
966 | 966 | { |
967 | 967 | field: 'aitexTestFinishResult', |
968 | - component: 'Select', | |
968 | + component: 'Input', | |
969 | 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 | 980 | field: 'sgsTestSendTime', |
... | ... | @@ -1285,7 +1285,7 @@ export function getFormConfig(businessUsers: any[]): Partial<FormProps> { |
1285 | 1285 | field: `createStartTime`, |
1286 | 1286 | label: `生成开始时间`, |
1287 | 1287 | component: 'DatePicker', |
1288 | - widhth: '100%', | |
1288 | + width: '100%', | |
1289 | 1289 | style: { width: '100%' }, |
1290 | 1290 | colProps: { |
1291 | 1291 | span: 6, | ... | ... |