Explorar o código

Merge branch 'master' of http://47.101.159.18:3000/Muchinfo/MTP2.0_WEB

marymelisa %!s(int64=4) %!d(string=hai) anos
pai
achega
dab44a8677
Modificáronse 33 ficheiros con 322 adicións e 151 borrados
  1. 17 0
      src/common/constants/enumsName.ts
  2. 1 1
      src/common/setup/table/clolumn.ts
  3. 4 5
      src/services/bus/goods.ts
  4. 1 2
      src/services/proto/contract/index.ts
  5. 0 1
      src/services/proto/contract/interface.ts
  6. 12 0
      src/views/business/exposure/list/futures/index.vue
  7. 1 1
      src/views/business/purchase/components/invoice/index.vue
  8. 10 3
      src/views/business/purchase/components/setup.ts
  9. 0 1
      src/views/information/account_info/compoments/filterTable/index.vue
  10. 1 1
      src/views/information/custom/compoments/filterTable/index.vue
  11. 5 5
      src/views/information/custom/list/normal-use/index.vue
  12. 7 1
      src/views/information/goods/components/filterTable/index.vue
  13. 31 5
      src/views/information/goods/list/hedging-variety/index.vue
  14. 31 5
      src/views/information/goods/list/spot-variety/index.vue
  15. 3 3
      src/views/information/goods/list/spot-variety/setup.ts
  16. 4 3
      src/views/information/spot-contract/components/add/index.vue
  17. 4 3
      src/views/information/spot-contract/components/detail/index.vue
  18. 2 2
      src/views/manage/business-review/components/somepriceAudit/index.vue
  19. 2 2
      src/views/manage/business-review/components/somepriceCancel/index.vue
  20. 2 2
      src/views/manage/business-review/components/somepriceDetail/index.vue
  21. 1 1
      src/views/manage/business-review/list/settlement/index.vue
  22. 3 3
      src/views/manage/finance-review/components/invoiceAudit/index.vue
  23. 2 2
      src/views/manage/finance-review/list/funds/index.vue
  24. 2 2
      src/views/manage/finance-review/list/invoice/index.vue
  25. 1 1
      src/views/manage/finance-review/setup.ts
  26. 2 2
      src/views/platinum/platinum_customer_info/compoments/filterTable/index.vue
  27. 2 1
      src/views/report/components/filter/index.vue
  28. 32 60
      src/views/report/exposure-report/components/filterTable/index.vue
  29. 3 2
      src/views/report/exposure-report/list/exposure_report/index.vue
  30. 2 1
      src/views/report/interface.ts
  31. 22 0
      src/views/report/setup.ts
  32. 12 1
      src/views/report/spot-report/list/spot_report/index.vue
  33. 100 29
      src/views/search/inventory/list/inventory_current/index.vue

+ 17 - 0
src/common/constants/enumsName.ts

@@ -774,6 +774,23 @@ export function getChannelBuildName(type: number) {
     return result
 }
 
