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 =>
|
export const orderInfo = params =>
|
||||||
http.post('/sale/api/retail-order/query-order', 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 =>
|
export const pickPostAge = params =>
|
||||||
|
|
|
@ -178,6 +178,11 @@ export default {
|
||||||
...mapGetters(['priceSymbol', 'priceSymbolVisible', 'isZeroLevel']),
|
...mapGetters(['priceSymbol', 'priceSymbolVisible', 'isZeroLevel']),
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
// this.getLanguage();
|
||||||
|
// this.getService()
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.$store.dispatch('getCarLength')
|
||||||
if (
|
if (
|
||||||
uni.getStorageSync('showInfo') == undefined ||
|
uni.getStorageSync('showInfo') == undefined ||
|
||||||
uni.getStorageSync('showInfo') == 0
|
uni.getStorageSync('showInfo') == 0
|
||||||
|
@ -188,11 +193,6 @@ export default {
|
||||||
? REPURCHASE_AREA.id
|
? REPURCHASE_AREA.id
|
||||||
: REGIEST_AREA.id
|
: REGIEST_AREA.id
|
||||||
)
|
)
|
||||||
// this.getLanguage();
|
|
||||||
// this.getService()
|
|
||||||
},
|
|
||||||
onShow() {
|
|
||||||
this.$store.dispatch('getCarLength')
|
|
||||||
},
|
},
|
||||||
// onPullDownRefresh() {
|
// onPullDownRefresh() {
|
||||||
// let that = this
|
// let that = this
|
||||||
|
|
|
@ -55,19 +55,6 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="ju_grade" v-if="!ifSpecial">
|
<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="jugrade_flex">
|
||||||
<view class="ju_left">
|
<view class="ju_left">
|
||||||
<view v-if="awards.tarAwardsName" class="yestDay">
|
<view v-if="awards.tarAwardsName" class="yestDay">
|
||||||
|
@ -160,22 +147,29 @@
|
||||||
<u-icon name="arrow-right" color="#999999" size="16rpx"></u-icon>
|
<u-icon name="arrow-right" color="#999999" size="16rpx"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order_flex thepadding">
|
<view class="order_flex thepadding" style="justify-content: center">
|
||||||
<view class="theorderflex1" @click="goOrder(0)">
|
<view
|
||||||
<image class="order_img2" src="../../static/images/myorder_1.png" />
|
class="theorderflex1"
|
||||||
<view class="order_text">{{ '待付款' }}</view>
|
style="margin-bottom: 0"
|
||||||
<view v-if="waitPayNum" class="qiu">{{ waitPayNum }}</view>
|
@click="goOrder(1)"
|
||||||
</view>
|
>
|
||||||
<view class="theorderflex1" @click="goOrder(1)">
|
|
||||||
<image class="order_img2" src="../../static/images/myorder_2.png" />
|
<image class="order_img2" src="../../static/images/myorder_2.png" />
|
||||||
<view class="order_text">{{ '待发货' }}</view>
|
<view class="order_text">{{ '待发货' }}</view>
|
||||||
<view v-if="payNum" class="qiu">{{ payNum }}</view>
|
<view v-if="payNum" class="qiu">{{ payNum }}</view>
|
||||||
</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" />
|
<image class="order_img2" src="../../static/images/myorder_3.png" />
|
||||||
<view class="order_text">{{ '待收货' }}</view>
|
<view class="order_text">{{ '待收货' }}</view>
|
||||||
</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" />
|
<image class="order_img2" src="../../static/images/myorder_4.png" />
|
||||||
<view class="order_text">{{ '已收货' }}</view>
|
<view class="order_text">{{ '已收货' }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -322,6 +322,7 @@ import * as reg from '@/config/regiest'
|
||||||
|
|
||||||
import * as api from '@/config/order.js'
|
import * as api from '@/config/order.js'
|
||||||
import { formatMsToDate } from '@/util/index'
|
import { formatMsToDate } from '@/util/index'
|
||||||
|
import { ORDER_STATUS } from '@/util/common'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
backIcon,
|
backIcon,
|
||||||
|
@ -336,7 +337,7 @@ export default {
|
||||||
isRemark: false,
|
isRemark: false,
|
||||||
cancelCode: '',
|
cancelCode: '',
|
||||||
details: '',
|
details: '',
|
||||||
orderStatusList: [],
|
orderStatusList: ORDER_STATUS,
|
||||||
dataShow: false,
|
dataShow: false,
|
||||||
dataShow1: false,
|
dataShow1: false,
|
||||||
detailsShow: false,
|
detailsShow: false,
|
||||||
|
@ -370,7 +371,6 @@ export default {
|
||||||
this.isTab = ''
|
this.isTab = ''
|
||||||
this.select.orderStatus = this.isTab
|
this.select.orderStatus = this.isTab
|
||||||
}
|
}
|
||||||
this.getOrderStatus()
|
|
||||||
// this.getDataList()
|
// this.getDataList()
|
||||||
this.getOrderType()
|
this.getOrderType()
|
||||||
},
|
},
|
||||||
|
@ -391,13 +391,21 @@ export default {
|
||||||
this.select.orderType = item.value
|
this.select.orderType = item.value
|
||||||
},
|
},
|
||||||
getOrderType() {
|
getOrderType() {
|
||||||
api.orderType().then(res => {
|
uni.showLoading({
|
||||||
|
title: '加载中',
|
||||||
|
})
|
||||||
|
api
|
||||||
|
.orderType()
|
||||||
|
.then(res => {
|
||||||
res.data.unshift({
|
res.data.unshift({
|
||||||
label: '全部',
|
label: '全部',
|
||||||
value: '',
|
value: '',
|
||||||
})
|
})
|
||||||
this.orderTypes = res.data
|
this.orderTypes = res.data
|
||||||
})
|
})
|
||||||
|
.finally(() => {
|
||||||
|
uni.hideLoading()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
rightOpen() {
|
rightOpen() {
|
||||||
this.rightShow = true
|
this.rightShow = true
|
||||||
|
@ -424,7 +432,12 @@ export default {
|
||||||
specialArea: item.orderType,
|
specialArea: item.orderType,
|
||||||
orderItemsParams: orderItemsParams,
|
orderItemsParams: orderItemsParams,
|
||||||
}
|
}
|
||||||
api.payCheck(item.orderCode).then(res => {
|
uni.showLoading({
|
||||||
|
title: '加载中',
|
||||||
|
})
|
||||||
|
api
|
||||||
|
.payCheck(item.orderCode)
|
||||||
|
.then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:
|
url:
|
||||||
|
@ -440,6 +453,9 @@ export default {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
.finally(() => {
|
||||||
|
uni.hideLoading()
|
||||||
|
})
|
||||||
// uni.navigateTo({
|
// uni.navigateTo({
|
||||||
// url:
|
// url:
|
||||||
// '/pages/pay/index?paramsPost=' +
|
// '/pages/pay/index?paramsPost=' +
|
||||||
|
@ -448,7 +464,12 @@ export default {
|
||||||
// })
|
// })
|
||||||
},
|
},
|
||||||
toCancel() {
|
toCancel() {
|
||||||
api.cancelOrder(this.cancelCode).then(res => {
|
uni.showLoading({
|
||||||
|
title: '操作中',
|
||||||
|
})
|
||||||
|
api
|
||||||
|
.cancelOrder(this.cancelCode)
|
||||||
|
.then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '订单已取消',
|
title: '订单已取消',
|
||||||
|
@ -461,17 +482,31 @@ export default {
|
||||||
}
|
}
|
||||||
this.cancleOrder = false
|
this.cancleOrder = false
|
||||||
})
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.cancleOrder = false
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
uni.hideLoading()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
cancelPay(val) {
|
cancelPay(val) {
|
||||||
this.cancelCode = val.orderCode
|
this.cancelCode = val.orderCode
|
||||||
this.cancleOrder = true
|
this.cancleOrder = true
|
||||||
},
|
},
|
||||||
getDetails(item) {
|
getDetails(item) {
|
||||||
api.orderDetails(item.orderCode).then(res => {
|
uni.showLoading({
|
||||||
|
title: '加载中',
|
||||||
|
})
|
||||||
|
api
|
||||||
|
.orderDetails(item.orderCode)
|
||||||
|
.then(res => {
|
||||||
this.details = res.data
|
this.details = res.data
|
||||||
this.detailsShow = true
|
this.detailsShow = true
|
||||||
console.log(this.details, '....this.details')
|
console.log(this.details, '....this.details')
|
||||||
})
|
})
|
||||||
|
.finally(() => {
|
||||||
|
uni.hideLoading()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
getDate(e) {
|
getDate(e) {
|
||||||
this.select.creationTimeStart = formatMsToDate(e.value)
|
this.select.creationTimeStart = formatMsToDate(e.value)
|
||||||
|
@ -487,27 +522,25 @@ export default {
|
||||||
openDate1() {
|
openDate1() {
|
||||||
this.dataShow1 = true
|
this.dataShow1 = true
|
||||||
},
|
},
|
||||||
getOrderStatus() {
|
|
||||||
api.orderStatus().then(res => {
|
|
||||||
res.data.unshift({
|
|
||||||
label: '全部',
|
|
||||||
value: '',
|
|
||||||
})
|
|
||||||
this.orderStatusList = res.data
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getDataList(index) {
|
getDataList(index) {
|
||||||
if (index) {
|
if (index) {
|
||||||
this.queryParams.pageNum = 1
|
this.queryParams.pageNum = 1
|
||||||
this.orderLists = []
|
this.orderLists = []
|
||||||
}
|
}
|
||||||
this.rightShow = false
|
this.rightShow = false
|
||||||
|
uni.showLoading({
|
||||||
|
title: '加载中',
|
||||||
|
})
|
||||||
api
|
api
|
||||||
.orderList(Object.assign({}, this.queryParams, this.select))
|
.orderList(Object.assign({}, this.queryParams, this.select))
|
||||||
.then(res => {
|
.then(res => {
|
||||||
this.orderLists = this.orderLists.concat(res.rows)
|
this.orderLists = this.orderLists.concat(res.rows)
|
||||||
this.total = res.total
|
this.total = res.total
|
||||||
})
|
})
|
||||||
|
.finally(() => {
|
||||||
|
uni.hideLoading()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -146,7 +146,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import * as api from '@/config/order.js'
|
import * as api from '@/config/order.js'
|
||||||
|
import { ORDER_STATUS } from '@/util/common'
|
||||||
export default {
|
export default {
|
||||||
name: 'CancelOrder',
|
name: 'CancelOrder',
|
||||||
data() {
|
data() {
|
||||||
|
@ -158,7 +158,7 @@ export default {
|
||||||
isRemark: false,
|
isRemark: false,
|
||||||
cancelCode: '',
|
cancelCode: '',
|
||||||
details: {},
|
details: {},
|
||||||
orderStatusList: [],
|
orderStatusList: ORDER_STATUS,
|
||||||
detailsShow: false,
|
detailsShow: false,
|
||||||
isTab: -1,
|
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,
|
NORMAL_LEVEL: 0,
|
||||||
V5_LEVEL: 2,
|
V5_LEVEL: 2,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const ORDER_STATUS = [
|
||||||
|
{
|
||||||
|
label: '全部',
|
||||||
|
value: '',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '待发货',
|
||||||
|
value: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '待收货',
|
||||||
|
value: 3,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '已收货',
|
||||||
|
value: 5,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
Loading…
Reference in New Issue