Commit e56123a3 authored by yaya's avatar yaya

feat: 详情页添加倒计时

parent d28bebd2
......@@ -5,8 +5,12 @@
<div>{{ saleId }}</div>
<el-button
type="text"
style="margin-left: 10px; margin-right: auto">{{ systemStateName }}
style="margin-left: 10px;">{{ systemStateName }}
</el-button>
<div v-if="isHasPrice && (systemState === 1 || systemState === 8) && timeStr" style="margin-left: 10px">
<NormalCountdown :last="timeStr"/>
</div>
<div style="margin-right: auto"/>
<div v-if="systemState === 1" style="margin-right: 12px">
<el-button
:disabled="isHasPrice"
......@@ -171,13 +175,15 @@ import ImageValueDialog from './components/ImageValueDialog'
import SaleConsignDialog from './components/SaleConsignDialog'
import FinishSettlementDialog from './components/FinishSettlementDialog'
import CancelConsignDialog from './components/CancelConsignDialog'
import NormalCountdown from './components/NormalCountdown'
export default {
name: 'ConsignDetail',
components: { CancelConsignDialog, FinishSettlementDialog, SaleConsignDialog, ImageValueDialog, IdentifyValueDialog, CheckVideoDialog, CheckLargeImageDialog },
components: { NormalCountdown, CancelConsignDialog, FinishSettlementDialog, SaleConsignDialog, ImageValueDialog, IdentifyValueDialog, CheckVideoDialog, CheckLargeImageDialog },
data() {
return {
saleId: '',
timeStr: '',
systemState: 0,
systemStateName: '',
consignDetail: {},
......@@ -215,6 +221,7 @@ export default {
return
}
this.saleId = this.$route.query.saleId
this.timeStr = this.$route.query.timeStr
const loading = this.$loading({
lock: true,
text: 'Loading',
......
......@@ -270,6 +270,11 @@ export default {
this.list = response.data.data.dataList
this.total = response.data.data.total
this.listLoading = false
if (this.listQuery.systemState === '1' || this.listQuery.systemState === '8') {
this.list.forEach((item, index) => {
item.timeStr = new Date(item.countdownTime).getTime()
})
}
}).catch((e) => {
this.list = []
this.total = 0
......@@ -281,7 +286,7 @@ export default {
*/
handleToDetail(item) {
localStorage.setItem('systemState', this.listQuery.systemState)
this.$router.push({ path: '/consign/consignDetail', query: { saleId: item.saleId }})
this.$router.push({ path: '/consign/consignDetail', query: { saleId: item.saleId, timeStr: item.timeStr }})
},
/**
* 图文评估
......@@ -309,11 +314,6 @@ export default {
})
})
},
// 取消完成寄售
handleCancelFinishDialog() {
this.finishDialogShow = false
this.finishForm = {}
},
/**
* 实物评估
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment