|
|
|
@ -1,25 +1,31 @@ |
|
|
|
<template> |
|
|
|
<view> |
|
|
|
<u-alert description="点击可跳转至入库单" type="primary"></u-alert> |
|
|
|
<view class="ulList" v-if="list.length > 0"> |
|
|
|
<ul> |
|
|
|
<li v-for="item in list" @tap="gotoDetail(item.id)"> |
|
|
|
<uni-card :title="item.id == null ?'暂无':item.id" :sub-title="item.createTime == null ?'暂无':item.createTime" :extra="'共'+(item.totalAmount == null ?'暂无':item.totalAmount) + '件'" |
|
|
|
thumbnail="/static/images/dingdan/dd1.png"> |
|
|
|
<view class="uni-body"><text class="cardText">销售员:</text> {{item.createBy == null ?'暂无':item.createBy}}</view> |
|
|
|
<view class="uni-body"> <text class="cardText"> 总成本:</text> <text class="priceText"> |
|
|
|
{{item.shouldPay == null ?'暂无':item.shouldPay}} </text> <text decode class="cardText"> |
|
|
|
{{' 欠款: '}} </text> <text class="priceText">{{item.noPay == null ?'暂无':item.noPay}} |
|
|
|
</text></view> |
|
|
|
<view class="uni-body"> <text class="cardText"> |
|
|
|
订单状态:</text>{{item.inStorageStatus == 0 ?'未入库' :'已入库'}} |
|
|
|
</view> |
|
|
|
<view v-if="item.inStorageStatus== 0" class="return-price" @tap="returnPrice(item)">更新</view> |
|
|
|
</uni-card> |
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
<u-loadmore :status="status" /> |
|
|
|
</view> |
|
|
|
<u-alert description="点击可跳转至入库单" type="primary"></u-alert> |
|
|
|
<view class="ulList" v-if="list.length > 0"> |
|
|
|
<ul> |
|
|
|
<li v-for="item in list" @tap="returnPrice(item)"> |
|
|
|
<uni-card :title="item.id == null ?'暂无':item.id" |
|
|
|
:sub-title="item.createTime == null ?'暂无':item.createTime" |
|
|
|
:extra="'共'+(item.totalAmount == null ?'暂无':item.totalAmount) + '件'" |
|
|
|
thumbnail="/static/images/dingdan/dd1.png"> |
|
|
|
<view class="uni-body"><text class="cardText"> |
|
|
|
销售员:</text>{{item.createBy == null ?'暂无':item.createBy}} |
|
|
|
</view> |
|
|
|
<view class="uni-body" v-if="type==0"> |
|
|
|
<text class="cardText">总成本:</text> |
|
|
|
<text class="priceText">{{item.shouldPay == null ?'暂无':item.shouldPay}} </text> |
|
|
|
<text decode class="cardText">{{' 欠款: '}} </text> |
|
|
|
<text class="priceText">{{item.noPay == null ?'暂无':item.noPay}}</text> |
|
|
|
</view> |
|
|
|
<view class="uni-body"> |
|
|
|
<text class="cardText">订单状态:</text>{{item.inStorageStatus == 0 ?'未入库' :'已入库'}} |
|
|
|
</view> |
|
|
|
<view v-if="item.inStorageStatus== 0 && type==0" class="return-price" @tap="returnPrice(item)">更新</view> |
|
|
|
</uni-card> |
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
<u-loadmore :status="status" /> |
|
|
|
</view> |
|
|
|
<u-empty v-else mode="order" margin-top="200"></u-empty> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
@ -35,33 +41,35 @@ |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
list: [], |
|
|
|
inStorageStatus:'', |
|
|
|
supplierName:'', |
|
|
|
startDate:'', |
|
|
|
endDate:'' |
|
|
|
// status: 'loadmore', |
|
|
|
// page: 1, |
|
|
|
list: [], |
|
|
|
inStorageStatus: '', |
|
|
|
supplierName: '', |
|
|
|
startDate: '', |
|
|
|
endDate: '', |
|
|
|
type: '' |
|
|
|
// status: 'loadmore', |
|
|
|
// page: 1, |
|
|
|
// totalPages: 0, |
|
|
|
} |
|
|
|
}, |
|
|
|
// onReachBottom() { |
|
|
|
// if (this.page >= this.totalPages) return; |
|
|
|
// this.status = 'loading'; |
|
|
|
// this.page = ++this.page; |
|
|
|
// this.getList(); |
|
|
|
}, |
|
|
|
// onReachBottom() { |
|
|
|
// if (this.page >= this.totalPages) return; |
|
|
|
// this.status = 'loading'; |
|
|
|
// this.page = ++this.page; |
|
|
|
// this.getList(); |
|
|
|
// }, |
|
|
|
onLoad(option) { |
|
|
|
onLoad(option) { |
|
|
|
this.inStorageStatus = option.inStorageStatus || '' |
|
|
|
this.getList() |
|
|
|
this.type = uni.getStorageSync('type') |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getList() { |
|
|
|
this.tui.request("/app/purchase/list", "POST", { |
|
|
|
inStorageStatus:this.inStorageStatus, |
|
|
|
supplierName:this.supplierName, |
|
|
|
startDate:this.startDate, |
|
|
|
endDate:this.endDate |
|
|
|
inStorageStatus: this.inStorageStatus, |
|
|
|
supplierName: this.supplierName, |
|
|
|
startDate: this.startDate, |
|
|
|
endDate: this.endDate |
|
|
|
}, false, false).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
this.list = res.result |
|
|
|
@ -69,49 +77,50 @@ |
|
|
|
this.tui.toast(res.message) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
returnPrice(item){ |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/pages/index/waitStorageDetail?id='+ item.id |
|
|
|
}) |
|
|
|
}, |
|
|
|
returnPrice(item) { |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/pages/index/waitStorageDetail?id=' + item.id |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
<style scoped lang="scss"> |
|
|
|
.ulList { |
|
|
|
ul { |
|
|
|
li { |
|
|
|
font-size: 12px; |
|
|
|
|
|
|
|
.floatRight { |
|
|
|
float: right; |
|
|
|
padding: 14rpx; |
|
|
|
color: $u-primary; |
|
|
|
font-size: 26upx; |
|
|
|
} |
|
|
|
|
|
|
|
.cardText { |
|
|
|
font-size: 12px; |
|
|
|
} |
|
|
|
|
|
|
|
.priceText { |
|
|
|
color: $u-primary; |
|
|
|
font-size: 14px; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
.return-price{ |
|
|
|
position: absolute; |
|
|
|
bottom: 30rpx; |
|
|
|
right: 30rpx; |
|
|
|
background: #5fd9ee; |
|
|
|
color: #fff; |
|
|
|
width: 80rpx; |
|
|
|
height: 60rpx; |
|
|
|
line-height: 60rpx; |
|
|
|
text-align: center; |
|
|
|
border-radius: 10px; |
|
|
|
.ulList { |
|
|
|
ul { |
|
|
|
li { |
|
|
|
font-size: 12px; |
|
|
|
|
|
|
|
.floatRight { |
|
|
|
float: right; |
|
|
|
padding: 14rpx; |
|
|
|
color: $u-primary; |
|
|
|
font-size: 26upx; |
|
|
|
} |
|
|
|
|
|
|
|
.cardText { |
|
|
|
font-size: 12px; |
|
|
|
} |
|
|
|
|
|
|
|
.priceText { |
|
|
|
color: $u-primary; |
|
|
|
font-size: 14px; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.return-price { |
|
|
|
position: absolute; |
|
|
|
bottom: 30rpx; |
|
|
|
right: 30rpx; |
|
|
|
background: #5fd9ee; |
|
|
|
color: #fff; |
|
|
|
width: 80rpx; |
|
|
|
height: 60rpx; |
|
|
|
line-height: 60rpx; |
|
|
|
text-align: center; |
|
|
|
border-radius: 10px; |
|
|
|
} |
|
|
|
</style> |