index.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <template>
  2. <basic-container>
  3. <avue-crud :option="option"
  4. :data="dataList"
  5. ref="crud"
  6. v-model="form"
  7. :page.sync="page"
  8. :search.sync="search"
  9. :table-loading="loading"
  10. @search-change="searchChange"
  11. @search-reset="searchReset"
  12. @selection-change="selectionChange"
  13. @current-change="currentChange"
  14. @size-change="sizeChange"
  15. @refresh-change="refreshChange"
  16. @on-load="onLoad">
  17. </avue-crud>
  18. </basic-container>
  19. </template>
  20. <script>
  21. import option from "./config/mainList.json";
  22. import {customerList} from "@/api/basicData/inventoryAccount"
  23. export default {
  24. data() {
  25. return {
  26. loading : false,
  27. form: {},
  28. search:{},
  29. show:true,
  30. detailData:{},
  31. option: option,
  32. parentId:0,
  33. dataList: [],
  34. page: {
  35. pageSize: 10,
  36. pagerCount: 5,
  37. total: 0,
  38. },
  39. query:{},
  40. }
  41. },
  42. created() {
  43. },
  44. mounted() {
  45. },
  46. methods: {
  47. //新单打开
  48. addReceipt(row){
  49. },
  50. //编辑打开
  51. editOpen(row, status){
  52. },
  53. rowDel(row, index, done) {
  54. if(row.id){
  55. this.$confirm("确定将选择数据删除?", {
  56. confirmButtonText: "确定",
  57. cancelButtonText: "取消",
  58. type: "warning"
  59. }).then(() => {
  60. });
  61. }
  62. },
  63. //点击搜索按钮触发
  64. searchChange(params, done) {
  65. this.query = params;
  66. this.page.currentPage = 1;
  67. this.onLoad(this.page, params);
  68. done()
  69. },
  70. searchReset() {
  71. console.log('1')
  72. },
  73. selectionChange() {
  74. console.log('1')
  75. },
  76. currentChange() {
  77. console.log('1')
  78. },
  79. sizeChange() {
  80. console.log('1')
  81. },
  82. refreshChange() {
  83. console.log('1')
  84. },
  85. onLoad(page, params = {}) {
  86. this.loading = true;
  87. if(params){
  88. if (params.createTime!= undefined) { //付款
  89. params.createStartTime = params.createTime[0]+ " " + "00:00:00";
  90. params.createEndTime = params.createTime[1] + " " + "23:59:59";
  91. this.$delete(params,'createTime')
  92. }
  93. }
  94. customerList(page.currentPage, page.pageSize,params).then(res=>{
  95. this.dataList = res.data.data.records
  96. this.page.total = res.data.data.total
  97. this.loading = false;
  98. })
  99. },
  100. }
  101. }
  102. </script>
  103. <style scoped>
  104. </style>