index.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <template>
  2. <div class="certified-service-provider">
  3. <bs-table v-bind="tableOptions">
  4. <template #searchRight>
  5. <div>
  6. <a-button type="primary">
  7. <span>服务商登记</span>
  8. </a-button>
  9. </div>
  10. </template>
  11. </bs-table>
  12. </div>
  13. </template>
  14. <script setup lang="jsx">
  15. import { ref, reactive } from "vue"
  16. import { useRouter } from "vue-router";
  17. import BsTable, { useBsTable } from '/@/components/BsUi/Table/index.js';
  18. import { DISPLAY_STATE } from '/@/components/BsUi/constant.js';
  19. import useBsDict from "/@/utils/dict.js";
  20. const router = useRouter()
  21. const {
  22. tableOptions,
  23. setTablePropsValue: setValue,
  24. getTablePropsValue: getValue,
  25. } = useBsTable({
  26. tableOptions: {
  27. url: '/supports/provider/queryPage',
  28. gridOptions: {
  29. loading: false,
  30. columns: [
  31. {
  32. type: 'seq',
  33. width: 80,
  34. },
  35. {
  36. field: 'providerName',
  37. title: '服务商名称',
  38. },
  39. {
  40. field: 'id',
  41. title: '服务商ID',
  42. },
  43. {
  44. field: 'address',
  45. title: '服务商地址',
  46. },
  47. {
  48. field: 'countryRegion',
  49. title: '归属区域',
  50. },
  51. {
  52. field: 'providerType',
  53. title: '服务商类型',
  54. cellRender: {
  55. name: 'CellDict',
  56. },
  57. },
  58. {
  59. field: '',
  60. title: '是否合作项目',
  61. },
  62. {
  63. field: '',
  64. title: '合作金额(元)',
  65. },
  66. {
  67. field: '',
  68. title: '归属营销人员',
  69. },
  70. {
  71. field: 'createUserId',
  72. title: '操作人',
  73. },
  74. {
  75. field: 'createTime',
  76. title: '操作时间',
  77. },
  78. {
  79. // fixed: 'right',
  80. cellRender: {
  81. name: 'CellOption',
  82. extraProps: {
  83. buttons: [
  84. {
  85. title: '查看详情',
  86. code: 'view',
  87. display: ({ row }) => {
  88. return DISPLAY_STATE.VISIBLE;
  89. },
  90. disabled({ row }) {
  91. return false;
  92. },
  93. onClick({ row }) {
  94. router.push('/market-manage/service-provider-manage/detail?id=' + row.id);
  95. },
  96. extraProps: {},
  97. },
  98. ],
  99. },
  100. },
  101. },
  102. ],
  103. },
  104. searchConfig: {
  105. enabled: true,
  106. fieldSpan: 4,
  107. fields: [
  108. {
  109. field: 'providerName',
  110. label: '服务商名称',
  111. component: 'a-input',
  112. componentProps: {
  113. placeholder: '请输入服务商名称',
  114. },
  115. },
  116. {
  117. field: 'address',
  118. label: '服务商地址',
  119. component: 'a-input',
  120. componentProps: {
  121. placeholder: '请输入服务商地址',
  122. },
  123. },
  124. {
  125. field: 'providerType',
  126. label: '服务商类型',
  127. component: 'a-select',
  128. componentProps: {
  129. options: useBsDict.getDictList('BLINK_PROVIDER_TYPE'),
  130. placeholder: '请输入服务商类型',
  131. },
  132. },
  133. ],
  134. },
  135. pagerConfig: {
  136. enabled: true,
  137. pageSize: 10,
  138. pageNum: 1,
  139. total: 0,
  140. // isFixed: false
  141. },
  142. toolbarConfig: {
  143. },
  144. tableSearchBeforeBiz() {
  145. const searchParams = getValue('searchConfig.data');
  146. setValue('searchConfig.data', { ...searchParams, bizModel: 'STORE-0' });
  147. },
  148. },
  149. });
  150. </script>
  151. <style lang="scss" scoped></style>