|
|
|
@ -15,9 +15,8 @@ |
|
|
|
</div> |
|
|
|
<div class="rowItem"> |
|
|
|
<el-text style="width: 4vw;">所属地区</el-text> |
|
|
|
<el-select v-model="searchData.market" placeholder="请选择所属地区" style="width:10vw;" clearable> |
|
|
|
<el-option v-for="item in marketList" :key="item" :label="item" :value="item" /> |
|
|
|
</el-select> |
|
|
|
<el-cascader style="width: 9vw;" v-model="searchData.markets" :options="market" |
|
|
|
placeholder="请选择所属地区" clearable @change="handleMarketChange" /> |
|
|
|
</div> |
|
|
|
<!-- 地区财务固定显示付款币种,删除客服的订单状态 --> |
|
|
|
<div class="rowItem"> |
|
|
|
@ -637,6 +636,9 @@ const tableData = ref([]); |
|
|
|
const total = ref(0); |
|
|
|
const pageInfo = ref({ pageSize: 10, pageNum: 1 }); |
|
|
|
|
|
|
|
// 筛选地区树 |
|
|
|
const market = ref([]) |
|
|
|
|
|
|
|
// 搜索条件 |
|
|
|
const searchData = ref({}); |
|
|
|
const defaultTime = [new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 2, 1, 23, 59, 59)]; |
|
|
|
@ -873,6 +875,13 @@ const getlist = async () => { |
|
|
|
else if (activeTab.value === 'done') searchData.value.status = 46; |
|
|
|
else if (activeTab.value === 'reject') searchData.value.status = 2; |
|
|
|
|
|
|
|
// 地区处理 |
|
|
|
const markets = ref(null) |
|
|
|
if(searchData.value.markets) { |
|
|
|
markets.value = searchData.value.markets[searchData.value.markets.length - 1] |
|
|
|
console.log('地区转换', markets.value) |
|
|
|
} |
|
|
|
|
|
|
|
const result = await request({ |
|
|
|
url: '/cashCollection/selectCollection', |
|
|
|
data: { |
|
|
|
@ -885,7 +894,8 @@ const getlist = async () => { |
|
|
|
paymentCurrency: payCurrencySelect, |
|
|
|
submitterMarket: receivedMarket, |
|
|
|
goodsName: goodsName, |
|
|
|
market: MarketNameForId(searchData.value.market) |
|
|
|
// market: MarketNameForId(searchData.value.market) |
|
|
|
market:markets.value |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
@ -1260,6 +1270,7 @@ onMounted(async () => { |
|
|
|
//背景预加载 |
|
|
|
const bgImg = new Image(); |
|
|
|
bgImg.src = '/src/assets/receive-recall.png'; |
|
|
|
getMarket() |
|
|
|
}); |
|
|
|
|
|
|
|
// 2.10 未使用函数占位(避免报错) |
|
|
|
@ -1271,6 +1282,35 @@ const customUpload = () => { }; |
|
|
|
const handleDatePickerChange = () => { }; |
|
|
|
const disabledDate = () => false; |
|
|
|
const handleSortChange = () => { }; |
|
|
|
const getMarket = async function () { |
|
|
|
try { |
|
|
|
const result = await API({ |
|
|
|
|
|
|
|
url: '/market/selectMarket', |
|
|
|
}) |
|
|
|
console.log('看看地区树', result) |
|
|
|
|
|
|
|
const transformTree = (nodes) => { |
|
|
|
const allChildren = nodes.flatMap(node => node.children || []); |
|
|
|
|
|
|
|
return allChildren.map(child => { |
|
|
|
const grandchildren = child.children && child.children.length |
|
|
|
? transformTree([child]) |
|
|
|
: null; |
|
|
|
|
|
|
|
return { |
|
|
|
value: child.id, |
|
|
|
label: child.name, |
|
|
|
children: grandchildren |
|
|
|
}; |
|
|
|
}); |
|
|
|
}; |
|
|
|
market.value = transformTree(result.data) |
|
|
|
console.log('转换后的地区树==============', market.value) |
|
|
|
} catch (error) { |
|
|
|
console.log('请求失败', error) |
|
|
|
} |
|
|
|
} |
|
|
|
const handlePagination = (type, val) => { |
|
|
|
if (type === 'size') pageInfo.value.pageSize = val; |
|
|
|
else pageInfo.value.pageNum = val; |
|
|
|
|