main
lion 3 months ago
parent f2d8e2ed27
commit 0b88cdf3f9

@ -264,6 +264,8 @@
//
mockAccountLogin(username, password) {
// uni.setStorageSync('token', "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3h1a291c2h1bml1LjExNS5sYW5neWUubmV0L2FwaS9jdXN0b21lci9sb2dpbi1ieS13ZWNoYXQtY29kZSIsImlhdCI6MTc2OTM4OTc4NiwiZXhwIjoxNzY5MzkzMzg2LCJuYmYiOjE3NjkzODk3ODYsImp0aSI6IjRTM085ZlF4RTF0bkhOeFoiLCJzdWIiOiIxNiIsInBydiI6IjFkMGEwMjBhY2Y1YzRiNmM0OTc5ODlkZjFhYmYwZmJkNGU4YzhkNjMifQ.FA77-z6ETJqbsN2O7RD-xcR9NsKVxkk3GN5GGeJBu8g")
// return;
uni.request({
url: API.LOGIN_ACCOUNT,
method: 'GET',

@ -36,7 +36,8 @@ export const API = {
GET_DAILY_RESERVATION_DEADLINE: `${BASE_URL}/api/customer/setting/get-daily-reservation-deadline`,
GET_GEOFENCE_BY_DIRECTION: `${BASE_URL}/api/customer/geofence/get-by-direction`,
GET_WATER_LEVEL: `${BASE_URL}/api/customer/setting/get-water-level`,
GET_UNIT_PRICE: `${BASE_URL}/api/customer/setting/get-unit-price`,
// GET_UNIT_PRICE: `${BASE_URL}/api/customer/setting/get-unit-price`,
GET_UNIT_PRICE: `${BASE_URL}/api/customer/setting/get-price`,
GET_SHIP_INSPECTION_EXAMPLES: `${BASE_URL}/api/customer/setting/get-ship-inspection-examples`,
PROFILE_SEND_PHONE_CODE: `${BASE_URL}/api/customer/profile/send-phone-code`,
}

@ -183,4 +183,4 @@
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
}
}
}

