1
jhzh
2024-10-11 4b6edf3a8ebe6eebb94615ce692938550556d441
src/page/user/Warehouse/data.list.vue
@@ -310,9 +310,10 @@
          </div>
          <div class="hang">
            <div class="left">{{ $t("倉位(股)") }}</div>
            <div class="right" style="color: rgb(3, 173, 143)">
            <!-- <div class="right" style="color: rgb(3, 173, 143)">
              {{ closeSell.orderNum }}
            </div>
            </div> -->
            <input class="input_box" type="number" :max="closeSell.orderNum" :placeholder="$t('hj262')"  v-model="ordernum" />
          </div>
          <div class="hang">
            <div class="left">{{ $t("類型") }}</div>
@@ -348,6 +349,7 @@
      closeSell: {},
      show: false,
      actives: 0,
      ordernum:'',
      dataList: [],
      newdataList:[],
      timer: null,
@@ -365,7 +367,7 @@
    };
  },
  created(){
   this.dsq()
   // this.dsq()
  },
  beforeDestroy() {
    clearInterval(this.timer); // 在组件销毁前清除定时器
@@ -375,7 +377,7 @@
      // this.dataList = [];
      this.timer = setInterval(() => {
        this.getList();
      }, 3000);
      }, 1000);
    },
    pushRouter(item) {
      const obj = {
@@ -404,14 +406,16 @@
      this.loading = true;
    },
    async confirm() {
      this.$refs.closeDialog.show = false;
      const res = await sell({
        positionSn: this.closeSell.positionSn,
        number:this.ordernum
      });
      if (res.status === 0) {
        this.$refs.closeDialog.show = false;
        this.dataList = [];
        this.pageNum = 1;
        this.finished = false;
        Notify({ type: "success", message: res.msg });
        this.getList();
        this.$emit("closingPosition");
      } else {
@@ -429,11 +433,13 @@
        state: this.actives,
        stockType: laber || this.activeObj.laber,
        pageNum: 1,
        pageSize: 100,
        pageSize: 30,
      });
      this.loading = false;
      if (res.status === 0) {
        this.dataList = []
        this.newdataList = []
        if(this.actives == 0){
          this.dataList = res.data.list;
        }else{
@@ -455,23 +461,31 @@
    close(item) {
      this.closeSell = item;
      this.$refs.closeDialog.show = true;
      this.ordernum = ''
    },
    clickTabs(e) {
      this.dataList = [];
      this.pageNum = 1;
      this.finished = false;
      this.actives = e.key;
      this.$forceUpdate(); // 强制Vue重新渲染
      // this.newdataList = []
      // this.dataList = []
      if(e.key==1){
        clearTimeout(this.timer);
        clearInterval(this.timer); // 在组件销毁前清除定时器
        // clearTimeout(this.timer);
        // setTimeout(()=>{
        //   clearInterval(this.timer); // 在组件销毁前清除定时器
        // },3000)
        this.getList()
      }else{
        this.dsq()
        // this.startPolling();
        // this.dsq()
      }else{
        clearInterval(this.timer); // 在组件销毁前清除定时器
        this.getList()
      }
      this.$forceUpdate(); // 强制Vue重新渲染
      // this.getList()
      // if(e.key !=this.actives){
@@ -487,6 +501,12 @@
</script>
<style lang="less" scoped>
  .input_box{
        text-align: right;
        font-size: 16px;
            padding: 0 4px;
  }
.sport-tabs {
  // font-family: PingFang SC;
  font-family: "DINPro";