From e8f631147707951cfdc2add2d9815011fdbf724e Mon Sep 17 00:00:00 2001 From: weicw <594098497@qq.com> Date: Sat, 24 Oct 2026 21:29:21 +0800 Subject: [PATCH 1/8] =?UTF-8?q?:sparkles:=20=E7=BC=96=E8=BE=91=E6=89=93?= =?UTF-8?q?=E5=8D=A1=E8=AE=B0=E5=BD=95=E6=94=AF=E6=8C=81=E9=87=8C=E7=A8=8B?= =?UTF-8?q?=E9=87=87=E9=9B=86=E4=B8=8E=E7=BB=93=E7=AE=97=E5=90=8E=E5=86=BB?= =?UTF-8?q?=E7=BB=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/waybill-manage-page.vue | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/src/views/business/components/waybill-manage-page.vue b/src/views/business/components/waybill-manage-page.vue index 4715c05..569ba3a 100644 --- a/src/views/business/components/waybill-manage-page.vue +++ b/src/views/business/components/waybill-manage-page.vue @@ -2271,6 +2271,13 @@ 体积 {{ record.volume }}方 数量 {{ record.quantity }} + +
+ 里程 {{ record.mileage }} 公里 +
+ + + + + + + + 0 ? String(record.mileage) : '', remark: record.remark || '', photos: (record.photos || []) .filter(photo => photo?.url) @@ -6037,10 +6069,22 @@ export default { photos.splice(index, 1); this.waybillPunchEditForm.photos = photos; }, + // 里程只收整数:非数字直接丢掉,长度与「维护里程」一致(≤10 位) + handleWaybillPunchMileageInput(value) { + this.waybillPunchEditForm.mileage = String(value || '') + .replace(/\D/g, '') + .slice(0, 10); + }, async submitWaybillPunchRecordEdit() { await this.$refs.waybillPunchRecordEditFormRef.validate(); const record = this.waybillPunchEditRecord; const form = this.waybillPunchEditForm; + // 管理端里程选填:留空表示不改动运单里程,所以只校验填了值的情况 + const mileageText = String(form.mileage || '').trim(); + if (this.waybillPunchEditMileageVisible && mileageText && !/^[1-9]\d{0,9}$/.test(mileageText)) { + this.$message.warning('里程必须为不超过10位的正整数'); + return; + } const submit = typeof this.api?.savePunchRecord === 'function' ? this.api.savePunchRecord : savePunchRecord; this.waybillPunchRecordEditDialog.submitting = true; @@ -6059,6 +6103,8 @@ export default { weight: form.weight, volume: form.volume, quantity: form.quantity, + // 不传代表不改;后端按 null 处理 + mileage: mileageText ? Number(mileageText) : undefined, remark: form.remark, photos: form.photos.map(photo => ({ url: photo.url, type: photo.type })), }); From c402d68aea47db4d1acd8a8621dbfd65999ca8be Mon Sep 17 00:00:00 2001 From: weicw <594098497@qq.com> Date: Sat, 24 Oct 2026 22:19:23 +0800 Subject: [PATCH 2/8] =?UTF-8?q?:fire:=20=E7=AE=A1=E7=90=86=E7=AB=AF?= =?UTF-8?q?=E6=89=93=E5=8D=A1=E7=85=A7=E7=89=87=E5=8E=BB=E6=8E=89=E4=B8=BB?= =?UTF-8?q?=E5=9B=BE=E8=A7=92=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 主图角标按分组下标标在第一张上,既没有独立字段也不能切换,与司机端一致删除;v-for 不再需要下标。 --- .../components/punch-record-photos.vue | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/src/views/business/components/punch-record-photos.vue b/src/views/business/components/punch-record-photos.vue index 455f7d1..2444cce 100644 --- a/src/views/business/components/punch-record-photos.vue +++ b/src/views/business/components/punch-record-photos.vue @@ -10,7 +10,7 @@ :class="{ 'punch-record-photos__grid--edit': editable }" >
- -
主图
} } - &__badge { - position: absolute; - top: 0; - left: 0; - padding: 0 6px; - border-radius: 4px 0 4px 0; - background: rgba(64, 158, 255, 0.9); - font-size: 12px; - line-height: 18px; - color: #fff; - } - &__remove { align-self: center; font-size: 12px; From 37ac683fb41ef39d05f0777cc78cd7665fbc247e Mon Sep 17 00:00:00 2001 From: weicw <594098497@qq.com> Date: Sun, 25 Oct 2026 19:44:06 +0800 Subject: [PATCH 3/8] =?UTF-8?q?:bug:=20=E5=89=8D=E7=AB=AF=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E6=89=80=E5=B1=9E=E7=BB=84=E7=BB=87=E5=BF=85=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/option/system/mpUser.js | 2 +- src/views/system/mp-user.vue | 10 ---------- src/views/transportCapacity/driver.vue | 2 +- src/views/transportCapacity/vehicle.vue | 2 +- 4 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/option/system/mpUser.js b/src/option/system/mpUser.js index bc06d41..3c01e4c 100644 --- a/src/option/system/mpUser.js +++ b/src/option/system/mpUser.js @@ -133,7 +133,7 @@ export default { hide: true, span: 24, order: 55, - rules: [{ required: true, message: '请选择所属组织', trigger: 'change' }], + // 后端已允许所属组织为空,这里不做必填校验 }, { label: '所属组织', diff --git a/src/views/system/mp-user.vue b/src/views/system/mp-user.vue index 072f3d8..bd3505f 100644 --- a/src/views/system/mp-user.vue +++ b/src/views/system/mp-user.vue @@ -315,11 +315,6 @@ export default { }, rowSave(row, done, loading) { const payload = this.normalizeSubmitRow(row, false); - if (!payload.deptId) { - this.$message.warning('请选择所属组织'); - loading(); - return; - } if (payload.dataScopeRange === 3 && (!payload.dataScopeDeptIds || !payload.dataScopeDeptIds.length)) { this.$message.warning('请选择自定义数据权限组织'); loading(); @@ -336,11 +331,6 @@ export default { }, rowUpdate(row, index, done, loading) { const payload = this.normalizeSubmitRow(row, true); - if (!payload.deptId) { - this.$message.warning('请选择所属组织'); - loading(); - return; - } if (payload.dataScopeRange === 3 && (!payload.dataScopeDeptIds || !payload.dataScopeDeptIds.length)) { this.$message.warning('请选择自定义数据权限组织'); loading(); diff --git a/src/views/transportCapacity/driver.vue b/src/views/transportCapacity/driver.vue index c4e771b..9b60021 100644 --- a/src/views/transportCapacity/driver.vue +++ b/src/views/transportCapacity/driver.vue @@ -861,7 +861,7 @@ export default { emergencyContactMobile: [ { required: true, message: '请输入紧急联系人手机号', trigger: 'blur' }, ], - organizationName: [{ required: true, message: '请选择所属组织', trigger: 'change' }], + // 后端已允许所属组织为空,这里不做必填校验 idCardFront: [{ required: true, message: '请上传身份证正面照', trigger: 'change' }], idCardBack: [{ required: true, message: '请上传身份证反面照', trigger: 'change' }], drivingLicenseFront: [{ required: true, message: '请上传驾驶证主页', trigger: 'change' }], diff --git a/src/views/transportCapacity/vehicle.vue b/src/views/transportCapacity/vehicle.vue index 871d3a5..42f4939 100644 --- a/src/views/transportCapacity/vehicle.vue +++ b/src/views/transportCapacity/vehicle.vue @@ -663,7 +663,7 @@ export default { businessRelationOptions: ['自有', '管理挂靠', '业务合作'], energyTypeOptions: ['柴油', '汽油', '新能源', '天然气'], baseRules: { - organizationName: [{ required: true, message: '请选择所属组织', trigger: 'change' }], + // 后端已允许所属组织为空,这里不做必填校验 useDepartment: [{ required: true, message: '请选择使用部门', trigger: 'change' }], plateNo: [ { required: true, message: '请输入车牌号', trigger: 'change' }, From 324daf9d4d179dbc5f6a45e23643333a3f9068d4 Mon Sep 17 00:00:00 2001 From: weicw <594098497@qq.com> Date: Sun, 25 Oct 2026 19:45:41 +0800 Subject: [PATCH 4/8] =?UTF-8?q?:sparkles:=20=E5=8F=B8=E6=9C=BA=E4=B8=8E?= =?UTF-8?q?=E8=BD=A6=E8=BE=86=E5=88=97=E8=A1=A8=E6=94=AF=E6=8C=81=E6=8C=89?= =?UTF-8?q?=E6=9C=AA=E5=88=86=E9=85=8D=E7=BB=84=E7=BB=87=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mixins/organization-search.js | 26 +++++++++++++++++++++++-- src/views/transportCapacity/driver.vue | 19 ++++++++++++++++-- src/views/transportCapacity/vehicle.vue | 13 ++++++++++++- 3 files changed, 53 insertions(+), 5 deletions(-) diff --git a/src/mixins/organization-search.js b/src/mixins/organization-search.js index 5842986..72ea330 100644 --- a/src/mixins/organization-search.js +++ b/src/mixins/organization-search.js @@ -26,6 +26,11 @@ import { h } from 'vue'; */ const ORG_PROPS = ['organizationName', 'deptName']; +// 「未分配组织」筛选项的哨兵值:不是真实组织名,选中后提交给后端的就是这串字面量。 +// 后端 DriverMapper.xml:172-184 与 TransportVehicleMapper.xml:119-131 按此字面量改判为 +// organization_name 为空(改成空串会让后端整段组织条件不生效,筛选静默失效)。 +export const UNASSIGNED_ORG_FILTER = '__UNASSIGNED_ORG__'; + export default { data() { return { @@ -34,9 +39,18 @@ export default { organizationTreeOptions: [], organizationTreeFlatOptions: [], organizationLoading: false, + // 组织筛选是否追加「未分配组织」一项;页面在 data 里覆盖为 true 才生效 + enableUnassignedOrgFilter: false, }; }, computed: { + // 搜索栏级联的选项:开关打开时在真实组织最前面追加「未分配组织」。 + // 不能直接改 organizationTreeOptions——司机/车辆页的编辑表单也用这棵树选组织。 + organizationSearchTreeOptions() { + return this.enableUnassignedOrgFilter + ? [this.unassignedOrgOption(), ...this.organizationTreeOptions] + : this.organizationTreeOptions; + }, // 所属组织级联配置:checkStrictly 允许选中任意层级,不必选到末级 organizationCascaderProps() { return { @@ -61,7 +75,7 @@ export default { ? this.excludeExternalOrganization(source) : source; this.organizationTreeOptions = this.normalizeOrgTree(tree); - this.organizationTreeFlatOptions = this.flattenOrgTree(this.organizationTreeOptions); + this.organizationTreeFlatOptions = this.flattenOrgTree(this.organizationSearchTreeOptions); const option = this.tableOption || this.option; if (!option) return; ORG_PROPS.forEach(prop => { @@ -100,12 +114,20 @@ export default { }; }); }, + // 哨兵节点的 id 与 rawLabel 都取哨兵值,resolveOrgName 取到的仍是哨兵而不是某个真实组织名 + unassignedOrgOption() { + return { id: UNASSIGNED_ORG_FILTER, label: '未分配组织', rawLabel: UNASSIGNED_ORG_FILTER }; + }, flattenOrgTree(tree = []) { return (tree || []).flatMap(item => [ { id: String(item.id), label: item.label, rawLabel: item.rawLabel }, ...this.flattenOrgTree(item.children || []), ]); }, + // 组织列渲染用:空串或纯空白即「未分配组织」(存量口径是空串,NULL 只是历史脏数据) + isBlankOrganizationName(value) { + return String(value ?? '').trim() === ''; + }, // 兼容两种入参:级联路径数组(取末级)或单个部门 id findOrgById(id) { const value = Array.isArray(id) ? id.at(-1) : id; @@ -155,7 +177,7 @@ export default { // 级联单选:modelValue 必须是 id 路径数组,否则控件内部状态会错乱导致无法再次选中 if (scope.row) scope.row[prop] = Array.isArray(value) ? value : []; }, - options: this.organizationTreeOptions, + options: this.organizationSearchTreeOptions, props: { label: 'label', value: 'id', diff --git a/src/views/transportCapacity/driver.vue b/src/views/transportCapacity/driver.vue index c4e771b..2c5f35e 100644 --- a/src/views/transportCapacity/driver.vue +++ b/src/views/transportCapacity/driver.vue @@ -60,7 +60,11 @@ {{ row.idCardNo || '-' }}