huangbin пре 4 година
родитељ
комит
9c34b5622d

+ 1 - 0
src/common/methods/table/interface.ts

@@ -6,6 +6,7 @@ export interface ColumnType {
     key: string;
     dataIndex: string;
     title: string;
+    width?: number;
     align: string; //  AlignType 对齐方式 - 1:居中对齐 2:左对齐 3:右对齐
     filteredValue?: string | null;
     slots?: CustomRender;

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

@@ -30,7 +30,10 @@ export function getTableColumns() {
         const filtered = filteredInfo.value || {};
         columns.value.length = 0;
         list.forEach((e, i) => {
-            const { columnfield, columntitle, aligntype } = e;
+            console.log(e);
+
+            const { columnfield, columntitle, columnwidth, aligntype } = e;
+
             const item: ColumnType = {
                 key: String(i),
                 dataIndex: columnfield, // 表格数据对应的key
@@ -38,6 +41,9 @@ export function getTableColumns() {
                 align: aligntype === 1 ? 'center' : aligntype === 2 ? 'left' : 'right',
                 slots: { customRender: columnfield },
             };
+            if (columnwidth) {
+                item.width = +columnwidth
+            }
             // 以下添加过滤数据对应的方法
             filterKeyList.forEach(el => {
                 if (e.columnfield === el) {

+ 55 - 37
src/views/information/account_info/compoments/detail-futures/index.vue

@@ -4,7 +4,7 @@
            title="账号详情"
            v-model:visible="visible"
            centered
-           :maskClosable="maskClosableFlag"
+           maskClosable="false"
            @cancel="cancel"
            width="890px">
     <template #footer>
@@ -23,51 +23,57 @@
         </a-col>
         <a-col :span="12">
           <a-form-item label="账户名称"
-                       name="logincode">
+                       name="accountname">
             <a-input class="dialogInput"
                      readonly
                      style="width: 200px"
-                     v-model:value="formState.logincode"
+                     v-model:value="formState.accountname"
                      placeholder="请输入账户名称" />
           </a-form-item>
         </a-col>
         <a-col :span="12">
-          <a-form-item label="登录账号"
-                       name="accountname">
-            <a-input class="dialogInput"
-                     style="width: 200px"
-                     readonly
-                     v-model:value="formState.accountname"
-                     placeholder="请输入登录账号" />
+          <a-form-item label="期货保证金"
+                       name="trademargintmpid">
+            <a-select class="inlineFormSelect"
+                      style="width: 200px"
+                      v-model:value="formState.tradefeetmpid"
+                      placeholder="请选择期货手续费">
+              <a-select-option v-for="item in feeList"
+                               :key="item.tradeconfigtmpid"
+                               :value="item.tradeconfigtmpid">
+                {{item.tradeconfigtmpname}}
+              </a-select-option>
+            </a-select>
           </a-form-item>
         </a-col>
         <a-col :span="12">
-          <a-form-item label="手机号码"
-                       name="mobile">
-            <a-input class="dialogInput"
-                     v-model:value="formState.mobile"
-                     style="width: 200px"
-                     readonly
-                     placeholder="请输入手机号码" />
+          <a-form-item label="期货手续费"
+                       name="tradefeetmpid">
+            <a-select class="inlineFormSelect"
+                      style="width: 200px"
+                      v-model:value="formState.tradefeetmpid"
+                      placeholder="请选择期货手续费">
+              <a-select-option v-for="item in feeList"
+                               :key="item.tradeconfigtmpid"
+                               :value="item.tradeconfigtmpid">
+                {{item.tradeconfigtmpname}}
+              </a-select-option>
+            </a-select>
           </a-form-item>
         </a-col>
         <a-col :span="24">
-          <a-form-item label="授权期货账户"
-                       class="checkboxGroupItem"
-                       name="logintaaccounts">
-            <a-checkbox-group class="commonCheckboxGroup"
-                              v-model:value="formState.logintaaccounts">
-              <a-row>
-                <a-col :span="12"
-                       v-for="(item, index) in selectedData.acclist"
-                       :key="index">
-                  <a-checkbox disabled
-                              :value="item.accountid">
-                    {{item.accountname}}/{{item.accountid}}
-                  </a-checkbox>
-                </a-col>
-              </a-row>
-            </a-checkbox-group>
+          <a-form-item label="指定交易用户"
+                       name="traderUserId">
+            <a-select class="inlineFormSelect"
+                      style="width: 200px"
+                      v-model:value="formState.traderUserId"
+                      placeholder="请选择交易用户">
+              <a-select-option v-for="item in tableList"
+                               :key="item.roleid"
+                               :value="item.roleid">
+                {{item.rolename}}
+              </a-select-option>
+            </a-select>
           </a-form-item>
         </a-col>
       </a-row>
@@ -76,11 +82,13 @@
 </template>
 
 <script lang="ts">
-import { defineComponent, PropType, watchEffect } from 'vue';
+import { defineComponent, PropType, ref, watchEffect } from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
 import { mergeTwoObj } from '@/utils/objHandle';
 import { handleBusinessForm, handleRoleName } from '../setup';
 import { ErmcpLoginUser, ErmcpLoginUserEx, ErmcpTaAccount } from '@/services/go/ermcp/account/interface';
+import { handlerManagerList } from '@/common/setup/user';
+import { handleTradeTemplate } from '../add-child-futures/setup';
 
 export default defineComponent({
     name: 'trader-detail',
@@ -103,8 +111,16 @@ export default defineComponent({
         const { visible, cancel } = closeModal('detail');
         const { formState } = handleBusinessForm();
         const { rolename, getRoleName } = handleRoleName();
+        const loading = ref<boolean>(false);
+                // 交易用户
+        const { tableList, queryTable } = handlerManagerList(loading, 2);
+        // 交易模板
+        const { marginList, feeList, queryTemplate } = handleTradeTemplate();
         watchEffect(() => {
             if (visible.value) {
+              console.log('selectedData', props.selectedData);
+               queryTable();
+                queryTemplate();
                 const { selectedData, tableList } = props;
                 mergeTwoObj(formState, selectedData);
                 // getRoleName(tableList, selectedData);
@@ -113,11 +129,13 @@ export default defineComponent({
             }
         });
         return {
+                        formState,
+            tableList,
+            marginList,
+            feeList,
             visible,
             cancel,
-            formState,
-            maskClosableFlag: false,
-            rolename,
+            loading,
         };
     },
 });