Quellcode durchsuchen

Merge remote-tracking branch 'origin/master'

yu jie vor 4 Jahren
Ursprung
Commit
9bf3cc61fd

+ 68 - 3
src/assets/styles/mixin.less

@@ -1004,11 +1004,11 @@
     border: 0;
     color: @m-white0;
     font-size: 14px;
-    background: linear-gradient(0deg, @m-red0 0%, @m-red1 99%);
+    background: linear-gradient(0deg, @m-red9 0%, @m-red10 99%);
     .rounded-corners(3px);
     &:hover,
     &:focus {
-        background: linear-gradient(0deg, @m-red0-hover 0%, @m-red1-hover 99%);
+        background: linear-gradient(0deg, @m-red9-hover 0%, @m-red10-hover 99%);
         color: rgba(@m-white0, 0.8);
         border: 0;
     }
@@ -1535,7 +1535,72 @@
         text-align: right;
     }
 }
-
+.ant-collapse.futureCollapse.ant-collapse-borderless {
+    background: transparent;
+    .ant-collapse-item {
+        margin-top: 10px;
+        background: @m-black15;
+        border: 1px solid @m-blue3;
+        .rounded-corners(3px);
+        .ant-collapse-header {
+            color: @m-grey17;
+            font-size: 14px;
+            border-bottom: 0;
+            padding: 0;
+            line-height: 43px;
+            .ant-collapse-arrow {
+                fill: @m-grey17;
+                width: 16px;
+                height: 16px;
+                font-size: 16px;
+                left: 0;
+            }
+            .ant-row.contRow {
+                width: 100%;
+                // height: 40px;
+                line-height: 40px;
+                font-size: 16px;
+                color: @m-white1;
+                margin-bottom: 10px;
+                // background: @m-black15;
+                border: 0 !important;
+                // border-radius: 3px;
+                padding-left: 14px;
+                padding-right: 12px;
+                .ant-col:last-child {
+                    text-align: right;
+                }
+                .ant-col:first-child {
+                    text-align: left;
+                }
+            }
+            .contRow:first-child {
+                margin-top: 0 !important;
+            }
+            .contRow:last-child {
+                margin-bottom: 0 !important;
+            }
+        }
+        .ant-collapse-content {
+            .ant-collapse-content-box {
+                padding: 0 0 0 30px;
+                background-color: transparent;
+                .btn-list {
+                    width: calc(100% - 10px);
+                    justify-content: flex-end;
+                    padding-right: 10px;
+                    padding-bottom: 10px;
+                    .operBtn.ant-btn {
+                        margin-top: 0;
+                        margin-bottom: 0;
+                        height: 26px;
+                        line-height: 26px;
+                    }
+                }
+            }
+        }
+    }
+}
 // 输入框自动填充背景色和字体颜色
 input:-webkit-autofill,
 textarea:-webkit-autofill,

+ 4 - 0
src/assets/styles/variables.less

@@ -126,6 +126,10 @@
 @m-red6: #422b0d;
 @m-red7: #f52b2b;
 @m-red8: #f12a2d;
+@m-red9: #FF5C6F;
+@m-red9-hover: rgba(@m-red9, .8);
+@m-red10: #FB7F75;
+@m-red10-hover: rgba(@m-red10, .8);
 
 @m-yellow0: #FF9600;
 @m-yellow1: #FC9618;

+ 4 - 5
src/services/bus/goods.ts

@@ -29,21 +29,20 @@ export function getQuoteDayInfoByCodeFindPrice(goodsCode: string) {
     const goods = getGoodsByCode(goodsCode);
     let result: number | string = '--';
     if (goods) {
-        const n = Math.pow(10, goods.decimalplace);
         const quoteData = getQuoteDayInfoByCode(goodsCode);
         // 期货合约取价顺序:现价->实时结算价->昨结算价
         if (quoteData) {
             if (quoteData.last) {
-                result = quoteData.last / n;
+                result = quoteData.last;
             } else if (quoteData.settle) {
-                result = quoteData.settle / n;
+                result = quoteData.settle;
             } else if (quoteData.presettle) {
-                result = quoteData.presettle / n;
+                result = quoteData.presettle;
             } else {
                 result = '--'
             }
         }
-        result = typeof result === 'number' ? Number(result.toFixed(goods?.decimalplace)) : result;
+        // result = typeof result === 'number' ? Number(result.toFixed(goods?.decimalplace)) : result;
     }
     return result
 }

