diff --git a/common/api.js b/common/api.js
index ee17bdb..cd268f0 100644
--- a/common/api.js
+++ b/common/api.js
@@ -165,6 +165,7 @@ module.exports = (vm) => {
getFreightRisk: params => vm.$u.http.get( freightAPI + '/freightRiskException/page', {params}), // 风控异常
riskAppeal: params => vm.$u.http.post( freightAPI + '/freightRiskException/complaint', params), // 风控异常-申诉
maModifyRemark: params => vm.$u.http.post( freightAPI + '/freightOrder/maModifyRemark', params), // 修改备注
+ freightInsuranceList: params => vm.$u.http.get( freightAPI + '/freightInsuranceProgram/getList', {params}),
},
freightMaRecord: {
add: params => vm.$u.http.post( freightAPI + '/freightMaRecord/add', params,{custom: {toast:true}}), // 出发到达记录日志
diff --git a/pages/order/add.vue b/pages/order/add.vue
index da8b152..e1ab4ed 100644
--- a/pages/order/add.vue
+++ b/pages/order/add.vue
@@ -134,10 +134,18 @@
-
-
+
+
- 未购买 {{ form.insuranceProgramCode ? '已购买' : '未购买' }}
@@ -203,6 +211,7 @@ export default {
components: { UTextarea, PopupPlatenumber, payee },
data() {
return {
+ openExternalInsuranceFlag: true,
eventCode: '',
loading: false,
showModal: '',
@@ -244,6 +253,10 @@ export default {
weightUnitPrice: '',
goodsSourceCode: '',
goodsSourceBiddingCode: '',
+ startDate: '',
+ receiveInsuranceAmount: '',
+ insuranceProgramCode: '',
+ coverageLimit: '',
},
payeeModel: {},
driverObj: {}, //司机信息
@@ -394,6 +407,7 @@ export default {
},
getAllowDriverSeeFreightAmount() {
uni.$u.api.freightOrder.currentFreight({}).then(en => {
+ this.openExternalInsuranceFlag = en.result.openExternalInsuranceFlag !== false;
this.currentFreight = en?.result || {};
this.form.allowDriverSeeFreightAmountNode = this.currentFreight.allowDriverSeeFreightAmountNode;
});
@@ -517,7 +531,13 @@ export default {
uni.navigateTo({ url: `/pages/common/webview?url=${url}&query=${JSON.stringify(params)}` });
},
buyInsurance() {
- uni.navigateTo({ url: `/pages/order/insurance` });
+ uni.$once('buy-insurance', insuranceForm => {
+ this.form = {
+ ...this.form,
+ ...insuranceForm,
+ };
+ });
+ uni.navigateTo({ url: `/pages/order/insurance?paidAmount=${this.form.paidAmount}` });
},
computedDistance() {
if (this.form.waypoints[0].lng && this.form.waypoints[1].lng) {
diff --git a/pages/order/again-assign.vue b/pages/order/again-assign.vue
index dd77c1a..73adbb0 100644
--- a/pages/order/again-assign.vue
+++ b/pages/order/again-assign.vue
@@ -57,6 +57,12 @@
+
+ 温馨提示:
+
+ 当前订单已购买保险,保单号[{{ item.policyNo }}],由于你修改了车牌,原保单将会失效,请知悉!
+
+
确认更改
@@ -106,6 +112,21 @@ export default {
}
: {};
},
+ haveInsurance() {
+ return this.item && this.item.insuranceStatus === 'SUCCESS';
+ },
+ licenseChangeFlag() {
+ return this.form.licenseNumber && this.form.licenseNumber !== this.item.vehicleLicenseNum;
+ },
+ trailerChangeFlag() {
+ if (!this.form.trailerNumber && !this.item.trailerLicenseNum) {
+ return false;
+ }
+ return this.form.trailerNumber !== this.item.trailerLicenseNum;
+ },
+ showWarning() {
+ return this.haveInsurance && (this.licenseChangeFlag || this.trailerChangeFlag);
+ },
},
onLoad(options) {
if (options.code) {
diff --git a/pages/order/change-fee.vue b/pages/order/change-fee.vue
index ee3452a..ecfaa79 100644
--- a/pages/order/change-fee.vue
+++ b/pages/order/change-fee.vue
@@ -124,6 +124,12 @@
+
+ 温馨提示:
+
+ 当前订单已购买保险,保单号[{{ item.policyNo }}],由于你增加了运费,出险后将无法足额理赔,请知悉!
+
+
确定更改
@@ -191,6 +197,12 @@ export default {
// 自动计算货到
return 'OUT_INVITE_ARRIVAL' === this.currentFreight?.autoComputeFeeType;
},
+ haveInsurance() {
+ return this.item && this.item.insuranceStatus === 'SUCCESS';
+ },
+ showWarning() {
+ return this.haveInsurance && this.form.paidAmount > this.item.paidAmount;
+ },
},
onLoad(options) {
if (options.code) {
diff --git a/pages/order/detail.vue b/pages/order/detail.vue
index 3e4ad66..4b0e24e 100644
--- a/pages/order/detail.vue
+++ b/pages/order/detail.vue
@@ -250,6 +250,10 @@
综合服务费
¥{{ item.serviceAmount ? item.serviceAmount : '' }}
+
+ 保费
+ ¥{{ item.receiveInsuranceAmount ? item.receiveInsuranceAmount : '' }}
+
订单总额
¥{{ item.totalAmount ? item.totalAmount : '' }}
@@ -279,6 +283,29 @@
¥{{ item.freightAmount }}
+
+
+
+ 货值(理赔限额)
+ {{ item.coverageLimit }}万
+
+
+ 投保状态
+
+
+
+
+
+ 保单号
+ {{ item.policyNo ? item.policyNo : '' }}
+
+
+ 费率
+ {{ item.insuranceReceiveRate ? item.insuranceReceiveRate : '' }}
+
+
diff --git a/pages/order/filter.vue b/pages/order/filter.vue
index 7516f79..52b1e15 100644
--- a/pages/order/filter.vue
+++ b/pages/order/filter.vue
@@ -37,6 +37,15 @@
+
+
+
+
+ {{ item.text }}
+
+
+
+
@@ -71,6 +80,7 @@ export default {
receiptFlag: '', // 是否已签单
payStatus: '', // 支付状态
payStatusName: '', //
+ insuranceFlag: '', //
},
radioList: [
{ text: '是', value: 'true' },
diff --git a/pages/order/index.vue b/pages/order/index.vue
index 604d36f..2f4548f 100644
--- a/pages/order/index.vue
+++ b/pages/order/index.vue
@@ -110,6 +110,7 @@ export default {
receiptFlag: '', // 是否已签单
payStatus: '', // 支付状态
payStatusName: '', //
+ insuranceFlag: '', //
},
activeTab: 0,
count: {},
diff --git a/pages/order/insurance.vue b/pages/order/insurance.vue
index e9f8a3d..c6d56a9 100644
--- a/pages/order/insurance.vue
+++ b/pages/order/insurance.vue
@@ -8,37 +8,39 @@
-
+
-
- {{ item.amountStr }}
- {{ item.title }}
- {{ item.subTitle }}
+
+ {{ item.coverageLimit }}万
+ 货值(赔付限额)
+ {{ item.remark }}
- 浙江中邮物流有限公司
+ {{ frightInfo.name }}
- 运费 * 费率=10000 * 0.0005=5元(最低5元每笔)
+
+ 运费 * 费率 = {{ paidAmount }} * {{ choseScheme.receiveRate }} = {{ form.receiveInsuranceAmount }}元(最低{{ choseScheme.minReceiveFee }}元每笔)
+
-
+
投保前请仔细阅读并同意
- 《保价须知及责任免除》
+ 《保价须知及责任免除》
- 取消
- 确定投保
+ 取消投保
+ 确定投保
@@ -65,44 +67,48 @@ export default {
},
data() {
return {
+ pdfFile0: 'https://zeyi-tms-product.oss-cn-hangzhou.aliyuncs.com/file/tms/a15401e7-3d44-41ab-9302-39c6574a1233.pdf',
+ pdfFile: 'https://zeyi-tms-product.oss-cn-hangzhou.aliyuncs.com/file/tms/71c2d1ff-0ea1-491b-b387-d2f18de0b19d.html',
+ paidAmount: '',
checkboxValue: [],
haveAgree: false,
fileShow: false,
showLoadTime: false,
loadTimeDef: new Date(),
- schemeList: [
- {
- title: '货值(赔付限额)',
- amountStr: '100万',
- amount: 1000000,
- subTitle: '',
- },
- {
- title: '货值(赔付限额)',
- amountStr: '200万',
- amount: 2000000,
- subTitle: '不含大宗及冷藏',
- },
- {
- title: '货值(赔付限额)',
- amountStr: '300万',
- amount: 3000000,
- subTitle: '不含大宗及冷藏',
- },
- ],
+ choseSchemeIndex: -1,
+ schemeList: [],
form: {
- radio: 'true',
- amount: '',
+ startDate: '',
+ receiveInsuranceAmount: '',
+ insuranceProgramCode: '',
+ coverageLimit: '',
},
shengYuTime: 10,
popupHandel: null,
+ choseScheme: null,
+ frightInfo: {},
};
},
+ onLoad(option) {
+ this.paidAmount = option.paidAmount;
+ this.initData();
+ },
methods: {
+ initData() {
+ uni.$u.api.freightOrder.freightInsuranceList({}).then(res => {
+ this.schemeList = res.result || [];
+ });
+ uni.$u.api.freightOrder.currentFreight({}).then(res => {
+ this.frightInfo = res.result || {};
+ });
+ },
loadTimeFormat({ value }) {
- this.form.loadTime = dayjs(value).format('YYYY-MM-DD HH:mm:ss');
+ this.form.startDate = dayjs(value).format('YYYY-MM-DD HH:mm:ss');
this.showLoadTime = false;
},
+ openWebView() {
+ uni.navigateTo({ url: '/pages/common/webview?url=' + this.pdfFile });
+ },
openPreFile() {
if (popupHandel) {
clearInterval(popupHandel);
@@ -132,6 +138,42 @@ export default {
this.haveAgree = true;
this.checkboxValue = ['agree'];
},
+ cancelInsurance() {
+ let form = {
+ startDate: '',
+ receiveInsuranceAmount: '',
+ insuranceProgramCode: '',
+ coverageLimit: '',
+ };
+ uni.$emit('buy-insurance', form);
+ uni.navigateBack();
+ },
+ submitInsurance() {
+ if (!this.form.startDate) {
+ return uni.showToast({ title: '起运时间不能为空', icon: 'none' });
+ }
+ if (!this.form.insuranceProgramCode) {
+ return uni.showToast({ title: '请选择方案', icon: 'none' });
+ }
+ uni.$emit('buy-insurance', { ...this.form, programName: this.choseScheme.programName });
+ uni.navigateBack();
+ },
+ getReceiveInsuranceAmount(choseScheme, paidAmount) {
+ if (!paidAmount || !choseScheme) return '';
+ let v1 = Number(paidAmount) * Number(choseScheme.receiveRate);
+ return v1 >= Number(choseScheme.minReceiveFee) ? Number(v1 + 0.005).toFixed(2) : choseScheme.minReceiveFee;
+ },
+ choseSchemeFun(index) {
+ this.choseSchemeIndex = index;
+ let choseScheme = this.schemeList[index];
+ this.form = {
+ insuranceProgramCode: choseScheme.code,
+ coverageLimit: choseScheme.coverageLimit,
+ receiveInsuranceAmount: this.getReceiveInsuranceAmount(choseScheme, this.paidAmount),
+ startDate: this.form.startDate,
+ };
+ this.choseScheme = choseScheme;
+ },
},
};
--
libgit2 0.21.0