+/**
+ * 发票类型  采购: 收票  销售: 开票
+ * @param type
+ */
+export function getReceiptName(type: number) {
+    let result = "--"
+    switch (type) {
+        case 1:
+            result = '收票'
+            break
+        case -1:
+            result = '开票'
+            break
+    }
+    return result
+}
+
 
 /**
  * 资金操作类型

+ 1 - 1
src/common/setup/table/clolumn.ts

@@ -127,7 +127,7 @@ function getFromatterFn(val: string) {
         case 'getChangeLogType':  // 变更流水类型
             result = FormatterFn.getChangeLogType
             break
-        case 'getLogType' : // 计划类型
+        case 'getLogType': // 计划类型
             result = FormatterFn.getLogType
             break
         default:

+ 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
 }

+ 1 - 2
src/services/proto/contract/index.ts

@@ -12,10 +12,9 @@ import {getUserId} from "@/services/bus/account";
 export const operationContractReq = (param: ErmcpContractOperateApplyReq): Promise<any> => {
     const obj = {
         OperateSrc: 2,
-        OperatorID: Number(getLongTypeLoginID()),
         ClientTicket: getUUID(),
         OperateApplyID: getTimeValue(),
-        UserID: Number(getUserId())
+        UserID: getLongTypeLoginID()?.toNumber()
     }
     Object.assign(param, obj)
     return protoMiddleware<ErmcpContractOperateApplyReq>(param, 'ErmcpContractOperateApplyReq', 'ErmcpContractOperateApplyRsp', 2)

+ 0 - 1
src/services/proto/contract/interface.ts

@@ -33,7 +33,6 @@ export interface ContractOperateApplyReq {
     OperateType: number; // uint32 操作类型-1:登记2:确认3:拒绝4:撤销
     Remark?: string; // string 备注
     Info?: ContractOperateApplyInfo; // ContractOperateApplyInfo 合同操作信息
-
     OperateSrc?: number
     OperatorID?: number
     ClientTicket?: string

+ 12 - 0
src/views/business/exposure/list/futures/index.vue

@@ -11,6 +11,18 @@
              :pagination="false"
              rowKey="key"
              :data-source="tableList">
+        <template #totalydqty="{ record }">
+            <span>{{ record.totalydqty + " 手"  }}</span>
+        </template>
+        <template #increaseqty="{ record }">
+            <span>{{ record.increaseqty + " 手"  }}</span>
+        </template>
+        <template #decreaseqty="{ record }">
+            <span>{{ record.decreaseqty + " 手"  }}</span>
+        </template>
+        <template #totalcurqty="{ record }">
+            <span>{{ record.totalcurqty + " 手"  }}</span>
+        </template>
     </a-table>
     <!-- 明细 -->
     <Description v-if="visible"

+ 1 - 1
src/views/business/purchase/components/invoice/index.vue

@@ -163,7 +163,7 @@ export default defineComponent({
                     InvoiceAmount: formState.InvoiceAmount!,
                 };
                 // 发出发票登记
-                invoiceReq(props.selectedRow.spotcontractid, params, loading)
+                invoiceReq(props.selectedRow.spotcontractid, params, loading, getFirstImg())
                     .then(() => {
                         cancel(true);
                     })

+ 10 - 3
src/views/business/purchase/components/setup.ts

@@ -19,6 +19,12 @@ import { objectToUint8Array } from "@/utils/objHandle";
 import { purchaseStateSign } from "@/views/business/purchase/setup";
 import Long from "long";
 import { Ref } from "vue";
+import {getUserId} from "@/services/bus/account";
+import {getLongTypeLoginID} from "@/services/bus/login";
+import * as long from "long";
+import {LongType} from "@/services/socket/login/interface";
+import {getTimeValue} from "@/utils/time";
+import {v4 as uuidv4} from "uuid";
 
 /**
  * 这里负责 点价登记, 交收登记, 款项登记, 发票登记, 入库登记
@@ -56,9 +62,9 @@ export function fundsReq(spotcontractid: string, req: FundsReq, loading: Ref<boo
 /**
  * 发票登记
  */
-export function invoiceReq(spotcontractid: string, req: InvoiceReq, loading: Ref<boolean>): Promise<string> {
+export function invoiceReq(spotcontractid: string, req: InvoiceReq, loading: Ref<boolean>, attachUrl?: String): Promise<string> {
     return operationContractRsp(4,
-        operationContractReqBuilder(req, spotcontractid, 4),
+        operationContractReqBuilder(req, spotcontractid, 4, "" ,attachUrl),
         loading)
 }
 
@@ -69,7 +75,7 @@ export function invoiceReq(spotcontractid: string, req: InvoiceReq, loading: Ref
  * @param id 操作的合同id
  * @param type 操作类型
  */
-export function operationContractReqBuilder(req: Object, id: string, type: number, Remark?: String): ErmcpContractOperateApplyReq {
+export function operationContractReqBuilder(req: Object, id: string, type: number, Remark?: String, attachUrl?: String): ErmcpContractOperateApplyReq {
     return {
         OperateType: 1, // uint32 操作类型-1:登记2:确认3:拒绝4:撤销
         Remark: '',
@@ -77,6 +83,7 @@ export function operationContractReqBuilder(req: Object, id: string, type: numbe
             OperateApplyType: type, // uint32 操作申请类型-1:点价2:结算3:款项4:发票
             RelatedID: Long.fromString(id), // uint64 现货合同ID(602+Unix秒时间戳(10位)+xxxxxx)
             DetailJson: objectToUint8Array(req), // bytes 明细JSON {}
+            AttachUrl: attachUrl === undefined ? "" : objectToUint8Array(attachUrl as string) // bytes 附件
         },
     } as ErmcpContractOperateApplyReq
 }

+ 0 - 1
src/views/information/account_info/compoments/filterTable/index.vue

@@ -44,5 +44,4 @@ export default defineComponent({
 </script>
 
 <style lang="less">
-
 </style>;

+ 1 - 1
src/views/information/custom/compoments/filterTable/index.vue

@@ -30,7 +30,7 @@ export default defineComponent({
         ];
         const input: InputList[] = [
             { value: '', placeholder: '模糊搜索客户简称', key: 'nickname' },
-            { value: '', placeholder: '模糊搜索客户名称', key: 'name' },
+            { value: '', placeholder: '模糊搜索客户名称', key: 'customername' },
             { value: '', placeholder: '模糊搜索手机号码', key: 'mobile' },
         ];
         const { selectList, inputList, fixedBtnList } = handleFilter(select, input, context);

+ 5 - 5
src/views/information/custom/list/normal-use/index.vue

@@ -20,10 +20,10 @@
         <template #userinfotype="{ text }">
           <a>{{ text === 2 ? '企业' : '个人' }}</a>
         </template>
-          <!-- 客户名称 -->
-          <template #customername="{ record }">
-              <a>{{ record.userinfotype === 2 ? record.customername :  record.username }}</a>
-          </template>
+        <!-- 客户名称 -->
+        <template #customername="{ record }">
+          <a>{{ record.userinfotype === 2 ? record.customername :  record.username }}</a>
+        </template>
         <template #status="{ text }">
           <a>{{ getStatusName(text) }}</a>
         </template>
@@ -66,7 +66,7 @@ export default defineComponent({
             // 获取列表数据
             queryTable();
             // 注册表头信息 过滤
-            registerColumn('table_pcweb_userinfo', ['userinfotype', 'nickname', 'contactname', 'mobile']);
+            registerColumn('table_pcweb_userinfo', ['userinfotype', 'nickname', 'customername', 'mobile']);
         });
         return {
             columns,

+ 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)

+ 4 - 3
src/views/information/spot-contract/components/add/index.vue

@@ -88,14 +88,14 @@
             </a-col>
             <a-col :span="12">
               <a-form-item label="销售方">
-                <span class="white">{{getUserName()}}</span>
+                <span class="white">{{getRootUserInfo().accountname}}</span>
               </a-form-item>
             </a-col>
           </template>
           <template v-else>
             <a-col :span="12">
               <a-form-item label="采购方">
-                <span class="white">{{getUserName()}}</span>
+                <span class="white">{{getRootUserInfo().accountname}}</span>
               </a-form-item>
             </a-col>
             <a-col :span="12">
@@ -426,7 +426,7 @@
 <script lang="ts">
 import { defineComponent, PropType, ref } from 'vue';
 import { addContractReq } from './setup';
-import { getAreaUserName, getUserName, getUsrId } from '@/services/bus/user';
+import {getAreaUserName, getRootUserInfo, getUserName, getUsrId} from '@/services/bus/user';
 import { getGoodsList } from '@/services/bus/goods';
 import { Goods } from '@/services/go/ermcp/goodsInfo/interface';
 import { FormState } from '../interface';
@@ -563,6 +563,7 @@ export default defineComponent({
             businesserList,
             merchandiserList,
             uploadImgAction,
+            getRootUserInfo,
         };
     },
 });

+ 4 - 3
src/views/information/spot-contract/components/detail/index.vue

@@ -43,7 +43,7 @@
 
         <!-- 发票类型-->
         <template #contracttype="{ text }">
-          <a>{{ getPlanContractType(text) }}</a>
+          <a>{{ getReceiptName(text) }}</a>
         </template>
 
         <!-- 出入库类型 -->
@@ -97,7 +97,7 @@ import { QueryAreaStockApply } from '@/services/go/ermcp/inventory-review';
 import { QueryChangeLog } from '@/services/go/ermcp/spot-contract';
 import { ErmcpLoginUserEx } from '@/services/go/ermcp/account/interface';
 import InfoDetail from '../infoDetail/index.vue';
-import { getApplyStatusName } from '@/common/constants/enumsName';
+import {getApplyStatusName, getReceiptName} from '@/common/constants/enumsName';
 import { getTableColumns } from '@/common/setup/table';
 import { invoiceStatusName } from '@/views/manage/finance-review/setup';
 import { getPlanContractType } from '@/views/business/plan/setup';
@@ -221,7 +221,8 @@ export default defineComponent({
             getPlanContractType,
             InOutTypeName,
             kxtypeName,
-            formatValue
+            formatValue,
+            getReceiptName
         };
     },
 });

+ 2 - 2
src/views/manage/business-review/components/somepriceAudit/index.vue

@@ -61,12 +61,12 @@
         <a-row :gutter="24">
           <a-col :span="12">
             <a-form-item label="点价合约">
-              <span class="white">{{ formatValue(selectedRow.goodscode) }}</span>
+              <span class="white">{{ formatValue(selectedRow.goodsname) }}</span>
             </a-form-item>
           </a-col>
           <a-col :span="12">
             <a-form-item label="点价价格">
-              <span class="white">{{ formatValue(selectedRow.pricedPric) }}</span>
+              <span class="white">{{ formatValue(selectedRow.pricedPrice) }}</span>
             </a-form-item>
           </a-col>
         </a-row>

+ 2 - 2
src/views/manage/business-review/components/somepriceCancel/index.vue

@@ -55,12 +55,12 @@
         <a-row :gutter="24">
           <a-col :span="12">
             <a-form-item label="点价合约">
-              <span class="white">{{ formatValue(selectedRow.goodscode) }}</span>
+              <span class="white">{{ formatValue(selectedRow.goodsname) }}</span>
             </a-form-item>
           </a-col>
           <a-col :span="12">
             <a-form-item label="点价价格">
-              <span class="white">{{ formatValue(selectedRow.pricedPric) }}</span>
+              <span class="white">{{ formatValue(selectedRow.pricedPrice) }}</span>
             </a-form-item>
           </a-col>
         </a-row>

+ 2 - 2
src/views/manage/business-review/components/somepriceDetail/index.vue

@@ -50,12 +50,12 @@
         <a-row :gutter="24">
           <a-col :span="12">
             <a-form-item label="点价合约">
-              <span class="white">{{ formatValue(selectedRow.goodscode) }}</span>
+              <span class="white">{{ formatValue(selectedRow.goodsname) }}</span>
             </a-form-item>
           </a-col>
           <a-col :span="12">
             <a-form-item label="点价价格">
-              <span class="white">{{ formatValue(selectedRow.pricedPric) }}</span>
+              <span class="white">{{ formatValue(selectedRow.pricedPrice) }}</span>
             </a-form-item>
           </a-col>
         </a-row>

+ 1 - 1
src/views/manage/business-review/list/settlement/index.vue

@@ -99,7 +99,7 @@ export default defineComponent({
         // 表格通用逻辑
         const param: ComposeTableParam = {
             queryFn: queryTableAction,
-            menuType: EnumRouterName.business_review_someprice,
+            menuType: EnumRouterName.business_review_settlement,
             tableName: 'table_pcweb_business_aduit_js',
             tableFilterKey: ['contracttype', 'contractno', 'deliverygoodsname'],
             tableFilterCB: filtrFn,

+ 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 - 1
src/views/manage/finance-review/setup.ts

@@ -54,7 +54,7 @@ export function kxtypeName(type: number): string {
     if (type === 1) {
         result = "付款"
     } else {
-        result = "退款"
+        result = "款"
     }
 
     return result

+ 2 - 2
src/views/platinum/platinum_customer_info/compoments/filterTable/index.vue

@@ -46,8 +46,8 @@ export default defineComponent({
         ]);
         const input: InputList[] = [
             { value: '', placeholder: '模糊搜索客户简称', key: 'nickname' },
-            { value: '', placeholder: '模糊搜索客户名称', key: 'name' },
-            // { value: '', placeholder: '模糊搜索手机号码', key: 'phone' },
+            { value: '', placeholder: '模糊搜索客户名称', key: 'customername' },
+            { value: '', placeholder: '模糊搜索手机号码', key: 'mobile' },
         ];
         // 是否包含子级 1-包含
         const includesub = ref<boolean>(false);

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

@@ -77,8 +77,9 @@ export default defineComponent({
                 const has = res.find((e) => e.roleid === id);
                 if (has) {
                     // 找到了,代表着是交易员,只能看自己和下级
+                    userList.value.push({ value: id, lable: has.rolename });
                     has.userlist.forEach((el) => {
-                        userList.value.push({ value: el.loginid, lable: `${el.loginname}-${el.logincode}` });
+                        userList.value.push({ value: el.userid, lable: `${el.loginname}-${el.logincode}` });
                         // userList.value.push({ value: el.loginid, lable: el.loginname });
                     });
                 } else {

+ 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//
 }

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

@@ -1,4 +1,6 @@
+import { SelectOption } from '@/common/setup/filter/interface'
 import { getUsrId } from '@/services/bus/user'
+import { QueryMiddleGoodsDetail } from '@/services/go/ermcp/goodsInfo'
 import moment, { Moment } from "moment"
 import { ref, SetupContext } from "vue"
 import { reportCycleType, reportCyleTimeType } from "./enum"
@@ -80,3 +82,23 @@ export function handleInitTypeAndTime() {
     return { getInitTime, getInitType }
 }
 
+
+export function handlMiddleGoods() {
+    const middleGoods = ref<SelectOption[]>([])
+    // 获取套保品种
+    function getTBList() {
+        return QueryMiddleGoodsDetail().then((res) => {
+            console.log('获取套保品种', 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 }
+}

+ 12 - 1
src/views/report/spot-report/list/spot_report/index.vue

@@ -41,7 +41,6 @@
       <template #curmarketvalue="{ record }">
         <span>{{ record.curmarketvalue.toFixed(2) }}</span>
       </template>
-
     </a-table>
     <!-- 明细 -->
     <Description v-if="visible"
@@ -54,6 +53,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>
       </a-table>
     </Description>
   </div>

+ 100 - 29
src/views/search/inventory/list/inventory_current/index.vue

@@ -3,24 +3,32 @@
   <div class="inventory_current"
        :loading="loading">
     <Filter @search="updateColumn">
-      <BtnList :btnList="firstBtn" />
     </Filter>
-    <contextMenu :contextMenuList="secondBtn">
-      <a-table :columns="columns"
+    <a-table :columns="columns"
+             class="topTable"
+             :pagination="false"
+             rowKey="key"
+             :expandedRowKeys="expandedRowKeys"
+             :customRow="Rowclick"
+             :data-source="tableList">
+    </a-table>
+    <!-- 明细 -->
+    <Description v-if="visible"
+                 @close="closeDrawer"
+                 @changeTab="changeTab"
+                 :tabList="tabList">
+      <a-table :columns="columnsDetail"
                class="topTable"
                :pagination="false"
                rowKey="key"
-               :expandedRowKeys="expandedRowKeys"
-               :customRow="Rowclick"
-               :data-source="tableList">
-        <!-- 额外的展开行 -->
-        <!-- <template #expandedRowRender="{  }">
-          <BtnList :btnList="secondBtn" />
+               :data-source="detailTableList"
+               :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }">
+        <!-- 类型 -->
+        <!-- <template #logtype="{ record }">
+          <span>{{ getLogType(record.logtype) }}</span>
         </template> -->
       </a-table>
-    </contextMenu>
-    <Add :selectedRow="selectedRow"
-         @refresh="queryTable" />
+    </Description>
   </div>
 </template>
 
@@ -31,6 +39,12 @@ import Add from '../../components/add/index.vue';
 
 import { getBizTypeName, getContractStatusName, getContractTypeName, getPriceTypeName } from '@/common/constants/enumsName';
 import { Ermcp3AreaStock, queryTableList } from './setup';
+import Description from '@/common/components/description/index.vue';
+import { ComposeTableDetailParam } from '@/common/setup/table/interface';
+import { EnumRouterName } from '@/common/constants/enumRouterName';
+import { handleComposeTable_detail } from '@/common/setup/table/compose';
+import { TabList } from '@/common/components/description/interface';
+import { watchEffect } from 'vue';
 
 export default defineComponent({
     name: 'inventory_current',
@@ -41,32 +55,89 @@ export default defineComponent({
         BtnList,
     },
     setup() {
-        // 表头数据
-        const { columns, registerColumn, updateColumn } = getTableColumns();
-        // 表格事件
-        const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<Ermcp3AreaStock>({});
-        // 表格操作按钮列表
-        const [firstBtn, secondBtn] = _getBtnList('inventory_current', false).value;
+        // // 表头数据
+        // const { columns, registerColumn, updateColumn } = getTableColumns();
+        // // 表格事件
+        // const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<Ermcp3AreaStock>({});
+        // // 表格操作按钮列表
+        // const [firstBtn, secondBtn] = _getBtnList('inventory_current', false).value;
+
         // 表格列表数据
         const { loading, tableList, queryTable } = queryTableList();
+        const param: ComposeTableDetailParam = {
+            queryFn: queryTable, // 查询表格数据
+            tableName: 'table_pcweb_current_inventory', // 表头key
+            tableFilterKey: ['deliverygoodsid', 'wrstandardid', 'spotgoodsbrandid', 'warehouseinfoid'], // 表格过滤字段
+            menuType: EnumRouterName.exposure_realtime, // 当前tab页对应的code
+        };
 
-        initData(() => {
-            // 获取列表数据
-            queryTable();
-            // 注册表头信息 过滤
-            registerColumn('table_pcweb_current_inventory', ['deliverygoodsid', 'wrstandardid', 'spotgoodsbrandid', 'warehouseinfoid']);
-        });
-        return {
+        const {
+            visible,
+            closeDrawer, // 控制 drawer 组件是否显示
             columns,
-
+            updateColumn, //  表头数据
+            columnsDetail,
+            registerColumnDetail,
+            detailTableList, // 明细表头数据
             expandedRowKeys,
             selectedRow,
-            Rowclick,
-            firstBtn,
-            secondBtn,
+            Rowclick, // 表格事件
+            tabList,
+        } = handleComposeTable_detail<Ermcp3AreaStock>(param);
+
+        // 切换明细
+        function changeTab(index: number, current: TabList) {
+            const { code, lable } = current;
+            let fn = null;
+            // if (code === 'exposure_realtime_spot_details') {
+            //     // 现货明细信息
+            //     // 注册表头
+            //     registerColumnDetail('table_pcweb_exposure_detail', []);
+            //     fn = QueryActualExposureDetail;
+
+            //     queryResultLoadingAndInfo(fn, loading, { middlegoodsid: selectedRow.value?.MiddleGoodsID }).then((res) => {
+            //         detailTableList.value = res;
+            //     });
+            // } else if (code === 'exposure_realtime_futures_details') {
+            //     // 期货明细
+            //     // 注册表头
+            //     registerColumnDetail('table_pcweb_exposure_futures_detail', []);
+            //     fn = QueryAutualExposurePosition;
+            //     queryResultLoadingAndInfo(fn, loading, { middleGoodsId: selectedRow.value?.MiddleGoodsID }).then((res) => {
+            //         detailTableList.value = res;
+            //     });
+            // } else {
+            //     console.error(`${lable}没有配置对应的code: ${code},`);
+            //     return;
+            // }
+        }
+        watchEffect(() => {
+            if (visible.value) {
+                if (tabList.value.length) {
+                    changeTab(0, tabList.value[0]);
+                }
+            }
+        });
+        // initData(() => {
+        //     // 获取列表数据
+        //     queryTable();
+        //     // 注册表头信息 过滤
+        //     registerColumn('table_pcweb_current_inventory', ['deliverygoodsid', 'wrstandardid', 'spotgoodsbrandid', 'warehouseinfoid']);
+        // });
+        return {
             loading,
             tableList,
+            visible,
+            closeDrawer,
+            columns,
             updateColumn,
+            columnsDetail,
+            detailTableList,
+            expandedRowKeys,
+            selectedRow,
+            Rowclick,
+            tabList,
+            changeTab,
             queryTable,
             getBizTypeName,
             getPriceTypeName,