更新
This commit is contained in:
@@ -6,15 +6,18 @@
|
||||
<image style="width: 65%;height: 65%;" :src="details.siteImages"></image>
|
||||
</view>
|
||||
<view class="payLi felx justifyContent alignItems">{{details.payAccountType==0?'个人':'企业'}}</view>
|
||||
<view :style="{background:paymentStatus(details.orderStatus).bg,color:paymentStatus(details.orderStatus).color}" class="payment felx justifyContent alignItems">{{paymentStatus(details.orderStatus).text}}</view>
|
||||
<view
|
||||
:style="{background:paymentStatus(details.orderStatus).bg,color:paymentStatus(details.orderStatus).color}"
|
||||
class="payment felx justifyContent alignItems">{{paymentStatus(details.orderStatus).text}}</view>
|
||||
</view>
|
||||
<view class="paymentInformation">
|
||||
<view class=" flex">
|
||||
<view></view>
|
||||
<view>
|
||||
<view class="Text">
|
||||
{{details.siteName}}
|
||||
<uni-icons @click="copy(details.siteName)" style="margin-left: 10rpx;" color="#bbbbbb" custom-prefix="iconfont" type="iconfuzhi" size="20"></uni-icons>
|
||||
{{details.siteName}}
|
||||
<uni-icons @click="copy(details.siteName)" style="margin-left: 10rpx;" color="#bbbbbb"
|
||||
custom-prefix="iconfont" type="iconfuzhi" size="20"></uni-icons>
|
||||
</view>
|
||||
<view class="smallText">{{details.siteId}}</view>
|
||||
</view>
|
||||
@@ -22,7 +25,11 @@
|
||||
<view style="margin:33rpx 0;" class="flex">
|
||||
<view></view>
|
||||
<view>
|
||||
<view class="Text"> <text>{{details.customerName}}</text> <text style="margin-left:35rpx;">{{details.customerPhone}}</text> <uni-icons @click="copy(details.customerPhone)" style="margin-left: 10rpx;" color="#bbbbbb" custom-prefix="iconfont" type="iconfuzhi" size="20"></uni-icons> </view>
|
||||
<view class="Text"> <text>{{details.customerName}}</text> <text
|
||||
style="margin-left:35rpx;">{{details.customerPhone}}</text>
|
||||
<uni-icons @click="copy(details.customerPhone)" style="margin-left: 10rpx;" color="#bbbbbb"
|
||||
custom-prefix="iconfont" type="iconfuzhi" size="20"></uni-icons>
|
||||
</view>
|
||||
<view class="smallText">{{details.customerId}}</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -45,12 +52,14 @@
|
||||
<view class="price felx">
|
||||
<view>
|
||||
<view class="smallText">价格</view>
|
||||
<view class="bgtext">{{ details.realAmount}}<text style="position: relative;left: 20rpx;" class="Text">元</text>
|
||||
<view class="bgtext">{{ details.realAmount}}<text style="position: relative;left: 20rpx;"
|
||||
class="Text">元</text>
|
||||
</view>
|
||||
</view>
|
||||
<view style="margin-left: 143rpx;">
|
||||
<view class="smallText">升数</view>
|
||||
<view class="bgtext">{{details.volume}} <text style="position: relative;left: 20rpx;" class="Text">L</text>
|
||||
<view class="bgtext">{{details.volume}} <text style="position: relative;left: 20rpx;"
|
||||
class="Text">L</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -76,13 +85,16 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="details.orderWfStatus==0" @tap='codeFn' :style="{marginBottom:!moreOpen?'':'0',background:'#228B22'}"
|
||||
<view v-if="details.orderWfStatus==0" @tap='codeFn'
|
||||
:style="{marginBottom:!moreOpen?'':'0',background:'#228B22'}"
|
||||
class="writeOff felx justifyContent alignItems ">待核销</view>
|
||||
<view v-else :style="{marginBottom:!moreOpen?'':'0',background:'#BBBBBB'}"
|
||||
<view v-else :style="{marginBottom:!moreOpen?'':'0',background:'#BBBBBB'}"
|
||||
class="writeOff felx justifyContent alignItems ">已核销</view>
|
||||
<view v-if="!moreOpen" @click="moreOpen=!moreOpen" class="moreButten felx justifyContent alignItems smallText ">
|
||||
<view v-if="!moreOpen" @click="moreOpen=!moreOpen"
|
||||
class="moreButten felx justifyContent alignItems smallText ">
|
||||
更多信息&退款信息
|
||||
<uni-icons :style="{transform:moreOpen?'rotate(180deg)':'rotate(0deg)',transition:'transform .3s' }" size="15" class="content-clear-icon" type="bottom" color="#c0c4cc" ></uni-icons>
|
||||
<uni-icons :style="{transform:moreOpen?'rotate(180deg)':'rotate(0deg)',transition:'transform .3s' }"
|
||||
size="15" class="content-clear-icon" type="bottom" color="#c0c4cc"></uni-icons>
|
||||
</view>
|
||||
<view class="dxx" :style="{height:moreOpen?'265rpx':'0rpx'}">
|
||||
<view class="splitLine">
|
||||
@@ -94,41 +106,53 @@
|
||||
</view>
|
||||
<view class="more">
|
||||
<view @tap='moreOpen=false' style="display: flex; justify-content: space-between;" class="Text">
|
||||
{{details.orderSerialNumber}}
|
||||
<uni-icons :style="{transform:moreOpen?'rotate(0deg)':'rotate(180deg)',transition:'transform .3s' }" size="15" class="content-clear-icon" type="top" color="#c0c4cc" ></uni-icons>
|
||||
|
||||
{{details.orderSerialNumber}}
|
||||
<uni-icons
|
||||
:style="{transform:moreOpen?'rotate(0deg)':'rotate(180deg)',transition:'transform .3s' }"
|
||||
size="15" class="content-clear-icon" type="top" color="#c0c4cc"></uni-icons>
|
||||
|
||||
</view>
|
||||
<view style="margin-bottom:33rpx;" class="smallText">{{details.createTime}}</view>
|
||||
<view @tap="refund" v-if="!customerList.includes(details.createSource)" :style="{background:details.orderStatus==1?'':'#bbbbbb'}" class="refund felx justifyContent alignItems">退款</view>
|
||||
<!-- <view @tap="refund" v-if="!customerList.includes(details.createSource)"
|
||||
:style="{background:details.orderStatus==1?'':'#bbbbbb'}"
|
||||
class="refund felx justifyContent alignItems">退款</view> -->
|
||||
<view @tap="refundff" :style="{background:details.orderStatus==1?'':'#bbbbbb'}"
|
||||
class="refund felx justifyContent alignItems">退款</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="footerButten felx">
|
||||
<view @click="copy(details.orderSerialNumber)" class="copyButten felx justifyContent alignItems">复制订单号</view>
|
||||
<view @click="copy(details.orderSerialNumber)" class="copyButten felx justifyContent alignItems">复制订单号
|
||||
</view>
|
||||
<!-- <button class="forwardButten felx justifyContent alignItems" open-type="share">分享</button> -->
|
||||
</view>
|
||||
<popup :show='show' @confirmFn='confirmFn' @closeFn='closeFn' :butten='butten' :styles="{height:'350rpx',width:'350rpx'}" v-model="iShow.seting">
|
||||
<popup :show='show' @confirmFn='confirmFn' @closeFn='closeFn' :butten='butten'
|
||||
:styles="{height:'350rpx',width:'350rpx'}" v-model="iShow.seting">
|
||||
<view slot="coment">
|
||||
<view style="height: 350rpx;display: flex;align-items: center; width: 100%;justify-content: center;flex-wrap: wrap;flex-direction: column;">
|
||||
<view v-if="!details.secondChannelCode" style="width: 100%; font-size: 34rpx;text-align: center; margin-bottom: 15rpx;" class="smallText">核销二维码</view>
|
||||
<qrcode v-if="iShow.seting&&details.secondChannelCode" ref="qrcode" cid="2" loadMake iconSize="10" :val="details.secondChannelCode" unit="upx"
|
||||
background="#fff" foreground="#000" pdground="#000" onval
|
||||
@result="qrR" />
|
||||
<view v-if="!details.secondChannelCode">
|
||||
二维码生成错误
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
style="height: 350rpx;display: flex;align-items: center; width: 100%;justify-content: center;flex-wrap: wrap;flex-direction: column;">
|
||||
<view v-if="!details.secondChannelCode"
|
||||
style="width: 100%; font-size: 34rpx;text-align: center; margin-bottom: 15rpx;"
|
||||
class="smallText">核销二维码</view>
|
||||
<qrcode v-if="iShow.seting&&details.secondChannelCode" ref="qrcode" cid="2" loadMake iconSize="10"
|
||||
:val="details.secondChannelCode" unit="upx" background="#fff" foreground="#000" pdground="#000"
|
||||
onval @result="qrR" />
|
||||
<view v-if="!details.secondChannelCode">
|
||||
二维码生成错误
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</popup>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import orderList from '@/api/orderList'
|
||||
import qrcode from '@/components/tki-qrcode/tki-qrcode'
|
||||
|
||||
import tool from '@/utils/tool.js'
|
||||
|
||||
import serve from '@/api/orderList/orderDetails.js'
|
||||
export default {
|
||||
onShareAppMessage(res) {
|
||||
return {
|
||||
@@ -141,18 +165,18 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
customerList:['HLL','FENGTU'],
|
||||
details:{},
|
||||
show:{
|
||||
img:false,
|
||||
footer:false
|
||||
customerList: ['HLL', 'FENGTU'],
|
||||
details: {},
|
||||
show: {
|
||||
img: false,
|
||||
footer: false
|
||||
},
|
||||
iShow: {
|
||||
seting: false
|
||||
},
|
||||
moreOpen: false,
|
||||
val:'898989898',
|
||||
id:null,
|
||||
val: '898989898',
|
||||
id: null,
|
||||
butten: {
|
||||
colse: '取消',
|
||||
confirm: '确定',
|
||||
@@ -161,54 +185,103 @@
|
||||
confirmBg: '',
|
||||
confirmColor: ''
|
||||
},
|
||||
refundMap: new Map([
|
||||
[
|
||||
['FUYOU'], {
|
||||
interface: serve.fuyouRefund,
|
||||
type: 'post'
|
||||
}
|
||||
],
|
||||
[
|
||||
['ZHIZHU', 'NEWHOPE', 'MUYUAN', 'G7CLUSTER-CAHNGJIU'], {
|
||||
interface: serve.orderRefund,
|
||||
type: 'post'
|
||||
}
|
||||
],
|
||||
[
|
||||
['SHUNFENG'], {
|
||||
interface: serve.sfRefund,
|
||||
type: 'post'
|
||||
}
|
||||
],
|
||||
[
|
||||
['ANNENG'], {
|
||||
interface: serve.refund,
|
||||
type: 'get'
|
||||
}
|
||||
],
|
||||
[
|
||||
['YIGUANYOU', 'ANTU'], {
|
||||
interface: serve.unifiedRefund,
|
||||
type: 'post'
|
||||
}
|
||||
],
|
||||
])
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(e) {
|
||||
if(e.jsData){
|
||||
if (e.jsData) {
|
||||
console.log(JSON.parse(e.jsData));
|
||||
this.id = JSON.parse(e.jsData).id
|
||||
this.id = JSON.parse(e.jsData).id
|
||||
this.getList(this.id)
|
||||
}
|
||||
|
||||
console.log('refundMap', this.refundMap)
|
||||
},
|
||||
methods: {
|
||||
codeFn(){
|
||||
if(this.details.orderWfStatus==0){
|
||||
|
||||
orderList.getOrderQrCodeOms(this.details.orderSerialNumber).then(res=>{
|
||||
if(res.code==20000){
|
||||
refundff() {
|
||||
let {createSource} = this.details
|
||||
if(!createSource) {
|
||||
uni.showToast({
|
||||
title:"createSource 为空",
|
||||
icon:"none"
|
||||
})
|
||||
return
|
||||
}
|
||||
let keys = this.refundMap.keys()
|
||||
console.log(keys)
|
||||
// console.log(this.details)
|
||||
// console.log('refundff')
|
||||
},
|
||||
codeFn() {
|
||||
if (this.details.orderWfStatus == 0) {
|
||||
|
||||
orderList.getOrderQrCodeOms(this.details.orderSerialNumber).then(res => {
|
||||
if (res.code == 20000) {
|
||||
console.log(res)
|
||||
this.val = res.data.codeStr
|
||||
this.iShow.seting=true
|
||||
}else{
|
||||
this.iShow.seting = true
|
||||
} else {
|
||||
uni.showToast({
|
||||
title:res.msg,
|
||||
icon:'none'
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
}else{
|
||||
this.iShow.seting=false
|
||||
|
||||
} else {
|
||||
this.iShow.seting = false
|
||||
}
|
||||
},
|
||||
refund(){
|
||||
if(this.details.orderStatus!==1) return ;
|
||||
let that =this
|
||||
refund() {
|
||||
if (this.details.orderStatus !== 1) return;
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '是否确认退款',
|
||||
success: function (res) {
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
orderList.refund({id:that.id}).then(res=>{
|
||||
if(res.code==20000){
|
||||
orderList.refund({
|
||||
id: that.id
|
||||
}).then(res => {
|
||||
if (res.code == 20000) {
|
||||
uni.showToast({
|
||||
title: '退款成功',
|
||||
duration: 2000
|
||||
});
|
||||
setTimeout(()=>{
|
||||
setTimeout(() => {
|
||||
that.getList(that.id)
|
||||
},1000)
|
||||
}, 1000)
|
||||
}
|
||||
})
|
||||
console.log('用户点击确定');
|
||||
@@ -218,70 +291,72 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
paymentStatus(e){
|
||||
switch(e){
|
||||
paymentStatus(e) {
|
||||
switch (e) {
|
||||
case 0:
|
||||
return {
|
||||
text:'待支付',
|
||||
color:'#EBC153',
|
||||
bg:'#FFF6DD'
|
||||
}
|
||||
break;
|
||||
return {
|
||||
text: '待支付',
|
||||
color: '#EBC153',
|
||||
bg: '#FFF6DD'
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
return {
|
||||
text:'已支付',
|
||||
color:'#17A00E',
|
||||
bg:'#D1FFDA'
|
||||
}
|
||||
break;
|
||||
return {
|
||||
text: '已支付',
|
||||
color: '#17A00E',
|
||||
bg: '#D1FFDA'
|
||||
}
|
||||
break;
|
||||
case -1:
|
||||
return {
|
||||
text:'支付失败',
|
||||
color:'#EC4645',
|
||||
bg:'#FFC8C8'
|
||||
}
|
||||
break;
|
||||
return {
|
||||
text: '支付失败',
|
||||
color: '#EC4645',
|
||||
bg: '#FFC8C8'
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
return {
|
||||
text:'已取消',
|
||||
color:'#999999',
|
||||
bg:'#E9E9E9'
|
||||
}
|
||||
break;
|
||||
return {
|
||||
text: '已取消',
|
||||
color: '#999999',
|
||||
bg: '#E9E9E9'
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
return {
|
||||
text:'已退款',
|
||||
color:'#999999',
|
||||
bg:''
|
||||
}
|
||||
break;
|
||||
return {
|
||||
text: '已退款',
|
||||
color: '#999999',
|
||||
bg: ''
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
return {
|
||||
text:'退款中',
|
||||
color:'#EBC153',
|
||||
bg:''
|
||||
}
|
||||
// return '退款中'
|
||||
break;
|
||||
return {
|
||||
text: '退款中',
|
||||
color: '#EBC153',
|
||||
bg: ''
|
||||
}
|
||||
// return '退款中'
|
||||
break;
|
||||
case 5:
|
||||
return {
|
||||
text:'退款失败',
|
||||
color:'#EC4645',
|
||||
bg:''
|
||||
}
|
||||
break;
|
||||
}
|
||||
return {
|
||||
text: '退款失败',
|
||||
color: '#EC4645',
|
||||
bg: ''
|
||||
}
|
||||
break;
|
||||
}
|
||||
},
|
||||
getList(e){
|
||||
getList(e) {
|
||||
orderList.findOrderDetails({
|
||||
orderId:e
|
||||
}).then(res=>{
|
||||
if(res.code!==20000)return
|
||||
orderId: e
|
||||
}).then(res => {
|
||||
if (res.code !== 20000) return
|
||||
this.details = res.data;
|
||||
tool.numberSetting(this.details,['realAmount','volume','realPrice','marketPrice','sitePrice'],2);
|
||||
tool.numberSetting(this.details, ['realAmount', 'volume', 'realPrice', 'marketPrice',
|
||||
'sitePrice'
|
||||
], 2);
|
||||
})
|
||||
},
|
||||
qrR(){
|
||||
qrR() {
|
||||
console.log('1')
|
||||
},
|
||||
closeFn() {
|
||||
@@ -306,7 +381,7 @@
|
||||
},
|
||||
copy(text) {
|
||||
uni.setClipboardData({
|
||||
data:`${text}`,
|
||||
data: `${text}`,
|
||||
// data: `订单ID:${this.details.id}\n订单流水号:${this.details.orderSerialNumber}\n订单金额:${this.details.realAmount}元\n订单升数:${this.details.volume}升\n订单类型:${this.details.payAccountType==0?'个人':'企业'}\n司机姓名:${this.details.customerName}\n司机id:${this.details.customerId} ${this.details.companyName?'\n订单所属公司:' + this.details.companyName :''}\n手机号码:${this.details.customerPhone}`, //要被复制的内容
|
||||
// ${(this.details.payAccountType==0?'司机姓名':'订单所属公司') + ':' + (this.details.payAccountType==0? this.details.customerName:this.details.companyName)}
|
||||
success: () => { //复制成功的回调函数
|
||||
|
||||
Reference in New Issue
Block a user