From 81b2a3e99bdcc57735f19f20d786acac8f6e191d Mon Sep 17 00:00:00 2001 From: b2894lxlx <517289602@qq.com> Date: Fri, 31 Jul 2026 01:32:41 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=A4=A7=E9=87=8F=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E8=B0=83=E6=95=B4=202=E3=80=81=E5=AE=8C=E5=96=84=E8=BF=90?= =?UTF-8?q?=E5=8A=9B=E6=A8=A1=E5=9D=97=203=E3=80=81=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E8=A7=84=E8=8C=83=E3=80=81=E9=9C=80=E6=B1=82=E5=8D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AGENTS.md | 16 +- src/api/base/common-address.js | 11 - src/components/image-upload-field/main.vue | 89 ++ src/main.js | 2 +- src/option/base/cargo-type.js | 9 +- src/option/base/common-address.js | 113 +- src/option/business/common-cargo.js | 102 +- src/option/business/common-route.js | 42 +- src/option/business/common.js | 6 +- src/option/business/process-config.js | 226 ++-- src/option/transportCapacity/driver.js | 138 +- .../transportCapacity/transport-ship.js | 46 +- .../transportCapacity/transport-vehicle.js | 45 +- src/option/vehicle/accident-record.js | 23 +- .../vehicle/annual-inspection-record.js | 21 +- src/option/vehicle/etc-record.js | 2 +- src/option/vehicle/insurance-record.js | 23 +- src/option/vehicle/mileage-record.js | 23 +- src/option/vehicle/oil-electric-record.js | 21 +- src/option/vehicle/other-expense-record.js | 2 +- src/option/vehicle/tire-replacement-record.js | 23 +- src/option/vehicle/transport-change-record.js | 23 +- src/option/vehicle/violation-record.js | 23 +- src/styles/element-ui.scss | 3 + src/utils/search-range.js | 27 + src/views/base/airport-master.vue | 2 +- src/views/base/cargo-type.vue | 69 +- src/views/base/common-address.vue | 962 +++++++++----- src/views/base/currency.vue | 2 +- src/views/base/customer-type.vue | 2 +- src/views/base/fee-item.vue | 2 +- src/views/base/port-terminal.vue | 2 +- src/views/base/railway-station.vue | 2 +- src/views/business/common-cargo.vue | 634 ++++++++- src/views/business/common-route.vue | 657 +++++++++- src/views/business/process-config.vue | 1141 ++++++++++++++++- src/views/transportCapacity/driver.vue | 436 ++++--- src/views/transportCapacity/ship.vue | 954 ++++++++++---- src/views/transportCapacity/vehicle.vue | 779 ++++++----- src/views/vehicle/accident-record.vue | 16 +- .../vehicle/credit-score-quantification.vue | 36 +- src/views/vehicle/customer-archive.vue | 37 +- src/views/vehicle/insurance-record.vue | 101 +- src/views/vehicle/maintenance-plan.vue | 39 +- src/views/vehicle/maintenance-record.vue | 39 +- src/views/vehicle/mileage-record.vue | 17 +- src/views/vehicle/tire-replacement-record.vue | 16 +- src/views/vehicle/transport-change-record.vue | 16 +- src/views/vehicle/violation-record.vue | 16 +- 需求卡/常用地址需求卡.md | 94 +- 需求卡/常用线路需求卡.md | 83 +- 需求卡/常用货物需求卡.md | 127 +- 需求卡/货物类型管理需求卡.md | 162 +-- 需求卡/过程配置需求卡.md | 104 +- 54 files changed, 5641 insertions(+), 1965 deletions(-) create mode 100644 src/components/image-upload-field/main.vue create mode 100644 src/utils/search-range.js diff --git a/AGENTS.md b/AGENTS.md index 8dcc271..ff0870d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -172,7 +172,7 @@ Avue 表格/表单配置独立存放于 `src/option/` 目录,与 `views` 和 ` - 分页组件整体靠右展示,必须展示接口返回的数据总条数,`X条/页` 的页容量选择器必须放在总条数右侧。 - `.basic-container__card` 的直接子级 `.el-card__body` 内边距统一去除,保持 `padding: 0` - 所有 CRUD 页面搜索栏需与下方表格拆分为独立区域,两者垂直间距统一为 `8px`。 -- 所有 CRUD 页面搜索栏操作按钮(搜索、清空等)需在搜索表单下方独占一行并放置在最右侧;搜索条件超过两行时必须显示“展开/折叠”,默认折叠且仅展示两行搜索条件。 +- 所有 CRUD 页面搜索栏操作按钮(搜索、清空等)需在搜索表单下方独占一行并放置在最右侧;搜索条件超过一行时必须显示“展开/折叠”,默认折叠且仅展示一行搜索条件;一行布局默认展示 4 个筛选项,Avue 配置统一使用 `searchIndex: 4`。 - 所有 CRUD 页面中新增、批量导入等顶部按钮组行不需要背景色,应保持透明背景。 - 所有 `.basic-container__card` 内的 Avue 内层 `el-card` 需去卡片化,仅保留外层容器卡片样式,禁止出现二级卡片边框、阴影或额外内边距。 @@ -213,6 +213,20 @@ Avue 表格/表单配置独立存放于 `src/option/` 目录,与 `views` 和 ` - 表格的排序默认按照创建时间降序;分页列表应由后端默认按 `create_time DESC` 返回,前端不得在无明确业务要求时覆盖为其它默认排序。 +### 4.11 搜索顺序规范 + +- 当用户已明确列出筛选字段时,搜索栏必须严格按照用户给出的字段清单和顺序展示;不得自行新增、保留、推断或迁移未列出的筛选项。 +- 新增/编辑表单字段、表格列字段和搜索筛选字段必须分开理解;除非用户明确要求同步,禁止把表单字段或表格字段擅自加入搜索栏。 +- Avue 搜索栏的字段展示顺序按 `searchOrder` **倒序** 渲染,配置时数值越大越靠前。 + +### 4.12 日期区间搜索规范 + +- 当同一业务维度的筛选条件是开始/结束日期或时间,并且接口按区间查询时,前端搜索栏必须合并为一个 `searchRange: true` 的区间字段展示。 +- 区间字段在页面层统一归一化为后端所需的起止参数,禁止同时保留两个独立的“开始/结束”搜索项。 +- 若用户已明确要求展示区间样式,必须严格按区间控件实现,不得退回为两个普通日期控件。 +- 修改搜索项顺序时必须同步调整 `searchOrder`,不要依赖 `column` 数组前后位置来控制搜索栏顺序。 +- `searchIndex: 4` 仅控制首屏展示数量,不影响 `searchOrder` 的优先级。 + --- ## 5. 新功能开发流程 diff --git a/src/api/base/common-address.js b/src/api/base/common-address.js index 0b8eab0..8763ff3 100644 --- a/src/api/base/common-address.js +++ b/src/api/base/common-address.js @@ -39,14 +39,3 @@ export const remove = ids => { }, }); }; - -export const getSourceOptions = (addressType, keyword) => { - return request({ - url: '/blade-transport/common-address/source-options', - method: 'get', - params: { - addressType, - keyword, - }, - }); -}; diff --git a/src/components/image-upload-field/main.vue b/src/components/image-upload-field/main.vue new file mode 100644 index 0000000..608fb83 --- /dev/null +++ b/src/components/image-upload-field/main.vue @@ -0,0 +1,89 @@ + + + diff --git a/src/main.js b/src/main.js index f272a6b..10815b8 100644 --- a/src/main.js +++ b/src/main.js @@ -78,7 +78,7 @@ app.use(Avue, { calcHeight: 10, crudOption: { searchIcon: true, - searchIndex: 8, + searchIndex: 4, searchLabelWidth: 160, searchMenuSpan: 24, searchMenuPosition: 'right', diff --git a/src/option/base/cargo-type.js b/src/option/base/cargo-type.js index 7bb3b0a..5383f69 100644 --- a/src/option/base/cargo-type.js +++ b/src/option/base/cargo-type.js @@ -34,10 +34,10 @@ export const getCargoTypeOption = ctx => ({ saveBtnText: '提交', updateBtnText: '提交', searchShow: true, - searchIcon: false, + searchIcon: true, searchLabelWidth: 50, searchMenuSpan: 10, - searchIndex: 8, + searchIndex: 4, searchMenuPosition: 'right', border: true, index: true, @@ -71,7 +71,7 @@ export const getCargoTypeOption = ctx => ({ formslot: true, hide: true, display: false, - span: 24, + span: 12, rules: [{ required: true, message: '请选择上级货物类型', trigger: 'change' }], }, { @@ -85,7 +85,7 @@ export const getCargoTypeOption = ctx => ({ minWidth: 160, }, { - label: '上级货物类型编码', + label: '上级货物编码', prop: 'parentCargoCode', slot: true, readonly: true, @@ -93,6 +93,7 @@ export const getCargoTypeOption = ctx => ({ addDisplay: false, editDisplay: false, display: false, + span: 12, minWidth: 160, rules: [{ required: true, message: '请选择上级货物类型', trigger: 'change' }], }, diff --git a/src/option/base/common-address.js b/src/option/base/common-address.js index 013062f..9ffed4a 100644 --- a/src/option/base/common-address.js +++ b/src/option/base/common-address.js @@ -5,15 +5,17 @@ export const addressTypeOptions = [ { label: '空港机场', value: '空港机场' }, ]; -export const createOption = ({ validateLongitude, validateLatitude }) => ({ +export const createOption = () => ({ height: 'auto', calcHeight: 32, dialogWidth: 980, + labelPosition: 'right', + labelWidth: 'auto', tip: false, searchShow: true, searchMenuSpan: 24, searchIcon: true, - searchIndex: 8, + searchIndex: 4, searchMenuPosition: 'right', border: true, index: true, @@ -27,12 +29,64 @@ export const createOption = ({ validateLongitude, validateLatitude }) => ({ dialogClickModal: false, menuWidth: 180, column: [ + { + label: '类型', + prop: 'addressType', + type: 'select', + formslot: true, + search: true, + span: 24, + dicData: addressTypeOptions, + rules: [{ required: true, message: '请选择类型', trigger: 'change' }], + }, + { + label: '港口', + prop: 'portId', + formslot: true, + hide: true, + display: false, + span: 12, + rules: [{ required: true, message: '请选择港口', trigger: 'change' }], + }, + { + label: '码头', + prop: 'terminalId', + formslot: true, + hide: true, + display: false, + span: 12, + rules: [{ required: true, message: '请选择码头', trigger: 'change' }], + }, + { + label: '车站名称', + prop: 'stationId', + formslot: true, + hide: true, + display: false, + span: 24, + rules: [{ required: true, message: '请选择车站名称', trigger: 'change' }], + }, + { + label: '机场标准名称', + prop: 'airportId', + formslot: true, + hide: true, + display: false, + span: 24, + rules: [{ required: true, message: '请选择机场标准名称', trigger: 'change' }], + }, { label: '地址名称', prop: 'addressName', search: true, + span: 24, minWidth: 150, - rules: [{ required: true, message: '请输入地址名称', trigger: 'blur' }], + maxlength: 100, + showWordLimit: true, + rules: [ + { required: true, message: '请输入地址名称', trigger: 'blur' }, + { max: 100, message: '地址名称不能超过100个字', trigger: 'blur' }, + ], }, { label: '地址编号', @@ -41,21 +95,6 @@ export const createOption = ({ validateLongitude, validateLatitude }) => ({ addDisplay: false, editDisplay: false, }, - { - label: '类型', - prop: 'addressType', - type: 'select', - search: true, - dicData: addressTypeOptions, - rules: [{ required: true, message: '请选择类型', trigger: 'change' }], - }, - { - label: '来源主数据', - prop: 'sourceId', - formslot: true, - hide: true, - span: 24, - }, { label: '站点编码', prop: 'siteCodeDisplay', @@ -72,6 +111,14 @@ export const createOption = ({ validateLongitude, validateLatitude }) => ({ addDisplay: false, editDisplay: false, }, + { + label: '行政区划', + prop: 'regionName', + search: true, + display: false, + minWidth: 150, + rules: [{ required: true, message: '请选择行政区划', trigger: 'change' }], + }, { label: '详细地址', prop: 'detailAddress', @@ -81,28 +128,10 @@ export const createOption = ({ validateLongitude, validateLatitude }) => ({ minRows: 3, span: 24, minWidth: 220, - rules: [{ required: true, message: '请输入详细地址', trigger: 'blur' }], - }, - { - label: '经度', - prop: 'longitude', - formslot: true, - minWidth: 120, - rules: [{ validator: validateLongitude, trigger: 'blur' }], - }, - { - label: '纬度', - prop: 'latitude', - formslot: true, - minWidth: 120, - rules: [{ validator: validateLatitude, trigger: 'blur' }], - }, - { - label: '行政区划', - prop: 'regionName', - search: true, - minWidth: 150, - rules: [{ required: true, message: '请输入行政区划', trigger: 'blur' }], + rules: [ + { required: true, message: '请输入详细地址', trigger: 'blur' }, + { max: 255, message: '详细地址不能超过255个字', trigger: 'blur' }, + ], }, { label: '组织', @@ -125,12 +154,16 @@ export const createOption = ({ validateLongitude, validateLatitude }) => ({ prop: 'contactName', search: true, minWidth: 110, + maxlength: 50, + rules: [{ max: 50, message: '联系人不能超过50个字', trigger: 'blur' }], }, { label: '联系方式', prop: 'contactPhone', search: true, minWidth: 130, + maxlength: 20, + rules: [{ max: 20, message: '联系方式不能超过20个字', trigger: 'blur' }], }, { label: '备注', diff --git a/src/option/business/common-cargo.js b/src/option/business/common-cargo.js index cc92f26..6e51b67 100644 --- a/src/option/business/common-cargo.js +++ b/src/option/business/common-cargo.js @@ -1,10 +1,8 @@ import { auditColumns, createCrudOption, - nonNegativeRule, packageOptions, priceUnitOptions, - selectRule, textRule, } from './common'; @@ -15,67 +13,81 @@ export const config = { exportName: '常用货物', importUrl: '/blade-transport/common-cargo/import-common-cargo', templateUrl: '/blade-transport/common-cargo/export-template', - enableAllDept: true, + enableAllDept: false, }; export const option = createCrudOption([ - { - label: '组织', - prop: 'deptName', - search: true, - minWidth: 150, - addDisplay: false, - editDisplay: false, - }, { label: '一级货物类型', prop: 'firstCargoTypeName', + formslot: true, search: true, + searchOrder: 3, minWidth: 150, editDisabled: true, - rules: textRule('一级货物类型', 100, true), + rules: [{ required: true, message: '请选择一级货物类型', trigger: 'change' }], }, { label: '一级货物类型编码', prop: 'firstCargoTypeCode', hide: true, + display: false, + addDisplay: false, editDisabled: true, }, { label: '二级货物类型', prop: 'secondCargoTypeName', + formslot: true, search: true, + searchOrder: 4, minWidth: 150, editDisabled: true, - rules: textRule('二级货物类型', 100, true), + rules: [{ required: true, message: '请选择二级货物类型', trigger: 'change' }], }, { label: '二级货物类型编码', prop: 'secondCargoTypeCode', - search: true, - minWidth: 150, + hide: true, + display: false, + addDisplay: false, editDisabled: true, - rules: textRule('二级货物类型编码', 20, true), }, { label: '货物名称', prop: 'cargoName', search: true, + searchOrder: 1, minWidth: 150, rules: textRule('货物名称', 100, true), }, { label: '货物编号', prop: 'cargoCode', + formslot: true, search: true, + searchOrder: 2, minWidth: 120, - editDisabled: true, - rules: textRule('货物编号', 20, true), + maxlength: 20, + showWordLimit: true, + rules: [ + { required: true, message: '请输入货物编号', trigger: 'blur' }, + { max: 20, message: '货物编号不能超过20个字符', trigger: 'blur' }, + ], + }, + { + label: '组织', + prop: 'deptName', + search: true, + searchOrder: 5, + minWidth: 150, + addDisplay: false, + editDisplay: false, }, { label: '品牌', prop: 'brand', - search: true, + search: false, minWidth: 120, rules: textRule('品牌', 50), }, @@ -89,11 +101,32 @@ export const option = createCrudOption([ { label: '货值', prop: 'cargoValue', - type: 'number', - precision: 2, - min: 0, + formslot: true, + minWidth: 120, + rules: [ + { + validator: (rule, value, callback) => { + if (value === undefined || value === null || value === '') { + callback(); + return; + } + if (!/^\d+(\.\d{1,2})?$/.test(String(value))) { + callback(new Error('货值只能输入数字,最多保留2位小数')); + return; + } + callback(); + }, + trigger: 'blur', + }, + ], + }, + { + label: '计价单位', + prop: 'priceUnit', + type: 'select', + dicData: priceUnitOptions, + display: false, minWidth: 120, - rules: [nonNegativeRule('货值')], }, { label: '规格', @@ -101,13 +134,6 @@ export const option = createCrudOption([ minWidth: 120, rules: textRule('规格', 50), }, - { - label: '计价单位', - prop: 'priceUnit', - type: 'select', - dicData: priceUnitOptions, - minWidth: 120, - }, { label: '型号', prop: 'model', @@ -115,22 +141,10 @@ export const option = createCrudOption([ rules: textRule('型号', 50), }, { - label: '说明1', + label: '说明', prop: 'descriptionOne', minWidth: 160, - rules: textRule('说明1', 100), - }, - { - label: '尺寸', - prop: 'sizeText', - minWidth: 120, - rules: textRule('尺寸', 50), - }, - { - label: '说明2', - prop: 'descriptionTwo', - minWidth: 160, - rules: textRule('说明2', 100), + rules: textRule('说明', 100), }, { label: '数据来源', diff --git a/src/option/business/common-route.js b/src/option/business/common-route.js index 947a99f..507b23e 100644 --- a/src/option/business/common-route.js +++ b/src/option/business/common-route.js @@ -5,44 +5,44 @@ export const config = { permission: 'common_route', exportUrl: '/blade-transport/common-route/export-common-route', exportName: '常用线路', - enableAllDept: true, + enableAllDept: false, }; export const option = createCrudOption([ { - label: '组织', - prop: 'deptName', + label: '线路名称', + prop: 'routeName', search: true, + searchOrder: 1, + span: 24, minWidth: 150, - addDisplay: false, - editDisplay: false, + rules: textRule('线路名称', 100, true), }, { label: '线路编号', prop: 'routeCode', search: true, + searchOrder: 2, minWidth: 120, addDisplay: false, editDisabled: true, }, - { - label: '线路名称', - prop: 'routeName', - search: true, - minWidth: 150, - rules: textRule('线路名称', 100, true), - }, { label: '发货地', prop: 'departureName', search: true, + searchOrder: 3, minWidth: 140, - rules: textRule('发货地', 100, true), + addDisplay: false, + editDisplay: false, }, { label: '发货地址', prop: 'departureAddress', + formslot: true, search: true, + searchOrder: 4, + span: 24, minWidth: 220, rules: textRule('发货地址', 255, true), }, @@ -78,13 +78,18 @@ export const option = createCrudOption([ label: '收货地', prop: 'arrivalName', search: true, + searchOrder: 5, minWidth: 140, - rules: textRule('收货地', 100, true), + addDisplay: false, + editDisplay: false, }, { label: '收货地址', prop: 'arrivalAddress', + formslot: true, search: true, + searchOrder: 6, + span: 24, minWidth: 220, rules: textRule('收货地址', 255, true), }, @@ -116,6 +121,15 @@ export const option = createCrudOption([ minWidth: 140, rules: [phoneRule('收货联系方式'), ...textRule('收货联系方式', 50)], }, + { + label: '组织', + prop: 'deptName', + search: true, + searchOrder: 7, + minWidth: 150, + addDisplay: false, + editDisplay: false, + }, { label: '备注', prop: 'remark', diff --git a/src/option/business/common.js b/src/option/business/common.js index f158f9f..1aa92b6 100644 --- a/src/option/business/common.js +++ b/src/option/business/common.js @@ -156,7 +156,9 @@ export const textRule = (label, max, required = false) => { return rules; }; -export const selectRule = label => [{ required: true, message: `请选择${label}`, trigger: 'change' }]; +export const selectRule = label => [ + { required: true, message: `请选择${label}`, trigger: 'change' }, +]; export const nonNegativeRule = label => ({ validator: (rule, value, callback) => { @@ -189,7 +191,7 @@ export const createCrudOption = columns => ({ searchShow: true, searchMenuSpan: 24, searchIcon: true, - searchIndex: 8, + searchIndex: 4, searchMenuPosition: 'right', border: true, index: true, diff --git a/src/option/business/process-config.js b/src/option/business/process-config.js index 1a8c09a..bed6548 100644 --- a/src/option/business/process-config.js +++ b/src/option/business/process-config.js @@ -1,103 +1,147 @@ -import { auditColumns, createCrudOption, nodeOptions, processStatusOptions, selectRule, textRule } from './common'; +import { + auditColumns, + createCrudOption, + nodeOptions, + processStatusOptions, + selectRule, + textRule, +} from './common'; export const config = { title: '过程配置', permission: 'process_config', exportUrl: '/blade-transport/process-config/export-process-config', exportName: '过程配置', - enableAllDept: true, + enableAllDept: false, actions: ['copy', 'enable', 'disable'], statusProp: 'status', statusTextProp: 'statusName', deleteStatus: [0, 2], }; -export const option = createCrudOption([ - { - label: '配置编号', - prop: 'configCode', - search: true, - minWidth: 130, - addDisplay: false, - editDisabled: true, - }, - { - label: '配置名称', - prop: 'configName', - search: true, - minWidth: 150, - rules: textRule('配置名称', 100, true), - }, - { - label: '项目ID集合', - prop: 'projectIds', - hide: true, - rules: textRule('项目ID集合', 1000, true), - }, - { - label: '项目', - prop: 'projectNames', - search: true, - type: 'textarea', - minRows: 2, - minWidth: 180, - rules: textRule('项目', 1000, true), - }, - { - label: '包含过程节点', - prop: 'includedNodes', - search: true, - type: 'select', - multiple: true, - dicData: nodeOptions, - minWidth: 180, - rules: selectRule('包含过程节点'), - }, - { - label: '默认完成运输天数', - prop: 'defaultFinishDays', - type: 'number', - min: 1, - max: 999, - minWidth: 150, - }, - { - label: '状态', - prop: 'status', - type: 'select', - search: true, - dicData: processStatusOptions, - slot: true, - minWidth: 100, - addDisplay: false, - editDisplay: false, - }, - { - label: '所属组织', - prop: 'deptName', - search: true, - minWidth: 150, - addDisplay: false, - editDisplay: false, - }, - { - label: '节点配置JSON', - prop: 'nodeConfigJson', - type: 'textarea', - minRows: 6, - span: 24, - hide: true, - }, - { - label: '备注', - prop: 'remark', - type: 'textarea', - minRows: 4, - span: 24, - hide: true, - maxlength: 500, - showWordLimit: true, - rules: textRule('备注', 500), - }, - ...auditColumns, -]); +export const option = { + ...createCrudOption([ + { + label: '', + prop: 'basicInfo', + formslot: true, + span: 24, + hide: true, + }, + { + label: '配置编号', + prop: 'configCode', + search: true, + searchOrder: 4, + minWidth: 130, + addDisplay: false, + editDisplay: false, + editDisabled: true, + }, + { + label: '配置名称', + prop: 'configName', + search: true, + searchOrder: 6, + span: 12, + minWidth: 150, + addDisplay: false, + editDisplay: false, + rules: textRule('配置名称', 100, true), + }, + { + label: '项目ID集合', + prop: 'projectIds', + hide: true, + display: false, + addDisplay: false, + editDisplay: false, + rules: textRule('项目ID集合', 1000, true), + }, + { + label: '项目', + prop: 'projectNames', + formslot: true, + search: true, + searchOrder: 5, + searchType: 'select', + type: 'textarea', + minRows: 2, + span: 12, + minWidth: 180, + dicData: [], + filterable: true, + addDisplay: false, + editDisplay: false, + rules: textRule('项目', 1000, true), + }, + { + label: '包含过程节点', + prop: 'includedNodes', + search: true, + searchOrder: 3, + type: 'select', + multiple: true, + dicData: nodeOptions, + minWidth: 180, + rules: selectRule('包含过程节点'), + }, + { + label: '默认完成运输天数', + prop: 'defaultFinishDays', + formslot: true, + type: 'number', + min: 1, + max: 999, + span: 12, + minWidth: 150, + addDisplay: false, + editDisplay: false, + }, + { + label: '状态', + prop: 'status', + type: 'select', + search: true, + searchOrder: 1, + dicData: processStatusOptions, + slot: true, + minWidth: 100, + addDisplay: false, + editDisplay: false, + }, + { + label: '组织', + prop: 'deptName', + search: true, + searchOrder: 2, + minWidth: 150, + addDisplay: false, + editDisplay: false, + }, + { + label: '', + prop: 'nodeConfigJson', + formslot: true, + span: 24, + hide: true, + }, + { + label: '备注', + prop: 'remark', + type: 'textarea', + minRows: 4, + span: 24, + hide: true, + addDisplay: false, + editDisplay: false, + maxlength: 500, + showWordLimit: true, + rules: textRule('备注', 500), + }, + ...auditColumns, + ]), + dialogTop: '10px', + dialogWidth: '96%', + searchSpan: 8, +}; diff --git a/src/option/transportCapacity/driver.js b/src/option/transportCapacity/driver.js index 0e73b34..922a54a 100644 --- a/src/option/transportCapacity/driver.js +++ b/src/option/transportCapacity/driver.js @@ -5,7 +5,7 @@ export const option = { searchShow: true, searchMenuSpan: 24, searchIcon: true, - searchIndex: 8, + searchIndex: 4, searchMenuPosition: 'right', border: true, index: true, @@ -21,76 +21,61 @@ export const option = { label: '姓名', prop: 'driverName', search: true, + searchOrder: 7, slot: true, width: 110, }, { - label: '身份证号', - prop: 'idCardNo', - search: true, - width: 190, - }, - { - label: '手机号码', + label: '手机号', prop: 'mobile', search: true, + searchOrder: 6, width: 130, }, - { - label: '性别', - prop: 'gender', - width: 80, - align: 'center', - }, - { - label: '司机类型', - prop: 'driverType', - search: true, - type: 'select', - dicData: [ - { - label: '自有', - value: '自有', - }, - { - label: '外协', - value: '外协', - }, - ], - width: 100, - align: 'center', - }, - { - label: '岗位', - prop: 'posts', - width: 150, - }, { label: '准驾车型', prop: 'drivingType', search: true, + searchOrder: 5, + hide: true, + type: 'select', + dicData: [ + { + label: 'A1', + value: 'A1', + }, + { + label: 'A2', + value: 'A2', + }, + { + label: 'A3', + value: 'A3', + }, + { + label: 'B1', + value: 'B1', + }, + { + label: 'B2', + value: 'B2', + }, + { + label: 'C1', + value: 'C1', + }, + { + label: 'C2', + value: 'C2', + }, + ], width: 110, }, - { - label: '所属组织', - prop: 'organizationName', - type: 'cascader', - search: true, - emitPath: false, - checkStrictly: true, - filterable: true, - dicData: [], - props: { - label: 'label', - value: 'value', - children: 'children', - }, - width: 140, - }, { label: '状态', prop: 'status', search: true, + searchOrder: 4, type: 'select', slot: true, dicData: [ @@ -106,6 +91,53 @@ export const option = { width: 90, align: 'center', }, + { + label: '司机类型', + prop: 'driverType', + search: true, + searchOrder: 3, + type: 'select', + dicData: [ + { + label: '自有员工', + value: '自有', + }, + { + label: '外协', + value: '外协', + }, + ], + width: 100, + align: 'center', + }, + { + label: '身份证号', + prop: 'idCardNo', + search: true, + searchOrder: 2, + width: 190, + }, + { + label: '所属组织', + prop: 'organizationName', + search: true, + searchOrder: 1, + type: 'select', + filterable: true, + dicData: [], + width: 140, + }, + { + label: '性别', + prop: 'gender', + width: 80, + align: 'center', + }, + { + label: '岗位', + prop: 'posts', + width: 150, + }, { label: '驾驶认证', prop: 'drivingLicenseEndDate', diff --git a/src/option/transportCapacity/transport-ship.js b/src/option/transportCapacity/transport-ship.js index 74dc53c..28adf75 100644 --- a/src/option/transportCapacity/transport-ship.js +++ b/src/option/transportCapacity/transport-ship.js @@ -5,7 +5,7 @@ export const option = { searchShow: true, searchMenuSpan: 24, searchIcon: true, - searchIndex: 8, + searchIndex: 4, searchMenuPosition: 'right', border: true, index: true, @@ -17,29 +17,49 @@ export const option = { menuWidth: 210, dialogClickModal: false, column: [ - { label: '船舶名', prop: 'shipName', search: true, slot: true, width: 130 }, - { label: '船舶识别号', prop: 'shipIdentifierNo', search: true, width: 140 }, - { label: '所属组织', prop: 'organizationName', search: true, width: 160 }, - { label: '船检登记号', prop: 'shipInspectionNo', search: true, width: 130 }, + { label: '船舶名', prop: 'shipName', search: true, searchOrder: 5, slot: true, width: 130 }, + { + label: '船舶识别号', + prop: 'shipIdentifierNo', + search: true, + searchOrder: 4, + width: 140, + }, + { + label: '船检登记号', + prop: 'shipInspectionNo', + search: true, + searchOrder: 3, + width: 130, + }, { label: '船舶类型', prop: 'shipType', search: true, + searchOrder: 2, type: 'select', dicData: [ - { label: '干货船', value: '干货船' }, - { label: '集装箱船', value: '集装箱船' }, { label: '散货船', value: '散货船' }, + { label: '集装箱船', value: '集装箱船' }, + { label: '杂货船', value: '杂货船' }, { label: '油船', value: '油船' }, - { label: '拖轮', value: '拖轮' }, ], width: 110, align: 'center', }, + { + label: '所属组织', + prop: 'organizationName', + search: true, + searchOrder: 1, + type: 'select', + filterable: true, + dicData: [], + width: 160, + }, { label: '状态', prop: 'status', - search: true, type: 'select', slot: true, dicData: [ @@ -49,7 +69,13 @@ export const option = { width: 90, align: 'center', }, - { label: '国籍证有效期至', prop: 'nationalityCertEndDate', slot: true, width: 150, align: 'center' }, + { + label: '国籍证有效期至', + prop: 'nationalityCertEndDate', + slot: true, + width: 150, + align: 'center', + }, { label: '最低安全配员证书有效期至', prop: 'safeManningCertEndDate', diff --git a/src/option/transportCapacity/transport-vehicle.js b/src/option/transportCapacity/transport-vehicle.js index 5523a36..b4f6b0a 100644 --- a/src/option/transportCapacity/transport-vehicle.js +++ b/src/option/transportCapacity/transport-vehicle.js @@ -5,7 +5,7 @@ export const option = { searchShow: true, searchMenuSpan: 24, searchIcon: true, - searchIndex: 8, + searchIndex: 4, searchMenuPosition: 'right', border: true, index: true, @@ -21,6 +21,7 @@ export const option = { label: '车牌号', prop: 'plateNo', search: true, + searchOrder: 5, slot: true, width: 120, }, @@ -28,46 +29,41 @@ export const option = { label: '所属组织', prop: 'organizationName', search: true, - width: 150, - }, - { - label: '车辆类型', - prop: 'vehicleType', - search: true, + searchOrder: 1, type: 'select', - dicData: [ - { label: '厢式', value: '厢式' }, - { label: '高栏', value: '高栏' }, - { label: '平板', value: '平板' }, - { label: '仓栅', value: '仓栅' }, - { label: '牵引车', value: '牵引车' }, - ], - width: 110, - align: 'center', + filterable: true, + dicData: [], + width: 150, }, { label: '业务关系', prop: 'businessRelation', search: true, + searchOrder: 4, type: 'select', dicData: [ + { label: '全部', value: '' }, { label: '自有', value: '自有' }, - { label: '业务合作', value: '业务合作' }, { label: '管理挂靠', value: '管理挂靠' }, + { label: '业务合作', value: '业务合作' }, ], width: 120, align: 'center', }, { - label: '能源类型', - prop: 'energyType', + label: '车辆类型', + prop: 'vehicleType', search: true, + searchOrder: 3, type: 'select', dicData: [ - { label: '柴油', value: '柴油' }, - { label: '汽油', value: '汽油' }, - { label: '新能源', value: '新能源' }, - { label: '天然气', value: '天然气' }, + { label: '全部', value: '' }, + { label: '高栏车', value: '高栏' }, + { label: '低栏车', value: '低栏' }, + { label: '平板车', value: '平板' }, + { label: '厢式车', value: '厢式' }, + { label: '拖挂车', value: '拖挂' }, + { label: '半挂车', value: '半挂' }, ], width: 110, align: 'center', @@ -79,9 +75,10 @@ export const option = { align: 'right', }, { - label: '状态', + label: '车辆状态', prop: 'status', search: true, + searchOrder: 2, type: 'select', slot: true, dicData: [ diff --git a/src/option/vehicle/accident-record.js b/src/option/vehicle/accident-record.js index 8b55c90..d5ef2a7 100644 --- a/src/option/vehicle/accident-record.js +++ b/src/option/vehicle/accident-record.js @@ -45,7 +45,7 @@ export const option = { searchShow: true, searchMenuSpan: 24, searchIcon: true, - searchIndex: 8, + searchIndex: 4, searchMenuPosition: 'right', border: true, index: true, @@ -211,22 +211,13 @@ export const option = { minWidth: 170, }, { - label: '创建开始时间', - prop: 'createTimeStart', + label: '创建时间', + prop: 'createTimeRange', type: 'date', - format: 'YYYY-MM-DD 00:00:00', - valueFormat: 'YYYY-MM-DD 00:00:00', - hide: true, - addDisplay: false, - editDisplay: false, - viewDisplay: false, - }, - { - label: '创建结束时间', - prop: 'createTimeEnd', - type: 'date', - format: 'YYYY-MM-DD 23:59:59', - valueFormat: 'YYYY-MM-DD 23:59:59', + format: 'YYYY-MM-DD', + valueFormat: 'YYYY-MM-DD', + searchRange: true, + search: true, hide: true, addDisplay: false, editDisplay: false, diff --git a/src/option/vehicle/annual-inspection-record.js b/src/option/vehicle/annual-inspection-record.js index 7e43d88..82937d1 100644 --- a/src/option/vehicle/annual-inspection-record.js +++ b/src/option/vehicle/annual-inspection-record.js @@ -44,7 +44,7 @@ export const option = { searchShow: true, searchMenuSpan: 24, searchIcon: true, - searchIndex: 8, + searchIndex: 4, searchMenuPosition: 'right', border: true, index: true, @@ -215,22 +215,11 @@ export const option = { minWidth: 170, }, { - label: '创建开始时间', - prop: 'createTimeStart', + label: '创建时间', + prop: 'createTimeRange', type: 'date', - format: 'YYYY-MM-DD 00:00:00', - valueFormat: 'YYYY-MM-DD 00:00:00', - hide: true, - addDisplay: false, - editDisplay: false, - viewDisplay: false, - }, - { - label: '创建结束时间', - prop: 'createTimeEnd', - type: 'date', - format: 'YYYY-MM-DD 23:59:59', - valueFormat: 'YYYY-MM-DD 23:59:59', + format: 'YYYY-MM-DD', + valueFormat: 'YYYY-MM-DD', hide: true, addDisplay: false, editDisplay: false, diff --git a/src/option/vehicle/etc-record.js b/src/option/vehicle/etc-record.js index 9c4158f..422768f 100644 --- a/src/option/vehicle/etc-record.js +++ b/src/option/vehicle/etc-record.js @@ -34,7 +34,7 @@ export const option = { searchShow: true, searchMenuSpan: 24, searchIcon: true, - searchIndex: 8, + searchIndex: 4, searchMenuPosition: 'right', border: true, index: true, diff --git a/src/option/vehicle/insurance-record.js b/src/option/vehicle/insurance-record.js index 8b0a0c2..595e608 100644 --- a/src/option/vehicle/insurance-record.js +++ b/src/option/vehicle/insurance-record.js @@ -42,7 +42,7 @@ export const option = { searchShow: true, searchMenuSpan: 24, searchIcon: true, - searchIndex: 8, + searchIndex: 4, searchMenuPosition: 'right', border: true, index: true, @@ -182,23 +182,12 @@ export const option = { minWidth: 170, }, { - label: '创建开始时间', - prop: 'createTimeStart', + label: '创建时间', + prop: 'createTimeRange', type: 'date', - format: 'YYYY-MM-DD 00:00:00', - valueFormat: 'YYYY-MM-DD 00:00:00', - search: true, - hide: true, - addDisplay: false, - editDisplay: false, - viewDisplay: false, - }, - { - label: '创建结束时间', - prop: 'createTimeEnd', - type: 'date', - format: 'YYYY-MM-DD 23:59:59', - valueFormat: 'YYYY-MM-DD 23:59:59', + format: 'YYYY-MM-DD', + valueFormat: 'YYYY-MM-DD', + searchRange: true, search: true, hide: true, addDisplay: false, diff --git a/src/option/vehicle/mileage-record.js b/src/option/vehicle/mileage-record.js index 76b388d..89c10c4 100644 --- a/src/option/vehicle/mileage-record.js +++ b/src/option/vehicle/mileage-record.js @@ -30,7 +30,7 @@ export const option = { searchShow: true, searchMenuSpan: 24, searchIcon: true, - searchIndex: 8, + searchIndex: 4, searchMenuPosition: 'right', border: true, index: true, @@ -168,23 +168,12 @@ export const option = { minWidth: 170, }, { - label: '创建开始时间', - prop: 'createTimeStart', + label: '创建时间', + prop: 'createTimeRange', type: 'date', - format: 'YYYY-MM-DD 00:00:00', - valueFormat: 'YYYY-MM-DD 00:00:00', - search: true, - hide: true, - addDisplay: false, - editDisplay: false, - viewDisplay: false, - }, - { - label: '创建结束时间', - prop: 'createTimeEnd', - type: 'date', - format: 'YYYY-MM-DD 23:59:59', - valueFormat: 'YYYY-MM-DD 23:59:59', + format: 'YYYY-MM-DD', + valueFormat: 'YYYY-MM-DD', + searchRange: true, search: true, hide: true, addDisplay: false, diff --git a/src/option/vehicle/oil-electric-record.js b/src/option/vehicle/oil-electric-record.js index f778c71..0e96429 100644 --- a/src/option/vehicle/oil-electric-record.js +++ b/src/option/vehicle/oil-electric-record.js @@ -31,7 +31,7 @@ export const option = { searchShow: true, searchMenuSpan: 24, searchIcon: true, - searchIndex: 8, + searchIndex: 4, searchMenuPosition: 'right', border: true, index: true, @@ -227,22 +227,11 @@ export const option = { minWidth: 170, }, { - label: '创建开始时间', - prop: 'createTimeStart', + label: '创建时间', + prop: 'createTimeRange', type: 'date', - format: 'YYYY-MM-DD 00:00:00', - valueFormat: 'YYYY-MM-DD 00:00:00', - hide: true, - addDisplay: false, - editDisplay: false, - viewDisplay: false, - }, - { - label: '创建结束时间', - prop: 'createTimeEnd', - type: 'date', - format: 'YYYY-MM-DD 23:59:59', - valueFormat: 'YYYY-MM-DD 23:59:59', + format: 'YYYY-MM-DD', + valueFormat: 'YYYY-MM-DD', hide: true, addDisplay: false, editDisplay: false, diff --git a/src/option/vehicle/other-expense-record.js b/src/option/vehicle/other-expense-record.js index 3837963..d8309ac 100644 --- a/src/option/vehicle/other-expense-record.js +++ b/src/option/vehicle/other-expense-record.js @@ -42,7 +42,7 @@ export const option = { searchShow: true, searchMenuSpan: 24, searchIcon: true, - searchIndex: 8, + searchIndex: 4, searchMenuPosition: 'right', border: true, index: true, diff --git a/src/option/vehicle/tire-replacement-record.js b/src/option/vehicle/tire-replacement-record.js index ad8f39f..cc7f76e 100644 --- a/src/option/vehicle/tire-replacement-record.js +++ b/src/option/vehicle/tire-replacement-record.js @@ -35,7 +35,7 @@ export const option = { searchShow: true, searchMenuSpan: 24, searchIcon: true, - searchIndex: 8, + searchIndex: 4, searchMenuPosition: 'right', border: true, index: true, @@ -150,23 +150,12 @@ export const option = { minWidth: 170, }, { - label: '创建开始时间', - prop: 'createTimeStart', + label: '创建时间', + prop: 'createTimeRange', type: 'date', - format: 'YYYY-MM-DD 00:00:00', - valueFormat: 'YYYY-MM-DD 00:00:00', - search: true, - hide: true, - addDisplay: false, - editDisplay: false, - viewDisplay: false, - }, - { - label: '创建结束时间', - prop: 'createTimeEnd', - type: 'date', - format: 'YYYY-MM-DD 23:59:59', - valueFormat: 'YYYY-MM-DD 23:59:59', + format: 'YYYY-MM-DD', + valueFormat: 'YYYY-MM-DD', + searchRange: true, search: true, hide: true, addDisplay: false, diff --git a/src/option/vehicle/transport-change-record.js b/src/option/vehicle/transport-change-record.js index e517913..7141397 100644 --- a/src/option/vehicle/transport-change-record.js +++ b/src/option/vehicle/transport-change-record.js @@ -22,7 +22,7 @@ export const option = { searchShow: true, searchMenuSpan: 24, searchIcon: true, - searchIndex: 8, + searchIndex: 4, searchMenuPosition: 'right', border: true, index: true, @@ -105,23 +105,12 @@ export const option = { minWidth: 170, }, { - label: '创建开始时间', - prop: 'createTimeStart', + label: '创建时间', + prop: 'createTimeRange', type: 'date', - format: 'YYYY-MM-DD 00:00:00', - valueFormat: 'YYYY-MM-DD 00:00:00', - search: true, - hide: true, - addDisplay: false, - editDisplay: false, - viewDisplay: false, - }, - { - label: '创建结束时间', - prop: 'createTimeEnd', - type: 'date', - format: 'YYYY-MM-DD 23:59:59', - valueFormat: 'YYYY-MM-DD 23:59:59', + format: 'YYYY-MM-DD', + valueFormat: 'YYYY-MM-DD', + searchRange: true, search: true, hide: true, addDisplay: false, diff --git a/src/option/vehicle/violation-record.js b/src/option/vehicle/violation-record.js index ac593c4..b4a1c43 100644 --- a/src/option/vehicle/violation-record.js +++ b/src/option/vehicle/violation-record.js @@ -53,7 +53,7 @@ export const option = { searchShow: true, searchMenuSpan: 24, searchIcon: true, - searchIndex: 8, + searchIndex: 4, searchMenuPosition: 'right', border: true, index: true, @@ -233,23 +233,12 @@ export const option = { minWidth: 170, }, { - label: '创建开始时间', - prop: 'createTimeStart', + label: '创建时间', + prop: 'createTimeRange', type: 'date', - format: 'YYYY-MM-DD 00:00:00', - valueFormat: 'YYYY-MM-DD 00:00:00', - search: true, - hide: true, - addDisplay: false, - editDisplay: false, - viewDisplay: false, - }, - { - label: '创建结束时间', - prop: 'createTimeEnd', - type: 'date', - format: 'YYYY-MM-DD 23:59:59', - valueFormat: 'YYYY-MM-DD 23:59:59', + format: 'YYYY-MM-DD', + valueFormat: 'YYYY-MM-DD', + searchRange: true, search: true, hide: true, addDisplay: false, diff --git a/src/styles/element-ui.scss b/src/styles/element-ui.scss index 11eabe3..9588ce4 100644 --- a/src/styles/element-ui.scss +++ b/src/styles/element-ui.scss @@ -148,9 +148,12 @@ margin-bottom: 8px; } +.avue-crud__search .avue-form__menu, .avue-crud__search .avue-form__menu--right { display: flex; + flex: 0 0 100%; justify-content: flex-end; + max-width: 100%; width: 100%; } diff --git a/src/utils/search-range.js b/src/utils/search-range.js new file mode 100644 index 0000000..e5723cd --- /dev/null +++ b/src/utils/search-range.js @@ -0,0 +1,27 @@ +export const normalizeSearchRangeParams = (params = {}, rangeMap = {}) => { + const values = { ...params }; + + Object.entries(rangeMap).forEach(([rangeProp, mapping]) => { + const [startProp, endProp, startSuffix = '00:00:00', endSuffix = '23:59:59'] = Array.isArray( + mapping + ) + ? mapping + : [mapping.startProp, mapping.endProp, mapping.startSuffix, mapping.endSuffix]; + + const range = values[rangeProp]; + if (Array.isArray(range) && range.length === 2) { + values[startProp] = range[0] ? `${range[0]} ${startSuffix}` : undefined; + values[endProp] = range[1] ? `${range[1]} ${endSuffix}` : undefined; + } + + delete values[rangeProp]; + }); + + Object.keys(values).forEach(key => { + if (values[key] === undefined || values[key] === null || values[key] === '') { + delete values[key]; + } + }); + + return values; +}; diff --git a/src/views/base/airport-master.vue b/src/views/base/airport-master.vue index 94a245b..01e6453 100644 --- a/src/views/base/airport-master.vue +++ b/src/views/base/airport-master.vue @@ -205,7 +205,7 @@ export default { searchLabelWidth: 160, searchMenuSpan: 24, searchIcon: true, - searchIndex: 8, + searchIndex: 4, searchMenuPosition: 'right', border: true, index: true, diff --git a/src/views/base/cargo-type.vue b/src/views/base/cargo-type.vue index cd908f2..453cb06 100644 --- a/src/views/base/cargo-type.vue +++ b/src/views/base/cargo-type.vue @@ -24,35 +24,33 @@ 新增 - 批量导入 + 批量导入 下载模板 - 批量导出 - 批量删除 + >下载模板 + 批量导出 + 批量删除 + + @@ -68,7 +66,7 @@ clearable :remote-method="loadParentOptions" :loading="parentLoading" - :disabled="dialogType !== 'add' || form.typeLevel !== 2" + :disabled="dialogType === 'view' || form.typeLevel !== 2" placeholder="请输入名称或编码搜索" style="width: 100%" @change="handleParentChange" @@ -99,12 +97,7 @@ > 编辑 - + 删除 @@ -130,13 +123,7 @@ + + diff --git a/src/views/business/common-route.vue b/src/views/business/common-route.vue index 061ef72..a020278 100644 --- a/src/views/business/common-route.vue +++ b/src/views/business/common-route.vue @@ -1,20 +1,669 @@ + + diff --git a/src/views/business/process-config.vue b/src/views/business/process-config.vue index 0387f80..7f7b5c2 100644 --- a/src/views/business/process-config.vue +++ b/src/views/business/process-config.vue @@ -1,20 +1,1155 @@ + + diff --git a/src/views/transportCapacity/driver.vue b/src/views/transportCapacity/driver.vue index 7998569..681a526 100644 --- a/src/views/transportCapacity/driver.vue +++ b/src/views/transportCapacity/driver.vue @@ -1,7 +1,22 @@