Browse Source

fix order bug

account
刘嘉炜 3 years ago
parent
commit
ba61532a27
  1. 6
      src/components/order_list/mall/mall.vue
  2. 2
      src/components/organize_order/organize_order.vue
  3. 102
      src/subpackage/device/components/order/organize_detail/organize_detail.vue
  4. 13
      src/subpackage/order/pages/curriculum/detail/detail.vue
  5. 2
      src/subpackage/order/pages/mall/detail/detail.vue
  6. 6
      src/subpackage/order/pages/mall/refund_operate/refund_operate.vue
  7. 2
      src/subpackage/order/pages/mall/send_out/send_out.vue
  8. 2
      src/subpackage/order/pages/spectacular_monent/detail/detail.vue
  9. 2
      src/utils/util.js

6
src/components/order_list/mall/mall.vue

@ -23,7 +23,7 @@
<view class="mo-total"><text class="mt-txt">商品金额合计</text>¥{{ orderInfo.pay_amount || 0 }}</view>
<view class="mo-bot">
<view class="mb-express">配送方式{{ orderInfo.product_order_self_pickup == 1 ? '自提' : '快递' }}</view>
<view class="mb-btn">发货</view>
<view class="mb-btn" @click.stop="toSendOut">发货</view>
</view>
</view>
</template>
@ -43,6 +43,10 @@ export default {
toOrderInfo(){
let { orderInfo } = this;
util.routeTo(`/subpackage/order/pages/mall/detail/detail?order_no=${orderInfo.order_no}`, 'nT');
},
toSendOut(){
let { orderInfo } = this;
util.routeTo(`/subpackage/order/pages/mall/send_out/send_out?order_no=${orderInfo.order_no}&brand_id=${orderInfo.brand_id}`, 'nT');
}
}
}

2
src/components/organize_order/organize_order.vue

@ -1,7 +1,7 @@
<template>
<view class="timing-order" @click="toOrderDetails">
<view class="ro-header">
<view class="rh-view">{{orderInfo.original_order.extension.stadium_name || '-'}}</view>
<view class="rh-view">{{orderInfo.label.BrandAndStadiumName || '-'}}</view>
<text :class="[ 'rh-text', orderInfo.original_order&&orderInfo.original_order.pay_status == 0?'rh-active':'' ]">{{zh_order_status(orderInfo.original_order&&orderInfo.original_order.pay_status)}}</text>
</view>
<view class="ro-section">

102
src/subpackage/device/components/order/organize_detail/organize_detail.vue

