Commit e56123a3 authored by yaya's avatar yaya

feat: 详情页添加倒计时

parent d28bebd2
...@@ -5,8 +5,12 @@ ...@@ -5,8 +5,12 @@
<div>{{ saleId }}</div> <div>{{ saleId }}</div>
<el-button <el-button
type="text" type="text"
style="margin-left: 10px; margin-right: auto">{{ systemStateName }} style="margin-left: 10px;">{{ systemStateName }}
</el-button> </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"> <div v-if="systemState === 1" style="margin-right: 12px">
<el-button <el-button
:disabled="isHasPrice" :disabled="isHasPrice"
...@@ -171,13 +175,15 @@ import ImageValueDialog from './components/ImageValueDialog' ...@@ -171,13 +175,15 @@ import ImageValueDialog from './components/ImageValueDialog'
import SaleConsignDialog from './components/SaleConsignDialog' import SaleConsignDialog from './components/SaleConsignDialog'
import FinishSettlementDialog from './components/FinishSettlementDialog' import FinishSettlementDialog from './components/FinishSettlementDialog'
import CancelConsignDialog from './components/CancelConsignDialog' import CancelConsignDialog from './components/CancelConsignDialog'
import NormalCountdown from './components/NormalCountdown'
export default { export default {
name: 'ConsignDetail', name: 'ConsignDetail',
components: { CancelConsignDialog, FinishSettlementDialog, SaleConsignDialog, ImageValueDialog, IdentifyValueDialog, CheckVideoDialog, CheckLargeImageDialog }, components: { NormalCountdown, CancelConsignDialog, FinishSettlementDialog, SaleConsignDialog, ImageValueDialog, IdentifyValueDialog, CheckVideoDialog, CheckLargeImageDialog },
data() { data() {
return { return {
saleId: '', saleId: '',
timeStr: '',
systemState: 0, systemState: 0,
systemStateName: '', systemStateName: '',
consignDetail: {}, consignDetail: {},
...@@ -215,6 +221,7 @@ export default { ...@@ -215,6 +221,7 @@ export default {
return return
} }
this.saleId = this.$route.query.saleId this.saleId = this.$route.query.saleId
this.timeStr = this.$route.query.timeStr
const loading = this.$loading({ const loading = this.$loading({
lock: true, lock: true,
text: 'Loading', text: 'Loading',
......
...@@ -270,6 +270,11 @@ export default { ...@@ -270,6 +270,11 @@ export default {
this.list = response.data.data.dataList this.list = response.data.data.dataList
this.total = response.data.data.total this.total = response.data.data.total
this.listLoading = false 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) => { }).catch((e) => {
this.list = [] this.list = []
this.total = 0 this.total = 0
...@@ -281,7 +286,7 @@ export default { ...@@ -281,7 +286,7 @@ export default {
*/ */
handleToDetail(item) { handleToDetail(item) {
localStorage.setItem('systemState', this.listQuery.systemState) 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 { ...@@ -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