huangbin 4 年 前
コミット
c377438e86

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

@@ -598,6 +598,8 @@ export interface WrFtWrstandard {
     wrstandardcode: string      //现货商品代码
     wrstandardid: number        //现货商品ID
     wrstandardname: string      //商品名称
+    enumdicname: string // 单位
+    minivalue: number // 最小值
 }
 
 /**

+ 14 - 0
src/views/market/spot_trade/components/filter/index.vue

@@ -177,6 +177,7 @@ export default defineComponent({
             return result;
         }
         function listingAction() {
+            debugger;
             if (!selectedFT.value) {
                 message.warn('请选中商品!');
                 return;
@@ -206,6 +207,19 @@ export default defineComponent({
                     setGoodsPrice(result);
                 }
                 const result = search(false);
+
+                const obj = {
+                    enumdicname: '',
+                    minivalue: 0,
+                };
+                FtDeliveryGoods.value.forEach((el) => {
+                    el.children?.forEach((e) => {
+                        e.key === selectedFT.value;
+                        obj.enumdicname = e.enumdicname;
+                        obj.minivalue = e.minivalue;
+                    });
+                });
+                Object.assign(result, obj);
                 context.emit('buy', result, selectedGoods.value);
             }
         }

+ 2 - 0
src/views/market/spot_trade/interface.ts

@@ -7,6 +7,8 @@ export interface BuyAndSellMarket {
 export interface TreeDataItem {
     value: number | string;
     key: number | string;
+    enumdicname: string;
+    minivalue: number;
     title?: string;
     slots?: Record<string, string>;
     children?: TreeDataItem[];

+ 5 - 2
src/views/market/spot_trade/setup.ts

@@ -133,6 +133,7 @@ export function handleFtDeliveryGoods() {
     if (FtDeliveryGoods.value.length === 0) {
         initData(() => {
             queryFtDeliveryGoods().then(res => {
+                console.log('dddddddddd', res)
                 const result: TreeDataItem[] = []
                 res.forEach(el => {
                     const { deliverygoodsid, deliverygoodsname, wdlst } = el
@@ -140,11 +141,13 @@ export function handleFtDeliveryGoods() {
                         title: deliverygoodsname,
                         key: deliverygoodsid + '--',
                         value: deliverygoodsid + '--',
+                        enumdicname: '',
+                        minivalue: 0,
                         children: []
                     }
                     wdlst.forEach(e => {
-                        const { wrstandardid, wrstandardname } = e
-                        item.children?.push({ value: wrstandardid, key: wrstandardid, title: wrstandardname })
+                        const { wrstandardid, wrstandardname, enumdicname, minivalue } = e
+                        item.children?.push({ value: wrstandardid, key: wrstandardid, title: wrstandardname, enumdicname, minivalue })
                     })
                     result.push(item)
                 })