فهرست منبع

Merge branch 'v20' of http://192.168.31.240:3000/MTP2.0_New/MTP20_WEB_GLOBAL into v20

deng.yinping 10 ماه پیش
والد
کامیت
be803ca6f2

+ 47 - 17
src/packages/sbyj/views/market/list/index.vue

@@ -20,21 +20,30 @@
                     <th>高/低</th>
                 </tr>
             </thead>
-            <tbody>
-                <tr v-for="(item, index) in touristTradeGoodsList" :key="index" @click="rowClick(item)">
-                    <td>{{ item.goodsname }}</td>
-                    <td :class="item.bidColor">{{ handleNumberValue(formatDecimal(item.bid, item.decimalplace)) }}</td>
-                    <td :class="item.askColor">{{ handleNumberValue(formatDecimal(item.ask, item.decimalplace)) }}</td>
-                    <td>
-                        <span :class="item.highestColor">
-                            {{ handleNumberValue(formatDecimal(item.highest, item.decimalplace)) }}
-                        </span>
-                        <span :class="item.lowestColor">
-                            {{ handleNumberValue(formatDecimal(item.lowest, item.decimalplace)) }}
-                        </span>
-                    </td>
-                </tr>
-            </tbody>
+            <template v-for="group in touristTradeGoodsList" :key="group.groupId">
+                <thead v-if="touristTradeGoodsList.length > 1">
+                    <tr>
+                        <th class="title" colspan="4">{{ group.groupName }}</th>
+                    </tr>
+                </thead>
+                <tbody>
+                    <tr v-for="(item, index) in group.goodsList" :key="index" @click="rowClick(item)">
+                        <td>{{ item.goodsname }}</td>
+                        <td :class="item.bidColor">{{ handleNumberValue(formatDecimal(item.bid, item.decimalplace)) }}
+                        </td>
+                        <td :class="item.askColor">{{ handleNumberValue(formatDecimal(item.ask, item.decimalplace)) }}
+                        </td>
+                        <td>
+                            <span :class="item.highestColor">
+                                {{ handleNumberValue(formatDecimal(item.highest, item.decimalplace)) }}
+                            </span>
+                            <span :class="item.lowestColor">
+                                {{ handleNumberValue(formatDecimal(item.lowest, item.decimalplace)) }}
+                            </span>
+                        </td>
+                    </tr>
+                </tbody>
+            </template>
             <thead>
                 <tr>
                     <th class="title" colspan="4">参考商品</th>
@@ -103,7 +112,28 @@ useRequest(queryImageConfigs, {
 // 构建游客交易商品
 const touristTradeGoodsList = computed(() => {
     const list = futuresStore.getGoodsListByTradeMode(52)
-    return list.sort((a, b) => a.goodsorder.localeCompare(b.goodsorder))
+    const result = list.sort((a, b) => a.goodsorder.localeCompare(b.goodsorder))
+
+    // 分组
+    return result.reduce<{
+        groupId: number;
+        groupName: string;
+        goodsList: Model.GoodsQuote[]
+    }[]>((pre, cur) => {
+        const existingGroup = pre.find((e) => e.groupId === cur.goodsgroupid)
+
+        if (existingGroup) {
+            existingGroup.goodsList.push(cur)
+        } else {
+            pre.push({
+                groupId: cur.goodsgroupid,
+                groupName: cur.goodsgroupname,
+                goodsList: [cur]
+            })
+        }
+
+        return pre
+    }, [])
 })
 
 // 构建游客参考行情商品
@@ -178,7 +208,7 @@ const { dataList: marketList, run: marketRun } = useRequest(queryMarketRun, {
 // 市场信息
 const marketInfo = computed(() => {
     const [firstMarket] = touristTradeGoodsList.value
-    return marketList.value.find((e) => e.marketid === firstMarket?.marketid)
+    return marketList.value.find((e) => e.marketid === firstMarket?.goodsList[0].marketid)
 })
 
 // 校验服务器时间

+ 2 - 2
src/packages/sbyj/views/mine/index.vue

@@ -72,10 +72,10 @@
                     <Iconfont label-direction="bottom" icon="g-icon-order-close--line">终止订单</Iconfont>
                 </li>
                 <li @click="routerTo('delivery-list')">
-                    <Iconfont label-direction="bottom" icon="g-icon-delivery--line">料订单</Iconfont>
+                    <Iconfont label-direction="bottom" icon="g-icon-delivery--line">料订单</Iconfont>
                 </li>
                 <li @click="routerTo('pickup-list')">
-                    <Iconfont label-direction="bottom" icon="g-icon-pickup--line">料订单</Iconfont>
+                    <Iconfont label-direction="bottom" icon="g-icon-pickup--line">料订单</Iconfont>
                 </li>
                 <li @click="routerTo('inventory-list')" v-if="oem === 'sjgj'">
                     <Iconfont label-direction="bottom" icon="g-icon-inventory">我的库存</Iconfont>

+ 2 - 2
src/packages/sjgj/router/index.ts

@@ -238,7 +238,7 @@ const routes: Array<RouteRecordRaw> = [
         name: 'delivery-list',
         component: () => import('../../sbyj/views/delivery/index.vue'),
         props: {
-          title: '料订单',
+          title: '料订单',
           buyorsell: 1
         }
       }
@@ -267,7 +267,7 @@ const routes: Array<RouteRecordRaw> = [
         name: 'pickup-list',
         component: () => import('../../sbyj/views/delivery/index.vue'),
         props: {
-          title: '料订单',
+          title: '料订单',
           buyorsell: 0
         }
       }

+ 2 - 2
src/packages/sjgj/views/home/main/index.vue

@@ -27,11 +27,11 @@
           </li>
           <li @click="routerTo('delivery-list')">
             <img src="../../../assets/images/icons/delivery.svg" />
-            <span>料订单</span>
+            <span>料订单</span>
           </li>
           <li @click="routerTo('pickup-list')">
             <img src="../../../assets/images/icons/pickup.svg" />
-            <span>料订单</span>
+            <span>料订单</span>
           </li>
           <li @click="routerTo('inventory-list')">
             <img src="../../../assets/images/icons/inventory.svg" />

+ 1 - 1
src/packages/tss/views/user/login/index.less

@@ -1,7 +1,7 @@
 .login {
     display: flex;
     flex-direction: column;
-    background: url(../../../assets/images/login-bg.png) no-repeat center top;
+    background:#fff url(../../../assets/images/login-bg.png) no-repeat center top;
     background-size: 100% auto;
 
     &-navback {