Commit 730f6cac by 张珈源

feat(ckgl): 更新库存盘点组件数据源配置

- 将选择框数据源从字典类型改为API类型
- 配置新的API接口getStoreLocation获取库位信息
- 更新SQL查询脚本获取库位表有效数据
- 移除按钮配置中的modal空属性
- 添加defaultSelect空配置到下拉选择框
- 统一label字段为label,value字段为value
parent 8eedcd03
...@@ -8,9 +8,20 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -8,9 +8,20 @@ export const searchFormSchema: FormSchema[] = [
defaultValue: undefined, defaultValue: undefined,
component: 'XjrSelect', component: 'XjrSelect',
componentProps: { componentProps: {
datasourceType: 'dic', datasourceType: 'api',
params: { itemId: '2010539474382962690' }, apiConfig: {
labelField: 'name', path: '/getStoreLocation',
method: 'GET',
apiId: 'd55f1866db284ecd8b038a3956b9c5b7',
apiParams: [
{ key: '1', title: 'Query Params', tableInfo: [] },
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
'var sql="select id as value,name as label from mes_storage_location where delete_mark = 0 ";\r\nreturn db.select(sql);',
},
labelField: 'label',
valueField: 'value', valueField: 'value',
mode: 'multiple', mode: 'multiple',
showSearch: true, showSearch: true,
...@@ -238,7 +249,6 @@ export const formProps: FormProps = { ...@@ -238,7 +249,6 @@ export const formProps: FormProps = {
isShow: true, isShow: true,
margin: '10px', margin: '10px',
events: { click: "formActionType.showMessage('开始盘点')" }, events: { click: "formActionType.showMessage('开始盘点')" },
modal: null,
type: 1, type: 1,
event: [], event: [],
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
...@@ -282,7 +292,6 @@ export const formProps: FormProps = { ...@@ -282,7 +292,6 @@ export const formProps: FormProps = {
isShow: true, isShow: true,
margin: '10px', margin: '10px',
events: { click: "formActionType.showMessage('确认盘点')" }, events: { click: "formActionType.showMessage('确认盘点')" },
modal: null,
type: 1, type: 1,
event: [], event: [],
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
...@@ -326,7 +335,6 @@ export const formProps: FormProps = { ...@@ -326,7 +335,6 @@ export const formProps: FormProps = {
isShow: true, isShow: true,
margin: '10px', margin: '10px',
events: { click: "formActionType.showMessage('取消盘点')" }, events: { click: "formActionType.showMessage('取消盘点')" },
modal: null,
type: 1, type: 1,
event: [], event: [],
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
...@@ -383,14 +391,21 @@ export const formProps: FormProps = { ...@@ -383,14 +391,21 @@ export const formProps: FormProps = {
{ key: 2, label: 'Option 2', value: 'Option 2' }, { key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' }, { key: 3, label: 'Option 3', value: 'Option 3' },
], ],
datasourceType: 'dic', datasourceType: 'api',
params: { itemId: '2010539474382962690' }, params: null,
labelField: 'name', labelField: 'label',
valueField: 'value', valueField: 'value',
apiConfig: { apiConfig: {
path: 'CodeGeneration/selection', path: '/getStoreLocation',
method: 'GET', method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7', apiId: 'd55f1866db284ecd8b038a3956b9c5b7',
apiParams: [
{ key: '1', title: 'Query Params', tableInfo: [] },
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
'var sql="select id as value,name as label from mes_storage_location where delete_mark = 0 ";\r\nreturn db.select(sql);',
}, },
dicOptions: [], dicOptions: [],
required: true, required: true,
...@@ -399,6 +414,7 @@ export const formProps: FormProps = { ...@@ -399,6 +414,7 @@ export const formProps: FormProps = {
isShow: true, isShow: true,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
itemId: '2010539474382962690', itemId: '2010539474382962690',
defaultSelect: null,
style: { width: '100%' }, style: { width: '100%' },
}, },
}, },
...@@ -714,14 +730,21 @@ export const formProps: FormProps = { ...@@ -714,14 +730,21 @@ export const formProps: FormProps = {
{ key: 2, label: 'Option 2', value: 'Option 2' }, { key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' }, { key: 3, label: 'Option 3', value: 'Option 3' },
], ],
datasourceType: 'dic', datasourceType: 'api',
params: { itemId: '2010539474382962690' }, params: null,
labelField: 'name', labelField: 'label',
valueField: 'value', valueField: 'value',
apiConfig: { apiConfig: {
path: 'CodeGeneration/selection', path: '/getStoreLocation',
method: 'GET', method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7', apiId: 'd55f1866db284ecd8b038a3956b9c5b7',
apiParams: [
{ key: '1', title: 'Query Params', tableInfo: [] },
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
'var sql="select id as value,name as label from mes_storage_location where delete_mark = 0 ";\r\nreturn db.select(sql);',
}, },
dicOptions: [], dicOptions: [],
required: false, required: false,
...@@ -730,6 +753,7 @@ export const formProps: FormProps = { ...@@ -730,6 +753,7 @@ export const formProps: FormProps = {
isShow: true, isShow: true,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
itemId: '2010539474382962690', itemId: '2010539474382962690',
defaultSelect: null,
listStyle: "return 'border: 0'", listStyle: "return 'border: 0'",
}, },
}, },
...@@ -843,7 +867,6 @@ export const formButtons = [ ...@@ -843,7 +867,6 @@ export const formButtons = [
isShow: true, isShow: true,
index: 2, index: 2,
type: 1, type: 1,
modal: null,
}, },
{ {
key: 'cancel', key: 'cancel',
...@@ -854,7 +877,6 @@ export const formButtons = [ ...@@ -854,7 +877,6 @@ export const formButtons = [
isShow: true, isShow: true,
index: 1, index: 1,
type: 1, type: 1,
modal: null,
}, },
{ {
key: 'reset', key: 'reset',
...@@ -865,6 +887,5 @@ export const formButtons = [ ...@@ -865,6 +887,5 @@ export const formButtons = [
isShow: true, isShow: true,
index: 0, index: 0,
type: 1, type: 1,
modal: null,
}, },
]; ];
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