Commit c59446331f5b30e105f81a1cc2befa0277bf91e1

Authored by sanmu
1 parent edb42970

feat: 新增客户编码会触发前缀

src/views/project/order/FormDetail/BaseFormPanel.vue
... ... @@ -97,6 +97,13 @@
97 97 ...(item.component === 'Select' && { showSearch: true }),
98 98 ...(item.component === 'Select' && { options: options[item.field] }),
99 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 108 colProps: {
102 109 span: 24,
... ...
src/views/project/order/index.vue
... ... @@ -55,6 +55,16 @@
55 55 label: '历史记录',
56 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 286 reload();
277 287 };
278 288  
  289 + // function handleDelete(id: string) {}
  290 +
279 291 return {
280 292 user,
281 293 SELECT_FIELD_COLUMNS,
... ... @@ -306,6 +318,7 @@
306 318 handleFormSuccess,
307 319 handleRateModal,
308 320 openExportModal,
  321 + // handleDelete,
309 322 role,
310 323 ROLE,
311 324 };
... ...
src/views/project/order/tableData.tsx
... ... @@ -10,10 +10,10 @@ import { formatToDate } from '/@/utils/dateUtil';
10 10  
11 11 // 可选择的列
12 12 export const SELECT_FIELD_COLUMNS = [
13   - 'projectNo',
  13 + // 'projectNo',
14 14 'customerCode',
15 15 'productionDepartment',
16   - 'innerNo',
  16 + // 'innerNo',
17 17 'poColor',
18 18 'cnColor',
19 19 'productStyle',
... ... @@ -624,7 +624,7 @@ export const FIELDS_BASE_INFO = [
624 624 },
625 625 {
626 626 field: 'projectNo',
627   - component: 'Select',
  627 + component: 'Input',
628 628 labelWidth: 150,
629 629 label: '项目号',
630 630 rules: [{ required: true }],
... ... @@ -639,7 +639,7 @@ export const FIELDS_BASE_INFO = [
639 639  
640 640 {
641 641 field: 'innerNo',
642   - component: 'Select',
  642 + component: 'Input',
643 643 labelWidth: 150,
644 644 label: '内部编号',
645 645 rules: [{ required: true }],
... ... @@ -1224,6 +1224,7 @@ export function getFormConfig(): Partial<FormProps> {
1224 1224  
1225 1225 componentProps: {
1226 1226 options: customerCode,
  1227 + showSearch: true,
1227 1228 },
1228 1229 },
1229 1230 {
... ... @@ -1237,6 +1238,23 @@ export function getFormConfig(): Partial<FormProps> {
1237 1238  
1238 1239 componentProps: {
1239 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 1268  
1251 1269 componentProps: {
1252 1270 options: productionDepartment,
  1271 + showSearch: true,
1253 1272 },
1254 1273 },
1255 1274 {
... ... @@ -1321,6 +1340,7 @@ export function getFormConfig(): Partial<FormProps> {
1321 1340  
1322 1341 componentProps: {
1323 1342 options: ideaSource,
  1343 + showSearch: true,
1324 1344 },
1325 1345 },
1326 1346 {
... ... @@ -1333,6 +1353,7 @@ export function getFormConfig(): Partial<FormProps> {
1333 1353 labelWidth: 150,
1334 1354 componentProps: {
1335 1355 options: manualPreform,
  1356 + showSearch: true,
1336 1357 },
1337 1358 },
1338 1359 {
... ... @@ -1345,6 +1366,7 @@ export function getFormConfig(): Partial<FormProps> {
1345 1366 labelWidth: 150,
1346 1367 componentProps: {
1347 1368 options: manualPreform,
  1369 + showSearch: true,
1348 1370 },
1349 1371 },
1350 1372 {
... ... @@ -1398,6 +1420,7 @@ export function getFormConfig(): Partial<FormProps> {
1398 1420  
1399 1421 componentProps: {
1400 1422 options: midCheckResult,
  1423 + showSearch: true,
1401 1424 },
1402 1425 },
1403 1426 {
... ... @@ -1410,6 +1433,7 @@ export function getFormConfig(): Partial<FormProps> {
1410 1433 labelWidth: 150,
1411 1434  
1412 1435 componentProps: {
  1436 + showSearch: true,
1413 1437 options: endCheckResult,
1414 1438 },
1415 1439 },
... ...