Commit c59446331f5b30e105f81a1cc2befa0277bf91e1
1 parent
edb42970
feat: 新增客户编码会触发前缀
Showing
3 changed files
with
48 additions
and
4 deletions
src/views/project/order/FormDetail/BaseFormPanel.vue
@@ -97,6 +97,13 @@ | @@ -97,6 +97,13 @@ | ||
97 | ...(item.component === 'Select' && { showSearch: true }), | 97 | ...(item.component === 'Select' && { showSearch: true }), |
98 | ...(item.component === 'Select' && { options: options[item.field] }), | 98 | ...(item.component === 'Select' && { options: options[item.field] }), |
99 | disabled: getBaseDisable(item.field, get(fields.value, `${item.field}`), props.id), | 99 | disabled: getBaseDisable(item.field, get(fields.value, `${item.field}`), props.id), |
100 | + onChange: (val) => { | ||
101 | + if (item.field === 'customerCode') { | ||
102 | + if (!props.id) { | ||
103 | + setFieldsValue({ projectNo: val + '-', innerNo: val + '-' }); | ||
104 | + } | ||
105 | + } | ||
106 | + }, | ||
100 | }, | 107 | }, |
101 | colProps: { | 108 | colProps: { |
102 | span: 24, | 109 | span: 24, |
src/views/project/order/index.vue
@@ -55,6 +55,16 @@ | @@ -55,6 +55,16 @@ | ||
55 | label: '历史记录', | 55 | label: '历史记录', |
56 | onClick: handleHistory.bind(null, record), | 56 | onClick: handleHistory.bind(null, record), |
57 | }, | 57 | }, |
58 | + // { | ||
59 | + // ...(role === ROLE.ADMIN && { | ||
60 | + // label: '删除', | ||
61 | + // popConfirm: { | ||
62 | + // title: '是否确认删除', | ||
63 | + // placement: 'left', | ||
64 | + // confirm: handleDelete.bind(null, record?.id), | ||
65 | + // }, | ||
66 | + // }), | ||
67 | + // }, | ||
58 | ] | 68 | ] |
59 | : [] | 69 | : [] |
60 | " | 70 | " |
@@ -276,6 +286,8 @@ | @@ -276,6 +286,8 @@ | ||
276 | reload(); | 286 | reload(); |
277 | }; | 287 | }; |
278 | 288 | ||
289 | + // function handleDelete(id: string) {} | ||
290 | + | ||
279 | return { | 291 | return { |
280 | user, | 292 | user, |
281 | SELECT_FIELD_COLUMNS, | 293 | SELECT_FIELD_COLUMNS, |
@@ -306,6 +318,7 @@ | @@ -306,6 +318,7 @@ | ||
306 | handleFormSuccess, | 318 | handleFormSuccess, |
307 | handleRateModal, | 319 | handleRateModal, |
308 | openExportModal, | 320 | openExportModal, |
321 | + // handleDelete, | ||
309 | role, | 322 | role, |
310 | ROLE, | 323 | ROLE, |
311 | }; | 324 | }; |
src/views/project/order/tableData.tsx
@@ -10,10 +10,10 @@ import { formatToDate } from '/@/utils/dateUtil'; | @@ -10,10 +10,10 @@ import { formatToDate } from '/@/utils/dateUtil'; | ||
10 | 10 | ||
11 | // 可选择的列 | 11 | // 可选择的列 |
12 | export const SELECT_FIELD_COLUMNS = [ | 12 | export const SELECT_FIELD_COLUMNS = [ |
13 | - 'projectNo', | 13 | + // 'projectNo', |
14 | 'customerCode', | 14 | 'customerCode', |
15 | 'productionDepartment', | 15 | 'productionDepartment', |
16 | - 'innerNo', | 16 | + // 'innerNo', |
17 | 'poColor', | 17 | 'poColor', |
18 | 'cnColor', | 18 | 'cnColor', |
19 | 'productStyle', | 19 | 'productStyle', |
@@ -624,7 +624,7 @@ export const FIELDS_BASE_INFO = [ | @@ -624,7 +624,7 @@ export const FIELDS_BASE_INFO = [ | ||
624 | }, | 624 | }, |
625 | { | 625 | { |
626 | field: 'projectNo', | 626 | field: 'projectNo', |
627 | - component: 'Select', | 627 | + component: 'Input', |
628 | labelWidth: 150, | 628 | labelWidth: 150, |
629 | label: '项目号', | 629 | label: '项目号', |
630 | rules: [{ required: true }], | 630 | rules: [{ required: true }], |
@@ -639,7 +639,7 @@ export const FIELDS_BASE_INFO = [ | @@ -639,7 +639,7 @@ export const FIELDS_BASE_INFO = [ | ||
639 | 639 | ||
640 | { | 640 | { |
641 | field: 'innerNo', | 641 | field: 'innerNo', |
642 | - component: 'Select', | 642 | + component: 'Input', |
643 | labelWidth: 150, | 643 | labelWidth: 150, |
644 | label: '内部编号', | 644 | label: '内部编号', |
645 | rules: [{ required: true }], | 645 | rules: [{ required: true }], |
@@ -1224,6 +1224,7 @@ export function getFormConfig(): Partial<FormProps> { | @@ -1224,6 +1224,7 @@ export function getFormConfig(): Partial<FormProps> { | ||
1224 | 1224 | ||
1225 | componentProps: { | 1225 | componentProps: { |
1226 | options: customerCode, | 1226 | options: customerCode, |
1227 | + showSearch: true, | ||
1227 | }, | 1228 | }, |
1228 | }, | 1229 | }, |
1229 | { | 1230 | { |
@@ -1237,6 +1238,23 @@ export function getFormConfig(): Partial<FormProps> { | @@ -1237,6 +1238,23 @@ export function getFormConfig(): Partial<FormProps> { | ||
1237 | 1238 | ||
1238 | componentProps: { | 1239 | componentProps: { |
1239 | options: projectNo, | 1240 | options: projectNo, |
1241 | + showSearch: true, | ||
1242 | + // mode: 'multiple', | ||
1243 | + }, | ||
1244 | + }, | ||
1245 | + { | ||
1246 | + field: `innerNo`, | ||
1247 | + label: `内部编号`, | ||
1248 | + component: 'Select', | ||
1249 | + colProps: { | ||
1250 | + span: 6, | ||
1251 | + }, | ||
1252 | + labelWidth: 150, | ||
1253 | + | ||
1254 | + componentProps: { | ||
1255 | + options: innerNo, | ||
1256 | + showSearch: true, | ||
1257 | + // mode: 'multiple', | ||
1240 | }, | 1258 | }, |
1241 | }, | 1259 | }, |
1242 | { | 1260 | { |
@@ -1250,6 +1268,7 @@ export function getFormConfig(): Partial<FormProps> { | @@ -1250,6 +1268,7 @@ export function getFormConfig(): Partial<FormProps> { | ||
1250 | 1268 | ||
1251 | componentProps: { | 1269 | componentProps: { |
1252 | options: productionDepartment, | 1270 | options: productionDepartment, |
1271 | + showSearch: true, | ||
1253 | }, | 1272 | }, |
1254 | }, | 1273 | }, |
1255 | { | 1274 | { |
@@ -1321,6 +1340,7 @@ export function getFormConfig(): Partial<FormProps> { | @@ -1321,6 +1340,7 @@ export function getFormConfig(): Partial<FormProps> { | ||
1321 | 1340 | ||
1322 | componentProps: { | 1341 | componentProps: { |
1323 | options: ideaSource, | 1342 | options: ideaSource, |
1343 | + showSearch: true, | ||
1324 | }, | 1344 | }, |
1325 | }, | 1345 | }, |
1326 | { | 1346 | { |
@@ -1333,6 +1353,7 @@ export function getFormConfig(): Partial<FormProps> { | @@ -1333,6 +1353,7 @@ export function getFormConfig(): Partial<FormProps> { | ||
1333 | labelWidth: 150, | 1353 | labelWidth: 150, |
1334 | componentProps: { | 1354 | componentProps: { |
1335 | options: manualPreform, | 1355 | options: manualPreform, |
1356 | + showSearch: true, | ||
1336 | }, | 1357 | }, |
1337 | }, | 1358 | }, |
1338 | { | 1359 | { |
@@ -1345,6 +1366,7 @@ export function getFormConfig(): Partial<FormProps> { | @@ -1345,6 +1366,7 @@ export function getFormConfig(): Partial<FormProps> { | ||
1345 | labelWidth: 150, | 1366 | labelWidth: 150, |
1346 | componentProps: { | 1367 | componentProps: { |
1347 | options: manualPreform, | 1368 | options: manualPreform, |
1369 | + showSearch: true, | ||
1348 | }, | 1370 | }, |
1349 | }, | 1371 | }, |
1350 | { | 1372 | { |
@@ -1398,6 +1420,7 @@ export function getFormConfig(): Partial<FormProps> { | @@ -1398,6 +1420,7 @@ export function getFormConfig(): Partial<FormProps> { | ||
1398 | 1420 | ||
1399 | componentProps: { | 1421 | componentProps: { |
1400 | options: midCheckResult, | 1422 | options: midCheckResult, |
1423 | + showSearch: true, | ||
1401 | }, | 1424 | }, |
1402 | }, | 1425 | }, |
1403 | { | 1426 | { |
@@ -1410,6 +1433,7 @@ export function getFormConfig(): Partial<FormProps> { | @@ -1410,6 +1433,7 @@ export function getFormConfig(): Partial<FormProps> { | ||
1410 | labelWidth: 150, | 1433 | labelWidth: 150, |
1411 | 1434 | ||
1412 | componentProps: { | 1435 | componentProps: { |
1436 | + showSearch: true, | ||
1413 | options: endCheckResult, | 1437 | options: endCheckResult, |
1414 | }, | 1438 | }, |
1415 | }, | 1439 | }, |