1
admin
2026-01-13 34ea207639539bdb29bde3df078a7efe0d0cf192
src/page/home/listcomponents/xingusg.vue
@@ -13,44 +13,63 @@
        <div class="sange">
            <span v-for="(item, index) in shengouTab" :key="index" @click="gettab(index)"
                :class="shengouIdx == index ? 'xuan' : ''">{{
                        item.name
                    item.name
                }}</span>
        </div>
        <div>
            <van-list v-model="loading" :finished="finished" :finished-text="$t('hj43')" @load="onLoad" offset="500"
                :immediate-check="false">
                <div class="skm" v-for="(item, index) in shengouList" :key="index">
                <div class="skm" v-for="(item, index) in shengouList" :key="index" @click="getshengou(1, item)">
                    <div class="shead shn">
                        <div class="shl">
                            <h6>{{ item.name }}</h6>
                            <p>
                                <span v-if="item.stockType == $t('jy83') || item.stockType == $t('jy92')">{{ $t('jy83') }}</span>
                                <span class="sh" v-if="item.stockType == $t('jy84') || item.stockType == $t('jy93')">{{$t('jy84')}}</span>
                                <span v-if="item.stockType == $t('jy83') || item.stockType == $t('jy92')">
                                    {{ $t('jy83') }}
                                </span>
                                <span class="sh" v-if="item.stockType == $t('jy84') || item.stockType == $t('jy93')">
                                    {{ $t('jy84') }}
                                </span>
                                <span class="bj" v-if="item.stockType == $t('jy85')">{{ $t('jy85') }}</span>
                                <a
                                    :class="(item.stockType == $t('jy84') || item.stockType == $t('jy93')) ? 'shbg' : item.stockType == $t('jy85') ? 'bjbg' : ''">{{
                                            item.code
                                    }}</a>
                                    :class="(item.stockType == $t('jy84') || item.stockType == $t('jy93')) ? 'shbg' : item.stockType == $t('jy85') ? 'bjbg' : ''">
                                    {{ item.code }}
                                </a>
                            </p>
                        </div>
                        <div v-if="shengouIdx == 0">
                            <div class="she1" @click="getshengou(1, item)"><span
                                    style="font-size: 0.32rem;"> {{ $t("jy98") }}</span><span> {{ $t("jy94") }}</span></div>
                            <div class="she2" @click="getshengou(2, item)"><span
                                    style="font-size: 0.32rem;"> {{ $t("jy99") }}</span><span> {{ $t("jy100") }}</span></div>
                        </div>
                        <!-- <div v-if="shengouIdx == 0">
                            <div class="she1" @click="getshengou(1, item)"><span style="font-size: 0.32rem;"> {{
                                $t("jy98") }}</span><span> {{ $t("jy94") }}</span></div>
                            <div class="she2" @click="getshengou(2, item)"><span style="font-size: 0.32rem;"> {{
                                $t("jy99") }}</span><span> {{ $t("jy100") }}</span></div>
                        </div> -->
                        <p class="shr" v-if="shengouIdx == 1"> {{ $t("hj59") }}
                            <span>{{ dayjs(item.subscribeTime).format('YYYY-MM-DD') }}</span>
                        </p>
                    </div>
                    <div class="shead shn" style="padding-top: 0px !important;" v-if="shengouIdx == 0">
                        <p class="shr"> {{ $t("hj59") }} <span>{{ dayjs(item.subscribeTime).format('YYYY-MM-DD') }}</span></p>
                        <!-- <p class="shr">
                            {{ $t("hj59") }}
                            <span>{{ dayjs(item.subscribeTime).format('YYYY-MM-DD') }}</span>
                        </p> -->
                    </div>
                    <div class="plkm">
                        <p><span> {{ $t("jy101") }}</span><a>{{ item.price }}/ {{ $t("jy96") }}</a></p>
                        <p><span> {{ $t("jy102") }}</span><a>{{ item.pe }}</a></p>
                        <!-- <p><span> {{ $t("jy102") }}</span><a>{{ item.pe }}</a></p> -->
                        <p style="display: none;"><span> {{ $t("jy103") }}</span><a> 0.75{{ $t("jy104") }}</a></p>
                        <p><span> {{ $t("jy105") }}</span><a>{{ item.orderNumber }} {{ $t("jy104") }}</a></p>
                        <div class="residual-progress" v-if="item.residualShare !== undefined && item.residualShare !== null">
                            <div class="progress-bar-wrapper">
                                <div class="progress-bar-bg">
                                    <div class="progress-bar-fill" :style="{ width: (item.residualShare || 0) + '%' }"></div>
                                </div>
                                <span class="progress-text">【{{ $t("jy546") }}{{ item.residualShare || 0 }}%】</span>
                            </div>
                        </div>
                    </div>
                </div>
            </van-list>
@@ -156,7 +175,7 @@
        getfilterdate(list) {
            if (this.shengouIdx == 0) {
                for (let i = 0; i < list.length; i++) {
                    if (this.dayjs(list[i].subscribeTime).format('YYYY-MM-DD') == this.dayjs(new Date().getTime()).format('YYYY-MM-DD')) {
                    if (this.dayjs(list[i].subscribeTime).format('YYYY-MM-DD') <= this.dayjs(new Date().getTime()).format('YYYY-MM-DD')) {
                        this.shengouList.push(list[i])
                    }
                }
@@ -353,6 +372,46 @@
        }
    }
    .residual-progress {
        width: 100%;
        margin-top: 0.4rem;
        .progress-bar-wrapper {
            width: 100%;
            display: flex;
            align-items: center;
            gap: 0.2rem;
            .progress-bar-bg {
                flex: 1;
                height: 0.3rem;
                background-color: #f0f0f0;
                border-radius: 0.15rem;
                overflow: hidden;
                position: relative;
                .progress-bar-fill {
                    height: 100%;
                    background: linear-gradient(90deg, #f33030 0%, #d73d3d 100%);
                    border-radius: 0.15rem;
                    position: absolute;
                    left: 0;
                    top: 0;
                    transition: width 0.3s ease;
                    min-width: 0;
                }
            }
            .progress-text {
                color: #333;
                font-size: 0.28rem;
                white-space: nowrap;
                font-weight: 500;
                flex-shrink: 0;
            }
        }
    }
    .shn {
        justify-content: space-between;