index.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. <!-- 退卡订单 -->
  2. <template>
  3. <div class="silent-expire-alarm">
  4. <!-- 搜索条件区 -->
  5. <div class="search-section">
  6. <Search/>
  7. </div>
  8. <!-- 数据表格 -->
  9. <a-table :columns="columns" :data="tableData" :pagination="pagination" :scroll="{ x: '100%', y: '400px' }">
  10. <template #detail="{ record }">
  11. <a-button @click="openDetail(record)" type="text">订单详情</a-button>
  12. </template>
  13. <template #orderStatus="{ record }">
  14. <a-tag color="orangered" v-if="record.moderationStatus == 1">待审核</a-tag>
  15. <a-tag color="arcoblue" v-if="record.moderationStatus == 2">审核通过</a-tag>
  16. <a-tag color="#f53f3f" v-if="record.moderationStatus == 3">已驳回</a-tag>
  17. </template>
  18. <template #id="{ record }">
  19. <div class="line_heis" @click="openDetail(record)">{{ record.id }}</div>
  20. </template>
  21. <template #operate="{ record }">
  22. <a-button type="primary" @click="showAudit = true">审核</a-button>
  23. </template>
  24. </a-table>
  25. <Status v-model:modelValue="showAudit" @submit="intData()" />
  26. <Detaile v-model:modelValue="showDetail" @submit="intData()" :FormDataList="FormDataList" />
  27. </div>
  28. </template>
  29. <script setup>
  30. import { ref, onMounted, toRefs } from 'vue';
  31. import Status from './status.vue'
  32. import Search from '@/components/Search/index.vue'
  33. const state = ref({
  34. tableData: [],
  35. pagination: {
  36. total: 0,
  37. current: 1,
  38. size: 10,
  39. },
  40. showDetail: false,
  41. showAudit: false,
  42. FormDataList: {}
  43. })
  44. const { tableData, pagination, showDetail, showAudit, FormDataList } = toRefs(state.value)
  45. const columns = [
  46. { title: '序号', dataIndex: 'index', align: 'center', render: ({ rowIndex }) => rowIndex + 1 },
  47. {
  48. title: '订单编号', slotName: 'id', ellipsis: true,
  49. tooltip: true,
  50. },
  51. {
  52. title: '客户名称', dataIndex: 'userName', ellipsis: true,
  53. tooltip: true,
  54. },
  55. { title: '审核状态', slotName: 'orderStatus', ellipsis: true },
  56. {
  57. title: '供应商名称', dataIndex: 'sourceName', ellipsis: true,
  58. tooltip: true,
  59. },
  60. { title: '卡数量', dataIndex: 'quantity', ellipsis: true },
  61. { title: '注销日期', dataIndex: 'period_of_silence', ellipsis: true },
  62. { title: '操作', slotName: 'operate', align: 'center', ellipsis: true }
  63. ];
  64. // 查看订单详情
  65. const openDetail = (item) => {
  66. showDetail.value = true;
  67. FormDataList.value = item;
  68. }
  69. // 列表-------------------------------------
  70. // 订单列表
  71. // const intData = async () => {
  72. // const param = {
  73. // current: pagination.value.current,
  74. // size: pagination.value.size,
  75. // }
  76. // const one = await Getdictionary('source')
  77. // const two = await Getdictionary('cardType')
  78. // const tree = await Getdictionary('subscriptionRelationshipStatus')
  79. // const tive = await Getdictionary('orderAuditStatus')
  80. // cancelOrderList(param).then(res => {
  81. // tableData.value = (res.data.records || []).map(item => {
  82. // const sourceName = one.filter((item) => item.typeKey == enum_dict.SOURCE)?.find(val => item.source == val.value)?.label
  83. // const cardTypeName = two.filter((item) => item.typeKey == enum_dict.CARD_TYPE)?.find(val => item.card_type == val.value)?.label
  84. // const statusName = tree.filter((item) => item.typeKey == enum_dict.SUBSCRIPTION_RELATIONSHIP_STATUS)?.find(val => item.status == val.value)?.label
  85. // const moderationStatusName = tive.filter((item) => item.typeKey == enum_dict.ORDER_AUDIT_STATUS)?.find(val => item.moderation_status == val.value)?.label
  86. // return {
  87. // ...item,
  88. // moderationStatusName,
  89. // statusName,
  90. // cardTypeName,
  91. // sourceName
  92. // }
  93. // });
  94. // pagination.value.total = res.data.total;
  95. // })
  96. // }
  97. onMounted(() => {
  98. // intData();
  99. })
  100. </script>
  101. <style scoped lang="less">
  102. .silent-expire-alarm {
  103. padding: 20px !important;
  104. // background: #fcf;
  105. }
  106. .search-section {
  107. margin-bottom: 20px;
  108. }
  109. .arco-table-th {
  110. white-space: nowrap;
  111. }
  112. .audit-txt {
  113. display: flex;
  114. justify-content: center;
  115. align-items: center;
  116. .audit-tag {
  117. margin-left: 20px;
  118. background: #63c2c6;
  119. color: #fff;
  120. font-size: 12px;
  121. display: flex;
  122. justify-content: center;
  123. align-items: center;
  124. padding: 0 10px;
  125. box-sizing: border-box;
  126. border-radius: 50px;
  127. }
  128. }
  129. .audit-btn {
  130. margin-bottom: 10px;
  131. }
  132. .detail-box {
  133. .detail-item-box {
  134. display: flex;
  135. justify-content: space-between;
  136. align-items: center;
  137. margin-bottom: 10px;
  138. .detail-item {
  139. //styleName: Body/Medium;
  140. font-family: PingFang SC;
  141. font-size: 14px;
  142. font-weight: 400;
  143. line-height: 22px;
  144. text-align: left;
  145. display: flex;
  146. align-items: center;
  147. min-width: 350px;
  148. .item-label {
  149. color: rgba(0, 0, 0, 0.4);
  150. width: 120px;
  151. text-align: right;
  152. margin-right: 10px;
  153. }
  154. .item-content {
  155. color: rgba(51, 51, 51, 1);
  156. }
  157. }
  158. }
  159. }
  160. .detail-table {
  161. margin-top: 20px;
  162. }
  163. .line_heis {
  164. color: #FF8839;
  165. cursor: pointer;
  166. display: inline-block;
  167. }
  168. .line_heis:hover {
  169. color: #168cff;
  170. }
  171. </style>