|
@@ -8,12 +8,12 @@
|
|
|
</u-icon>
|
|
|
<text>{{statusText}}</text>
|
|
|
</view>
|
|
|
- <view class="messageText" v-if="statusMessage"><text>{{statusMessage}}</text></view>
|
|
|
<view v-if="info.billStatus=='WAIT_PAY'" class="messageText">
|
|
|
请尽快支付,
|
|
|
- <u-count-down separator="zh" :separator-size="24" bg-color="none" color="#ffff7f" separator-color="#ffff7f" :timestamp="info.timestamp" :show-days="false" :show-hours="false"></u-count-down>
|
|
|
+ <u-count-down separator="zh" :separator-size="24" bg-color="none" color="#ffff7f" separator-color="#ffff7f" :timestamp="info.timestamp" :show-days="false" :show-hours="false" @end="countDownEnd()"></u-count-down>
|
|
|
后订单将自动取消。
|
|
|
</view>
|
|
|
+ <view v-else class="messageText"><text>{{statusMessage}}</text></view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -30,7 +30,7 @@
|
|
|
<view v-for="(item,dix) in partList" :key="item.id" class="item-list-box">
|
|
|
<view class="item-list flex">
|
|
|
<view style="height: 160rpx;width: 160rpx;">
|
|
|
- <u-image :src="item.product.images+'?x-oss-process=image/resize,p_50'" border-radius="16" width="160" height="160" bg-color="#EBEBEB" ></u-image>
|
|
|
+ <u-image :src="item.product.images ? item.product.images+'?x-oss-process=image/resize,p_50':'/static/def_imgs.png'" border-radius="16" width="160" height="160" bg-color="#EBEBEB" ></u-image>
|
|
|
</view>
|
|
|
<view>
|
|
|
<view class="item-name">
|
|
@@ -64,7 +64,7 @@
|
|
|
<!-- 赠品 -->
|
|
|
<view class="item-list flex gift-box" v-if="item.giftObj">
|
|
|
<view style="height: 120rpx;width: 120rpx;margin-left: 40rpx;">
|
|
|
- <u-image :src="item.giftObj.product.images+'?x-oss-process=image/resize,p_50'" border-radius="16" width="120" height="120" bg-color="#EBEBEB" ></u-image>
|
|
|
+ <u-image :src="item.giftObj.product.images ? item.giftObj.product.images+'?x-oss-process=image/resize,p_50':'/static/def_imgs.png'" border-radius="16" width="120" height="120" bg-color="#EBEBEB" ></u-image>
|
|
|
</view>
|
|
|
<view>
|
|
|
<view class="item-name flex align_center">
|
|
@@ -94,22 +94,22 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="info" v-if="info">
|
|
|
- <view class="infoList gray-text" v-if="info.totalTicketGiveAmount">
|
|
|
- <text>代金券</text>
|
|
|
- <text class="cText">¥{{Number(info.totalTicketGiveAmount).toFixed(2)}}</text>
|
|
|
+ <view class="infoList">
|
|
|
+ <text>总金额</text>
|
|
|
+ <view class="price-txt">¥<text>{{Number(info.totalAmount).toFixed(2)}}</text></view>
|
|
|
</view>
|
|
|
<view class="infoList gray-text" v-if="info.totalSpecialGiveAmount">
|
|
|
<text>总优惠</text>
|
|
|
<text class="cText">¥{{Number(info.totalSpecialGiveAmount).toFixed(2)}}</text>
|
|
|
</view>
|
|
|
- <view class="infoList">
|
|
|
- <text>总金额</text>
|
|
|
- <view class="price-txt">¥<text>{{Number(info.totalAmount).toFixed(2)}}</text></view>
|
|
|
+ <view class="infoList gray-text" v-if="info.totalTicketGiveAmount">
|
|
|
+ <text>代金券</text>
|
|
|
+ <text class="cText">¥{{Number(info.totalTicketGiveAmount).toFixed(2)}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="info" v-if="info">
|
|
|
<view class="infoList">
|
|
|
- <view class="title">单据信息</view>
|
|
|
+ <view class="title">订单信息</view>
|
|
|
<view class="statu"></view>
|
|
|
</view>
|
|
|
<view class="infoList dju">
|
|
@@ -124,50 +124,46 @@
|
|
|
<text>下单人员</text>
|
|
|
<text>{{info.purchaserName || '--'}}</text>
|
|
|
</view>
|
|
|
- <!-- 线下支付正常显示 -->
|
|
|
- <view class="infoList" v-if="info&&info.payOnlineFlag&&info.payOnlineFlag==0">
|
|
|
- <text>付款时间</text>
|
|
|
- <text>{{info.purchaseDate||'--'}}</text>
|
|
|
- </view>
|
|
|
+
|
|
|
<!-- 线上支付 显示 -->
|
|
|
- <view v-if="info&&info.payOnlineFlag==1&&info.payInfo">>
|
|
|
- <view class="infoList">
|
|
|
+ <view v-if="hasPay">
|
|
|
+ <view class="infoList" v-if="info&&info.billStatus != 'WAIT_AUDIT'&&info.billStatus != 'WAIT_PAY'&&isPayOk">
|
|
|
+ <text>审核时间</text>
|
|
|
+ <text>{{info.auditDate||'--'}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="infoList" v-if="isPayOk">
|
|
|
<text>支付方式</text>
|
|
|
<text>{{info.payInfo.payWay||'--'}}</text>
|
|
|
</view>
|
|
|
- <view class="infoList">
|
|
|
+ <view class="infoList" v-if="isPayOk">
|
|
|
<text>支付时间</text>
|
|
|
<text>{{info.payInfo.payDate||'--'}}</text>
|
|
|
</view>
|
|
|
- <view class="infoList" v-if="info&&info.billStatus != 'WAIT_AUDIT'&&info.billStatus != 'WAIT_PAY'">
|
|
|
- <text>审核时间</text>
|
|
|
- <text>{{info.payInfo.purchaseDate||'--'}}</text>
|
|
|
- </view>
|
|
|
- <view class="infoList">
|
|
|
+ <view class="infoList" v-if="info&&info.billStatus == 'CANCEL'&&isPayOk">
|
|
|
<text>退款方式</text>
|
|
|
- <text>{{info.payInfo.refundWay ||'--'}}</text>
|
|
|
+ <text>原支付返回</text>
|
|
|
</view>
|
|
|
- <view class="infoList">
|
|
|
+ <view class="infoList" v-if="info&&info.billStatus == 'CANCEL'&&isPayOk">
|
|
|
<text>退款时间</text>
|
|
|
<text>{{info.payInfo.refundDate ||'--'}}</text>
|
|
|
</view>
|
|
|
- <view class="infoList" v-if="info&&info.billStatus === 'CANCEL'">
|
|
|
+ <view class="infoList" v-if="info&&info.billStatus == 'CANCEL'">
|
|
|
<text>取消时间</text>
|
|
|
- <text>{{info.purchaseDate||'--'}}</text>
|
|
|
+ <text>{{info.cancelDate ||'--'}}</text>
|
|
|
</view>
|
|
|
- <view class="infoList" v-if="info&&(info.billStatus === 'CANCEL'||info.billStatus === 'WAIT_AUDIT'||info.billStatus == 'WAIT_PAY')">
|
|
|
+ <view class="infoList" v-if="shelfInfo">
|
|
|
<text>配送汽配商</text>
|
|
|
- <text>{{info.purchaseDate||'--'}}</text>
|
|
|
+ <text>{{shelfInfo.dealerName}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view v-if="info&&info.billStatus == 'WAIT_AUDIT'||info.billStatus == 'WAIT_PAY'||info.billStatus == 'WAIT_RECEIVE'" style="background-color: #fff;">
|
|
|
<view class="footer flex align_center justify_center">
|
|
|
- <u-button style="margin-left: 10px;" v-if="info.billStatus == 'WAIT_AUDIT'" size="mini" shape="round" type="default" plain @click="cancelOrder(info)">取消订单</u-button>
|
|
|
- <u-button style="margin-left: 10px;" v-if="info.billStatus == 'WAIT_PAY'" size="mini" shape="round" type="error" plain @click="payOrder(info)">立即支付</u-button>
|
|
|
- <!-- <u-button style="margin-left: 10px;" v-if="info.billStatus == 'FINISH'" size="mini" shape="round" type="error" plain @click="buyAgain(info)">再次购买</u-button> -->
|
|
|
- <u-button style="margin-left: 10px;" v-if="info.billStatus == 'WAIT_RECEIVE'" size="mini" shape="round" type="error" plain @click="receiveOrder(info)">确认收货</u-button>
|
|
|
+ <u-button style="margin-left: 10px;" v-if="info.billStatus == 'WAIT_AUDIT'||info.billStatus == 'WAIT_PAY'" size="medium" shape="round" type="default" plain @click="cancelOrder(info)">取消订单</u-button>
|
|
|
+ <u-button style="margin-left: 10px;" v-if="info.billStatus == 'WAIT_PAY'" size="medium" shape="round" type="error" plain @click="payOrder(info)">立即支付</u-button>
|
|
|
+ <!-- <u-button style="margin-left: 10px;" v-if="info.billStatus == 'FINISH'" size="medium" shape="round" type="error" plain @click="buyAgain(info)">再次购买</u-button> -->
|
|
|
+ <u-button style="margin-left: 10px;" v-if="info.billStatus == 'WAIT_RECEIVE'" size="medium" shape="round" type="error" plain @click="receiveOrder(info)">确认收货</u-button>
|
|
|
</view>
|
|
|
<view :style="{height:safeAreaBottom+'px'}"></view>
|
|
|
</view>
|
|
@@ -178,7 +174,8 @@
|
|
|
|
|
|
<script>
|
|
|
import payModal from '../components/payModal.vue'
|
|
|
- import { purchaseQueryDetailPage,purchaseCancel,purchaseReceive,purchasePay } from '@/api/purchase.js'
|
|
|
+ import { purchaseQueryDetailPage,purchaseDetail,purchaseCancel,purchaseReceive,purchasePay } from '@/api/purchase.js'
|
|
|
+ import moment from 'moment'
|
|
|
export default {
|
|
|
name: 'procureDetailOrder',
|
|
|
components:{
|
|
@@ -232,6 +229,19 @@
|
|
|
totalPages(){
|
|
|
return Math.ceil(this.total / this.pageSize)
|
|
|
},
|
|
|
+ // 货架经销商信息
|
|
|
+ shelfInfo(){
|
|
|
+ return this.$store.state.vuex_storeShelf
|
|
|
+ },
|
|
|
+ //是否有支付信息
|
|
|
+ hasPay(){
|
|
|
+ return this.info&&this.info.payOnlineFlag==1&&this.info.payInfo
|
|
|
+ },
|
|
|
+ //是否已付款
|
|
|
+ isPayOk(){
|
|
|
+ const item = this.info
|
|
|
+ return this.hasPay && item.payInfo.payState!='WAIT'
|
|
|
+ },
|
|
|
// 付款信息
|
|
|
payInfo(){
|
|
|
return this.$store.state.vuex_tempOrderData
|
|
@@ -297,8 +307,36 @@
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ // 倒计时结束,取消订单刷新页面
|
|
|
+ countDownEnd(){
|
|
|
+ this.showPopu = false
|
|
|
+ const _this = this
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '订单超过30分钟已自动取消',
|
|
|
+ showCancel:false,
|
|
|
+ confirmText:'知道了',
|
|
|
+ success: function (res) {
|
|
|
+ uni.$emit('refreshPurcaOrder',_this.info,'CANCEL')
|
|
|
+ _this.state = 'CANCEL'
|
|
|
+ _this.info.billStatus = 'CANCEL'
|
|
|
+ _this.statusText = '已取消'
|
|
|
+ _this.statusIcon = 'close-circle'
|
|
|
+ _this.statusMessage = '订单超过30分钟已自动取消'
|
|
|
+ _this.info.cancelDate = moment().format('YYYY-MM-DD hh:mm:ss')
|
|
|
+ // 更改标题栏背景色
|
|
|
+ uni.setNavigationBarColor({
|
|
|
+ frontColor: '#ffffff',
|
|
|
+ backgroundColor: '#e61100',
|
|
|
+ })
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
// 立即支付
|
|
|
payOrder(item){
|
|
|
+ uni.showLoading({
|
|
|
+ title: '加载中...'
|
|
|
+ })
|
|
|
purchasePay({
|
|
|
bizSn:item.purchaseSn,
|
|
|
bizNo:item.purchaseNo,
|
|
@@ -307,6 +345,7 @@
|
|
|
}).then(res=>{
|
|
|
this.showPopu = true
|
|
|
this.payData = res.data?res.data.payRequestRest:null
|
|
|
+ uni.hideLoading()
|
|
|
})
|
|
|
},
|
|
|
// 付款成功,isOk: false 取消支付或支付失败,true 支付完成
|
|
@@ -524,7 +563,7 @@
|
|
|
}
|
|
|
}
|
|
|
.footer{
|
|
|
- padding: 20upx 20upx 0;
|
|
|
+ padding: 20upx;
|
|
|
background: #FFFFFF;
|
|
|
}
|
|
|
}
|