|
|
@@ -8,32 +8,17 @@
|
|
|
|
|
|
<script lang="ts">
|
|
|
import FilterOption from '@/common/components/filter/index.vue';
|
|
|
-import { defineComponent } from 'vue';
|
|
|
+import { defineComponent, reactive } from 'vue';
|
|
|
import { handleFilter, InputList, SelectList } from '@/common/setup/filter';
|
|
|
import { initData } from '@/common/export/table';
|
|
|
-import { ErmcpDeliveryGoodsDetailEx, ErmcpDeliveryGoods, Ermcp3Brand, Ermcp3Wrstandard } from '@/services/go/ermcp/goodsInfo/interface';
|
|
|
+import { ErmcpDeliveryGoodsDetailEx } from '@/services/go/ermcp/goodsInfo/interface';
|
|
|
import APP from '@/services';
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'spotmarket_price-filter-table',
|
|
|
components: { FilterOption },
|
|
|
setup(props, context) {
|
|
|
- initData(() => {
|
|
|
- const goodsList: ErmcpDeliveryGoodsDetailEx[] = APP.get('DeliveryGoodsList'),
|
|
|
- category: ErmcpDeliveryGoods[] = [], // 品种
|
|
|
- goods: Ermcp3Wrstandard[] = [], // 商品
|
|
|
- brand: Ermcp3Brand[] = []; // 品牌
|
|
|
-
|
|
|
- goodsList.forEach((el) => {
|
|
|
- category.push(el.data);
|
|
|
- goods.push(...el.gmlist);
|
|
|
- brand.push(...el.gblist);
|
|
|
- });
|
|
|
-
|
|
|
- debugger;
|
|
|
- });
|
|
|
-
|
|
|
- const select: SelectList[] = [
|
|
|
+ const select = reactive<SelectList[]>([
|
|
|
{
|
|
|
value: undefined,
|
|
|
key: 'deliverygoodsid',
|
|
|
@@ -63,8 +48,25 @@ export default defineComponent({
|
|
|
{ value: 3, lable: '暂定价' },
|
|
|
],
|
|
|
},
|
|
|
- ];
|
|
|
+ ]);
|
|
|
const input: InputList[] = [];
|
|
|
+
|
|
|
+ initData(() => {
|
|
|
+ const goodsList: ErmcpDeliveryGoodsDetailEx[] = APP.get('DeliveryGoodsList');
|
|
|
+ goodsList.forEach((el) => {
|
|
|
+ select[0].list.push({
|
|
|
+ value: el.data.deliverygoodsid,
|
|
|
+ lable: el.data.deliverygoodsname,
|
|
|
+ });
|
|
|
+
|
|
|
+ const gm = el.gmlist.map((item) => ({ value: item.wrstandardid, lable: item.wrstandardname }));
|
|
|
+ select[1].list.push(...gm);
|
|
|
+
|
|
|
+ const gb = el.gblist.map((item) => ({ value: item.brandid, lable: item.brandname }));
|
|
|
+ select[2].list.push(...gb);
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
return {
|
|
|
...handleFilter(select, input, context),
|
|
|
};
|