zzzz
2024-04-22 ff690c460e82ced0a20e45a8009a2c33bfbf514a
src/page/list/favoriteslist/data.list.vue
@@ -4,6 +4,7 @@
      <van-list
        v-model="loadings"
        :finished-text="$t('hj43')"
        :loading-text="$t('hj430')"
        :immediate-check="false"
      >
        <div
@@ -14,8 +15,12 @@
        >
          <div class="tabs_o_items">
            <div class="tabs_o_title">
              <span class="title">{{ item.newName }}</span>
              <span class="buy_to_sell mairu">{{ $t("hj45") }}</span>
              <div class="title">
                {{ item.newName }}
              </div>
              <span class="buy_to_sell mairu">{{
                item.type === 1 ? $t("hj45") : $t("新股配售")
              }}</span>
            </div>
            <div
              style="
@@ -29,34 +34,68 @@
                  <div class="start_price">
                    <span>{{ item.buyPrice }} </span>
                  </div>
                  <div class="new_price">
                    <span>{{ item.applyNums }}</span>
                  <div class="new_price" v-if="item.status <= 3">
                    <span>
                      {{ item.applyNums }}
                    </span>
                  </div>
                  <div class="new_price" v-if="item.status >= 3">
                    <span>
                      {{ item.applyNumber }}
                    </span>
                  </div>
                  <div class="new_price" v-if="item.status === 4">
                    <span style="color: red">
                      {{ item.dbMoney }}
                    </span>
                  </div>
                </div>
                <div class="bottom_price_title">
                  <div class="start_price">
                    <span>{{ $t("單筆價格") }}</span>
                  </div>
                  <div class="new_price">
                    <span>{{ $t("hj57") }}</span>
                  <div class="new_price" v-if="item.status <= 3">
                    <span>
                      {{ $t("hj57") }}
                    </span>
                  </div>
                  <div class="new_price" v-if="item.status >= 3">
                    <span>
                      {{ $t("hj253") }}
                    </span>
                  </div>
                  <div class="new_price" v-if="item.status === 4">
                    <span style="color: red">
                      {{ $t("待补金额") }}
                    </span>
                  </div>
                </div>
              </div>
              <div class="right_btn pink" style="padding: 0px 0.2rem">
                <span>{{
                  item.status == 1
                    ? $t("hj131")
                    : item.status == 2
                    ? $t("hj132")
                    : item.status == 3
                    ? $t("hj133")
                    : item.status == 4
                    ? $t("hj134")
                    : item.status == 5
                    ? $t("hj135")
                    : ""
                }}</span>
              <div
                class="right_btn pink"
                style="padding: 0px 0.2rem"
                @click="renjiao(item)"
              >
                <span v-if="item.status !== 3">
                  {{
                    item.status == 1
                      ? $t("hj131")
                      : item.status == 2
                      ? $t("hj132")
                      : item.status == 3
                      ? $t("hj133")
                      : item.status == 4
                      ? $t("待上市")
                      : item.status == 5
                      ? $t("hj135")
                      : ""
                  }}
                </span>
                <span v-else>
                  {{ $t("hj250") }}
                </span>
              </div>
              <!---->
            </div>
          </div>
@@ -69,9 +108,13 @@
<script>
import * as api from "@/axios/api";
import handleDt from "@/utils/deTh";
import { Dialog, Notify } from "vant";
// getNewAdd
export default {
  components: {
    [Dialog.Component.name]: Dialog.Component,
  },
  props: {
    active: {
      type: String,
@@ -124,6 +167,32 @@
    this.getStock(this.active, this.zxactive);
  },
  methods: {
    renjiao(item) {
      if (item.status !== 3) {
        return;
      }
      Dialog.confirm({
        title: this.$t("提示"),
        message: this.$t("是否认缴"),
        confirmButtonText: this.$t("确定"),
        cancelButtonText: this.$t("取消"),
      })
        .then(async () => {
          const res = await api.submitSubscribe({
            id: item.id,
          });
          if (res.status === 0) {
            Notify({ type: "success", message: this.$t("认购成功") });
            this.getStock(this.active, this.zxactive);
          } else {
            Notify({ type: "danger", message: this.$t(res.msg) });
          }
          // 认购成功
        })
        .catch(() => {
          // on cancel
        });
    },
    fromDatavalue(e) {
      this.fromData.value = e.target.value;
    },
@@ -201,7 +270,7 @@
    align-items: center;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    // justify-content: space-between;
    span {
      display: inline-block;
      margin-right: 0.2rem;
@@ -220,8 +289,10 @@
    }
  }
  .right_btn {
    width: 1.9949rem;
    height: 0.6667rem;
    width: 110px;
    margin-left: 10px;
    min-height: 0.6667rem;
    padding: 15px 0;
    right: 1%;
    top: 27%;
    display: -webkit-box;