Commit e9942b22 by 王宝涛

refactor(chaiche): 调整车辆信息字段配置和组件映射关系

- 将MesCheliangBgPageParams接口中的cllx字段替换为cphm,并将cphm字段移至cllx位置
- 修改config.ts中车牌号码(cphm)和车辆类型(cllx)字段的配置顺序和数据源设置
- 更新cphm字段的数据源配置,从字典改为API调用方式获取车辆列表
- 调整关联弹窗组件的键值映射,更新车牌号码、车辆类型和车辆重量的组件配置
- 重新映射workflowPermission.ts中字段名称与组件类型的对应关系
- 统一调整表单组件的显示标签和数据绑定字段
parent 1f97b369
...@@ -6,7 +6,7 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel'; ...@@ -6,7 +6,7 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
export interface MesCheliangBgPageParams extends BasicPageParams { export interface MesCheliangBgPageParams extends BasicPageParams {
banzu: string; banzu: string;
cllx: string; cphm: string;
clys: string; clys: string;
...@@ -14,12 +14,12 @@ export interface MesCheliangBgPageParams extends BasicPageParams { ...@@ -14,12 +14,12 @@ export interface MesCheliangBgPageParams extends BasicPageParams {
gzr: string; gzr: string;
cllx: string;
wlzt: string; wlzt: string;
gzxm: string; gzxm: string;
cphm: string;
clppxh: string; clppxh: string;
gzkssj: string; gzkssj: string;
......
...@@ -19,14 +19,65 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -19,14 +19,65 @@ export const searchFormSchema: FormSchema[] = [
}, },
}, },
{ {
field: 'cllx', field: 'cphm',
label: '车辆类型', label: '车牌号码',
defaultValue: undefined, defaultValue: undefined,
component: 'XjrSelect', component: 'XjrSelect',
componentProps: { componentProps: {
datasourceType: 'dic', datasourceType: 'api',
params: { itemId: '2017066632836796418' }, apiConfig: {
labelField: 'name', path: '/cheliang/cc-list',
method: 'GET',
apiId: '4f46d9d7f8de47c5b744ac88e2ab7eaa',
apiParams: [
{
key: '1',
title: 'Query Params',
tableInfo: [
{
name: 'keyword',
value: '',
required: false,
dataType: 'String',
bindType: 'value',
},
],
},
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
"var sql = 'SELECT cl.id, cl.cllx, dic.`name` AS cllx_name, cl.gbzl, cl.cphm AS `value`, cl.cphm AS label ' +\r\n'FROM mes_base_cheliang cl ' +\r\n'LEFT JOIN ' +\r\n'(SELECT detail.`value`, detail.`name` ' +\r\n'FROM xjr_dictionary_item item ' +\r\n'LEFT JOIN xjr_dictionary_detail detail ON detail.item_id = item.id ' +\r\n'WHERE item.`code` = \"cllx\") dic ON cl.cllx = dic.`value` COLLATE utf8mb4_0900_ai_ci ' +\r\n'WHERE cl.ypy = \"1\" AND cl.sfcj = \"0\" AND cl.jcdj = \"2\" ' +\r\n'?{keyword, AND cl.cphm LIKE CONCAT(\"%\", #{keyword}, \"%\")}'\r\nreturn db.select(sql);",
outputParams: [
{ name: 'label', tableTitle: '车牌号码', bindField: '', show: true, width: 150 },
{ name: 'cllx_name', tableTitle: '车辆类型', bindField: '', show: true, width: 150 },
{
name: 'gbzl',
tableTitle: '车辆重量(kg)',
bindField: 'clzl',
show: true,
width: 150,
component: '059de967d74b44bba170351aff279c63',
},
{
name: 'cllx',
tableTitle: '',
bindField: 'cllx',
show: false,
width: 150,
component: 'e17f3687f30f4a2995ea2b07348150b5',
},
{
name: 'id',
tableTitle: '',
bindField: 'cheliang_id',
show: false,
width: 150,
component: 'e1221f5840d7486588dd2c1e086af59d',
},
],
},
labelField: 'label',
valueField: 'value', valueField: 'value',
mode: 'multiple', mode: 'multiple',
showSearch: true, showSearch: true,
...@@ -63,13 +114,13 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -63,13 +114,13 @@ export const searchFormSchema: FormSchema[] = [
}, },
{ {
field: 'wlzt', field: 'cllx',
label: '物料状态', label: '车辆类型',
defaultValue: undefined, defaultValue: undefined,
component: 'XjrSelect', component: 'XjrSelect',
componentProps: { componentProps: {
datasourceType: 'dic', datasourceType: 'dic',
params: { itemId: '2019657322189856770' }, params: { itemId: '2017066632836796418' },
labelField: 'name', labelField: 'name',
valueField: 'value', valueField: 'value',
mode: 'multiple', mode: 'multiple',
...@@ -78,32 +129,14 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -78,32 +129,14 @@ export const searchFormSchema: FormSchema[] = [
}, },
}, },
{ {
field: 'gzxm', field: 'wlzt',
label: '工作项目', label: '物料状态',
defaultValue: undefined, defaultValue: undefined,
component: 'XjrSelect', component: 'XjrSelect',
componentProps: { componentProps: {
datasourceType: 'api', datasourceType: 'dic',
apiConfig: { params: { itemId: '2019657322189856770' },
path: '/cheliang/gzx', labelField: 'name',
method: 'GET',
apiId: 'd31f8fea01274bdf9f1f72464daa59e8',
apiParams: [
{
key: '1',
title: 'Query Params',
tableInfo: [{ name: 'keyword', required: false, bindType: '' }],
},
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
'var sql = \'SELECT id AS `value`, gzx AS label FROM mes_base_gongzuoxiang ?{keyword, WHERE gzx LIKE CONCAT("%", #{keyword}, "%")};\';\r\nreturn db.select(sql);',
outputParams: [
{ name: 'label', tableTitle: '工作项', bindField: '', show: true, width: 150 },
],
},
labelField: 'label',
valueField: 'value', valueField: 'value',
mode: 'multiple', mode: 'multiple',
showSearch: true, showSearch: true,
...@@ -111,62 +144,29 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -111,62 +144,29 @@ export const searchFormSchema: FormSchema[] = [
}, },
}, },
{ {
field: 'cphm', field: 'gzxm',
label: '车牌号码', label: '工作项目',
defaultValue: undefined, defaultValue: undefined,
component: 'XjrSelect', component: 'XjrSelect',
componentProps: { componentProps: {
datasourceType: 'api', datasourceType: 'api',
apiConfig: { apiConfig: {
path: '/cheliang/cc-list', path: '/cheliang/gzx',
method: 'GET', method: 'GET',
apiId: '4f46d9d7f8de47c5b744ac88e2ab7eaa', apiId: 'd31f8fea01274bdf9f1f72464daa59e8',
apiParams: [ apiParams: [
{ {
key: '1', key: '1',
title: 'Query Params', title: 'Query Params',
tableInfo: [ tableInfo: [{ name: 'keyword', required: false, bindType: '' }],
{
name: 'keyword',
value: '',
required: false,
dataType: 'String',
bindType: 'value',
},
],
}, },
{ key: '2', title: 'Header', tableInfo: [] }, { key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' }, { key: '3', title: 'Body' },
], ],
script: script:
"var sql = 'SELECT cl.id, cl.cllx, dic.`name` AS cllx_name, cl.gbzl, cl.cphm AS `value`, cl.cphm AS label ' +\r\n'FROM mes_base_cheliang cl ' +\r\n'LEFT JOIN ' +\r\n'(SELECT detail.`value`, detail.`name` ' +\r\n'FROM xjr_dictionary_item item ' +\r\n'LEFT JOIN xjr_dictionary_detail detail ON detail.item_id = item.id ' +\r\n'WHERE item.`code` = \"cllx\") dic ON cl.cllx = dic.`value` COLLATE utf8mb4_0900_ai_ci ' +\r\n'WHERE cl.ypy = \"1\" AND cl.sfcj = \"0\" AND cl.jcdj = \"2\" ' +\r\n'?{keyword, AND cl.cphm LIKE CONCAT(\"%\", #{keyword}, \"%\")}'\r\nreturn db.select(sql);", 'var sql = \'SELECT id AS `value`, gzx AS label FROM mes_base_gongzuoxiang ?{keyword, WHERE gzx LIKE CONCAT("%", #{keyword}, "%")};\';\r\nreturn db.select(sql);',
outputParams: [ outputParams: [
{ name: 'label', tableTitle: '车牌号码', bindField: '', show: true, width: 150 }, { name: 'label', tableTitle: '工作项', bindField: '', show: true, width: 150 },
{ name: 'cllx_name', tableTitle: '车辆类型', bindField: '', show: true, width: 150 },
{
name: 'gbzl',
tableTitle: '车辆重量(kg)',
bindField: 'clzl',
show: true,
width: 150,
component: '059de967d74b44bba170351aff279c63',
},
{
name: 'cllx',
tableTitle: '',
bindField: 'cllx',
show: false,
width: 150,
component: 'e17f3687f30f4a2995ea2b07348150b5',
},
{
name: 'id',
tableTitle: '',
bindField: 'cheliang_id',
show: false,
width: 150,
component: 'e1221f5840d7486588dd2c1e086af59d',
},
], ],
}, },
labelField: 'label', labelField: 'label',
...@@ -530,34 +530,75 @@ export const formProps: FormProps = { ...@@ -530,34 +530,75 @@ export const formProps: FormProps = {
}, },
}, },
{ {
key: 'e17f3687f30f4a2995ea2b07348150b5', key: 'f89a9cedaa7a4f98958d46860ac84ad6',
field: 'cllx', field: 'cphm',
label: '车辆类型', label: '车牌号码',
type: 'select', type: 'associate-popup',
component: 'XjrSelect', component: 'MultiplePopup',
colProps: { span: 24 }, colProps: { span: 24 },
componentProps: { componentProps: {
popupType: 'associate',
width: '100%', width: '100%',
span: 7, span: 7,
placeholder: '请选择下拉选择', placeholder: '请选择车牌号码',
showLabel: true, showLabel: true,
showSearch: false,
isMultiple: false,
clearable: false,
disabled: false, disabled: false,
staticOptions: [ datasourceType: 'api',
{ key: 1, label: 'Option 1', value: 'Option 1' }, labelField: 'label',
{ key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' },
],
datasourceType: 'dic',
params: { itemId: '2017066632836796418' },
labelField: 'name',
valueField: 'value', valueField: 'value',
pageSize: 10,
assoTitle: '车牌号码',
apiConfig: { apiConfig: {
path: 'CodeGeneration/selection', path: '/cheliang/cc-list',
method: 'GET', method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7', apiId: '4f46d9d7f8de47c5b744ac88e2ab7eaa',
apiParams: [
{
key: '1',
title: 'Query Params',
tableInfo: [
{
name: 'keyword',
value: '',
required: false,
dataType: 'String',
bindType: 'value',
},
],
},
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
"var sql = 'SELECT cl.id, cl.cllx, dic.`name` AS cllx_name, cl.gbzl, cl.cphm AS `value`, cl.cphm AS label ' +\r\n'FROM mes_base_cheliang cl ' +\r\n'LEFT JOIN ' +\r\n'(SELECT detail.`value`, detail.`name` ' +\r\n'FROM xjr_dictionary_item item ' +\r\n'LEFT JOIN xjr_dictionary_detail detail ON detail.item_id = item.id ' +\r\n'WHERE item.`code` = \"cllx\") dic ON cl.cllx = dic.`value` COLLATE utf8mb4_0900_ai_ci ' +\r\n'WHERE cl.ypy = \"1\" AND cl.sfcj = \"0\" AND cl.jcdj = \"2\" ' +\r\n'?{keyword, AND cl.cphm LIKE CONCAT(\"%\", #{keyword}, \"%\")}'\r\nreturn db.select(sql);",
outputParams: [
{ name: 'label', tableTitle: '车牌号码', show: true, width: 150 },
{ name: 'cllx_name', tableTitle: '车辆类型', show: true, width: 150 },
{
name: 'gbzl',
tableTitle: '车辆重量(kg)',
bindField: 'clzl',
show: true,
width: 150,
component: '059de967d74b44bba170351aff279c63',
},
{
name: 'cllx',
tableTitle: '',
bindField: 'cllx',
show: false,
width: 150,
component: 'e17f3687f30f4a2995ea2b07348150b5',
},
{
name: 'id',
tableTitle: '',
bindField: 'cheliangId',
show: false,
width: 150,
component: 'e1221f5840d7486588dd2c1e086af59d',
},
],
}, },
dicOptions: [], dicOptions: [],
required: false, required: false,
...@@ -565,7 +606,6 @@ export const formProps: FormProps = { ...@@ -565,7 +606,6 @@ export const formProps: FormProps = {
events: {}, events: {},
isShow: true, isShow: true,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
itemId: '2017066632836796418',
style: { width: '100%' }, style: { width: '100%' },
}, },
}, },
...@@ -694,29 +734,42 @@ export const formProps: FormProps = { ...@@ -694,29 +734,42 @@ export const formProps: FormProps = {
}, },
}, },
{ {
key: '059de967d74b44bba170351aff279c63', key: 'e17f3687f30f4a2995ea2b07348150b5',
field: 'clzl', field: 'cllx',
label: '车辆重量(kg)', label: '车辆类型',
type: 'number', type: 'select',
component: 'InputNumber', component: 'XjrSelect',
colProps: { span: 24 }, colProps: { span: 24 },
defaultValue: '',
componentProps: { componentProps: {
width: '100%', width: '100%',
span: 7, span: 7,
defaultValue: '', placeholder: '请选择下拉选择',
min: 0,
step: 1,
disabled: false,
showLabel: true, showLabel: true,
controls: true, showSearch: false,
isMultiple: false,
clearable: false,
disabled: false,
staticOptions: [
{ key: 1, label: 'Option 1', value: 'Option 1' },
{ key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' },
],
datasourceType: 'dic',
params: { itemId: '2017066632836796418' },
labelField: 'name',
valueField: 'value',
apiConfig: {
path: 'CodeGeneration/selection',
method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
},
dicOptions: [],
required: false, required: false,
subTotal: false,
isShow: true,
rules: [], rules: [],
events: {}, events: {},
placeholder: '请输入车辆重量(kg)', isShow: true,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
itemId: '2017066632836796418',
style: { width: '100%' }, style: { width: '100%' },
}, },
}, },
...@@ -894,81 +947,28 @@ export const formProps: FormProps = { ...@@ -894,81 +947,28 @@ export const formProps: FormProps = {
}, },
}, },
{ {
key: 'f89a9cedaa7a4f98958d46860ac84ad6', key: '059de967d74b44bba170351aff279c63',
field: 'cphm', field: 'clzl',
label: '车牌号码', label: '车辆重量(kg)',
type: 'associate-popup', type: 'number',
component: 'MultiplePopup', component: 'InputNumber',
colProps: { span: 24 }, colProps: { span: 24 },
defaultValue: '',
componentProps: { componentProps: {
popupType: 'associate',
width: '100%', width: '100%',
span: 7, span: 7,
placeholder: '请选择车牌号码', defaultValue: '',
showLabel: true, min: 0,
step: 1,
disabled: false, disabled: false,
datasourceType: 'api', showLabel: true,
labelField: 'label', controls: true,
valueField: 'value',
pageSize: 10,
assoTitle: '车牌号码',
apiConfig: {
path: '/cheliang/cc-list',
method: 'GET',
apiId: '4f46d9d7f8de47c5b744ac88e2ab7eaa',
apiParams: [
{
key: '1',
title: 'Query Params',
tableInfo: [
{
name: 'keyword',
value: '',
required: false,
dataType: 'String',
bindType: 'value',
},
],
},
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
"var sql = 'SELECT cl.id, cl.cllx, dic.`name` AS cllx_name, cl.gbzl, cl.cphm AS `value`, cl.cphm AS label ' +\r\n'FROM mes_base_cheliang cl ' +\r\n'LEFT JOIN ' +\r\n'(SELECT detail.`value`, detail.`name` ' +\r\n'FROM xjr_dictionary_item item ' +\r\n'LEFT JOIN xjr_dictionary_detail detail ON detail.item_id = item.id ' +\r\n'WHERE item.`code` = \"cllx\") dic ON cl.cllx = dic.`value` COLLATE utf8mb4_0900_ai_ci ' +\r\n'WHERE cl.ypy = \"1\" AND cl.sfcj = \"0\" AND cl.jcdj = \"2\" ' +\r\n'?{keyword, AND cl.cphm LIKE CONCAT(\"%\", #{keyword}, \"%\")}'\r\nreturn db.select(sql);",
outputParams: [
{ name: 'label', tableTitle: '车牌号码', show: true, width: 150 },
{ name: 'cllx_name', tableTitle: '车辆类型', show: true, width: 150 },
{
name: 'gbzl',
tableTitle: '车辆重量(kg)',
bindField: 'clzl',
show: true,
width: 150,
component: '059de967d74b44bba170351aff279c63',
},
{
name: 'cllx',
tableTitle: '',
bindField: 'cllx',
show: false,
width: 150,
component: 'e17f3687f30f4a2995ea2b07348150b5',
},
{
name: 'id',
tableTitle: '',
bindField: 'cheliangId',
show: false,
width: 150,
component: 'e1221f5840d7486588dd2c1e086af59d',
},
],
},
dicOptions: [],
required: false, required: false,
subTotal: false,
isShow: true,
rules: [], rules: [],
events: {}, events: {},
isShow: true, placeholder: '请输入车辆重量(kg)',
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' }, style: { width: '100%' },
}, },
......
...@@ -39,12 +39,12 @@ export const permissionList = [ ...@@ -39,12 +39,12 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '车辆类型', fieldName: '车牌号码',
fieldId: 'cllx', fieldId: 'cphm',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'select', type: 'associate-popup',
key: 'e17f3687f30f4a2995ea2b07348150b5', key: 'f89a9cedaa7a4f98958d46860ac84ad6',
children: [], children: [],
options: {}, options: {},
}, },
...@@ -123,15 +123,14 @@ export const permissionList = [ ...@@ -123,15 +123,14 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '车辆重量(kg)', fieldName: '车辆类型',
fieldId: 'clzl', fieldId: 'cllx',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'number', type: 'select',
key: '059de967d74b44bba170351aff279c63', key: 'e17f3687f30f4a2995ea2b07348150b5',
children: [], children: [],
options: {}, options: {},
defaultValue: '',
}, },
{ {
required: false, required: false,
...@@ -223,14 +222,15 @@ export const permissionList = [ ...@@ -223,14 +222,15 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '车牌号码', fieldName: '车辆重量(kg)',
fieldId: 'cphm', fieldId: 'clzl',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'associate-popup', type: 'number',
key: 'f89a9cedaa7a4f98958d46860ac84ad6', key: '059de967d74b44bba170351aff279c63',
children: [], children: [],
options: {}, options: {},
defaultValue: '',
}, },
{ {
required: false, 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