diff --git a/src/option/business/common.js b/src/option/business/common.js index 8221c47..1d4c113 100644 --- a/src/option/business/common.js +++ b/src/option/business/common.js @@ -42,6 +42,7 @@ export const waybillStatusOptions = [ { label: '草稿', value: 'draft' }, { label: '待执行', value: 'pending' }, { label: '进行中', value: 'running' }, + { label: '待回单确认', value: 'pending_return_confirm' }, { label: '已完成', value: 'completed' }, { label: '已取消', value: 'cancelled' }, ]; diff --git a/src/option/business/waybill-manage.js b/src/option/business/waybill-manage.js index a86078d..e19a927 100644 --- a/src/option/business/waybill-manage.js +++ b/src/option/business/waybill-manage.js @@ -483,6 +483,8 @@ export const config = { row.requireAccept === true || row.requireAccept === 1 || requiresDriverAcceptConfirmation(row); + // 待回单确认由末位打卡产生,司机必然已接单 + if (status === 'pending_return_confirm') return '待回单确认'; // 需司机接单且尚未接单 → 待执行(含库中仍为 running 的历史数据展示校正) if (needAccept && !hasDriverAcceptRecord(row) && !terminalStatuses.includes(status)) { return '待执行'; diff --git a/src/views/business/components/master-order-detail.vue b/src/views/business/components/master-order-detail.vue index f40e339..c59f4c2 100644 --- a/src/views/business/components/master-order-detail.vue +++ b/src/views/business/components/master-order-detail.vue @@ -294,8 +294,8 @@ export default { query: { id: String(customerId), name: '查看客商档案', view: '1' }, }); }, - waybillStatusName(value) { return ({ pending: '待执行', waiting: '待执行', running: '进行中', processing: '进行中', completed: '已完成', cancelled: '已取消' })[value] || value || '-'; }, - waybillStatusType(value) { return ({ pending: 'info', waiting: 'info', running: 'warning', processing: 'warning', completed: 'success', cancelled: 'danger' })[value] || 'info'; }, + waybillStatusName(value) { return ({ pending: '待执行', waiting: '待执行', running: '进行中', processing: '进行中', pending_return_confirm: '待回单确认', completed: '已完成', cancelled: '已取消' })[value] || value || '-'; }, + waybillStatusType(value) { return ({ pending: 'info', waiting: 'info', running: 'warning', processing: 'warning', pending_return_confirm: 'warning', completed: 'success', cancelled: 'danger' })[value] || 'info'; }, statusName(value) { return ({ waiting_dispatch: '待调度', dispatching: '调度中', completed: '调度完成', closed: '调度关闭' })[value] || value || '-'; }, statusType(value) { return ({ waiting_dispatch: 'warning', dispatching: 'success', completed: 'primary', closed: 'danger' })[value] || 'info'; }, }, diff --git a/src/views/business/components/transport-plan-page.vue b/src/views/business/components/transport-plan-page.vue index e4af27c..f77891a 100644 --- a/src/views/business/components/transport-plan-page.vue +++ b/src/views/business/components/transport-plan-page.vue @@ -4184,6 +4184,7 @@ export default { waiting: ['待执行', 'is-pending'], processing: ['进行中', 'is-processing'], running: ['进行中', 'is-processing'], + pending_return_confirm: ['待回单确认', 'is-pending'], completed: ['已完成', 'is-completed'], cancelled: ['已取消', 'is-cancelled'], }; diff --git a/src/views/business/components/waybill-manage-page.vue b/src/views/business/components/waybill-manage-page.vue index 77529db..ffe1610 100644 --- a/src/views/business/components/waybill-manage-page.vue +++ b/src/views/business/components/waybill-manage-page.vue @@ -4378,9 +4378,15 @@ export default { addBtn: this.canCreate, }; }, - // 打卡记录编辑入口与运单编辑同权限:能改运单的人才能订正它的打卡流水 + // 打卡记录编辑入口与运单编辑同权限:能改运单的人才能订正它的打卡流水。 + // 时间轴的「编辑打卡 / 补卡」链接是本页唯一写入入口,提交固定 punched=true。 + // 取消打卡不在本页;待回单确认的运单不显示该链接。 canEditWaybillPunchRecord() { - return this.hasPermission(`${this.config.permission}_edit`) && !this.readonlyScope; + return ( + this.hasPermission(`${this.config.permission}_edit`) && + !this.readonlyScope && + this.statusValue(this.detailRow) !== 'pending_return_confirm' + ); }, waybillPunchEditNode() { return this.findWaybillPunchEditNodeConfig(this.waybillPunchEditRecord); @@ -5107,7 +5113,8 @@ export default { return false; } const status = this.statusValue(row); - return status === 'pending'; + // 待回单确认可取消,取消不生成应收应付 + return status === 'pending' || status === 'pending_return_confirm'; }, canComplete(row) { if ( @@ -5119,7 +5126,8 @@ export default { return false; } const status = this.statusValue(row); - return status === 'processing' || status === 'running'; + // 待回单确认也可直接完成,不经确认回单 + return status === 'processing' || status === 'running' || status === 'pending_return_confirm'; }, canConfirmReturn(row) { return ( @@ -5127,7 +5135,7 @@ export default { this.hasPermission(`${this.config.permission}_complete`) && !this.readonlyScope && !row.readonly && - this.statusValue(row) === 'running' + this.statusValue(row) === 'pending_return_confirm' ); }, canMaintainMileage(row) {