+ 83 - 80
src/views/information/account_info/list/account_info_futures/index.vue

@@ -1,94 +1,97 @@
 <template>
-  <!-- 期货账户 -->
-  <div class="account_info_futures"
-       :loading="loading">
-    <filterCustomTable @search="search"></filterCustomTable>
-    <div class="tltLeft">
-      <span class="blue">
-        <svg class="icon svg-icon"
-             aria-hidden="true">
-          <use xlink:href="#icon-shuzhuangtu"></use>
-        </svg>
-        {{getUserName()}}
-      </span>
-      <BtnList :btnList="firstBtn" />
-
-    </div>
-    <a-collapse class="spotCollapse"
-                v-for="(item, i) in tableList"
-                :key="i + '11'"
-                :bordered="false">
-      <template #expandIcon="props">
-        <svg class="icon svg-icon"
-             aria-hidden="true"
-             v-if="props.isActive == 0">
-          <use xlink:href="#icon-shouqi1"></use>
-        </svg>
-        <svg class="icon svg-icon"
-             aria-hidden="true"
-             v-else>
-          <use xlink:href="#icon-shouqi2"></use>
-        </svg>
-      </template>
-      <a-collapse-panel>
-        <template #header>
-          <a-row class="headRow">
-            <a-col :span="12">{{item.mainAcc.accountname}} {{ '-' + item.mainAcc.hedgeaccountcode}}
-              ({{item.subacclist.length}}){{item.mainAcc.fcname}}</a-col>
-            <a-col :span="12">
-              <BtnList :btnList="secondBtn"
-                       @onClick="secondeClick(item)" />
-            </a-col>
-          </a-row>
-        </template>
-        <a-collapse class="busyCollapse"
-                    accordion
-                    :bordered="false">
-          <a-collapse-panel :show-arrow="false"
-                            v-for="(sub, i) in item.subacclist"
-                            :key="i + '11'">
-            <template #header>
-              <a-row class="contRow">
-                <a-col :span="12">{{sub.accountname}}-{{sub.accountid}}</a-col>
-                <a-col :span="12">{{getTaAccountStatus(sub.tradestatus)}}</a-col>
-              </a-row>
+    <!-- 期货账户 -->
+    <div class="account_info_futures" :loading="loading">
+        <filterCustomTable @search="search"></filterCustomTable>
+        <div class="tltLeft">
+            <span class="blue">
+                <svg class="icon svg-icon" aria-hidden="true">
+                    <use xlink:href="#icon-shuzhuangtu" />
+                </svg>
+                {{getUserName()}}
+            </span>
+            <BtnList :btnList="firstBtn" />
+        </div>
+        <a-collapse
+            class="spotCollapse"
+            v-for="(item, i) in tableList"
+            :key="i + '11'"
+            :bordered="false"
+        >
+            <template #expandIcon="props">
+                <svg class="icon svg-icon" aria-hidden="true" v-if="props.isActive == 0">
+                    <use xlink:href="#icon-shouqi1" />
+                </svg>
+                <svg class="icon svg-icon" aria-hidden="true" v-else>
+                    <use xlink:href="#icon-shouqi2" />
+                </svg>
             </template>
