Commit 6fab0c74 by 王宝涛

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

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