huangbin 4 anos atrás
pai
commit
c0a41bfa47

+ 0 - 1
src/common/setup/table/button.ts

@@ -229,7 +229,6 @@ export function getBtnList_(menuType: EnumRouterName, hasDetail: boolean) {
  */
 export function getButtonList(menuType: EnumRouterName, hasDetail: boolean) {
     const list = findChildList(menuType)
-    debugger
     const result = [] // 操作按钮列表
     if (list && list.children) {
         list.children.forEach(el => {

+ 0 - 2
src/services/socket/protobuf/buildReq.ts

@@ -277,7 +277,6 @@ export function protoMiddleware<T>(param: T, reqName: string, rspName: string, h
         const code = rspName ? funCode[rspName] : undefined
         APP.sendTradingServer(package50, code, {
             onSuccess: (res) => {
-                debugger
                 const { isSuccess, result } = parseProtoRsp50(res, rspName);
                 if (isSuccess) {
                     resolve(result);
@@ -286,7 +285,6 @@ export function protoMiddleware<T>(param: T, reqName: string, rspName: string, h
                 }
             },
             onFail: (err) => {
-                debugger
                 console.log(`proto:${reqName}错误消息:${err}`)
                 reject(err.message)
             },

+ 8 - 11
src/views/market/spot_trade/spot_trade_order_transaction/setup.ts

@@ -20,6 +20,7 @@ export function handleDeliveryRelation(param: deliverytype[]) {
     function queryAction() {
         const marketid = getMarketByTradeMode(TradeMode.ListingAndSelection)!.marketid
         queryDeliveryRelation({ marketid }).then(res => {
+            goodsList.value.length = 0
             allDeliverGoods.value = res
             deliverGoods.value = getDeliverGoods()
             res.forEach(el => {
@@ -38,14 +39,13 @@ export function handleDeliveryRelation(param: deliverytype[]) {
         return allDeliverGoods.value.filter(e => param.includes(e.deliverytype as deliverytype))
     }
     initData(() => {
-        // if (allDeliverGoods.value.length === 0) {
-        //     // 从服务交割商品
-        //     queryAction()
-        // } else {
-        //     // 从缓存中获取交割商品
-        //     deliverGoods.value = getDeliverGoods()
-        // }
-        queryAction()
+        if (allDeliverGoods.value.length === 0) {
+            // 从服务交割商品
+            queryAction()
+        } else {
+            // 从缓存中获取交割商品
+            deliverGoods.value = getDeliverGoods()
+        }
     })
     // 更新交割商品
     function updateGeliverGoods() {
@@ -53,9 +53,6 @@ export function handleDeliveryRelation(param: deliverytype[]) {
     }
     // 获取对应的行情
     function getQuoteList() {
-        // const result = ref<QueryQuoteDayRsp[]>([])
-
-        // return goodsList.value
         return goodsList.value.filter(e => param.includes((e as unknown as any).deliverytype))
     }
     // 通过goodscode 查找交割商品

+ 18 - 5
src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_blocs/components/post-buying/index.vue

@@ -109,13 +109,14 @@
               <a-form-item label="指定朋友"
                            class="inputIconBox">
                 <span class="clickBox"
-                      @click="openFriend">{{frineds ? `已选${frineds.length}人` : '选择朋友'}}</span>
+                      @click="openFriend">{{getFriendLength() ? `已选${getFriendLength() }人` : '选择朋友'}}</span>
                 <svg class="icon svg-icon"
                      aria-hidden="true"
                      @click="openFriend">
                   <use xlink:href="#icon-pengyou1" />
                 </svg>
-                <a-checkbox class="commonCheckbox">不限</a-checkbox>
+                <a-checkbox class="commonCheckbox"
+                            v-model:checked="friendCheck" @change="limiteFriends">不限</a-checkbox>
               </a-form-item>
             </a-col>
             <a-col :span="24">
@@ -264,7 +265,16 @@ const useFriends = (formState: UnwrapRef<FormParam>) => {
     function openFriend() {
         showFriend.value = true;
     }
-    return { friendCheck, showFriend, chooseFriend, openFriend };
+    function getFriendLength() {
+        return formState.friends.length;
+    }
+    // 是否 不限好友
+    function limiteFriends() {
+        if(friendCheck.value) {
+            formState.friends.length = 0
+        }
+    }
+    return { friendCheck, showFriend, chooseFriend, openFriend, getFriendLength, limiteFriends };
 };
 
 // 履约模板
@@ -298,7 +308,7 @@ export default defineComponent({
         // 表单
         const { rules, formState, formRef } = handleForm();
         // 选择朋友
-        const { friendCheck, showFriend, chooseFriend, openFriend } = useFriends(formState);
+        const { friendCheck, showFriend, chooseFriend, openFriend, getFriendLength, limiteFriends } = useFriends(formState);
         // 履约模板
         const { showPermance, choosePermance, openPermance } = usePermaceTemp(formState);
         const loading = ref<boolean>(false);
@@ -333,7 +343,7 @@ export default defineComponent({
                         // WRFactorTypeId: '2121626946446000001', // 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写 uint64
                         WRFactorTypeId: props.selectedRow.wrfactortypeid ? props.selectedRow.wrfactortypeid : 0, // 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写 uint64
                         IsSpecified: 1, // 是否指定对手 0:不指定 1:指定 uint32
-                        MatchUserIDs: friendCheck.value ? [] : res.friends, // 仓单贸易对手资金账号ID集合(指定对手时填写) uint32
+                        MatchUserIDs: res.friends, // 仓单贸易对手资金账号ID集合(指定对手时填写) uint32
                         OrderQty: res.OrderQty, // 委托数量(可挂部分数据量) ======
                         DeliveryGoodsID: props.selectedRow.deliverygoodsid, // 交割商品商品ID  // 有仓单求购
                         WRPriceType: 1, // 价格方式 1:固定价 2:浮动价
@@ -398,9 +408,12 @@ export default defineComponent({
             numCheck,
             increaseNumber,
             decreaseNumber,
+            friendCheck,
             showFriend,
             chooseFriend,
             openFriend,
+            getFriendLength,
+            limiteFriends,
         };
     },
 });