Explorar el Código

commit 出入库

yu jie hace 4 años
padre
commit
7cfff8b1e1

+ 2 - 2
src/services/go/wrtrade/interface.ts

@@ -340,7 +340,7 @@ export interface WrHoldLB {
     enableqty: number;//可用数量
     enumdicname: string;//单位名称
     freezerqty: number;//冻结数量
-    ladingbillid: number;//提单ID(2number;
+    ladingbillid: string;//提单ID(2number;
     //8+Unix秒时间戳(1number;
     //位)+xxxxxx)
     optioncompare: string;//选择项比较串【{选择项ID}+{冒号}+选择项值 } ,逗号分隔,头尾加逗号】-- 所有选择项拼接,用于比较
@@ -351,7 +351,7 @@ export interface WrHoldLB {
     userid: number;//持有人ID
     warehouseid: number;//仓库ID
     warehousename: string;//仓库名称
-    wrfactortypeid: number;//仓单要素类型ID(212+Unix秒时间戳(1number;
+    wrfactortypeid: string;//仓单要素类型ID(212+Unix秒时间戳(1number;
     //位)+xxxxxx)
     wrfactortypename: string;//仓单要素类型名称(选择项要素的名称合并显示,逗号分隔)
     wrholdeno: string;//仓单编号

+ 16 - 0
src/services/proto/warehousetrade/index.ts

@@ -17,6 +17,22 @@ export const hdWROrder = (param: HdWROrderReq): Promise<any> => {
 
 /**
  * 持仓单摘牌请求
+ *
+ *             const param = {
+                MarketID: MarketID,
+                AccountID: AccountId.toString(), // 资金账号
+                RelatedWRTradeOrderID: WRTradeOrderID, // 关联委托单号(摘牌委托关联挂牌委托单ID)
+                WRTransferUserID: WRTransferUserID, // 仓单贸易委托单ID
+                OrderQty: OrderQty, // 委托数量
+                OrderSrc: 0, // 委托来源
+                OperatorID: 0, // 操作员账号ID
+                BuyOrSell: enums.BuyOrSell.BuyOrSell_BUY, // 买卖方向
+                ApplyID: 0, // 申请ID
+                TradeDate: moment().format('YYYYMMDD'), // 交易日
+                LadingBillId: LadingBillID,
+                SubNum: 0, // 提单子单号(wrholdlb的SubNum字段),卖的时候填写
+                WRFactorTypeId: WRFactorTypeID,
+            }
  * @param param
  * @constructor
  */

+ 12 - 6
src/views/order/spot_warran/components/spot_warrant_inventory_summary/components/listing/index.vue

@@ -84,7 +84,7 @@
 import { defineComponent, PropType, ref } from 'vue';
 import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
 import Drawer from '@/common/components/drawer/index.vue';
-import { QueryWrPositionReq, WrPosition } from '@/services/go/wrtrade/interface';
+import {QueryWrPositionReq, WrHoldLB, WrPosition} from '@/services/go/wrtrade/interface';
 import { getUserId } from '@/services/bus/account';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
 import { hdWROrder } from '@/services/proto/warehousetrade';
@@ -96,23 +96,27 @@ export default defineComponent({
     components: { Drawer },
     props: {
         selectedRow: {
-            type: Object as PropType<WrPosition>,
+            type: Object as PropType<WrHoldLB>,
             default: {},
         },
     },
     setup(props) {
         const data = props.selectedRow;
         const loading = ref<boolean>(false);
+        debugger
         const param = {
             AccountID: data.accountid.toString(),
             ClientSerialNo: uuidv4(), // 客户端流水号
             // OperateSrc: 2,
             ClientType: 4,
             // MarketID: 17201,
-            LadingBillId: '2081626946446000001', // 提单id(wrholdlb的LadingBillId字段),卖的时候填写 uint64
-            TradeDate: moment('20210725').format('YYYYMMDD'), // 交易日 string
-            SubNum: '0', // 提单子单号
-            WRFactorTypeId: '2121626946446000001', // 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写 uint64
+            LadingBillId: props.selectedRow.ladingbillid.toString(), // 提单id(wrholdlb的LadingBillId字段),卖的时候填写 uint64
+            // LadingBillId: 'uint642081626946446000001', // 提单id(wrholdlb的LadingBillId字段),卖的时候填写 uint64
+            TradeDate: moment('20210727').format('YYYYMMDD'), // 交易日 string
+            // SubNum: '0', // 提单子单号
+            SubNum: props.selectedRow.subnum,
+            // WRFactorTypeId: '2121626946446000001', // 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写 uint64
+            WRFactorTypeId: props.selectedRow.wrfactortypeid, // 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写 uint64
             IsSpecified: 0, // 是否指定对手 0:不指定 1:指定 uint32
             // MatchUserIDs: 0, // 仓单贸易对手资金账号ID集合(指定对手时填写) uint32
             OrderQty: 1, // 委托数量(可挂部分数据量) ======
@@ -141,6 +145,8 @@ export default defineComponent({
             HasWr: 1,
         };
         console.log(param);
+
+        console.log(props.selectedRow)
         requestResultLoadingAndInfo(hdWROrder, param, loading, ['挂牌成功', '挂牌失败:']).then(() => {
             // cancel(true);
         });

+ 3 - 3
src/views/order/spot_warran/components/spot_warrant_inventory_summary/index.vue

@@ -28,7 +28,7 @@
 import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
 import { queryTableList, BtnList, defineAsyncComponent, defineComponent } from '@/common/export/commonTable';
 import { queryWrPosition } from '@/services/go/wrtrade';
-import { QueryWrPositionReq, WrPosition } from '@/services/go/wrtrade/interface';
+import {QueryWrPositionReq, WrHoldLB, WrPosition} from '@/services/go/wrtrade/interface';
 import { getRecordItemTab } from '@/common/setup/order/orderData';
 import { handleComposeOrderTable } from '@/common/setup/table/compose';
 import { ComposeOrderTableParam } from '@/common/setup/table/interface';
@@ -41,7 +41,7 @@ export default defineComponent({
     },
     setup() {
         // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<WrPosition>();
+        const { loading, tableList, queryTable } = queryTableList<WrHoldLB>();
         // 获取列表数据
         const queryTableAction = () => {
             const param: QueryWrPositionReq = {
@@ -56,7 +56,7 @@ export default defineComponent({
             recordList: getRecordItemTab(),
         };
         return {
-            ...handleComposeOrderTable<WrPosition>(param),
+            ...handleComposeOrderTable<WrHoldLB>(param),
             loading,
             tableList,
         };

+ 10 - 6
src/views/order/spot_warran/components/spot_warrant_spot_details/components/listing/index.vue

@@ -84,7 +84,7 @@
 import { defineComponent, PropType, ref } from 'vue';
 import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
 import Drawer from '@/common/components/drawer/index.vue';
-import { QueryWrPositionReq, WrPosition } from '@/services/go/wrtrade/interface';
+import {QueryWrPositionReq, WrHoldLB, WrPosition} from '@/services/go/wrtrade/interface';
 import { getUserId } from '@/services/bus/account';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
 import { hdWROrder } from '@/services/proto/warehousetrade';
@@ -97,23 +97,27 @@ export default defineComponent({
     components: { Drawer },
     props: {
         selectedRow: {
-            type: Object as PropType<WrPosition>,
+            type: Object as PropType<WrHoldLB>,
             default: {},
         },
     },
     setup(props) {
         const data = props.selectedRow;
         const loading = ref<boolean>(false);
+        debugger
         const param = {
             AccountID: data.accountid.toString(),
             ClientSerialNo: uuidv4(), // 客户端流水号
             // OperateSrc: 2,
             ClientType: 4,
             // MarketID: 17201,
-            LadingBillId: '2081626946446000001', // 提单id(wrholdlb的LadingBillId字段),卖的时候填写 uint64
-            TradeDate: moment('20210725').format('YYYYMMDD'), // 交易日 string
-            SubNum: '0', // 提单子单号
-            WRFactorTypeId: '2121626946446000001', // 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写 uint64
+            LadingBillId: props.selectedRow.ladingbillid.toString(), // 提单id(wrholdlb的LadingBillId字段),卖的时候填写 uint64
+            // LadingBillId: 'uint642081626946446000001', // 提单id(wrholdlb的LadingBillId字段),卖的时候填写 uint64
+            TradeDate: moment('20210727').format('YYYYMMDD'), // 交易日 string
+            // SubNum: '0', // 提单子单号
+            SubNum: props.selectedRow.subnum,
+            // WRFactorTypeId: '2121626946446000001', // 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写 uint64
+            WRFactorTypeId: props.selectedRow.wrfactortypeid, // 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写 uint64
             IsSpecified: 0, // 是否指定对手 0:不指定 1:指定 uint32
             // MatchUserIDs: 0, // 仓单贸易对手资金账号ID集合(指定对手时填写) uint32
             OrderQty: 1, // 委托数量(可挂部分数据量) ======