@ -2,15 +2,17 @@
<view class="timing-details">
<view class="td-head">
<view class="th-store">
<image :src="orderInfo.original_order.extension.stadium_logo || '' "></image>
<view>{{orderInfo.original_order.extension.stadium_name || '-'}}</view>
<image :src="orderInfo.label.BrandAndStadiumLogo"></image>
<view>{{orderInfo.label.BrandAndStadiumName || '-'}}</view>
</view>
<view class="th-line">
<view>订单编号<text>{{orderInfo.order_no || '-'}}</text></view>
<view><text :class="[orderInfo.original_order.pay_status == 0?'tl-active':'']">{{yw_order_status(orderInfo.original_order.pay_status)}}</text></view>
<view v-if="orderInfo.original_order" >
<text :class="[orderInfo.original_order.pay_status == 0?'tl-active':'']">{{yw_order_status(orderInfo.original_order.pay_status)}}</text>
</view>
</view>
<view class="th-line">
<view>创建时间<text>{{orderInfo.original_order.created_at || '-'}}</text></view>
<view>创建时间<text>{{orderInfo.created_at || '-'}}</text></view>
</view>
<view class="th-line">
<view>用户昵称<text>{{orderInfo.user_nickname || '-'}}</text></view>
@ -31,29 +33,33 @@
<view class="td-box" >
<view class="tb-title">约玩信息</view>
<view class="tb-line">
<view>约玩主题<text>{{(orderInfo.theme)}}</text></view>
<view class="yw-place-box">
<view class="yw-title">预定场地</view>
<view class="yw-place">
<view v-for="y_item in orderInfo.original_order.sessions">
{{y_item.venue_name}} {{y_item.duration}} ( {{y_item.price}} )
<view>约玩主题<text>{{ orderInfo.theme || '-' }}</text></view>
<block v-if="orderInfo.type == 'Main'">
<view class="yw-place-box" v-if="orderInfo.original_order&&orderInfo.original_order.sessions">
<view class="yw-title">预定场地</view>
<view class="yw-place">
<view v-for="(y_item, i) in orderInfo.original_order.sessions" :key="i">
{{ (y_item.date).replace(/\-/g, '/') || '-' }} {{ y_item.duration.replace(/\-/g, '~') || '-' }} {{ y_item.venue_name || '-' }}
</view>
</view>
</view>
</view>
<!-- <view>报名费用<text>{{orderInfo.original_order.sessions[0].price || '-'}}</text></view> -->
<!-- <view>订场费用<text>{{orderInfo.original_order.sessions[0].price || '-'}}</text></view> -->
<view>订场费用<text>{{ orderInfo.original_order.pay_amount || 0 }}</text></view>
</block>
<view v-if="orderInfo.type == 'Sub'">报名费用<text>{{orderInfo.price_per_person || 0}}</text></view>
</view>
</view>
<!-- 报名信息 -->
<view class="td-box" v-if="orderInfo.original_order.pay_status==2&&orderInfo.type=='Main'">
<view class="td-box" v-if="orderInfo.original_order&&orderInfo.original_order.pay_status==2&&orderInfo.type=='Main'">
<view class="tb-title">报名信息</view>
<view class="tb-line">
<view class="user-images">
<view class="u-item" :key="index" v-for="(item,index) in orderInfo.sub_order_data" v-if="(openImages||(!openImages&&index<5))">
<image :src="item.user_avatar_url" mode=""></image>
<text>{{item.user_nickname}}</text>
</view>
<block v-for="(item,index) in orderInfo.sub_order_data" :key="index">
<view class="u-item" v-if="(openImages||(!openImages&&index<5))">
<image :src="item.user_avatar_url" mode=""></image>
<text>{{item.user_nickname}}</text>
</view>
</block>
</view>
<view class="show-ui-all" @click="toggleImages()">
<image class="" :class="openImages?'reverse':''" src="../../../../../static/images/icon/retail/dropDown.png" mode=""></image>
@ -72,7 +78,7 @@
</view>
<!-- 金额小计 -->
<view class="td-box">
<view class="tb-section " v-if="orderInfo.original_order.pay_status!= 0">
<view class="tb-section " v-if="orderInfo.original_order&&orderInfo.original_order.pay_status!= 0">
<view class="ts-line">
<view>金额小计</view>
<view>¥{{orderInfo.original_order.amount || 0}}</view>
@ -96,7 +102,7 @@
</view>
<!-- 支付信息 -->
<view class="td-box" v-if="orderInfo.original_order.pay_status == 1||orderInfo.original_order.pay_status == 2">
<view class="td-box" v-if="orderInfo.original_order&&(orderInfo.original_order.pay_status == 1||orderInfo.original_order.pay_status == 2)">
<view class="tb-title">支付信息</view>
<view class="tb-line">
<view>支付方式<text>{{zh_pay_type(orderInfo.original_order.pay_type)}}</text></view>
@ -153,39 +159,6 @@ export default {
},
computed: {
...mapState(['brandInfo']),
yw_order_status(){
return status =>{
const _obj = {/* */
'1': '已付款',
'2': '已完成',
'4': '已退款',
}
return _obj[`${status}`] || '-'
}
},
zh_pay_type(){
// 012
return status =>{
const _obj = {
'0': '微信支付',
'1': '支付宝支付',
'2': '储值卡支付',
'3': '商家主动结束计费',
}
return _obj[`${status}`] || '-'
}
},
yw_order_type(){
// type Main/Sub
return status =>{
const _obj = {
'Main': '发起的约玩',
'Sub': '参与的约玩',
}
return _obj[`${status}`] || '-'
}
},
},
data() {
return {
@ -197,6 +170,25 @@ export default {
},
methods: {
yw_order_status(status = ''){
const _obj = {/* */
'1': '已付款',
'2': '已完成',
'4': '已退款',
}
return _obj[`${status}`] || '-';
},
//
yw_order_type(status = ''){
// type Main/Sub
const _obj = {
'Main': '发起的约玩',
'Sub': '参与的约玩',
}
return _obj[`${status}`] || '-'
},
//
zh_pay_type: util.order_pay_type_txt,
confirmChange(){
let { brandInfo, orderInfo, input_amount } = this
if(input_amount == '')return util.showNone('请输入金额!');
@ -231,7 +223,6 @@ export default {
confirmColor:"#469576",
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
servers.get({
url: API.amountIssued,
data: {
@ -240,7 +231,6 @@ export default {
failMsg: '加载失败!'
})
.then(res=>{
console.log(888,res);
util.showNone("发放成功")
setTimeout(()=>uni.navigateBack(),1200);
}).catch(e=>{

13
src/subpackage/order/pages/curriculum/detail/detail.vue

@ -25,8 +25,10 @@
<a-line :value="orderInfo.number || '-'">
<block slot="name">购买课时</block>
</a-line>
<a-line :value="orderInfo.course_period_nums_give || '0'">
<block slot="name">赠送课时</block>
<a-line :value="course_period_nums_give">
<block slot="name">
{{ orderInfo.course_period_nums_give >= 0 ? '赠送课时:':'扣减课时:'}}
</block>
</a-line>
<a-line :value="orderInfo.expired_at || '-'">
<block slot="name">有效期至</block>
@ -108,6 +110,13 @@ import util from '../../../../../utils/util';
import { ORDER_API } from '../../../js/api';
import server from '../../../js/server';
export default {
computed: {
course_period_nums_give(){
let { orderInfo } = this;
let _num = orderInfo.course_period_nums_give || 0;
return (_num + '').replace('-', '')
}
},
// (' 0- 1- 2- 3-退 4-')
components: {
'a-line': a_line,

2
src/subpackage/order/pages/mall/detail/detail.vue

@ -41,7 +41,7 @@
<view class="mi-amount">
<view>实付¥<text>{{ e.product_price_pay || 0 }}</text></view>
<!-- <view>已退款</view> -->
<view v-if="e.product_refund_utype == 1">已退款</view>
</view>
</view>
</view>

6
src/subpackage/order/pages/mall/refund_operate/refund_operate.vue

@ -1,6 +1,6 @@
<template>
<view class="refund-operate">
<view class="ro-num">订单编号 {{ orderInfo.order_no || '-' }}</view>
<view class="ro-num">订单编号 {{ orderInfo.order_no || '-' }}</view>
<view class="ro-box ro-goods-info">
<view class="rgi-single" v-if="refundLs.length == 1">
<image mode="aspectFill" :src="refundLs[0].product_imgs"></image>
@ -29,8 +29,8 @@
<view class="rri-line">
<view class="rl-name"><text>*</text>回退积分</view>
<view class="rl-frame"><input v-model="refundIntegral" /></view>
</view>
</view> -->
</view> -->
</view>
<view class="ro-bar">
<view @click="confirmRefund">确定</view>
</view>

2
src/subpackage/order/pages/mall/send_out/send_out.vue

@ -34,7 +34,7 @@
<view class="oh-tit"><text>*</text>请选择商品发货</view>
<view class="oh-select">
<view @click="sendOutSelectAll">全选</view>
<view>
<view @click="sendOutSelectAll">
<image v-if="isSelectedAllSendOut" mode="aspectFit" src="/subpackage/order/static/images/selected.png"></image>
</view>
</view>

2
src/subpackage/order/pages/spectacular_monent/detail/detail.vue

@ -15,7 +15,7 @@
</view>
<view class="smo-info smo-box">
<view class="smo-tit">高光时刻信息</view>
<a-line :value="orderInfo.name || '-'">
<a-line :value="orderInfo.price_type_text || '-'">
<block slot="name">产品名称</block>
</a-line>
<block v-if="orderInfo.order_type == 0">

2
src/utils/util.js

@ -364,7 +364,7 @@ function getFilterJson(obj){
return obj
}
function order_pay_type_txt(status){
function order_pay_type_txt(status = ''){
let _obj = {
0: '微信支付',
1: '支付宝支付',

Loading…
Cancel
Save