【缺陷修复】分销订单查询状态携带

pull/128/head
puhui999 2024-12-06 15:05:14 +08:00
parent bfde5df0cd
commit cde0de43ff
1 changed files with 12 additions and 8 deletions

View File

@ -72,10 +72,9 @@
<script setup> <script setup>
import sheep from '@/sheep'; import sheep from '@/sheep';
import { onLoad, onReachBottom } from '@dcloudio/uni-app'; import { onLoad, onPageScroll, onReachBottom } from '@dcloudio/uni-app';
import { reactive } from 'vue'; import { reactive } from 'vue';
import _ from 'lodash-es'; import _ from 'lodash-es';
import { onPageScroll } from '@dcloudio/uni-app';
import { resetPagination } from '@/sheep/util'; import { resetPagination } from '@/sheep/util';
import BrokerageApi from '@/sheep/api/trade/brokerage'; import BrokerageApi from '@/sheep/api/trade/brokerage';
import { fen2yuan } from '../../sheep/hooks/useGoods'; import { fen2yuan } from '../../sheep/hooks/useGoods';
@ -104,15 +103,15 @@
const tabMaps = [ const tabMaps = [
{ {
name: '全部', name: '全部',
value: 'all', value: -1,
}, },
{ {
name: '待结算', name: '待结算',
value: '0', // value: 0, //
}, },
{ {
name: '已结算', name: '已结算',
value: '1', // value: 1, //
}, },
]; ];
@ -126,12 +125,17 @@
// //
async function getOrderList() { async function getOrderList() {
state.loadStatus = 'loading'; state.loadStatus = 'loading';
let { code, data } = await BrokerageApi.getBrokerageRecordPage({ const tab = tabMaps[state.currentTab];
const queryParams = {
pageSize: state.pagination.pageSize, pageSize: state.pagination.pageSize,
pageNo: state.pagination.pageNo, pageNo: state.pagination.pageNo,
bizType: 1, // 广 bizType: 1, // 广
status: state.currentTab > 0 ? state.currentTab : undefined, status: tab.value,
}); }
if (tab.value < 0) {
delete queryParams.status;
}
const { code, data } = await BrokerageApi.getBrokerageRecordPage(queryParams);
if (code !== 0) { if (code !== 0) {
return; return;
} }