index.vue 5.7 KB

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