Ver código fonte

重新提交现货合同

huangbin 4 anos atrás
pai
commit
1f3eed37aa

+ 26 - 21
src/views/information/spot-contract/components/modify/index.vue

@@ -351,9 +351,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>
@@ -368,9 +368,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>
@@ -383,9 +383,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>
@@ -422,6 +422,8 @@ import { handleFormRule, handleContract, handleDeliveryGoods, handleAmout, handl
 import { addContractReq } from '@/views/information/spot-contract/components/add/setup';
 import { mergeTwoObj } from '@/utils/objHandle';
 import { validateAction } from '@/common/setup/form';
+import { ErmcpLoginUser } from '@/services/go/ermcp/account/interface';
+import { handlerManagerList } from '@/common/setup/user';
 
 export default defineComponent({
     name: 'spot_contract_btn_modify',
@@ -437,8 +439,6 @@ export default defineComponent({
         const loading = ref<boolean>(false);
         const { sendReq } = addContractReq();
         const { formState, businessType } = handleFromState();
-        console.log('props.selectedRow', props.selectedRow);
-
         // 表单
         const formRef = ref();
 
@@ -454,8 +454,13 @@ export default defineComponent({
         const { deliveryDate, priceDate, disabledDate } = handleDate();
         // 处理金额
         const { getAmout } = handleAmout(formState);
-        // 账号列表: 交易用户 业务员 跟单员
-        const { traderList, businesserList, merchandiserList, getRoleList, getBusinesserList } = handleAccountManager();
+        // 获取 业务账户
+        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 goodsList = ref<Goods[]>([]);
         watchEffect(() => {
@@ -463,7 +468,14 @@ export default defineComponent({
             // formState.ContractAttachment = new Uint8Array()
             // formState.SpotGoodsBrandID = +props.selectedRow.spotcontractid
             if (visible.value) {
-                console.log('props.selectedRow', props.selectedRow);
+                queryCustomList();
+                getDeliveryGoods();
+                goodsList.value = getGoodsList();
+                queryBusinessManager().then(() => {
+                    businesserList.value = getBusinesserOrMerchandiser('22');
+                    merchandiserList.value = getBusinesserOrMerchandiser('23');
+                });
+                queryTradeManager();
 
                 mergeTwoObj(formState, props.selectedRow);
                 const { deliverygoodsid, qty, price } = props.selectedRow;
@@ -504,13 +516,6 @@ export default defineComponent({
                     .catch((err) => {});
             });
         }
-        initData(() => {
-            queryCustomList();
-            getDeliveryGoods();
-            goodsList.value = getGoodsList();
-            getRoleList();
-            getBusinesserList();
-        });
         return {
             visible,
             cancel,