|
|
|
|
@ -4,17 +4,6 @@
|
|
|
|
|
<NavBar title="船舶详情" />
|
|
|
|
|
</view>
|
|
|
|
|
<view class="content-area">
|
|
|
|
|
<!-- 单价和计算规则 -->
|
|
|
|
|
<view v-if="unitPrice || calculationDescription" class="price-info-section">
|
|
|
|
|
<view v-if="unitPrice" class="price-info-item">
|
|
|
|
|
<text class="price-label">计算单价:</text>
|
|
|
|
|
<text class="price-value">{{ unitPrice }}元</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view v-if="calculationDescription" class="price-info-item">
|
|
|
|
|
<text class="price-label">计算规则:</text>
|
|
|
|
|
<text class="price-desc">{{ calculationDescription }}</text>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view v-if="ship" class="ship-section">
|
|
|
|
|
<view class="section-title">基本信息</view>
|
|
|
|
|
<view class="section-row"><text>船舶所有人</text><text>{{ ship.owner_name }}</text></view>
|
|
|
|
|
@ -25,6 +14,7 @@
|
|
|
|
|
<view v-if="ship" class="ship-section">
|
|
|
|
|
<view class="section-title">船舶参数</view>
|
|
|
|
|
<view class="section-row"><text>载重吨位</text><text>{{ ship.total_tonnage }}</text></view>
|
|
|
|
|
<view class="section-row"><text>单次过闸收费</text><text>{{ totalPriceText() }}</text></view>
|
|
|
|
|
<view class="section-row"><text>总长度</text><text>{{ ship.total_length }}</text></view>
|
|
|
|
|
<view class="section-row"><text>总宽</text><text>{{ ship.total_width }}</text></view>
|
|
|
|
|
<view class="section-row"><text>型深</text><text>{{ ship.molded_depth }}</text></view>
|
|
|
|
|
@ -123,6 +113,14 @@ export default {
|
|
|
|
|
this.calculationDescription = data.calculation_description || '';
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 计算单次过闸收费
|
|
|
|
|
totalPriceText() {
|
|
|
|
|
const unit = Number(this.unitPrice);
|
|
|
|
|
const ton = Number(this.ship?.total_tonnage);
|
|
|
|
|
if (isNaN(unit) || isNaN(ton)) return '-';
|
|
|
|
|
const total = (unit * ton).toFixed(2);
|
|
|
|
|
return `${total}元(单价${unit} * 载重${ton}吨)`;
|
|
|
|
|
},
|
|
|
|
|
getShipTypeName(type) {
|
|
|
|
|
if (!Array.isArray(this.shipTypeEnum)) return type;
|
|
|
|
|
const found = this.shipTypeEnum.find(item => item.value === type?.toString());
|
|
|
|
|
|