| | |
| | | :key="index" |
| | | @click="$router.push(`/Stockdetail?codes=${item.positionSn}`)" > |
| | | <div @click.stop="pushRouter(item)"> |
| | | |
| | | <div class="title-box" style="justify-content: space-between;"> |
| | | <div class="span">{{ item.stockName }}</div> |
| | | <div class="span" :style="item.isListed==false?'color:red;':''">{{ item.stockName }}</div> |
| | | <div |
| | | class="states" |
| | | :class="item.orderDirection === '买跌' ? 'states-red' : ''" |
| | |
| | | <div class="sport-content-title2" > |
| | | {{ $t("盈虧") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text" style="color:#3e9976;"> |
| | | <div class="sport-content-text2" :style="item.profitAndLoseParent.charAt(0)=='-'?'color:#cc1b1b;':'color:#3e9976;'"> |
| | | ₹{{ item.profitAndLose | _toLocaleString }} |
| | | </div> |
| | | </div> |
| | |
| | | <div class="sport-content-title2"> |
| | | {{ $t("hj141") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2" style="color:#3e9976;"> |
| | | <div class="sport-content-text2" :style="item.profitAndLoseParent.charAt(0)=='-'?'color:#cc1b1b;':'color:#3e9976;'"> |
| | | {{ item.profitAndLoseParent }} |
| | | </div> |
| | | </div> |
| | |
| | | <van-col span="8"> |
| | | <div style="text-align: right"> |
| | | <div class="sport-content-title2">{{ $t("倉位(股)") }}</div> |
| | | <div class="sport-content-text">{{ item.orderNum }}</div> |
| | | <div class="sport-content-text2">{{ item.orderNum }}</div> |
| | | </div></van-col |
| | | > |
| | | </van-row> |
| | |
| | | </van-col> |
| | | </van-row> |
| | | <van-row> |
| | | <van-col span="8"> |
| | | <van-col span="12"> |
| | | <div style="text-align: left"> |
| | | <div class="sport-content-title2"> |
| | | {{ $t("hj44") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2"> |
| | | ₹{{ item.orderFee | _toLocaleString }} |
| | | </div> |
| | | </div> |
| | | </van-col> |
| | | <van-col span="12"> |
| | | <div style="text-align: right"> |
| | | <div class="sport-content-title2"> |
| | | {{ $t("待补金额") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2"> |
| | | ₹{{ item.amountToBeCovered | _toLocaleString }} |
| | | </div> |
| | | </div> |
| | | </van-col> |
| | |
| | | <div class="sport-content-title2"> |
| | | {{ $t("盈虧") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text" style="color:#3e9976;"> |
| | | <div class="sport-content-text2" :style="item.profitAndLoseParent.charAt(0)=='-'?'color:#cc1b1b;':'color:#3e9976;'"> |
| | | ₹{{ item.profitAndLose | _toLocaleString }} |
| | | </div> |
| | | </div> |
| | |
| | | <div class="sport-content-title2"> |
| | | {{ $t("hj141") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2" style="color:#3e9976;"> |
| | | <div class="sport-content-text2" :style="item.profitAndLoseParent.charAt(0)=='-'?'color:#cc1b1b;':'color:#3e9976;'"> |
| | | {{ item.profitAndLoseParent }} |
| | | </div> |
| | | </div> |
| | |
| | | <van-col span="8"> |
| | | <div style="text-align: right"> |
| | | <div class="sport-content-title2">{{ $t("倉位(股)") }}</div> |
| | | <div class="sport-content-text">{{ item.orderNum }}</div> |
| | | <div class="sport-content-text2">{{ item.orderNum }}</div> |
| | | </div></van-col |
| | | > |
| | | </van-row> |
| | |
| | | </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> |
| | |
| | | closeSell: {}, |
| | | show: false, |
| | | actives: 0, |
| | | ordernum:'', |
| | | dataList: [], |
| | | newdataList:[], |
| | | timer: null, |
| | |
| | | // this.dataList = []; |
| | | this.timer = setInterval(() => { |
| | | this.getList(); |
| | | }, 3000); |
| | | }, 1000); |
| | | }, |
| | | pushRouter(item) { |
| | | const obj = { |
| | |
| | | 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 { |
| | | Notify({ type: "danger", message: res.msg }); |
| | | } |
| | | }, |
| | | // 获取仓位列表 |
| | | async getLists(laber) { |
| | | if (laber) { |
| | | this.dataList = []; |
| | | this.pageNum = 1; |
| | | this.finished = false; |
| | | } |
| | | const res = await getchicang({ |
| | | state: this.actives, |
| | | stockType: laber || this.activeObj.laber, |
| | | pageNum: 1, |
| | | pageSize: 30, |
| | | }); |
| | | |
| | | this.loading = false; |
| | | if (res.status === 0) { |
| | | this.newdataList = res.data.list; |
| | | this.finished = true; |
| | | } else { |
| | | this.loading = false; |
| | | this.finished = true; |
| | | } |
| | | }, |
| | | // 获取仓位列表 |
| | |
| | | state: this.actives, |
| | | stockType: laber || this.activeObj.laber, |
| | | pageNum: 1, |
| | | pageSize: 100, |
| | | pageSize: 30, |
| | | }); |
| | | |
| | | this.loading = false; |
| | | if (res.status === 0) { |
| | | if(this.actives == 0){ |
| | | this.dataList = res.data.list; |
| | | }else{ |
| | | this.newdataList = res.data.list; |
| | | } |
| | | this.$forceUpdate(); // 强制Vue重新渲染 |
| | | // if (res.data.total <= this.dataList.length) { |
| | | this.dataList = [] |
| | | this.dataList = res.data.list; |
| | | this.finished = true; |
| | | // this.dsq() |
| | | // this.timer = setInterval(() => { |
| | | // this.getList(); |
| | | // }, 3000); |
| | | // } |
| | | } else { |
| | | this.loading = false; |
| | | this.finished = true; |
| | |
| | | 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() |
| | | |
| | | this.getLists() |
| | | // this.startPolling(); |
| | | // this.dsq() |
| | | }else{ |
| | | clearInterval(this.timer); // 在组件销毁前清除定时器 |
| | | this.dsq() |
| | | } |
| | | this.$forceUpdate(); // 强制Vue重新渲染 |
| | | |
| | | // this.getList() |
| | | // if(e.key !=this.actives){ |
| | |
| | | </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"; |