inquiryVerificationList.js 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. export default {
  2. props: {
  3. type: {
  4. type: Number,
  5. default: 1
  6. }
  7. },
  8. data() {
  9. return {
  10. list: [],
  11. editInfo: {},
  12. queryParams: {
  13. pageSize: 10,
  14. pageNum: 1,
  15. },
  16. total: 0,
  17. }
  18. },
  19. mounted() {
  20. this.getList();
  21. },
  22. methods: {
  23. onRefresh() {
  24. this.queryParams.pageNum = 1;
  25. this.getList();
  26. },
  27. getList() {
  28. uni.$u.api.inquiryVerificationList(this.queryParams, {
  29. type: this.type,
  30. }).then(res => {
  31. if (this.queryParams.pageNum === 1) {
  32. this.list = res.rows;
  33. } else {
  34. this.list = this.list.concat(res.rows);
  35. }
  36. this.total = res.total;
  37. })
  38. },
  39. loadMore(){
  40. if (this.list.length >= this.total) {
  41. uni.$u.toast('没有更多了');
  42. return;
  43. }
  44. this.queryParams.pageNum++;
  45. this.getList();
  46. },
  47. formtterStatus(status) {
  48. switch (status) {
  49. case '1':
  50. return '待询价'
  51. case '2':
  52. return '待核价'//待核价=询价完成
  53. case '3':
  54. return '核价完成'
  55. }
  56. },
  57. handleClick(item) {
  58. this.editInfo = item;
  59. this.$nextTick(() => {
  60. this.$refs.addInquiryDialog.showDialog();
  61. })
  62. },
  63. handleInquirySuccess() {
  64. this.$refs.addInquiryDialog.closeDialog();
  65. },
  66. handleInquiryCancel() {
  67. this.queryParams.pageNum = 1;
  68. this.getList();
  69. this.$refs.addInquiryDialog.closeDialog();
  70. },
  71. }
  72. }