inquiryVerificationList.js 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. getList() {
  24. uni.$u.api.inquiryVerificationList(this.queryParams, {
  25. type: this.type,
  26. }).then(res => {
  27. if (this.queryParams.pageNum === 1) {
  28. this.list = res.rows;
  29. } else {
  30. this.list = this.list.concat(res.rows);
  31. }
  32. this.total = res.total;
  33. })
  34. },
  35. loadMore(){
  36. if (this.list.length >= this.total) {
  37. uni.$u.toast('没有更多了');
  38. return;
  39. }
  40. this.queryParams.pageNum++;
  41. this.getList();
  42. },
  43. formtterStatus(status) {
  44. switch (status) {
  45. case '1':
  46. return '待询价'
  47. case '2':
  48. return '待核价'//待核价=询价完成
  49. case '3':
  50. return '核价完成'
  51. }
  52. },
  53. handleClick(item) {
  54. this.editInfo = item;
  55. this.$nextTick(() => {
  56. this.$refs.addInquiryDialog.showDialog();
  57. })
  58. },
  59. handleInquirySuccess() {
  60. this.$refs.addInquiryDialog.closeDialog();
  61. },
  62. handleInquiryCancel() {
  63. this.queryParams.pageNum = 1;
  64. this.getList();
  65. this.$refs.addInquiryDialog.closeDialog();
  66. },
  67. }
  68. }