|
|
@@ -46,7 +46,6 @@
|
|
|
:ref="`orderRef${item.id}`"
|
|
|
:item="item"
|
|
|
:isScanEnv="isScanEnv"
|
|
|
- @printOrder="printOrder"
|
|
|
@directFh="directFh"
|
|
|
@fillNoFh="fillNoFh"
|
|
|
@shareOrder="shareOrder"
|
|
|
@@ -84,6 +83,21 @@
|
|
|
<view v-if="showFilterPanel" class="filter-overlay" @click="closeFilterPanel">
|
|
|
<view class="filter-panel" @click.stop>
|
|
|
<view class="filter-header">筛选订单</view>
|
|
|
+ <scroll-view class="filter-body" scroll-y>
|
|
|
+ <view class="filter-section">
|
|
|
+ <view class="filter-title">挂账</view>
|
|
|
+ <view class="filter-options">
|
|
|
+ <view
|
|
|
+ v-for="(item, index) in debtOptions"
|
|
|
+ :key="index"
|
|
|
+ class="filter-option"
|
|
|
+ :class="{ active: filterDebt === item.value }"
|
|
|
+ @click="onSelectDebt(index)"
|
|
|
+ >
|
|
|
+ {{ item.label }}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
<view class="filter-section">
|
|
|
<view class="filter-title">在线支付</view>
|
|
|
<view class="filter-options">
|
|
|
@@ -112,6 +126,21 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <view class="filter-section">
|
|
|
+ <view class="filter-title">片区</view>
|
|
|
+ <view class="filter-options">
|
|
|
+ <view class="filter-option" :class="{ active: filterDistId === 0 }" @click="onSelectDist(0)">全部</view>
|
|
|
+ <view
|
|
|
+ v-for="(item, index) in distList"
|
|
|
+ :key="index"
|
|
|
+ class="filter-option"
|
|
|
+ :class="{ active: filterDistId === item.id }"
|
|
|
+ @click="onSelectDist(item.id)"
|
|
|
+ >
|
|
|
+ {{ item.name }}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
<view class="filter-section">
|
|
|
<view class="filter-title">开单员工</view>
|
|
|
<view class="filter-options">
|
|
|
@@ -147,6 +176,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ </scroll-view>
|
|
|
<view class="filter-actions">
|
|
|
<button class="filter-action-btn clear-btn" @click="clearFilters">重置</button>
|
|
|
<button class="filter-action-btn confirm-btn" @click="confirmFilters">确定</button>
|
|
|
@@ -181,7 +211,7 @@ import AppWrapperEmpty from '@/components/app-wrapper-empty';
|
|
|
import ModalModule from '@/components/plugin/modal';
|
|
|
import { list } from '@/mixins';
|
|
|
import { mapGetters } from 'vuex';
|
|
|
-import { getListB, cloudPrintOrder, orderFh } from '@/api/order';
|
|
|
+import { getListB, orderFh } from '@/api/order';
|
|
|
import AppSearchModule from '@/components/module/app-search';
|
|
|
import DropShopSelect from '@/components/module/shopSelect';
|
|
|
import OrderItem from './components/OrderItem';
|
|
|
@@ -196,6 +226,7 @@ import {
|
|
|
} from '@/utils/orderShare';
|
|
|
import { getList } from '@/api/member';
|
|
|
import { getStaffList } from '@/api/staff';
|
|
|
+import { getAllDist } from '@/api/dist';
|
|
|
export default {
|
|
|
name: 'order',
|
|
|
components: {
|
|
|
@@ -213,7 +244,14 @@ export default {
|
|
|
...mapGetters(['getLoginInfo', 'getDictionariesInfo']),
|
|
|
...mapGetters({ dictInfo: 'getDictionariesInfo' }),
|
|
|
hasActiveFilters() {
|
|
|
- return this.filterOnlinePay !== -1 || this.filterBook !== -1 || this.filterShopAdminId !== 0 || this.filterSendType !== -1;
|
|
|
+ return (
|
|
|
+ this.filterDistId !== 0 ||
|
|
|
+ this.filterDebt !== -1 ||
|
|
|
+ this.filterOnlinePay !== -1 ||
|
|
|
+ this.filterBook !== -1 ||
|
|
|
+ this.filterShopAdminId !== 0 ||
|
|
|
+ this.filterSendType !== -1
|
|
|
+ );
|
|
|
}
|
|
|
},
|
|
|
data() {
|
|
|
@@ -279,11 +317,19 @@ export default {
|
|
|
pendingSharePayload: null,
|
|
|
singleShareOrderId: 0,
|
|
|
showFilterPanel: false,
|
|
|
+ distList: [],
|
|
|
staffList: [],
|
|
|
+ filterDistId: 0,
|
|
|
+ filterDebt: -1,
|
|
|
filterShopAdminId: 0,
|
|
|
filterBook: -1,
|
|
|
filterOnlinePay: -1,
|
|
|
filterSendType: -1,
|
|
|
+ debtOptions: [
|
|
|
+ { label: '全部', value: -1 },
|
|
|
+ { label: '挂账', value: 1 },
|
|
|
+ { label: '非挂账', value: 0 }
|
|
|
+ ],
|
|
|
onlinePayOptions: [
|
|
|
{ label: '全部', value: -1 },
|
|
|
{ label: '在线支付', value: 2 },
|
|
|
@@ -439,9 +485,17 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
init() {
|
|
|
+ this.loadDistList();
|
|
|
this.loadStaffList();
|
|
|
this.getOrderList();
|
|
|
},
|
|
|
+ loadDistList() {
|
|
|
+ getAllDist().then((res) => {
|
|
|
+ if (res.code == 1) {
|
|
|
+ this.distList = res.data.list || [];
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
loadStaffList() {
|
|
|
getStaffList().then((res) => {
|
|
|
if (res.code == 1) {
|
|
|
@@ -455,6 +509,15 @@ export default {
|
|
|
closeFilterPanel() {
|
|
|
this.showFilterPanel = false;
|
|
|
},
|
|
|
+ onSelectDist(id) {
|
|
|
+ this.filterDistId = id;
|
|
|
+ },
|
|
|
+ onSelectDebt(index) {
|
|
|
+ const item = this.debtOptions[index];
|
|
|
+ if (item) {
|
|
|
+ this.filterDebt = item.value;
|
|
|
+ }
|
|
|
+ },
|
|
|
onSelectOnlinePay(index) {
|
|
|
const item = this.onlinePayOptions[index];
|
|
|
if (item) {
|
|
|
@@ -477,6 +540,8 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
clearFilters() {
|
|
|
+ this.filterDistId = 0;
|
|
|
+ this.filterDebt = -1;
|
|
|
this.filterOnlinePay = -1;
|
|
|
this.filterBook = -1;
|
|
|
this.filterShopAdminId = 0;
|
|
|
@@ -499,22 +564,6 @@ export default {
|
|
|
this.resetList();
|
|
|
this.getOrderList();
|
|
|
},
|
|
|
- printOrder(item) {
|
|
|
- let that = this;
|
|
|
- uni.showLoading({ title: '打印中...' });
|
|
|
- cloudPrintOrder({ id: item.id }).then((res) => {
|
|
|
- uni.hideLoading();
|
|
|
- if (res.code == 1) {
|
|
|
- if (res.data.hasNoPrint == 1) {
|
|
|
- that.$util.confirmModal({ content: '请先设置打印机' }, () => {
|
|
|
- that.$util.pageTo({ url: '/admin/shop/print' });
|
|
|
- });
|
|
|
- } else {
|
|
|
- item.printNum++;
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
selectDateFn(val) {
|
|
|
this.searchTime = val.searchTime;
|
|
|
this.startTime = val.startTime;
|
|
|
@@ -548,6 +597,8 @@ export default {
|
|
|
this.searchTime = '';
|
|
|
this.startTime = '';
|
|
|
this.endTime = '';
|
|
|
+ this.filterDistId = 0;
|
|
|
+ this.filterDebt = -1;
|
|
|
this.filterOnlinePay = -1;
|
|
|
this.filterBook = -1;
|
|
|
this.filterShopAdminId = 0;
|
|
|
@@ -580,6 +631,8 @@ export default {
|
|
|
page: this.list.page,
|
|
|
searchType: this.searchType,
|
|
|
customId: this.customId,
|
|
|
+ customDistId: this.filterDistId,
|
|
|
+ debt: this.filterDebt,
|
|
|
shopAdminId: this.filterShopAdminId,
|
|
|
book: this.filterBook,
|
|
|
onlinePay: this.filterOnlinePay,
|
|
|
@@ -731,12 +784,19 @@ page {
|
|
|
background-color: rgba(0, 0, 0, 0.5);
|
|
|
}
|
|
|
.filter-panel {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
width: 100%;
|
|
|
max-height: 90vh;
|
|
|
- overflow-y: auto;
|
|
|
+ overflow: hidden;
|
|
|
border-radius: 0 0 24upx 24upx;
|
|
|
background: #fff;
|
|
|
}
|
|
|
+.filter-body {
|
|
|
+ flex: 1;
|
|
|
+ max-height: calc(90vh - 200upx);
|
|
|
+ overflow: hidden;
|
|
|
+}
|
|
|
.filter-header {
|
|
|
padding: 24upx 0;
|
|
|
text-align: center;
|
|
|
@@ -778,8 +838,13 @@ page {
|
|
|
font-weight: 700;
|
|
|
}
|
|
|
.filter-actions {
|
|
|
+ flex-shrink: 0;
|
|
|
display: flex;
|
|
|
padding: 30upx 40upx 40upx;
|
|
|
+ padding-bottom: calc(40upx + constant(safe-area-inset-bottom));
|
|
|
+ padding-bottom: calc(40upx + env(safe-area-inset-bottom));
|
|
|
+ border-top: 1upx solid #f0f0f0;
|
|
|
+ background: #fff;
|
|
|
}
|
|
|
.filter-action-btn {
|
|
|
flex: 1;
|