| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- export default {
- props: {
- type: {
- type: Number,
- default: 1
- }
- },
- data() {
- return {
- list: [],
- editInfo: {},
- queryParams: {
- pageSize: 10,
- pageNum: 1,
- },
- total: 0,
- }
- },
- mounted() {
- this.getList();
- },
-
- methods: {
- onRefresh() {
- this.queryParams.pageNum = 1;
- this.getList();
- },
- 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 '待询价'
- case '2':
- return '待核价'//待核价=询价完成
- case '3':
- return '核价完成'
- }
- },
- handleClick(item) {
- this.editInfo = item;
- this.$nextTick(() => {
- this.$refs.addInquiryDialog.showDialog();
- })
- },
- handleInquirySuccess() {
- this.$refs.addInquiryDialog.closeDialog();
- },
- handleInquiryCancel() {
- this.queryParams.pageNum = 1;
- this.getList();
- this.$refs.addInquiryDialog.closeDialog();
- },
- }
- }
|