li.shaoyi преди 4 години
родител
ревизия
cea42cf076

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

@@ -234,7 +234,7 @@ export function quoteChange<T>(record: T, decimalplace = 2) {
 
     if (typeof presettle === 'number' && typeof last === 'number') {
         const calc = last - presettle;
-        if (calc !== 0) {
+        if (last > 0) {
             return calc.toFixed(decimalplace);
         }
     }

+ 1 - 1
src/services/go/ermcp/goodsInfo/index.ts

@@ -56,7 +56,7 @@ export function QueryGoodsbrand(): Promise<Ermcp3Brand[]> {
 }
 
 /**
- * 查询现货商品详情 /Ermcp3/QueryDeliveryGoodsDetail
+ * 查询现货商品详情列表 /Ermcp3/QueryDeliveryGoodsDetail
  * @constructor
  */
 export function GetDeliveryGoodsDetail(deliverygoodsid?: number): Promise<Ermcp3DeliveryGoodsDetail[]> {

+ 10 - 11
src/services/go/ermcp/goodsInfo/interface/deliverygoodsdetail.ts

@@ -9,7 +9,7 @@ export interface Ermcp3DeliveryGoodsDetailReq {
  */
 export interface Ermcp3DeliveryGoodsDetail {
     areauserid: number//所属机构
-    bdlst: XHBRAND[]//品牌列表
+    bdlst: Brand[]//品牌列表
     deliverygoodscode: string//现货品种代码
     deliverygoodsid: number//现货品种ID(SEQ_DELIVERYGOODS)
     deliverygoodsname: string//现货品种名称
@@ -17,14 +17,13 @@ export interface Ermcp3DeliveryGoodsDetail {
     isvalid: number//是否有效 - 0:无效 1:有效
     remark: string//备注
     unitid: number//单位id(目前看,数据库中是空值)
-    wdlst: XHWrstandard[]//品类(现货商品)列表
+    wdlst: Wrstandard[]//品类(现货商品)列表
 }
 
-
 /**
  * 品牌列表
  */
-export interface XHBRAND {
+export interface Brand {
     brandid: number//品牌id
     brandname: string//品牌名称
     isvalid: number//是否有效 0-无效 1-有效
@@ -33,10 +32,10 @@ export interface XHBRAND {
 /**
  * 品类(现货商品)列表
  */
-export interface XHWrstandard {
+export interface Wrstandard {
     deliverygoodsid: number//品种ID
     enumdicnam: string//单位名称
-    mglst: XHMiddleGoods[]//套保品列表
+    mglst: MiddleGoods[]//套保品列表
     unitid: number//单位id
     vatrate: number//增值税率
     wrstandardcode: string//现货商品代码
@@ -47,12 +46,12 @@ export interface XHWrstandard {
 /**
  * 套保品列表
  */
-export interface XHMiddleGoods {
+export interface MiddleGoods {
     convertratio: number//拆算系数
     costratio: number//成本权重
     deliverygoodsid: number//现货商品id
     enumdicname: string//单位名称
-    GPLST: TBGoodsGroup[]//期货品种列表
+    GPLST: GroupGroup[]//期货品种列表
     middlegoodscode: string//套保品种代码
     middlegoodsid: number//套保品种id
     middlegoodsname: string//套保品种名称
@@ -62,12 +61,12 @@ export interface XHMiddleGoods {
 /**
  *期货品种列表
  */
-export interface TBGoodsGroup {
+export interface GroupGroup {
     convertratio: number//折算系数
     enumdicname: string//单位名称
     exexchangecode: string//交易所代码
     exexchangename: string//交易所名称
-    GDLST: TBGoods[]//商品列表
+    GDLST: Goods[]//商品列表
     goodsgroupid: number//商品组ID(自增ID)
     goodsgroupname: string//商品组名称
     goodunitid: number//报价单位ID
@@ -76,7 +75,7 @@ export interface TBGoodsGroup {
 /**
  *商品列表
  */
-export interface TBGoods {
+export interface Goods {
     agreeunit: number//合约乘数
     enumdicname: string//单位名称
     goodscode: string//商品代码(内部)

+ 2 - 2
src/views/business/exposure/list/spot/setup.ts

@@ -92,11 +92,11 @@ export const columnsDetail: ColumnType[] = [
     },
     {
         "key": "3th",
-        "dataIndex": "deliverygoodsname",
+        "dataIndex": "wrstandardname",
         "title": "现货商品",
         "align": "center",
         "slots": {
-            "customRender": "deliverygoodsname"
+            "customRender": "wrstandardname"
         },
         "width": 120
     },

+ 4 - 7
src/views/business/purchase/components/detail/index.vue

@@ -139,30 +139,27 @@ export default defineComponent({
         function tabClick() {
             const { spotcontractid, contracttype } = props.selectedRow;
             switch (activeKey.value) {
-                case 1:
-                    break;
                 case 2: // 点价记录
                     registerColumn('table_pcweb_someprice_detail_dj', []);
-                    queryResultLoadingAndInfo(QueryBusinessDj, loading, { spotcontractid }).then((res) => {
-                        console.log(res, 'hhh');
+                    queryResultLoadingAndInfo(QueryBusinessDj, loading, { spotcontractid, applystatus: '2,3' }).then((res) => {
                         tableList.value = res;
                     });
                     break;
                 case 3: // 交收记录
                     registerColumn('table_pcweb_someprice_detail_js', []);
-                    queryResultLoadingAndInfo(QueryBusinessJs, loading, { spotcontractid }).then((res) => {
+                    queryResultLoadingAndInfo(QueryBusinessJs, loading, { spotcontractid, applystatus: '2,3' }).then((res) => {
                         tableList.value = res;
                     });
                     break;
                 case 4: //款项记录
                     registerColumn('table_pcweb_someprice_detail_kx', []);
-                    queryResultLoadingAndInfo(QueryBusinessKx, loading, { spotcontractid }).then((res) => {
+                    queryResultLoadingAndInfo(QueryBusinessKx, loading, { spotcontractid, applystatus: '2,3' }).then((res) => {
                         tableList.value = res;
                     });
                     break;
                 case 5: // 发票记录
                     registerColumn('table_pcweb_someprice_detail_fp', []);
-                    queryResultLoadingAndInfo(QueryBusinessFp, loading, { spotcontractid }).then((res) => {
+                    queryResultLoadingAndInfo(QueryBusinessFp, loading, { spotcontractid, applystatus: '2,3' }).then((res) => {
                         tableList.value = res;
                     });
                     break;

+ 4 - 7
src/views/business/sell/components/detail/index.vue

@@ -134,30 +134,27 @@ export default defineComponent({
         function tabClick() {
             const { spotcontractid, contracttype } = props.selectedRow;
             switch (activeKey.value) {
-                case 1:
-                    break;
                 case 2: // 点价记录
                     registerColumn('table_pcweb_someprice_detail_dj', []);
-                    queryResultLoadingAndInfo(QueryBusinessDj, loading, { spotcontractid }).then((res) => {
-                        console.log(res, 'hhh');
+                    queryResultLoadingAndInfo(QueryBusinessDj, loading, { spotcontractid, applystatus: '2,3' }).then((res) => {
                         tableList.value = res;
                     });
                     break;
                 case 3: // 交收记录
                     registerColumn('table_pcweb_someprice_detail_js', []);
-                    queryResultLoadingAndInfo(QueryBusinessJs, loading, { spotcontractid }).then((res) => {
+                    queryResultLoadingAndInfo(QueryBusinessJs, loading, { spotcontractid, applystatus: '2,3' }).then((res) => {
                         tableList.value = res;
                     });
                     break;
                 case 4: //款项记录
                     registerColumn('table_pcweb_someprice_detail_kx', []);
-                    queryResultLoadingAndInfo(QueryBusinessKx, loading, { spotcontractid }).then((res) => {
+                    queryResultLoadingAndInfo(QueryBusinessKx, loading, { spotcontractid, applystatus: '2,3' }).then((res) => {
                         tableList.value = res;
                     });
                     break;
                 case 5: // 发票记录
                     registerColumn('table_pcweb_someprice_detail_fp', []);
-                    queryResultLoadingAndInfo(QueryBusinessFp, loading, { spotcontractid }).then((res) => {
+                    queryResultLoadingAndInfo(QueryBusinessFp, loading, { spotcontractid, applystatus: '2,3' }).then((res) => {
                         tableList.value = res;
                     });
                     break;

+ 49 - 49
src/views/information/account_info/list/account_info_business/index.vue

@@ -7,7 +7,7 @@
         <svg class="icon svg-icon" aria-hidden="true">
           <use xlink:href="#icon-shuzhuangtu"></use>
         </svg>
-        {{ getUserName() }}
+        {{ getAreaUserName() }}
       </span>
     </div>
     <div class="a-collapse-container">
@@ -54,65 +54,65 @@ import filterCustomTable from '@/views/information/goods/components/filterTable/
 import { handlerManagerList } from '@/common/setup/user';
 import { getLoginStatusEnumItemName } from '@/common/constants/enumsName';
 import { ErmcpLoginUserEx } from '@/services/go/ermcp/account/interface';
-import { getUserName } from '@/services/bus/user';
+import { getAreaUserName } from '@/services/bus/user';
 import { handleTableList, handleBtnList } from '../setup';
 import { ref } from 'vue';
 import { handleModalComponent } from '@/common/setup/asyncComponent';
 import { getTableButton } from '@/common/setup/table/button';
 
 export default defineComponent({
-    name: 'account_info_business',
-    components: {
-        contextMenu,
-        MtpTableButton,
-        filterCustomTable,
-        detail: defineAsyncComponent(() => import('../../compoments/detail-business/index.vue')),
-        account_spot_modify: defineAsyncComponent(() => import('../../compoments/modify-business/index.vue')),
-        account_spot_add: defineAsyncComponent(() => import('../../compoments/add-business/index.vue')),
-        account_spot_resetpwd: defineAsyncComponent(() => import('../../compoments/reset-business/index.vue')),
-        account_spot_locked: defineAsyncComponent(() => import('../../compoments/locked-business/index.vue')),
-        account_spot_unlocked: defineAsyncComponent(() => import('../../compoments/unlocked-business/index.vue')),
-        account_spot_cancel: defineAsyncComponent(() => import('../../compoments/cancel-business/index.vue')),
-    },
-    setup() {
-        // 加载状态
-        const loading = ref<boolean>(false);
-        const { tableList, queryTable } = handlerManagerList(loading, 1);
+  name: 'account_info_business',
+  components: {
+    contextMenu,
+    MtpTableButton,
+    filterCustomTable,
+    detail: defineAsyncComponent(() => import('../../compoments/detail-business/index.vue')),
+    account_spot_modify: defineAsyncComponent(() => import('../../compoments/modify-business/index.vue')),
+    account_spot_add: defineAsyncComponent(() => import('../../compoments/add-business/index.vue')),
+    account_spot_resetpwd: defineAsyncComponent(() => import('../../compoments/reset-business/index.vue')),
+    account_spot_locked: defineAsyncComponent(() => import('../../compoments/locked-business/index.vue')),
+    account_spot_unlocked: defineAsyncComponent(() => import('../../compoments/unlocked-business/index.vue')),
+    account_spot_cancel: defineAsyncComponent(() => import('../../compoments/cancel-business/index.vue')),
+  },
+  setup() {
+    // 加载状态
+    const loading = ref<boolean>(false);
+    const { tableList, queryTable } = handlerManagerList(loading, 1);
 
-        const firstBtn = getTableButton(['account_spot_add']);
-        const secondBtn = getTableButton(['account_spot_add'], true);
+    const firstBtn = getTableButton(['account_spot_add']);
+    const secondBtn = getTableButton(['account_spot_add'], true);
 
-        // 获取列表数据
-        function queryTableAction() {
-            handleTableList(queryTable, tableList);
-        }
+    // 获取列表数据
+    function queryTableAction() {
+      handleTableList(queryTable, tableList);
+    }
 
-        // 弹窗选中的数据
-        const selectedData = ref<ErmcpLoginUserEx>();
+    // 弹窗选中的数据
+    const selectedData = ref<ErmcpLoginUserEx>();
 
-        // 控制异步组件
-        const { componentId, closeComponent, openComponent } = handleModalComponent(queryTableAction, selectedData);
-        initData(() => {
-            queryTableAction();
-        });
+    // 控制异步组件
+    const { componentId, closeComponent, openComponent } = handleModalComponent(queryTableAction, selectedData);
+    initData(() => {
+      queryTableAction();
+    });
 
-        // 查询
-        function search(value: any) {}
-        return {
-            selectedData,
-            firstBtn,
-            secondBtn,
-            loading,
-            search,
-            tableList,
-            getLoginStatusEnumItemName,
-            handleBtnList,
-            getUserName,
-            componentId,
-            closeComponent,
-            openComponent,
-        };
-    },
+    // 查询
+    function search(value: any) { }
+    return {
+      selectedData,
+      firstBtn,
+      secondBtn,
+      loading,
+      search,
+      tableList,
+      getLoginStatusEnumItemName,
+      handleBtnList,
+      getAreaUserName,
+      componentId,
+      closeComponent,
+      openComponent,
+    };
+  },
 });
 </script>
 

+ 60 - 60
src/views/information/account_info/list/account_info_manager/index.vue

@@ -7,7 +7,7 @@
         <svg class="icon svg-icon" aria-hidden="true">
           <use xlink:href="#icon-shuzhuangtu"></use>
         </svg>
-        {{ getUserName() }}
+        {{ getAreaUserName() }}
       </span>
       <mtp-table-button :buttons="firstBtn" @click="openComponent" />
     </div>
@@ -56,7 +56,7 @@ import { initData } from '@/common/methods';
 import filterCustomTable from '@/views/information/goods/components/filterTable/index.vue';
 import { getLoginStatusEnumItemName } from '@/common/constants/enumsName';
 import { getAccountStatus, handleTableList, handleBtnList, useSelectedData, useTaAccount } from '../setup';
-import { getUserName } from '@/services/bus/user';
+import { getAreaUserName } from '@/services/bus/user';
 import { ErmcpLoginUser } from '@/services/go/ermcp/account/interface';
 import { handlerManagerList } from '@/common/setup/user';
 import { ref, Ref } from 'vue';
@@ -64,71 +64,71 @@ import { handleModalComponent } from '@/common/setup/asyncComponent';
 import { getTableButton } from '@/common/setup/table/button';
 
 export default defineComponent({
-    name: 'account_info_manager',
-    components: {
-        MtpTableButton,
-        filterCustomTable,
-        detail: defineAsyncComponent(() => import('../../compoments/detail-managers/index.vue')), // 详情
-        account_manager_add: defineAsyncComponent(() => import('../../compoments/add-managers-permission/index.vue')), // 新增权限模板
-        account_manager_setting: defineAsyncComponent(() => import('../../compoments/managers-permission/index.vue')), // 权限设置
-        account_manager_child_add: defineAsyncComponent(() => import('../../compoments/add-managers/index.vue')), //  新增账户
-        account_manager_child_modify: defineAsyncComponent(() => import('../../compoments/modify-managers/index.vue')), // 修改
-        account_manager_child_cancel: defineAsyncComponent(() => import('../../compoments/cancel-managers/index.vue')), // 注销
-        account_manager_child_locked: defineAsyncComponent(() => import('../../compoments/locked-managers/index.vue')), // 锁定
-        account_manager_child_unlocked: defineAsyncComponent(() => import('../../compoments/unlocked-managers/index.vue')), // 解锁
-        account_manager_child_reset: defineAsyncComponent(() => import('../../compoments/reset-managers/index.vue')), // 重置
-    },
-    setup() {
-        // 加载状态
-        const loading = ref<boolean>(false);
-        const { tableList, queryTable } = handlerManagerList(loading, 3);
+  name: 'account_info_manager',
+  components: {
+    MtpTableButton,
+    filterCustomTable,
+    detail: defineAsyncComponent(() => import('../../compoments/detail-managers/index.vue')), // 详情
+    account_manager_add: defineAsyncComponent(() => import('../../compoments/add-managers-permission/index.vue')), // 新增权限模板
+    account_manager_setting: defineAsyncComponent(() => import('../../compoments/managers-permission/index.vue')), // 权限设置
+    account_manager_child_add: defineAsyncComponent(() => import('../../compoments/add-managers/index.vue')), //  新增账户
+    account_manager_child_modify: defineAsyncComponent(() => import('../../compoments/modify-managers/index.vue')), // 修改
+    account_manager_child_cancel: defineAsyncComponent(() => import('../../compoments/cancel-managers/index.vue')), // 注销
+    account_manager_child_locked: defineAsyncComponent(() => import('../../compoments/locked-managers/index.vue')), // 锁定
+    account_manager_child_unlocked: defineAsyncComponent(() => import('../../compoments/unlocked-managers/index.vue')), // 解锁
+    account_manager_child_reset: defineAsyncComponent(() => import('../../compoments/reset-managers/index.vue')), // 重置
+  },
+  setup() {
+    // 加载状态
+    const loading = ref<boolean>(false);
+    const { tableList, queryTable } = handlerManagerList(loading, 3);
 
-        const firstBtn = getTableButton(['account_manager_add', 'account_manager_setting']);
-        const secondBtn = getTableButton(['account_manager_child_add']);
-        const thirdBtn = getTableButton(['account_manager_child_modify', 'account_manager_child_reset', 'account_manager_child_locked', 'account_manager_child_unlocked', 'account_manager_child_cancel', 'detail']);
+    const firstBtn = getTableButton(['account_manager_add', 'account_manager_setting']);
+    const secondBtn = getTableButton(['account_manager_child_add']);
+    const thirdBtn = getTableButton(['account_manager_child_modify', 'account_manager_child_reset', 'account_manager_child_locked', 'account_manager_child_unlocked', 'account_manager_child_cancel', 'detail']);
 
-        // 获取列表数据
-        function queryTableAction() {
-            handleTableList(queryTable, tableList);
-        }
+    // 获取列表数据
+    function queryTableAction() {
+      handleTableList(queryTable, tableList);
+    }
 
-        // 弹窗选中的数据
-        const selectedData = ref<ErmcpLoginUser>();
-        // 控制异步组件
-        const { componentId, closeComponent, openComponent } = handleModalComponent<ErmcpLoginUser>(queryTableAction, selectedData as Ref<ErmcpLoginUser>);
+    // 弹窗选中的数据
+    const selectedData = ref<ErmcpLoginUser>();
+    // 控制异步组件
+    const { componentId, closeComponent, openComponent } = handleModalComponent<ErmcpLoginUser>(queryTableAction, selectedData as Ref<ErmcpLoginUser>);
 
-        // 处理点击 二级按钮时候 选中的数据
-        const { firstSelectedData, openSecondBtnAction } = useSelectedData(tableList, openComponent);
+    // 处理点击 二级按钮时候 选中的数据
+    const { firstSelectedData, openSecondBtnAction } = useSelectedData(tableList, openComponent);
 
-        // 期货账户
-        const { updateTaAccount } = useTaAccount();
-        initData(() => {
-            queryTableAction();
-            updateTaAccount();
-        });
+    // 期货账户
+    const { updateTaAccount } = useTaAccount();
+    initData(() => {
+      queryTableAction();
+      updateTaAccount();
+    });
 
-        // 查询
-        function search(value: any) {}
+    // 查询
+    function search(value: any) { }
 
-        return {
-            firstBtn,
-            secondBtn,
-            thirdBtn,
-            loading,
-            search,
-            tableList,
-            getAccountStatus,
-            getUserName,
-            getLoginStatusEnumItemName,
-            componentId,
-            closeComponent,
-            openComponent,
-            firstSelectedData,
-            openSecondBtnAction,
-            handleBtnList,
-            selectedData,
-        };
-    },
+    return {
+      firstBtn,
+      secondBtn,
+      thirdBtn,
+      loading,
+      search,
+      tableList,
+      getAccountStatus,
+      getAreaUserName,
+      getLoginStatusEnumItemName,
+      componentId,
+      closeComponent,
+      openComponent,
+      firstSelectedData,
+      openSecondBtnAction,
+      handleBtnList,
+      selectedData,
+    };
+  },
 });
 </script>
 

+ 71 - 71
src/views/information/account_info/list/account_info_trade/index.vue

@@ -7,7 +7,7 @@
         <svg class="icon svg-icon" aria-hidden="true">
           <use xlink:href="#icon-shuzhuangtu"></use>
         </svg>
-        {{ getUserName() }}
+        {{ getAreaUserName() }}
       </span>
       <mtp-table-button :buttons="firstBtn" @click="openComponent" />
     </div>
@@ -53,7 +53,7 @@ import { initData } from '@/common/methods';
 import { defineAsyncComponent, defineComponent, MtpTableButton } from '@/common/export/commonTable';
 import filterCustomTable from '@/views/information/goods/components/filterTable/index.vue';
 import { getRoleTypeName, useSelectedData, handleBtnList } from '../setup';
-import { getUserName } from '@/services/bus/user';
+import { getAreaUserName } from '@/services/bus/user';
 import { handleTableList } from '../setup';
 import { ErmcpLoginUser, ErmcpTaAccount, ErmcpTaAccountEx } from '@/services/go/ermcp/account/interface';
 import { queryResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
@@ -64,82 +64,82 @@ import { getTableButton } from '@/common/setup/table/button';
 import { Ref, ref } from 'vue';
 
 export default defineComponent({
-    name: 'account_info_trade',
-    components: {
-        MtpTableButton,
-        filterCustomTable,
-        detail: defineAsyncComponent(() => import('../../compoments/detail-trader/index.vue')),
-        account_trade_modify: defineAsyncComponent(() => import('../../compoments/modify-traders/index.vue')),
-        account_trade_add: defineAsyncComponent(() => import('../../compoments/add-traders/index.vue')),
-        account_trade_child_add: defineAsyncComponent(() => import('../../compoments/add-child-traders/index.vue')),
-        account_trade_child_locked: defineAsyncComponent(() => import('../../compoments/locked-trader/index.vue')),
-        account_trade_child_unlocked: defineAsyncComponent(() => import('../../compoments/unlocked-trader/index.vue')),
-        account_trade_child_cancel: defineAsyncComponent(() => import('../../compoments/cancel-trader/index.vue')),
-        account_trade_child_reset: defineAsyncComponent(() => import('../../compoments/reset-trader/index.vue')),
-        account_trade_child_modify: defineAsyncComponent(() => import('../../compoments/modify-child-traders/index.vue')),
-    },
-    setup() {
-        // 加载状态
-        const loading = ref<boolean>(false);
-        const { tableList, queryTable } = handlerManagerList(loading, 2);
+  name: 'account_info_trade',
+  components: {
+    MtpTableButton,
+    filterCustomTable,
+    detail: defineAsyncComponent(() => import('../../compoments/detail-trader/index.vue')),
+    account_trade_modify: defineAsyncComponent(() => import('../../compoments/modify-traders/index.vue')),
+    account_trade_add: defineAsyncComponent(() => import('../../compoments/add-traders/index.vue')),
+    account_trade_child_add: defineAsyncComponent(() => import('../../compoments/add-child-traders/index.vue')),
+    account_trade_child_locked: defineAsyncComponent(() => import('../../compoments/locked-trader/index.vue')),
+    account_trade_child_unlocked: defineAsyncComponent(() => import('../../compoments/unlocked-trader/index.vue')),
+    account_trade_child_cancel: defineAsyncComponent(() => import('../../compoments/cancel-trader/index.vue')),
+    account_trade_child_reset: defineAsyncComponent(() => import('../../compoments/reset-trader/index.vue')),
+    account_trade_child_modify: defineAsyncComponent(() => import('../../compoments/modify-child-traders/index.vue')),
+  },
+  setup() {
+    // 加载状态
+    const loading = ref<boolean>(false);
+    const { tableList, queryTable } = handlerManagerList(loading, 2);
 
-        const firstBtn = getTableButton(['account_trade_add']);
-        const secondBtn = getTableButton(['account_trade_modify', 'account_trade_child_add']);
-        const thirdBtn = getTableButton(['account_trade_add', 'account_trade_modify', 'account_trade_child_add'], true);
+    const firstBtn = getTableButton(['account_trade_add']);
+    const secondBtn = getTableButton(['account_trade_modify', 'account_trade_child_add']);
+    const thirdBtn = getTableButton(['account_trade_add', 'account_trade_modify', 'account_trade_child_add'], true);
 
-        // 获取列表数据
-        function queryTableAction() {
-            handleTableList(queryTable, tableList);
-        }
+    // 获取列表数据
+    function queryTableAction() {
+      handleTableList(queryTable, tableList);
+    }
 
-        // 授权期货账户
-        const accountList = ref<ErmcpTaAccount[]>([]);
-        // 弹窗选中的数据
-        const selectedData = ref<ErmcpLoginUser>();
-        // 控制异步组件
-        const { componentId, closeComponent, openComponent } = handleModalComponent<ErmcpLoginUser>(queryTableAction, selectedData as Ref<ErmcpLoginUser>);
+    // 授权期货账户
+    const accountList = ref<ErmcpTaAccount[]>([]);
+    // 弹窗选中的数据
+    const selectedData = ref<ErmcpLoginUser>();
+    // 控制异步组件
+    const { componentId, closeComponent, openComponent } = handleModalComponent<ErmcpLoginUser>(queryTableAction, selectedData as Ref<ErmcpLoginUser>);
 
-        // 处理点击 二级按钮时候 选中的数据
-        const { firstSelectedData, openSecondBtnAction } = useSelectedData(tableList, openComponent);
+    // 处理点击 二级按钮时候 选中的数据
+    const { firstSelectedData, openSecondBtnAction } = useSelectedData(tableList, openComponent);
 
-        initData(() => {
-            queryTableAction();
-            // 处理授权期货账户
-            queryResultLoadingAndInfo(QueryAccMgrTaaccount, loading).then((res) => {
-                accountList.value.length = 0;
-                res.forEach((el: ErmcpTaAccountEx) => {
-                    const { subacclist } = el;
-                    subacclist.forEach((e) => {
-                        if (e.tradestatus === 1) {
-                            //交易状态 - 1:正常
-                            accountList.value.push(e);
-                        }
-                    });
-                });
-            });
+    initData(() => {
+      queryTableAction();
+      // 处理授权期货账户
+      queryResultLoadingAndInfo(QueryAccMgrTaaccount, loading).then((res) => {
+        accountList.value.length = 0;
+        res.forEach((el: ErmcpTaAccountEx) => {
+          const { subacclist } = el;
+          subacclist.forEach((e) => {
+            if (e.tradestatus === 1) {
+              //交易状态 - 1:正常
+              accountList.value.push(e);
+            }
+          });
         });
-        // 查询
-        function search(value: any) {}
+      });
+    });
+    // 查询
+    function search(value: any) { }
 
-        return {
-            selectedData,
-            firstBtn,
-            secondBtn,
-            thirdBtn,
-            loading,
-            search,
-            tableList,
-            accountList,
-            getRoleTypeName,
-            handleBtnList,
-            getUserName,
-            componentId,
-            closeComponent,
-            openComponent,
-            openSecondBtnAction,
-            firstSelectedData,
-        };
-    },
+    return {
+      selectedData,
+      firstBtn,
+      secondBtn,
+      thirdBtn,
+      loading,
+      search,
+      tableList,
+      accountList,
+      getRoleTypeName,
+      handleBtnList,
+      getAreaUserName,
+      componentId,
+      closeComponent,
+      openComponent,
+      openSecondBtnAction,
+      firstSelectedData,
+    };
+  },
 });
 </script>
 

+ 10 - 12
src/views/information/spot-contract/components/add/index.vue

@@ -100,7 +100,7 @@
           <a-col :span="12">
             <a-form-item label="商品" name="WrStandardID">
               <a-select class="inlineFormSelect" style="width: 200px" :getPopupContainer="(triggerNode) => triggerNode.parentNode" @change="WrStandardChange" v-model:value="formState.WrStandardID" placeholder="请选择商品">
-                <a-select-option v-for="item in wdlst" :key="item.wrstandardid" :value="item.wrstandardid">
+                <a-select-option v-for="item in wrstandardList" :key="item.wrstandardid" :value="item.wrstandardid">
                   {{ item.wrstandardname }}
                 </a-select-option>
               </a-select>
@@ -109,7 +109,7 @@
           <a-col :span="12">
             <a-form-item label="品牌" name="SpotGoodsBrandID">
               <a-select class="inlineFormSelect" style="width: 200px" :getPopupContainer="(triggerNode) => triggerNode.parentNode" v-model:value="formState.SpotGoodsBrandID" placeholder="请选择品牌">
-                <a-select-option v-for="item in bdlst" :key="item.brandid" :value="item.brandid">
+                <a-select-option v-for="item in barandList" :key="item.brandid" :value="item.brandid">
                   {{ item.brandname }}
                 </a-select-option>
               </a-select>
@@ -158,7 +158,7 @@
             <a-col :span="12">
               <a-form-item label="点价合约" name="GoodsID">
                 <a-select class="inlineFormSelect" v-model:value="formState.GoodsID" style="width: 200px" :getPopupContainer="(triggerNode) => triggerNode.parentNode" placeholder="请选择点价合约">
-                  <a-select-option v-for="item in gdlist" :key="item.goodsid" :value="item.goodsid">
+                  <a-select-option v-for="item in goodsList" :key="item.goodsid" :value="item.goodsid">
                     {{ item.goodsname }}
                   </a-select-option>
                 </a-select>
@@ -247,7 +247,7 @@
 </template>
 
 <script lang="ts">
-import { defineComponent, PropType, ref  } from 'vue';
+import { defineComponent, PropType, ref } from 'vue';
 import { addContractReq } from './setup';
 import { getRootUserInfo, getUserName, getUserId } from '@/services/bus/user';
 import { FormState } from '../interface';
@@ -279,7 +279,7 @@ export default defineComponent({
             required: true,
         },
     },
-     setup(props, context) {
+    setup(props, context) {
         const { visible, cancel } = _closeModal(context);
         const { sendReq } = addContractReq();
         const loading = ref<boolean>(false);
@@ -292,7 +292,7 @@ export default defineComponent({
         const { contractType, isSell, contractChange, customList, queryCustomList } = handleContract(formState);
 
         //  处理现货商品
-        const { deliveryGoodsList, gdlist, bdlst, wdlst, numberUnit, WrStandardChange, getDeliveryGoods, deliveryGoodsChange ,GetDeliveryGoodsDetail} = handleDeliveryGoods(formState);
+        const { deliveryGoodsList, barandList, wrstandardList, goodsList, numberUnit, WrStandardChange, deliveryGoodsChange } = handleDeliveryGoods(formState);
         // 价格信息
         const { priceType, payCurrency, payCurrencyUnit, parCurrencyChange } = handlePrice(formState);
         // 日期
@@ -311,12 +311,10 @@ export default defineComponent({
         // 交易主体列表
         const subjectList = ref<Ermcp3SubjectRsp[]>([]);
         QueryPaAreaSubject().then((res) => {
-            subjectList.value = res.filter(item=>item.subjectstatus===1);
+            subjectList.value = res.filter((item) => item.subjectstatus === 1);
         });
 
-        GetDeliveryGoodsDetail()
         queryCustomList();
-        getDeliveryGoods();
         queryTradeManager();
         queryBusinessManager().then(() => {
             businesserList.value = getBusinesserOrMerchandiser('22');
@@ -376,9 +374,9 @@ export default defineComponent({
             contractChange,
             customList,
             deliveryGoodsList,
-            gdlist, 
-            bdlst, 
-            wdlst,
+            barandList,
+            wrstandardList,
+            goodsList,
             deliveryGoodsChange,
             WrStandardChange,
             priceType,

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

@@ -138,30 +138,27 @@ export default defineComponent({
         function tabClick() {
             const { spotcontractid, contracttype } = props.selectedRow;
             switch (activeKey.value) {
-                case 1:
-                    break;
                 case 2: // 点价记录
                     registerColumn('table_pcweb_someprice_detail_dj', []);
-                    queryResultLoadingAndInfo(QueryBusinessDj, loading, { spotcontractid }).then((res) => {
-                        console.log(res, 'hhh');
+                    queryResultLoadingAndInfo(QueryBusinessDj, loading, { spotcontractid, applystatus: '2,3' }).then((res) => {
                         tableList.value = res;
                     });
                     break;
                 case 3: // 交收记录
                     registerColumn('table_pcweb_someprice_detail_js', []);
-                    queryResultLoadingAndInfo(QueryBusinessJs, loading, { spotcontractid }).then((res) => {
+                    queryResultLoadingAndInfo(QueryBusinessJs, loading, { spotcontractid, applystatus: '2,3' }).then((res) => {
                         tableList.value = res;
                     });
                     break;
                 case 4: //款项记录
                     registerColumn('table_pcweb_someprice_detail_kx', []);
-                    queryResultLoadingAndInfo(QueryBusinessKx, loading, { spotcontractid }).then((res) => {
+                    queryResultLoadingAndInfo(QueryBusinessKx, loading, { spotcontractid, applystatus: '2,3' }).then((res) => {
                         tableList.value = res;
                     });
                     break;
                 case 5: // 发票记录
                     registerColumn('table_pcweb_someprice_detail_fp', []);
-                    queryResultLoadingAndInfo(QueryBusinessFp, loading, { spotcontractid }).then((res) => {
+                    queryResultLoadingAndInfo(QueryBusinessFp, loading, { spotcontractid, applystatus: '2,3' }).then((res) => {
                         tableList.value = res;
                     });
                     break;

+ 7 - 8
src/views/information/spot-contract/components/modify/index.vue

@@ -96,7 +96,7 @@
           <a-col :span="12">
             <a-form-item label="商品" name="WrStandardID">
               <a-select class="inlineFormSelect" style="width: 200px" @change="WrStandardChange" v-model:value="formState.WrStandardID" placeholder="请选择商品">
-                <a-select-option v-for="item in wdlst" :key="item.wrstandardid" :value="item.wrstandardid">
+                <a-select-option v-for="item in wrstandardList" :key="item.wrstandardid" :value="item.wrstandardid">
                   {{ item.wrstandardname }}
                 </a-select-option>
               </a-select>
@@ -105,7 +105,7 @@
           <a-col :span="12">
             <a-form-item label="品牌" name="SpotGoodsBrandID">
               <a-select class="inlineFormSelect" style="width: 200px" v-model:value="formState.SpotGoodsBrandID" placeholder="请选择品牌">
-                <a-select-option v-for="item in bdlst" :key="item.brandid" :value="item.brandid">
+                <a-select-option v-for="item in barandList" :key="item.brandid" :value="item.brandid">
                   {{ item.brandname }}
                 </a-select-option>
               </a-select>
@@ -154,7 +154,7 @@
             <a-col :span="12">
               <a-form-item label="点价合约" name="GoodsID">
                 <a-select class="inlineFormSelect" v-model:value="formState.GoodsID" style="width: 200px" placeholder="请选择点价合约">
-                  <a-select-option v-for="item in gdsList" :key="item.goodsid" :value="item.goodsid">
+                  <a-select-option v-for="item in goodsList" :key="item.goodsid" :value="item.goodsid">
                     {{ item.goodsname }}
                   </a-select-option>
                 </a-select>
@@ -291,7 +291,7 @@ export default defineComponent({
         const { contractType, isSell, contractChange, customList, queryCustomList } = handleContract(formState);
 
         //  处理现货商品
-        const { deliveryGoodsList, bdlst,wdlst,gdlist, numberUnit, WrStandardChange, getDeliveryGoods, deliveryGoodsChange } = handleDeliveryGoods(formState);
+        const { deliveryGoodsList, barandList, wrstandardList, goodsList, numberUnit, WrStandardChange, deliveryGoodsChange } = handleDeliveryGoods(formState);
         // 价格信息
         const { priceType, payCurrency, payCurrencyUnit, parCurrencyChange } = handlePrice(formState);
         // 日期
@@ -319,7 +319,6 @@ export default defineComponent({
 
         const { uploadImgAction, uploadImgList, handleImg } = getUploadImg();
         queryCustomList();
-        getDeliveryGoods();
         queryTradeManager();
         mergeTwoObj(formState, props.selectedRow);
         isSell.value = formState.ContractType === 1 ? false : true;
@@ -401,9 +400,9 @@ export default defineComponent({
             contractChange,
             customList,
             deliveryGoodsList,
-            bdlst,
-            wdlst,
-            gdlist,
+            barandList,
+            wrstandardList,
+            goodsList,
             deliveryGoodsChange,
             WrStandardChange,
             priceType,

+ 43 - 56
src/views/information/spot-contract/components/setup.ts

@@ -4,13 +4,9 @@ import { commonResultInfo, getRequestResultInfo } from "@/common/methods/request
 import { validateCommon } from "@/common/setup/validate";
 import { QueryCustomInfo } from "@/services/go/ermcp/customInfo";
 import { QueryCustomInfoType } from "@/services/go/ermcp/customInfo/interface";
-import { QueryDeliveryGoods, GetDeliveryGoodsDetail } from "@/services/go/ermcp/goodsInfo";
-import { ErmcpDeliveryGoodsRsp } from "@/services/go/ermcp/goodsInfo/interface";
+import { GetDeliveryGoodsDetail } from "@/services/go/ermcp/goodsInfo";
 import { orderContract, spotContractStatus } from "@/services/proto/spotcontract";
-import {
-    GldErmcpSpotContractOperateReq,
-    SpotContractOperateReq
-} from "@/services/proto/spotcontract/interface";
+import { GldErmcpSpotContractOperateReq, SpotContractOperateReq } from "@/services/proto/spotcontract/interface";
 import { ContractStateSign, GldContractStateSign } from "@/views/information/spot-contract/setup";
 import { message } from "ant-design-vue";
 import { RuleObject } from "ant-design-vue/lib/form/interface";
@@ -18,8 +14,7 @@ import Long from 'long';
 import moment, { Moment } from "moment";
 import { reactive, ref, Ref, UnwrapRef } from "vue";
 import { FormState } from './interface';
-import { Ermcp3DeliveryGoodsDetail, XHBRAND, XHWrstandard, TBGoods } from '@/services/go/ermcp/goodsInfo/interface/deliverygoodsdetail'
-
+import { Ermcp3DeliveryGoodsDetail, Brand, Wrstandard, Goods } from '@/services/go/ermcp/goodsInfo/interface/deliverygoodsdetail'
 
 /**
  * 合同操作相关 针对操作类型 1: 保存草稿  2: 提交申请 3: 删除成功 4:审核通过
@@ -246,76 +241,68 @@ export function handleContract(formState: UnwrapRef<FormState>) {
  * 处理现货商品
  */
 export function handleDeliveryGoods(formState: UnwrapRef<FormState>) {
-    // 现货品种
-    const deliveryGoodsList = ref<ErmcpDeliveryGoodsRsp[]>([])
-    // 现货商品详情
-    let goodsDetailList: Ermcp3DeliveryGoodsDetail[] = [];
-    // 品牌
-    const bdlst = ref<XHBRAND[]>([])
-    // 品类列表
-    const wdlst = ref<XHWrstandard[]>([])
-    // 合约列表
-    const gdlist = ref<TBGoods[]>([]);
-
-    // 查询现货商品
-    function getDeliveryGoods() {
-        QueryDeliveryGoods({}).then(res => {
-            console.log('查询现货商品', res);
-            deliveryGoodsList.value = res;
-        }).catch(err => {
-            message.error(err)
-        })
-    }
-
+    // 现货品种列表
+    const deliveryGoodsList = ref<Ermcp3DeliveryGoodsDetail[]>([]);
 
     GetDeliveryGoodsDetail().then((res) => {
-        goodsDetailList=res
+        deliveryGoodsList.value = res;
+    }).catch(err => {
+        message.error(err);
     })
-    // 查询商品列表
-    function getGoodsList(value:number) {
-        gdlist.value.length = 0;
-        const obj=goodsDetailList.find(itme=>itme.deliverygoodsid===value)
-        if(obj){
-            bdlst.value=obj.bdlst
-            wdlst.value=obj.wdlst
-        } 
-    }
-  
+
+    // 品牌列表
+    const barandList = ref<Brand[]>([])
+    // 现货商品列表
+    const wrstandardList = ref<Wrstandard[]>([])
+    // 商品合约列表
+    const goodsList = ref<Goods[]>([]);
+
+
     // 切换现货商品
     function deliveryGoodsChange(value: number | undefined) {
-        if (value !== undefined) {
-            getGoodsList(value)
+        const deliveryGoods = deliveryGoodsList.value.find((e) => e.deliverygoodsid === value);
+        if (deliveryGoods) {
+            barandList.value = deliveryGoods.bdlst.filter((e) => e.isvalid); // 显示有效记录
+            wrstandardList.value = deliveryGoods.wdlst;
         } else {
-            bdlst.value.length = 0
-            wdlst.value.length = 0
+            barandList.value = [];
+            wrstandardList.value = [];
         }
+
+        goodsList.value = [];
+        formState.GoodsID = undefined;
         formState.WrStandardID = undefined;
         formState.SpotGoodsBrandID = undefined;
         formState.ConvertFactor = undefined;
-        formState.GoodsID = undefined;
     }
 
     const numberUnit = ref<string>('')
 
-    // 品类变更
+    // 选择现货商
     function WrStandardChange(value: number) {
-        const obj=wdlst.value.find(item=>item.wrstandardid===value)
-        if(obj){
-            gdlist.value=obj.mglst[0].GPLST[0].GDLST
+        const wrstandard = wrstandardList.value.find((e) => e.wrstandardid === value);
+        if (wrstandard) {
+            // 单位
+            numberUnit.value = getGoodsUnitEnumItemName(wrstandard.unitid);
+
+            goodsList.value = [];
+            wrstandard.mglst.forEach((middlegoods) => {
+                // 期货品种列表
+                middlegoods.GPLST.forEach((item) => {
+                    goodsList.value.push(...item.GDLST);
+                })
+            })
         }
-        formState.GoodsID = undefined;
     }
 
     return {
         deliveryGoodsList,
-        bdlst,
-        wdlst,
-        gdlist,
+        barandList,
+        wrstandardList,
+        goodsList,
         numberUnit,
         WrStandardChange,
-        getDeliveryGoods,
-        deliveryGoodsChange,
-        GetDeliveryGoodsDetail
+        deliveryGoodsChange
     }
 }
 

+ 4 - 0
src/views/market/futures/compoments/futures-trade/index.less

@@ -51,6 +51,10 @@
             border         : 0;
             border-radius  : 4px;
 
+            &[disabled] {
+                color: #fff !important;
+            }
+
             &:not(:last-child) {
                 margin-right: 10px;
             }

+ 1 - 1
src/views/market/futures/compoments/futures-trade/index.vue

@@ -51,7 +51,7 @@
             <span>卖出</span>
           </a-button>
           <!--如果有持仓则显示按钮-->
-          <a-button :loading="loading" @click="submit('close')" v-show="positionList.length && !isHedging">
+          <a-button :loading="loading" @click="submit('close')" :disabled="positionList.length === 0 || isHedging">
             <!--根据持仓方向显示平仓价格-->
             <span v-if="selectedPosition">{{selectedPosition.buyorsell === BuyOrSell.buy ? sellPrice : buyPrice}}</span>
             <span>平仓</span>

+ 1 - 1
src/views/market/futures/setup.tsx

@@ -64,7 +64,7 @@ export function getColumnsList() {
             }
         },
         {
-            title: '涨跌',
+            title: '涨跌',
             key: 'change',
             customRender: ({ record }: { record: GoodsQuote }) => {
                 const text = quoteChange(record, record.decimalplace);