Commit ba60ea58 by 张恒

refactor(ckwz): 优化位置类型配置的数据源实现

- 将静态数据源替换为字典数据源,使用 itemId 2008349355210772481
- 统一数据源配置格式,移除重复的静态选项定义
- 调整标签字段从 label 到 name,保持字段映射一致性
- 移除显示名称列的配置,简化表格结构
- 在API配置中添加 itemId 参数,确保数据获取正确性
parent 52363237
......@@ -40,21 +40,14 @@ export const searchFormSchema: FormSchema[] = [
defaultValue: undefined,
component: 'XjrSelect',
componentProps: {
datasourceType: 'staticData',
staticOptions: [
{ key: 1, label: '内部位置', value: '出库内部位置' },
{ key: 2, label: '虚拟位置', value: '虚拟位置' },
{ key: 3, label: '内部调拨客户位置', value: '内部调拨' },
{ key: 4, label: '供应商位置', value: '供应商位置' },
{ key: 5, label: '生产位置', value: '生产位置' },
{ key: 6, label: '中转位置', value: '中转位置' },
],
labelField: 'label',
datasourceType: 'dic',
params: { itemId: '2008349355210772481' },
labelField: 'name',
valueField: 'value',
mode: 'multiple',
mode: 'default',
showSearch: true,
getPopupContainer: () => document.body,
},
}
},
{
field: 'completeName',
......@@ -103,38 +96,25 @@ export const columns: BasicColumn[] = [
title: '位置类型',
componentType: 'select',
customRender: ({ record }) => {
const staticOptions = [
{ key: 1, label: '内部位置', value: '出库内部位置' },
{ key: 2, label: '虚拟位置', value: '虚拟位置' },
{ key: 3, label: '内部调拨客户位置', value: '内部调拨' },
{ key: 4, label: '供应商位置', value: '供应商位置' },
{ key: 5, label: '生产位置', value: '生产位置' },
{ key: 6, label: '中转位置', value: '中转位置' },
];
return staticOptions.filter((x) => x.value == record.locationType)[0]?.label;
},
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'completeName',
title: '显示名称',
componentType: 'input',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
},
//
// {
// resizable: true,
// dataIndex: 'completeName',
// title: '显示名称',
// componentType: 'input',
//
// fixed: false,
// sorter: true,
//
// styleConfig: undefined,
// listStyle: '',
// },
{
resizable: true,
......@@ -349,10 +329,9 @@ export const formProps: FormProps = {
{ key: 5, label: '生产位置', value: '生产位置' },
{ key: 6, label: '中转位置', value: '中转位置' },
],
defaultSelect: '',
datasourceType: 'staticData',
params: null,
labelField: 'label',
datasourceType: 'dic',
params: { itemId: '2008349355210772481' },
labelField: 'name',
valueField: 'value',
apiConfig: {
path: 'CodeGeneration/selection',
......@@ -365,6 +344,7 @@ export const formProps: FormProps = {
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
itemId: '2008349355210772481',
style: { width: '100%' },
},
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment