huangbin 4 rokov pred
rodič
commit
7f70327d3f

+ 1 - 1
public/config/app.config.json

@@ -1,3 +1,3 @@
 {
-    "apiUrl": "http://192.168.31.139:8080/cfg?key=test_139"
+    "apiUrl": "http://192.168.31.204:8080/cfg?key=test_204"
 }

+ 1 - 1
src/services/proto/warehousetrade/interface.ts

@@ -69,7 +69,7 @@ export interface HdWRDealOrderReq {
     OperatorID: number; // uint64 操作员账号ID
     BuyOrSell: number; // uint32 买卖方向
     ApplyID: number; // uint64 申请ID
-    LadingBillId?: string; // uint64 提单id(wrholdlb的LadingBillId字段),卖的时候填写
+    LadingBillId?: number | string; // uint64 提单id(wrholdlb的LadingBillId字段),卖的时候填写
     SubNum: number; // uint64 提单子单号(wrholdlb的SubNum字段),卖的时候填写
     WRFactorTypeId: number; // uint64 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写
     TradeDate: string; // string 交易日

+ 1 - 1
src/services/socket/quota/adapter/index.ts

@@ -130,7 +130,7 @@ export function parseReceivePush(quotationData: any) {
         if (itemQuote) {
             const goods = getGoodsByCode(itemQuote.goodscode);
             if (goods) {
-                console.log('goodsQuoteTik', goodsQuoteTik)
+                // console.log('goodsQuoteTik', goodsQuoteTik)
                 // 处理报价小数为
                 const decimalplace = goods.decimalplace
                 const num = Math.pow(10, decimalplace)

+ 8 - 1
src/views/market/spot_trade/components/buy-sell-market/components/delisting/index.vue

@@ -176,6 +176,7 @@ import { BuyOrSell } from '@/common/constants/enumCommon';
 import { EnumRouterName } from '@/common/constants/enumRouterName';
 import { getCanUseMoney } from '@/services/bus/account';
 import { getQuoteDayInfoByCodeFindPrice } from '@/services/bus/goods';
+import { message } from 'ant-design-vue';
 export default defineComponent({
     name: ModalEnum.spot_trade_warehouse_financing_delisting,
     components: { Drawer, PlusOutlined, MinusOutlined },
@@ -229,6 +230,10 @@ export default defineComponent({
             return result;
         }
         function submit() {
+            if (getMaxNum() === 0) {
+                message.error('没有可用的预售仓单头寸');
+                return;
+            }
             validateAction<ListingForm>(formRef, formState).then((res) => {
                 // 首先确定  这是仓单贸易的有仓单挂摘牌 HasWr = 1
                 // 其次判断  摘牌 1。摘买 (需要通过自己的仓单进行摘买)  2。摘卖 (不需要通过仓单)
@@ -245,7 +250,7 @@ export default defineComponent({
                     OperatorID: getUserId(), // uint64 操作员账号ID
                     BuyOrSell: 0, // uint32 买卖方向
                     ApplyID: 0, // uint64 申请ID
-                    // LadingBillId: 0, // uint64 提单id(wrholdlb的LadingBillId字段),卖的时候填写
+                    LadingBillId: 0, // uint64 提单id(wrholdlb的LadingBillId字段),卖的时候填写
                     SubNum: 0, // uint64 提单子单号(wrholdlb的SubNum字段),卖的时候填写
                     WRFactorTypeId: props.parantSelectedRow.wrfactortypeid, // uint64 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写
                     TradeDate: moment().format('YYYYMMDD'), // string 交易日
@@ -261,6 +266,8 @@ export default defineComponent({
                     const item = wrHoldList.value.find((el) => el.id === res.LadingBillId);
                     if (item) {
                         param.SubNum = +item.subnum;
+                    } else {
+                        param.LadingBillId = 0;
                     }
                 } else {
                     param.BuyOrSell = 0;

+ 1 - 1
src/views/market/spot_trade/components/buy-sell-market/components/delisting/setup.ts

@@ -117,7 +117,7 @@ export function handleNumAndMoney(enumName: EnumRouterName, buyOrSell: BuyOrSell
                     // 获取头寸
                     const item = wrPostion.value.find(e => String(e.wrfactortypeid) === String(parantSelectedRow.wrfactortypeid))
                     if (item) {
-                        result = item.enalbeqty
+                        result = Math.min(item.creditenableqty, selectedRow.orderqty)
                     }
                 }
             }