detail.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <template>
  2. <view>
  3. <agency-list :list="[detail]" boxWidth="100vw" />
  4. <view class="head">
  5. <view>
  6. 门店信息
  7. </view>
  8. <view>
  9. 共<text class="total">{{ total }}</text>个
  10. </view>
  11. </view>
  12. <My_listbox ref="List" @getlist="getList" bottomHeight="30">
  13. <store-list ref="storeList" :list="list" @onClick="onClick" />
  14. </My_listbox>
  15. </view>
  16. </template>
  17. <script>
  18. import agencyList from "../team/modules/agencyList"
  19. import storeList from "../team/modules/storeList"
  20. export default {
  21. components: { agencyList, storeList },
  22. data() {
  23. return {
  24. detail: {},
  25. total: 0,
  26. list: [],
  27. "content": {
  28. "where": {
  29. "condition": "",
  30. "storetype": "",
  31. "status": "审核"
  32. }
  33. }
  34. }
  35. },
  36. onLoad(options) {
  37. this.detail = JSON.parse(options.data);
  38. this.content.sys_enterpriseid = this.detail.sys_enterpriseid;
  39. this.getList();
  40. uni.setNavigationBarTitle({
  41. title: options.title || '团队信息'
  42. });
  43. },
  44. methods: {
  45. getList(init = false) {
  46. if (this.paging(this.content, init)) return;
  47. this.$Http.basic({
  48. "id": "20240410095602",
  49. content: this.content
  50. }).then(res => {
  51. console.log("经销商门店列表", res)
  52. this.$refs.List.RefreshToComplete()
  53. if (this.cutoff(res.msg)) return;
  54. this.uninitialized = false;
  55. this.$refs.List.setHeight()
  56. res.data = this.$refs.storeList.handleList(res.data)
  57. this.total = res.total;
  58. this.list = res.pageNumber == 1 ? res.data : this.list.concat(res.data);
  59. this.content = this.$refs.List.paging(this.content, res)
  60. })
  61. },
  62. onClick(item) {
  63. // this.onInsert();
  64. uni.navigateTo({
  65. url: '/store/center/detail?id=' + item.sa_storeid,
  66. });
  67. },
  68. /* onInsert() {
  69. this.$Http.uploadStoreList = function () {
  70. if (this.content.pageNumber && this.content.pageNumber >= 2) {
  71. let content = this.paging(this.content, true, true)
  72. this.$Http.basic({
  73. "id": "20240410095602",
  74. content
  75. }).then(res => {
  76. console.log("更新门店列表", res)
  77. if (this.cutoff(res.msg)) return;
  78. this.$refs.List.setHeight()
  79. this.list = this.$refs.storeList.handleList(res.data);
  80. this.$refs.List.paging(content, res, true)
  81. })
  82. }
  83. }.bind(this)
  84. }, */
  85. },
  86. }
  87. </script>
  88. <style lang="scss" scoped>
  89. .head {
  90. display: flex;
  91. justify-content: space-between;
  92. width: 100vw;
  93. height: 27px;
  94. padding: 10px;
  95. padding-top: 0;
  96. font-family: Source Han Sans SC, Source Han Sans SC;
  97. font-size: 12px;
  98. color: #666666;
  99. box-sizing: border-box;
  100. .total {
  101. padding: 0 5px;
  102. }
  103. }
  104. </style>