This commit is contained in:
weipengfei 2023-12-13 16:13:45 +08:00
parent 55433c05ab
commit 4a3f59d2a8
4 changed files with 72 additions and 35 deletions

View File

@ -84,7 +84,7 @@
</view> </view>
<view class='iconfont' <view class='iconfont'
:class='(orderInfo.status == 3 ? "icon-webicon318":"icon-yuandianxiao") + " " +(orderInfo.status > 3 && orderInfo.status != 9 ? "t-color":"")' :class='(orderInfo.status == 1 ? "icon-webicon318":"icon-yuandianxiao") + " " +(orderInfo.status > 1 && orderInfo.status != 9 ? "t-color":"")'
v-if="orderInfo.order_type == 0"></view> v-if="orderInfo.order_type == 0"></view>

View File

@ -58,7 +58,17 @@
<view><span class="iconfont">&#xe6bd;</span></view> <view><span class="iconfont">&#xe6bd;</span></view>
</view> </view>
</view> </view>
<view class="popup_group_item" @click="selectStoreClass">
<view class="popup_group_item_label">店铺分类</view>
<view class="popup_group_item_value">
<view class="popup_group_item_message">
<span v-if="setFormData.mer_cate_name"
class="popup_group_item_message_value">{{ setFormData.mer_cate_name }}</span>
<span v-else>请选择店铺分类</span>
</view>
<view><span class="iconfont">&#xe6bd;</span></view>
</view>
</view>
<view class="popup_group_item"> <view class="popup_group_item">
<view class="popup_group_item_label">商品单位</view> <view class="popup_group_item_label">商品单位</view>
<view class="popup_group_item_value"><input v-model="setFormData.unit_name" type="text" <view class="popup_group_item_value"><input v-model="setFormData.unit_name" type="text"
@ -73,6 +83,11 @@
<platfrom @close="closePlatfrom" :classifiedData="platformClassificationData" @getPlatData="getPlatData"> <platfrom @close="closePlatfrom" :classifiedData="platformClassificationData" @getPlatData="getPlatData">
</platfrom> </platfrom>
</uni-popup> </uni-popup>
<!-- 选择店铺分类弹框 -->
<uni-popup ref="select_store" type="bottom">
<store-classification :classifiedData="merchantClassification" :mer_id="merId"
@handleGetSelectArea="handleGetSelectStore" @close="merchantClose"></store-classification>
</uni-popup>
@ -190,6 +205,7 @@
} from "@/libs/uniApi.js"; } from "@/libs/uniApi.js";
import avatar from "@/components/yq-avatar/yq-avatar.vue"; import avatar from "@/components/yq-avatar/yq-avatar.vue";
import platfrom from "./components/platform.vue"; import platfrom from "./components/platform.vue";
import storeClassification from '../components/store_classification.vue';
import commodityComponent from "./components/commodity.vue"; import commodityComponent from "./components/commodity.vue";
import priceComponent from "./components/price.vue"; import priceComponent from "./components/price.vue";
export default { export default {
@ -197,7 +213,8 @@
avatar, avatar,
platfrom, platfrom,
commodityComponent, commodityComponent,
priceComponent priceComponent,
storeClassification
}, },
data() { data() {
return { return {
@ -431,6 +448,7 @@
}).catch(e=>{ }).catch(e=>{
console.log(e); console.log(e);
}) })
}, },
// //
updateCode(e) { updateCode(e) {
@ -520,6 +538,7 @@
// //
handleGetSelectStore(item) { handleGetSelectStore(item) {
console.log(item);
this.setFormData.mer_cate_id = item.map(val => val.store_category_id); this.setFormData.mer_cate_id = item.map(val => val.store_category_id);
this.setFormData.mer_cate_name = item.map(val => val.cate_name).join(','); this.setFormData.mer_cate_name = item.map(val => val.cate_name).join(',');
this.$refs.select_store.close(); this.$refs.select_store.close();

View File

@ -67,7 +67,7 @@
<view v-if="orderList.length > 0"> <view v-if="orderList.length > 0">
<block v-if="orderStatus == 0"> <block v-if="orderStatus == 0">
<view class='item' v-for="(item,index) in orderList" :key="index"> <view class='item' v-for="(item,index) in orderList" :key="index">
<view @click='goOrderDetails(item.group_order_id)'> <view @click='goOrderDetails(item.group_order_id, item)'>
<view class='title acea-row row-between-wrapper'> <view class='title acea-row row-between-wrapper'>
<view class="acea-row row-middle left-wrapper"> <view class="acea-row row-middle left-wrapper">
{{item.group_order_sn}} {{item.group_order_sn}}
@ -155,7 +155,7 @@
<!-- 待发货 待收货 待评价 已完成 --> <!-- 待发货 待收货 待评价 已完成 -->
<block v-else> <block v-else>
<view class='item' v-for="(item,index) in orderList" :key="index"> <view class='item' v-for="(item,index) in orderList" :key="index">
<view @click='goOrderDetails(item.order_id)'> <view @click='goOrderDetails(item.order_id, item)'>
<view class='title acea-row row-between-wrapper'> <view class='title acea-row row-between-wrapper'>
<view class="acea-row row-middle left-wrapper" @click.stop="goMall(item)"> <view class="acea-row row-middle left-wrapper" @click.stop="goMall(item)">
<text class="iconfont icon-shangjiadingdan"></text> <text class="iconfont icon-shangjiadingdan"></text>
@ -263,7 +263,7 @@
<!-- <view v-if="!item.receipt && item.status != -1" class='bnt cancelBnt' <!-- <view v-if="!item.receipt && item.status != -1" class='bnt cancelBnt'
@click.stop='applyInvoice(item.order_id)'>申请开票</view> --> @click.stop='applyInvoice(item.order_id)'>申请开票</view> -->
<block v-if="item.status == 0 || item.status == 9 || item.status == -1"> <block v-if="item.status == 0 || item.status == 9 || item.status == -1">
<view class='bnt b-color' @click='goOrderDetails(item.order_id)'>查看详情</view> <view class='bnt b-color' @click='goOrderDetails(item.order_id, item)'>查看详情</view>
</block> </block>
<block v-if="item.status == 1"> <block v-if="item.status == 1">
<view class='bnt cancelBnt' <view class='bnt cancelBnt'
@ -461,7 +461,8 @@
invoice: false, invoice: false,
add: false, add: false,
}, },
len: 0 len: 0,
product_type: 98
}; };
}, },
computed: { computed: {
@ -490,6 +491,9 @@
this.isShowAuth = true this.isShowAuth = true
} }
}, },
onLoad(options) {
if(options.product_type)this.product_type = options.product_type
},
onReady() {}, onReady() {},
mounted: function() { mounted: function() {
this.arrlist() this.arrlist()
@ -498,7 +502,7 @@
arrlist() { arrlist() {
refundList({ refundList({
product_type: 98, product_type: this.product_type,
type: 0, type: 0,
page: 1, page: 1,
limit: 1500 limit: 1500
@ -582,7 +586,7 @@
getOrderData: function() { getOrderData: function() {
let that = this; let that = this;
orderData({ orderData({
product_type: 98 product_type: this.product_type
}).then(res => { }).then(res => {
// console.log(res.data) // console.log(res.data)
that.$set(that, 'orderData', res.data); that.$set(that, 'orderData', res.data);
@ -648,7 +652,7 @@
/** /**
* 去订单详情 * 去订单详情
*/ */
goOrderDetails: function(order_id) { goOrderDetails: function(order_id, item) {
let self = this let self = this
@ -662,13 +666,13 @@
console.log(self.orderStatus) console.log(self.orderStatus)
openOrderSubscribe().then(() => { openOrderSubscribe().then(() => {
uni.hideLoading(); uni.hideLoading();
if (self.orderStatus == 0) { if (self.orderStatus == 0||(item&&item.order_status==1)) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/order_details/stay?order_id=' + order_id url: `/pages/order_details/stay?order_id=${item.group_order_id}&product_type=${this.product_type}`
}) })
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: '/pages/order_details/index?order_id=' + order_id url: `/pages/order_details/index?order_id=${order_id}`
}) })
} }
}).catch(() => { }).catch(() => {
@ -676,13 +680,13 @@
}) })
// #endif // #endif
// #ifndef MP // #ifndef MP
if (self.orderStatus == 0) { if (self.orderStatus == 0||(item&&item.order_status==1)) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/order_details/stay?order_id=' + order_id url: `/pages/order_details/stay?order_id=${item.group_order_id}&product_type=${this.product_type}`
}) })
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: '/pages/order_details/index?order_id=' + order_id url: `/pages/order_details/index?order_id=${order_id}`
}) })
} }
// #endif // #endif
@ -743,7 +747,7 @@
if (status == 5) { if (status == 5) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/users/refund/list?type=98' url: '/pages/users/refund/list?type='+this.product_type
}) })
} else { } else {
if (status == this.orderStatus) return; if (status == this.orderStatus) return;
@ -770,7 +774,7 @@
groupOrderList({ groupOrderList({
page: that.page, page: that.page,
limit: that.limit, limit: that.limit,
product_type: 98 product_type: this.product_type
}).then(res => { }).then(res => {
that.isReady = true; that.isReady = true;
let list = res.data.list || []; let list = res.data.list || [];
@ -797,7 +801,7 @@
status: arr, status: arr,
page: that.page, page: that.page,
limit: that.limit, limit: that.limit,
product_type: 98 product_type: this.product_type
}).then(res => { }).then(res => {
let list = res.data.list || []; let list = res.data.list || [];
let loadend = list.length < that.limit; let loadend = list.length < that.limit;

View File

@ -89,6 +89,7 @@
import { import {
postsettle, postsettle,
} from '@/api/admin.js' } from '@/api/admin.js'
import { Toast } from '../../../libs/uniApi';
export default { export default {
data() { data() {
return { return {
@ -172,12 +173,19 @@
}, },
getOrderInfo() { getOrderInfo() {
groupOrderDetail(this.order_id, this.product_type).then(res => { groupOrderDetail(this.order_id, this.product_type).then(res => {
this.couponData = res.data this.couponData = res.data;
this.$nextTick(() => { this.$nextTick(() => {
if (this.couponData.interest !== null) { if (this.couponData.interest !== null) {
this.moerTime(this.couponData.interest.start_time) this.moerTime(this.couponData.interest.start_time)
} }
}) })
}).catch(e=>{
Toast(e);
setTimeout(() => {
uni.navigateBack({
delta: 1
})
}, 1000)
}) })
}, },
SubOrder() { SubOrder() {
@ -197,8 +205,8 @@
title: '付款成功' title: '付款成功'
}) })
setTimeout(() => { setTimeout(() => {
uni.navigateBack({ uni.navigateTo({
delta: 1 url:`/pages/order_pay_status/index?order_id=${this.order_id}&product_type=${this.product_type}`
}) })
}, 1000) }, 1000)
}else { }else {
@ -231,14 +239,15 @@
provider: 'wxpay', provider: 'wxpay',
orderInfo: jsConfig, orderInfo: jsConfig,
success: (e) => { success: (e) => {
uni.navigateBack({ setTimeout(() => {
delta: 1 uni.navigateTo({
url:`/pages/order_pay_status/index?order_id=${this.order_id}&msg=${res.message}&product_type=${this.product_type}`
}) })
}, 1000)
}, },
fail: (e) => { fail: (e) => {
// //
let url = '/pages/order_pay_status/index?order_id=' + orderId + let url = '/pages/order_pay_status/index?order_id=' + this.order_id +
'&msg=取消支付' + '&product_type=' + that.product_type; '&msg=取消支付' + '&product_type=' + that.product_type;
return that.$util.Tips({ return that.$util.Tips({
title: '取消支付', title: '取消支付',
@ -249,7 +258,7 @@
}, },
complete: () => { complete: () => {
// //
let url = '/pages/order_pay_status/index?order_id=' + orderId + let url = '/pages/order_pay_status/index?order_id=' + this.order_id +
'&msg=取消支付' + '&product_type=' + that.product_type; '&msg=取消支付' + '&product_type=' + that.product_type;
return that.$util.Tips({ return that.$util.Tips({
title: '取消支付', title: '取消支付',
@ -262,14 +271,19 @@
// #endif // #endif
} }
// setTimeout(() => { else {
// uni.navigateBack({ setTimeout(() => {
// delta: 1 uni.navigateTo({
// }) url:`/pages/order_pay_status/index?order_id=${this.order_id}&product_type=${this.product_type}`
// }, 1000) })
}, 1000)
}
uni.showToast({ uni.showToast({
title: res.message title: res.message
}) })
}).catch(e=>{
console.log(e);
Toast(e)
}) })
} }