|
|
@ -2,7 +2,7 @@ |
|
|
<view> |
|
|
<view> |
|
|
<uni-section class="mb-10" title="历史订单" type="line"> |
|
|
<uni-section class="mb-10" title="历史订单" type="line"> |
|
|
<view class="example-body"> |
|
|
<view class="example-body"> |
|
|
<uni-datetime-picker v-model="range" type="daterange" @change="dateChange" /> |
|
|
<uni-datetime-picker border='false' v-model="range" type="daterange" @change="dateChange" /> |
|
|
</view> |
|
|
</view> |
|
|
<view class="shop-choose"> |
|
|
<view class="shop-choose"> |
|
|
<view class="shop-name"> |
|
|
<view class="shop-name"> |
|
|
@ -23,14 +23,14 @@ |
|
|
</view> |
|
|
</view> |
|
|
<view class="uni-body"> |
|
|
<view class="uni-body"> |
|
|
<text class="cardText"> 营业额:</text> |
|
|
<text class="cardText"> 营业额:</text> |
|
|
<text class="priceText"> {{ item.realAmount }}</text> |
|
|
<text class="priceText"> {{ item.realAmount== null ?'暂无': item.realAmount}}</text> |
|
|
<text decode class="cardText"> {{ ' 欠款: ' }}</text> |
|
|
<text decode class="cardText"> {{ ' 欠款: ' }}</text> |
|
|
<text class="priceText">{{ item.noEarn }}</text> |
|
|
<text class="priceText">{{ item.noEarn== null ?'暂无': item.noEarn}}</text> |
|
|
</view> |
|
|
</view> |
|
|
<view class="uni-body"> |
|
|
<view class="uni-body"> |
|
|
<text class="cardText"> 订单状态:</text> |
|
|
<text class="cardText"> 订单状态:</text> |
|
|
{{ |
|
|
{{ |
|
|
item.status == 1 ? '拣货中' : item.status == 2 ? '已预定' : item.status == 3 ? '已作废' : item.status == 4 ? '已取货' : '已送达' |
|
|
item.status == 1 ? '拣货中' : item.status == 2 ? '已预定' : item.status == 3 ? '已作废' : item.status == 4 ? '已取货' :item.status == 6 ? '待配货': '已送达' |
|
|
}} |
|
|
}} |
|
|
</view> |
|
|
</view> |
|
|
<view class="floatRight"> 采购退货</view> |
|
|
<view class="floatRight"> 采购退货</view> |
|
|
@ -52,12 +52,12 @@ |
|
|
computed: mapState(['userId', 'mobile']), |
|
|
computed: mapState(['userId', 'mobile']), |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
range: ['2023-10-1', '2023-10-2'], |
|
|
range: [], |
|
|
name: '', |
|
|
name: '', |
|
|
shopList: [], |
|
|
shopList: [], |
|
|
list: ['采购单', '退货单'], |
|
|
list: ['采购单', '退货单'], |
|
|
current: 0, |
|
|
current: 0, |
|
|
userId:'', |
|
|
userId: '', |
|
|
shopId: '', |
|
|
shopId: '', |
|
|
bList: [], |
|
|
bList: [], |
|
|
query: { |
|
|
query: { |
|
|
@ -68,10 +68,10 @@ |
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
|
uni.hideHomeButton() //左上角HOME按钮 |
|
|
uni.hideHomeButton() //左上角HOME按钮 |
|
|
const date = this.formatDate(new Date(), 'YYYY-MM-DD') |
|
|
// const date = this.formatDate(new Date(), 'YYYY-MM-DD') |
|
|
this.query.startDate = date |
|
|
// this.query.startDate = date |
|
|
this.query.endDate = date |
|
|
// this.query.endDate = date |
|
|
this.range = [date, date] |
|
|
// this.range = [date, date] |
|
|
this.getShopList() |
|
|
this.getShopList() |
|
|
this.getAllList() |
|
|
this.getAllList() |
|
|
}, |
|
|
}, |
|
|
@ -83,9 +83,6 @@ |
|
|
this.getAllList() |
|
|
this.getAllList() |
|
|
} |
|
|
} |
|
|
if (index == 1) { |
|
|
if (index == 1) { |
|
|
this.getList() |
|
|
|
|
|
} |
|
|
|
|
|
if (index == 2) { |
|
|
|
|
|
this.getReturnList() |
|
|
this.getReturnList() |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
@ -100,19 +97,9 @@ |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
getList() { |
|
|
|
|
|
this.tui.request('/app/sale/listAll', 'post', { |
|
|
|
|
|
remarkSR:2, |
|
|
|
|
|
shopId: this.shopId, |
|
|
|
|
|
searchDateVo: this.query |
|
|
|
|
|
}, false, false, false).then(res => { |
|
|
|
|
|
if (res.code !== 200) return |
|
|
|
|
|
this.bList = res.result |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
getAllList() { |
|
|
getAllList() { |
|
|
this.tui.request('/app/sale/listAll', 'post', { |
|
|
this.tui.request('/app/sale/listAll', 'post', { |
|
|
remarkSR:2, |
|
|
remarkSR: 2, |
|
|
shopId: this.shopId, |
|
|
shopId: this.shopId, |
|
|
searchDateVo: this.query |
|
|
searchDateVo: this.query |
|
|
}, false, false, false).then(res => { |
|
|
}, false, false, false).then(res => { |
|
|
@ -122,7 +109,7 @@ |
|
|
}, |
|
|
}, |
|
|
getReturnList() { |
|
|
getReturnList() { |
|
|
this.tui.request('/app/sale/listAll', 'post', { |
|
|
this.tui.request('/app/sale/listAll', 'post', { |
|
|
remarkSR:3, |
|
|
remarkSR: 3, |
|
|
shopId: this.shopId, |
|
|
shopId: this.shopId, |
|
|
searchDateVo: this.query |
|
|
searchDateVo: this.query |
|
|
}, false, false, false).then(res => { |
|
|
}, false, false, false).then(res => { |
|
|
@ -130,9 +117,17 @@ |
|
|
this.bList = res.result.returnSaleList |
|
|
this.bList = res.result.returnSaleList |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
dateChange() { |
|
|
dateChange(e) { |
|
|
|
|
|
console.log(e) |
|
|
|
|
|
if(e.length == 0){ |
|
|
|
|
|
console.log("11111") |
|
|
|
|
|
this.query.startDate = '' |
|
|
|
|
|
this.query.endDate = '' |
|
|
|
|
|
}else{ |
|
|
this.query.startDate = this.range[0] |
|
|
this.query.startDate = this.range[0] |
|
|
this.query.endDate = this.range[1] |
|
|
this.query.endDate = this.range[1] |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
this.sectionChange(this.current) |
|
|
this.sectionChange(this.current) |
|
|
}, |
|
|
}, |
|
|
formatDate(date, fmt) { |
|
|
formatDate(date, fmt) { |
|
|
|