|
@ -1,28 +1,34 @@ |
|
|
<template> |
|
|
<template> |
|
|
<view class="bg"> |
|
|
<view class="bg"> |
|
|
|
|
|
<!-- 顶部搜索和筛选区域 --> |
|
|
<view class="top-bg"> |
|
|
<view class="top-bg"> |
|
|
|
|
|
<view class="flex-around" style="margin-bottom: 20rpx;"> |
|
|
<view class="search-box"> |
|
|
<view class="search-box"> |
|
|
<view class="left"> |
|
|
<view class="left"> |
|
|
<image src="https://static.ticket.sz-trip.com/yandu/images/eventCalendar/search.png" |
|
|
<image src="https://static.ticket.sz-trip.com/yandu/images/eventCalendar/search.png" mode="aspectFill"></image> |
|
|
mode="aspectFill"></image> |
|
|
<input v-model="keywords" type="text" placeholder="请输入关键字" @confirm="search" /> |
|
|
<input v-model="keywords" type="text" placeholder="请输入关键字" @confirm="search()" /> |
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="select-btn" @click="range = []; dateIndex = null; $refs.popup.open()"> |
|
|
|
|
|
<image src="https://static.ticket.sz-trip.com/shiweisuzhou/images/order/select.png" mode="aspectFill"></image> |
|
|
|
|
|
筛选 |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<!-- <view class="btn" @click="search()">搜索</view> --> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
<view class="common-box"> |
|
|
<view class="common-box"> |
|
|
<view class="common-types com-flex-tao"> |
|
|
<view class="common-types com-flex-tao"> |
|
|
<view @click="setType(index)" v-for="(item, index) in typeList" :key="item.id" |
|
|
<view @click="setType(index)" v-for="(item, index) in typeList" :key="item.id" |
|
|
:class="['common-type', typeIndex == index ? 'active' : '']"> |
|
|
:class="['common-type', typeIndex === index ? 'active' : '']"> |
|
|
{{ item.name }} |
|
|
{{ item.name }} |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="list-common-empty" v-if="list.length == 0"> |
|
|
<!-- 无订单提示 --> |
|
|
|
|
|
<view class="list-common-empty" v-if="list.length === 0"> |
|
|
<img src="https://static.ticket.sz-trip.com/shiweisuzhou/images/user/noTrades.png" /> |
|
|
<img src="https://static.ticket.sz-trip.com/shiweisuzhou/images/user/noTrades.png" /> |
|
|
<p class="list-common-empty-tip">还没有订单,赶快去下单吧~</p> |
|
|
<p class="list-common-empty-tip">还没有订单,赶快去下单吧~</p> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
<!-- 订单列表 --> |
|
|
<view class="trade-list" v-if="list.length > 0"> |
|
|
<view class="trade-list" v-if="list.length > 0"> |
|
|
<view v-for="(item, key) in list" :key="item.id" class="trade-items" v-if="showItem(item)" |
|
|
<view v-for="(item, key) in list" :key="item.id" class="trade-items" v-if="showItem(item)" |
|
|
@click="() => choseType(item)"> |
|
|
@click="() => choseType(item)"> |
|
@ -50,112 +56,141 @@ |
|
|
<text>{{ item.total_money / 100 }}</text> |
|
|
<text>{{ item.total_money / 100 }}</text> |
|
|
</view> |
|
|
</view> |
|
|
<view class="trade-item-btns"> |
|
|
<view class="trade-item-btns"> |
|
|
<view @click.stop="() => refund(item.order_id, key)" v-if="item.status == 'PAYMENT_SUCCESSFULLY'"> |
|
|
<view @click.stop="() => refund(item.order_id, key)" v-if="['WAIT_POST','WAIT_USE','PAID'].includes(item.state)"> |
|
|
申请退款</view> |
|
|
取消订单 |
|
|
<view @click.stop="() => closeOrder(item.order_id, item)" v-if="item.status == 'WAIT_PAYMENT'">关闭订单 |
|
|
</view> |
|
|
|
|
|
<view @click.stop="() => closeOrder(item.order_id, item)" v-if="item.state === 'UNPAID'"> |
|
|
|
|
|
关闭订单 |
|
|
|
|
|
</view> |
|
|
|
|
|
<!-- <view @click.stop="confirmpost(item.order_id, key)" v-if="item.postFlag">确认收货</view> --> |
|
|
|
|
|
<view class="pay-btn" @click.stop="setOrderId(item.order_id)" v-if="item.state === 'UNPAID'"> |
|
|
|
|
|
立即支付 |
|
|
</view> |
|
|
</view> |
|
|
<view @click.stop="confirmpost(item.order_id, key)" v-if="item.postFlag">确认收货</view> |
|
|
|
|
|
<view class="pay-btn" @click.stop="setOrderId(item.order_id)" v-if="item.status == 'WAIT_PAYMENT'"> |
|
|
|
|
|
立即支付</view> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<!-- <view v-if="list.length === 0 && finished" class="noDate"> |
|
|
|
|
|
<view>暂无订单</view> |
|
|
<!-- 筛选弹框 --> |
|
|
</view> --> |
|
|
<uni-popup ref="popup" type="bottom" :safe-area="false"> |
|
|
|
|
|
<view class="popup-box"> |
|
|
|
|
|
<view class="popup-top flex-between"> |
|
|
|
|
|
<view @click="$refs.popup.close()">取消</view> |
|
|
|
|
|
<view>订单筛选</view> |
|
|
|
|
|
<view @click="changeDate">确定</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="popup-content"> |
|
|
|
|
|
<view class="content-top">下单时间</view> |
|
|
|
|
|
<view class="content-bottom"> |
|
|
|
|
|
<view class="flex-between"> |
|
|
|
|
|
<view :class="['content-item', {'content-active': dateIndex === 0 && range.length === 0}]" |
|
|
|
|
|
@click="range = []; dateIndex = 0">近七天</view> |
|
|
|
|
|
<view :class="['content-item', {'content-active': dateIndex === 1 && range.length === 0}]" |
|
|
|
|
|
@click="range = []; dateIndex = 1">近三十天</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<uni-datetime-picker v-model="range" type="daterange" :end="new Date().Format('Y-MM-dd')" /> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</uni-popup> |
|
|
</view> |
|
|
</view> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
export default { |
|
|
export default { |
|
|
name: 'Trades', |
|
|
name: 'Trades', |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
finished: false, |
|
|
finished: false, |
|
|
list: [], |
|
|
list: [], |
|
|
typeList: [{ |
|
|
typeList: [ |
|
|
name: '全部', |
|
|
{ name: '全部', id: 'ALL' }, |
|
|
id: 'ALL' |
|
|
{ name: '待付款', id: 'WAIT_PAYMENT' }, |
|
|
}, |
|
|
{ name: '待发货', id: 'WAIT_POST' }, |
|
|
{ |
|
|
{ name: '待使用/出行', id: 'WAIT_USE' }, |
|
|
name: '待付款', |
|
|
{ name: '待收货', id: 'WAIT_DELIVERY' }, |
|
|
id: 'WAIT_PAYMENT' |
|
|
{ name: '退款/售后', id: 'NEED_REFUND' } |
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
name: '待发货', |
|
|
|
|
|
id: 'WAIT_POST' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
name: '待使用/出行', |
|
|
|
|
|
id: 'WAIT_USE' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
name: '待收货', |
|
|
|
|
|
id: 'WAIT_DELIVERY' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
name: '退款/售后', |
|
|
|
|
|
id: 'NEED_REFUND' |
|
|
|
|
|
} |
|
|
|
|
|
], |
|
|
], |
|
|
typeIndex: 0, |
|
|
typeIndex: 0, |
|
|
ajaxFlag: true, |
|
|
ajaxFlag: true, |
|
|
keywords: '', |
|
|
keywords: '', |
|
|
orderId: null, |
|
|
orderId: null, |
|
|
dateRange: [], |
|
|
dateRange: [], |
|
|
type: '' |
|
|
type: '', |
|
|
|
|
|
range: [], |
|
|
|
|
|
dateIndex: null, |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
onLoad(options) { |
|
|
onLoad(options) { |
|
|
console.log(options); |
|
|
console.log(options); |
|
|
if (options.type) this.typeIndex = this.typeList.findIndex(vm => vm.name === options.type); |
|
|
if (options.type) { |
|
|
uni.$on("updateDataByConnect", this.getDataByConnect) |
|
|
this.typeIndex = this.typeList.findIndex(vm => vm.name === options.type); |
|
|
|
|
|
} |
|
|
|
|
|
uni.$on("updateDataByConnect", this.getDataByConnect); |
|
|
}, |
|
|
}, |
|
|
onShow() { |
|
|
onShow() { |
|
|
this.getList(); |
|
|
this.getList(); |
|
|
}, |
|
|
}, |
|
|
onUnload() { |
|
|
onUnload() { |
|
|
uni.$off("updateDataByConnect", this.getDataByConnect) |
|
|
uni.$off("updateDataByConnect", this.getDataByConnect); |
|
|
}, |
|
|
}, |
|
|
onReachBottom() { |
|
|
onReachBottom() { |
|
|
if (this.finished) return false; |
|
|
if (this.finished) return false; |
|
|
this.getList(); |
|
|
this.getList(); |
|
|
}, |
|
|
}, |
|
|
|
|
|
watch: { |
|
|
|
|
|
range(newval) { |
|
|
|
|
|
console.log('范围选:', this.range); |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
// 获取近n天日期 |
|
|
|
|
|
getLastNDays(n) { |
|
|
|
|
|
const endDate = new Date(); |
|
|
|
|
|
const startDate = new Date(); |
|
|
|
|
|
startDate.setDate(endDate.getDate() - n + 1); // 计算开始日期(包含今天) |
|
|
|
|
|
|
|
|
|
|
|
// 格式化日期为 YYYY-MM-DD |
|
|
|
|
|
const formatDate = (date) => { |
|
|
|
|
|
const year = date.getFullYear(); |
|
|
|
|
|
const month = String(date.getMonth() + 1).padStart(2, '0'); |
|
|
|
|
|
const day = String(date.getDate()).padStart(2, '0'); |
|
|
|
|
|
return `${year}-${month}-${day}`; |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
return [formatDate(startDate), formatDate(endDate)]; |
|
|
|
|
|
}, |
|
|
|
|
|
// 处理数据更新事件 |
|
|
getDataByConnect(data) { |
|
|
getDataByConnect(data) { |
|
|
if (data.msgType == "updateOrderTrades") { |
|
|
if (data.msgType === "updateOrderTrades") { |
|
|
this.list = []; |
|
|
this.resetList(); |
|
|
this.finished = false; |
|
|
this.getList(); |
|
|
this.getList() |
|
|
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
emptyFunc() { |
|
|
// 显示订单项的判断逻辑 |
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
showItem(item) { |
|
|
showItem(item) { |
|
|
let flag = true; |
|
|
let flag = true; |
|
|
// if (this.typeIndex == 2 && item.order_child[0] && !item.order_child[0].consignee) flag = false |
|
|
// if (this.typeIndex === 2 && item.order_child[0] && !item.order_child[0].consignee) flag = false; |
|
|
return flag; |
|
|
return flag; |
|
|
}, |
|
|
}, |
|
|
|
|
|
// 重新加载数据 |
|
|
onReload() { |
|
|
onReload() { |
|
|
this.list = []; |
|
|
this.resetList(); |
|
|
this.finished = false; |
|
|
|
|
|
this.getList(); |
|
|
this.getList(); |
|
|
}, |
|
|
}, |
|
|
|
|
|
// 设置订单类型 |
|
|
setType(index) { |
|
|
setType(index) { |
|
|
this.typeIndex = index; |
|
|
this.typeIndex = index; |
|
|
this.onReload(); |
|
|
this.onReload(); |
|
|
}, |
|
|
}, |
|
|
|
|
|
// 设置订单ID并发起支付 |
|
|
setOrderId(id) { |
|
|
setOrderId(id) { |
|
|
let that = this; |
|
|
this.orderId = id; |
|
|
that.orderId = id; |
|
|
this.Post({ |
|
|
that.Post({ |
|
|
|
|
|
order_id: id, |
|
|
order_id: id, |
|
|
type: "miniprogram", |
|
|
type: "miniprogram", |
|
|
platform: 'miniprogram' |
|
|
platform: 'miniprogram' |
|
|
}, |
|
|
}, '/api/pay/unify') |
|
|
'/api/pay/unify' |
|
|
.then(res => { |
|
|
).then(res => { |
|
|
|
|
|
if (res.data) { |
|
|
if (res.data) { |
|
|
uni.requestPayment({ |
|
|
uni.requestPayment({ |
|
|
nonceStr: res.data.nonceStr, |
|
|
nonceStr: res.data.nonceStr, |
|
@ -169,15 +204,14 @@ |
|
|
'hRZoiEES2BWtKb6Xgsnn8khLQH9un5j_11qu0bwlhfE', |
|
|
'hRZoiEES2BWtKb6Xgsnn8khLQH9un5j_11qu0bwlhfE', |
|
|
// 出票结果通知 |
|
|
// 出票结果通知 |
|
|
'YyTCUIYBnrj9CyKks8cOjNX_Rk8a4yVdswMP-zXVbhc' |
|
|
'YyTCUIYBnrj9CyKks8cOjNX_Rk8a4yVdswMP-zXVbhc' |
|
|
] |
|
|
]; |
|
|
uni.requestSubscribeMessage({ |
|
|
uni.requestSubscribeMessage({ |
|
|
tmplIds: templateIds, |
|
|
tmplIds: templateIds, |
|
|
complete (res) { |
|
|
complete: () => { |
|
|
that.list = []; |
|
|
this.resetList(); |
|
|
that.finished = false; |
|
|
this.getList(); |
|
|
that.getList() |
|
|
|
|
|
} |
|
|
} |
|
|
}) |
|
|
}); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
@ -185,28 +219,22 @@ |
|
|
}, |
|
|
}, |
|
|
// 确认收货 |
|
|
// 确认收货 |
|
|
confirmpost(id, index) { |
|
|
confirmpost(id, index) { |
|
|
let that = this; |
|
|
|
|
|
uni.showModal({ |
|
|
uni.showModal({ |
|
|
title: '提示', |
|
|
title: '提示', |
|
|
content: '是否确认收货?', |
|
|
content: '是否确认收货?', |
|
|
success: successRes => { |
|
|
success: successRes => { |
|
|
if (successRes.confirm) { |
|
|
if (successRes.confirm) { |
|
|
that.Post({ |
|
|
this.Post({ order_id: id }, '/api/order/confirmPost') |
|
|
order_id: id |
|
|
.then(res => { |
|
|
}, |
|
|
if (res.code === 1) { |
|
|
'/api/order/confirmPost' |
|
|
this.list[index].order_child.forEach(item => { |
|
|
).then(res => { |
|
|
|
|
|
if (res.code == 1) { |
|
|
|
|
|
list[index].order_child.map(item => { |
|
|
|
|
|
item.status = 'WAIT_COMMENT'; |
|
|
item.status = 'WAIT_COMMENT'; |
|
|
}); |
|
|
}); |
|
|
list[index].status = 'WAIT_COMMENT'; |
|
|
this.list[index].status = 'WAIT_COMMENT'; |
|
|
list[index].postFlag = false; |
|
|
this.list[index].postFlag = false; |
|
|
that.list = list; |
|
|
this.list = [...this.list]; |
|
|
uni.showToast({ |
|
|
uni.showToast({ title: '操作成功' }); |
|
|
title: '操作成功' |
|
|
this.$forceUpdate(); |
|
|
}); |
|
|
|
|
|
that.$forceUpdate(); |
|
|
|
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
@ -215,54 +243,36 @@ |
|
|
}, |
|
|
}, |
|
|
// 关闭订单 |
|
|
// 关闭订单 |
|
|
closeOrder(id, index) { |
|
|
closeOrder(id, index) { |
|
|
console.log(id); |
|
|
|
|
|
console.log(index); |
|
|
|
|
|
let that = this; |
|
|
|
|
|
uni.showModal({ |
|
|
uni.showModal({ |
|
|
title: '提示', |
|
|
title: '提示', |
|
|
content: '是否关闭订单?', |
|
|
content: '是否关闭订单?', |
|
|
success: successRes => { |
|
|
success: successRes => { |
|
|
if (successRes.confirm) { |
|
|
if (successRes.confirm) { |
|
|
that.Post({ |
|
|
this.Post({ order_id: id }, '/api/order/close') |
|
|
order_id: id |
|
|
.then(res => { |
|
|
}, |
|
|
if (res.code === 1) { |
|
|
'/api/order/closeOrder' |
|
|
uni.showToast({ title: '关闭成功', icon: 'success' }); |
|
|
).then(res => { |
|
|
this.resetList(); |
|
|
if (res.code == 1) { |
|
|
this.getList(); |
|
|
uni.showToast({ |
|
|
|
|
|
title: '关闭成功', |
|
|
|
|
|
icon: 'success' |
|
|
|
|
|
}); |
|
|
|
|
|
that.list = []; |
|
|
|
|
|
that.finished = false; |
|
|
|
|
|
that.getList(); |
|
|
|
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
//删除订单 |
|
|
// 删除订单 |
|
|
deletOrder(id) { |
|
|
deletOrder(id) { |
|
|
let that = this; |
|
|
|
|
|
uni.showModal({ |
|
|
uni.showModal({ |
|
|
title: '提示', |
|
|
title: '提示', |
|
|
content: '是否删除订单?', |
|
|
content: '是否删除订单?', |
|
|
success: successRes => { |
|
|
success: successRes => { |
|
|
if (successRes.confirm) { |
|
|
if (successRes.confirm) { |
|
|
that.Post({ |
|
|
this.Post({ order_id: id }, '/api/order/delOrder') |
|
|
order_id: id |
|
|
.then(res => { |
|
|
}, |
|
|
if (res.code === 1) { |
|
|
'/api/order/delOrder' |
|
|
uni.showToast({ title: '删除成功', icon: 'success' }); |
|
|
).then(res => { |
|
|
this.resetList(); |
|
|
if (res.code == 1) { |
|
|
this.getList(); |
|
|
uni.showToast({ |
|
|
|
|
|
title: '删除成功', |
|
|
|
|
|
icon: 'success' |
|
|
|
|
|
}); |
|
|
|
|
|
that.list = []; |
|
|
|
|
|
that.finished = false; |
|
|
|
|
|
that.getList(); |
|
|
|
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
@ -271,91 +281,95 @@ |
|
|
}, |
|
|
}, |
|
|
// 申请退款 |
|
|
// 申请退款 |
|
|
refund(id, index) { |
|
|
refund(id, index) { |
|
|
console.log(id); |
|
|
|
|
|
let that = this; |
|
|
|
|
|
uni.showModal({ |
|
|
uni.showModal({ |
|
|
title: '提示', |
|
|
title: '提示', |
|
|
content: '是否申请退款?', |
|
|
content: '是否申请退款?', |
|
|
success: successRes => { |
|
|
success: successRes => { |
|
|
if (successRes.confirm) { |
|
|
if (successRes.confirm) { |
|
|
that.Post({ |
|
|
this.Post({ order_id: id }, '/api/order/refund') |
|
|
order_id: id |
|
|
.then(res => { |
|
|
}, |
|
|
if (res.code === 1) { |
|
|
'/api/order/applyRefund' |
|
|
uni.showToast({ title: '申请成功', icon: 'success' }); |
|
|
).then(res => { |
|
|
this.onReload(); |
|
|
if (res.code == 1) { |
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
title: '申请成功', |
|
|
|
|
|
icon: 'success' |
|
|
|
|
|
}); |
|
|
|
|
|
that.onReload(); |
|
|
|
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
search(e) { |
|
|
// 搜索订单 |
|
|
this.list = []; |
|
|
search() { |
|
|
|
|
|
this.resetList(); |
|
|
|
|
|
this.getList(); |
|
|
|
|
|
}, |
|
|
|
|
|
// 确定日期筛选 |
|
|
|
|
|
changeDate() { |
|
|
|
|
|
if (this.dateIndex === 0) { |
|
|
|
|
|
this.range = this.getLastNDays(7); |
|
|
|
|
|
} else if (this.dateIndex === 1) { |
|
|
|
|
|
this.range = this.getLastNDays(30); |
|
|
|
|
|
} |
|
|
|
|
|
this.$refs.popup.close(); |
|
|
|
|
|
this.resetList(); |
|
|
this.getList(); |
|
|
this.getList(); |
|
|
// if (e.keyCode == 13) { |
|
|
|
|
|
// // 提交 |
|
|
|
|
|
// this.keywords = e.target.value; |
|
|
|
|
|
// } |
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
// 获取订单列表 |
|
|
getList() { |
|
|
getList() { |
|
|
let data = { |
|
|
const data = { |
|
|
state: this.typeList[this.typeIndex].id == 'ALL' ? '' : this.typeList[this.typeIndex].true_id || |
|
|
state: this.typeList[this.typeIndex].id === 'ALL' ? '' : this.typeList[this.typeIndex].id, |
|
|
this.typeList[this.typeIndex].id, |
|
|
|
|
|
offset: this.list.length, |
|
|
offset: this.list.length, |
|
|
limit: 5, |
|
|
limit: 5, |
|
|
keywords: this.keywords, |
|
|
keywords: this.keywords, |
|
|
type: this.typeList[this.typeIndex].name == '待使用' ? 1 : (this.typeList[this.typeIndex].name == |
|
|
start_date: this.range[0] || '', |
|
|
'待发货' ? 2 : '') |
|
|
end_date: this.range[1] || '' |
|
|
}; |
|
|
}; |
|
|
this.Post(data, '/api/order/list').then(res => { |
|
|
this.Post(data, '/api/order/list') |
|
|
this.list = [...this.list, ...res.data.list] |
|
|
.then(res => { |
|
|
|
|
|
this.list = [...this.list, ...res.data.list]; |
|
|
if (res.data.length < 5) { |
|
|
if (res.data.length < 5) { |
|
|
this.finished = true; |
|
|
this.finished = true; |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
// 更新订单信息 |
|
|
UpdateOrder(id) { |
|
|
UpdateOrder(id) { |
|
|
this.ajaxFlag = false; |
|
|
this.ajaxFlag = false; |
|
|
let list = this.list; |
|
|
this.Post({ order_id: id }, '/api/order/orderDetail') |
|
|
this.Post({ |
|
|
.then(res => { |
|
|
order_id: id |
|
|
|
|
|
}, |
|
|
|
|
|
'/api/order/orderDetail' |
|
|
|
|
|
).then(res => { |
|
|
|
|
|
this.ajaxFlag = true; |
|
|
this.ajaxFlag = true; |
|
|
list.map(item => { |
|
|
const newList = this.list.map(item => { |
|
|
if (item.order_id == id) { |
|
|
if (item.order_id === id) { |
|
|
item = res.data; |
|
|
return res.data; |
|
|
} |
|
|
} |
|
|
|
|
|
return item; |
|
|
}); |
|
|
}); |
|
|
this.list = list; |
|
|
this.list = newList; |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
// 选择订单进入详情页 |
|
|
choseType(item) { |
|
|
choseType(item) { |
|
|
uni.navigateTo({ |
|
|
uni.navigateTo({ url: `/subPackages/order/orderDetail?id=${item.order_id}` }); |
|
|
url: '/subPackages/order/detail?id=' + item.order_id |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
// 重置订单列表 |
|
|
|
|
|
resetList() { |
|
|
|
|
|
this.list = []; |
|
|
|
|
|
this.finished = false; |
|
|
} |
|
|
} |
|
|
}; |
|
|
} |
|
|
|
|
|
}; |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style scoped lang="scss"> |
|
|
<style scoped lang="scss"> |
|
|
view { |
|
|
// 样式部分保持不变 |
|
|
|
|
|
view { |
|
|
box-sizing: border-box; |
|
|
box-sizing: border-box; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.common-box { |
|
|
.common-box { |
|
|
height: 90rpx; |
|
|
height: 90rpx; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.common-types { |
|
|
.common-types { |
|
|
background: white; |
|
|
background: white; |
|
|
height: 90rpx; |
|
|
height: 90rpx; |
|
|
font-size: 31rpx; |
|
|
font-size: 31rpx; |
|
@ -365,29 +379,29 @@ |
|
|
overflow-x: scroll; |
|
|
overflow-x: scroll; |
|
|
overflow-y: hidden; |
|
|
overflow-y: hidden; |
|
|
padding: 0 27rpx; |
|
|
padding: 0 27rpx; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.common-types::-webkit-scrollbar { |
|
|
.common-types::-webkit-scrollbar { |
|
|
width: 0rpx; |
|
|
width: 0rpx; |
|
|
height: 0; |
|
|
height: 0; |
|
|
display: none; |
|
|
display: none; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.common-type { |
|
|
.common-type { |
|
|
flex-shrink: 0; |
|
|
flex-shrink: 0; |
|
|
margin: 0 26rpx; |
|
|
margin: 0 26rpx; |
|
|
line-height: 90rpx; |
|
|
line-height: 90rpx; |
|
|
height: 90rpx; |
|
|
height: 90rpx; |
|
|
position: relative; |
|
|
position: relative; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.common-type.active { |
|
|
.common-type.active { |
|
|
font-size: 31rpx; |
|
|
font-size: 31rpx; |
|
|
font-weight: bold; |
|
|
font-weight: bold; |
|
|
color: #000; |
|
|
color: #000; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.common-type.active:after { |
|
|
.common-type.active:after { |
|
|
display: block; |
|
|
display: block; |
|
|
width: 60%; |
|
|
width: 60%; |
|
|
font-size: 0; |
|
|
font-size: 0; |
|
@ -400,63 +414,63 @@ |
|
|
height: 4rpx; |
|
|
height: 4rpx; |
|
|
background: #6A8A27; |
|
|
background: #6A8A27; |
|
|
border-radius: 2rpx; |
|
|
border-radius: 2rpx; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.bg { |
|
|
.bg { |
|
|
min-height: 100vh; |
|
|
min-height: 100vh; |
|
|
background-color: #f7f7f7; |
|
|
background-color: #f7f7f7; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.noDate { |
|
|
.noDate { |
|
|
display: flex; |
|
|
display: flex; |
|
|
flex-direction: column; |
|
|
flex-direction: column; |
|
|
justify-content: center; |
|
|
justify-content: center; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
margin-top: 200rpx; |
|
|
margin-top: 200rpx; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.noDate img { |
|
|
.noDate img { |
|
|
width: 514rpx; |
|
|
width: 514rpx; |
|
|
height: auto; |
|
|
height: auto; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.noDate view { |
|
|
.noDate view { |
|
|
font-size: 24rpx; |
|
|
font-size: 24rpx; |
|
|
color: #777777; |
|
|
color: #777777; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.trade-list { |
|
|
.trade-list { |
|
|
padding: 28rpx 26rpx; |
|
|
padding: 28rpx 26rpx; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.trade-items { |
|
|
.trade-items { |
|
|
background-color: white; |
|
|
background-color: white; |
|
|
margin-bottom: 28rpx; |
|
|
margin-bottom: 28rpx; |
|
|
border-radius: 20rpx; |
|
|
border-radius: 20rpx; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.trade-item-head { |
|
|
.trade-item-head { |
|
|
display: flex; |
|
|
display: flex; |
|
|
justify-content: space-between; |
|
|
justify-content: space-between; |
|
|
padding: 28rpx 20rpx; |
|
|
padding: 28rpx 20rpx; |
|
|
border-bottom: 1rpx solid #d8d8d8; |
|
|
border-bottom: 1rpx solid #d8d8d8; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.trade-item-head-tid { |
|
|
.trade-item-head-tid { |
|
|
font-size: 24rpx; |
|
|
font-size: 24rpx; |
|
|
display: flex; |
|
|
display: flex; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
color: #666666; |
|
|
color: #666666; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.trade-item-head-state { |
|
|
.trade-item-head-state { |
|
|
font-size: 27rpx; |
|
|
font-size: 27rpx; |
|
|
font-family: PingFang SC; |
|
|
font-family: PingFang SC; |
|
|
font-weight: bold; |
|
|
font-weight: bold; |
|
|
color: #6A8A27; |
|
|
color: #6A8A27; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.trade-item-head-name { |
|
|
.trade-item-head-name { |
|
|
display: flex; |
|
|
display: flex; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
|
|
|
|
|
@ -473,45 +487,45 @@ |
|
|
view { |
|
|
view { |
|
|
margin-left: 13rpx; |
|
|
margin-left: 13rpx; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.trade-item-pros { |
|
|
.trade-item-pros { |
|
|
display: flex; |
|
|
display: flex; |
|
|
/* background-color: #F2F2F2; */ |
|
|
/* background-color: #F2F2F2; */ |
|
|
flex-direction: column; |
|
|
flex-direction: column; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.trade-item-pro { |
|
|
.trade-item-pro { |
|
|
display: flex; |
|
|
display: flex; |
|
|
padding: 20rpx; |
|
|
padding: 20rpx; |
|
|
justify-content: space-between; |
|
|
justify-content: space-between; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.trade-item-pro-img { |
|
|
.trade-item-pro-img { |
|
|
display: flex; |
|
|
display: flex; |
|
|
justify-content: center; |
|
|
justify-content: center; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.trade-item-pro-img image { |
|
|
.trade-item-pro-img image { |
|
|
width: 180rpx; |
|
|
width: 180rpx; |
|
|
height: 180rpx; |
|
|
height: 180rpx; |
|
|
border-radius: 10rpx; |
|
|
border-radius: 10rpx; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.trade-item-pro-price { |
|
|
.trade-item-pro-price { |
|
|
display: flex; |
|
|
display: flex; |
|
|
flex-direction: column; |
|
|
flex-direction: column; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.trade-item-pro-title { |
|
|
.trade-item-pro-title { |
|
|
text-align: left; |
|
|
text-align: left; |
|
|
flex: 1; |
|
|
flex: 1; |
|
|
padding: 0 20rpx; |
|
|
padding: 0 20rpx; |
|
|
font-size: 28rpx; |
|
|
font-size: 28rpx; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.trade-item-pro-subtitle { |
|
|
.trade-item-pro-subtitle { |
|
|
text-align: left; |
|
|
text-align: left; |
|
|
flex: 1; |
|
|
flex: 1; |
|
|
padding: 0 20rpx; |
|
|
padding: 0 20rpx; |
|
@ -519,30 +533,30 @@ |
|
|
font-size: 24rpx; |
|
|
font-size: 24rpx; |
|
|
color: #6A8A27; |
|
|
color: #6A8A27; |
|
|
margin-top: 20rpx; |
|
|
margin-top: 20rpx; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.trade-item-pro-price view { |
|
|
.trade-item-pro-price view { |
|
|
display: flex; |
|
|
display: flex; |
|
|
flex-wrap: nowrap; |
|
|
flex-wrap: nowrap; |
|
|
text-wrap: none; |
|
|
text-wrap: none; |
|
|
white-space: nowrap; |
|
|
white-space: nowrap; |
|
|
justify-content: flex-end; |
|
|
justify-content: flex-end; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.trade-item-pro-price-pri { |
|
|
.trade-item-pro-price-pri { |
|
|
font-size: 27rpx; |
|
|
font-size: 27rpx; |
|
|
color: #6A8A27; |
|
|
color: #6A8A27; |
|
|
font-weight: 500; |
|
|
font-weight: 500; |
|
|
color: #333333; |
|
|
color: #333333; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.trade-item-pro-num { |
|
|
.trade-item-pro-num { |
|
|
font-size: 24rpx; |
|
|
font-size: 24rpx; |
|
|
color: #666666; |
|
|
color: #666666; |
|
|
margin-top: 24rpx; |
|
|
margin-top: 24rpx; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.trade-item-info { |
|
|
.trade-item-info { |
|
|
font-size: 28rpx; |
|
|
font-size: 28rpx; |
|
|
display: flex; |
|
|
display: flex; |
|
|
justify-content: flex-end; |
|
|
justify-content: flex-end; |
|
@ -551,27 +565,28 @@ |
|
|
padding: 0rpx 20rpx; |
|
|
padding: 0rpx 20rpx; |
|
|
margin-top: -6rpx; |
|
|
margin-top: -6rpx; |
|
|
/* border-bottom: 1px solid #B6B6B6; */ |
|
|
/* border-bottom: 1px solid #B6B6B6; */ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.trade-item-info text { |
|
|
.trade-item-info text { |
|
|
font-size: 36rpx; |
|
|
font-size: 36rpx; |
|
|
font-weight: bold; |
|
|
font-weight: bold; |
|
|
color: rgba(195, 40, 46, 1); |
|
|
color: rgba(195, 40, 46, 1); |
|
|
} |
|
|
} |
|
|
.trade-item-info text::before { |
|
|
|
|
|
|
|
|
.trade-item-info text::before { |
|
|
font-size: 26rpx; |
|
|
font-size: 26rpx; |
|
|
content: '¥'; |
|
|
content: '¥'; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.trade-item-btns { |
|
|
.trade-item-btns { |
|
|
display: flex; |
|
|
display: flex; |
|
|
flex-direction: row; |
|
|
flex-direction: row; |
|
|
justify-content: flex-end; |
|
|
justify-content: flex-end; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
padding: 20rpx; |
|
|
padding: 20rpx; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.trade-item-btns view { |
|
|
.trade-item-btns view { |
|
|
margin-left: 20rpx; |
|
|
margin-left: 20rpx; |
|
|
background: rgba(237, 237, 237, 0); |
|
|
background: rgba(237, 237, 237, 0); |
|
|
border: 1rpx solid #999999; |
|
|
border: 1rpx solid #999999; |
|
@ -581,16 +596,16 @@ |
|
|
font-family: PingFang SC; |
|
|
font-family: PingFang SC; |
|
|
font-weight: 500; |
|
|
font-weight: 500; |
|
|
color: #333333; |
|
|
color: #333333; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.trade-item-btns .pay-btn { |
|
|
.trade-item-btns .pay-btn { |
|
|
color: #FFFFFF; |
|
|
color: #FFFFFF; |
|
|
background: #6A8A27; |
|
|
background: #6A8A27; |
|
|
border: none; |
|
|
border: none; |
|
|
padding: 10rpx 16rpx; |
|
|
padding: 10rpx 16rpx; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.comment-btn { |
|
|
.comment-btn { |
|
|
width: 100rpx; |
|
|
width: 100rpx; |
|
|
text-align: center; |
|
|
text-align: center; |
|
|
line-height: 40rpx; |
|
|
line-height: 40rpx; |
|
@ -600,36 +615,36 @@ |
|
|
justify-content: center !important; |
|
|
justify-content: center !important; |
|
|
font-size: 24rpx; |
|
|
font-size: 24rpx; |
|
|
margin-top: 16rpx; |
|
|
margin-top: 16rpx; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.list-common-empty { |
|
|
.list-common-empty { |
|
|
display: flex; |
|
|
display: flex; |
|
|
flex-direction: column; |
|
|
flex-direction: column; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
justify-content: center; |
|
|
justify-content: center; |
|
|
min-height: 50vh; |
|
|
min-height: 50vh; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.list-common-empty img { |
|
|
.list-common-empty img { |
|
|
width: 317.33rpx; |
|
|
width: 317.33rpx; |
|
|
height: 282rpx; |
|
|
height: 282rpx; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.list-common-empty-tip { |
|
|
.list-common-empty-tip { |
|
|
margin-top: 36rpx; |
|
|
margin-top: 36rpx; |
|
|
font-weight: 500; |
|
|
font-weight: 500; |
|
|
font-size: 32rpx; |
|
|
font-size: 32rpx; |
|
|
color: #000000; |
|
|
color: #000000; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.com-flex-tao { |
|
|
.com-flex-tao { |
|
|
display: flex; |
|
|
display: flex; |
|
|
justify-content: space-between; |
|
|
justify-content: space-between; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.search-box { |
|
|
.search-box { |
|
|
width: 697rpx; |
|
|
width: 600rpx; |
|
|
height: 67rpx; |
|
|
height: 67rpx; |
|
|
background: #f2f2f2; |
|
|
background: #f2f2f2; |
|
|
border-radius: 33rpx; |
|
|
border-radius: 33rpx; |
|
@ -637,8 +652,6 @@ |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
justify-content: space-between; |
|
|
justify-content: space-between; |
|
|
padding: 0 8rpx 0 28rpx; |
|
|
padding: 0 8rpx 0 28rpx; |
|
|
margin: 0 auto; |
|
|
|
|
|
margin-bottom: 20rpx; |
|
|
|
|
|
|
|
|
|
|
|
.left { |
|
|
.left { |
|
|
display: flex; |
|
|
display: flex; |
|
@ -669,10 +682,87 @@ |
|
|
line-height: 53rpx; |
|
|
line-height: 53rpx; |
|
|
text-align: center; |
|
|
text-align: center; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.top-bg { |
|
|
.top-bg { |
|
|
background: #fff; |
|
|
background: #fff; |
|
|
padding-top: 20rpx; |
|
|
padding-top: 20rpx; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.select-btn { |
|
|
|
|
|
font-weight: bold; |
|
|
|
|
|
font-size: 20rpx; |
|
|
|
|
|
color: #6A8A27; |
|
|
|
|
|
|
|
|
|
|
|
image { |
|
|
|
|
|
width: 33.33rpx; |
|
|
|
|
|
height: 33.33rpx; |
|
|
|
|
|
display: block; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.popup-box { |
|
|
|
|
|
height: 70vh; |
|
|
|
|
|
border-radius: 10rpx 10rpx 0 0; |
|
|
|
|
|
background: #F7F7F7; |
|
|
|
|
|
padding: 0 25rpx; |
|
|
|
|
|
|
|
|
|
|
|
.popup-top { |
|
|
|
|
|
height: 110rpx; |
|
|
|
|
|
font-weight: 400; |
|
|
|
|
|
font-size: 31rpx; |
|
|
|
|
|
color: #000000; |
|
|
|
|
|
|
|
|
|
|
|
&>view:nth-child(2) { |
|
|
|
|
|
font-weight: bold; |
|
|
|
|
|
font-size: 35rpx; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
&>view:last-child { |
|
|
|
|
|
color: #6A8A2D; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.popup-content { |
|
|
|
|
|
height: calc(70vh - 110rpx); |
|
|
|
|
|
padding: 0 28rpx; |
|
|
|
|
|
background-color: #fff; |
|
|
|
|
|
|
|
|
|
|
|
.content-top { |
|
|
|
|
|
height: 94rpx; |
|
|
|
|
|
border-bottom: 1px solid #CCCCCC; |
|
|
|
|
|
font-weight: bold; |
|
|
|
|
|
font-size: 32rpx; |
|
|
|
|
|
color: #000000; |
|
|
|
|
|
display: flex; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.content-bottom { |
|
|
|
|
|
padding-top: 40rpx; |
|
|
|
|
|
|
|
|
|
|
|
.content-item { |
|
|
|
|
|
margin-bottom: 27rpx; |
|
|
|
|
|
width: 307rpx; |
|
|
|
|
|
line-height: 67rpx; |
|
|
|
|
|
text-align: center; |
|
|
|
|
|
background: #FFFFFF; |
|
|
|
|
|
border-radius: 7rpx; |
|
|
|
|
|
border: 1px solid #CCCCCC; |
|
|
|
|
|
font-weight: 500; |
|
|
|
|
|
font-size: 31rpx; |
|
|
|
|
|
color: #000000; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.content-active { |
|
|
|
|
|
border: 1px solid #6A8A27; |
|
|
|
|
|
color: #6A8A27; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
::v-deep .uni-date { |
|
|
|
|
|
border: 1px solid #CCCCCC; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |