调整业务模块

This commit is contained in:
2026-09-04 05:23:34 +08:00
parent c63c7c3e33
commit e789f1647a
10 changed files with 2082 additions and 591 deletions
@@ -1053,7 +1053,7 @@
label-width="auto"
class="waybill-manage-page__freight-form waybill-manage-page__freight-form--road"
>
<template v-for="(group, index) in taskFreightGroups" :key="group.key">
<template v-for="group in taskFreightGroups" :key="group.key">
<el-form-item label="单价">
<el-input
:model-value="taskFullFreightGroupUnitPrice(group)"
@@ -1093,10 +1093,7 @@
placeholder="单位"
disabled
>
<el-option
:label="group.quantityUnit || '单位'"
:value="group.quantityUnit || ''"
/>
<el-option :label="fixedQuantityUnit" :value="fixedQuantityUnit" />
</el-select>
</template>
</el-input>
@@ -1718,32 +1715,53 @@
</span>
</div>
<div class="waybill-manage-page__waybill-route">
<div class="waybill-manage-page__waybill-route-item">
<span class="waybill-manage-page__waybill-route-dot"></span>
<div class="waybill-manage-page__waybill-route-item is-start">
<div class="waybill-manage-page__waybill-route-marker"></div>
<div class="waybill-manage-page__waybill-route-detail">
<span class="waybill-manage-page__waybill-route-label">发货地</span>
<strong class="waybill-manage-page__waybill-route-name">{{
waybillDetailRouteName(detailRow, 'departure')
}}</strong>
<el-tooltip :content="detailRow.departureAddress || '-'" placement="top">
<span class="waybill-manage-page__waybill-route-addr">{{
formatWaybillProvinceCityDistrict(detailRow.departureAddress)
}}</span>
<strong class="waybill-manage-page__waybill-route-name">
{{
formatWaybillRouteCityDistrict(
detailRow.departureAddress || detailRow.departureName
)
}}
</strong>
<el-tooltip
:content="detailRow.departureAddress || detailRow.departureName || '-'"
placement="top"
>
<span class="waybill-manage-page__waybill-route-addr">
{{ detailRow.departureAddress || detailRow.departureName || '-' }}
</span>
</el-tooltip>
<div class="waybill-manage-page__waybill-route-contact">
<span>联系人{{ detailRow.departureContact || '-' }}</span>
<span>联系方式{{ detailRow.departurePhone || '-' }}</span>
</div>
</div>
</div>
<div class="waybill-manage-page__waybill-route-item">
<span class="waybill-manage-page__waybill-route-dot is-end"></span>
<span class="waybill-manage-page__waybill-route-line" aria-hidden="true" />
<div class="waybill-manage-page__waybill-route-item is-end">
<div class="waybill-manage-page__waybill-route-marker"></div>
<div class="waybill-manage-page__waybill-route-detail">
<span class="waybill-manage-page__waybill-route-label">收货地</span>
<strong class="waybill-manage-page__waybill-route-name">{{
waybillDetailRouteName(detailRow, 'arrival')
}}</strong>
<el-tooltip :content="detailRow.arrivalAddress || '-'" placement="top">
<span class="waybill-manage-page__waybill-route-addr">{{
formatWaybillProvinceCityDistrict(detailRow.arrivalAddress)
}}</span>
<strong class="waybill-manage-page__waybill-route-name">
{{
formatWaybillRouteCityDistrict(
detailRow.arrivalAddress || detailRow.arrivalName
)
}}
</strong>
<el-tooltip
:content="detailRow.arrivalAddress || detailRow.arrivalName || '-'"
placement="top"
>
<span class="waybill-manage-page__waybill-route-addr">
{{ detailRow.arrivalAddress || detailRow.arrivalName || '-' }}
</span>
</el-tooltip>
<div class="waybill-manage-page__waybill-route-contact">
<span>联系人{{ detailRow.arrivalContact || '-' }}</span>
<span>联系方式{{ detailRow.arrivalPhone || '-' }}</span>
</div>
</div>
</div>
</div>
@@ -1793,75 +1811,65 @@
<div class="waybill-manage-page__waybill-detail-field">
<span>承运类型</span><strong>{{ detailRow.carrierType || '-' }}</strong>
</div>
<div
v-if="waybillIsCarrier(detailRow)"
class="waybill-manage-page__waybill-detail-field"
>
<div class="waybill-manage-page__waybill-detail-field">
<span>承运商</span><strong>{{ detailRow.carrierName || '-' }}</strong>
</div>
<template v-if="waybillIsRoadTransport(detailRow)">
<div class="waybill-manage-page__waybill-detail-field">
<span>司机</span
><strong
>{{
[detailRow.driverName, detailRow.driverPhone].filter(Boolean).join(' ') || '-'
}}</strong
>
</div>
<div class="waybill-manage-page__waybill-detail-field">
<span>车牌号</span><strong>{{ detailRow.vehicleNo || '-' }}</strong>
</div>
<div class="waybill-manage-page__waybill-detail-field">
<span>挂车车牌</span><strong>{{ detailRow.trailerVehicleNo || '-' }}</strong>
</div>
<div class="waybill-manage-page__waybill-detail-field">
<span>押运人</span
><strong
>{{
[detailRow.escortName, detailRow.escortPhone].filter(Boolean).join(' ') || '-'
}}</strong
>
</div>
</template>
<template v-else-if="waybillIsNonRoadTransport(detailRow)">
<div class="waybill-manage-page__waybill-detail-field">
<span>船长</span
><strong
>{{
[detailRow.captainName, detailRow.driverPhone].filter(Boolean).join(' ') || '-'
}}</strong
>
</div>
<div class="waybill-manage-page__waybill-detail-field">
<span>航班号/船次号/班列号</span>
<strong>{{ detailRow.vehicleNo || '-' }}</strong>
</div>
<div class="waybill-manage-page__waybill-detail-field">
<span>箱号</span><strong>{{ detailRow.containerNo || '-' }}</strong>
</div>
<div class="waybill-manage-page__waybill-detail-field">
<span>仓位</span><strong>{{ detailRow.cabinNo || '-' }}</strong>
</div>
</template>
<template v-else>
<div class="waybill-manage-page__waybill-detail-field">
<span>{{ waybillVehicleNoLabel(detailRow) }}</span>
<strong>{{ detailRow.vehicleNo || '-' }}</strong>
</div>
</template>
<div
v-if="waybillIsRoadTransport(detailRow)"
class="waybill-manage-page__waybill-detail-field"
>
<span>司机</span
><strong
>{{ detailRow.driverName || '-' }} {{ detailRow.driverPhone || '' }}</strong
>
</div>
<div class="waybill-manage-page__waybill-detail-field">
<span>{{ waybillVehicleNoLabel(detailRow) }}</span>
<strong>{{ detailRow.vehicleNo || '-' }}</strong>
</div>
<div
v-if="waybillIsNonRoadTransport(detailRow)"
class="waybill-manage-page__waybill-detail-field"
>
<span>船长</span><strong>{{ detailRow.captainName || '-' }}</strong>
</div>
<div
v-if="waybillIsNonRoadTransport(detailRow) && waybillIsCarrier(detailRow)"
class="waybill-manage-page__waybill-detail-field"
>
<span>联系电话</span><strong>{{ detailRow.driverPhone || '-' }}</strong>
</div>
<div
v-if="waybillIsNonRoadTransport(detailRow)"
class="waybill-manage-page__waybill-detail-field"
>
<span>箱号</span><strong>{{ detailRow.containerNo || '-' }}</strong>
</div>
<div
v-if="waybillIsNonRoadTransport(detailRow)"
class="waybill-manage-page__waybill-detail-field"
>
<span>舱位</span><strong>{{ detailRow.cabinNo || '-' }}</strong>
</div>
<div
v-if="waybillIsRoadTransport(detailRow) && !waybillIsCarrier(detailRow)"
class="waybill-manage-page__waybill-detail-field"
>
<span>挂车车牌号</span><strong>{{ detailRow.trailerVehicleNo || '-' }}</strong>
</div>
<div
v-if="waybillIsRoadTransport(detailRow) && !waybillIsCarrier(detailRow)"
class="waybill-manage-page__waybill-detail-field"
>
<span>押运人</span><strong>{{ detailRow.escortName || '-' }}</strong>
</div>
<div
v-if="waybillIsRoadTransport(detailRow) && !waybillIsCarrier(detailRow)"
class="waybill-manage-page__waybill-detail-field"
>
<span>押运人手机号</span><strong>{{ detailRow.escortPhone || '-' }}</strong>
</div>
<div
v-if="waybillIsRoadTransport(detailRow) && !waybillIsCarrier(detailRow)"
class="waybill-manage-page__waybill-detail-field"
>
<span>里程(km)</span><strong>{{ detailRow.mileage || '-' }}</strong>
</div>
<div
class="waybill-manage-page__waybill-detail-field waybill-manage-page__waybill-detail-field--remark"
:class="{
'waybill-manage-page__waybill-detail-field--remark': waybillIsRoadTransport(detailRow),
'waybill-manage-page__waybill-detail-field--remark-full': waybillIsNonRoadTransport(detailRow),
}"
>
<span>备注</span
><strong>{{ detailRow.taskRemark || detailRow.remark || '-' }}</strong>
@@ -2204,7 +2212,11 @@
</template>
</el-dialog>
<waybill-import-dialog v-if="config.enableWaybillImport" v-model="waybillImportBox" />
<waybill-import-dialog
v-if="config.enableWaybillImport"
v-model="waybillImportBox"
@closed="refreshChange"
/>
<flow-design
v-if="website.design.designMode"
@@ -2891,6 +2903,8 @@ const extractRecords = res => {
return [];
};
const WAYBILL_QUANTITY_UNIT = '吨';
const defaultTransportCargo = () => ({
cargoName: '',
cargoType: '',
@@ -3375,6 +3389,9 @@ export default {
if (!total) return '';
return Number.isInteger(total) ? String(total) : String(Number(total.toFixed(3)));
},
fixedQuantityUnit() {
return WAYBILL_QUANTITY_UNIT;
},
taskFreightAmount() {
const quantity = Number(this.taskCargoQuantityTotal || this.form.quantity || 0);
const unitPrice = Number(this.form.unitPrice || 0);
@@ -3383,20 +3400,14 @@ export default {
return Number.isInteger(amount) ? String(amount) : String(Number(amount.toFixed(2)));
},
taskFreightGroups() {
const groups = [];
const groupMap = new Map();
(this.transportCargoRows || []).forEach((cargo, index) => {
const quantityUnit = String(cargo.quantityUnit || '').trim();
const key = quantityUnit || `__empty_${index}`;
let group = groupMap.get(key);
if (!group) {
group = { key, quantityUnit, rows: [] };
groupMap.set(key, group);
groups.push(group);
}
group.rows.push(cargo);
});
return groups;
//
return [
{
key: '__all__',
quantityUnit: WAYBILL_QUANTITY_UNIT,
rows: this.transportCargoRows || [],
},
];
},
taskFullFreightTotal() {
const total = this.taskFreightGroups.reduce(
@@ -3686,6 +3697,21 @@ export default {
const cityMatch = text.match(/市/);
return cityMatch ? text.slice(0, cityMatch.index + 1) : text;
},
formatWaybillRouteCityDistrict(value) {
const text = String(value || '').trim();
if (!text) return '-';
const provinceMatch = text.match(/^.+?(?:省|自治区|特别行政区)/);
const cityRegion = provinceMatch ? text.slice(provinceMatch[0].length) : text;
const cityMatch = cityRegion.match(/^(.+?市)/);
if (!cityMatch) return this.formatWaybillProvinceCityDistrict(text);
const city = cityMatch[1];
const remainder = cityRegion.slice(city.length);
const districtMatch = remainder.match(
/^(.+?(?:自治县|自治旗|林区|矿区|新区|开发区|区|县|旗){1,2})/
);
const district = districtMatch ? districtMatch[1] : '';
return [city, district].filter(Boolean).join(' ');
},
waybillDetailRouteName(row = {}, field) {
const address = String(row[`${field}Address`] || '').trim();
const name = String(row[`${field}Name`] || '').trim();
@@ -8625,7 +8651,7 @@ export default {
&__waybill-summary-grid {
display: grid;
grid-template-columns: repeat(4, minmax(130px, 1fr)) minmax(420px, 2.5fr);
grid-template-columns: repeat(4, minmax(120px, 1fr)) minmax(360px, 1.5fr);
gap: 16px 24px;
}
@@ -8658,93 +8684,91 @@ export default {
}
&__waybill-route {
display: grid;
grid-template-columns: minmax(100px, 1fr) minmax(36px, 0.7fr) minmax(100px, 1fr);
grid-row: 1 / span 3;
grid-column: 5;
align-items: start;
min-width: 0;
padding: 4px 0;
}
&__waybill-route-item {
position: relative;
display: flex;
align-items: stretch;
gap: 12px;
min-width: 0;
flex-direction: column;
align-items: center;
text-align: center;
}
& + & {
margin-top: 18px;
&__waybill-route-marker {
display: inline-flex;
width: 36px;
height: 36px;
align-items: center;
justify-content: center;
color: #fff;
border-radius: 8px;
background: #409eff;
font-size: 18px;
font-weight: 600;
.is-end & {
background: #67c23a;
}
}
&__waybill-route-dot {
position: relative;
flex: 0 0 auto;
width: 12px;
margin-top: 2px;
&::before {
display: block;
width: 12px;
height: 12px;
border-radius: 50%;
content: '';
background: #409eff;
box-shadow: 0 0 0 3px #fff, 0 0 0 4px #c6e0ff;
}
&.is-end::before {
background: #e6a23c;
box-shadow: 0 0 0 3px #fff, 0 0 0 4px #f5d9b0;
}
}
&__waybill-route-item:not(:last-child) &__waybill-route-dot::after {
content: '';
position: absolute;
top: 14px;
left: 5px;
width: 2px;
height: calc(100% + 10px);
background: repeating-linear-gradient(
to bottom,
#c0c4cc 0,
#c0c4cc 4px,
transparent 4px,
transparent 8px
);
&__waybill-route-line {
width: 100%;
height: 6px;
margin-top: 15px;
border-radius: 1px;
background: #e4e7ed;
}
&__waybill-route-detail {
flex: 1;
min-width: 0;
display: flex;
min-width: 0;
flex-direction: column;
gap: 4px;
}
&__waybill-route-label {
color: #909399;
font-size: 12px;
align-items: center;
gap: 5px;
margin-top: 8px;
width: 100%;
}
&__waybill-route-name {
color: #303133;
font-size: 15px;
font-weight: 500;
line-height: 1.4;
max-width: 100%;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
color: #303133;
font-size: 18px;
font-weight: 600;
line-height: 1.35;
text-overflow: ellipsis;
white-space: nowrap;
}
&__waybill-route-addr {
display: block;
max-width: 100%;
overflow: hidden;
color: #606266;
font-size: 12px;
line-height: 1.5;
text-overflow: ellipsis;
white-space: nowrap;
}
&__waybill-route-contact {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 2px 8px;
max-width: 100%;
color: #909399;
font-size: 12px;
line-height: 1.5;
}
&__waybill-attachments {
grid-column: 1 / 5;
display: flex;
@@ -8763,6 +8787,7 @@ export default {
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 18px 32px;
padding: 4px 20px 8px;
text-align: left;
}
&__waybill-detail-field {
@@ -8770,6 +8795,7 @@ export default {
align-items: baseline;
gap: 12px;
min-width: 0;
text-align: left;
span {
flex: 0 0 auto;
@@ -8790,6 +8816,10 @@ export default {
grid-column: 3 / -1;
}
&__waybill-detail-field--remark-full {
grid-column: 1 / -1;
}
&__waybill-fee-grid {
grid-template-columns: repeat(4, minmax(0, 1fr));
@@ -8929,11 +8959,6 @@ export default {
grid-template-columns: repeat(4, minmax(130px, 1fr));
}
&__waybill-route {
grid-row: auto;
grid-column: 1 / -1;
}
&__waybill-attachments {
grid-column: 1 / -1;
}
@@ -8945,6 +8970,21 @@ export default {
grid-template-columns: 1fr;
}
&__waybill-route {
grid-template-columns: minmax(0, 1fr);
gap: 16px;
}
&__waybill-route-line {
width: 10px;
height: 32px;
margin: 0 auto;
}
&__waybill-attachments {
grid-column: auto;
}
&__waybill-carrier-grid {
grid-template-columns: 1fr;
}
@@ -8952,6 +8992,10 @@ export default {
&__waybill-detail-field--remark {
grid-column: auto;
}
&__waybill-detail-field--remark-full {
grid-column: auto;
}
}
@media (max-width: 1280px) {