@ -98,10 +98,12 @@
/>
<text class="form-unit"></text>
</view>
<view class="form-row" style="align-items: flex-start;">
<!-- <view v-if="isEdit" class="form-row" style="align-items: flex-start;">
<text class="form-label">单次过闸收费</text>
<text class="form-unit" style="flex:1;text-align:right;">{{ totalPriceText() }}</text>
</view>
<text class="form-unit" style="flex:1;text-align:right;">
<view style="text-align: right;">{{ unitPrice }}</view>{{ calculationDescription }}
</text>
</view> -->
<!-- 总长度 -->
<view class="form-row">
<text class="form-label required">总长度</text>
@ -419,8 +421,7 @@ export default {
};
},
onLoad(options) {
//
this.fetchUnitPrice();
this.fetchShipInspectionExample();
//
this.fetchShipPropertyEnum().then((success) => {
@ -435,6 +436,8 @@ export default {
// id
if (options && options.edit === "1") {
this.isEdit = true;
//
// this.fetchUnitPrice();
if (options.id) {
// id
this.fetchShipDetailForEdit(options.id);
@ -494,18 +497,16 @@ export default {
});
if (res.data && res.data.errcode === 0) {
const data = res.data.data;
this.unitPrice = data.unit_price || "";
this.calculationDescription = data.calculation_description || "";
this.unitPrice = data.price || "";
this.calculationDescription = data.price_desc || "";
}
},
//
totalPriceText() {
const unit = Number(this.unitPrice);
const ton = Number(this.form?.ton);
if (isNaN(unit) || isNaN(ton)) return "-";
const total = (unit * ton).toFixed(2);
return `${total}元(单价${unit} * 载重${ton}吨)`;
},
// totalPriceText() {
// const unit = Number(this.unitPrice);
// if (isNaN(unit)) return "-";
// return `${unit}${this.calculationDescription}`;
// },
async fetchShipInspectionExample() {
const token = uni.getStorageSync("token");
if (!token) {

@ -14,7 +14,11 @@
<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>
<view style="text-align: right;">{{ unitPrice }}</view>{{ calculationDescription }}
</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>
@ -109,18 +113,18 @@ export default {
})
if (res.data && res.data.errcode === 0) {
const data = res.data.data;
this.unitPrice = data.unit_price || '';
this.calculationDescription = data.calculation_description || '';
this.unitPrice = data.price || '';
this.calculationDescription = data.price_desc || '';
}
},
//
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}吨)`;
},
// totalPriceText() {
// const unit = Number(this.unitPrice);
// // const ton = Number(this.ship?.total_tonnage);
// if (isNaN(unit)) return '-';
// // const total = (unit * ton).toFixed(2);
// return `${unit}${this.calculationDescription}`;
// },
getShipTypeName(type) {
if (!Array.isArray(this.shipTypeEnum)) return type;
const found = this.shipTypeEnum.find(item => item.value === type?.toString());

@ -67,7 +67,9 @@
>
<view class="pay-row">
<text>单次过闸收费</text>
<text>{{ totalPriceText() }}</text>
<text>
<view style="text-align: right;">{{ unitPrice }}</view>{{ calculationDescription }}
</text>
</view>
<view class="pay-row"
><text>类型</text
@ -173,7 +175,8 @@ export default {
reservationStatusEnum: [],
qrContent: "",
unitPrice: "", //
};
calculationDescription: "", //
};
},
onLoad(options) {
if (options.item) {
@ -218,17 +221,18 @@ export default {
});
if (res.data && res.data.errcode === 0) {
const data = res.data.data;
this.unitPrice = data.unit_price || "";
this.unitPrice = data.price || "";
this.calculationDescription = data.price_desc || "";
}
},
//
totalPriceText() {
const unit = Number(this.unitPrice);
const ton = Number(this.item?.ship?.total_tonnage);
if (isNaN(unit) || isNaN(ton)) return "-";
const total = (unit * ton).toFixed(2);
return `${total}元(单价${unit} * 载重${ton}吨)`;
},
// //
// totalPriceText() {
// const unit = Number(this.unitPrice);
// const ton = Number(this.item?.ship?.total_tonnage);
// if (isNaN(unit) || isNaN(ton)) return "-";
// const total = (unit * ton).toFixed(2);
// return `${total}${unit} * ${ton}`;
// },
async fetchQrcode(id) {
const token = uni.getStorageSync("token");
if (!token || !id) return;

@ -31,7 +31,9 @@
</view>
<view class="info-row" style="align-items: flex-start;">
<text class="info-label">单次过闸收费</text>
<view class="info-value" style="width:50%;text-align: right;">{{ totalPriceText() }}</view>
<view class="info-value" style="width:50%;text-align: right;flex-wrap: wrap;">
<view style="text-align: right;width:100%">{{ unitPrice }}</view>{{ calculationDescription }}
</view>
</view>
<view class="info-row">
<text class="info-label">类型</text>
@ -182,20 +184,18 @@ export default {
})
if (res.data && res.data.errcode === 0) {
const data = res.data.data;
this.unitPrice = data.unit_price || '';
this.calculationDescription = data.calculation_description || '';
this.unitPrice = data.price || '';
this.calculationDescription = data.price_desc || '';
}
},
//
totalPriceText() {
const unit = Number(this.unitPrice);
const ton = Number(this.currentShip?.total_tonnage);
if (isNaN(unit) || isNaN(ton)) {
return '-';
}
const total = (unit * ton).toFixed(2);
return `${total}元(单价${unit} * 载重${ton}吨)`;
},
// totalPriceText() {
// const unit = Number(this.unitPrice);
// if (isNaN(unit)) {
// return '-';
// }
// return `${unit}${this.calculationDescription}`;
// },
//
getUserLocation() {
// #ifdef H5

@ -1,2 +1,2 @@
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>胥口闸站购票</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/h5/static/index.883130ca.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/h5/static/js/chunk-vendors.f93c9f80.js></script><script src=/h5/static/js/index.1cde91d4.js></script></body></html>
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/h5/static/index.883130ca.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/h5/static/js/chunk-vendors.f93c9f80.js></script><script src=/h5/static/js/index.0c1f2e9c.js></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save