|
@@ -1,6 +1,6 @@
|
|
<template>
|
|
<template>
|
|
<view class="orderDetail-digitalShel flex flex_column">
|
|
<view class="orderDetail-digitalShel flex flex_column">
|
|
- <view class="contHead" :style="{background:state!= 'CLOSE' ? '#066cff':'#ff5500',color:'#fff'}">
|
|
|
|
|
|
+ <view class="contHead" :style="{background:state!= 'error'&&state!= 'AUDIT_REJECT' ? '#066cff':'#ff5500',color:'#fff'}">
|
|
<view class="statusH">
|
|
<view class="statusH">
|
|
<view class="flex flex_column align_center">
|
|
<view class="flex flex_column align_center">
|
|
<view class="status-row">
|
|
<view class="status-row">
|
|
@@ -24,7 +24,7 @@
|
|
</view>
|
|
</view>
|
|
<view v-for="item in partList" :key="item.id" class="flex align-center item-list">
|
|
<view v-for="item in partList" :key="item.id" class="flex align-center item-list">
|
|
<view style="height: 150rpx;">
|
|
<view style="height: 150rpx;">
|
|
- <u-image :src="item.product.images" border-radius="16" width="200" height="150" bg-color="#EBEBEB" ></u-image>
|
|
|
|
|
|
+ <u-image :src="item.product.images+'?x-oss-process=image/resize,p_50'" border-radius="16" width="200" height="150" bg-color="#EBEBEB" ></u-image>
|
|
<view class="back-price" v-if="item.giveAmount">返<text>{{item.giveAmount}}</text>元</view>
|
|
<view class="back-price" v-if="item.giveAmount">返<text>{{item.giveAmount}}</text>元</view>
|
|
</view>
|
|
</view>
|
|
<view>
|
|
<view>
|
|
@@ -42,6 +42,10 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <!-- 分页 -->
|
|
|
|
+ <view class="product-pages" v-if="totalPages>1">
|
|
|
|
+ <uni-pages-nav :totalPages="totalPages" :showShadow="false" :currentPage="pageNo" @pagechanged="getRow"></uni-pages-nav>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
<view class="info" v-if="info">
|
|
<view class="info" v-if="info">
|
|
<view class="infoList" v-if="state=='FINISH'">
|
|
<view class="infoList" v-if="state=='FINISH'">
|
|
@@ -87,32 +91,37 @@
|
|
statusIcon: '', // 结算状态icon
|
|
statusIcon: '', // 结算状态icon
|
|
statusMessage: '请耐心等待汽配经销商进行配送',
|
|
statusMessage: '请耐心等待汽配经销商进行配送',
|
|
partList: [], // 配件列表
|
|
partList: [], // 配件列表
|
|
- state: 'success'
|
|
|
|
|
|
+ state: 'success',
|
|
|
|
+ pageNo:1,
|
|
|
|
+ pageSize: 30,
|
|
|
|
+ total: 0,
|
|
|
|
+ purchaseSn: null
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onLoad(option) {
|
|
onLoad(option) {
|
|
|
|
+ uni.setNavigationBarTitle({
|
|
|
|
+ title: '采购订单详情'
|
|
|
|
+ })
|
|
// 从采购单列表来
|
|
// 从采购单列表来
|
|
if(option.purchaseSn){
|
|
if(option.purchaseSn){
|
|
this.state = option.state
|
|
this.state = option.state
|
|
- uni.setNavigationBarTitle({
|
|
|
|
- title: '采购订单详情'
|
|
|
|
- })
|
|
|
|
|
|
+ this.purchaseSn = option.purchaseSn
|
|
const stateText = {'WAIT_AUDIT':'待审核','AUDIT_REJECT':'审核不通过','WAIT_OUT_WAREHOUSE':'待收货','FINISH':'已完结'}
|
|
const stateText = {'WAIT_AUDIT':'待审核','AUDIT_REJECT':'审核不通过','WAIT_OUT_WAREHOUSE':'待收货','FINISH':'已完结'}
|
|
this.statusText = stateText[option.state]
|
|
this.statusText = stateText[option.state]
|
|
this.statusIcon = option.state == 'FINISH' ? 'checkmark-circle' : 'hourglass'
|
|
this.statusIcon = option.state == 'FINISH' ? 'checkmark-circle' : 'hourglass'
|
|
this.info = this.$store.state.vuex_tempData
|
|
this.info = this.$store.state.vuex_tempData
|
|
this.statusMessage = option.state == 'FINISH' || option.state == 'AUDIT_REJECT' ? '' : '请耐心等待汽配经销商进行配送'
|
|
this.statusMessage = option.state == 'FINISH' || option.state == 'AUDIT_REJECT' ? '' : '请耐心等待汽配经销商进行配送'
|
|
// 获取明细
|
|
// 获取明细
|
|
- this.getDetailList(option.purchaseSn)
|
|
|
|
|
|
+ this.getDetailList()
|
|
}else{
|
|
}else{
|
|
const data = this.$store.state.vuex_tempData
|
|
const data = this.$store.state.vuex_tempData
|
|
if(data){
|
|
if(data){
|
|
this.info = data
|
|
this.info = data
|
|
- this.partList = data.detailList||[]
|
|
|
|
|
|
+ this.state = data.billStatus
|
|
|
|
+ this.purchaseSn = data.purchaseSn
|
|
|
|
+ // 获取明细
|
|
|
|
+ this.getDetailList()
|
|
}
|
|
}
|
|
- uni.setNavigationBarTitle({
|
|
|
|
- title: ''
|
|
|
|
- })
|
|
|
|
this.statusText = '提交成功'
|
|
this.statusText = '提交成功'
|
|
this.statusIcon = 'checkmark-circle'
|
|
this.statusIcon = 'checkmark-circle'
|
|
}
|
|
}
|
|
@@ -133,18 +142,33 @@
|
|
ret += item.qty
|
|
ret += item.qty
|
|
})
|
|
})
|
|
return ret
|
|
return ret
|
|
|
|
+ },
|
|
|
|
+ totalPages(){
|
|
|
|
+ return Math.ceil(this.total / this.pageSize)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- getDetailList(sn){
|
|
|
|
|
|
+ getRow(pageNo){
|
|
|
|
+ this.pageNo = pageNo
|
|
|
|
+ this.getDetailList()
|
|
|
|
+ },
|
|
|
|
+ getDetailList(){
|
|
uni.showLoading({
|
|
uni.showLoading({
|
|
title: '加载中'
|
|
title: '加载中'
|
|
})
|
|
})
|
|
- purchaseQueryDetailPage({purchaseSn: sn,pageNo:1,pageSize:9000}).then(res => {
|
|
|
|
- uni.hideLoading()
|
|
|
|
|
|
+ purchaseQueryDetailPage({purchaseSn: this.purchaseSn,pageNo:this.pageNo,pageSize:this.pageSize}).then(res => {
|
|
if(res.status == 200){
|
|
if(res.status == 200){
|
|
- this.partList = res.data ? res.data.list : []
|
|
|
|
|
|
+ this.partList = res.data ? res.data.list : [],
|
|
|
|
+ this.total = res.data ? res.data.count : 0
|
|
}
|
|
}
|
|
|
|
+ // 滚动到顶部
|
|
|
|
+ this.$nextTick(()=>{
|
|
|
|
+ uni.pageScrollTo({
|
|
|
|
+ scrollTop: 0,
|
|
|
|
+ duration: 300
|
|
|
|
+ });
|
|
|
|
+ uni.hideLoading()
|
|
|
|
+ })
|
|
})
|
|
})
|
|
},
|
|
},
|
|
message(title){
|
|
message(title){
|