li.shaoyi před 2 roky
rodič
revize
a961bf1e8b

+ 7 - 5
src/packages/mobile/views/ballot/detail/components/delisting/index.vue

@@ -60,13 +60,15 @@ const showModal = shallowRef(true)
 // 表单验证规则
 const formRules: { [key in keyof Proto.OrderReq]?: FieldRule[] } = {
     OrderQty: [{
-        message: '请输入数量',
         validator: (val) => {
-            const buymaxqty = props.detail.buymaxqty
-            if (val <= buymaxqty) {
-                return true
+            if (val) {
+                const buymaxqty = props.detail.buymaxqty
+                if (val <= buymaxqty) {
+                    return true
+                }
+                return '委托数量不能大于' + buymaxqty
             }
-            return '委托数量不能大于' + `${buymaxqty}`
+            return '请输入认购数量'
         }
     }],
 }

+ 0 - 1
src/packages/pc/components/base/drawer/index.less

@@ -35,7 +35,6 @@
 
     &__body {
         flex: 1;
-        overflow-y: auto;
         line-height: normal;
         background-color: #0f1a25;
         padding: 24px;

+ 2 - 2
src/packages/pc/components/base/drawer/index.vue

@@ -10,9 +10,9 @@
           <Close />
         </el-icon>
       </div>
-      <div class="app-drawer__body">
+      <el-scrollbar class="app-drawer__body" max-height="75vh" always>
         <slot></slot>
-      </div>
+      </el-scrollbar>
       <div class="app-drawer__footer" v-if="$slots.footer">
         <slot name="footer"></slot>
       </div>

+ 8 - 1
src/packages/pc/components/base/table-details/index.less

@@ -1,8 +1,15 @@
 .app-table-details {
+    border: 1px solid #162534;
+    padding: 20px;
+
     &:not(:first-child) {
         margin-top: 20px;
     }
 
+    &__title {
+        margin-left: 10px;
+    }
+
     >table {
         table-layout: fixed;
         border-collapse: collapse;
@@ -14,7 +21,7 @@
         }
 
         th {
-            color: #666;
+            color: #7a8a94;
             font-weight: normal;
             vertical-align: top;
         }

+ 4 - 4
src/packages/pc/components/base/table-details/index.vue

@@ -1,10 +1,10 @@
 <template>
-    <div class="app-table-details g-details">
-        <div class="g-details__title">
+    <fieldset class="app-table-details">
+        <legend class="app-table-details__title">
             <slot name="title">
                 {{ title }}
             </slot>
-        </div>
+        </legend>
         <table cellspacing="0" cellpadding="0" :style="tableStyle">
             <tbody>
                 <tr v-for="(items, i) in cellGroup" :key="i">
@@ -23,7 +23,7 @@
                 </tr>
             </tbody>
         </table>
-    </div>
+    </fieldset>
 </template>
 
 <script lang="ts" setup>

+ 1 - 16
src/packages/pc/components/modules/quote/forex/index.less

@@ -7,6 +7,7 @@
         flex: 1;
         display: flex;
         flex-direction: column;
+        justify-content: space-evenly;
 
         +ul {
             border-top: 1px solid #333;
@@ -34,21 +35,5 @@
                 }
             }
         }
-
-        &.top {
-            padding: 5px 0;
-
-            li {
-                margin-top: auto;
-            }
-        }
-
-        &.bottom {
-            padding: 5px 0;
-
-            li {
-                margin-bottom: auto;
-            }
-        }
     }
 }

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

@@ -12,6 +12,7 @@
 
             li {
                 cursor: pointer;
+                padding: 5px;
             }
         }
     }

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

@@ -7,7 +7,7 @@
             <h4 class="header-title">订单交易</h4>
             <el-form ref="formRef" class="el-form--vertical" label-width="60px" :model="formData" :rules="formRules">
                 <el-form-item prop="GoodsID" label="商品">
