Commit 19428c62 by 宋春膨

feat(config): 更新多个页面配置实现自动编号和数据源优化

- 将单据编号字段从手动输入改为自动生成编号组件
- 为多个表单的编号字段统一配置auto-code规则
- 更新创建时间字段标签为创建日期并设置默认值
- 优化下拉选择框的数据源配置从静态数据改为动态字典
- 集成设备信息API数据源替换原有静态选项
- 统一配置项的默认选中值和参数传递机制
parent bf6a16ed
......@@ -199,35 +199,24 @@ export const formProps: FormProps = {
span: 8,
list: [
{
key: '8a0b1b090265471babfd8fb5068a3781',
key: 'f5a618c2a6a94e26b4db4b5d6820f342',
field: 'djbh',
label: '单据编号',
type: 'input',
component: 'Input',
type: 'auto-code',
component: 'AutoCodeRule',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 4,
defaultValue: '',
placeholder: '请输入单据编号单据编号',
maxlength: null,
placeholder: '自动生成编号',
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
autoCodeRule: 'BHGPCL',
required: true,
rules: [],
events: {},
listStyle: '',
isSave: false,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
......
......@@ -383,42 +383,32 @@ export const formProps: FormProps = {
span: 8,
list: [
{
key: '90e17393b46b4ecd841ad4083888029d',
key: 'f5a618c2a6a94e26b4db4b5d6820f342',
field: 'bh',
label: '编号',
type: 'input',
component: 'Input',
type: 'auto-code',
component: 'AutoCodeRule',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
defaultValue: '',
placeholder: '',
placeholder: '自动生成编号',
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
autoCodeRule: 'GCZJD',
required: true,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
{
key: 'bcd62d5caf1c4fc3a10b065f6f54cdbe',
key: '47e825566c424771bdb773c64173ea76',
field: 'createDate',
label: '创建时间',
label: '创建日期',
type: 'date',
component: 'DatePicker',
colProps: { span: 24 },
......@@ -427,7 +417,7 @@ export const formProps: FormProps = {
span: 7,
defaultValue: '',
width: '100%',
placeholder: '',
placeholder: '请选择创建日期',
format: 'YYYY-MM-DD HH:mm:ss',
showLabel: true,
allowClear: false,
......@@ -436,7 +426,7 @@ export const formProps: FormProps = {
isShow: true,
rules: [],
events: {},
isGetCurrent: false,
isGetCurrent: true,
tooltipConfig: { visible: false, title: '提示文本' },
searchType: 'time',
style: { width: '100%' },
......@@ -648,9 +638,9 @@ export const formProps: FormProps = {
clearable: false,
disabled: false,
staticOptions: [{ key: 1, label: '成功', value: '成功' }],
defaultSelect: '',
datasourceType: 'staticData',
labelField: 'label',
defaultSelect: null,
datasourceType: 'dic',
labelField: 'name',
valueField: 'value',
apiConfig: {
path: 'CodeGeneration/selection',
......@@ -663,6 +653,8 @@ export const formProps: FormProps = {
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
params: { itemId: '2012036275783090178' },
itemId: '2012036275783090178',
style: { width: '100%' },
},
},
......@@ -683,14 +675,21 @@ export const formProps: FormProps = {
clearable: false,
disabled: false,
staticOptions: [{ key: 1, label: '设备1', value: '设备1' }],
defaultSelect: '',
datasourceType: 'staticData',
labelField: 'label',
defaultSelect: null,
datasourceType: 'api',
labelField: 'name',
valueField: 'value',
apiConfig: {
path: 'CodeGeneration/selection',
path: '/zlgl//zjjcsj/getZjsb',
method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
apiId: 'ae3834298bc54c2fb66e9e9af18765e6',
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_equipment where delete_mark=0';\r\nreturn db.select(sql)",
},
dicOptions: [],
required: false,
......@@ -698,6 +697,8 @@ export const formProps: FormProps = {
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
params: { itemId: '2012036686640332802' },
itemId: '2012036686640332802',
style: { width: '100%' },
},
},
......
......@@ -218,42 +218,32 @@ export const formProps: FormProps = {
span: 8,
list: [
{
key: '90e17393b46b4ecd841ad4083888029d',
key: 'f5a618c2a6a94e26b4db4b5d6820f342',
field: 'bh',
label: '编号',
type: 'input',
component: 'Input',
type: 'auto-code',
component: 'AutoCodeRule',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
defaultValue: '',
placeholder: '',
placeholder: '自动生成编号',
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
autoCodeRule: 'CPRKZJD',
required: true,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
{
key: 'bcd62d5caf1c4fc3a10b065f6f54cdbe',
key: '47e825566c424771bdb773c64173ea76',
field: 'createDate',
label: '创建时间',
label: '创建日期',
type: 'date',
component: 'DatePicker',
colProps: { span: 24 },
......@@ -262,7 +252,7 @@ export const formProps: FormProps = {
span: 7,
defaultValue: '',
width: '100%',
placeholder: '',
placeholder: '请选择创建日期',
format: 'YYYY-MM-DD HH:mm:ss',
showLabel: true,
allowClear: false,
......@@ -271,7 +261,7 @@ export const formProps: FormProps = {
isShow: true,
rules: [],
events: {},
isGetCurrent: false,
isGetCurrent: true,
tooltipConfig: { visible: false, title: '提示文本' },
searchType: 'time',
style: { width: '100%' },
......@@ -482,9 +472,9 @@ export const formProps: FormProps = {
clearable: false,
disabled: false,
staticOptions: [{ key: 1, label: '成功', value: '成功' }],
defaultSelect: '',
datasourceType: 'staticData',
labelField: 'label',
defaultSelect: null,
datasourceType: 'dic',
labelField: 'name',
valueField: 'value',
apiConfig: {
path: 'CodeGeneration/selection',
......@@ -497,6 +487,8 @@ export const formProps: FormProps = {
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
params: { itemId: '2012036275783090178' },
itemId: '2012036275783090178',
style: { width: '100%' },
},
},
......@@ -517,14 +509,21 @@ export const formProps: FormProps = {
clearable: false,
disabled: false,
staticOptions: [{ key: 1, label: '设备1', value: '设备1' }],
defaultSelect: '',
datasourceType: 'staticData',
labelField: 'label',
defaultSelect: null,
datasourceType: 'api',
labelField: 'name',
valueField: 'value',
apiConfig: {
path: 'CodeGeneration/selection',
path: '/zlgl//zjjcsj/getZjsb',
method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
apiId: 'ae3834298bc54c2fb66e9e9af18765e6',
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_equipment where delete_mark=0';\r\nreturn db.select(sql)",
},
dicOptions: [],
required: false,
......@@ -532,6 +531,8 @@ export const formProps: FormProps = {
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
params: { itemId: '2012036686640332802' },
itemId: '2012036686640332802',
style: { width: '100%' },
},
},
......
......@@ -396,42 +396,32 @@ export const formProps: FormProps = {
span: 8,
list: [
{
key: '90e17393b46b4ecd841ad4083888029d',
key: 'f5a618c2a6a94e26b4db4b5d6820f342',
field: 'bh',
label: '编号',
type: 'input',
component: 'Input',
type: 'auto-code',
component: 'AutoCodeRule',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
defaultValue: '',
placeholder: '',
placeholder: '自动生成编号',
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
autoCodeRule: 'FHZJD',
required: true,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
{
key: 'bcd62d5caf1c4fc3a10b065f6f54cdbe',
key: '47e825566c424771bdb773c64173ea76',
field: 'createDate',
label: '创建时间',
label: '创建日期',
type: 'date',
component: 'DatePicker',
colProps: { span: 24 },
......@@ -440,7 +430,7 @@ export const formProps: FormProps = {
span: 7,
defaultValue: '',
width: '100%',
placeholder: '',
placeholder: '请选择创建日期',
format: 'YYYY-MM-DD HH:mm:ss',
showLabel: true,
allowClear: false,
......@@ -449,7 +439,7 @@ export const formProps: FormProps = {
isShow: true,
rules: [],
events: {},
isGetCurrent: false,
isGetCurrent: true,
tooltipConfig: { visible: false, title: '提示文本' },
searchType: 'time',
style: { width: '100%' },
......@@ -660,9 +650,9 @@ export const formProps: FormProps = {
clearable: false,
disabled: false,
staticOptions: [{ key: 1, label: '成功', value: '成功' }],
defaultSelect: '',
datasourceType: 'staticData',
labelField: 'label',
defaultSelect: null,
datasourceType: 'dic',
labelField: 'name',
valueField: 'value',
apiConfig: {
path: 'CodeGeneration/selection',
......@@ -675,6 +665,8 @@ export const formProps: FormProps = {
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
params: { itemId: '2012036275783090178' },
itemId: '2012036275783090178',
style: { width: '100%' },
},
},
......@@ -695,14 +687,21 @@ export const formProps: FormProps = {
clearable: false,
disabled: false,
staticOptions: [{ key: 1, label: '设备1', value: '设备1' }],
defaultSelect: '',
datasourceType: 'staticData',
labelField: 'label',
defaultSelect: null,
datasourceType: 'api',
labelField: 'name',
valueField: 'value',
apiConfig: {
path: 'CodeGeneration/selection',
path: '/zlgl//zjjcsj/getZjsb',
method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
apiId: 'ae3834298bc54c2fb66e9e9af18765e6',
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_equipment where delete_mark=0';\r\nreturn db.select(sql)",
},
dicOptions: [],
required: false,
......@@ -710,6 +709,8 @@ export const formProps: FormProps = {
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
params: { itemId: '2012036686640332802' },
itemId: '2012036686640332802',
style: { width: '100%' },
},
},
......
......@@ -248,42 +248,32 @@ export const formProps: FormProps = {
span: 8,
list: [
{
key: '90e17393b46b4ecd841ad4083888029d',
key: 'f5a618c2a6a94e26b4db4b5d6820f342',
field: 'bh',
label: '编号',
type: 'input',
component: 'Input',
type: 'auto-code',
component: 'AutoCodeRule',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
defaultValue: '',
placeholder: '',
placeholder: '自动生成编号',
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
autoCodeRule: 'LLZJD',
required: true,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
{
key: 'bcd62d5caf1c4fc3a10b065f6f54cdbe',
key: '47e825566c424771bdb773c64173ea76',
field: 'createDate',
label: '创建时间',
label: '创建日期',
type: 'date',
component: 'DatePicker',
colProps: { span: 24 },
......@@ -292,7 +282,7 @@ export const formProps: FormProps = {
span: 7,
defaultValue: '',
width: '100%',
placeholder: '',
placeholder: '请选择创建日期',
format: 'YYYY-MM-DD HH:mm:ss',
showLabel: true,
allowClear: false,
......@@ -301,7 +291,7 @@ export const formProps: FormProps = {
isShow: true,
rules: [],
events: {},
isGetCurrent: false,
isGetCurrent: true,
tooltipConfig: { visible: false, title: '提示文本' },
searchType: 'time',
style: { width: '100%' },
......
......@@ -248,42 +248,32 @@ export const formProps: FormProps = {
span: 8,
list: [
{
key: '90e17393b46b4ecd841ad4083888029d',
key: 'f5a618c2a6a94e26b4db4b5d6820f342',
field: 'bh',
label: '编号',
type: 'input',
component: 'Input',
type: 'auto-code',
component: 'AutoCodeRule',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
defaultValue: '',
placeholder: '',
placeholder: '自动生成编号',
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
rules: [],
events: {},
listStyle: '',
isSave: false,
autoCodeRule: 'QTZJD',
required: true,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
{
key: 'bcd62d5caf1c4fc3a10b065f6f54cdbe',
key: '47e825566c424771bdb773c64173ea76',
field: 'createDate',
label: '创建时间',
label: '创建日期',
type: 'date',
component: 'DatePicker',
colProps: { span: 24 },
......@@ -292,7 +282,7 @@ export const formProps: FormProps = {
span: 7,
defaultValue: '',
width: '100%',
placeholder: '',
placeholder: '请选择创建日期',
format: 'YYYY-MM-DD HH:mm:ss',
showLabel: true,
allowClear: false,
......@@ -301,7 +291,7 @@ export const formProps: FormProps = {
isShow: true,
rules: [],
events: {},
isGetCurrent: false,
isGetCurrent: true,
tooltipConfig: { visible: false, title: '提示文本' },
searchType: 'time',
style: { width: '100%' },
......@@ -512,6 +502,7 @@ export const formProps: FormProps = {
clearable: false,
disabled: false,
staticOptions: [{ key: 1, label: '成功', value: '成功' }],
defaultSelect: null,
datasourceType: 'dic',
labelField: 'name',
valueField: 'value',
......@@ -548,13 +539,21 @@ export const formProps: FormProps = {
clearable: false,
disabled: false,
staticOptions: [{ key: 1, label: '设备1', value: '设备1' }],
datasourceType: 'dic',
defaultSelect: null,
datasourceType: 'api',
labelField: 'name',
valueField: 'value',
apiConfig: {
path: 'CodeGeneration/selection',
path: '/zlgl//zjjcsj/getZjsb',
method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
apiId: 'ae3834298bc54c2fb66e9e9af18765e6',
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_equipment where delete_mark=0';\r\nreturn db.select(sql)",
},
dicOptions: [],
required: false,
......
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