|
@@ -17,10 +17,10 @@
|
|
|
<view class="check-row align_center justify_between">
|
|
|
<view class="orderNo">{{item.purchaseNo}}</view>
|
|
|
<view class="times">
|
|
|
- <span v-if="item.billStatus == 'WAIT_AUDIT'">待审核</span>
|
|
|
- <view v-if="item.billStatus == 'WAIT_AUDIT'" class="waitPay">
|
|
|
+ <span v-if="item.billStatus == 'WAIT_AUDIT'&&item.payOnlineFlag==0">待审核</span>
|
|
|
+ <view v-if="item.billStatus == 'WAIT_PAY'" class="waitPay">
|
|
|
<text>待付款</text>
|
|
|
- <text>22小时11分钟</text>
|
|
|
+ <u-count-down :timestamp="item.timestamp" :show-days="false" :show-hours="false"></u-count-down>
|
|
|
</view>
|
|
|
<span v-if="item.billStatus == 'AUDIT_REJECT'">审核不通过</span>
|
|
|
<span v-if="item.billStatus == 'WAIT_OUT_WAREHOUSE' || item.billStatus == 'WAIT_RECEIVE'">待收货</span>
|
|
@@ -31,18 +31,18 @@
|
|
|
<view class="check-row">
|
|
|
<view v-if="item.totalCategory>1" class="check-row-left">
|
|
|
<scroll-view style="width: 100%;white-space: nowrap;" scroll-x="true">
|
|
|
- <view class="img-item" v-for="item in item.totalCategory" :key="item">
|
|
|
- <image src="/static/def_imgs.png" style="width: 100%;height: 100%;"></image>
|
|
|
+ <view class="img-item" v-for="item in item.productList" :key="item.id">
|
|
|
+ <image :src="item.images||'/static/def_imgs.png'" style="width: 100%;height: 100%;"></image>
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
</view>
|
|
|
<view v-else class="check-row-left">
|
|
|
<view class="img-item">
|
|
|
- <image src="/static/def_imgs.png" style="width: 100%;height: 100%;"></image>
|
|
|
+ <image :src="item.productList&&item.productList[0].images||'/static/def_imgs.png'" style="width: 100%;height: 100%;"></image>
|
|
|
</view>
|
|
|
<view class="product-info">
|
|
|
- <text class="ellipsis-two">布瑞斯免维护蓄电池 五菱之光,五菱荣光</text>
|
|
|
- <text class="ellipsis-one">58-500MF</text>
|
|
|
+ <text class="ellipsis-two">{{item.productList&&item.productList[0].productName ||'--'}}</text>
|
|
|
+ <text class="ellipsis-one">{{item.productList&&item.productList[0].origCode||'--'}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view :class="item.totalCategory>1?'check-row-right check-row-right-fixed':'check-row-right'">
|
|
@@ -56,7 +56,7 @@
|
|
|
</view>
|
|
|
<view style="text-align: right;color: #999;">
|
|
|
<u-button style="margin-left: 10px;" v-if="item.billStatus == 'WAIT_AUDIT'" size="mini" shape="round" type="default" plain @click="cancelOrder(item)">取消订单</u-button>
|
|
|
- <u-button style="margin-left: 10px;" v-if="item.billStatus == 'WAIT_AUDIT'" size="mini" shape="round" type="error" plain @click="payOrder(item)">立即支付</u-button>
|
|
|
+ <u-button style="margin-left: 10px;" v-if="item.billStatus == 'WAIT_PAY'" size="mini" shape="round" type="error" plain @click="payOrder(item)">立即支付</u-button>
|
|
|
<!-- <u-button style="margin-left: 10px;" v-if="item.billStatus == 'CANCEL'" size="mini" shape="round" type="error" plain @click="buyAgain(item)">再次购买</u-button> -->
|
|
|
<u-button style="margin-left: 10px;" v-if="item.billStatus == 'WAIT_RECEIVE'" size="mini" shape="round" type="error" plain @click="receiveOrder(item)">确认收货</u-button>
|
|
|
</view>
|
|
@@ -137,8 +137,8 @@
|
|
|
onLoad() {
|
|
|
let _this = this
|
|
|
_this.pageInit()
|
|
|
- uni.$on('refreshPurcaOrder',function(data){
|
|
|
- _this.resetList(data)
|
|
|
+ uni.$on('refreshPurcaOrder',function(data, state){
|
|
|
+ _this.resetList(data,state)
|
|
|
})
|
|
|
},
|
|
|
methods:{
|
|
@@ -238,6 +238,7 @@
|
|
|
payComplete(item,isOk){
|
|
|
this.showPopu = false
|
|
|
if(isOk){
|
|
|
+ item.payOnlineFlag = 0
|
|
|
this.viewRow(item)
|
|
|
setTimeout(()=>{
|
|
|
this.resetList(item,'WAIT_AUDIT')
|
|
@@ -281,7 +282,7 @@
|
|
|
// 状态条件
|
|
|
// 待付款
|
|
|
if(this.swiperCurrent == 1){
|
|
|
- params.billStatusList = ['WAIT_PAY']
|
|
|
+ params.billStatusList = ['WAIT_AUDIT']
|
|
|
}
|
|
|
// 待收货
|
|
|
if(this.swiperCurrent == 2){
|
|
@@ -302,16 +303,31 @@
|
|
|
this.status = "loading"
|
|
|
purchaseQueryPage(params).then(res => {
|
|
|
if (res.code == 200 || res.status == 204 || res.status == 200) {
|
|
|
+ let list = res.data.list || []
|
|
|
+ list.map(item => {
|
|
|
+ let now = new Date(item.purchaseDate)
|
|
|
+ now.setMilliseconds(now.getMilliseconds() + 30 * 60 * 1000)
|
|
|
+ item.timestamp = now.getTime()
|
|
|
+ item.billStatus = item.billStatus == 'WAIT_AUDIT'&&item.payOnlineFlag==1&&item.payInfo&&item.payInfo.payState=='WAIT'?'WAIT_PAY':item.billStatus
|
|
|
+ })
|
|
|
+ // 待收款
|
|
|
+ if(_this.swiperCurrent==1){
|
|
|
+ list = list.filter(item => {
|
|
|
+ return item.billStatus == 'WAIT_PAY'
|
|
|
+ })
|
|
|
+ }
|
|
|
if(_this.pageNo>1){
|
|
|
- _this.list = _this.list.concat(res.data.list || [])
|
|
|
+ _this.list = _this.list.concat(list)
|
|
|
}else{
|
|
|
- _this.list = res.data.list || []
|
|
|
+ _this.list = list
|
|
|
}
|
|
|
+
|
|
|
_this.total = res.data.count || 0
|
|
|
// 待收货
|
|
|
- if(_this.swiperCurrent == 1){
|
|
|
- _this.tabList[1].count = _this.total
|
|
|
+ if(_this.swiperCurrent == 2){
|
|
|
+ _this.tabList[2].count = _this.total
|
|
|
}
|
|
|
+
|
|
|
} else {
|
|
|
_this.list = []
|
|
|
_this.total = 0
|