-                    <el-select placeholder="请选择" v-model="selectedGoodsId">
+                    <el-select placeholder="请选择" v-model="selectedGoodsId" filterable>
                         <el-option :label="item.goodsname" :value="item.goodsid" v-for="(item, index) in marketGoodsList"
                             :key="index" />
                     </el-select>

+ 14 - 9
src/packages/pc/views/market/trade/presell/ballot/detail/delisting/index.vue

@@ -1,10 +1,14 @@
 <!-- 交易市场-预售转让-预售中签-详情-我要认购 -->
 <template>
-    <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">
+    <app-drawer title="我要认购" v-model:show="show" :width="400" :loading="loading" :refresh="refresh">
+        <el-form ref="formRef" class="el-form--vertical" label-width="100px" :model="formData" :rules="formRules">
             <el-form-item label="发行价">
                 <span>{{ selectedRow.refprice }}</span>
             </el-form-item>
+            <el-form-item prop="OrderQty" label="认购数量">
+                <el-input-number placeholder="请输入" :min="0" :max="selectedRow.presaleqty" :precision="0"
+                    v-model="formData.OrderQty" />
+            </el-form-item>
             <el-form-item label="最大申购量">
                 <span>{{ selectedRow.buymaxqty }}</span>
             </el-form-item>
@@ -14,9 +18,6 @@
             <el-form-item label="可用资金">
                 <span>{{ accountStore.currentAccount.avaiableMoney?.toFixed(2) }}</span>
             </el-form-item>
-            <el-form-item prop="OrderQty" label="认购数量">
-                <el-input-number placeholder="请输入" :min="0" :max="selectedRow.presaleqty" :precision="0" v-model="formData.OrderQty" />
-            </el-form-item>
         </el-form>
         <template #footer>
             <el-button type="info" @click="onCancel(false)">取消</el-button>