-            <BtnList :btnList="getBtnList(sub.tradestatus)"
-                     @onClick="thirdClick(item, sub)" />
-          </a-collapse-panel>
+            <a-collapse-panel>
+                <template #header>
+                    <a-row class="headRow">
+                        <a-col :span="12">
+                            {{item.mainAcc.accountname}} {{ '-' + item.mainAcc.hedgeaccountcode}}
+                            ({{item.subacclist.length}}){{item.mainAcc.fcname}}
+                        </a-col>
+                        <a-col :span="12">
+                            <BtnList :btnList="secondBtn" @onClick="secondeClick(item)" />
+                        </a-col>
+                    </a-row>
+                </template>
+                <a-collapse class="futureCollapse" accordion :bordered="false">
+                    <a-collapse-panel
+                        :show-arrow="false"
+                        v-for="(sub, i) in item.subacclist"
+                        :key="i + '11'"
+                    >
+                        <template #header>
+                            <a-row class="contRow">
+                                <a-col :span="12">{{sub.accountname}}-{{sub.accountid}}</a-col>
+                                <a-col :span="12">{{getTaAccountStatus(sub.tradestatus)}}</a-col>
+                            </a-row>
+                        </template>
+                        <BtnList
+                            :btnList="getBtnList(sub.tradestatus)"
+                            @onClick="thirdClick(item, sub)"
+                        />
+                    </a-collapse-panel>
+                </a-collapse>
+            </a-collapse-panel>
         </a-collapse>
-      </a-collapse-panel>
-    </a-collapse>
-    <Add @refresh="queryTable" />
-    <AddChild :selectedData="firstData"
-              :userList="userList"
-              :marginList="marginList"
-              :feeList="feeList"
-              @updateTrader="queryUserList"
-              @refresh="queryTable" />
-    <Modify :selectedData="firstData"
-            @refresh="queryTable" />
-    <ModifyChild @refresh="queryTable"
-                 :userList="userList"
-                 :marginList="marginList"
-                 :feeList="feeList"
-                 :secondeData="secondeData"
-                 :selectedData="firstData" />
-    <Detail :selectedData="firstData"
+        <Add @refresh="queryTable" />
+        <AddChild
+            :selectedData="firstData"
+            :userList="userList"
+            :marginList="marginList"
+            :feeList="feeList"
+            @updateTrader="queryUserList"
+            @refresh="queryTable"
+        />
+        <Modify :selectedData="firstData" @refresh="queryTable" />
+        <ModifyChild
+            @refresh="queryTable"
+            :userList="userList"
+            :marginList="marginList"
+            :feeList="feeList"
+            :secondeData="secondeData"
+            :selectedData="firstData"
+        />
+        <Detail
+            :selectedData="firstData"
             :secondeData="secondeData"
             :userList="userList"
             :marginList="marginList"
-            :feeList="feeList" />
-    <Cancel @refresh="queryTable"
+            :feeList="feeList"
+        />
+        <Cancel
+            @refresh="queryTable"
             :userList="userList"
             :marginList="marginList"
             :feeList="feeList"
             :secondeData="secondeData"
-            :selectedData="firstData" />
-    <Credit @refresh="queryTable"
             :selectedData="firstData"
-            :secondeData="secondeData" />
-  </div>
+        />
+        <Credit @refresh="queryTable" :selectedData="firstData" :secondeData="secondeData" />
+    </div>
 </template>
 
 <script lang="ts">

+ 7 - 1
src/views/information/goods/components/filterTable/index.vue

