You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
157 lines
4.9 KiB
157 lines
4.9 KiB
<template>
|
|
<view>
|
|
<view class="search">
|
|
<uni-datetime-picker style="margin-bottom:10px;" v-model="range" type="daterange" />
|
|
<u-search placeholder="输入收货人/货号/商品名称/供应商查询" v-model="keyword" @search="searchList" bg-color="#fff"
|
|
:show-action="false" style="margin-top:10px;" border-color="#afd9ee"></u-search>
|
|
</view>
|
|
<view class="ulList" v-if="inventoryList.length > 0">
|
|
<ul>
|
|
<li v-for="item in inventoryList" @tap="gotoDetail(item.id)">
|
|
<uni-card :title="item.userName == null ?'暂无':item.userName" :sub-title="item.createTime == null ?'暂无':item.createTime" :extra="'数量:'+(item.productCount == null ?'暂无':item.productCount)"
|
|
:thumbnail="item.saleDetailDTOList[0].productPicture">
|
|
<view class="uni-body"><text class="cardText">销售员:</text> {{item.createByName == null ?'暂无':item.createByName}}</view>
|
|
<view class="uni-body"> <text class="cardText"> 营业额:</text> <text class="priceText">
|
|
{{item.realAmount == null ?'暂无':item.realAmount}} </text> <text decode class="cardText">
|
|
{{' 欠款: '}} </text> <text class="priceText">{{item.noEarn == null ?'暂无':item.noEarn}}
|
|
</text></view>
|
|
<view class="uni-body"> <text class="cardText">
|
|
订单状态:</text>{{item.status == 0 ?'待抢单' :item.status == 1 ?'待取货' :item.status == 3 ?'待送达' :item.status == 4 ?'已完成' :item.status == 5 ?'下游客户待退货' :item.status == 00 ?'退货待抢单' :item.status == 01 ?'退货待取货' :item.status == 03 ?'退货待送达' :item.status == 04 ?'待确认退货' :item.status == 6 ?'待配货' :'挂单'}}
|
|
</view>
|
|
<view class="floatRight" v-if="item.status == 6" @tap.stop="goSaleGoods(item)">去开单</view>
|
|
<!-- <view class="floatRight" v-if="type =='order'">物流信息 </view> -->
|
|
</uni-card>
|
|
</li>
|
|
</ul>
|
|
<u-loadmore :status="status" />
|
|
</view>
|
|
<u-empty v-else mode="order" margin-top="200"></u-empty>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
keyword: '',
|
|
type: '',
|
|
inventoryList: [],
|
|
status: 'loadmore',
|
|
page: 1,
|
|
totalPages: 0,
|
|
// type:'',
|
|
};
|
|
},
|
|
onLoad(options) {
|
|
this.type = options.type;
|
|
this.listStatus = options.listStatus
|
|
|
|
},
|
|
onShow(){
|
|
this.getOrderInfoList()
|
|
},
|
|
onReachBottom() {
|
|
if (this.page >= this.totalPages) return;
|
|
this.status = 'loading';
|
|
this.page = ++this.page;
|
|
this.getOrderInfoList();
|
|
},
|
|
methods: {
|
|
gotoDetail(id) {
|
|
uni.navigateTo({
|
|
url: '/pages/index/orderDetail?id=' + id
|
|
})
|
|
},
|
|
searchList() {
|
|
this.page = 1;
|
|
this.inventoryList = [];
|
|
this.getOrderInfoList()
|
|
},
|
|
// 订单查询
|
|
getOrderInfoList() {
|
|
this.status = 'loading';
|
|
this.tui.request("/app/sale/listPages", "POST", {
|
|
pageVo: {
|
|
pageSize: 10,
|
|
pageNumber: this.page
|
|
},
|
|
status:this.listStatus
|
|
}, false, false).then((res) => {
|
|
this.status = 'nomore';
|
|
if (res.code == 200) {
|
|
if (this.page == 1) {
|
|
this.inventoryList = res.result.records
|
|
} else {
|
|
this.inventoryList = [...this.inventoryList, ...res.result.records]
|
|
}
|
|
this.totalPages = res.result.pages
|
|
} else {
|
|
this.tui.toast(res.message)
|
|
}
|
|
}).catch((res) => {})
|
|
},
|
|
//带参数跳转到开单页
|
|
goSaleGoods(item) {
|
|
let dataList = []
|
|
for (let i=0;i<item.saleDetailDTOList.length;i++) {
|
|
let obj = {}
|
|
obj.saleDetailQueryDTO = item.saleDetailDTOList[i].stockLogList1
|
|
obj.id = item.saleDetailDTOList[i].productId
|
|
obj.lsprice = item.saleDetailDTOList[i].price
|
|
obj.num = item.saleDetailDTOList[i].productCount
|
|
obj.price = item.saleDetailDTOList[i].discountAmount
|
|
obj.productName = item.saleDetailDTOList[i].productName
|
|
obj.productPicture = item.saleDetailDTOList[i].productPicture+'?time='+new Date().getTime()
|
|
obj.productSn = item.saleDetailDTOList[i].productSn
|
|
obj.wholesalePrice = item.saleDetailDTOList[i].wholesalePrice
|
|
obj.saleId = item.saleDetailDTOList[i].saleId
|
|
obj.remark = item.remark
|
|
dataList.push(obj)
|
|
}
|
|
item.name = item.userName;
|
|
uni.setStorageSync('khName',JSON.stringify(item))
|
|
uni.setStorageSync('carList1',JSON.stringify(dataList))
|
|
uni.switchTab({
|
|
url: '/pages/inventory/goodsList1'
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.search {
|
|
padding: 20upx;
|
|
background-color: #fff;
|
|
position: fixed;
|
|
top: 0;
|
|
z-index: 100;
|
|
width: 100%;
|
|
background-color: #fff;
|
|
}
|
|
.ulList {
|
|
margin-top: 200upx;
|
|
|
|
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;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|