diff --git a/web端/运维管理/车辆业务/异动管理-新增.jsx b/web端/运维管理/车辆业务/异动管理-新增.jsx index 91ba2e0..1695fdd 100644 --- a/web端/运维管理/车辆业务/异动管理-新增.jsx +++ b/web端/运维管理/车辆业务/异动管理-新增.jsx @@ -13,6 +13,7 @@ const Component = function () { var Button = antd.Button; var Input = antd.Input; var Select = antd.Select; + var Cascader = antd.Cascader; var DatePicker = antd.DatePicker; var Table = antd.Table; var Modal = antd.Modal; @@ -85,6 +86,15 @@ const Component = function () { ]; }, []); + // 省-市 2 级(与调拨管理筛选一致,原型数据) + var destinationRegionOptions = useMemo(function () { + return [ + { value: 'zhejiang', label: '浙江省', children: [{ value: 'hangzhou', label: '杭州市' }, { value: 'ningbo', label: '宁波市' }, { value: 'jiaxing', label: '嘉兴市' }] }, + { value: 'shanghai', label: '上海市', children: [{ value: 'shanghai', label: '上海市' }] }, + { value: 'guangdong', label: '广东省', children: [{ value: 'guangzhou', label: '广州市' }, { value: 'shenzhen', label: '深圳市' }, { value: 'dongguan', label: '东莞市' }] } + ]; + }, []); + var changeTypeOptions = useMemo(function () { return [ { value: '维修', label: '维修' }, @@ -106,7 +116,8 @@ const Component = function () { '1.1.异动开始日期:必填项,日期选择器,格式为:YYYY-MM-DD HH:MM;', '1.2.异动预计结束日期:必填项,日期选择器,格式为:YYYY-MM-DD HH:MM;', '1.3.异动目的地:必填项,选择器,选项为:停车场、维修站、其他;', - '2.4.目的地名称:必填项,如异动目的地为停车场,则此处为停车场(选择器),如异动目的地为维修站,则此处为维修站(选择器),如异动目的地为其他,则此处为输入框(自定义输入);', + '2.4.目的地名称:必填项,如异动目的地为停车场,则此处为停车场(选择器),如异动目的地为维修站,则此处为维修站(选择器),如异动目的地为其他,则先选目的地所在区域(省-市 2 级级联),再输入目的地名称;', + '2.4.1.目的地所在区域:当异动目的地为「其他」时必填,级联选择器,省-市 2 级,展示在目的地名称前方;', '2.5.异动类型:必填项,选择器,选项为:维修、保养、年审、其他;', '2.6.备注:文本域,支持自定义输入;', '', @@ -130,6 +141,7 @@ const Component = function () { startTime: null, plannedEndTime: null, destinationType: undefined, + destinationRegion: undefined, destinationName: undefined, destinationNameOther: '', changeType: undefined, @@ -235,6 +247,8 @@ const Component = function () { if (!form.plannedEndTime) e.plannedEndTime = '请选择异动预计结束日期'; if (!form.destinationType) e.destinationType = '请选择异动目的地'; if (form.destinationType === '其他') { + var reg = form.destinationRegion; + if (!reg || !Array.isArray(reg) || reg.length < 2) e.destinationRegion = '请选择目的地所在区域(省-市)'; if (!String(form.destinationNameOther || '').trim()) e.destinationName = '请输入目的地名称'; } else { if (!form.destinationName) e.destinationName = '请选择目的地名称'; @@ -494,6 +508,7 @@ const Component = function () { setForm(function (p) { return Object.assign({}, p, { destinationType: v, + destinationRegion: undefined, destinationName: undefined, destinationNameOther: '' }); @@ -506,8 +521,22 @@ const Component = function () { errors.destinationType ? React.createElement('div', { style: { marginTop: 4, color: '#ff4d4f', fontSize: 12 } }, errors.destinationType) : null ), + form.destinationType === '其他' ? React.createElement('div', { style: formItemStyle }, + React.createElement('div', { style: labelStyle }, reqStar, '目的地所在区域'), + React.createElement(Cascader, { + placeholder: '请选择省 / 市', + style: controlStyle, + options: destinationRegionOptions, + value: form.destinationRegion, + onChange: function (v) { updateForm({ destinationRegion: v }); }, + allowClear: true, + changeOnSelect: false, + status: errors.destinationRegion ? 'error' : undefined + }), + errors.destinationRegion ? React.createElement('div', { style: { marginTop: 4, color: '#ff4d4f', fontSize: 12 } }, errors.destinationRegion) : null + ) : undefined, React.createElement('div', { style: formItemStyle }, - React.createElement('div', { style: labelStyle }, reqStar, destinationNameLabel), + React.createElement('div', { style: labelStyle }, reqStar, form.destinationType === '其他' ? '目的地名称' : destinationNameLabel), destinationNameNode, errors.destinationName ? React.createElement('div', { style: { marginTop: 4, color: '#ff4d4f', fontSize: 12 } }, errors.destinationName) : null ), diff --git a/web端/运维管理/车辆业务/异动管理-编辑.jsx b/web端/运维管理/车辆业务/异动管理-编辑.jsx index 0050cdb..f4b60b8 100644 --- a/web端/运维管理/车辆业务/异动管理-编辑.jsx +++ b/web端/运维管理/车辆业务/异动管理-编辑.jsx @@ -13,6 +13,7 @@ const Component = function () { var Button = antd.Button; var Input = antd.Input; var Select = antd.Select; + var Cascader = antd.Cascader; var DatePicker = antd.DatePicker; var Table = antd.Table; var Modal = antd.Modal; @@ -95,6 +96,14 @@ const Component = function () { ]; }, []); + var destinationRegionOptions = useMemo(function () { + return [ + { value: 'zhejiang', label: '浙江省', children: [{ value: 'hangzhou', label: '杭州市' }, { value: 'ningbo', label: '宁波市' }, { value: 'jiaxing', label: '嘉兴市' }] }, + { value: 'shanghai', label: '上海市', children: [{ value: 'shanghai', label: '上海市' }] }, + { value: 'guangdong', label: '广东省', children: [{ value: 'guangzhou', label: '广州市' }, { value: 'shenzhen', label: '深圳市' }, { value: 'dongguan', label: '东莞市' }] } + ]; + }, []); + var changeTypeOptions = useMemo(function () { return [ { value: '维修', label: '维修' }, @@ -117,7 +126,8 @@ const Component = function () { '1.1.异动开始日期:必填项,日期选择器,格式为:YYYY-MM-DD HH:MM;', '1.2.异动预计结束日期:必填项,日期选择器,格式为:YYYY-MM-DD HH:MM;', '1.3.异动目的地:必填项,选择器,选项为:停车场、维修站、其他;', - '2.4.目的地名称:必填项,如异动目的地为停车场,则此处为停车场(选择器),如异动目的地为维修站,则此处为维修站(选择器),如异动目的地为其他,则此处为输入框(自定义输入);', + '2.4.目的地名称:必填项,如异动目的地为停车场,则此处为停车场(选择器),如异动目的地为维修站,则此处为维修站(选择器),如异动目的地为其他,则先选目的地所在区域(省-市 2 级级联),再输入目的地名称;', + '2.4.1.目的地所在区域:当异动目的地为「其他」时必填,级联选择器,省-市 2 级,展示在目的地名称前方;', '2.5.异动类型:必填项,选择器,选项为:维修、保养、年审、其他;', '2.6.备注:文本域,支持自定义输入;', '', @@ -142,6 +152,7 @@ const Component = function () { startTime: getInitialDateTime('2026-02-20 09:30'), plannedEndTime: getInitialDateTime('2026-02-22 18:00'), destinationType: '维修站', + destinationRegion: undefined, destinationName: '广州天河维修站', destinationNameOther: '', changeType: '维修', @@ -260,6 +271,8 @@ const Component = function () { if (!form.plannedEndTime) e.plannedEndTime = '请选择异动预计结束日期'; if (!form.destinationType) e.destinationType = '请选择异动目的地'; if (form.destinationType === '其他') { + var reg = form.destinationRegion; + if (!reg || !Array.isArray(reg) || reg.length < 2) e.destinationRegion = '请选择目的地所在区域(省-市)'; if (!String(form.destinationNameOther || '').trim()) e.destinationName = '请输入目的地名称'; } else { if (!form.destinationName) e.destinationName = '请选择目的地名称'; @@ -519,6 +532,7 @@ const Component = function () { setForm(function (p) { return Object.assign({}, p, { destinationType: v, + destinationRegion: undefined, destinationName: undefined, destinationNameOther: '' }); @@ -531,8 +545,22 @@ const Component = function () { errors.destinationType ? React.createElement('div', { style: { marginTop: 4, color: '#ff4d4f', fontSize: 12 } }, errors.destinationType) : null ), + form.destinationType === '其他' ? React.createElement('div', { style: formItemStyle }, + React.createElement('div', { style: labelStyle }, reqStar, '目的地所在区域'), + React.createElement(Cascader, { + placeholder: '请选择省 / 市', + style: controlStyle, + options: destinationRegionOptions, + value: form.destinationRegion, + onChange: function (v) { updateForm({ destinationRegion: v }); }, + allowClear: true, + changeOnSelect: false, + status: errors.destinationRegion ? 'error' : undefined + }), + errors.destinationRegion ? React.createElement('div', { style: { marginTop: 4, color: '#ff4d4f', fontSize: 12 } }, errors.destinationRegion) : null + ) : undefined, React.createElement('div', { style: formItemStyle }, - React.createElement('div', { style: labelStyle }, reqStar, destinationNameLabel), + React.createElement('div', { style: labelStyle }, reqStar, form.destinationType === '其他' ? '目的地名称' : destinationNameLabel), destinationNameNode, errors.destinationName ? React.createElement('div', { style: { marginTop: 4, color: '#ff4d4f', fontSize: 12 } }, errors.destinationName) : null ), diff --git a/web端/运维管理/车辆业务/异动管理.jsx b/web端/运维管理/车辆业务/异动管理.jsx index bcd18d5..85aad74 100644 --- a/web端/运维管理/车辆业务/异动管理.jsx +++ b/web端/运维管理/车辆业务/异动管理.jsx @@ -130,40 +130,42 @@ const Component = function () { '2.2.异动预计结束日期:显示车辆异动结束日期,格式为:YYYY-MM-DD HH:MM;', '2.3.审批状态:分为:待提交、审批中、审批完成、驳回、撤回;', '2.4.异动目的地:显示车辆异动目的地,选项包括:停车场、维修站、其他;', - '2.5.目的地名称:显示车辆异动目的地名称;', - '2.6.异动类型:显示车辆异动类型,选项包括:维修、保养、年审、其他;', - '2.7.预计异动里程(km):显示车辆预计异动里程;', - '2.8.车牌号:显示车牌号;', - '2.9.异动开始里程(km):显示车辆异动开始里程;', - '2.10.异动开始电量(kWh):显示车辆异动开始电量;', - '2.11.异动开始氢量:显示车辆异动开始氢量,带单位,单位根据型号参数表获取,分为%和MPa;', - '2.12.创建人:显示发起人姓名;', - '2.13.创建时间:显示发起时间,格式为:YYYY-MM-DD HH:MM;', - '2.14.操作:查看、编辑、撤回、结束异动;', - ' 2.14.1.查看:点击跳转异动-查看页;', - ' 2.14.2.编辑:点击跳转异动-编辑页,只有审批状态为:待提交、驳回、撤回时显示编辑;', - ' 2.14.3.撤回:点击进行二次确认,确认后撤回该数据并将审批状态修改为:撤回;', - ' 2.14.4.结束异动:当审批状态为审批完成后显示结束异动,点击跳转异动-结束异动页;', + '2.5.目的地区域:列于目的地名称前方;格式为「省-市」。停车场:显示该停车场所属区域(停车场区域);维修站:显示该维修站所属区域(维修站区域);其他:显示新增/编辑时所选目的地所在区域(省-市级联);', + '2.6.目的地名称:显示车辆异动目的地名称;', + '2.7.异动类型:显示车辆异动类型,选项包括:维修、保养、年审、其他;', + '2.8.预计异动里程(km):显示车辆预计异动里程;', + '2.9.车牌号:显示车牌号;', + '2.10.异动开始里程(km):显示车辆异动开始里程;', + '2.11.异动开始电量(kWh):显示车辆异动开始电量;', + '2.12.异动开始氢量:显示车辆异动开始氢量,带单位,单位根据型号参数表获取,分为%和MPa;', + '2.13.创建人:显示发起人姓名;', + '2.14.创建时间:显示发起时间,格式为:YYYY-MM-DD HH:MM;', + '2.15.操作:查看、编辑、撤回、结束异动;', + ' 2.15.1.查看:点击跳转异动-查看页;', + ' 2.15.2.编辑:点击跳转异动-编辑页,只有审批状态为:待提交、驳回、撤回时显示编辑;', + ' 2.15.3.撤回:点击进行二次确认,确认后撤回该数据并将审批状态修改为:撤回;', + ' 2.15.4.结束异动:当审批状态为审批完成后显示结束异动,点击跳转异动-结束异动页;', '', '#历史记录:', '3.1.异动开始日期:显示车辆异动开始日期,格式为:YYYY-MM-DD HH:MM;', '3.2.异动预计结束日期:显示车辆异动结束日期,格式为:YYYY-MM-DD HH:MM;', '3.3.审批状态:分为:待提交、审批中、审批完成、驳回、撤回;', '3.4.异动目的地:显示车辆异动目的地,选项包括:停车场、维修站、其他;', - '3.5.目的地名称:显示车辆异动目的地名称;', - '3.6.异动类型:显示车辆异动类型,选项包括:维修、保养、年审、其他;', - '3.7.预计异动里程(km):显示车辆预计异动里程;', - '3.8.车牌号:显示车牌号;', - '3.9.异动开始里程(km):显示车辆异动开始里程;', - '3.10.异动结束里程(km):显示车辆异动结束里程;', - '3.11.异动开始电量(kWh):显示车辆异动开始电量;', - '3.12.异动结束电量(kWh):显示车辆异动结束电量;', - '3.13.异动开始氢量:显示车辆异动开始氢量,带单位,单位根据型号参数表获取,分为%和MPa;', - '3.14.异动结束氢量:显示车辆异动结束氢量,带单位,单位根据型号参数表获取,分为%和MPa;', - '3.15.创建人:显示发起人姓名;', - '3.16.创建时间:显示发起时间,格式为:YYYY-MM-DD HH:MM;', - '3.17.操作:查看;', - ' 3.17.1.查看:点击跳转异动-查看页;', + '3.5.目的地区域:列于目的地名称前方;格式为「省-市」。停车场/维修站/其他三类含义同「进行中」列表 2.5;', + '3.6.目的地名称:显示车辆异动目的地名称;', + '3.7.异动类型:显示车辆异动类型,选项包括:维修、保养、年审、其他;', + '3.8.预计异动里程(km):显示车辆预计异动里程;', + '3.9.车牌号:显示车牌号;', + '3.10.异动开始里程(km):显示车辆异动开始里程;', + '3.11.异动结束里程(km):显示车辆异动结束里程;', + '3.12.异动开始电量(kWh):显示车辆异动开始电量;', + '3.13.异动结束电量(kWh):显示车辆异动结束电量;', + '3.14.异动开始氢量:显示车辆异动开始氢量,带单位,单位根据型号参数表获取,分为%和MPa;', + '3.15.异动结束氢量:显示车辆异动结束氢量,带单位,单位根据型号参数表获取,分为%和MPa;', + '3.16.创建人:显示发起人姓名;', + '3.17.创建时间:显示发起时间,格式为:YYYY-MM-DD HH:MM;', + '3.18.操作:查看;', + ' 3.18.1.查看:点击跳转异动-查看页;', '', '3.列表右下方为分页功能,支持单页显示条数设置;' ].join('\n'); @@ -177,6 +179,7 @@ const Component = function () { approvalStatus: '待提交', destination: '维修站', destinationName: '天河氢能维修中心', + destinationRegionText: '广东省-广州市', moveType: '维修', expectedMileageKm: '45.5', plateNo: '粤A12345', @@ -194,6 +197,7 @@ const Component = function () { approvalStatus: '审批中', destination: '停车场', destinationName: '西湖景区停车场', + destinationRegionText: '浙江省-杭州市', moveType: '保养', expectedMileageKm: '12.0', plateNo: '浙A11111', @@ -211,6 +215,7 @@ const Component = function () { approvalStatus: '审批完成', destination: '其他', destinationName: '车管所检测线', + destinationRegionText: '广东省-深圳市', moveType: '年审', expectedMileageKm: '8.2', plateNo: '粤B11111', @@ -228,6 +233,7 @@ const Component = function () { approvalStatus: '驳回', destination: '维修站', destinationName: '张江服务站', + destinationRegionText: '上海市-上海市', moveType: '其他', expectedMileageKm: '30.0', plateNo: '沪A30003', @@ -245,6 +251,7 @@ const Component = function () { approvalStatus: '撤回', destination: '停车场', destinationName: '宁波江北停车场', + destinationRegionText: '浙江省-宁波市', moveType: '维修', expectedMileageKm: '22.8', plateNo: '浙B22222', @@ -262,6 +269,7 @@ const Component = function () { approvalStatus: '审批中', destination: '维修站', destinationName: '苏州园区快修站', + destinationRegionText: '江苏省-苏州市', moveType: '保养', expectedMileageKm: '18.6', plateNo: '苏E88888', @@ -279,6 +287,7 @@ const Component = function () { approvalStatus: '审批完成', destination: '其他', destinationName: '顺义综合检测场', + destinationRegionText: '北京市-北京市', moveType: '年审', expectedMileageKm: '35.0', plateNo: '京A66666', @@ -296,6 +305,7 @@ const Component = function () { approvalStatus: '待提交', destination: '停车场', destinationName: '两江新区枢纽停车场', + destinationRegionText: '重庆市-重庆市', moveType: '其他', expectedMileageKm: '6.5', plateNo: '渝A99999', @@ -313,6 +323,7 @@ const Component = function () { approvalStatus: '驳回', destination: '维修站', destinationName: '成都高新氢能维保站', + destinationRegionText: '四川省-成都市', moveType: '维修', expectedMileageKm: '52.3', plateNo: '川A77777', @@ -330,6 +341,7 @@ const Component = function () { approvalStatus: '审批完成', destination: '其他', destinationName: '青岛港务临时停放点', + destinationRegionText: '山东省-青岛市', moveType: '保养', expectedMileageKm: '15.0', plateNo: '鲁B55555', @@ -348,6 +360,7 @@ const Component = function () { approvalStatus: '审批完成', destination: '维修站', destinationName: '广州白云氢能维保中心', + destinationRegionText: '广东省-广州市', moveType: '维修', expectedMileageKm: '28.5', plateNo: '粤A12345', @@ -367,6 +380,7 @@ const Component = function () { approvalStatus: '审批完成', destination: '停车场', destinationName: '深圳湾口岸停车场', + destinationRegionText: '广东省-深圳市', moveType: '保养', expectedMileageKm: '15.2', plateNo: '粤B11111', @@ -386,6 +400,7 @@ const Component = function () { approvalStatus: '审批完成', destination: '其他', destinationName: '杭州车管所年检线', + destinationRegionText: '浙江省-杭州市', moveType: '年审', expectedMileageKm: '9.8', plateNo: '浙A11111', @@ -405,6 +420,7 @@ const Component = function () { approvalStatus: '审批完成', destination: '维修站', destinationName: '上海嘉定氢能服务站', + destinationRegionText: '上海市-上海市', moveType: '维修', expectedMileageKm: '42.0', plateNo: '沪A30003', @@ -424,6 +440,7 @@ const Component = function () { approvalStatus: '审批完成', destination: '停车场', destinationName: '南京南站枢纽停车场', + destinationRegionText: '江苏省-南京市', moveType: '其他', expectedMileageKm: '19.6', plateNo: '苏E88888', @@ -443,6 +460,7 @@ const Component = function () { approvalStatus: '审批完成', destination: '维修站', destinationName: '北京亦庄氢能维修站', + destinationRegionText: '北京市-北京市', moveType: '保养', expectedMileageKm: '11.3', plateNo: '京A66666', @@ -462,6 +480,7 @@ const Component = function () { approvalStatus: '审批完成', destination: '其他', destinationName: '重庆两江新区检测站', + destinationRegionText: '重庆市-重庆市', moveType: '年审', expectedMileageKm: '33.0', plateNo: '渝A99999', @@ -481,6 +500,7 @@ const Component = function () { approvalStatus: '审批完成', destination: '维修站', destinationName: '成都龙泉驿维保基地', + destinationRegionText: '四川省-成都市', moveType: '维修', expectedMileageKm: '55.8', plateNo: '川A77777', @@ -500,6 +520,7 @@ const Component = function () { approvalStatus: '审批完成', destination: '停车场', destinationName: '青岛前湾港停车场', + destinationRegionText: '山东省-青岛市', moveType: '保养', expectedMileageKm: '12.5', plateNo: '鲁B55555', @@ -519,6 +540,7 @@ const Component = function () { approvalStatus: '审批完成', destination: '其他', destinationName: '宁波北仑港区临时点', + destinationRegionText: '浙江省-宁波市', moveType: '其他', expectedMileageKm: '24.0', plateNo: '浙B22222', @@ -656,6 +678,7 @@ const Component = function () { '异动预计结束日期', '审批状态', '异动目的地', + '目的地区域', '目的地名称', '异动类型', '预计异动里程(km)', @@ -672,6 +695,7 @@ const Component = function () { fmtYMDHM(r.moveEndExpectedAt), r.approvalStatus, r.destination, + r.destinationRegionText != null && String(r.destinationRegionText).trim() ? r.destinationRegionText : '-', r.destinationName, r.moveType, r.expectedMileageKm, @@ -703,6 +727,16 @@ const Component = function () { { title: '异动预计结束日期', dataIndex: 'moveEndExpectedAt', key: 'moveEndExpectedAt', width: 170, render: function (v) { return fmtYMDHM(v); } }, { title: '审批状态', dataIndex: 'approvalStatus', key: 'approvalStatus', width: 100 }, { title: '异动目的地', dataIndex: 'destination', key: 'destination', width: 110 }, + { + title: '目的地区域', + dataIndex: 'destinationRegionText', + key: 'destinationRegionText', + width: 150, + ellipsis: true, + render: function (v) { + return v != null && String(v).trim() ? String(v) : '-'; + } + }, { title: '目的地名称', dataIndex: 'destinationName', key: 'destinationName', width: 160, ellipsis: true }, { title: '异动类型', dataIndex: 'moveType', key: 'moveType', width: 90 }, { title: '预计异动里程(km)', dataIndex: 'expectedMileageKm', key: 'expectedMileageKm', width: 150 }, @@ -842,7 +876,7 @@ const Component = function () { rowKey: 'id', columns: columns, dataSource: paged, - scroll: { x: 2240 }, + scroll: { x: 2390 }, size: 'small', pagination: { current: page, @@ -867,7 +901,7 @@ const Component = function () { rowKey: 'id', columns: columns, dataSource: paged, - scroll: { x: 2240 }, + scroll: { x: 2390 }, size: 'small', pagination: { current: page,