@@ -18,9 +18,15 @@ export default defineComponent({
     components: {
         FilterOption,
     },
+    props: {
+        name: {
+            type: String,
+            default: '现货品种',
+        },
+    },
     setup(props, context) {
         const select: SelectList[] = [];
-        const input: InputList[] = [{ value: '', placeholder: '模糊搜索账户', key: 'nickname' }];
+        const input: InputList[] = [{ value: '', placeholder: `模糊搜索${props.name}`, key: 'nickname' }];
         return {
             ...handleFilter(select, input, context),
         };

+ 31 - 5
src/views/information/goods/list/hedging-variety/index.vue

@@ -2,11 +2,12 @@
   <!-- 套保品种 -->
   <div class="hedging-variety spot-variety"
        :loading="loading">
-    <filterCustomTable @search="search">
+    <filterCustomTable @search="search"
+                       :name="'套保品种'">
     </filterCustomTable>
     <div class="spotTableCont">
       <div class="leftSpot">
-        <leftMenu :menuList="menuList"
+        <leftMenu :menuList="filterMenu()"
                   :path="'goods_info_hedge_normal'"
                   @chooseMenu="chooseDG"></leftMenu>
       </div>
@@ -21,7 +22,7 @@
 </template>
 
 <script lang="ts">
-import { defineComponent } from 'vue';
+import { defineComponent, ref } from 'vue';
 import filterCustomTable from '@/views/information/goods/components/filterTable/index.vue';
 import leftMenu from '@/views/information/goods/components/leftMenu/index.vue';
 import RightHedging from '../../components/rightHedging/index.vue';
@@ -29,6 +30,7 @@ import { openModal } from '@/common/setup/modal/index';
 import { initData } from '@/common/methods/index';
 import AddGoods from '@/views/information/goods/components/add/index.vue';
 import { handleMG } from './setup';
+import { MenuList } from '@/services/go/ermcp/goodsInfo/interface';
 
 export default defineComponent({
     name: 'hedging-variety',
@@ -40,12 +42,36 @@ export default defineComponent({
     },
     setup() {
         const { loading, menuList, isNormal, selctedMG, queryMG, chooseDG, updateDG } = handleMG();
-
+        const cacheSearch = ref<string>('');
+        function filterMenu() {
+            if (cacheSearch.value) {
+                const result: MenuList[] = [];
+                menuList.value.forEach((el, i) => {
+                    const children: MenuList[] = [];
+                    el.children?.forEach((e) => {
+                        if (e.title.includes(cacheSearch.value)) {
+                            children.push(e);
+                        }
+                    });
+                    result.push({ key: el.key, title: el.title, children });
+                });
+                return result;
+            } else {
+                return menuList.value;
+            }
+        }
+        function search(value: any) {
+            if (value && value.nickname && value.nickname.length) {
+                cacheSearch.value = value.nickname[0];
+            } else {
+                cacheSearch.value = '';
+            }
+        }
         initData(() => {
             // 加载数据在这里
             queryMG();
         });
-        return { loading, selctedMG, chooseDG, isNormal, menuList, updateDG };
+        return { loading, selctedMG, chooseDG, isNormal, menuList, updateDG, search, filterMenu };
     },
 });
 </script>

+ 31 - 5
src/views/information/goods/list/spot-variety/index.vue

@@ -2,14 +2,15 @@
   <!-- 现货品种 -->
   <div class="spot-variety"
        :loading="loading">
-    <filterCustomTable @search="search">
+    <filterCustomTable @search="search"
+                       :name="'现货品种'">
       <a-button class="operBtn"
                 v-if="isNormal"
                 @click="addAction">新增</a-button>
     </filterCustomTable>
     <div class="spotTableCont">
       <div class="leftSpot">
-        <leftMenu :menuList="menuList"
+        <leftMenu :menuList="filterMenu()"
                   :path="'goods_info_spot_normal'"
                   @chooseMenu="chooseDG"></leftMenu>
       </div>
@@ -26,7 +27,7 @@
 </template>
 
 <script lang="ts">
-import { defineComponent } from 'vue';
+import { defineComponent, ref } from 'vue';
 import filterCustomTable from '@/views/information/goods/components/filterTable/index.vue';
 import leftMenu from '@/views/information/goods/components/leftMenu/index.vue';
 import rightSpot from '@/views/information/goods/components/rightSpot/index.vue';
@@ -34,6 +35,7 @@ import { openModal } from '@/common/setup/modal/index';
 import { initData } from '@/common/methods/index';
 import AddGoods from '@/views/information/goods/components/add/index.vue';
 import { handleDG } from './setup';
+import { MenuList } from '@/services/go/ermcp/goodsInfo/interface';
 
 export default defineComponent({
     name: 'spot-variety',
@@ -47,12 +49,36 @@ export default defineComponent({
         // 控制弹窗
         const { openAction: addAction } = openModal('goods_info_spot_normal_add');
         const { loading, selctedDeliveryGoods, chooseDG, isNormal, menuList, queryDG, updateDG } = handleDG();
-
+        const cacheSearch = ref<string>('');
+        function filterMenu() {
+            if (cacheSearch.value) {
+                const result: MenuList[] = [];
+                menuList.value.forEach((el, i) => {
+                    const children: MenuList[] = [];
+                    el.children?.forEach((e) => {
+                        if (e.title.includes(cacheSearch.value)) {
+                            children.push(e);
+                        }
+                    });
+                    result.push({ key: el.key, title: el.title, children });
+                });
+                return result;
+            } else {
+                return menuList.value;
+            }
+        }
+        function search(value: any) {
+            if (value && value.nickname && value.nickname.length) {
+                cacheSearch.value = value.nickname[0];
+            } else {
+                cacheSearch.value = '';
+            }
+        }
         initData(() => {
             // 加载数据在这里
             queryDG();
         });
-        return { addAction, loading, selctedDeliveryGoods, chooseDG, isNormal, menuList, updateDG };
+        return { addAction, loading, selctedDeliveryGoods, chooseDG, isNormal, menuList, updateDG, search, filterMenu };
     },
 });
 </script>

+ 3 - 3
src/views/information/goods/list/spot-variety/setup.ts

@@ -7,7 +7,7 @@ import { getInitMenuData } from '../../setup';
 
 /**
  * 初始化 现货品种对象数据
- * @returns 
+ * @returns
  */
 export function initDG(): ErmcpDeliveryGoodsDetailEx {
     return {
@@ -44,7 +44,7 @@ interface MenuType {
 
 /**
  * 获取现货品种数据
- * @returns 
+ * @returns
  */
 export function handleDG() {
     const { menuList, menuMap } = getInitMenuData('goods_info_spot')
@@ -71,7 +71,7 @@ export function handleDG() {
                     const index = menuMap.get(normal) as number;
                     menuList.value[index].children?.push(result)
                 }
-            } else {    // 0:未激活 
+            } else {    // 0:未激活
                 if (menuMap.has(disable)) {
                     const index = menuMap.get(disable) as number;
                     menuList.value[index].children?.push(result)

+ 3 - 3
src/views/manage/finance-review/components/invoiceAudit/index.vue

@@ -71,11 +71,11 @@
         <a-row :gutter="24">
           <a-col :span="12">
             <a-form-item label="发票附件">
-              <span class="white"
-                    v-if="selectedRow.attachurl"></span>
               <span class="blue"
-                    v-else
+                    v-if="selectedRow.attachurl"
                     @click="previewImg(selectedRow.attachurl )">查看</span>
+              <span class="white"
+                    v-else>--</span>
             </a-form-item>
           </a-col>
           <a-col :span="12">

+ 2 - 2
src/views/manage/finance-review/list/funds/index.vue

@@ -83,8 +83,8 @@ export default defineComponent({
         Filter,
         BtnList,
         [ModalEnum.detail]: Detail,
-        [ModalEnum.business_review_settlement_audit]: Audit,
-        [ModalEnum.business_review_settlement_cancel]: Cancel,
+        [ModalEnum.finance_review_invoice_audit]: Audit,
+        [ModalEnum.finance_review_funds_cancel]: Cancel,
     },
     setup() {
         // 表格列表数据

+ 2 - 2
src/views/manage/finance-review/list/invoice/index.vue

@@ -73,8 +73,8 @@ export default defineComponent({
         Filter,
         BtnList,
         [ModalEnum.detail]: Detail,
-        [ModalEnum.business_review_settlement_audit]: Audit,
-        [ModalEnum.business_review_settlement_cancel]: Cancel,
+        [ModalEnum.finance_review_invoice_audit]: Audit,
+        [ModalEnum.finance_review_invoice_cancel]: Cancel,
     },
     setup() {
         // 表格列表数据

+ 1 - 5
src/views/report/components/filter/index.vue

@@ -76,11 +76,7 @@ export default defineComponent({
                 const id = getUserId();
                 const has = res.find((e) => e.roleid === id);
                 if (has) {
-                    // 找到了,代表着是交易员,只能看自己和下级
-                    has.userlist.forEach((el) => {
-                        userList.value.push({ value: el.loginid, lable: `${el.loginname}-${el.logincode}` });
-                        // userList.value.push({ value: el.loginid, lable: el.loginname });
-                    });
+                    userList.value.push({ value: id, lable: has.rolename });
                 } else {
                     // 没有找到代表着是机构,可以查看所有交易用户,不能查看交易员
                     userList.value.push({ value: id, lable: getUserName() });

+ 32 - 60
src/views/report/exposure-report/components/filterTable/index.vue

@@ -1,9 +1,20 @@
 <template>
   <!-- 过滤客户资料表格 -->
   <Filter @update="update">
-    <!-- <FilterOption :selectList="selectList"
-                    :inputList="[]"
-                    :fixedBtnList="fixedBtnList" /> -->
+    <a-select label-in-value
+              class="conditionSelect ml10"
+              style="width: 120px"
+              v-model:value="selectedMd"
+              @change="mdChange"
+              placeholder="全部套保品种">
+      <a-select-option v-for="item in middleGoods"
+                       :key="item.lable">
+        {{item.lable}}
+      </a-select-option>
+    </a-select>
+    <a-button class="selectBtn">查询</a-button>
+    <a-button class="selectBtn"
+              @click="reset">重置</a-button>
   </Filter>
 </template>
 
@@ -11,74 +22,35 @@
 import FilterOption from '@/common/components/filter/index.vue';
 import { defineComponent } from 'vue';
 import { ref } from 'vue';
-import { handleFilter, SelectList } from '@/common/setup/filter';
-import { handlerManagerList } from '@/common/setup/user';
-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 { handlMiddleGoods } from '@/views/report/setup';
+import { initData } from '@/common/methods';
 
 export default defineComponent({
     name: 'exposure-filter-table',
     components: { FilterOption, Filter },
     setup(props, context) {
-        function update(value: TypeAndTime) {
+        const { middleGoods, getTBList } = handlMiddleGoods();
+        function update(value: any) {
             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;
-            });
+        const selectedMd = ref(undefined);
+        function mdChange(id: any) {
+            context.emit('filter', { middlegoodsname: [id.key ? String(id.key) : ''] });
         }
-        // 获取套保品种
-        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;
-            });
+        function reset() {
+            selectedMd.value = undefined;
+            mdChange('');
         }
-        // initData(() => {
-        //     Promise.all([getUserList(), getTBList()]).then((res) => {
-        //         select[0].list = res[0]; // 交易用户
-        //         select[1].list = res[1]; // 套保品种
-        //         updateSelected(select);
-        //     });
-        // });
+        initData(() => {
+            getTBList();
+        });
         return {
-            selectList,
-            inputList,
-            fixedBtnList,
+            mdChange,
+            reset,
+            middleGoods,
+            update,
+            selectedMd,
         };
     },
 });

+ 3 - 2
src/views/report/exposure-report/list/exposure_report/index.vue

@@ -2,7 +2,8 @@
   <!-- 敞口报表 -->
   <div class="table-detail-container table-height"
        :loading="loading">
-    <Filter @update="search"></Filter>
+    <Filter @update="search"
+            @filter="updateColumn"></Filter>
     <a-table :columns="columns"
              class="topOrderTable"
              :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"
@@ -80,7 +81,7 @@ export default defineComponent({
         const param: ComposeTableDetailParam = {
             queryFn: queryTableAction, // 查询表格数据
             tableName: 'table_pcweb_exposure_report', // 表头key
-            tableFilterKey: [], // 表格过滤字段
+            tableFilterKey: ['middlegoodsname'], // 表格过滤字段
             menuType: EnumRouterName.exposure_report_exposure, // 当前tab页对应的code
         };
         const {

+ 2 - 1
src/views/report/interface.ts

@@ -8,6 +8,7 @@ export interface Value {
 export interface TypeAndTime {
     cycletype: number//      周期类型 - 0:日 1:月 2:季 3:年 4:周 5:全报表【原值】
     cycletime: string//      周期时间 日(YYYYMMDD) 月(YYYYMM) 季(YYYYQ) 年(YYYY) 周(YYYYMMDD周内任意一天) 全(0)【原值】
-    userid?: number// 
+    userid?: number//
     sumfields?: string//              汇总维度(逗号隔开) 1-品种 2-品类 3-品牌 4-仓库
+    middlegoodsname?: string//
 }

+ 37 - 50
src/views/report/inventory-report/components/filterTable/index.vue

@@ -2,9 +2,31 @@
   <!-- 过滤客户资料表格 -->
   <Filter @update="update"
           :showUser="false">
-    <!-- <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-button class="selectBtn">查询</a-button>
+    <a-button class="selectBtn"
+              @click="reset">重置</a-button>
   </Filter>
 </template>
 
@@ -18,6 +40,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: 'inventory-filter-table',
@@ -26,54 +49,18 @@ export default defineComponent({
         function update(value: TypeAndTime) {
             context.emit('update', value);
         }
-        const select: SelectList[] = [
-            {
-                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,
         };
     },
 });

+ 3 - 2
src/views/report/inventory-report/list/category/index.vue

@@ -2,7 +2,8 @@
   <!-- 库存报表(品类) -->
   <div class="table-detail-container table-height"
        :loading="loading">
-    <Filter @update="search"></Filter>
+    <Filter @update="search"
+            @filter="updateColumn"></Filter>
     <a-table :columns="columns"
              class="topOrderTable"
              :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"
@@ -69,7 +70,7 @@ export default defineComponent({
         const param: ComposeTableDetailParam = {
             queryFn: queryTableAction, // 查询表格数据
             tableName: 'table_pcweb_warehouse_category_report', // 表头key
-            tableFilterKey: [], // 表格过滤字段
+            tableFilterKey: ['deliverygoodsname', 'wrstandardname'], // 表格过滤字段
             menuType: EnumRouterName.inventory_report_inventory_category, // 当前tab页对应的code
         };
 

+ 3 - 2
src/views/report/inventory-report/list/warehouse/index.vue

@@ -2,7 +2,8 @@
   <!-- 库存报表(仓库) -->
   <div class="table-detail-container table-height"
        :loading="loading">
-    <Filter @update="search"></Filter>
+    <Filter @update="search"
+            @filter="updateColumn"></Filter>
     <a-table :columns="columns"
              class="topOrderTable"
              :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"
@@ -68,7 +69,7 @@ export default defineComponent({
         const param: ComposeTableDetailParam = {
             queryFn: queryTableAction, // 查询表格数据
             tableName: 'table_pcweb_warehouse_report', // 表头key
-            tableFilterKey: [], // 表格过滤字段
+            tableFilterKey: ['deliverygoodsname', 'wrstandardname'], // 表格过滤字段
             menuType: EnumRouterName.inventory_report_warehouse, // 当前tab页对应的code
         };
         const {

+ 68 - 0
src/views/report/setup.ts

@@ -1,4 +1,9 @@
+import { initData } from '@/common/methods'
+import { SelectOption } from '@/common/setup/filter/interface'
+import APP from '@/services'
 import { getUsrId } from '@/services/bus/user'
+import { QueryMiddleGoodsDetail } from '@/services/go/ermcp/goodsInfo'
+import { Ermcp3Brand, Ermcp3Wrstandard, ErmcpDeliveryGoodsDetailEx } from '@/services/go/ermcp/goodsInfo/interface'
 import moment, { Moment } from "moment"
 import { ref, SetupContext } from "vue"
 import { reportCycleType, reportCyleTimeType } from "./enum"
@@ -80,3 +85,66 @@ export function handleInitTypeAndTime() {
     return { getInitTime, getInitType }
 }
 
+// 获取套保品种
+export function handlMiddleGoods() {
+    const middleGoods = ref<SelectOption[]>([])
+    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 });
+                }
+            });
+            middleGoods.value = result
+        })
+    }
+    return { middleGoods, getTBList }
+}
+
+export function handleDG(context: SetupContext) {
+    // 现货品种
+    const DGList = ref<ErmcpDeliveryGoodsDetailEx[]>([])
+    const selectedDG = ref<Value | undefined>(undefined);
+    // 品牌
+    const gblist = ref<Ermcp3Brand[]>([])
+    const selectedGB = ref<Value | undefined>(undefined);
+    // 品类列表
+    const gmlist = ref<Ermcp3Wrstandard[]>([])
+    const selectedGM = ref<Value | undefined>(undefined);
+    function getDG() {
+        DGList.value = APP.get('DeliveryGoodsList').filter((e: ErmcpDeliveryGoodsDetailEx) => e.data.isvalid === 1)
+    }
+    initData(() => {
+        getDG()
+    })
+
+    function DGChange(value: any) {
+        const temp = DGList.value.find((e: ErmcpDeliveryGoodsDetailEx) => e.data.deliverygoodsname === value.key)
+        if (temp) {
+            gblist.value = temp.gblist
+            gmlist.value = temp.gmlist
+        }
+        filterAction()
+    }
+    function GBOrGMChange() {
+        filterAction()
+    }
+    function filterAction() {
+        const deliverygoodsname = selectedDG.value ? [selectedDG.value.key] : ['']
+        const brandname = selectedGB.value ? [selectedGB.value.key] : ['']
+        const wrstandardname = selectedGM.value ? [selectedGM.value.key] : ['']
+        const result = { deliverygoodsname, brandname, wrstandardname }
+        context.emit('filter', result)
+    }
+    function reset() {
+        selectedDG.value = undefined
+        selectedGB.value = undefined
+        selectedGM.value = undefined
+        filterAction()
+    }
+    return { DGList, gblist, gmlist, selectedDG, selectedGB, selectedGM, DGChange, reset, GBOrGMChange }
+}
+
+// 获取品种数据

+ 48 - 56
src/views/report/spot-report/components/filterTable/index.vue

@@ -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,
         };
     },
 });

+ 15 - 14
src/views/report/spot-report/list/spot_report/index.vue

@@ -2,7 +2,8 @@
   <!-- 现货报表 -->
   <div class="table-detail-container table-height"
        :loading="loading">
-    <Filter @update="search"></Filter>
+    <Filter @update="search"
+            @filter="updateColumn"></Filter>
     <a-table :columns="columns"
              class="topOrderTable"
              :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"
@@ -53,18 +54,18 @@
                rowKey="key"
                :data-source="detailTableList"
                :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }">
-          <template #curaverageprice="{ record }">
-              <span>{{ record.curaverageprice.toFixed(2) }}</span>
-          </template>
-          <template #curspotprice="{ record }">
-              <span>{{ record.curspotprice.toFixed(2) }}</span>
-          </template>
-          <template #curmarketvalue="{ record }">
-              <span>{{ record.curmarketvalue.toFixed(2) }}</span>
-          </template>
-          <template #floatpl="{ record }">
-              <span>{{ record.floatpl.toFixed(2) }}</span>
-          </template>
+        <template #curaverageprice="{ record }">
+          <span>{{ record.curaverageprice.toFixed(2) }}</span>
+        </template>
+        <template #curspotprice="{ record }">
+          <span>{{ record.curspotprice.toFixed(2) }}</span>
+        </template>
+        <template #curmarketvalue="{ record }">
+          <span>{{ record.curmarketvalue.toFixed(2) }}</span>
+        </template>
+        <template #floatpl="{ record }">
+          <span>{{ record.floatpl.toFixed(2) }}</span>
+        </template>
       </a-table>
     </Description>
   </div>
@@ -109,7 +110,7 @@ export default defineComponent({
         const param: ComposeTableDetailParam = {
             queryFn: queryTableAction, // 查询表格数据
             tableName: 'table_pcweb_spot_report', // 表头key
-            tableFilterKey: [], // 表格过滤字段
+            tableFilterKey: ['deliverygoodsname', 'wrstandardname', 'brandname'], // 表格过滤字段
             menuType: EnumRouterName.spot_report_spot, // 当前tab页对应的code
         };
         const {