li.shaoyi 1 year ago
parent
commit
6bd39e4b91

+ 1 - 1
app/package.json

@@ -1,6 +1,6 @@
 {
   "name": "trading",
-  "version": "1.0.5",
+  "version": "1.0.22",
   "main": "main.js",
   "dependencies": {
     "electron-updater": "^6.1.4",

+ 2 - 2
oem/zrwyt/config/appconfig.json

@@ -1,8 +1,8 @@
 {
   "appId": "com.muchinfo.zrwyt",
   "appName": "中融文遗通",
-  "version": "1.0.21",
-  "versionCode": "100021",
+  "version": "1.0.22",
+  "versionCode": "100022",
   "apiUrl": "http://192.168.31.205:8080/cfg?key=test_205",
   "tradeChannel": "ws",
   "modules": [

+ 1 - 1
public/config/appconfig.json

@@ -1,6 +1,6 @@
 {
   "appId": "com.muchinfo.app",
-  "appName": "多元世纪交易中心",
+  "appName": "多元世纪",
   "version": "1.0.5",
   "versionCode": "10005",
   "apiUrl": "http://192.168.31.204:8080/cfg?key=test_204",

+ 1 - 2
src/packages/mobile/components/base/table/index.less

@@ -35,12 +35,11 @@
         }
 
         .vxe-cell {
-            display: flex;
-            flex-direction: column;
             line-height: normal;
             white-space: nowrap;
 
             .text-small {
+                display: block;
                 font-size: 12px;
                 color: #999;
             }

+ 9 - 2
src/packages/mobile/components/base/table/index.vue

@@ -1,8 +1,9 @@
 <template>
     <div class="app-table">
-        <vxe-table :data="dataList" border="inner" align="center" show-overflow>
+        <vxe-table :data="dataList" border="inner" align="center" @cell-click="rowClick">
             <template v-for="(item, index) in tableColumns" :key="index">
-                <vxe-column :field="item.prop" :title="item.label" :min-width="item.width" :fixed="item.fixed">
+                <vxe-column :field="item.prop" :title="item.label" :min-width="item.width" :fixed="item.fixed"
+                    show-overflow>
                     <template #default="{ row, rowIndex }">
                         <slot :name="item.prop" :row="row" :index="rowIndex" :value="row[item.prop]">
                             {{ row[item.prop] }}
@@ -29,10 +30,16 @@ const props = defineProps({
     },
 })
 
+const emit = defineEmits(['rowClick'])
+
 const tableColumns = computed(() => props.columns.map((item) => ({
     width: 80,
     ...item
 })))
+
+const rowClick = ({ row, rowIndex }: { row: unknown, rowIndex: number }) => {
+    emit('rowClick', row, rowIndex)
+}
 </script>
 
 <style lang="less">

+ 9 - 3
src/packages/mobile/views/order/position/components/goods/list/Index.vue

@@ -62,7 +62,7 @@ import { useComponent } from '@/hooks/component'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
 import { getBuyOrSellName, BuyOrSell } from '@/constants/order'
 import { formatDecimal, handleNumberValue } from '@/filters'
-import { useGlobalStore, useUserStore, usePositionStore } from '@/stores'
+import { useGlobalStore, useUserStore, usePositionStore, useFuturesStore } from '@/stores'
 
 const componentMap = new Map<string, unknown>([
     ['close', defineAsyncComponent(() => import('../close/Index.vue'))],
@@ -73,10 +73,12 @@ const componentMap = new Map<string, unknown>([
 const globalStore = useGlobalStore()
 const userStore = useUserStore()
 const positionStore = usePositionStore()
+const futuresStore = useFuturesStore()
 const selectedRow = shallowRef<Model.TradePositionRsp>()
 const pullRefreshRef = shallowRef()
 
 const positionList = computed(() => positionStore.getPositionListByTradeMode(50, 16))
+const goodsList = computed(() => futuresStore.goodsList.filter((a) => positionList.value.some((b) => b.goodsid === a.goodsid)))
 
 const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
     pullRefreshRef.value?.refresh()
@@ -85,8 +87,12 @@ const { componentRef, componentId, openComponent, closeComponent } = useComponen
 const showDelivery = (row: Model.TradePositionRsp) => {
     if (globalStore.hasSystemModule('delivery')) {
         // #5741
-        const market = userStore.userData.markets.find((e) => e.marketid === row.marketid)
-        return row.buyorsell === BuyOrSell.Buy || market?.isdeliverysellercanapply === 1
+        const { markets, userInfo } = userStore.userData
+        const market = markets.find((e) => e.marketid === row.marketid)
+        // 是否供应商
+        const isProvider = goodsList.value.some((e) => e.goodsid === row.goodsid && e.provideruserid === userInfo.userid)
+
+        return isProvider || row.buyorsell === BuyOrSell.Buy || market?.isdeliverysellercanapply === 1
     }
     return false
 }

+ 8 - 4
src/packages/pc/views/footer/capital/summary/withdraw/index.vue

@@ -25,7 +25,7 @@
             <el-form-item label="出金时间:">
                 <span>{{ start }} - {{ end }}</span>
             </el-form-item>
-            <fieldset style="border: 1px solid #162534;padding: 15px;" v-if="msg_317 != ''">
+            <fieldset style="border: 1px solid #162534;padding: 15px;" v-if="msg_317">
                 <legend>提示</legend>
                 <span style="font-size: 11px; color: #bbb;" v-html="msg_317" />
             </fieldset>
@@ -84,8 +84,12 @@ const doWithDrawWarning = () => {
     if (cusBank.value.cusbankid === 'jdjs') {
         formRef.value?.validate((valid) => {
             if (valid) {
-                const now = moment(new Date().toISOString()).format('HH:mm')
-                if (now > start && now < end.value) {
+                const now = moment().format('HH:mm')
+                const n = moment(now, 'HH:mm')
+                const s = moment(start, 'HH:mm')
+                const e = moment(end.value, 'HH:mm')
+                // 出金时间必须在开始和结束时间之间
+                if (n.isAfter(s) && n.isBefore(e)) {
                     /// 提交
                     formSubmit()
                 } else {
@@ -125,7 +129,7 @@ const formSubmit = () => {
                 onSubmit().then(() => {
                     complete()
                 }).catch((err) => {
-                    if(!isComplete){
+                    if (!isComplete) {
                         ElMessage.error('提交失败:' + err)
                     }
                 }).finally(() => {

+ 9 - 3
src/packages/pc/views/footer/goods/position/index.vue

@@ -30,7 +30,7 @@
 import { shallowRef, computed, onMounted } from 'vue'
 import { handleNumberValue, formatDecimal } from '@/filters'
 import { BuyOrSell, getBuyOrSellName } from '@/constants/order'
-import { usePositionStore, useUserStore } from '@/stores'
+import { usePositionStore, useUserStore, useFuturesStore } from '@/stores'
 import AppTable from '@pc/components/base/table/index.vue'
 import AppAuthOperation from '@pc/components/modules/auth-operation/index.vue'
 
@@ -40,8 +40,10 @@ defineProps({
 
 const userStore = useUserStore()
 const positionStore = usePositionStore()
+const futuresStore = useFuturesStore()
 
 const positionList = computed(() => positionStore.getPositionListByTradeMode(50, 16))
+const goodsList = computed(() => futuresStore.goodsList.filter((a) => positionList.value.some((b) => b.goodsid === a.goodsid)))
 
 const tableColumns = shallowRef<Model.TableColumn[]>([
     { prop: 'goodsname', label: '订单合约' },
@@ -66,8 +68,12 @@ const handleOperateButtons = (row: Model.TradePositionRsp) => {
         }
         case 50: {
             // #5741
-            const market = userStore.userData.markets.find((e) => e.marketid === row.marketid)
-            if (row.buyorsell === BuyOrSell.Buy || market?.isdeliverysellercanapply === 1) {
+            const { markets, userInfo } = userStore.userData
+            const market = markets.find((e) => e.marketid === row.marketid)
+            // 是否供应商
+            const isProvider = goodsList.value.some((e) => e.goodsid === row.goodsid && e.provideruserid === userInfo.userid)
+
+            if (isProvider || row.buyorsell === BuyOrSell.Buy || market?.isdeliverysellercanapply === 1) {
                 buttons.push('bottom_goods_position_delivery50')
             }
             break;

+ 4 - 0
src/stores/modules/futures.ts

@@ -271,6 +271,8 @@ export const useFuturesStore = defineStore(() => {
             totalvolume: quote.totalvolume ?? 0,
             totalturnover: quote.totalturnover ?? 0,
             holdvolume: quote.holdvolume ?? 0,
+            provideraccountid: 0,
+            provideruserid: 0,
             marketmarginalgorithm: 0,
             marketmarginvalue: 0,
             qtydecimalplace: 0,
@@ -331,6 +333,8 @@ export const useFuturesStore = defineStore(() => {
                     minspread: item.minspread,
                     goodsorder: item.goodsorder,
                     tradeproperty: item.tradeproperty,
+                    provideraccountid: item.provideraccountid,
+                    provideruserid: item.provideruserid,
                 } = goods)
 
                 item.iscannotbuy = goods.iscannotbuy ?? 0

+ 2 - 0
src/types/model/goods.d.ts

@@ -65,6 +65,8 @@ declare namespace Model {
         trademode: number;//交易模式 - 10:做市 13:竞价 15:通道交易 16:挂牌点选 17:仓单贸易 18:期权 19:竞拍-降价式 20:竞拍-竞价式 21:竞拍-大宗式 22:受托竞价
         goodsorder: string; // 商品显示顺序(99)
         tradeproperty: number; // 交易属性 - 1:收益权(可做空) 2:所有权(不可做空) 3:期权 4:现货 5:参考行情 6:通道交易 7:币交易 8:场外期权
+        provideraccountid: number; // 发售方资金账户ID(49)\供货商资金账户ID(50)
+        provideruserid: number; // 发售方用户ID(49)\供货商(50)
     }
 
     /** 现货商品详情 */

+ 2 - 0
src/types/model/market.d.ts

@@ -139,6 +139,8 @@ declare namespace Model {
         minspread: number // 点差下限(46)
         goodsorder: string; // 商品显示顺序(99)
         tradeproperty: number; // 交易属性 - 1:收益权(可做空) 2:所有权(不可做空) 3:期权 4:现货 5:参考行情 6:通道交易 7:币交易 8:场外期权
+        provideraccountid: number; // 发售方资金账户ID(49)\供货商资金账户ID(50)
+        provideruserid: number; // 发售方用户ID(49)\供货商(50)
     }
 
     /** 查询新板块设置 响应 */