check.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <template>
  2. <view class="">
  3. <view class="head">
  4. <text>
  5. 门店审核
  6. </text>
  7. <text>
  8. 共{{ total }}个
  9. </text>
  10. </view>
  11. <My_listbox ref="List" @getlist="getList" bottomHeight="30">
  12. <store-list check ref="storeList" :list="list" @onClick="onClick" @onHandle="onHandle" />
  13. </My_listbox>
  14. </view>
  15. </template>
  16. <script>
  17. import storeList from "../team/modules/storeList.vue"
  18. export default {
  19. components: { storeList },
  20. data() {
  21. return {
  22. "content": {
  23. "where": {
  24. "condition": ""
  25. }
  26. },
  27. total: 0,
  28. list: [],
  29. uninitialized: true
  30. }
  31. },
  32. onLoad() {
  33. this.getList()
  34. uni.setNavigationBarTitle({
  35. title: '门店信息审核'
  36. });
  37. },
  38. methods: {
  39. getList(init = false) {
  40. if (this.paging(this.content, init)) return;
  41. this.$Http.basic({
  42. "id": "20240411141602",
  43. content: this.content
  44. }).then(res => {
  45. console.log("待审核门店列表", res)
  46. this.$refs.List.RefreshToComplete()
  47. if (this.cutoff(res.msg)) return;
  48. this.uninitialized = false;
  49. this.$refs.List.setHeight()
  50. res.data = this.$refs.storeList.handleList(res.data)
  51. this.total = res.total;
  52. this.list = res.pageNumber == 1 ? res.data : this.list.concat(res.data), this.colors;
  53. this.content = this.$refs.List.paging(this.content, res)
  54. })
  55. },
  56. updateList() {
  57. if (this.content.pageNumber && this.content.pageNumber >= 2) {
  58. let content = this.paging(this.content, true, true)
  59. this.$Http.basic({
  60. "id": "20240411141602",
  61. content
  62. }).then(res => {
  63. console.log("更新待审核门店列表", res)
  64. if (this.cutoff(res.msg)) return;
  65. this.$refs.List.setHeight()
  66. this.list = this.$refs.storeList.handleList(res.data);
  67. this.total = res.total;
  68. this.$refs.List.paging(content, res, true)
  69. })
  70. }
  71. },
  72. onClick(item) {
  73. this.onInsert();
  74. uni.navigateTo({
  75. url: '/store/center/detail?id=' + item.sa_storeid,
  76. });
  77. },
  78. onHandle(item, funname) {
  79. console.log(item, funname)
  80. let id = '',
  81. that = this;
  82. switch (funname) {
  83. case "退回":
  84. id = 20240410135402;
  85. break;
  86. case "审核":
  87. id = 20240410141002;
  88. break;
  89. case "反审核":
  90. id = 20240410141402;
  91. break;
  92. }
  93. uni.showModal({
  94. title: '提醒',
  95. content: `确定对“${item.storename}”执行“${funname}”操作吗?`,
  96. confirmText: funname,
  97. success: ({
  98. confirm
  99. }) => {
  100. if (confirm) that.$Http.basic({
  101. id,
  102. "content": {
  103. "sa_storeid": item.sa_storeid
  104. }
  105. }).then(res => {
  106. console.log(`${funname}门店`, res)
  107. if (that.cutoff(res.msg, `门店“${funname}”成功`)) return;
  108. that.updateList()
  109. })
  110. },
  111. })
  112. },
  113. onInsert() {
  114. this.$Http.uploadStoreList = function () {
  115. if (this.content.pageNumber && this.content.pageNumber >= 2) {
  116. let content = this.paging(this.content, true, true)
  117. this.$Http.basic({
  118. "id": "20240411141602",
  119. content
  120. }).then(res => {
  121. console.log("待审核门店列表", res)
  122. if (this.cutoff(res.msg)) return;
  123. this.$refs.List.setHeight()
  124. this.list = this.$refs.storeList.handleList(res.data);
  125. this.$refs.List.paging(content, res, true)
  126. })
  127. }
  128. }.bind(this)
  129. }
  130. },
  131. }
  132. </script>
  133. <style lang="scss" scoped>
  134. .head {
  135. display: flex;
  136. align-items: center;
  137. justify-content: space-between;
  138. height: 37px;
  139. padding: 0 10px;
  140. box-sizing: border-box;
  141. font-family: Source Han Sans SC, Source Han Sans SC;
  142. font-size: 12px;
  143. color: #666666;
  144. }
  145. </style>