Commit 2f1cc80f by 王宝涛

feat(ccbg): 更新车辆报工功能的数据模型和界面配置

- 调整MesCheliangBgPageModel接口字段顺序,添加bdsl和gzsc字段
- 修改查询参数配置,简化tableInfo结构
- 更新API路径从/cheliang/py-list到/cheliang/cc-list,调整API ID
- 优化SQL查询语句,添加车辆状态过滤条件
- 调整车牌号码显示标题为车辆重量(kg)
- 添加隐藏ID字段映射
- 交换工作人和工作项目的dataIndex和标题配置
- 新增磅单数量和工作时长列
- 移除多余的最大长度限制配置
- 统一车辆重量单位显示为(kg)
- 调整表单字段名称和组件配置
- 更新搜索表单中的关联弹窗配置
- 重新组织表单布局和组件属性配置
- 更新上传组件的文件类型和多选设置
parent 0f3a09a5
......@@ -27,10 +27,10 @@ export interface MesCheliangBgPageParams extends BasicPageParams {
export interface MesCheliangBgPageModel {
id: string;
gzxm: string;
gzr: string;
gzxm: string;
cphm: string;
cllx: string;
......@@ -46,6 +46,10 @@ export interface MesCheliangBgPageModel {
gzjssj: string;
clls: string;
bdsl: string;
gzsc: string;
}
/**
......
import { MesCheliangPybgPageModel, MesCheliangPybgPageParams, MesCheliangPybgPageResult } from './model/PybgModel';
import { MesCheliangBgPageModel, MesCheliangBgPageParams, MesCheliangBgPageResult } from './model/PybgModel';
import { defHttp } from '/@/utils/http/axios';
import { ErrorMessageMode } from '/#/axios';
......@@ -7,17 +7,17 @@ enum Api {
Page = '/chaiche/pybg/page',
List = '/chaiche/pybg/list',
Info = '/chaiche/pybg/info',
MesCheliangPybg = '/chaiche/pybg',
MesCheliangBg = '/chaiche/pybg',
}
/**
* @description: 查询MesCheliangPybg分页列表
* @description: 查询MesCheliangBg分页列表
*/
export async function getMesCheliangPybgPage(params: MesCheliangPybgPageParams, mode: ErrorMessageMode = 'modal') {
return defHttp.get<MesCheliangPybgPageResult>(
export async function getMesCheliangBgPage(params: MesCheliangBgPageParams, mode: ErrorMessageMode = 'modal') {
return defHttp.get<MesCheliangBgPageResult>(
{
url: Api.Page,
params,
......@@ -29,10 +29,10 @@ export async function getMesCheliangPybgPage(params: MesCheliangPybgPageParams,
}
/**
* @description: 获取MesCheliangPybg信息
* @description: 获取MesCheliangBg信息
*/
export async function getMesCheliangPybg(id: String, mode: ErrorMessageMode = 'modal') {
return defHttp.get<MesCheliangPybgPageModel>(
export async function getMesCheliangBg(id: String, mode: ErrorMessageMode = 'modal') {
return defHttp.get<MesCheliangBgPageModel>(
{
url: Api.Info,
params: { id },
......@@ -44,13 +44,13 @@ export async function getMesCheliangPybg(id: String, mode: ErrorMessageMode = 'm
}
/**
* @description: 新增MesCheliangPybg
* @description: 新增MesCheliangBg
*/
export async function addMesCheliangPybg(mesCheliangPybg: Recordable, mode: ErrorMessageMode = 'modal') {
export async function addMesCheliangBg(mesCheliangBg: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.post<boolean>(
{
url: Api.MesCheliangPybg,
params: mesCheliangPybg,
url: Api.MesCheliangBg,
params: mesCheliangBg,
},
{
errorMessageMode: mode,
......@@ -59,13 +59,13 @@ export async function addMesCheliangPybg(mesCheliangPybg: Recordable, mode: Erro
}
/**
* @description: 更新MesCheliangPybg
* @description: 更新MesCheliangBg
*/
export async function updateMesCheliangPybg(mesCheliangPybg: Recordable, mode: ErrorMessageMode = 'modal') {
export async function updateMesCheliangBg(mesCheliangBg: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.put<boolean>(
{
url: Api.MesCheliangPybg,
params: mesCheliangPybg,
url: Api.MesCheliangBg,
params: mesCheliangBg,
},
{
errorMessageMode: mode,
......@@ -74,12 +74,12 @@ export async function updateMesCheliangPybg(mesCheliangPybg: Recordable, mode: E
}
/**
* @description: 删除MesCheliangPybg(批量删除)
* @description: 删除MesCheliangBg(批量删除)
*/
export async function deleteMesCheliangPybg(ids: string[], mode: ErrorMessageMode = 'modal') {
export async function deleteMesCheliangBg(ids: string[], mode: ErrorMessageMode = 'modal') {
return defHttp.delete<boolean>(
{
url: Api.MesCheliangPybg,
url: Api.MesCheliangBg,
data: ids,
},
{
......
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
/**
* @description: MesCheliangPybg分页参数 模型
* @description: MesCheliangBg分页参数 模型
*/
export interface MesCheliangPybgPageParams extends BasicPageParams {
export interface MesCheliangBgPageParams extends BasicPageParams {
cphm: string;
cllx: string;
gzr: string;
clzl: string;
gzkssj: string;
pyr: string;
bglx: string;
gzxm: string;
cllx: string;
gzkssj: string;
gzxm: string;
gzjssj: string;
}
/**
* @description: MesCheliangPybg分页返回值模型
* @description: MesCheliangBg分页返回值模型
*/
export interface MesCheliangPybgPageModel {
export interface MesCheliangBgPageModel {
id: string;
cphm: string;
......@@ -31,24 +31,28 @@ export interface MesCheliangPybgPageModel {
clzl: string;
pyr: string;
gzr: string;
gzxm: string;
gzkssj: string;
gzjssj: string;
clls: string;
}
/**
* @description: MesCheliangPybg表类型
* @description: MesCheliangBg表类型
*/
export interface MesCheliangPybgModel {
export interface MesCheliangBgModel {
id: string;
bglx: string;
cheliangId: string;
pyr: string;
gzr: string;
gzxm: string;
......@@ -58,15 +62,57 @@ export interface MesCheliangPybgModel {
clzl: string;
pyyclls: string;
clppxh: string;
clys: string;
clls: string;
gzkssj: string;
gzjssj: string;
yclqzp: string;
clqzp1: string;
clqzp2: string;
clhzp1: string;
clhzp2: string;
bdsl: string;
bdzp: string;
gbswzp: string;
gznr: string;
gzsc: string;
sfwgcj: string;
drzcl: string;
kjsj: string;
tjsj: string;
kjsc: string;
kjhdl: string;
yxhm: string;
pslb: string;
ghcj: string;
dhch: string;
dhpsxx: string;
yclhzp: string;
dhxx: string;
bz: string;
......@@ -80,6 +126,6 @@ export interface MesCheliangPybgModel {
}
/**
* @description: MesCheliangPybg分页返回值结构
* @description: MesCheliangBg分页返回值结构
*/
export type MesCheliangPybgPageResult = BasicFetchResult<MesCheliangPybgPageModel>;
export type MesCheliangBgPageResult = BasicFetchResult<MesCheliangBgPageModel>;
......@@ -133,7 +133,7 @@
//展示在列表内的按钮
const actionButtons = ref<string[]>(["view","edit","delete"]);
const buttonConfigs = computed(()=>{
const list = [{"isUse":true,"name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true},{"isUse":true,"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true},{"isUse":true,"name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true,"isEnableLock":true},{"isUse":true,"name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true}]
const list = [{"buttonId":"2018972431831822336","name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true,"isUse":true},{"buttonId":"2018972431831822337","name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"isUse":true},{"buttonId":"2018972431831822338","name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true,"isUse":true,"isEnableLock":true},{"buttonId":"2018972431831822339","name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true,"isUse":true}]
return filterButtonAuth(list);
})
......
......@@ -218,7 +218,7 @@ export const columns: BasicColumn[] = [
{
resizable: true,
dataIndex: 'gbzl',
title: '过磅重量(t)',
title: '过磅重量(kg)',
componentType: 'number',
fixed: false,
......@@ -683,7 +683,7 @@ export const formProps: FormProps = {
{
key: 'ce1146f2655e4478a755f51dd14860ab',
field: 'gbzl',
label: '过磅重量(t)',
label: '过磅重量(kg)',
type: 'number',
component: 'InputNumber',
colProps: { span: 24 },
......@@ -703,7 +703,7 @@ export const formProps: FormProps = {
isShow: true,
rules: [],
events: {},
placeholder: '请输入过磅重量(t)',
placeholder: '请输入过磅重量(kg)',
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
......
......@@ -107,7 +107,7 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '过磅重量(t)',
fieldName: '过磅重量(kg)',
fieldId: 'gbzl',
isSubTable: false,
showChildren: true,
......
......@@ -15,7 +15,7 @@
import { reactive, ref, onMounted, nextTick, watch } from 'vue';
import { formProps, formEventConfigs } from './config';
import SimpleForm from '/@/components/SimpleForm/src/SimpleForm.vue';
import { addMesCheliangPybg, getMesCheliangPybg, updateMesCheliangPybg } from '/@/api/chaiche/pybg';
import { addMesCheliangBg, getMesCheliangBg, updateMesCheliangBg } from '/@/api/chaiche/pybg';
import { cloneDeep, isString } from 'lodash-es';
import { FormDataProps } from '/@/components/Designer/src/types';
import { usePermission } from '/@/hooks/web/usePermission';
......@@ -110,7 +110,7 @@
// 根据行唯一ID查询行数据,并设置表单数据 【编辑】
async function setFormDataFromId(rowId) {
try {
const record = await getMesCheliangPybg(rowId);
const record = await getMesCheliangBg(rowId);
setFieldsValue(record);
state.formModel = record;
await getFormDataEvent(formEventConfigs, state.formModel,
......@@ -156,7 +156,7 @@
try {
values[RowKey] = rowId;
state.formModel = values;
let saveVal = await updateMesCheliangPybg(values);
let saveVal = await updateMesCheliangBg(values);
await submitFormEvent(formEventConfigs, state.formModel,
systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:提交表单
......@@ -167,7 +167,7 @@
async function add(values) {
try {
state.formModel = values;
let saveVal = await addMesCheliangPybg(values);
let saveVal = await addMesCheliangBg(values);
await submitFormEvent(formEventConfigs, state.formModel,
systemFormRef.value,
formProps.schemas, true, state.formInfo.formName,state.formInfo.formId); //表单事件:提交表单
......
export const permissionList = [
{
required: true,
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '车辆id',
fieldId: 'cheliangId',
isSubTable: false,
showChildren: true,
type: 'input',
key: '6aac9bdc31f74f969e4e94ff13b5a95f',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '车号码',
fieldName: '车号码',
fieldId: 'cphm',
isSubTable: false,
showChildren: true,
type: 'associate-popup',
key: 'af19c3eb20d945e093176d60b4f5a0d1',
key: '7542feb5b0de459baded633a4cb87763',
children: [],
options: {},
},
{
required: true,
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '车辆类型',
fieldId: 'cllx',
fieldName: '排液人',
fieldId: 'gzr',
isSubTable: false,
showChildren: true,
type: 'select',
key: '6ef2584234dd425faaaf5c7896181019',
type: 'user',
key: 'b8e63f39708d46cdb64fd9b5e9079dd4',
children: [],
options: {},
defaultValue: '',
},
{
required: true,
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '车辆重量',
fieldId: 'clzl',
fieldName: '工作开始时间',
fieldId: 'gzkssj',
isSubTable: false,
showChildren: true,
type: 'number',
key: 'ae99d59a65304fa5a0ea3f4c9a87e524',
type: 'date',
key: '3bf66ae914c64049bf385d556ceb2dc9',
children: [],
options: {},
defaultValue: '',
},
{
required: true,
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '排液人',
fieldId: 'pyr',
fieldName: '报工类型',
fieldId: 'bglx',
isSubTable: false,
showChildren: true,
type: 'user',
key: '115cd0bc43e84138a51cb1e189bfb8e5',
type: 'input',
key: '0e1477cdb9f2472da86bd385c4c44ea5',
children: [],
options: {},
defaultValue: '',
},
{
required: true,
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '车辆类型',
fieldId: 'cllx',
isSubTable: false,
showChildren: true,
type: 'select',
key: 'b376e6f92fc94f75ab508964c7406d8a',
children: [],
options: {},
},
{
required: false,
view: true,
edit: true,
disabled: false,
......@@ -77,40 +111,57 @@ export const permissionList = [
isSubTable: false,
showChildren: true,
type: 'associate-popup',
key: '5ab8ad30eda84a05a8ac3393c57a82d2',
key: '16549fa420014b3f871e74e4274df5b3',
children: [],
options: {},
},
{
required: true,
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '工作开始时间',
fieldId: 'gzkssj',
fieldName: '工作结束时间',
fieldId: 'gzjssj',
isSubTable: false,
showChildren: true,
type: 'date',
key: '309b6c3f707349a89cd97cf1b00ee0b8',
key: '809f3945b0e34453a81f40a868675eb7',
children: [],
options: {},
defaultValue: '',
},
{
required: true,
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '工作结束时间',
fieldId: 'gzjssj',
fieldName: '车辆重量(kg)',
fieldId: 'clzl',
isSubTable: false,
showChildren: true,
type: 'date',
key: 'a775006aab184860860da4573b2e185a',
type: 'number',
key: 'ffba6da2c6be427388480ba9dbeda417',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '处理辆数',
fieldId: 'clls',
isSubTable: false,
showChildren: true,
type: 'number',
key: '234d3626d0fb4a41a10bf2f562eabce3',
children: [],
options: {},
defaultValue: '',
......@@ -127,7 +178,7 @@ export const permissionList = [
isSubTable: false,
showChildren: true,
type: 'textarea',
key: '88c5a499b17d4e5fb4bb67d1b3ae2e8f',
key: '4074ceefdde44a77a11c2bc53cc3cdf3',
children: [],
options: {},
defaultValue: '',
......@@ -139,12 +190,12 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '处理前照片',
fieldId: 'yclqzp',
fieldName: '处理前照片',
fieldId: 'clqzp1',
isSubTable: false,
showChildren: true,
type: 'upload',
key: 'ed064b5f5ca945feb5ef37dbf6f06eec',
key: '0d7ec3c4b4e54dfb9eeca107ec214d04',
children: [],
options: {},
defaultValue: '',
......@@ -156,12 +207,12 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '处理后照片',
fieldId: 'yclhzp',
fieldName: '处理后照片',
fieldId: 'clhzp1',
isSubTable: false,
showChildren: true,
type: 'upload',
key: '1065c11a72cc4d42983939a2b6a9c2bf',
key: '42b8984cc17f4cacafa3ae1e885d8260',
children: [],
options: {},
defaultValue: '',
......
......@@ -66,7 +66,7 @@
import { Modal } from 'ant-design-vue';
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table';
import { getMesCheliangPybgPage, deleteMesCheliangPybg} from '/@/api/chaiche/pybg';
import { getMesCheliangBgPage, deleteMesCheliangBg} from '/@/api/chaiche/pybg';
import { ResizePageWrapper } from '/@/components/Page';
import { useMessage } from '/@/hooks/web/useMessage';
import { useI18n } from '/@/hooks/web/useI18n';
......@@ -167,7 +167,7 @@
const [registerTable, { reload, }] = useTable({
title: 'Pybg列表',
api: getMesCheliangPybgPage,
api: getMesCheliangBgPage,
rowKey: 'id',
columns: filterColumns,
pagination: {
......@@ -270,7 +270,7 @@
okText: '确认',
cancelText: '取消',
onOk() {
deleteMesCheliangPybg(ids).then((_) => {
deleteMesCheliangBg(ids).then((_) => {
handleSuccess();
notification.success({
message: 'Tip',
......
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