Procházet zdrojové kódy

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

deng.yinping před 2 roky
rodič
revize
9e0e3a1c19

+ 1 - 1
public/config/appconfig.json

@@ -1,5 +1,5 @@
 {
   "version": "1.0.0",
   "versionCode": "100000",
-  "apiUrl": "http://192.168.31.205:8080/cfg?key=test_205"
+  "apiUrl": "http://192.168.31.204:8080/cfg?key=test_204"
 }

+ 12 - 5
public/config/router.json

@@ -21,17 +21,24 @@
                         "children": [
                             {
                                 "authType": 3,
+                                "title": "转让",
+                                "code": "bottom_goods_position_transfer",
+                                "component": "views/footer/goods/position/components/transfer/index.vue",
+                                "className": "el-button--danger"
+                            },
+                            {
+                                "authType": 3,
                                 "title": "交收",
-                                "code": "bottom_goods_position_delivery",
+                                "code": "bottom_goods_position_delivery16",
                                 "component": "views/footer/goods/position/components/delivery/index.vue",
                                 "className": "el-button--primary"
                             },
                             {
                                 "authType": 3,
-                                "title": "转让",
-                                "code": "bottom_goods_position_transfer",
-                                "component": "views/footer/goods/position/components/transfer/index.vue",
-                                "className": "el-button--danger"
+                                "title": "交收",
+                                "code": "bottom_goods_position_delivery50",
+                                "component": "views/footer/goods/position/components/delivery/index.vue",
+                                "className": "el-button--primary"
                             }
                         ]
                     },

+ 3 - 0
src/packages/gstj/views/bank/sign/components/edit/Index.vue

@@ -91,6 +91,9 @@ const formSubmit = () => {
             if(e.value){
                 obj[e.fieldcode]=e.value
             }
+            if (e.fieldcode === 'bank_branch_name') {
+                formData.OpenBankName = e.value
+            }
         })
         formData.extend_info = JSON.stringify(obj)
         onSubmit().then(() => {

+ 3 - 0
src/packages/gstj/views/bank/wallet/components/withdraw/Index.vue

@@ -79,6 +79,9 @@ const formSubmit = () => {
         if(e.value){
             obj[e.fieldcode]=e.value
         }
+        if (e.fieldcode === 'bank_branch_name') {
+            formData.BranchBankName = e.value
+        }
     })
     formData.extend_info = JSON.stringify(obj)
     fullloading((hideLoading) => {

+ 1 - 1
src/packages/pc/components/layouts/header/components/report/index.vue

@@ -1,6 +1,6 @@
 <!-- 交易商结算单 -->
 <template>
-    <app-drawer title="交易商结算单" width="80%" v-model:show="show" :loading="loading" :refresh="refresh">
+    <app-drawer title="交易商结算单" width="80%" v-model:show="show" :refresh="refresh">
         <template #footer>
             <el-button type="info" @click="onAgree(false)">同意进入系统</el-button>
             <el-button type="danger" @click="onDisAgree">不同意,退出系统</el-button>

+ 4 - 1
src/packages/pc/views/account/sign/components/sign/index.vue

@@ -85,9 +85,12 @@ const formSubmit = () => {
                     if(e.value){
                         obj[e.fieldcode]=e.value
                     }
+                    if (e.fieldcode === 'bank_branch_name') {
+                        formData.OpenBankName = e.value
+                    }
                 })
                 formData.extend_info = JSON.stringify(obj)
-                
+
                 onSubmit().then(() => {
                     ElMessage.success(bankInfo ? '签约信息修改成功' : '签约提交成功,请耐心等待审核。')
                     onCancel(true)

+ 3 - 0
src/packages/pc/views/footer/capital/summary/withdraw/index.vue

@@ -74,6 +74,9 @@ const formSubmit = () => {
                 if(e.value){
                     obj[e.fieldcode]=e.value
                 }
+                if (e.fieldcode === 'bank_branch_name') {
+                    formData.BranchBankName = e.value
+                }
             })
             formData.extend_info = JSON.stringify(obj)
             if (formData.CusBankID) {

+ 2 - 2
src/packages/pc/views/footer/presell/transferposition/delivery/trader/index.vue

@@ -1,6 +1,6 @@
 <!-- 预售转让-转让持仓-交收申请-点选 -->
 <template>
-    <app-drawer title="点选" v-model:show="show" :loading="loading" :refresh="refresh" :width="800">
+    <app-drawer title="点选" v-model:show="show" :refresh="refresh" :width="800">
         <el-form ref="formRef" class="el-form--horizontal" label-width="120px" label-position="left" :model="formData"
             :rules="formRules">
             <el-form-item label="商品代码/名称">
@@ -25,7 +25,7 @@
                 <span>{{ available.toFixed(2) }}</span>
             </el-form-item>
             <el-form-item prop="DeliveryQty" label="点选数量">
-                <el-input-number placeholder="请输入点选数量" v-model="formData.DeliveryQty" :max="selectedRow.buycurpositionqty" :min="0" />
+                <el-input-number placeholder="请输入点选数量" v-model="formData.DeliveryQty" :max="selectedRow.avalidqty" :min="0" />
             </el-form-item>
         </el-form>
         <template #footer>

+ 6 - 3
src/packages/pc/views/market/trade/goods/list/index.vue

@@ -83,7 +83,7 @@ const props = defineProps({
 
 const subscribe = quoteSocket.createSubscribe()
 const globalStore = useGlobalStore()
-const { setMarketId, $toRefs } = useFuturesStore()
+const { setMarketId, onResponse, $toRefs } = useFuturesStore()
 const { marketGoodsList, selectedGoodsId } = $toRefs()
 
 const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => true, false)
@@ -113,6 +113,11 @@ const onRowClick = (row: Model.GoodsQuote) => {
     openComponent('detail')
 }
 
+onResponse(() => {
+    const goodsCodes = marketGoodsList.value.map((e) => e.goodscode)
+    subscribe.start(...goodsCodes)
+})
+
 onMounted(() => {
     switch (props.code) {
         case 'market_trade_goods_50101':
@@ -128,8 +133,6 @@ onMounted(() => {
             setMarketId(50104)
             break
     }
-    const goodsCodes = marketGoodsList.value.map((e) => e.goodscode)
-    subscribe.start(...goodsCodes)
     globalStore.showGoodsListing = true
 })
 

+ 6 - 3
src/packages/pc/views/market/trade/presell/transfer/index.vue

@@ -83,7 +83,7 @@ const componentMap = new Map<string, unknown>([
 
 const subscribe = quoteSocket.createSubscribe()
 const globalStore = useGlobalStore()
-const { setMarketId, $toRefs } = useFuturesStore()
+const { setMarketId, onResponse, $toRefs } = useFuturesStore()
 const { marketGoodsList, selectedGoodsId } = $toRefs()
 
 const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => true, false)
@@ -113,6 +113,11 @@ const onRowClick = (row: Model.GoodsQuote) => {
     openComponent('detail')
 }
 
+onResponse(() => {
+    const goodsCodes = marketGoodsList.value.map((e) => e.goodscode)
+    subscribe.start(...goodsCodes)
+})
+
 onMounted(() => {
     switch (props.code) {
         case 'market_trade_presell_49201':
@@ -122,8 +127,6 @@ onMounted(() => {
             setMarketId(16201)
             break
     }
-    const goodsCodes = marketGoodsList.value.map((e) => e.goodscode)
-    subscribe.start(...goodsCodes)
     globalStore.showTransferListing = true
 })
 

+ 12 - 4
src/packages/pc/views/market/trade/presell/transfer/listing/index.vue

@@ -68,12 +68,14 @@ import { BuyOrSell, getBuyOrSellList } from '@/constants/order'
 import { useRequest } from '@/hooks/request'
 import { queryMineTradePositionExs } from '@/services/api/transfer'
 import { useOrder } from '@/business/trade'
+import { usePosition } from '@/business/position'
 import { useFuturesStore, useSettingStore } from '@/stores'
 import Forex from '@pc/components/modules/quote/forex/index.vue'
 import Icon from '@pc/components/base/icon/index.vue'
 
 const settingStore = useSettingStore()
 const futuresStore = useFuturesStore()
+const { getOrderQty, positionList: ll } = usePosition(16)
 const { selectedGoodsId, selectedGoods, marketGoodsList } = futuresStore.$toRefs()
 const { formData, loading, formSubmit } = useOrder()
 const formRef = shallowRef<FormInstance>()
@@ -97,8 +99,14 @@ const { dataList: positionList, run: getMineTradePositionExs } = useRequest(quer
 
 // 可用数量
 const enableqty = computed(() => {
-    const [firstItem] = positionList.value
-    return firstItem ? firstItem.buycurpositionqty - firstItem.buyfrozenqty : 0
+    console.log(ll.value, selectedGoods.value)
+    if (selectedGoods.value?.trademode === 16) {
+
+        return getOrderQty(BuyOrSell.Buy, selectedGoodsId.value)
+    } else {
+        const [firstItem] = positionList.value
+        return firstItem ? firstItem.buycurpositionqty - firstItem.buyfrozenqty : 0
+    }
 })
 
 // 价格步长
@@ -165,8 +173,8 @@ const onSubmit = () => {
     formRef.value?.validate((valid) => {
         if (valid) {
             ElMessageBox.confirm(
-                '*若存在价格匹配的反方向委托订单,系统将会自动撤销。',
-                '是否立即挂牌?'
+                '是否立即挂牌?',
+                '提示'
             ).then(() => {
                 const { marketid = 0, goodsid = 0 } = selectedGoods.value ?? {}
                 formData.MarketID = marketid

+ 3 - 0
src/packages/qxst/views/bank/sign/components/edit/Index.vue

@@ -91,6 +91,9 @@ const formSubmit = () => {
             if(e.value){
                 obj[e.fieldcode]=e.value
             }
+            if (e.fieldcode === 'bank_branch_name') {
+                formData.OpenBankName = e.value
+            }
         })
         formData.extend_info = JSON.stringify(obj)
         onSubmit().then(() => {

+ 3 - 0
src/packages/qxst/views/bank/wallet/components/withdraw/Index.vue

@@ -79,6 +79,9 @@ const formSubmit = () => {
         if(e.value){
             obj[e.fieldcode]=e.value
         }
+        if (e.fieldcode === 'bank_branch_name') {
+            formData.BranchBankName = e.value
+        }
     })
     formData.extend_info = JSON.stringify(obj)
     fullloading((hideLoading) => {

+ 5 - 1
src/packages/sbyj/views/bank/sign/components/edit/Index.vue

@@ -17,7 +17,8 @@
                     <Field name="AccountName" label="姓名" readonly v-model="formData.BankAccountName" placeholder="请输入银行卡账户名"
                         :rules="formRules.BankAccountName" />
                     <template v-for="(item, index) in configs" :key="index">
-                        <Field v-if="item.usabletype === 1 || item.usabletype === userStore.userInfo?.userinfotype" :name="item.fieldcode" :label="item.fieldname" v-model="item.value" :placeholder="`请输入${ item.fieldname }`" />
+                        <Field v-if="item.usabletype === 1 || item.usabletype === userStore.userInfo?.userinfotype" 
+                            :name="item.fieldcode" :label="item.fieldname" v-model="item.value" :placeholder="`请输入${ item.fieldname }`" />
                     </template>
                 </CellGroup>
             </Form>
@@ -91,6 +92,9 @@ const formSubmit = () => {
             if(e.value){
                 obj[e.fieldcode]=e.value
             }
+            if (e.fieldcode === 'bank_branch_name') {
+                formData.OpenBankName = e.value
+            }
         })
         formData.extend_info = JSON.stringify(obj)
         onSubmit().then(() => {

+ 3 - 0
src/packages/sbyj/views/bank/wallet/components/withdraw/Index.vue

@@ -79,6 +79,9 @@ const formSubmit = () => {
         if(e.value){
             obj[e.fieldcode]=e.value
         }
+        if (e.fieldcode === 'bank_branch_name') {
+            formData.BranchBankName = e.value
+        }
     })
     formData.extend_info = JSON.stringify(obj)
     fullloading((hideLoading) => {

+ 16 - 1
src/stores/modules/futures.ts

@@ -16,6 +16,8 @@ export const useFuturesStore = defineStore(() => {
     const quoteWatchMap = new Map<string, { keys: string[]; callback: (value: Partial<Model.QuoteDayRsp>) => void; }>()
     // 市场ID
     const marketIds = shallowRef<number[]>([])
+    // 请求响应成功的回调集合
+    const rsponseTask = new Set<() => void>()
 
     const state = reactive({
         loading: false,
@@ -33,6 +35,16 @@ export const useFuturesStore = defineStore(() => {
     // 当前选中的商品
     const selectedGoods = computed(() => state.goodsQuoteList.find((e) => e.goodsid === state.selectedGoodsId))
 
+    // 请求响应成功后触发
+    const onResponse = (callback: () => void) => {
+        if (state.goodsQuoteList.length) {
+            setTimeout(() => callback(), 0)
+        } else {
+            rsponseTask.add(callback)
+            onUnmounted(() => rsponseTask.delete(callback))
+        }
+    }
+
     // 设置市场ID
     const setMarketId = (...values: number[]) => {
         marketIds.value = values
@@ -49,6 +61,7 @@ export const useFuturesStore = defineStore(() => {
 
     // 获取商品列表
     const getGoodsList = () => {
+        state.loading = true
         timerTask.clearTimeout('quoteDay')
         queryErmcpGoods().then((res) => {
             state.goodsList = res.data
@@ -59,7 +72,6 @@ export const useFuturesStore = defineStore(() => {
         })
         // 获取商品盘面信息
         const getQuoteDay = (codes: string[]) => {
-            state.loading = true
             queryQuoteDay({
                 data: {
                     goodsCodes: codes.join(',')
@@ -68,6 +80,8 @@ export const useFuturesStore = defineStore(() => {
                 res.data.forEach((item) => {
                     updateGoodsQuote(item)
                 })
+                rsponseTask.forEach((fn) => fn())
+                rsponseTask.clear()
             }).finally(() => {
                 state.loading = false
                 if (!state.selectedGoodsId) {
@@ -355,6 +369,7 @@ export const useFuturesStore = defineStore(() => {
         ...toRefs(state),
         marketGoodsList,
         selectedGoods,
+        onResponse,
         setMarketId,
         getQuotePrice,
         getGoodsList,