Commit 6fab0c74 by 王宝涛

feat(pybg): 更新排液表格配置和数据模型

- 将搜索表单中的'班组'字段替换为'车辆号码'字段,并配置API数据源
- 添加排液人字段到搜索表单,使用用户选择组件
- 重新排列搜索表单项顺序,调整工作开始时间和结束时间位置
- 移除表格中多余的处理辆数和班组列配置
- 更新工作流程权限配置中的字段映射关系
- 修改接口模型参数,将banzu替换为cphm并调整字段顺序
- 为排液人字段添加默认值配置并移除静态选项配置
parent e9942b22
...@@ -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 {
banzu: string; cphm: string;
gzr: string;
gzkssj: string; gzkssj: string;
cllx: string; cllx: string;
gzr: string; gzxm: string;
gzjssj: string; gzjssj: string;
gzxm: string;
} }
/** /**
...@@ -38,8 +38,6 @@ export interface MesCheliangBgPageModel { ...@@ -38,8 +38,6 @@ export interface MesCheliangBgPageModel {
gzjssj: string; gzjssj: string;
clls: string; clls: string;
banzu: string;
} }
/** /**
......
...@@ -4,41 +4,65 @@ import { uploadApi } from '/@/api/sys/upload'; ...@@ -4,41 +4,65 @@ import { uploadApi } from '/@/api/sys/upload';
export const searchFormSchema: FormSchema[] = [ export const searchFormSchema: FormSchema[] = [
{ {
field: 'banzu', field: 'cphm',
label: '班组', label: '车辆号码',
defaultValue: undefined, defaultValue: undefined,
component: 'XjrSelect', component: 'XjrSelect',
componentProps: { componentProps: {
datasourceType: 'dic', datasourceType: 'api',
params: { itemId: '2021042614763266049' }, apiConfig: {
labelField: 'name', path: '/cheliang/py-list',
valueField: 'value', method: 'GET',
mode: 'multiple', apiId: '81d881afe72d4be3a05677caa75e6342',
showSearch: true, apiParams: [
getPopupContainer: () => document.body, {
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 },
{ {
field: 'gzkssj', name: 'gbzl',
label: '工作开始时间', tableTitle: '车辆重量',
defaultValue: undefined, bindField: 'clzl',
component: 'RangePicker', show: true,
componentProps: { width: 150,
format: 'YYYY-MM-DD HH:mm:ss', component: 'ffba6da2c6be427388480ba9dbeda417',
style: { width: '100%' },
getPopupContainer: () => document.body,
}, },
{
name: 'cllx',
tableTitle: '',
bindField: 'cllx',
show: false,
width: 150,
component: 'b376e6f92fc94f75ab508964c7406d8a',
}, },
{ {
field: 'cllx', name: 'id',
label: '车辆类型', tableTitle: '',
defaultValue: undefined, bindField: 'cheliang_id',
component: 'XjrSelect', show: false,
componentProps: { width: 150,
datasourceType: 'dic', component: '6aac9bdc31f74f969e4e94ff13b5a95f',
params: { itemId: '2017066632836796418' }, },
labelField: 'name', ],
},
labelField: 'label',
valueField: 'value', valueField: 'value',
mode: 'multiple', mode: 'multiple',
showSearch: true, showSearch: true,
...@@ -57,8 +81,8 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -57,8 +81,8 @@ export const searchFormSchema: FormSchema[] = [
}, },
{ {
field: 'gzjssj', field: 'gzkssj',
label: '工作结束时间', label: '工作开始时间',
defaultValue: undefined, defaultValue: undefined,
component: 'RangePicker', component: 'RangePicker',
componentProps: { componentProps: {
...@@ -69,6 +93,21 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -69,6 +93,21 @@ export const searchFormSchema: FormSchema[] = [
}, },
{ {
field: 'cllx',
label: '车辆类型',
defaultValue: undefined,
component: 'XjrSelect',
componentProps: {
datasourceType: 'dic',
params: { itemId: '2017066632836796418' },
labelField: 'name',
valueField: 'value',
mode: 'multiple',
showSearch: true,
getPopupContainer: () => document.body,
},
},
{
field: 'gzxm', field: 'gzxm',
label: '工作项目', label: '工作项目',
defaultValue: undefined, defaultValue: undefined,
...@@ -101,6 +140,17 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -101,6 +140,17 @@ 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[] = [
...@@ -207,19 +257,6 @@ export const columns: BasicColumn[] = [ ...@@ -207,19 +257,6 @@ 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 = [];
...@@ -417,40 +454,29 @@ export const formProps: FormProps = { ...@@ -417,40 +454,29 @@ export const formProps: FormProps = {
}, },
}, },
{ {
key: '362f762c817749469f47af55832b3363', key: 'b8e63f39708d46cdb64fd9b5e9079dd4',
field: 'banzu', field: 'gzr',
label: '班组', label: '排液人',
type: 'radio', type: 'user',
component: 'ApiRadioGroup', component: 'User',
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,
rules: [], multiple: true,
events: {},
isShow: true, isShow: true,
events: {},
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
params: { itemId: '2021042614763266049' }, style: { width: '100%' },
itemId: '2021042614763266049',
style: {},
}, },
}, },
{ {
...@@ -559,27 +585,48 @@ export const formProps: FormProps = { ...@@ -559,27 +585,48 @@ export const formProps: FormProps = {
}, },
}, },
{ {
key: 'b8e63f39708d46cdb64fd9b5e9079dd4', key: '16549fa420014b3f871e74e4274df5b3',
field: 'gzr', field: 'gzxm',
label: '排液人', label: '工作项目',
type: 'user', type: 'associate-popup',
component: 'User', component: 'MultiplePopup',
colProps: { span: 24 }, colProps: { span: 24 },
defaultValue: '',
componentProps: { componentProps: {
span: 7, popupType: 'associate',
width: '100%', width: '100%',
defaultValue: '', span: 7,
placeholder: '请选择人员', 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,
multiple: true, rules: [],
isShow: true,
events: {}, events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' }, style: { width: '100%' },
}, },
...@@ -644,53 +691,6 @@ export const formProps: FormProps = { ...@@ -644,53 +691,6 @@ 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: '处理辆数',
......
...@@ -39,14 +39,15 @@ export const permissionList = [ ...@@ -39,14 +39,15 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '班组', fieldName: '排液人',
fieldId: 'banzu', fieldId: 'gzr',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'radio', type: 'user',
key: '362f762c817749469f47af55832b3363', key: 'b8e63f39708d46cdb64fd9b5e9079dd4',
children: [], children: [],
options: {}, options: {},
defaultValue: '',
}, },
{ {
required: false, required: false,
...@@ -105,15 +106,14 @@ export const permissionList = [ ...@@ -105,15 +106,14 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '排液人', fieldName: '工作项目',
fieldId: 'gzr', fieldId: 'gzxm',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'user', type: 'associate-popup',
key: 'b8e63f39708d46cdb64fd9b5e9079dd4', key: '16549fa420014b3f871e74e4274df5b3',
children: [], children: [],
options: {}, options: {},
defaultValue: '',
}, },
{ {
required: false, required: false,
...@@ -156,22 +156,6 @@ export const permissionList = [ ...@@ -156,22 +156,6 @@ 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