| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207 |
- <template>
- <view class="contentColumnC">
- <view class="contentColumnC" style="width:700rpx;background-color: white;">
- <view class="contentInRowL sizeSpace">
- <text class="ztextfontB2">费用明细</text>
- </view>
- <view class="contentInRowS sizeSpace">
- <view class="contentInRowL" style="align-items:center;">
- <text class="textfontB3">总费用:</text>
- <text style="font-size: 50rpx;font-weight: bold;">{{XChengObj.amount}}</text>
- <text class="textfontB3">元</text>
- </view>
- <!-- <view class="contentInRowR">
- <text class="textfontB3">支付宝支付</text>
- <uni-icons></uni-icons>
- </view> -->
- </view>
- <!-- <view class="contentInRowL sizeSpace">
- <text class="textfontB3" style="color:darkgray;width: 660rpx;">预估价不含附加费,本次行程产生高速费12元,与预估相比正常,且无其他附加费用</text>
- </view> -->
- <view class="contentInRowS sizeSpace">
- <text class="textfontB3">起步费</text>
- <text class="textfontB3">{{qibuf}}元</text>
- </view>
- <view class="contentInRowS sizeSpace">
- <text class="textfontB3">里程费</text>
- <text class="textfontB3">{{XChengObj.fare}}元</text>
- </view>
- <view class="contentInRowS sizeSpace">
- <text class="textfontB3">其他费用</text>
- <text class="textfontB3">{{getqitafy()}}元</text>
- </view>
- <!-- <view class="contentInRowS sizeSpace">
- <text class="textfontB3">优惠券</text>
- <text class="textfontB3">0元</text>
- </view> -->
- <view class="contentColumnC bottomViewBt">
- <text class="quxiaoBt" @click="quzhifu">去支付</text>
- </view>
- </view>
- </view>
- </template>
- <script>
- import api from "@/pages/api/api.js"
- export default {
- name:"dachejiesuan",
- props: {
- XChengObj:'',
- qibuf:0
- },
- data() {
- return {
-
- };
- },
- methods:{
- getqitafy(){
- var qt = this.XChengObj.amount*1-this.XChengObj.fare*1-this.qibuf*1;
- if(qt<=0){
- qt=0;
- }
- return qt.toFixed(2);
- },
- quzhifu(){
- uni.showToast({
- title:'模拟支付完成',//that.i18n('api.wangluoshibai'),
- icon: 'none',
- duration: 2500
- })
- var data = {
- id:this.XChengObj.id,
- state:4
- }
- this.SetTxorder(data,0);
- },
-
- SetTxorder(data,index){
- api('SetTxorder',data,res=>{
- console.log('SetTxorder------',res)
- if(res.data.code==200){
- this.pushMsg(this.XChengObj.driver.cid,this.XChengObj.user.phone,'乘客支付了');
- uni.showToast({
- title:'修改成功',//that.i18n('api.wangluoshibai'),
- icon: 'none',
- duration: 2500
- })
- this.$emit('EZfSelect',1);
- }
- else{
- uni.showToast({
- title:'修改失败',//that.i18n('api.wangluoshibai'),
- icon: 'none',
- duration: 2500
- })
- }
- },failc=>{
- //console.log('getTaxiPrices----',failc)
- uni.showToast({
- title:'网络错误',//that.i18n('api.wangluoshibai'),
- icon: 'none',
- duration: 2500
- })
- })
- },
- pushMsg(cid,phone,msg){//消息推送
- var time=new Date();
- var n,y,r,h,m,s;
- n=time.getFullYear();
- y=time.getMonth()+1;
- r=time.getDate();
- h=time.getHours();
- m=time.getMinutes();
- s=time.getSeconds();
-
- var timsStr = n+'-'+y+'-'+r+' '+h+':'+m+':'+s;
- var payloadData={
- rcuser:'尾号:'+phone.slice(-4),
- time:timsStr,
- msg:msg,
- type:1
- }
- api('pushMsgQS',{
- cid:cid,
- title:'您有新消息了',
- content:msg,
- payload:payloadData
- },res=>{
-
- },failc=>{
- //console.log('getadvertis----',failc)
- })
- },
- getVNPay(){
- var language = uni.getStorageSync('language');
- var lg;
- if(language=='yuenan'){
- lg='vi';
- }
- else{
- lg='en';
- }
-
- api('VNPay',{
- orderid:this.XChengObj.ddId,
- amount:this.XChengObj.amount,
- language:lg
- },res=>{
- if(res.data.code!=200){
- uni.showToast({
- title: res.data.msg,
- icon: 'none',
- duration: 3500
- })
- return;
- }
- uni.navigateTo({
- url:'/pages/OrderList/buy/Zhifuyemian?url='+ encodeURIComponent(JSON.stringify(res.data.data))+'&ddid='+this.XChengObj.ddId
- })
- },failc=>{
- //console.log('getadvertis----',failc)
- })
- },
- },
- }
- </script>
- <style>
- .sizeSpace{
- width:660rpx;
- margin-top: 20rpx;
- align-items: center;
- }
- .bottomViewBt{
- margin-top: 40rpx;
- width:580rpx;
- }
- .quxiaoBt{
- margin-top: 30rpx;
- margin-bottom: 30rpx;
- padding-left: 50rpx;
- padding-right: 50rpx;
- font-size: 32rpx;
- font-weight: bold;
- line-height: 60rpx;
- border-radius: 30rpx;
- text-align: center;
- background-color: #E86E48;
- color: white;
- }
- .querenBt{
- margin-top: 30rpx;
- margin-bottom: 30rpx;
- padding-left: 50rpx;
- padding-right: 50rpx;
- font-size: 32rpx;
- font-weight: bold;
- border: 1rpx solid darkgray;
- line-height: 60rpx;
- border-radius: 30rpx;
- text-align: center;
- background-color: white;
- color: #1A1A1A;
- }
- </style>
|