Procházet zdrojové kódy

Merge branch 'master' of http://47.101.159.18:3000/Muchinfo/MTP20_WEB_GLOBAL

li.shaoyi před 2 roky
rodič
revize
49ec4f0545

+ 1 - 1
src/business/trade/index.ts

@@ -251,7 +251,6 @@ export function useWrListingCancelOrder() {
         OperatorID: loginStore.loginId,
         OrderSrc: OrderSrc.ORDERSRC_CLIENT,
         ClientOrderTime: formatDate(new Date().toISOString()),
-        ClientSerialNo: v4(),
         ClientType: ClientType.Web,
     })
 
@@ -260,6 +259,7 @@ export function useWrListingCancelOrder() {
             loading.value = true
             return await wrListingCancelOrder({
                 data: {
+                    ClientSerialNo: v4(),
                     ...formData,
                 }
             })

+ 1 - 1
src/packages/mobile/components/base/list/index.vue

@@ -17,7 +17,7 @@
                         <td class="app-list__column" :class="column.className" v-for="(column, n) in columns"
                             :key="i + n.toString()">
                             <div class="app-list__cell">
-                                <slot :name="column.prop" :value="row[column.prop]" :row="row">{{ row[column.prop] }}
+                                <slot :name="column.prop" :value="row[column.prop]" :index="i" :row="row">{{ row[column.prop] }}
                                 </slot>
                             </div>
                         </td>

+ 2 - 1
src/packages/mobile/views/goods/detail/components/listing/Index.vue

@@ -136,7 +136,8 @@ const onRadioChange = (value: number) => {
 // 提交挂牌
 const onSubmit = () => {
     dialog({
-        message: '确认要提交吗?',
+        title: '确认要提交吗?',
+        message: '*若存在价格匹配的反方向委托订单,系统将会自动撤销',
         showCancelButton: true,
     }).then(() => {
 

+ 2 - 1
src/packages/mobile/views/goods/trade/components/delisting/index.vue

@@ -127,7 +127,8 @@ const onRadioChange = (value: number) => {
 // 提交摘牌
 const onSubmit = () => {
     dialog({
-        message: '确认要提交吗?',
+        title: '确认要提交吗?',
+        message: '*若存在价格匹配的反方向委托订单,系统将会自动撤销',
         showCancelButton: true,
     }).then(() => {
         const { goodsid, orderid, orderprice, buyorsell } = props.selectedRow

+ 2 - 2
src/packages/mobile/views/goods/trade/index.vue

@@ -18,8 +18,8 @@
                         <span>{{ row.userid }}</span>
                         <span class="text-small">{{ row.username }}</span>
                     </template>
-                    <template #operate="{ row }">
-                        <Button size="small" type="primary" round @click="onDelisting(row)" style="width: 1rem;">
+                    <template #operate="{ row, index }">
+                        <Button size="small" type="primary" v-if="index === 0" round @click="onDelisting(row)" style="width: 1rem;">
                             {{ tabIndex === BuyOrSell.Buy ? '卖出' : '买入' }}
                         </Button>
                     </template>

+ 12 - 12
src/packages/mobile/views/order/list/Index.vue

@@ -10,6 +10,18 @@
             </app-navbar>
         </template>
         <Tabs class="van-tabs--list" v-model:active="active" :swipe-threshold="4">
+            <Tab title="订单委托">
+                <component :is="componentMap.get('goodsorder')" />
+            </Tab>
+            <Tab title="订单成交">
+                <component :is="componentMap.get('goodstrade')" />
+            </Tab>
+            <Tab title="挂牌委托">
+                <component :is="componentMap.get('listingorder')" />
+            </Tab>
+            <Tab title="挂牌成交">
+                <component :is="componentMap.get('listingtrade')" />
+            </Tab>
             <Tab title="预售认购">
                 <component :is="componentMap.get('presale')" />
             </Tab>
@@ -25,18 +37,6 @@
             <Tab title="掉期成交">
                 <component :is="componentMap.get('swaptrade')" />
             </Tab>
-            <Tab title="订单委托">
-                <component :is="componentMap.get('goodsorder')" />
-            </Tab>
-            <Tab title="订单成交">
-                <component :is="componentMap.get('goodstrade')" />
-            </Tab>
-            <Tab title="挂牌委托">
-                <component :is="componentMap.get('listingorder')" />
-            </Tab>
-            <Tab title="挂牌成交">
-                <component :is="componentMap.get('listingtrade')" />
-            </Tab>
             <Tab title="点价委托">
                 <component :is="componentMap.get('pricingorder')" />
             </Tab>

+ 0 - 2
src/packages/mobile/views/order/list/components/listingorder/list/Index.vue

@@ -60,7 +60,6 @@ import { formatDate, formatDecimal } from '@/filters'
 import { useWrListingCancelOrder } from '@/business/trade'
 import { dialog } from '@/utils/vant'
 import { fullloading } from '@/utils/vant'
-
 import AppPullRefresh from '../../../../../../components/base/pull-refresh/index.vue'
 
 const componentMap = new Map<string, unknown>([
@@ -104,7 +103,6 @@ const onCancelSumit = (item: Model.WrOrderDetailRsp) => {
         formData.Header = { MarketID: 17201 }
         formData.OldWRTradeOrderID = item.wrtradeorderid
         formData.BuyOrSell = item.buyorsell
-
         /// loding....
         fullloading((hideLoading) => {
             cancelSubmit().then(() => {

+ 2 - 2
src/packages/pc/components/modules/listing/index.vue

@@ -138,8 +138,8 @@ const onSubmit = (buildType: number) => {
     formRef.value?.validate((valid) => {
         if (valid) {
             ElMessageBox.confirm(
-                '是否立即挂牌?',
-                '提示'
+                '*若存在价格匹配的反方向委托订单,系统将会自动撤销。',
+                '是否立即挂牌?'
             ).then(() => {
                 const { marketid = 0, goodsid = 0 } = quote.value ?? {}
                 /// 获取对应的市场ID

+ 33 - 5
src/packages/pc/views/auth/login/index.vue

@@ -1,15 +1,19 @@
 <template>
-  <sign-layout class="user-login" :title="islogin ? '登录' : '重置密码'">
+  <sign-layout class="user-login" :title="islogin ? '登录' : '重置密码'"  v-loading="rloading">
     <el-form ref="formRef" :model="formData" :rules="formRules" v-if="islogin">
       <el-form-item prop="userName">
-        <el-input placeholder="用户名/账号/手机号" v-model="formData.userName"></el-input>
+        <el-input placeholder="用户名/账号/手机号" v-model="formData.userName">
+          <template #append>
+            <el-checkbox v-model="remember"></el-checkbox>
+          </template>
+        </el-input>
       </el-form-item>
       <el-form-item prop="password">
         <el-input type="password" placeholder="请输入您的登录密码" v-model="formData.password">
         </el-input>
       </el-form-item>
       <el-form-item>
-        <el-checkbox label="false" v-model="remember">记住账号</el-checkbox>
+        <span class="text-link" @click="click">立即注册</span>
         <span class="text-link" @click="islogin = false">忘记密码?</span>
       </el-form-item>
       <el-form-item>
@@ -20,19 +24,30 @@
       </el-form-item>
     </el-form>
     <Forget @close="islogin = true" v-else></Forget>
+    <el-dialog v-model="isRegister" title="立即注册" width="30%" >
+      <span>手机扫描二维码进行注册</span>
+      <app-qrcode class="app-register-code__qrcode" :text="qrContent" :logo="require('../../../assets/logo.svg')" />
+      <template #footer>
+        <span class="dialog-footer">
+          <el-button @click="isRegister = false">取消</el-button>
+        </span>
+      </template>
+    </el-dialog>
   </sign-layout>
 </template>
 
 <script lang="ts" setup>
 import { shallowRef } from 'vue'
 import { useRoute, useRouter } from 'vue-router'
-import { ElMessage } from 'element-plus'
+import { ElMessage, ElDialog } from 'element-plus'
 import type { FormInstance, FormRules } from 'element-plus'
 import { ClientType } from '@/constants/client'
 import { useLogin } from '@/business/login'
 import { useMenuStore } from '@/stores'
+import service from '@/services'
 import SignLayout from '../components/layout/index.vue'
-import Forget from "../forget/index.vue";
+import Forget from "../forget/index.vue"
+import AppQrcode from '@/components/base/qrcode/index.vue'
 
 const { formData, remember, userLogin } = useLogin()
 const route = useRoute()
@@ -41,6 +56,9 @@ const menuStore = useMenuStore()
 const formRef = shallowRef<FormInstance>()
 const loading = shallowRef(false)
 const islogin = shallowRef(true)
+const isRegister = shallowRef(false)
+const qrContent = shallowRef('')
+const rloading = shallowRef(false)
 
 const formRules: FormRules = {
   userName: [
@@ -51,6 +69,16 @@ const formRules: FormRules = {
   ]
 }
 
+const click = () => {
+  rloading.value = true
+  service.onReady().then((res) => {
+    qrContent.value = res.mobileOpenUrl
+    isRegister.value = true
+  }).finally(() => {
+    rloading.value = false
+  }) 
+}
+
 const formSubmit = () => {
   formRef.value?.validate(async (valid) => {
     if (valid) {

+ 0 - 0
src/packages/pc/views/auth/register/index.vue


+ 25 - 20
src/packages/pc/views/market/trade/goods/detail/components/order/delisting/index.vue

@@ -46,7 +46,7 @@
 
 <script lang="ts" setup>
 import { shallowRef, PropType, computed } from 'vue'
-import { ElMessage, FormInstance, FormRules } from 'element-plus'
+import { ElMessage, FormInstance, FormRules, ElMessageBox } from 'element-plus'
 import { EBuildType, EDelistingType, EListingSelectType, EOrderOperateType, EPriceMode, EValidType } from '@/constants/client'
 import { BuyOrSell } from '@/constants/order'
 import { useOrder } from '@/business/trade'
@@ -104,27 +104,32 @@ const onCancel = (isRefresh = false) => {
 const onSubmit = (buildType: number) => {
     formRef.value?.validate((valid) => {
         if (valid) {
-            const { goodsid, orderid, orderprice, buyorsell } = props.selectedRow
-            const { marketid = 0 } = quote.value ?? {}
+            ElMessageBox.confirm(
+                '*若存在价格匹配的反方向委托订单,系统将会自动撤销。',
+                '是否立即摘牌?'
+            ).then(() => {
+                const { goodsid, orderid, orderprice, buyorsell } = props.selectedRow
+                const { marketid = 0 } = quote.value ?? {}
 
-            /// 获取对应的市场ID
-            formData.MarketID = marketid
-            formData.PriceMode = EPriceMode.PRICEMODE_LIMIT
-            formData.RelatedID = orderid
-            formData.OrderPrice = orderprice
-            formData.BuyOrSell = buyorsell === BuyOrSell.Buy ? BuyOrSell.Sell : BuyOrSell.Buy
-            formData.GoodsID = goodsid
-            formData.ListingSelectType = EListingSelectType.LISTINGSELECTTYPE_DELISTING
-            formData.DelistingType = EDelistingType.DELISTINGTYPE_SELECTED
-            formData.BuildType = buildType
-            formData.TimevalidType = EValidType.VALIDTYPE_DR
-            formData.OperateType = EOrderOperateType.ORDEROPERATETYPE_NORMAL
+                /// 获取对应的市场ID
+                formData.MarketID = marketid
+                formData.PriceMode = EPriceMode.PRICEMODE_LIMIT
+                formData.RelatedID = orderid
+                formData.OrderPrice = orderprice
+                formData.BuyOrSell = buyorsell === BuyOrSell.Buy ? BuyOrSell.Sell : BuyOrSell.Buy
+                formData.GoodsID = goodsid
+                formData.ListingSelectType = EListingSelectType.LISTINGSELECTTYPE_DELISTING
+                formData.DelistingType = EDelistingType.DELISTINGTYPE_SELECTED
+                formData.BuildType = buildType
+                formData.TimevalidType = EValidType.VALIDTYPE_DR
+                formData.OperateType = EOrderOperateType.ORDEROPERATETYPE_NORMAL
 
-            formSubmit().then(() => {
-                ElMessage.success('提交成功')
-                onCancel(true)
-            }).catch((err) => {
-                ElMessage.error('提交失败:' + err)
+                formSubmit().then(() => {
+                    ElMessage.success('提交成功')
+                    onCancel(true)
+                }).catch((err) => {
+                    ElMessage.error('提交失败:' + err)
+                })
             })
         }
     })