huangbin 4 роки тому
батько
коміт
aea266eb8b

+ 61 - 0
src/common/setup/user/index.ts

@@ -0,0 +1,61 @@
+import { queryResultLoadingAndInfo } from "@/common/methods/request/resultInfo";
+import { QueryAccMgrLoginUser } from "@/services/go/ermcp/account";
+import { ErmcpLoginUser, ErmcpLoginUserEx } from "@/services/go/ermcp/account/interface";
+import { Ref, ref } from "vue";
+
+/**
+ * 获取(业务账户, 交易账户, 管理账户)
+ * 因没有数据更新推送,为了防止新增的时候,导致数据不能及时更新,故每次进入页面都请求一次数据
+ * @param loading 
+ * @param type 查询类型 1-业务账户 2-交易账户 3-管理账户
+ * @param isFilter 是否过滤.false,不过滤,true: 过滤正常账号数据,
+ * @returns 
+ */
+export function handlerManagerList(loading: Ref<boolean>, type: 1 | 2 | 3, isFilter = false) {
+    const tableList = ref<ErmcpLoginUserEx[]>([]);
+    function queryTable() {
+        return queryResultLoadingAndInfo(QueryAccMgrLoginUser, loading, type)
+            .then(res => tableList.value = isFilter ? res.filter((e: ErmcpLoginUserEx) => e.accountstatus === 4) : res)
+    }
+    /**
+     * 根据code 查找业务员、跟单员对应的名字
+     * @param code 
+     * @returns 
+     */
+    function findManagerName(code: string) {
+        let result = code
+        tableList.value.forEach(el => {
+            el.userlist.forEach(e => {
+                const { accountname, logincode } = e
+                if (logincode === code) {
+                    result = `${accountname}-${logincode}`
+                }
+            })
+        })
+        return result
+    }
+    /**
+     * 获取业务员、跟单员
+     * @param roletype '22':业务员 '23':跟单员
+     * @returns 
+     */
+    function getBusinesserOrMerchandiser(roletype: '22' | '23', isFilter = false): ErmcpLoginUser[] {
+        const result: ErmcpLoginUser[] = []
+        tableList.value.forEach(el => {
+            if (el.roleid === Number(roletype)) {
+                el.userlist.forEach(e => {
+                    if (isFilter) {
+                        if (e.loginstatus === 1) { // 过滤正常数据
+                            result.push(e)
+                        }
+                    } else {// 不进行数据过滤
+                        result.push(e)
+                    }
+                })
+            }
+        })
+        return result
+    }
+
+    return { tableList, queryTable, findManagerName, getBusinesserOrMerchandiser }
+}

+ 2 - 1
src/services/bus/user.ts

@@ -36,4 +36,5 @@ export function getUsrId() {
  */
 export function getAreaUserId(): number {
     return APP.get('userAccount').memberuserid
-}
+}
+

+ 7 - 6
src/views/business/plan/components/add/index.vue

@@ -104,7 +104,7 @@
                       style="width: 200px"
                       v-model:value="formState.Tradeuserid"
                       placeholder="请选择交易用户">
-              <a-select-option v-for="item in traderList"
+              <a-select-option v-for="item in tableList"
                                :value="item.roleid"
                                :key="item.roleid">
                 {{item.rolename}}
@@ -148,7 +148,7 @@ import { closeModal } from '@/common/setup/modal/index';
 import { formatTime, initData } from '@/common/methods/index';
 import { getPayCurrencyTypeEnumList, getSpotContractTypeEnumList } from '@/common/constants/enumsList';
 import { AllEnums } from '@/services/go/commonService/interface';
-import { getMiddleGoodsD, handleForm, handleTrader } from '../setup';
+import { getMiddleGoodsD, handleForm } from '../setup';
 import { ErmcpHedgePlanReq } from '@/services/proto/hedgeplan/interface';
 import { getLongTypeLoginID } from '@/services/bus/login';
 import { LongType } from '@/services/socket/login/interface';
@@ -157,23 +157,24 @@ import { getAreaUserId } from '@/services/bus/user';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
 import { validateAction } from '@/common/setup/form';
 import { FormState } from '../interface';
