Commit 1b7faac8 by 李伟康

在历史记录页面添加门店订单筛选选项

1 parent 3b8b5a37
...@@ -40,6 +40,19 @@ ...@@ -40,6 +40,19 @@
</view> </view>
显示凭证 显示凭证
</view> </view>
<view
class="form-check flex"
@click="merchantOrder = !merchantOrder"
>
<view :class="['check-box flex',{'checked':merchantOrder}]">
<uni-icons
type="checkmarkempty"
:size="14"
color="#fff"
></uni-icons>
</view>
门店订单
</view>
</view> </view>
</view> </view>
<template v-if="list.length > 0"> <template v-if="list.length > 0">
...@@ -161,7 +174,8 @@ export default { ...@@ -161,7 +174,8 @@ export default {
customerInfo: {}, customerInfo: {},
focusIndex: -1, focusIndex: -1,
showphoto: false, showphoto: false,
formatList: [] formatList: [],
merchantOrder: true, //门店订单
} }
}, },
watch: { watch: {
...@@ -179,6 +193,18 @@ export default { ...@@ -179,6 +193,18 @@ export default {
this.scrollTop = 0 this.scrollTop = 0
}, 100) }, 100)
}, },
},
merchantOrder: {
immediate: true,
handler (newval) {
this.pageNum = 1
this.scrollTop = 1000
this.list = []
setTimeout(() => {
this.scrollTop = 0
this.search()
}, 100)
}
} }
}, },
computed: { computed: {
...@@ -188,7 +214,7 @@ export default { ...@@ -188,7 +214,7 @@ export default {
watchCustomerInfo () { watchCustomerInfo () {
return this.$store.state.user.customerInfo return this.$store.state.user.customerInfo
}, },
shopMerchantId(){ shopMerchantId () {
return uni.$storage.get('userInfo').shopMerchantId return uni.$storage.get('userInfo').shopMerchantId
} }
}, },
...@@ -210,19 +236,21 @@ export default { ...@@ -210,19 +236,21 @@ export default {
if (this.pageNum == 1) this.getQuotationList() if (this.pageNum == 1) this.getQuotationList()
}, },
async getQuotationList () { async getQuotationList () {
const { shopMerchantId, pageNum, pageSize } = this, const { shopMerchantId, pageNum, pageSize, merchantOrder } = this,
carModel = this.customerInfo.carModel carModel = this.customerInfo.carModel
try { try {
uni.showLoading({ uni.showLoading({
mask: true mask: true
}); });
let { list, total } = await uni.$api.boutiqueApi.getQuotationList({ let params = {
merchantId: shopMerchantId, merchantId:shopMerchantId,
pageNum, pageNum,
pageSize, pageSize,
carModel, carModel,
orderStatus: 3 orderStatus: 3,
}); merchantOrder
}
let { list, total } = await uni.$api.boutiqueApi.getQuotationList(params);
uni.hideLoading(); uni.hideLoading();
this.list = [...(pageNum == 1 ? [] : this.list), ...list]; this.list = [...(pageNum == 1 ? [] : this.list), ...list];
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!