Forráskód Böngészése

Merge branch 'v20' of http://47.101.159.18:3000/Muchinfo/MTP20_WEB_GLOBAL into v20

li.shaoyi 2 éve
szülő
commit
bef8b45eb5

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

@@ -89,6 +89,12 @@ const { pageIndex, loading, run, pageCount } = useRequest(queryTjmdTradeOrderDet
     }
 })
 
+/// 每隔 30 秒去刷新请求数据信息
+setTimeout(() => {
+    // 获取买卖大厅数据
+    run()
+}, 30*1000)
+
 const onRefresh = () => {
     run({
         buyorsell: tabIndex.value,

+ 14 - 4
src/packages/mobile/views/swap/detail/components/delisting/Index.vue

@@ -29,13 +29,21 @@
                     <span>{{ selectedRow.orderprice }}</span>
                 </template>
             </Field>
+            <Field label="挂牌价格" v-if="selectedRow.pricemode === 3">
+                <template #input>
+                    <RadioGroup v-model="priceMode" direction='horizontal'>
+                        <Radio :name="1">市价</Radio>
+                        <Radio :name="2">限价</Radio>
+                    </RadioGroup>
+                </template>
+            </Field>
             <Field label="可摘数量">
                 <template #input>
                     <span>{{ selectedRow.orderqty }}</span>
                 </template>
             </Field>
-            <el-form-item v-if="priceMove === 3" prop="OrderPrice" label="摘牌价格">
-                <el-input-number placeholder="请输入" :min="0" :step="Math.pow(10, -1*(goods?.decimalplace ?? 0))" :precision="(goods?.decimalplace ?? 2)" v-model="formData.OrderPrice" @change="calculateDelistingAmount"/>
+            <el-form-item v-if="priceMove === 3" prop="OrderPrice" :label="selectedRow.buyorsell === 0 ? '卖出价格' : '买入价格'">
+                <el-input-number placeholder="请输入" :min="0.0" :step="Math.pow(10, -1*(goods?.decimalplace ?? 0))" :precision="(goods?.decimalplace ?? 2)" v-model="formData.OrderPrice" @change="calculateDelistingAmount"/>
             </el-form-item>
             <Field name="OrderQty" :rules="formRules.OrderQty" label="摘牌数量">
                 <template #input>
@@ -68,7 +76,7 @@
             </Field>
         </Form>
         <template #footer>
-            <Button type="danger" block round @click="formRef?.submit">摘牌</Button>
+            <Button type="danger" block round @click="formRef?.submit">{{ selectedRow.buyorsell === 0 ? '卖出' : '买入' }}</Button>
         </template>
     </app-popup>
 </template>
@@ -115,6 +123,8 @@ const amount = shallowRef(0.0)
 const permargin = shallowRef(0.0)
 /// 价格类型
 const priceMove = shallowRef(props.selectedRow.pricemode)
+/// 价格类型
+const priceMode = shallowRef(EPriceMode.PRICEMODE_MARKET)
 /// 保证金配置
 const margin = shallowRef<Model.TjmdTodayAccountMarginRsp>()
 /// 商品信息
@@ -185,7 +195,7 @@ const onSubmit = () => {
 
     /// 获取对应的市场ID
     formData.MarketID = marketid
-    formData.PriceMode = priceMove.value === EPriceMode.PRICEMODE_LIMIT ? EPriceMode.PRICEMODE_LIMIT : EPriceMode.PRICEMODE_MARKET
+    formData.PriceMode = priceMove.value === EPriceMode.PRICEMODE_LIMIT ? EPriceMode.PRICEMODE_LIMIT : priceMode.value
     formData.RelatedID = handleRequestBigNumber(orderid)
     formData.BuyOrSell = buyorsell === BuyOrSell.Buy ? BuyOrSell.Sell : BuyOrSell.Buy
     formData.GoodsID = goodsid

+ 7 - 2
src/packages/pc/views/footer/swap/order/index.vue

@@ -6,10 +6,14 @@
         <template #wrtradetype="{ row }">
             {{ row.goodscode }}/{{ row.goodsname }}
         </template>
-        <!-- 方向 -->
-        <template #buyorsell="{ value }">
+         <!-- 方向 -->
+         <template #buyorsell="{ value }">
             {{ getBuyOrSellName(value) }}
         </template>
+        <!-- 类型 -->
+        <template #pricemode="{ value }">
+            {{ value === 2 ? '固定价' : '浮动价' }}
+        </template>
         <!-- 委托状态 -->
         <template #orderstatus="{ value }">
             {{ getWRTradeOrderStatusName(value) }}
@@ -63,6 +67,7 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { prop: 'orderid', label: '委托单号' },
     { prop: 'goodsname', label: '商品代码/名称' },
     { prop: 'buyorsell', label: '方向' },
+    { prop: 'pricemode', label: '类型' },
     { prop: 'orderqty', label: '委托数量' },
     { prop: 'orderprice', label: '委托价格' },
     { prop: 'tradeqty', label: '成交数量' },

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

@@ -20,6 +20,12 @@
             <el-form-item label="挂牌价格">
                 <span>{{ selectedRow.orderprice }}</span>
             </el-form-item>
+            <el-form-item label="卖出价格" v-if="selectedRow.pricemode === 3" prop="PriceMode">
+                <el-radio-group v-model="priceMode">
+                    <el-radio :label="1">市价</el-radio>
+                    <el-radio :label="2">限价</el-radio>
+                </el-radio-group>
+            </el-form-item>
             <el-form-item label="可摘数量">
                 <span>{{ selectedRow.orderqty }}</span>
             </el-form-item>
@@ -35,8 +41,8 @@
             <el-form-item label="可用资金">
                 <span>{{ accountStore.currentAccount.avaiableMoney?.toFixed(2) }}</span>
             </el-form-item>
-            <el-form-item v-if="priceMove === 3" prop="OrderPrice" label="摘牌价格">
-                <el-input-number placeholder="请输入" :min="0" :step="Math.pow(10, -1*(goods?.decimalplace ?? 0))" :precision="(goods?.decimalplace ?? 2)" v-model="formData.OrderPrice" @change="calculateDelistingAmount"/>
+            <el-form-item v-if="priceMove === 3" prop="OrderPrice" :label="selectedRow.buyorsell === 0 ? '卖出价格' : '买入价格'">
+                <el-input-number placeholder="请输入" :min="0.0" :step="Math.pow(10, -1*(goods?.decimalplace ?? 0))" :precision="(goods?.decimalplace ?? 2)" v-model="formData.OrderPrice" @change="calculateDelistingAmount"/>
             </el-form-item>
             <el-form-item prop="OrderQty" label="摘牌数量">
                 <div class="g-qty-group">
@@ -84,6 +90,8 @@ const userStore = useUserStore()
 
 /// 价格类型
 const priceMove = shallowRef(props.selectedRow.pricemode)
+/// 价格类型
+const priceMode = shallowRef(EPriceMode.PRICEMODE_MARKET)
 /// 挂牌金额
 const amount = shallowRef(0.0)
 /// 履约保证金
@@ -187,7 +195,7 @@ const onSubmit = (buildType: number) => {
 
                 /// 获取对应的市场ID
                 formData.MarketID = marketid
-                formData.PriceMode = priceMove.value === EPriceMode.PRICEMODE_LIMIT ? EPriceMode.PRICEMODE_LIMIT : EPriceMode.PRICEMODE_MARKET
+                formData.PriceMode = priceMove.value === EPriceMode.PRICEMODE_LIMIT ? EPriceMode.PRICEMODE_LIMIT : priceMode.value
                 formData.RelatedID = handleRequestBigNumber(orderid)
                 formData.BuyOrSell = buyorsell === BuyOrSell.Buy ? BuyOrSell.Sell : BuyOrSell.Buy
                 formData.GoodsID = goodsid
@@ -196,7 +204,6 @@ const onSubmit = (buildType: number) => {
                 formData.BuildType = buildType
                 formData.TimevalidType = EValidType.VALIDTYPE_DR
                 formData.OperateType = EOrderOperateType.ORDEROPERATETYPE_NORMAL
-                formData.MarketMaxSub = priceMove.value === EPriceMode.PRICEMODE_LIMIT ? 0.0 : formData.MarketMaxSub
                 
                 formSubmit().then(() => {
                     ElMessage.success('提交成功')

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

@@ -74,6 +74,14 @@ const { dataList: sellList, run: getSellList } = useRequest(queryTjmdTradeOrderD
     },
 })
 
+/// 每隔 30 秒去刷新请求数据信息
+setTimeout(() => {
+    // 获取买大厅数据
+    getBuyList()
+    // 获取卖大厅数据
+    getSellList()
+}, 30*1000)
+
 const buyColumns = shallowRef<Model.TableColumn[]>([
     { prop: 'orderprice', label: '买价' },
     { prop: 'orderqty', label: '买量' },

+ 5 - 0
src/packages/pc/views/query/order/swap/history/index.vue

@@ -13,6 +13,10 @@
          <template #buyorsell="{ value }">
             {{ getBuyOrSellName(value) }}
         </template>
+        <!-- 类型 -->
+        <template #pricemode="{ value }">
+            {{ value === 2 ? '固定价' : '浮动价' }}
+        </template>
         <!-- 商品代码/名称 -->
         <template #goodsname="{ row }">
             {{ row.goodscode }}/{{ row.goodsname }}
@@ -56,6 +60,7 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { prop: 'orderid', label: '委托单号' },
     { prop: 'goodsname', label: '商品代码/名称' },
     { prop: 'buyorsell', label: '方向' },
+    { prop: 'pricemode', label: '类型' },
     { prop: 'orderqty', label: '委托数量' },
     { prop: 'orderprice', label: '委托价格' },
     { prop: 'tradeqty', label: '成交数量' },

+ 5 - 0
src/packages/pc/views/query/order/swap/list/index.vue

@@ -5,6 +5,10 @@
         <template #buyorsell="{ value }">
             {{ getBuyOrSellName(value) }}
         </template>
+        <!-- 类型 -->
+        <template #pricemode="{ value }">
+            {{ value === 2 ? '固定价' : '浮动价' }}
+        </template>
         <!-- 商品代码/名称 -->
         <template #goodsname="{ row }">
             {{ row.goodscode }}/{{ row.goodsname }}
@@ -38,6 +42,7 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { prop: 'orderid', label: '委托单号' },
     { prop: 'goodsname', label: '商品代码/名称' },
     { prop: 'buyorsell', label: '方向' },
+    { prop: 'pricemode', label: '类型' },
     { prop: 'orderqty', label: '委托数量' },
     { prop: 'orderprice', label: '委托价格' },
     { prop: 'tradeqty', label: '成交数量' },