修改
This commit is contained in:
parent
b715310e61
commit
8a3eb31883
@ -7,7 +7,7 @@
|
||||
<span>{{item.orderStatus=='WAIT_PAY'?'待付款':''}}
|
||||
{{item.orderStatus=='PAY'?'已付款':''}}
|
||||
{{item.orderStatus=='WAIT_DISPATCH'&&item.orderType!='COMPANION_IN_HOSPITAL'?'待服务':''}}
|
||||
{{item.orderStatus=='WAIT_DISPATCH'&&item.orderType=='COMPANION_IN_HOSPITAL'?'服务完成':''}}
|
||||
{{item.orderStatus=='WAIT_DISPATCH'&&item.orderType=='COMPANION_IN_HOSPITAL'?'已支付(陪诊陪护)':''}}
|
||||
{{item.orderStatus=='NOT_FINISH'?'待完成':''}}
|
||||
{{item.orderStatus=='COMPLETE'?'待评价':''}}
|
||||
{{item.orderStatus=='EVALUATED'?'服务完成':''}}
|
||||
|
||||
@ -44,7 +44,7 @@
|
||||
<u-toast ref="uToast" />
|
||||
<view class="updata">
|
||||
<view class="price">
|
||||
¥{{orderlist.totalPrice}}
|
||||
¥{{totalPrice}}
|
||||
</view>
|
||||
<view class="purchase" @click="updata">
|
||||
购买
|
||||
@ -82,6 +82,7 @@
|
||||
},
|
||||
timevalue: undefined,
|
||||
timepicker: false,
|
||||
totalPrice: false,
|
||||
}
|
||||
},
|
||||
onShow() {},
|
||||
@ -92,7 +93,7 @@
|
||||
},
|
||||
watch: {
|
||||
companionDays() {
|
||||
this.orderlist.totalPrice = this.companionDays * this.orderlist.nurseItemPrice
|
||||
this.totalPrice = this.argMul(this.companionDays, this.orderlist.totalPrice)
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
@ -174,6 +175,7 @@
|
||||
getPatientInfo(stationId, stationItemId, stationItemPriceId) {
|
||||
getAppStationItemInfo(stationId, stationItemId, stationItemPriceId).then(res => {
|
||||
res.data.nurseItemContent = ''
|
||||
this.totalPrice = res.data.totalPrice
|
||||
this.orderlist.totalPrice = res.data.totalPrice
|
||||
this.orderlist.nurseItemName = res.data.nurseItemName
|
||||
this.orderlist.nurseItemPrice = res.data.nurseItemPrice
|
||||
@ -190,14 +192,73 @@
|
||||
this.timepicker = true
|
||||
},
|
||||
timeconfirm(e) {
|
||||
console.log(e)
|
||||
this.orderlist.companionStartDate = e.year + '-' + e.month + '-' + e.day
|
||||
this.orderlist.companionEndDate = e.year + '-' + e.endmonth + '-' + e.endday
|
||||
var starttime = e.year + '.' + e.month + '.' + e.day
|
||||
var endtime = e.year + '.' + e.endmonth + '.' + e.endday
|
||||
this.timevalue = starttime + ' - ' + endtime
|
||||
this.timepicker = false
|
||||
}
|
||||
},
|
||||
argAdd(arg1, arg2) {
|
||||
// 加法函数
|
||||
var _this = this,
|
||||
r1 = 0,
|
||||
r2 = 0,
|
||||
m = 0;
|
||||
try {
|
||||
r1 = arg1.toString().split(".")[1].length
|
||||
} catch (e) {}
|
||||
try {
|
||||
r2 = arg2.toString().split(".")[1].length
|
||||
} catch (e) {}
|
||||
m = Math.pow(10, Math.max(r1, r2))
|
||||
return _this.argDiv((_this.argMul(arg1, m) + _this.argMul(arg2, m)), m)
|
||||
},
|
||||
argSubtr(arg1, arg2) {
|
||||
// 减法函数
|
||||
var _this = this,
|
||||
r1 = 0,
|
||||
r2 = 0,
|
||||
m = 0;
|
||||
try {
|
||||
r1 = arg1.toString().split(".")[1].length
|
||||
} catch (e) {}
|
||||
try {
|
||||
r2 = arg2.toString().split(".")[1].length
|
||||
} catch (e) {}
|
||||
m = Math.pow(10, Math.max(r1, r2));
|
||||
return _this.argDiv((_this.argMul(arg1, m) - _this.argMul(arg2, m)), m)
|
||||
},
|
||||
argMul(arg1, arg2) {
|
||||
// 乘法函数
|
||||
var _this = this,
|
||||
m = 0,
|
||||
s1 = arg1.toString(),
|
||||
s2 = arg2.toString();
|
||||
try {
|
||||
m += s1.split(".")[1].length
|
||||
} catch (e) {}
|
||||
try {
|
||||
m += s2.split(".")[1].length
|
||||
} catch (e) {}
|
||||
return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m)
|
||||
},
|
||||
argDiv(arg1, arg2) {
|
||||
// 除法函数
|
||||
var _this = this,
|
||||
t1 = 0,
|
||||
t2 = 0,
|
||||
r1, r2;
|
||||
try {
|
||||
t1 = arg1.toString().split(".")[1].length
|
||||
} catch (e) {}
|
||||
try {
|
||||
t2 = arg2.toString().split(".")[1].length
|
||||
} catch (e) {}
|
||||
r1 = Number(arg1.toString().replace(".", ""))
|
||||
r2 = Number(arg2.toString().replace(".", ""))
|
||||
return _this.argMul((r1 / r2), Math.pow(10, t2 - t1));
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user