+import { handlerManagerList } from '@/common/setup/user';
 
 export default defineComponent({
     name: 'add-custom',
     components: {},
     setup(props, context) {
         const { visible, cancel } = closeModal('plan_btn_add');
+        const loading = ref<boolean>(false);
         const planTye = ref<AllEnums[]>(getSpotContractTypeEnumList());
         // 表单
         const { formRef, formState, rules } = handleForm();
         // 品种、品类
         const { DGList, getDG, gmlist, chooseMG, chooseWR } = getMiddleGoodsD(formState);
         // 交易用户
-        const { traderList, getRoleList } = handleTrader();
+        const { tableList, queryTable } = handlerManagerList(loading, 2);
         // 币种
         const priceTyep = getPayCurrencyTypeEnumList();
 
-        const loading = ref<boolean>(false);
         function submit(OperateType: 1 | 2) {
             validateAction<FormState>(formRef, formState).then((param) => {
                 const loginId = getLongTypeLoginID() as LongType;
@@ -203,7 +204,7 @@ export default defineComponent({
         }
         initData(() => {
             getDG();
-            getRoleList();
+            queryTable();
         });
         return {
             visible,
@@ -214,7 +215,7 @@ export default defineComponent({
             DGList,
             gmlist,
             chooseMG,
-            traderList,
+            tableList,
             priceTyep,
             formRef,
             formState,

+ 7 - 6
src/views/business/plan/components/modify/index.vue

@@ -101,7 +101,7 @@
                       style="width: 200px"
                       v-model:value="formState.Tradeuserid"
                       placeholder="请选择交易用户">
-              <a-select-option v-for="item in traderList"
+              <a-select-option v-for="item in tableList"
                                :value="item.roleid"
                                :key="item.roleid">
                 {{item.rolename}}
@@ -145,7 +145,7 @@ import { closeModal } from '@/common/setup/modal/index';
 import { formatTime, initData } from '@/common/methods/index';
 import { getPayCurrencyTypeEnumList, getSpotContractTypeEnumList } from '@/common/constants/enumsList';
 import { AllEnums } from '@/services/go/commonService/interface';
-import { getMiddleGoodsD, handleForm, handleTrader } from '../setup';
+import { getMiddleGoodsD, handleForm } from '../setup';
 import { FormState } from '../interface';
 import { ErmcpHedgePlanReq } from '@/services/proto/hedgeplan/interface';
 import { getLongTypeLoginID } from '@/services/bus/login';
@@ -156,6 +156,7 @@ import { getAreaUserId } from '@/services/bus/user';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
 import { hedgePlanReq } from '@/services/proto/hedgeplan';
 import { validateAction } from '@/common/setup/form';
+import { handlerManagerList } from '@/common/setup/user';
 
 export default defineComponent({
     name: 'plan_uncommitted_modify',
@@ -168,17 +169,17 @@ export default defineComponent({
     },
     setup(props, context) {
         const { visible, cancel } = closeModal('plan_uncommitted_modify');
+        const loading = ref<boolean>(false);
         const planTye = ref<AllEnums[]>(getSpotContractTypeEnumList());
         // 表单
         const { formRef, formState, rules } = handleForm();
         // 品种、品类
         const { DGList, getDG, gmlist, chooseMG, chooseWR } = getMiddleGoodsD(formState);
         // 交易用户
-        const { traderList, getRoleList } = handleTrader();
+        const { tableList, queryTable } = handlerManagerList(loading, 2);
         // 币种
         const priceTyep = getPayCurrencyTypeEnumList();
 
-        const loading = ref<boolean>(false);
         watchEffect(() => {
             if (props.selectedRow.contracttype) {
                 mergeTwoObj(formState, props.selectedRow);
@@ -216,7 +217,7 @@ export default defineComponent({
         }
         initData(() => {
             getDG();
-            getRoleList();
+            queryTable();
         });
         return {
             visible,
@@ -227,7 +228,7 @@ export default defineComponent({
             DGList,
             gmlist,
             chooseMG,
-            traderList,
+            tableList,
             priceTyep,
             formRef,
             formState,

+ 0 - 28
src/views/business/plan/components/setup.ts

@@ -1,9 +1,6 @@
 import { validateCommon } from "@/common/setup/validate";
 import APP from '@/services';
-import { QueryAccMgrLoginUser } from "@/services/go/ermcp/account";
-import { ErmcpLoginUserEx } from "@/services/go/ermcp/account/interface";
 import { Ermcp3Wrstandard, ErmcpDeliveryGoodsDetailEx } from "@/services/go/ermcp/goodsInfo/interface";
-import { message } from "ant-design-vue";
 import { RuleObject } from "ant-design-vue/lib/form/interface";
 import { reactive, ref, UnwrapRef } from "vue";
 import { FormState } from "./interface";
@@ -79,28 +76,3 @@ export function getMiddleGoodsD(formState: UnwrapRef<FormState>) {
     }
     return { DGList, getDG, gmlist, chooseMG, chooseWR }
 }
-
-/**
- * 交易用户
- * @returns 
- */
-export function handleTrader() {
-    // 交易用户
-    const traderList = ref<ErmcpLoginUserEx[]>([])
-    function getRoleList() {
-        QueryAccMgrLoginUser(2).then(res => {
-            const set = new Set<number>([])
-            traderList.value.length = 0;
-            res.forEach(e => {
-                const { roleid, rolename, accountstatus } = e;
-                if (accountstatus === 4) {  // 账户的状态 - 4 正常
-                    if (!set.has(roleid)) { // 去重
-                        set.add(roleid)
-                        traderList.value.push(e)
-                    }
-                }
-            })
-        }).catch(err => message.error(err))
-    }
-    return { traderList, getRoleList }
-}

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

@@ -76,7 +76,7 @@
 <script lang="ts">
 import { defineComponent, initData, contextMenu, BtnList, _getBtnList } from '@/common/export/table';
 import filterCustomTable from '@/views/information/goods/components/filterTable/index.vue';
-import { queryTableList } from './setup';
+import { handlerManagerList } from '@/common/setup/user';
 import { getLoginStatusEnumItemName } from '@/common/constants/enumsName';
 import Add from '../../compoments/add-business/index.vue';
 import Modify from '../../compoments/modify-business/index.vue';
@@ -88,6 +88,7 @@ import Unlocked from '../../compoments/unlocked-business/index.vue';
 import { ErmcpLoginUser, ErmcpLoginUserEx } from '@/services/go/ermcp/account/interface';
 import { getUserName } from '@/services/bus/user';
 import { handleModalData, handleTableList } from '../setup';
+import { ref } from 'vue';
 
 export default defineComponent({
     name: 'account_info_business',
@@ -104,7 +105,9 @@ export default defineComponent({
         Unlocked,
     },
     setup() {
-        const { loading, tableList, queryTable } = queryTableList();
+        // 加载状态
+        const loading = ref<boolean>(false);
+        const { tableList, queryTable } = handlerManagerList(loading, 1);
         const [firstBtn, secondBtn] = _getBtnList('account_info_business', true).value;
         // 新增弹窗 角色类型
         const { selectedData: addModelData, openAction } = handleModalData<ErmcpLoginUserEx>();

+ 0 - 19
src/views/information/account_info/list/account_info_business/setup.ts

@@ -1,19 +0,0 @@
-import { queryResultLoadingAndInfo } from "@/common/methods/request/resultInfo";
-import { QueryAccMgrLoginUser } from "@/services/go/ermcp/account";
-import { ErmcpLoginUserEx } from "@/services/go/ermcp/account/interface";
-import { ref } from "vue";
-
-export function queryTableList() {
-    // 加载状态
-    const loading = ref<boolean>(false);
-    // 表格数据
-    const tableList = ref<ErmcpLoginUserEx[]>([]);
-    function queryTable() {
-        return queryResultLoadingAndInfo(QueryAccMgrLoginUser, loading, 1)
-            .then(res => {
-                tableList.value = res
-                return 'ok'
-            })
-    }
-    return { loading, tableList, queryTable }
-}

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

@@ -83,7 +83,6 @@ import { defineComponent, initData, contextMenu, BtnList, _getBtnList } from '@/
 import filterCustomTable from '@/views/information/goods/components/filterTable/index.vue';
 import { getLoginStatusEnumItemName } from '@/common/constants/enumsName';
 import { getAccountStatus, handleModalData, handleTableList } from '../setup';
-import { queryTableList } from './setup';
 import { getUserName } from '@/services/bus/user';
 import Add from '../../compoments/add-managers/index.vue';
 import Modify from '../../compoments/modify-managers/index.vue';
@@ -96,6 +95,8 @@ import AddPermission from '../../compoments/add-managers-permission/index.vue';
 import Permission from '../../compoments/managers-permission/index.vue';
 import { ErmcpLoginUser, ErmcpLoginUserEx } from '@/services/go/ermcp/account/interface';
 import { openModal } from '@/common/setup/modal';
+import { handlerManagerList } from '@/common/setup/user';
+import { ref } from 'vue';
 
 export default defineComponent({
     name: 'account_info_manager',
@@ -114,7 +115,9 @@ export default defineComponent({
         Permission,
     },
     setup() {
-        const { loading, tableList, queryTable } = queryTableList();
+        // 加载状态
+        const loading = ref<boolean>(false);
+        const { tableList, queryTable } = handlerManagerList(loading, 3);
         const [firstBtn, secondBtn, thirdBtn] = _getBtnList('account_info_manager', true).value;
         // 新增弹窗
         const { selectedData: addModelData, openAction } = handleModalData<ErmcpLoginUserEx>();
@@ -157,10 +160,10 @@ export default defineComponent({
         padding-left: 12px;
         margin-top: 14px;
         .ant-btn.operBtn {
-          height: 26px;
-          line-height: 27px;
-          margin-top: 0;
-          margin-bottom: 0;
+            height: 26px;
+            line-height: 27px;
+            margin-top: 0;
+            margin-bottom: 0;
         }
     }
     .btn-list {

+ 0 - 16
src/views/information/account_info/list/account_info_manager/setup.ts

@@ -1,16 +0,0 @@
-import { queryResultLoadingAndInfo } from "@/common/methods/request/resultInfo";
-import { QueryAccMgrLoginUser } from "@/services/go/ermcp/account";
-import { ErmcpLoginUserEx } from "@/services/go/ermcp/account/interface";
-import { ref } from "vue";
-
-export function queryTableList() {
-    // 加载状态
-    const loading = ref<boolean>(false);
-    // 表格数据
-    const tableList = ref<ErmcpLoginUserEx[]>([]);
-    function queryTable() {
-        return queryResultLoadingAndInfo(QueryAccMgrLoginUser, loading, 3)
-            .then(res => tableList.value = res)
-    }
-    return { loading, tableList, queryTable }
-}

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

@@ -94,7 +94,6 @@
 import { defineComponent, initData, getBtnList, contextMenu, BtnList, _getBtnList } from '@/common/export/table';
 import filterCustomTable from '@/views/information/goods/components/filterTable/index.vue';
 import { getRoleTypeName } from '../setup';
-import { queryTableList } from './setup';
 import { getUserName } from '@/services/bus/user';
 import Modify from '../../compoments/modify-traders/index.vue';
 import Add from '../../compoments/add-traders/index.vue';
@@ -109,7 +108,7 @@ import { ErmcpLoginUser, ErmcpLoginUserEx, ErmcpTaAccount, ErmcpTaAccountEx } fr
 import { ref } from 'vue';
 import { queryResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
 import { QueryAccMgrTaaccount } from '@/services/go/ermcp/account';
-import { openModal } from '@/common/setup/modal';
+import { handlerManagerList } from '@/common/setup/user';
 
 export default defineComponent({
     name: 'account_info_trade',
@@ -127,7 +126,9 @@ export default defineComponent({
         ModifySelf,
     },
     setup() {
-        const { loading, tableList, queryTable } = queryTableList();
+        // 加载状态
+        const loading = ref<boolean>(false);
+        const { tableList, queryTable } = handlerManagerList(loading, 2);
         const [firstBtn, secondBtn] = _getBtnList('account_info_trade', true).value;
         // 新增弹窗
         const { selectedData: addModelData, openAction } = handleModalData<ErmcpLoginUserEx>();

+ 0 - 16
src/views/information/account_info/list/account_info_trade/setup.ts

@@ -1,16 +0,0 @@
-import { queryResultLoadingAndInfo } from "@/common/methods/request/resultInfo";
-import { QueryAccMgrLoginUser } from "@/services/go/ermcp/account";
-import { ErmcpLoginUserEx } from "@/services/go/ermcp/account/interface";
-import { ref } from "vue";
-
-export function queryTableList() {
-    // 加载状态
-    const loading = ref<boolean>(false);
-    // 表格数据
-    const tableList = ref<ErmcpLoginUserEx[]>([]);
-    function queryTable() {
-        return queryResultLoadingAndInfo(QueryAccMgrLoginUser, loading, 2)
-            .then(res => tableList.value = res)
-    }
-    return { loading, tableList, queryTable }
-}

+ 30 - 20
src/views/information/spot-contract/components/check/index.vue

@@ -157,9 +157,9 @@
                         style="width: 200px"
                         placeholder="请选择业务员">
                 <a-select-option v-for="item in businesserList"
-                                 :key="item.id"
-                                 :value="item.id">
-                  {{item.name}}
+                                 :key="item.loginid"
+                                 :value="item.loginid">
+                  {{item.accountname}}-{{item.logincode}}
                 </a-select-option>
               </a-select>
             </a-form-item>
@@ -174,9 +174,9 @@
                         style="width: 200px"
                         placeholder="请选择跟单员">
                 <a-select-option v-for="item in merchandiserList"
-                                 :key="item.id"
-                                 :value="item.id">
-                  {{item.name}}
+                                 :key="item.loginid"
+                                 :value="item.loginid">
+                  {{item.accountname}}-{{item.logincode}}
                 </a-select-option>
               </a-select>
             </a-form-item>
@@ -189,9 +189,9 @@
                         v-model:value="formState.TradeUserID"
                         placeholder="请选择期货账户">
                 <a-select-option v-for="item in traderList"
-                                 :key="item.id"
-                                 :value="item.id">
-                  {{item.name}}
+                                 :key="item.roleid"
+                                 :value="item.roleid">
+                  {{item.rolename}}
                 </a-select-option>
               </a-select>
             </a-form-item>
@@ -224,18 +224,19 @@
 </template>
 
 <script lang="ts">
-import { defineComponent, PropType, ref, toRaw } from 'vue';
+import { defineComponent, PropType, ref, toRaw, watchEffect } from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
 import { getBizTypeName, getContractStatusName, getContractTypeName, getPriceTypeName } from '@/views/information/spot-contract/setup';
 import { Ermcp3ContractRsp } from '@/services/go/ermcp/spot-contract/interface';
-import { formatTime, formatValue, initData } from '@/common/methods';
+import { formatTime, formatValue } from '@/common/methods';
 import { orderContractControl, orderContractOperateControl } from '@/views/information/spot-contract/components/setup';
 import { Modal } from 'ant-design-vue';
 import { handleForm } from './setup';
-import { handleAccountManager } from '../setup';
 import { GldErmcpSpotContractOperateReq, SpotContractOperateReq } from '@/services/proto/spotcontract/interface';
 import { validateAction } from '@/common/setup/form';
 import { FormState } from './interface';
+import { ErmcpLoginUser } from '@/services/go/ermcp/account/interface';
+import { handlerManagerList } from '@/common/setup/user';
 
 export default defineComponent({
     name: 'spot-contract-detail',
@@ -247,11 +248,15 @@ export default defineComponent({
         },
     },
     setup(props, context) {
-        const { visible, cancel } = closeModal('spot_contract_btn_check');
-        // 账号列表: 交易用户 业务员 跟单员
-        const { traderList, businesserList, merchandiserList, getRoleList, getBusinesserList } = handleAccountManager();
-
         const loading = ref<boolean>(false);
+        const { visible, cancel } = closeModal('spot_contract_btn_check');
+        // 获取 业务账户
+        const { queryTable: queryBusinessManager, getBusinesserOrMerchandiser } = handlerManagerList(loading, 1);
+        const { tableList: traderList, queryTable: queryTradeManager } = handlerManagerList(loading, 2, true);
+        // 业务员
+        const businesserList = ref<ErmcpLoginUser[]>([]);
+        // 跟单员
+        const merchandiserList = ref<ErmcpLoginUser[]>([]);
         // 表单
         const { rules, formState, formRef } = handleForm();
         function submit() {
@@ -302,9 +307,14 @@ export default defineComponent({
                 },
             });
         }
-        initData(() => {
-            getRoleList();
-            getBusinesserList();
+        watchEffect(() => {
+            if (visible.value) {
+                queryBusinessManager().then(() => {
+                    businesserList.value = getBusinesserOrMerchandiser('22');
+                    merchandiserList.value = getBusinesserOrMerchandiser('23');
+                });
+                queryTradeManager();
+            }
         });
         return {
             visible,
@@ -319,8 +329,8 @@ export default defineComponent({
             getPriceTypeName,
             refuse,
             traderList,
-            businesserList,
             merchandiserList,
+            businesserList,
             loading,
             formState,
             rules,

+ 1 - 2
src/views/information/spot-contract/components/index.ts

@@ -6,7 +6,6 @@ import SpotContractDeatil from './detail/index.vue';
 import filterCustomTable from './filterTable/index.vue';
 import Finish from './finish/index.vue';
 import ModifySpotContract from './modify/index.vue';
-import ResubmitSpotContract from './resubmit/index.vue';
 
-export { AddSpotContract, SpotContractDeatil, Check, Cancel, filterCustomTable, Finish, ModifySpotContract, DeleteSpotContract, ResubmitSpotContract };
+export { AddSpotContract, SpotContractDeatil, Check, Cancel, filterCustomTable, Finish, ModifySpotContract, DeleteSpotContract, };
 

+ 4 - 2
src/views/information/spot-contract/components/modify/index.vue

@@ -424,7 +424,7 @@ import { mergeTwoObj } from '@/utils/objHandle';
 import { validateAction } from '@/common/setup/form';
 
 export default defineComponent({
-    name: 'modify-spot-contract',
+    name: 'spot_contract_btn_modify',
     props: {
         selectedRow: {
             type: Object as PropType<Ermcp3ContractRsp>,
@@ -462,7 +462,9 @@ export default defineComponent({
             // // formState.ContractAttachment = props.selectedRow.attachment
             // formState.ContractAttachment = new Uint8Array()
             // formState.SpotGoodsBrandID = +props.selectedRow.spotcontractid
-            if (props.selectedRow.contractno) {
+            if (visible.value) {
+                console.log('props.selectedRow', props.selectedRow);
+
                 mergeTwoObj(formState, props.selectedRow);
                 const { deliverygoodsid, qty, price } = props.selectedRow;
                 deliverygoodsid && deliveryGoodsChange(deliverygoodsid);

+ 0 - 48
src/views/information/spot-contract/components/resubmit/index.vue

@@ -1,48 +0,0 @@
-<template>
-  <!-- 重新提交现货合同-->
-  <a-modal class="commonModal modify-custom"
-           title="重新提交现货合同"
-           v-model:visible="visible"
-           @cancel="cancel"
-           centered
-           width="890px">
-    <template #footer>
-      <a-button key="submit"
-                type="primary"
-                :loading="loading"
-                @click="submit">完成</a-button>
-    </template>
-  </a-modal>
-</template>
-
-<script lang="ts">
-import { defineComponent, ref } from 'vue';
-import { closeModal } from '@/common/setup/modal/index';
-import { getBizTypeName, getContractTypeName } from '@/views/information/spot-contract/setup';
-
-export default defineComponent({
-    name: 'resubmit-spot-contract',
-    components: {},
-    setup() {
-        const { visible, cancel } = closeModal('spot_contract_btn_resubmit');
-        const loading = ref<boolean>(false);
-        function submit() {
-            cancel();
-        }
-        return {
-            visible,
-            cancel,
-            submit,
-            loading,
-            getContractTypeName,
-            getBizTypeName,
-        };
-    },
-});
-</script>
-
-<style lang="less">
-.modify-custom {
-}
-</style
->;

+ 131 - 141
src/views/information/spot-contract/list/checkpending/index.vue

@@ -1,160 +1,150 @@
 <template>
-    <!-- 现货合同: 待审核-->
-    <div class="spot-contract-peddding"
-         :loading="loading">
-        <filterCustomTable @search="search">
-            <BtnList :btnList="commonBtn"/>
-        </filterCustomTable>
-        <contextMenu :contextMenuList="forDataBtn">
-            <a-table :columns="columns"
-                     class="topTable hiddenFirstCol"
-                     :pagination="false"
-                     rowKey="key"
-                     :expandedRowKeys="expandedRowKeys"
-                     :customRow="Rowclick"
-                     :data-source="tableList">
-                <!-- 额外的展开行 -->
-                <template #expandedRowRender="{  }">
-                    <BtnList :btnList="forDataBtn"/>
-                </template>
-                <!-- <template #userinfotype="{ text }">
+  <!-- 现货合同: 待审核-->
+  <div class="spot-contract-peddding"
+       :loading="loading">
+    <filterCustomTable @search="search">
+      <BtnList :btnList="commonBtn" />
+    </filterCustomTable>
+    <contextMenu :contextMenuList="forDataBtn">
+      <a-table :columns="columns"
+               class="topTable hiddenFirstCol"
+               :pagination="false"
+               rowKey="key"
+               :expandedRowKeys="expandedRowKeys"
+               :customRow="Rowclick"
+               :data-source="tableList">
+        <!-- 额外的展开行 -->
+        <template #expandedRowRender="{  }">
+          <BtnList :btnList="forDataBtn" />
+        </template>
+        <!-- <template #userinfotype="{ text }">
                           <a>{{ text === '2' ? '企业' : '个人'}}</a>
                         </template> -->
 
-                <template #biztype="{ text }">
-                    <a>{{ getBizTypeName(text) }}</a>
-                </template>
+        <template #biztype="{ text }">
+          <a>{{ getBizTypeName(text) }}</a>
+        </template>
 
-                <template #pricetype="{ text }">
-                    <a>{{ getPriceTypeName(text) }}</a>
-                </template>
+        <template #pricetype="{ text }">
+          <a>{{ getPriceTypeName(text) }}</a>
+        </template>
 
-                <template #contracctstatus="{ text }">
-                    <a>{{ getContractStatusName(text) }}</a>
-                </template>
+        <template #contracctstatus="{ text }">
+          <a>{{ getContractStatusName(text) }}</a>
+        </template>
 
-                <template #contracttype="{ text }">
-                    <a>{{ getContractTypeName(text) }}</a>
-                </template>
-                <!-- 对手方 -->
-                <template #negative="{ record }">
-                    <a>{{ record.contracttype === 1 ? record.sellusername : record.buyusername }}</a>
-                </template>
-                <template #startdate="{ record }">
-                    <a>{{ formatValue(formatTime(record.startdate, "d") + '--' + formatTime(record.enddate, "d")) }}</a>
-                </template>
-                <!-- 交收期 -->
-                <template #deliverystartdate="{ record }">
-                    <a>{{ formatValue(formatTime(record.deliverystartdate, "d") + '--' +
+        <template #contracttype="{ text }">
+          <a>{{ getContractTypeName(text) }}</a>
+        </template>
+        <!-- 对手方 -->
+        <template #negative="{ record }">
+          <a>{{ record.contracttype === 1 ? record.sellusername : record.buyusername }}</a>
+        </template>
+        <template #startdate="{ record }">
+          <a>{{ formatValue(formatTime(record.startdate, "d") + '--' + formatTime(record.enddate, "d")) }}</a>
+        </template>
+        <!-- 交收期 -->
+        <template #deliverystartdate="{ record }">
+          <a>{{ formatValue(formatTime(record.deliverystartdate, "d") + '--' +
                         formatTime(record.deliveryenddate, "d")) }}</a>
-                </template>
+        </template>
 
-            </a-table>
-        </contextMenu>
-        <!-- 现货合同: 详情 -->
-        <SpotContractDeatil :selectedRow="selectedRow"
-                            @refresh="queryTable"/>
-        <!-- 现货合同: 审核 -->
-        <Check :selectedRow="selectedRow"
-               @refresh="queryTable"/>
-        <!-- 现货合同: 撤销 -->
-        <Cancel :selectedRow="selectedRow"
-                @refresh="queryTable"/>
-    </div>
+      </a-table>
+    </contextMenu>
+    <!-- 现货合同: 详情 -->
+    <SpotContractDeatil :selectedRow="selectedRow"
+                        @refresh="queryTable" />
+    <!-- 现货合同: 审核 -->
+    <Check :selectedRow="selectedRow"
+           @refresh="queryTable" />
+    <!-- 现货合同: 撤销 -->
+    <Cancel :selectedRow="selectedRow"
+            @refresh="queryTable" />
+  </div>
 </template>
 
 <script lang="ts">
-    import {
-        defineComponent,
-        initData,
-        getTableColumns,
-        getTableEvent,
-        getBtnList,
-        contextMenu,
-        BtnList
-    } from '@/common/export/table';
-    import {AddSpotContract, SpotContractDeatil, Check, Cancel, filterCustomTable} from '../../components';
-    import {queryTableList, Ermcp3ContractRsp} from '../index';
-    import {
-        getBizTypeName,
-        getContractStatusName,
-        getContractTypeName,
-        getPriceTypeName
-    } from '@/views/information/spot-contract/setup';
-    import {Column, ColumnType} from '@/common/setup/table';
-    import {formatTime, formatValue} from "@/common/methods";
-
-    export default defineComponent({
-        name: 'spot-contract-peddding',
-        components: {
-            filterCustomTable,
-            contextMenu,
-            AddSpotContract,
-            SpotContractDeatil,
-            Check,
-            Cancel,
-            BtnList,
-        },
-        setup() {
-            // 表头数据
-            const {columns, registerColumn, updateColumn, filteredInfo} = getTableColumns();
-            // 表格事件
-            const {expandedRowKeys, selectedRow, Rowclick} = getTableEvent<Ermcp3ContractRsp>({});
-            // 表格操作按钮列表
-            const {commonBtn, forDataBtn} = getBtnList('spot_contract_checkpending', true);
-            // 表格列表数据
-            const {loading, tableList, queryTable} = queryTableList(2);
+import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList, contextMenu, BtnList } from '@/common/export/table';
+import { AddSpotContract, SpotContractDeatil, Check, Cancel, filterCustomTable } from '../../components';
+import { queryTableList, Ermcp3ContractRsp } from '../index';
+import { getBizTypeName, getContractStatusName, getContractTypeName, getPriceTypeName } from '@/views/information/spot-contract/setup';
+import { Column, ColumnType } from '@/common/setup/table';
+import { formatTime, formatValue } from '@/common/methods';
+import { handlerManagerList } from '@/common/setup/user';
 
-            // 查询
-            function search(value: any) {
-                filteredInfo.value = value;
-                // 更新表信息
-                updateColumn();
-            }
+export default defineComponent({
+    name: 'spot-contract-peddding',
+    components: {
+        filterCustomTable,
+        contextMenu,
+        AddSpotContract,
+        SpotContractDeatil,
+        Check,
+        Cancel,
+        BtnList,
+    },
+    setup() {
+        // 表头数据
+        const { columns, registerColumn, updateColumn, filteredInfo } = getTableColumns();
+        // 表格事件
+        const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<Ermcp3ContractRsp>({});
+        // 表格操作按钮列表
+        const { commonBtn, forDataBtn } = getBtnList('spot_contract_checkpending', true);
+        // 表格列表数据
+        const { loading, tableList, queryTable } = queryTableList(2);
+        // 获取 业务账户
+        const { queryTable: queryBusinessManager, findManagerName } = handlerManagerList(loading, 1);
+        // 查询
+        function search(value: any) {
+            filteredInfo.value = value;
+            // 更新表信息
+            updateColumn();
+        }
 
-            initData(() => {
-                // 获取列表数据
-                queryTable();
-                // 注册表头信息 过滤
-                registerColumn('table_pcweb_delivery', ['contracttype', 'pricetype', 'contractno'], (e: Column, item: ColumnType, filtered: any) => {
-                    if (e.columntitle === '对手方') {
-                        item.onFilter = (value: string, record: Ermcp3ContractRsp) => {
-                            if (record.contracttype === 1) {
-                                //采购方
-                                return record.sellusername.includes(value);
-                            } else {
-                                // 销售
-                                return record.buyusername.includes(value);
-                            }
-                        };
-                        item.filteredValue = filtered.negative || null;
-                    }
-                });
+        initData(() => {
+            // 获取列表数据
+            queryTable();
+            // 注册表头信息 过滤
+            registerColumn('table_pcweb_delivery', ['contracttype', 'pricetype', 'contractno'], (e: Column, item: ColumnType, filtered: any) => {
+                if (e.columntitle === '对手方') {
+                    item.onFilter = (value: string, record: Ermcp3ContractRsp) => {
+                        if (record.contracttype === 1) {
+                            //采购方
+                            return record.sellusername.includes(value);
+                        } else {
+                            // 销售
+                            return record.buyusername.includes(value);
+                        }
+                    };
+                    item.filteredValue = filtered.negative || null;
+                }
             });
-            return {
-                columns,
-                filteredInfo,
-                expandedRowKeys,
-                selectedRow,
-                Rowclick,
-                commonBtn,
-                forDataBtn,
-                loading,
-                tableList,
-                search,
-                queryTable,
-                getBizTypeName,
-                getPriceTypeName,
-                getContractStatusName,
-                getContractTypeName,
-                formatTime,
-                formatValue,
-            };
-        },
-    });
+            queryBusinessManager();
+        });
+        return {
+            columns,
+            filteredInfo,
+            expandedRowKeys,
+            selectedRow,
+            Rowclick,
+            commonBtn,
+            forDataBtn,
+            loading,
+            tableList,
+            search,
+            queryTable,
+            getBizTypeName,
+            getPriceTypeName,
+            getContractStatusName,
+            getContractTypeName,
+            formatTime,
+            formatValue,
+        };
+    },
+});
 </script>
 
 <style lang="less">
-    .spot-contract-peddding {
-    }
+.spot-contract-peddding {
+}
 </style>;

+ 124 - 133
src/views/information/spot-contract/list/finished/index.vue

@@ -1,153 +1,144 @@
 <template>
-    <!-- 现货合同: 已完成-->
-    <div class="spot-contract-done">
-        <filterCustomTable @search="search"
-                           :loading="loading">
-            <BtnList :btnList="commonBtn"/>
-        </filterCustomTable>
-        <contextMenu :contextMenuList="forDataBtn">
-            <a-table :columns="columns"
-                     class="topTable hiddenFirstCol"
-                     :pagination="false"
-                     :expandedRowKeys="expandedRowKeys"
-                     :customRow="Rowclick"
-                     rowKey="key"
-                     :data-source="tableList">
-                <!-- 额外的展开行 -->
-                <template #expandedRowRender="{  }">
-                    <BtnList :btnList="forDataBtn"/>
-                </template>
-                <!-- <template #userinfotype="{ text }">
+  <!-- 现货合同: 已完成-->
+  <div class="spot-contract-done">
+    <filterCustomTable @search="search"
+                       :loading="loading">
+      <BtnList :btnList="commonBtn" />
+    </filterCustomTable>
+    <contextMenu :contextMenuList="forDataBtn">
+      <a-table :columns="columns"
+               class="topTable hiddenFirstCol"
+               :pagination="false"
+               :expandedRowKeys="expandedRowKeys"
+               :customRow="Rowclick"
+               rowKey="key"
+               :data-source="tableList">
+        <!-- 额外的展开行 -->
+        <template #expandedRowRender="{  }">
+          <BtnList :btnList="forDataBtn" />
+        </template>
+        <!-- <template #userinfotype="{ text }">
                   <a>{{ text === '2' ? '企业' : '个人'}}</a>
                 </template> -->
-                <template #biztype="{ text }">
-                    <a>{{ getBizTypeName(text) }}</a>
-                </template>
+        <template #biztype="{ text }">
+          <a>{{ getBizTypeName(text) }}</a>
+        </template>
 
-                <template #pricetype="{ text }">
-                    <a>{{ getPriceTypeName(text) }}</a>
-                </template>
+        <template #pricetype="{ text }">
+          <a>{{ getPriceTypeName(text) }}</a>
+        </template>
 
-                <template #contracctstatus="{ text }">
-                    <a>{{ getContractStatusName(text) }}</a>
-                </template>
+        <template #contracctstatus="{ text }">
+          <a>{{ getContractStatusName(text) }}</a>
+        </template>
 
-                <template #contracttype="{ text }">
-                    <a>{{ getContractTypeName(text) }}</a>
-                </template>
-                <!-- 对手方 -->
-                <template #negative="{ record }">
-                    <a>{{ record.contracttype === 1 ? record.sellusername : record.buyusername }}</a>
-                </template>
-                <template #startdate="{ record }">
-                    <a>{{ formatValue(formatTime(record.startdate, "d") + '--' + formatTime(record.enddate, "d")) }}</a>
-                </template>
-                <!-- 交收期 -->
-                <template #deliverystartdate="{ record }">
-                    <a>{{ formatValue(formatTime(record.deliverystartdate, "d") + '--' +
+        <template #contracttype="{ text }">
+          <a>{{ getContractTypeName(text) }}</a>
+        </template>
+        <!-- 对手方 -->
+        <template #negative="{ record }">
+          <a>{{ record.contracttype === 1 ? record.sellusername : record.buyusername }}</a>
+        </template>
+        <template #startdate="{ record }">
+          <a>{{ formatValue(formatTime(record.startdate, "d") + '--' + formatTime(record.enddate, "d")) }}</a>
+        </template>
+        <!-- 交收期 -->
+        <template #deliverystartdate="{ record }">
+          <a>{{ formatValue(formatTime(record.deliverystartdate, "d") + '--' +
                         formatTime(record.deliveryenddate, "d")) }}</a>
-                </template>
+        </template>
 
-            </a-table>
-        </contextMenu>
-        <!-- 新增现货合同 -->
-        <AddSpotContract @refresh="queryTable"/>
-        <!-- 现货合同: 详情 -->
-        <SpotContractDeatil :selectedRow="selectedRow"
-                            @refresh="queryTable"/>
-    </div>
+      </a-table>
+    </contextMenu>
+    <!-- 新增现货合同 -->
+    <AddSpotContract @refresh="queryTable" />
+    <!-- 现货合同: 详情 -->
+    <SpotContractDeatil :selectedRow="selectedRow"
+                        @refresh="queryTable" />
+  </div>
 </template>
 
 <script lang="ts">
-    import {
-        defineComponent,
-        initData,
-        getTableColumns,
-        getTableEvent,
-        getBtnList,
-        contextMenu,
-        BtnList
-    } from '@/common/export/table';
-    import {AddSpotContract, SpotContractDeatil, filterCustomTable} from '../../components';
+import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList, contextMenu, BtnList } from '@/common/export/table';
+import { AddSpotContract, SpotContractDeatil, filterCustomTable } from '../../components';
 
-    import {queryTableList, Ermcp3ContractRsp} from '../index';
-    import {
-        getBizTypeName,
-        getContractStatusName,
-        getContractTypeName,
-        getPriceTypeName
-    } from '@/views/information/spot-contract/setup';
-    import {Column, ColumnType} from '@/common/setup/table';
-    import {formatTime, formatValue} from "@/common/methods";
+import { queryTableList, Ermcp3ContractRsp } from '../index';
+import { getBizTypeName, getContractStatusName, getContractTypeName, getPriceTypeName } from '@/views/information/spot-contract/setup';
+import { Column, ColumnType } from '@/common/setup/table';
+import { formatTime, formatValue } from '@/common/methods';
+import { handlerManagerList } from '@/common/setup/user';
 
-    export default defineComponent({
-        name: 'spot-contract-done',
-        components: {
-            filterCustomTable,
-            contextMenu,
-            AddSpotContract,
-            SpotContractDeatil,
-            BtnList,
-        },
-        setup() {
-            // 表头数据
-            const {columns, registerColumn, updateColumn, filteredInfo} = getTableColumns();
-            // 表格事件
-            const {expandedRowKeys, selectedRow, Rowclick} = getTableEvent<Ermcp3ContractRsp>({});
-            // 表格操作按钮列表
-            const {commonBtn, forDataBtn} = getBtnList('spot_contract_finished', true);
-            // 表格列表数据
-            const {loading, tableList, queryTable} = queryTableList(4);
+export default defineComponent({
+    name: 'spot-contract-done',
+    components: {
+        filterCustomTable,
+        contextMenu,
+        AddSpotContract,
+        SpotContractDeatil,
+        BtnList,
+    },
+    setup() {
+        // 表头数据
+        const { columns, registerColumn, updateColumn, filteredInfo } = getTableColumns();
+        // 表格事件
+        const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<Ermcp3ContractRsp>({});
+        // 表格操作按钮列表
+        const { commonBtn, forDataBtn } = getBtnList('spot_contract_finished', true);
+        // 表格列表数据
+        const { loading, tableList, queryTable } = queryTableList(4);
 
-            // 查询
-            function search(value: any) {
-                filteredInfo.value = value;
-                // 更新表信息
-                updateColumn();
-            }
+        // 获取 业务账户
+        const { queryTable: queryBusinessManager, findManagerName } = handlerManagerList(loading, 1);
+        // 查询
+        function search(value: any) {
+            filteredInfo.value = value;
+            // 更新表信息
+            updateColumn();
+        }
 
-            initData(() => {
-                // 获取列表数据
-                queryTable();
-                // 注册表头信息 过滤
-                registerColumn('table_pcweb_delivery', ['contracttype', 'pricetype', 'contractno'], (e: Column, item: ColumnType, filtered: any) => {
-                    if (e.columntitle === '对手方') {
-                        item.onFilter = (value: string, record: Ermcp3ContractRsp) => {
-                            if (record.contracttype === 1) {
-                                //采购方
-                                return record.sellusername.includes(value);
-                            } else {
-                                // 销售
-                                return record.buyusername.includes(value);
-                            }
-                        };
-                        item.filteredValue = filtered.negative || null;
-                    }
-                });
+        initData(() => {
+            // 获取列表数据
+            queryTable();
+            // 注册表头信息 过滤
+            registerColumn('table_pcweb_delivery', ['contracttype', 'pricetype', 'contractno'], (e: Column, item: ColumnType, filtered: any) => {
+                if (e.columntitle === '对手方') {
+                    item.onFilter = (value: string, record: Ermcp3ContractRsp) => {
+                        if (record.contracttype === 1) {
+                            //采购方
+                            return record.sellusername.includes(value);
+                        } else {
+                            // 销售
+                            return record.buyusername.includes(value);
+                        }
+                    };
+                    item.filteredValue = filtered.negative || null;
+                }
             });
-            return {
-                columns,
-                filteredInfo,
-                expandedRowKeys,
-                selectedRow,
-                Rowclick,
-                commonBtn,
-                forDataBtn,
-                loading,
-                tableList,
-                search,
-                getBizTypeName,
-                getPriceTypeName,
-                getContractStatusName,
-                getContractTypeName,
-                formatTime,
-                formatValue,
-            };
-        },
-    });
+            queryBusinessManager();
+        });
+        return {
+            columns,
+            filteredInfo,
+            expandedRowKeys,
+            selectedRow,
+            Rowclick,
+            commonBtn,
+            forDataBtn,
+            loading,
+            tableList,
+            search,
+            getBizTypeName,
+            getPriceTypeName,
+            getContractStatusName,
+            getContractTypeName,
+            formatTime,
+            formatValue,
+        };
+    },
+});
 </script>
 
 <style lang="less">
-    .spot-contract-done {
-    }
+.spot-contract-done {
+}
 </style>;

+ 128 - 138
src/views/information/spot-contract/list/performance/index.vue

@@ -1,156 +1,146 @@
 <template>
-    <!-- 现货合同: 履约中-->
-    <div class="spot-contract-performance">
-        <filterCustomTable @search="search"
-                           :loading="loading">
-            <BtnList :btnList="commonBtn"/>
-        </filterCustomTable>
-        <contextMenu :contextMenuList="forDataBtn">
-            <a-table :columns="columns"
-                     class="topTable hiddenFirstCol"
-                     :pagination="false"
-                     :expandedRowKeys="expandedRowKeys"
-                     :customRow="Rowclick"
-                     rowKey="key"
-                     :data-source="tableList">
-                <!-- 额外的展开行 -->
-                <template #expandedRowRender="{  }">
-                    <BtnList :btnList="forDataBtn"/>
-                </template>
-                <!-- <template #userinfotype="{ text }">
+  <!-- 现货合同: 履约中-->
+  <div class="spot-contract-performance">
+    <filterCustomTable @search="search"
+                       :loading="loading">
+      <BtnList :btnList="commonBtn" />
+    </filterCustomTable>
+    <contextMenu :contextMenuList="forDataBtn">
+      <a-table :columns="columns"
+               class="topTable hiddenFirstCol"
+               :pagination="false"
+               :expandedRowKeys="expandedRowKeys"
+               :customRow="Rowclick"
+               rowKey="key"
+               :data-source="tableList">
+        <!-- 额外的展开行 -->
+        <template #expandedRowRender="{  }">
+          <BtnList :btnList="forDataBtn" />
+        </template>
+        <!-- <template #userinfotype="{ text }">
                   <a>{{ text === '2' ? '企业' : '个人'}}</a>
                 </template> -->
-                <template #biztype="{ text }">
-                    <a>{{ getBizTypeName(text) }}</a>
-                </template>
+        <template #biztype="{ text }">
+          <a>{{ getBizTypeName(text) }}</a>
+        </template>
 
-                <template #pricetype="{ text }">
-                    <a>{{ getPriceTypeName(text) }}</a>
-                </template>
+        <template #pricetype="{ text }">
+          <a>{{ getPriceTypeName(text) }}</a>
+        </template>
 
-                <template #contracctstatus="{ text }">
-                    <a>{{ getContractStatusName(text) }}</a>
-                </template>
+        <template #contracctstatus="{ text }">
+          <a>{{ getContractStatusName(text) }}</a>
+        </template>
 
-                <template #contracttype="{ text }">
-                    <a>{{ getContractTypeName(text) }}</a>
-                </template>
-                <!-- 对手方 -->
-                <template #negative="{ record }">
-                    <a>{{ record.contracttype === 1 ? record.sellusername : record.buyusername }}</a>
-                </template>
-                <!-- 点假期 -->
-                <template #startdate="{ record }">
-                    <a>{{ formatValue(formatTime(record.startdate, "d") + '--' + formatTime(record.enddate, "d")) }}</a>
-                </template>
-                <!-- 交收期 -->
-                <template #deliverystartdate="{ record }">
-                    <a>{{ formatValue(formatTime(record.deliverystartdate, "d") + '--' +
+        <template #contracttype="{ text }">
+          <a>{{ getContractTypeName(text) }}</a>
+        </template>
+        <!-- 对手方 -->
+        <template #negative="{ record }">
+          <a>{{ record.contracttype === 1 ? record.sellusername : record.buyusername }}</a>
+        </template>
+        <!-- 点假期 -->
+        <template #startdate="{ record }">
+          <a>{{ formatValue(formatTime(record.startdate, "d") + '--' + formatTime(record.enddate, "d")) }}</a>
+        </template>
+        <!-- 交收期 -->
+        <template #deliverystartdate="{ record }">
+          <a>{{ formatValue(formatTime(record.deliverystartdate, "d") + '--' +
                         formatTime(record.deliveryenddate, "d")) }}</a>
-                </template>
-            </a-table>
-        </contextMenu>
-        <!-- 现货合同: 详情 -->
-        <SpotContractDeatil :selectedRow="selectedRow"
-                            @refresh="queryTable"/>
-        <!-- 现货合同: 正常完结 -->
-        <Finish :selectedRow="selectedRow"
-                @refresh="queryTable"/>
-    </div>
+        </template>
+      </a-table>
+    </contextMenu>
+    <!-- 现货合同: 详情 -->
+    <SpotContractDeatil :selectedRow="selectedRow"
+                        @refresh="queryTable" />
+    <!-- 现货合同: 正常完结 -->
+    <Finish :selectedRow="selectedRow"
+            @refresh="queryTable" />
+  </div>
 </template>
 
 <script lang="ts">
-    import {
-        defineComponent,
-        initData,
-        getTableColumns,
-        getTableEvent,
-        getBtnList,
-        contextMenu,
-        BtnList
-    } from '@/common/export/table';
-    import {AddSpotContract, SpotContractDeatil, filterCustomTable, Finish} from '../../components';
-
-    import {queryTableList, Ermcp3ContractRsp} from '../index';
-    import {
-        getBizTypeName,
-        getContractStatusName,
-        getContractTypeName,
-        getPriceTypeName
-    } from '@/views/information/spot-contract/setup';
-    import {Column, ColumnType} from '@/common/setup/table';
-    import {formatTime, formatValue} from "@/common/methods";
+import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList, contextMenu, BtnList } from '@/common/export/table';
+import { AddSpotContract, SpotContractDeatil, filterCustomTable, Finish } from '../../components';
 
-    export default defineComponent({
-        name: 'spot-contract-performance',
-        components: {
-            filterCustomTable,
-            contextMenu,
-            AddSpotContract,
-            SpotContractDeatil,
-            Finish,
-            BtnList,
-        },
-        setup() {
-            // 表头数据
-            const {columns, registerColumn, updateColumn, filteredInfo} = getTableColumns();
-            // 表格事件
-            const {expandedRowKeys, selectedRow, Rowclick} = getTableEvent<Ermcp3ContractRsp>({});
-            // 表格操作按钮列表
-            const {commonBtn, forDataBtn} = getBtnList('spot_contract_performance', true);
-            // 表格列表数据
-            const {loading, tableList, queryTable} = queryTableList(3);
+import { queryTableList, Ermcp3ContractRsp } from '../index';
+import { getBizTypeName, getContractStatusName, getContractTypeName, getPriceTypeName } from '@/views/information/spot-contract/setup';
+import { Column, ColumnType } from '@/common/setup/table';
+import { formatTime, formatValue } from '@/common/methods';
+import { handlerManagerList } from '@/common/setup/user';
 
-            // 查询
-            function search(value: any) {
-                filteredInfo.value = value;
-                // 更新表信息
-                updateColumn();
-            }
+export default defineComponent({
+    name: 'spot-contract-performance',
+    components: {
+        filterCustomTable,
+        contextMenu,
+        AddSpotContract,
+        SpotContractDeatil,
+        Finish,
+        BtnList,
+    },
+    setup() {
+        // 表头数据
+        const { columns, registerColumn, updateColumn, filteredInfo } = getTableColumns();
+        // 表格事件
+        const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<Ermcp3ContractRsp>({});
+        // 表格操作按钮列表
+        const { commonBtn, forDataBtn } = getBtnList('spot_contract_performance', true);
+        // 表格列表数据
+        const { loading, tableList, queryTable } = queryTableList(3);
+        // 获取 业务账户
+        const { queryTable: queryBusinessManager, findManagerName } = handlerManagerList(loading, 1);
+        // 查询
+        function search(value: any) {
+            filteredInfo.value = value;
+            // 更新表信息
+            updateColumn();
+        }
 
-            initData(() => {
-                // 获取列表数据
-                queryTable();
-                // 注册表头信息 过滤
-                registerColumn('table_pcweb_delivery', ['contracttype', 'pricetype', 'contractno'], (e: Column, item: ColumnType, filtered: any) => {
-                    if (e.columntitle === '对手方') {
-                        item.onFilter = (value: string, record: Ermcp3ContractRsp) => {
-                            if (record.contracttype === 1) {
-                                //采购方
-                                return record.sellusername.includes(value);
-                            } else {
-                                // 销售
-                                return record.buyusername.includes(value);
-                            }
-                        };
-                        item.filteredValue = filtered.negative || null;
-                    }
-                });
+        initData(() => {
+            // 获取列表数据
+            queryTable();
+            // 注册表头信息 过滤
+            registerColumn('table_pcweb_delivery', ['contracttype', 'pricetype', 'contractno'], (e: Column, item: ColumnType, filtered: any) => {
+                if (e.columntitle === '对手方') {
+                    item.onFilter = (value: string, record: Ermcp3ContractRsp) => {
+                        if (record.contracttype === 1) {
+                            //采购方
+                            return record.sellusername.includes(value);
+                        } else {
+                            // 销售
+                            return record.buyusername.includes(value);
+                        }
+                    };
+                    item.filteredValue = filtered.negative || null;
+                }
             });
-            return {
-                columns,
-                filteredInfo,
-                expandedRowKeys,
-                selectedRow,
-                Rowclick,
-                commonBtn,
-                forDataBtn,
-                loading,
-                tableList,
-                search,
-                getBizTypeName,
-                getPriceTypeName,
-                getContractStatusName,
-                getContractTypeName,
-                queryTable,
-                formatTime,
-                formatValue,
-            };
-        },
-    });
+            queryBusinessManager();
+        });
+        return {
+            columns,
+            filteredInfo,
+            expandedRowKeys,
+            selectedRow,
+            Rowclick,
+            commonBtn,
+            forDataBtn,
+            loading,
+            tableList,
+            search,
+            getBizTypeName,
+            getPriceTypeName,
+            getContractStatusName,
+            getContractTypeName,
+            queryTable,
+            formatTime,
+            formatValue,
+        };
+    },
+});
 </script>
 
 <style lang="less">
-    .spot-contract-performance {
-    }
+.spot-contract-performance {
+}
 </style>;

+ 131 - 152
src/views/information/spot-contract/list/unsubmitted/index.vue

@@ -1,174 +1,153 @@
 <template>
-    <!-- 现货合同: 未提交-->
-    <div class="spot-contract-not-commit"
-         :loading="loading">
-        <filterCustomTable @search="search">
-            <BtnList :btnList="commonBtn"/>
-        </filterCustomTable>
-        <contextMenu :contextMenuList="forDataBtn">
-            <a-table :columns="columns"
-                     class="topTable hiddenFirstCol"
-                     :pagination="false"
-                     :expandedRowKeys="expandedRowKeys"
-                     :customRow="Rowclick"
-                     rowKey="key"
-                     :data-source="tableList">
-                <!-- 额外的展开行 -->
-                <template #expandedRowRender="{  }">
-                    <BtnList :btnList="forDataBtn"/>
-                </template>
-                <!-- <template #userinfotype="{ text }">
+  <!-- 现货合同: 未提交-->
+  <div class="spot-contract-not-commit"
+       :loading="loading">
+    <filterCustomTable @search="search">
+      <BtnList :btnList="commonBtn" />
+    </filterCustomTable>
+    <contextMenu :contextMenuList="forDataBtn">
+      <a-table :columns="columns"
+               class="topTable hiddenFirstCol"
+               :pagination="false"
+               :expandedRowKeys="expandedRowKeys"
+               :customRow="Rowclick"
+               rowKey="key"
+               :data-source="tableList">
+        <!-- 额外的展开行 -->
+        <template #expandedRowRender="{  }">
+          <BtnList :btnList="forDataBtn" />
+        </template>
+        <!-- <template #userinfotype="{ text }">
                           <a>{{ text === '2' ? '企业' : '个人'}}</a>
                         </template> -->
-                <template #biztype="{ text }">
-                    <a>{{ getBizTypeName(text) }}</a>
-                </template>
+        <template #biztype="{ text }">
+          <a>{{ getBizTypeName(text) }}</a>
+        </template>
 
-                <template #pricetype="{ text }">
-                    <a>{{ getPriceTypeName(text) }}</a>
-                </template>
+        <template #pricetype="{ text }">
+          <a>{{ getPriceTypeName(text) }}</a>
+        </template>
 
-                <template #contracctstatus="{ text }">
-                    <a>{{ getContractStatusName(text) }}</a>
-                </template>
+        <template #contracctstatus="{ text }">
+          <a>{{ getContractStatusName(text) }}</a>
+        </template>
 
-                <template #contracttype="{ text }">
-                    <a>{{ getContractTypeName(text) }}</a>
-                </template>
-                <!-- 对手方 -->
-                <template #negative="{ record }">
-                    <a>{{ record.contracttype === 1 ? record.sellusername : record.buyusername }}</a>
-                </template>
-                <!-- 点假期 -->
-                <template #startdate="{ record }">
-                    <a>{{ formatValue(formatTime(record.startdate, "d") + '--' + formatTime(record.enddate, "d")) }}</a>
-                </template>
-                <!-- 交收期 -->
-                <template #deliverystartdate="{ record }">
-                    <a>{{ formatValue(formatTime(record.deliverystartdate, "d") + '--' +
+        <template #contracttype="{ text }">
+          <a>{{ getContractTypeName(text) }}</a>
+        </template>
+        <!-- 对手方 -->
+        <template #negative="{ record }">
+          <a>{{ record.contracttype === 1 ? record.sellusername : record.buyusername }}</a>
+        </template>
+        <!-- 点假期 -->
+        <template #startdate="{ record }">
+          <a>{{ formatValue(formatTime(record.startdate, "d") + '--' + formatTime(record.enddate, "d")) }}</a>
+        </template>
+        <!-- 交收期 -->
+        <template #deliverystartdate="{ record }">
+          <a>{{ formatValue(formatTime(record.deliverystartdate, "d") + '--' +
                         formatTime(record.deliveryenddate, "d")) }}</a>
-                </template>
-            </a-table>
-        </contextMenu>
-        <!-- 新增现货合同 -->
-        <AddSpotContract @refresh="queryTable"/>
-        <!-- 现货合同: 详情 -->
-        <SpotContractDeatil :selectedRow="selectedRow"
-                            @refresh="queryTable"/>
-        <!-- 现货合同: 修改 -->
-        <ModifySpotContract :selectedRow="selectedRow"
-                            @refresh="queryTable"/>
-        <!-- 现货合同: 删除 -->
-        <DeleteSpotContract :selectedRow="selectedRow"
-                            @refresh="queryTable"/>
-        <!-- 现货合同: 重新提交 -->
-        <ResubmitSpotContract :selectedRow="selectedRow"
-                              @refresh="queryTable"/>
-    </div>
+        </template>
+      </a-table>
+    </contextMenu>
+    <!-- 新增现货合同 -->
+    <AddSpotContract @refresh="queryTable" />
+    <!-- 现货合同: 详情 -->
+    <SpotContractDeatil :selectedRow="selectedRow"
+                        @refresh="queryTable" />
+    <!-- 现货合同: 修改 -->
+    <ModifySpotContract :selectedRow="selectedRow"
+                        @refresh="queryTable" />
+    <!-- 现货合同: 删除 -->
+    <DeleteSpotContract :selectedRow="selectedRow"
+                        @refresh="queryTable" />
+  </div>
 </template>
 
 <script lang="ts">
-    import {
-        defineComponent,
-        initData,
-        getTableColumns,
-        getTableEvent,
-        getBtnList,
+import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList, contextMenu, BtnList } from '@/common/export/table';
+import { AddSpotContract, SpotContractDeatil, filterCustomTable, ModifySpotContract, DeleteSpotContract } from '../../components';
+
+import { queryTableList, Ermcp3ContractRsp } from '../index';
+import { getBizTypeName, getContractStatusName, getContractTypeName, getPriceTypeName } from '@/views/information/spot-contract/setup';
+import { Column, ColumnType } from '@/common/setup/table';
+import { formatTime, formatValue } from '@/common/methods';
+import { handlerManagerList } from '@/common/setup/user';
+
+export default defineComponent({
+    name: 'spot-contract-not-commit',
+    components: {
+        filterCustomTable,
         contextMenu,
-        BtnList
-    } from '@/common/export/table';
-    import {
         AddSpotContract,
         SpotContractDeatil,
-        filterCustomTable,
         ModifySpotContract,
         DeleteSpotContract,
-        ResubmitSpotContract
-    } from '../../components';
-
-    import {queryTableList, Ermcp3ContractRsp} from '../index';
-    import {
-        getBizTypeName,
-        getContractStatusName,
-        getContractTypeName,
-        getPriceTypeName
-    } from '@/views/information/spot-contract/setup';
-    import {Column, ColumnType} from '@/common/setup/table';
-    import {formatTime, formatValue} from "@/common/methods";
-
-    export default defineComponent({
-        name: 'spot-contract-not-commit',
-        components: {
-            filterCustomTable,
-            contextMenu,
-            AddSpotContract,
-            SpotContractDeatil,
-            ModifySpotContract,
-            DeleteSpotContract,
-            ResubmitSpotContract,
-            BtnList,
-        },
-        setup() {
-            // 表头数据
-            const {columns, registerColumn, updateColumn, filteredInfo} = getTableColumns();
-            // 表格事件
-            const {expandedRowKeys, selectedRow, Rowclick} = getTableEvent<Ermcp3ContractRsp>({});
-            // 表格操作按钮列表
-            const {commonBtn, forDataBtn} = getBtnList('spot_contract_unsubmitted', true);
-            // 表格列表数据
-            const {loading, tableList, queryTable} = queryTableList(1);
-
-            // 查询
-            function search(value: any) {
-                filteredInfo.value = value;
-                // 更新表信息
-                updateColumn();
-            }
+        BtnList,
+    },
+    setup() {
+        // 表头数据
+        const { columns, registerColumn, updateColumn, filteredInfo } = getTableColumns();
+        // 表格事件
+        const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<Ermcp3ContractRsp>({});
+        // 表格操作按钮列表
+        const { commonBtn, forDataBtn } = getBtnList('spot_contract_unsubmitted', true);
+        // 表格列表数据
+        const { loading, tableList, queryTable } = queryTableList(1);
+        // 获取 业务账户
+        const { queryTable: queryBusinessManager, findManagerName } = handlerManagerList(loading, 1);
+        // 查询
+        function search(value: any) {
+            filteredInfo.value = value;
+            // 更新表信息
+            updateColumn();
+        }
 
-            initData(() => {
-                // 获取列表数据
-                queryTable();
-                // 注册表头信息 过滤
-                registerColumn('table_pcweb_delivery', ['contracttype', 'pricetype', 'contractno'], (e: Column, item: ColumnType, filtered: any) => {
-                    if (e.columntitle === '对手方') {
-                        item.onFilter = (value: string, record: Ermcp3ContractRsp) => {
-                            if (record.contracttype === 1) {
-                                //采购方
-                                return record.sellusername.includes(value);
-                            } else {
-                                // 销售
-                                return record.buyusername.includes(value);
-                            }
-                        };
-                        item.filteredValue = filtered.negative || null;
-                    }
-                });
+        initData(() => {
+            // 获取列表数据
+            queryTable();
+            // 注册表头信息 过滤
+            registerColumn('table_pcweb_delivery', ['contracttype', 'pricetype', 'contractno'], (e: Column, item: ColumnType, filtered: any) => {
+                if (e.columntitle === '对手方') {
+                    item.onFilter = (value: string, record: Ermcp3ContractRsp) => {
+                        if (record.contracttype === 1) {
+                            //采购方
+                            return record.sellusername.includes(value);
+                        } else {
+                            // 销售
+                            return record.buyusername.includes(value);
+                        }
+                    };
+                    item.filteredValue = filtered.negative || null;
+                }
             });
-            return {
-                columns,
-                filteredInfo,
-                expandedRowKeys,
-                selectedRow,
-                Rowclick,
-                commonBtn,
-                forDataBtn,
-                loading,
-                tableList,
-                search,
-                queryTable,
-                getBizTypeName,
-                getPriceTypeName,
-                getContractStatusName,
-                getContractTypeName,
-                formatTime,
-                formatValue,
-            };
-        },
-    });
+            queryBusinessManager();
+        });
+        return {
+            columns,
+            filteredInfo,
+            expandedRowKeys,
+            selectedRow,
+            Rowclick,
+            commonBtn,
+            forDataBtn,
+            loading,
+            tableList,
+            search,
+            queryTable,
+            getBizTypeName,
+            getPriceTypeName,
+            getContractStatusName,
+            getContractTypeName,
+            formatTime,
+            formatValue,
+        };
+    },
+});
 </script>
 
 <style lang="less">
-    .spot-contract-not-commit {
-    }
+.spot-contract-not-commit {
+}
 </style
 >;