Commit 5a11b6f0 by 王宝涛

feat(pybg): 更新配置表单字段和数据模型

- 将搜索表单中的车辆号码(cphm)字段替换为班组(banzu)字段
- 调整排液人(gzr)字段位置并重新配置组件属性
- 添加工作结束时间筛选条件字段
- 更新表格列配置增加班组列和处理辆数列
- 修改工作流权限配置中的字段映射关系
- 调整车辆重量输入框的数值验证规则
- 更新数据模型接口定义以匹配新的字段结构
parent 874b6e5e
...@@ -4,17 +4,17 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel'; ...@@ -4,17 +4,17 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
* @description: MesCheliangBg分页参数 模型 * @description: MesCheliangBg分页参数 模型
*/ */
export interface MesCheliangBgPageParams extends BasicPageParams { export interface MesCheliangBgPageParams extends BasicPageParams {
cphm: string; banzu: string;
gzr: string;
gzkssj: string; gzkssj: string;
cllx: string; cllx: string;
gzxm: string; gzr: string;
gzjssj: string; gzjssj: string;
gzxm: string;
} }
/** /**
...@@ -38,6 +38,8 @@ export interface MesCheliangBgPageModel { ...@@ -38,6 +38,8 @@ export interface MesCheliangBgPageModel {
gzjssj: string; gzjssj: string;
clls: string; clls: string;
banzu: string;
} }
/** /**
...@@ -116,6 +118,8 @@ export interface MesCheliangBgModel { ...@@ -116,6 +118,8 @@ export interface MesCheliangBgModel {
psqzp: string; psqzp: string;
banzu: string;
bz: string; bz: string;
createDate: string; createDate: string;
......
...@@ -4,65 +4,14 @@ import { uploadApi } from '/@/api/sys/upload'; ...@@ -4,65 +4,14 @@ import { uploadApi } from '/@/api/sys/upload';
export const searchFormSchema: FormSchema[] = [ export const searchFormSchema: FormSchema[] = [
{ {
field: 'cphm', field: 'banzu',
label: '车辆号码', label: '班组',
defaultValue: undefined, defaultValue: undefined,
component: 'XjrSelect', component: 'XjrSelect',
componentProps: { componentProps: {
datasourceType: 'api', datasourceType: 'dic',
apiConfig: { params: { itemId: '2021042614763266049' },
path: '/cheliang/py-list', labelField: 'name',
method: 'GET',
apiId: '81d881afe72d4be3a05677caa75e6342',
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:
"\r\nvar 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.sfcj = \"0\" ' +\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: '车辆重量',
bindField: 'clzl',
show: true,
width: 150,
component: 'ffba6da2c6be427388480ba9dbeda417',
},
{
name: 'cllx',
tableTitle: '',
bindField: 'cllx',
show: false,
width: 150,
component: 'b376e6f92fc94f75ab508964c7406d8a',
},
{
name: 'id',
tableTitle: '',
bindField: 'cheliang_id',
show: false,
width: 150,
component: '6aac9bdc31f74f969e4e94ff13b5a95f',
},
],
},
labelField: 'label',
valueField: 'value', valueField: 'value',
mode: 'multiple', mode: 'multiple',
showSearch: true, showSearch: true,
...@@ -70,17 +19,6 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -70,17 +19,6 @@ export const searchFormSchema: FormSchema[] = [
}, },
}, },
{ {
field: 'gzr',
label: '排液人',
defaultValue: undefined,
component: 'User',
componentProps: {
suffix: 'ant-design:setting-outlined',
placeholder: '请选择',
},
},
{
field: 'gzkssj', field: 'gzkssj',
label: '工作开始时间', label: '工作开始时间',
defaultValue: undefined, defaultValue: undefined,
...@@ -108,6 +46,29 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -108,6 +46,29 @@ export const searchFormSchema: FormSchema[] = [
}, },
}, },
{ {
field: 'gzr',
label: '排液人',
defaultValue: undefined,
component: 'User',
componentProps: {
suffix: 'ant-design:setting-outlined',
placeholder: '请选择',
},
},
{
field: 'gzjssj',
label: '工作结束时间',
defaultValue: undefined,
component: 'RangePicker',
componentProps: {
format: 'YYYY-MM-DD HH:mm:ss',
style: { width: '100%' },
getPopupContainer: () => document.body,
},
},
{
field: 'gzxm', field: 'gzxm',
label: '工作项目', label: '工作项目',
defaultValue: undefined, defaultValue: undefined,
...@@ -140,17 +101,6 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -140,17 +101,6 @@ export const searchFormSchema: FormSchema[] = [
getPopupContainer: () => document.body, getPopupContainer: () => document.body,
}, },
}, },
{
field: 'gzjssj',
label: '工作结束时间',
defaultValue: undefined,
component: 'RangePicker',
componentProps: {
format: 'YYYY-MM-DD HH:mm:ss',
style: { width: '100%' },
getPopupContainer: () => document.body,
},
},
]; ];
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
...@@ -257,6 +207,19 @@ export const columns: BasicColumn[] = [ ...@@ -257,6 +207,19 @@ export const columns: BasicColumn[] = [
styleConfig: undefined, styleConfig: undefined,
listStyle: undefined, listStyle: undefined,
}, },
{
resizable: true,
dataIndex: 'banzu',
title: '班组',
componentType: 'radio',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
]; ];
//表头合并配置 //表头合并配置
export const headerMergingData = []; export const headerMergingData = [];
...@@ -454,29 +417,40 @@ export const formProps: FormProps = { ...@@ -454,29 +417,40 @@ export const formProps: FormProps = {
}, },
}, },
{ {
key: 'b8e63f39708d46cdb64fd9b5e9079dd4', key: '362f762c817749469f47af55832b3363',
field: 'gzr', field: 'banzu',
label: '排液人', label: '班组',
type: 'user', type: 'radio',
component: 'User', component: 'ApiRadioGroup',
colProps: { span: 24 }, colProps: { span: 24 },
defaultValue: '',
componentProps: { componentProps: {
span: 7, span: 7,
width: '100%',
defaultValue: '',
placeholder: '请选择人员',
userType: 0,
prefix: '',
suffix: 'ant-design:setting-outlined',
showLabel: true, showLabel: true,
disabled: false, disabled: false,
optionType: 'default',
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',
labelField: 'name',
valueField: 'value',
defaultSelect: null,
apiConfig: {
path: 'CodeGeneration/selection',
method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
},
dicOptions: [],
required: false, required: false,
multiple: true, rules: [],
isShow: true,
events: {}, events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' }, params: { itemId: '2021042614763266049' },
itemId: '2021042614763266049',
style: {},
}, },
}, },
{ {
...@@ -585,48 +559,27 @@ export const formProps: FormProps = { ...@@ -585,48 +559,27 @@ export const formProps: FormProps = {
}, },
}, },
{ {
key: '16549fa420014b3f871e74e4274df5b3', key: 'b8e63f39708d46cdb64fd9b5e9079dd4',
field: 'gzxm', field: 'gzr',
label: '工作项目', label: '排液人',
type: 'associate-popup', type: 'user',
component: 'MultiplePopup', component: 'User',
colProps: { span: 24 }, colProps: { span: 24 },
defaultValue: '',
componentProps: { componentProps: {
popupType: 'associate',
width: '100%',
span: 7, span: 7,
placeholder: '请选择工作项目', width: '100%',
defaultValue: '',
placeholder: '请选择人员',
userType: 0,
prefix: '',
suffix: 'ant-design:setting-outlined',
showLabel: true, showLabel: true,
disabled: false, disabled: false,
datasourceType: 'api',
labelField: 'label',
valueField: 'value',
pageSize: 10,
assoTitle: '工作项目',
apiConfig: {
path: '/cheliang/gzx',
method: 'GET',
apiId: 'd31f8fea01274bdf9f1f72464daa59e8',
apiParams: [
{
key: '1',
title: 'Query Params',
tableInfo: [
{ name: 'keyword', required: false, dataType: 'String', 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: '工作项目', show: true, width: 150 }],
},
dicOptions: [],
required: false, required: false,
rules: [], multiple: true,
events: {},
isShow: true, isShow: true,
events: {},
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' }, style: { width: '100%' },
}, },
...@@ -676,7 +629,6 @@ export const formProps: FormProps = { ...@@ -676,7 +629,6 @@ export const formProps: FormProps = {
span: 7, span: 7,
defaultValue: '', defaultValue: '',
min: 0, min: 0,
max: null,
step: 1, step: 1,
disabled: false, disabled: false,
showLabel: true, showLabel: true,
...@@ -692,6 +644,53 @@ export const formProps: FormProps = { ...@@ -692,6 +644,53 @@ export const formProps: FormProps = {
}, },
}, },
{ {
key: '16549fa420014b3f871e74e4274df5b3',
field: 'gzxm',
label: '工作项目',
type: 'associate-popup',
component: 'MultiplePopup',
colProps: { span: 24 },
componentProps: {
popupType: 'associate',
width: '100%',
span: 7,
placeholder: '请选择工作项目',
showLabel: true,
disabled: false,
datasourceType: 'api',
labelField: 'label',
valueField: 'value',
pageSize: 10,
assoTitle: '工作项目',
apiConfig: {
path: '/cheliang/gzx',
method: 'GET',
apiId: 'd31f8fea01274bdf9f1f72464daa59e8',
apiParams: [
{
key: '1',
title: 'Query Params',
tableInfo: [
{ name: 'keyword', required: false, dataType: 'String', 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: '工作项目', show: true, width: 150 }],
},
dicOptions: [],
required: false,
rules: [],
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
{
key: '234d3626d0fb4a41a10bf2f562eabce3', key: '234d3626d0fb4a41a10bf2f562eabce3',
field: 'clls', field: 'clls',
label: '处理辆数', label: '处理辆数',
...@@ -704,7 +703,6 @@ export const formProps: FormProps = { ...@@ -704,7 +703,6 @@ export const formProps: FormProps = {
span: 7, span: 7,
defaultValue: '', defaultValue: '',
min: 0, min: 0,
max: null,
step: 1, step: 1,
disabled: false, disabled: false,
showLabel: true, showLabel: true,
......
...@@ -39,15 +39,14 @@ export const permissionList = [ ...@@ -39,15 +39,14 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '排液人', fieldName: '班组',
fieldId: 'gzr', fieldId: 'banzu',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'user', type: 'radio',
key: 'b8e63f39708d46cdb64fd9b5e9079dd4', key: '362f762c817749469f47af55832b3363',
children: [], children: [],
options: {}, options: {},
defaultValue: '',
}, },
{ {
required: false, required: false,
...@@ -106,14 +105,15 @@ export const permissionList = [ ...@@ -106,14 +105,15 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '工作项目', fieldName: '排液人',
fieldId: 'gzxm', fieldId: 'gzr',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'associate-popup', type: 'user',
key: '16549fa420014b3f871e74e4274df5b3', key: 'b8e63f39708d46cdb64fd9b5e9079dd4',
children: [], children: [],
options: {}, options: {},
defaultValue: '',
}, },
{ {
required: false, required: false,
...@@ -156,6 +156,22 @@ export const permissionList = [ ...@@ -156,6 +156,22 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '工作项目',
fieldId: 'gzxm',
isSubTable: false,
showChildren: true,
type: 'associate-popup',
key: '16549fa420014b3f871e74e4274df5b3',
children: [],
options: {},
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '处理辆数', fieldName: '处理辆数',
fieldId: 'clls', fieldId: 'clls',
isSubTable: false, isSubTable: 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