|
@@ -15,36 +15,22 @@
|
|
|
@click="viewRow(item)"
|
|
|
>
|
|
|
<view class="check-row align-center justify_between">
|
|
|
- <view class="orderNo">{{item.tempNo}}</view>
|
|
|
+ <view class="orderNo">{{item.purchaseNo}}</view>
|
|
|
<view class="times">{{item.createDate}}</view>
|
|
|
</view>
|
|
|
- <view class="check-row flex align-center">
|
|
|
- <view class="carImage flex align-center">
|
|
|
- <u-image :src="item.vehicleLogo" border-radius="30" width="100" height="100" bg-color="#EBEBEB" ></u-image>
|
|
|
- </view>
|
|
|
- <view>
|
|
|
- <view class="carModel flex align-center" v-if="item.vehicleNumber" >
|
|
|
- <view><carNo color="#0055ff" :val="item.vehicleNumber"></carNo></view>
|
|
|
- <text style="margin-left: 20rpx;" v-if="item.vehicleModel">{{item.vehicleModel.split(' ')[0]}}</text>
|
|
|
- </view>
|
|
|
- <view class="carModel flex" v-if="!item.vehicleNumber" >
|
|
|
- <text>{{item.vehicleModel}}</text>
|
|
|
- </view>
|
|
|
- <view class="carVin flex align-center">
|
|
|
- VIN码:{{item.vin||'暂无'}}
|
|
|
- <text v-if="item.vin" @click.stop="copyVin(item.vin)">复制</text>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
+ <view class="check-row flex align-center justify_between">
|
|
|
+ <view>总款数:{{item.totalCategory}}</view>
|
|
|
+ <view>总金额:<text class="price">¥{{item.totalAmount}}</text></view>
|
|
|
</view>
|
|
|
<view class="check-row">
|
|
|
<view class="nums">
|
|
|
- {{item.totalQty}}件商品
|
|
|
+ 共{{item.totalQty}}件商品
|
|
|
</view>
|
|
|
<view style="text-align: right;">
|
|
|
- <span v-if="item.billState == 'WAIT_AUDIT'">待审核</span>
|
|
|
- <span v-if="item.billState == 'AUDIT_REJECT'">审核不通过</span>
|
|
|
- <span v-if="item.billState == 'WAIT_OUT_WAREHOUSE'">待收货</span>
|
|
|
- <span v-if="item.billState == 'FINISH'">已完结</span>
|
|
|
+ <span v-if="item.billStatus == 'WAIT_AUDIT'">待审核</span>
|
|
|
+ <span v-if="item.billStatus == 'AUDIT_REJECT'">审核不通过</span>
|
|
|
+ <span v-if="item.billStatus == 'WAIT_OUT_WAREHOUSE'">待收货</span>
|
|
|
+ <span v-if="item.billStatus == 'FINISH'">已完结</span>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -60,14 +46,10 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import carNo from '@/components/carNo.vue'
|
|
|
- import { getShelfTempBillList, shelfTempTotalWaitQty } from '@/api/shelf.js'
|
|
|
- import moment from 'moment'
|
|
|
+ import { purchaseQueryPage } from '@/api/purchase.js'
|
|
|
export default {
|
|
|
- components: {carNo},
|
|
|
data() {
|
|
|
return {
|
|
|
- theme:'',
|
|
|
status: 'loading',
|
|
|
noDataText: '暂无数据',
|
|
|
tabList: [
|
|
@@ -87,8 +69,8 @@
|
|
|
count: 0
|
|
|
},
|
|
|
],
|
|
|
- current: 0,
|
|
|
- swiperCurrent: 0,
|
|
|
+ current: 1,
|
|
|
+ swiperCurrent: 1,
|
|
|
// 查询条件
|
|
|
pageNo: 1,
|
|
|
pageSize: 10,
|
|
@@ -97,9 +79,9 @@
|
|
|
}
|
|
|
},
|
|
|
onLoad() {
|
|
|
+ this.$store.state.vuex_tempData = null
|
|
|
let _this = this
|
|
|
_this.pageInit()
|
|
|
- _this.theme = getApp().globalData.theme
|
|
|
uni.$on('refreshOrder',function(data){
|
|
|
_this.list = []
|
|
|
_this.status = "loading"
|
|
@@ -107,12 +89,6 @@
|
|
|
})
|
|
|
},
|
|
|
methods:{
|
|
|
- // 复制
|
|
|
- copyVin(vin){
|
|
|
- uni.setClipboardData({
|
|
|
- data: vin||'',
|
|
|
- })
|
|
|
- },
|
|
|
message(title){
|
|
|
uni.showToast({
|
|
|
icon:'none',
|
|
@@ -123,15 +99,12 @@
|
|
|
this.total = 0
|
|
|
this.pageNo = 1
|
|
|
this.getRow()
|
|
|
- // 获取总条数
|
|
|
- this.getWaitTotal()
|
|
|
},
|
|
|
// tabs通知swiper切换
|
|
|
tabsChange(index) {
|
|
|
this.swiperCurrent = index;
|
|
|
},
|
|
|
swiperChange(event){
|
|
|
- console.log(event.detail)
|
|
|
this.list = []
|
|
|
this.status = "loading"
|
|
|
},
|
|
@@ -153,7 +126,6 @@
|
|
|
},
|
|
|
// scroll-view到底部加载更多
|
|
|
onreachBottom() {
|
|
|
- console.log(this.list.length, this.total)
|
|
|
if(this.list.length < this.total){
|
|
|
this.pageNo += 1
|
|
|
this.getRow()
|
|
@@ -161,13 +133,6 @@
|
|
|
this.status = "nomore"
|
|
|
}
|
|
|
},
|
|
|
- checkNums (states, i){
|
|
|
- if(states){
|
|
|
- let arr = states.split(',')
|
|
|
- return arr[i]
|
|
|
- }
|
|
|
- return 0
|
|
|
- },
|
|
|
// 查询列表
|
|
|
getRow (pageNo) {
|
|
|
let _this = this
|
|
@@ -180,13 +145,13 @@
|
|
|
}
|
|
|
// 状态条件
|
|
|
if(this.swiperCurrent == 1){
|
|
|
- params.billStateList = ['WAIT_AUDIT','AUDIT_REJECT','WAIT_OUT_WAREHOUSE']
|
|
|
+ params.billStatusList = ['WAIT_AUDIT','AUDIT_REJECT','WAIT_OUT_WAREHOUSE']
|
|
|
}
|
|
|
if(this.swiperCurrent == 2){
|
|
|
- params.billStateList = ['FINISH']
|
|
|
+ params.billStatusList = ['FINISH']
|
|
|
}
|
|
|
this.status = "loading"
|
|
|
- getShelfTempBillList(params).then(res => {
|
|
|
+ purchaseQueryPage(params).then(res => {
|
|
|
if (res.code == 200 || res.status == 204 || res.status == 200) {
|
|
|
if(_this.pageNo>1){
|
|
|
_this.list = _this.list.concat(res.data.list || [])
|
|
@@ -194,6 +159,10 @@
|
|
|
_this.list = res.data.list || []
|
|
|
}
|
|
|
_this.total = res.data.count || 0
|
|
|
+ // 待收货
|
|
|
+ if(_this.swiperCurrent == 1){
|
|
|
+ _this.tabList[1].count = _this.total
|
|
|
+ }
|
|
|
} else {
|
|
|
_this.list = []
|
|
|
_this.total = 0
|
|
@@ -204,14 +173,10 @@
|
|
|
},
|
|
|
// 详细页
|
|
|
viewRow(item){
|
|
|
+ this.$store.state.vuex_tempData = item
|
|
|
uni.navigateTo({
|
|
|
- url: "/pagesA/digitalShelf/tempOrderList/orderDetail?orderSn="+item.tempSn+"&state="+(item.billState == 'FINISH'?1:0)
|
|
|
+ url: "/pagesB/procureOrder?purchaseSn="+item.purchaseSn+"&state="+item.billStatus
|
|
|
})
|
|
|
- },
|
|
|
- // 获取待拿货数量
|
|
|
- async getWaitTotal(){
|
|
|
- const ret = await shelfTempTotalWaitQty({billStateList:['WAIT_AUDIT','AUDIT_REJECT','WAIT_OUT_WAREHOUSE']}).then(res => res.data)
|
|
|
- this.tabList[1].count = ret || 0
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -263,44 +228,10 @@
|
|
|
}
|
|
|
}
|
|
|
> view{
|
|
|
- .carModel{
|
|
|
- color: #222222;
|
|
|
- font-size: 32upx;
|
|
|
- font-weight: bold;
|
|
|
- line-height: normal;
|
|
|
- margin-bottom: 10rpx;
|
|
|
- }
|
|
|
- .carVin{
|
|
|
- color: #666E75;
|
|
|
- font-size: 24upx;
|
|
|
- text{
|
|
|
- background-color: #EBEBEB;
|
|
|
- border-radius: 100rpx;
|
|
|
- padding: 0 20rpx;
|
|
|
- color: #033692;
|
|
|
- font-size: 20rpx;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
- margin-left: 20rpx;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- .carImage{
|
|
|
- padding-right: 20rpx;
|
|
|
- }
|
|
|
- .action{
|
|
|
- padding: 0 30rpx;
|
|
|
- color: #fff;
|
|
|
- border-radius: 100rpx;
|
|
|
- margin-left: 15upx;
|
|
|
- font-size: 24upx;
|
|
|
- &:after{
|
|
|
- border: 0;
|
|
|
- }
|
|
|
- &:active{
|
|
|
- opacity: 0.5;
|
|
|
- }
|
|
|
+ .price{
|
|
|
+ color: red;
|
|
|
+ font-size: 28upx;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.finish{
|