export default { props: { type: { type: Number, default: 1 } }, data() { return { list: [], editInfo: {}, queryParams: { pageSize: 10, pageNum: 1, }, total: 0, } }, mounted() { this.getList(); }, methods: { getList() { uni.$u.api.inquiryVerificationList(this.queryParams, { type: this.type, }).then(res => { if (this.queryParams.pageNum === 1) { this.list = res.rows; } else { this.list = this.list.concat(res.rows); } this.total = res.total; }) }, loadMore(){ if (this.list.length >= this.total) { uni.$u.toast('没有更多了'); return; } this.queryParams.pageNum++; this.getList(); }, formtterStatus(status) { switch (status) { case '1': return this.type == '1' ? '待询价' : '待核价'; case '2': return this.type == '1' ? '询价完成' : '核价完成'; } }, handleClick(item) { this.editInfo = item; this.$refs.addInquiryDialog.showDialog(); }, handleInquirySuccess() { this.$refs.addInquiryDialog.closeDialog(); }, handleInquiryCancel() { this.queryParams.pageNum = 1; this.getList(); this.$refs.addInquiryDialog.closeDialog(); }, } }