@@ -66,11 +67,15 @@ const formRules: FormRules = {
     OrderQty: [{
         required: true,
         validator: (rule, value, callback) => {
-            const buymaxqty = props.selectedRow.buymaxqty
-            if (value <= buymaxqty) {
-                callback()
+            if (value) {
+                const buymaxqty = props.selectedRow.buymaxqty
+                if (value <= buymaxqty) {
+                    callback()
+                } else {
+                    callback(new Error('认购数量不能大于' + buymaxqty))
+                }
             } else {
-                callback(new Error('委托数量不能大于' + `${buymaxqty}`))
+                callback(new Error('请输入认购数量'))
             }
         }
     }],

+ 25 - 47
src/packages/pc/views/market/trade/presell/ballot/detail/index.vue

@@ -1,52 +1,25 @@
 <!-- 交易市场-预售转让-预售中签-详情 -->
 <template>
-    <app-drawer title="商品详情" v-model:show="show" :width="800" :refresh="refresh">
-        <div class="g-detail__desc">
-            <template v-for="(url, index) in detailBanners" :key="index">
-                <img :src="url" alt="" />
+    <app-drawer title="商品详情" v-model:show="show" :width="600" :refresh="refresh">
+        <AppTableDetails :title="selectedRow.goodscode + ' ' + selectedRow.goodsname" :label-width="100" :data="selectedRow"
+            :cell-props="detailProps" :column="2">
+            <!-- 预售定金 -->
+            <template #earnest>
+                {{ earnest }}
             </template>
-        </div>
-        <div class="g-detail__buy">
-            <div class="topic">
-                <div class="topic-left">
-                    <span class="price-text">发行价</span>
-                    <span class="price-unit">¥</span>
-                    <span class="price-integer">{{ selectedRow.refprice?.toFixed(2) }}</span>
-                </div>
-                <div class="topic-right">
-                    <span>开始:{{ selectedRow.starttime }}</span>
-                    <span>结束:{{ selectedRow.endtime }}</span>
-                </div>
-            </div>
-            <div class="title">
-                <el-tag type="danger" round>摇号中签</el-tag>
-                <span>{{ selectedRow.sellname }}</span>
-                <span>{{ selectedRow.goodscode }}/{{ selectedRow.goodsname }}</span>
-            </div>
-            <div class="qty">
-                <span>总量:{{ selectedRow.presaleqty }}</span>
-            </div>
-            <div class="info">
-                <ul>
-                    <li>
-                        <span>预售定金</span>
-                        <span>{{ earnest }}</span>
-                    </li>
-                    <li>
-                        <span>转让定金</span>
-                        <span>{{ parsePercent(selectedRow.transferdepositratio) }}</span>
-                    </li>
-                </ul>
-            </div>
-        </div>
-        <div class="g-detail__desc">
+            <!-- 转让定金 -->
+            <template #transferdepositratio>
+                {{ parsePercent(selectedRow.transferdepositratio) }}
+            </template>
+        </AppTableDetails>
+        <div style="margin-top: 20px;">
             <template v-for="(url, index) in detailImages" :key="index">
                 <img :src="url" alt="" />
             </template>
         </div>
-        <template #footer v-if="selectedRow.presalestatus === 2">
+        <template #footer>
             <el-button type="info" @click="onCancel(false)">取消</el-button>
-            <el-button type="primary" @click="onSubmit">我要认购</el-button>
+            <el-button type="primary" @click="onSubmit" v-if="selectedRow.presalestatus === 2">我要认购</el-button>
             <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)"
                 @closed="closeComponent" v-if="componentId" />
         </template>
@@ -58,12 +31,13 @@ import { shallowRef, computed, PropType, defineAsyncComponent } from 'vue'
 import { getFileUrl, parsePercent } from '@/filters'
 import { useComponent } from '@/hooks/component'
 import AppDrawer from '@pc/components/base/drawer/index.vue'
+import AppTableDetails from '@pc/components/base/table-details/index.vue'
 
 const componentMap = new Map<string, unknown>([
     ['delisting', defineAsyncComponent(() => import('./delisting/index.vue'))], // 摘牌
 ])
 
-const { componentRef, componentId, openComponent, closeComponent } = useComponent(false)
+const { componentRef, componentId, openComponent, closeComponent } = useComponent()
 
 const props = defineProps({
     selectedRow: {
@@ -72,11 +46,15 @@ const props = defineProps({
     }
 })
 
-// 商品banner
-const detailBanners = computed(() => {
-    const bannerpicurl = props.selectedRow.bannerpicurl ?? ''
-    return bannerpicurl?.split(',').map((path) => getFileUrl(path))
-})
+const detailProps = [
+    { prop: 'refprice', label: '发行价:' },
+    { prop: 'sellname', label: '销售方:' },
+    { prop: 'starttime', label: '开始时间:' },
+    { prop: 'earnest', label: '预售定金:' },
+    { prop: 'endtime', label: '结束时间:' },
+    { prop: 'transferdepositratio', label: '转让定金:' },
+    { prop: 'presaleqty', label: '总量:' },
+]
 
 // 预售定金
 const earnest = computed(() => {

+ 1 - 0
src/packages/pc/views/market/trade/presell/transfer/listing/index.less

@@ -12,6 +12,7 @@
 
             li {
                 cursor: pointer;
+                padding: 5px;
             }
         }
     }

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

@@ -7,7 +7,7 @@
             <h4 class="header-title">定金转让</h4>
             <el-form ref="formRef" class="el-form--vertical" label-width="60px" :model="formData" :rules="formRules">
                 <el-form-item prop="GoodsID" label="商品">
-                    <el-select placeholder="请选择" v-model="selectedGoodsId">
+                    <el-select placeholder="请选择" v-model="selectedGoodsId" filterable>
                         <el-option :label="item.goodsname" :value="item.goodsid" v-for="(item, index) in marketGoodsList"
                             :key="index" />
                     </el-select>