Handy_Cao 2 سال پیش
والد
کامیت
f7ca8dbba0

+ 4 - 0
src/packages/mobile/views/swap/detail/Index.vue

@@ -107,6 +107,10 @@ const { pageIndex, loading, run, pageCount } = useRequest(queryTjmdTradeOrderDet
 })
 
 const getDelistingButtonTitles = (tab: number, row: Model.TjmdTradeOrderDetailRsp) => {
+    /// 如果是机构自己的单 不能签署
+    if (row.userid === getUserId() ) {
+        return tab === BuyOrSell.Buy ? '卖出' : '买入'
+    }
     switch (status(row)) {
         case 1:
             return '签署'

+ 2 - 4
src/packages/mobile/views/swap/detail/components/listing/Index.vue

@@ -132,7 +132,7 @@ const margin = shallowRef<Model.TjmdTodayAccountMarginRsp>()
 /// 商品信息
 const goods = computed(() => futuresStore.getGoods(props.item.goodsid) ) 
 /// 上下点差范围
-const { maxspread = 1000, minspread = -1000 } = futuresStore.getGoods(props.item.goodsid) ?? {} 
+const { maxspread = 1000, minspread = -1000, marketid, goodsid } = futuresStore.getGoods(props.item.goodsid) ?? {} 
 /// 估算价
 const estimateprice = shallowRef(quote.value?.last ?? 0.0)
 /// 买卖方向
@@ -196,10 +196,8 @@ const onRadioChange = (value: number) => {
 
 // 提交挂牌
 const onSubmit = () => {
-    /// 买卖方向
-    const { goodsid } = props.item ?? {}
     /// 获取对应的市场ID
-    formData.MarketID = futuresStore.getGoodsMarket(goodsid)
+    formData.MarketID = marketid
     formData.BuyOrSell = buyOrSell.value
     formData.OrderPrice = priceMove.value === EPriceMode.PRICEMODE_LIMIT ? formData.OrderPrice : 0.0
     formData.PriceMode = priceMove.value

+ 2 - 4
src/packages/pc/views/market/trade/swap/detail/listing/index.vue

@@ -92,7 +92,7 @@ const refresh = shallowRef(false)
 const formRef = shallowRef<FormInstance>()
 const qtyStepList = [1, 5, 10, 20, 30, 50] // 数量步长列表
 const qtyStep = shallowRef(qtyStepList[0]) // 数量步长
-const { maxspread = 1000, minspread = -1000 } = futuresStore.getGoods(props.quoteGoods.goodsid) ?? {}
+const { maxspread = 1000, minspread = -1000, marketid, goodsid } = futuresStore.getGoods(props.quoteGoods.goodsid) ?? {}
 
 // 商品盘面
 const quote = futuresStore.getGoodsQuote(props.quoteGoods.refgoodsid) ?? {}
@@ -197,10 +197,8 @@ const onSubmit = () => {
     formRef.value?.validate((valid) => {
         if (valid) {
             ElMessageBox.confirm('是否立即挂牌?').then(() => {
-                /// 买卖方向
-                const { goodsid } = props.quoteGoods ?? {}
                 /// 获取对应的市场ID
-                formData.MarketID = futuresStore.getGoodsMarket(goodsid)
+                formData.MarketID = marketid
                 formData.OrderPrice = priceMove.value === EPriceMode.PRICEMODE_LIMIT ? formData.OrderPrice : 0.0
                 formData.PriceMode = priceMove.value
                 formData.MarketMaxSub = priceMove.value === EPriceMode.PRICEMODE_LIMIT ? 0.0 : formData.MarketMaxSub

+ 4 - 0
src/packages/pc/views/market/trade/swap/detail/order/index.vue

@@ -75,6 +75,10 @@ const { componentRef, componentId, openComponent, closeComponent } = useComponen
 })
 
 const getDelistingButtonTitles = (tab: number, row: Model.TjmdTradeOrderDetailRsp) => {
+    /// 如果是机构自己的单 不能签署
+    if (row.userid === getUserId() ) {
+        return tab === BuyOrSell.Buy ? '卖出' : '买入'
+    }
     switch (status(row)) {
         case 1:
             return '签署'