forked from angelo/web-retail-h5
feat(order): 订单状态字段调整,移除待付款
This commit is contained in:
parent
4ebe2f2b2c
commit
5ab945a902
|
@ -5,9 +5,6 @@ export const payConfig = params => http.get('/pay/config', { params })
|
|||
//查询订单明细
|
||||
export const orderInfo = params =>
|
||||
http.post('/sale/api/retail-order/query-order', params)
|
||||
//订单状态
|
||||
export const orderStatus = params =>
|
||||
http.get('/system/pub/enums/order-status-api', { params })
|
||||
|
||||
//计算邮费
|
||||
export const pickPostAge = params =>
|
||||
|
|
|
@ -178,6 +178,11 @@ export default {
|
|||
...mapGetters(['priceSymbol', 'priceSymbolVisible', 'isZeroLevel']),
|
||||
},
|
||||
onLoad() {
|
||||
// this.getLanguage();
|
||||
// this.getService()
|
||||
},
|
||||
onShow() {
|
||||
this.$store.dispatch('getCarLength')
|
||||
if (
|
||||
uni.getStorageSync('showInfo') == undefined ||
|
||||
uni.getStorageSync('showInfo') == 0
|
||||
|
@ -188,11 +193,6 @@ export default {
|
|||
? REPURCHASE_AREA.id
|
||||
: REGIEST_AREA.id
|
||||
)
|
||||
// this.getLanguage();
|
||||
// this.getService()
|
||||
},
|
||||
onShow() {
|
||||
this.$store.dispatch('getCarLength')
|
||||
},
|
||||
// onPullDownRefresh() {
|
||||
// let that = this
|
||||
|
|
|
@ -55,19 +55,6 @@
|
|||
</view>
|
||||
|
||||
<view class="ju_grade" v-if="!ifSpecial">
|
||||
<!-- <view v-if="awards.tarAwardsName" class="awards-progress-summary" style="text-align: center;">
|
||||
<span class="descriptive-text">当前距离</span>
|
||||
<span class="highlight-name">
|
||||
{{ awards.tarAwardsName }}
|
||||
</span>
|
||||
<span class="descriptive-text">奖衔,小区仅需</span>
|
||||
<span class="highlight-pv">
|
||||
{{
|
||||
|
||||
sprintProgress.achieved
|
||||
}}</span>
|
||||
</view> -->
|
||||
|
||||
<view class="jugrade_flex">
|
||||
<view class="ju_left">
|
||||
<view v-if="awards.tarAwardsName" class="yestDay">
|
||||
|
@ -160,22 +147,29 @@
|
|||
<u-icon name="arrow-right" color="#999999" size="16rpx"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order_flex thepadding">
|
||||
<view class="theorderflex1" @click="goOrder(0)">
|
||||
<image class="order_img2" src="../../static/images/myorder_1.png" />
|
||||
<view class="order_text">{{ '待付款' }}</view>
|
||||
<view v-if="waitPayNum" class="qiu">{{ waitPayNum }}</view>
|
||||
</view>
|
||||
<view class="theorderflex1" @click="goOrder(1)">
|
||||
<view class="order_flex thepadding" style="justify-content: center">
|
||||
<view
|
||||
class="theorderflex1"
|
||||
style="margin-bottom: 0"
|
||||
@click="goOrder(1)"
|
||||
>
|
||||
<image class="order_img2" src="../../static/images/myorder_2.png" />
|
||||
<view class="order_text">{{ '待发货' }}</view>
|
||||
<view v-if="payNum" class="qiu">{{ payNum }}</view>
|
||||
</view>
|
||||
<view class="theorderflex1" @click="goOrder(3)">
|
||||
<view
|
||||
class="theorderflex1"
|
||||
style="margin-bottom: 0"
|
||||
@click="goOrder(3)"
|
||||
>
|
||||
<image class="order_img2" src="../../static/images/myorder_3.png" />
|
||||
<view class="order_text">{{ '待收货' }}</view>
|
||||
</view>
|
||||
<view class="theorderflex1" @click="goOrder(5)">
|
||||
<view
|
||||
class="theorderflex1"
|
||||
style="margin-bottom: 0"
|
||||
@click="goOrder(5)"
|
||||
>
|
||||
<image class="order_img2" src="../../static/images/myorder_4.png" />
|
||||
<view class="order_text">{{ '已收货' }}</view>
|
||||
</view>
|
||||
|
|
|
@ -322,6 +322,7 @@ import * as reg from '@/config/regiest'
|
|||
|
||||
import * as api from '@/config/order.js'
|
||||
import { formatMsToDate } from '@/util/index'
|
||||
import { ORDER_STATUS } from '@/util/common'
|
||||
export default {
|
||||
components: {
|
||||
backIcon,
|
||||
|
@ -336,7 +337,7 @@ export default {
|
|||
isRemark: false,
|
||||
cancelCode: '',
|
||||
details: '',
|
||||
orderStatusList: [],
|
||||
orderStatusList: ORDER_STATUS,
|
||||
dataShow: false,
|
||||
dataShow1: false,
|
||||
detailsShow: false,
|
||||
|
@ -370,7 +371,6 @@ export default {
|
|||
this.isTab = ''
|
||||
this.select.orderStatus = this.isTab
|
||||
}
|
||||
this.getOrderStatus()
|
||||
// this.getDataList()
|
||||
this.getOrderType()
|
||||
},
|
||||
|
@ -391,13 +391,21 @@ export default {
|
|||
this.select.orderType = item.value
|
||||
},
|
||||
getOrderType() {
|
||||
api.orderType().then(res => {
|
||||
res.data.unshift({
|
||||
label: '全部',
|
||||
value: '',
|
||||
})
|
||||
this.orderTypes = res.data
|
||||
uni.showLoading({
|
||||
title: '加载中',
|
||||
})
|
||||
api
|
||||
.orderType()
|
||||
.then(res => {
|
||||
res.data.unshift({
|
||||
label: '全部',
|
||||
value: '',
|
||||
})
|
||||
this.orderTypes = res.data
|
||||
})
|
||||
.finally(() => {
|
||||
uni.hideLoading()
|
||||
})
|
||||
},
|
||||
rightOpen() {
|
||||
this.rightShow = true
|
||||
|
@ -424,22 +432,30 @@ export default {
|
|||
specialArea: item.orderType,
|
||||
orderItemsParams: orderItemsParams,
|
||||
}
|
||||
api.payCheck(item.orderCode).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.navigateTo({
|
||||
url:
|
||||
'/pages/pay/index?paramsPost=' +
|
||||
JSON.stringify(item) +
|
||||
'&businessType=1',
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'success',
|
||||
mask: true,
|
||||
})
|
||||
}
|
||||
uni.showLoading({
|
||||
title: '加载中',
|
||||
})
|
||||
api
|
||||
.payCheck(item.orderCode)
|
||||
.then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.navigateTo({
|
||||
url:
|
||||
'/pages/pay/index?paramsPost=' +
|
||||
JSON.stringify(item) +
|
||||
'&businessType=1',
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'success',
|
||||
mask: true,
|
||||
})
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
uni.hideLoading()
|
||||
})
|
||||
// uni.navigateTo({
|
||||
// url:
|
||||
// '/pages/pay/index?paramsPost=' +
|
||||
|
@ -448,30 +464,49 @@ export default {
|
|||
// })
|
||||
},
|
||||
toCancel() {
|
||||
api.cancelOrder(this.cancelCode).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '订单已取消',
|
||||
icon: 'none',
|
||||
duration: 1500,
|
||||
})
|
||||
this.queryParams.pageNum = 1
|
||||
this.orderLists = []
|
||||
this.getDataList()
|
||||
}
|
||||
this.cancleOrder = false
|
||||
uni.showLoading({
|
||||
title: '操作中',
|
||||
})
|
||||
api
|
||||
.cancelOrder(this.cancelCode)
|
||||
.then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '订单已取消',
|
||||
icon: 'none',
|
||||
duration: 1500,
|
||||
})
|
||||
this.queryParams.pageNum = 1
|
||||
this.orderLists = []
|
||||
this.getDataList()
|
||||
}
|
||||
this.cancleOrder = false
|
||||
})
|
||||
.catch(() => {
|
||||
this.cancleOrder = false
|
||||
})
|
||||
.finally(() => {
|
||||
uni.hideLoading()
|
||||
})
|
||||
},
|
||||
cancelPay(val) {
|
||||
this.cancelCode = val.orderCode
|
||||
this.cancleOrder = true
|
||||
},
|
||||
getDetails(item) {
|
||||
api.orderDetails(item.orderCode).then(res => {
|
||||
this.details = res.data
|
||||
this.detailsShow = true
|
||||
console.log(this.details, '....this.details')
|
||||
uni.showLoading({
|
||||
title: '加载中',
|
||||
})
|
||||
api
|
||||
.orderDetails(item.orderCode)
|
||||
.then(res => {
|
||||
this.details = res.data
|
||||
this.detailsShow = true
|
||||
console.log(this.details, '....this.details')
|
||||
})
|
||||
.finally(() => {
|
||||
uni.hideLoading()
|
||||
})
|
||||
},
|
||||
getDate(e) {
|
||||
this.select.creationTimeStart = formatMsToDate(e.value)
|
||||
|
@ -487,27 +522,25 @@ export default {
|
|||
openDate1() {
|
||||
this.dataShow1 = true
|
||||
},
|
||||
getOrderStatus() {
|
||||
api.orderStatus().then(res => {
|
||||
res.data.unshift({
|
||||
label: '全部',
|
||||
value: '',
|
||||
})
|
||||
this.orderStatusList = res.data
|
||||
})
|
||||
},
|
||||
|
||||
getDataList(index) {
|
||||
if (index) {
|
||||
this.queryParams.pageNum = 1
|
||||
this.orderLists = []
|
||||
}
|
||||
this.rightShow = false
|
||||
uni.showLoading({
|
||||
title: '加载中',
|
||||
})
|
||||
api
|
||||
.orderList(Object.assign({}, this.queryParams, this.select))
|
||||
.then(res => {
|
||||
this.orderLists = this.orderLists.concat(res.rows)
|
||||
this.total = res.total
|
||||
})
|
||||
.finally(() => {
|
||||
uni.hideLoading()
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -146,7 +146,7 @@
|
|||
|
||||
<script>
|
||||
import * as api from '@/config/order.js'
|
||||
|
||||
import { ORDER_STATUS } from '@/util/common'
|
||||
export default {
|
||||
name: 'CancelOrder',
|
||||
data() {
|
||||
|
@ -158,7 +158,7 @@ export default {
|
|||
isRemark: false,
|
||||
cancelCode: '',
|
||||
details: {},
|
||||
orderStatusList: [],
|
||||
orderStatusList: ORDER_STATUS,
|
||||
detailsShow: false,
|
||||
isTab: -1,
|
||||
// 查询参数
|
||||
|
@ -310,24 +310,6 @@ export default {
|
|||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取订单状态列表
|
||||
*/
|
||||
getOrderStatus() {
|
||||
api
|
||||
.orderStatus()
|
||||
.then(res => {
|
||||
res.data.unshift({
|
||||
label: '全部',
|
||||
value: '',
|
||||
})
|
||||
this.orderStatusList = res.data
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('获取订单状态失败:', error)
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取数据列表
|
||||
*/
|
||||
|
|
|
@ -8,3 +8,22 @@ export const MEMBER_SIGN = {
|
|||
NORMAL_LEVEL: 0,
|
||||
V5_LEVEL: 2,
|
||||
}
|
||||
|
||||
export const ORDER_STATUS = [
|
||||
{
|
||||
label: '全部',
|
||||
value: '',
|
||||
},
|
||||
{
|
||||
label: '待发货',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: '待收货',
|
||||
value: 3,
|
||||
},
|
||||
{
|
||||
label: '已收货',
|
||||
value: 5,
|
||||
},
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue