li.shaoyi 2 vuotta sitten
vanhempi
commit
a27df720c7

+ 1 - 1
app/package.json

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

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

@@ -1,8 +1,8 @@
 {
   "appId": "com.muchinfo.gstj",
   "appName": "甘肃碳交",
-  "version": "1.0.15",
-  "versionCode": "100015",
+  "version": "1.0.16",
+  "versionCode": "100016",
   "apiUrl": "http://8.130.69.63:8280/cfg?key=gstj",
   "tradeChannel": "ws",
   "modules": [

+ 2 - 2
public/proto/mtp.js

@@ -8679,11 +8679,11 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr
   },
   HolderTransferDetail: {
     fields: {
-      OutLoginID: {
+      OutUserID: {
         type: "uint32",
         id: 1
       },
-      InLoginID: {
+      InUserID: {
         type: "uint32",
         id: 2
       },

+ 2 - 2
public/proto/mtp.proto

@@ -2659,8 +2659,8 @@ message DefaultTransferProcessRsp {
 }
 // 持仓过户明细
 message HolderTransferDetail {
-		optional uint32 OutLoginID = 1; // 转出方登录账号,必填
-		optional uint32 InLoginID = 2; // 转入方登录账号,必填
+		optional uint32 OutUserID = 1; // 转出方用户ID,必填
+		optional uint32 InUserID = 2; // 转入方用户ID,必填
 		optional uint32 GoodsID = 3; // 商品ID,必填
 		optional uint32 BuyOrSell = 4; // 转出方买卖方向,必填
 		optional uint64 Qty = 5; // 转让数量,必填

+ 27 - 17
src/packages/pc/views/footer/inout/out/add/index.vue

@@ -3,8 +3,8 @@
     <app-drawer title="新增" v-model:show="show" :width="800" :loading="loading" :refresh="refresh">
         <el-form ref="formRef" class="el-form--horizontal" label-width="100px" :model="formData" :rules="formRules"
             @submit.prevent>
-            <el-form-item prop="InLoginID" label="转入客户">
-                <el-select placeholder="请输入" v-model="formData.InLoginID" :loading="searchLoading"
+            <el-form-item prop="InUserID" label="转入客户">
+                <el-select placeholder="请输入" v-model="formData.InUserID" :loading="searchLoading"
                     :remote-method="remoteMethod" filterable remote clearable>
                     <template v-for="(item, index) in userList" :key="index">
                         <el-option :label="item.customername" :value="item.userid" />
@@ -22,13 +22,13 @@
                 <el-input-number placeholder="请输入" v-model="formData.TransferPrice" />
             </el-form-item>
             <el-form-item prop="Qty" label="转让数量">
-                <el-input-number placeholder="请输入" v-model="formData.Qty" />
+                <el-input-number placeholder="请输入" v-model="formData.Qty" :min="0" :max="enableqty" />
             </el-form-item>
             <el-form-item prop="FreezeDays" label="冻结天数">
                 <el-input-number placeholder="请输入" v-model="formData.FreezeDays" />
             </el-form-item>
             <el-form-item label="可用数量">
-                <span>0</span>
+                <span>{{ enableqty }}</span>
             </el-form-item>
         </el-form>
         <template #footer>
@@ -46,8 +46,10 @@ import { useRequest } from '@/hooks/request'
 import { holderTransferApply } from '@/services/api/trade'
 import { getUserInfo } from '@/services/api/user'
 import { usePosition } from '@/business/position'
+import { useLoginStore } from '@/stores'
 import AppDrawer from '@pc/components/base/drawer/index.vue'
 
+const loginStore = useLoginStore()
 const { positionList } = usePosition(16)
 const formRef = shallowRef<FormInstance>()
 const loading = shallowRef(false)
@@ -58,27 +60,35 @@ const refresh = shallowRef(false)
 const goodsList = computed(() => positionList.value.filter((e) => e.enableqty > 0))
 // 选中的商品
 const selectedGoods = shallowRef<Model.TradePositionRsp>()
+//可用数量
+const enableqty = computed(() => selectedGoods.value?.enableqty ?? 0)
 
 const formData = reactive<Partial<Proto.HolderTransferDetail>>({
-    OutLoginID: 0, // 转出方登录账号,必填
+    OutUserID: loginStore.userId, // 转出方用户ID,必填
     BuyOrSell: BuyOrSell.Buy, // 转出方买卖方向,必填
     TransferType: 1, // 转让类型-1.协议转让
 })
 
 const formRules: FormRules = {
-    goodsId: [{
-        required: true,
-        message: '请选择委托商品'
+    InUserID: [{
+        message: '请输入转入客户',
+        validator: () => !!formData.InUserID
     }],
-    price: [{
-        required: true,
-        validator: (rule, value, callback) => {
-            if (value) {
-                callback()
-            } else {
-                callback(new Error('请输入撤销价格'))
-            }
-        }
+    GoodsID: [{
+        message: '请选择转让商品',
+        validator: () => !!selectedGoods.value
+    }],
+    TransferPrice: [{
+        message: '请输入转让价格',
+        validator: () => !!formData.TransferPrice
+    }],
+    Qty: [{
+        message: '请输入转让数量',
+        validator: () => !!formData.Qty
+    }],
+    FreezeDays: [{
+        message: '请输入冻结天数',
+        validator: () => !!formData.FreezeDays
     }]
 }
 

+ 1 - 1
src/packages/pc/views/market/trade/goods/list/listing/index.vue

@@ -47,7 +47,7 @@
                         <div style="display: flex;flex-direction: column;line-height: normal;font-size: 12px;color: #7a8a94;"
                             v-if="settingStore.getSettingValue('showOrderEnableQty')">
                             <span>预估可订立量:{{ total.enableQty }}</span>
-                            <span>预扣保证金:{{ total.deposit.toFixed(2) }}</span>
+                            <!-- <span>预扣保证金:{{ total.deposit.toFixed(2) }}</span> -->
                         </div>
                     </div>
                 </el-form-item>

+ 2 - 2
src/types/proto/trade.d.ts

@@ -734,8 +734,8 @@ declare global {
 
         /** 持仓过户明细 */
         interface HolderTransferDetail {
-            OutLoginID: number; // 转出方登录账号,必填
-            InLoginID: number; // 转入方登录账号,必填
+            OutUserID: number; // 转出方用户ID,必填
+            InUserID: number; // 转入方用户ID,必填
             GoodsID: number; // 商品ID,必填
             BuyOrSell: number; // 转出方买卖方向,必填
             Qty: number; // 转让数量,必填