|
|
@@ -1,9 +1,42 @@
|
|
|
<template>
|
|
|
<!-- 过滤客户资料表格 -->
|
|
|
<Filter @update="update">
|
|
|
- <!-- <FilterOption :selectList="selectList"
|
|
|
- :inputList="[]"
|
|
|
- :fixedBtnList="fixedBtnList" /> -->
|
|
|
+ <a-select label-in-value
|
|
|
+ class="conditionSelect ml10"
|
|
|
+ style="width: 120px"
|
|
|
+ v-model:value="selectedDG"
|
|
|
+ @change="DGChange"
|
|
|
+ placeholder="全部现货品种">
|
|
|
+ <a-select-option v-for="item in DGList"
|
|
|
+ :key="item.data.deliverygoodsname">
|
|
|
+ {{item.data.deliverygoodsname}}
|
|
|
+ </a-select-option>
|
|
|
+ </a-select>
|
|
|
+ <a-select label-in-value
|
|
|
+ class="conditionSelect ml10"
|
|
|
+ style="width: 120px"
|
|
|
+ v-model:value="selectedGM"
|
|
|
+ @change="GBOrGMChange"
|
|
|
+ placeholder="全部品类">
|
|
|
+ <a-select-option v-for="item in gmlist"
|
|
|
+ :key="item.wrstandardname">
|
|
|
+ {{item.wrstandardname}}
|
|
|
+ </a-select-option>
|
|
|
+ </a-select>
|
|
|
+ <a-select label-in-value
|
|
|
+ class="conditionSelect ml10"
|
|
|
+ style="width: 120px"
|
|
|
+ v-model:value="selectedGB"
|
|
|
+ @change="GBOrGMChange"
|
|
|
+ placeholder="全部品牌">
|
|
|
+ <a-select-option v-for="item in gblist"
|
|
|
+ :key="item.brandname">
|
|
|
+ {{item.brandname}}
|
|
|
+ </a-select-option>
|
|
|
+ </a-select>
|
|
|
+ <a-button class="selectBtn">查询</a-button>
|
|
|
+ <a-button class="selectBtn"
|
|
|
+ @click="reset">重置</a-button>
|
|
|
</Filter>
|
|
|
</template>
|
|
|
|
|
|
@@ -17,6 +50,7 @@ import { QueryMiddleGoodsDetail } from '@/services/go/ermcp/goodsInfo';
|
|
|
import { SelectOption } from '@/common/setup/filter/interface';
|
|
|
import Filter from '../../../components/filter/index.vue';
|
|
|
import { TypeAndTime } from '@/views/report/interface';
|
|
|
+import { handleDG } from '@/views/report/setup';
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'exposure-filter-table',
|
|
|
@@ -25,60 +59,18 @@ export default defineComponent({
|
|
|
function update(value: TypeAndTime) {
|
|
|
context.emit('update', value);
|
|
|
}
|
|
|
- const select: SelectList[] = [
|
|
|
- {
|
|
|
- value: undefined,
|
|
|
- key: 'userId',
|
|
|
- placeholder: '全部交易用户',
|
|
|
- list: [],
|
|
|
- },
|
|
|
- {
|
|
|
- value: undefined,
|
|
|
- key: 'warehousetype',
|
|
|
- placeholder: '全部套保品种',
|
|
|
- list: [],
|
|
|
- },
|
|
|
- ];
|
|
|
- const loading = ref<boolean>(false);
|
|
|
- // 交易用户
|
|
|
- const { tableList: userList, queryTable } = handlerManagerList(loading, 2);
|
|
|
- const { selectList, inputList, fixedBtnList, updateSelected } = handleFilter(select, [], context);
|
|
|
- // 获取交易用户
|
|
|
- function getUserList() {
|
|
|
- return queryTable().then(() => {
|
|
|
- const result: SelectOption[] = [];
|
|
|
- userList.value.forEach((e) => {
|
|
|
- e.userlist.forEach((el) => {
|
|
|
- result.push({ value: el.loginid, lable: `${el.loginname}-${el.logincode}` });
|
|
|
- });
|
|
|
- });
|
|
|
- return result;
|
|
|
- });
|
|
|
- }
|
|
|
- // 获取套保品种
|
|
|
- function getTBList() {
|
|
|
- return QueryMiddleGoodsDetail().then((res) => {
|
|
|
- const result: SelectOption[] = [];
|
|
|
- res.forEach((e) => {
|
|
|
- const { isvalid, middlegoodsname, middlegoodsid } = e.mg;
|
|
|
- if (isvalid) {
|
|
|
- result.push({ value: middlegoodsid, lable: middlegoodsname });
|
|
|
- }
|
|
|
- });
|
|
|
- return result;
|
|
|
- });
|
|
|
- }
|
|
|
- // initData(() => {
|
|
|
- // Promise.all([getUserList(), getTBList()]).then((res) => {
|
|
|
- // select[0].list = res[0]; // 交易用户
|
|
|
- // select[1].list = res[1]; // 套保品种
|
|
|
- // updateSelected(select);
|
|
|
- // });
|
|
|
- // });
|
|
|
+ const { DGList, gblist, gmlist, selectedDG, selectedGB, selectedGM, DGChange, GBOrGMChange, reset } = handleDG(context);
|
|
|
return {
|
|
|
- selectList,
|
|
|
- inputList,
|
|
|
- fixedBtnList,
|
|
|
+ DGList,
|
|
|
+ gblist,
|
|
|
+ gmlist,
|
|
|
+ DGChange,
|
|
|
+ GBOrGMChange,
|
|
|
+ reset,
|
|
|
+ selectedDG,
|
|
|
+ selectedGB,
|
|
|
+ selectedGM,
|
|
|
+ update,
|
|
|
};
|
|
|
},
|
|
|
});
|