index.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  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. searchForm: {
  35. cardNumber: '',
  36. customerName: '',
  37. },
  38. tableData: [],
  39. pagination: {
  40. total: 0,
  41. current: 1,
  42. size: 10,
  43. },
  44. showDetail: false,
  45. showAudit: false,
  46. FormDataList: {}
  47. })
  48. const { searchForm, tableData, pagination, showDetail, showAudit, FormDataList } = toRefs(state.value)
  49. const columns = [
  50. { title: '序号', dataIndex: 'index', align: 'center', render: ({ rowIndex }) => rowIndex + 1 },
  51. {
  52. title: '订单编号', slotName: 'id', ellipsis: true,
  53. tooltip: true,
  54. },
  55. {
  56. title: '客户名称', dataIndex: 'userName', ellipsis: true,
  57. tooltip: true,
  58. },
  59. { title: '审核状态', slotName: 'orderStatus', ellipsis: true },
  60. {
  61. title: '供应商名称', dataIndex: 'sourceName', ellipsis: true,
  62. tooltip: true,
  63. },
  64. { title: '资费', dataIndex: 'quantity', ellipsis: true },
  65. { title: '卡号', dataIndex: 'period_of_silence', ellipsis: true },
  66. { title: '订单金额', dataIndex: 'payment_amount', ellipsis: true },
  67. { title: '操作', slotName: 'operate', align: 'center', ellipsis: true }
  68. ];
  69. // 查看订单详情
  70. const openDetail = (item) => {
  71. showDetail.value = true;
  72. FormDataList.value = item;
  73. }
  74. // 列表-------------------------------------
  75. // 订单列表
  76. // const intData = async () => {
  77. // const param = {
  78. // current: pagination.value.current,
  79. // size: pagination.value.size,
  80. // }
  81. // const one = await Getdictionary('source')
  82. // const two = await Getdictionary('cardType')
  83. // const tree = await Getdictionary('subscriptionRelationshipStatus')
  84. // const tive = await Getdictionary('orderAuditStatus')
  85. // cancelOrderList(param).then(res => {
  86. // tableData.value = (res.data.records || []).map(item => {
  87. // const sourceName = one.filter((item) => item.typeKey == enum_dict.SOURCE)?.find(val => item.source == val.value)?.label
  88. // const cardTypeName = two.filter((item) => item.typeKey == enum_dict.CARD_TYPE)?.find(val => item.card_type == val.value)?.label
  89. // const statusName = tree.filter((item) => item.typeKey == enum_dict.SUBSCRIPTION_RELATIONSHIP_STATUS)?.find(val => item.status == val.value)?.label
  90. // const moderationStatusName = tive.filter((item) => item.typeKey == enum_dict.ORDER_AUDIT_STATUS)?.find(val => item.moderation_status == val.value)?.label
  91. // return {
  92. // ...item,
  93. // moderationStatusName,
  94. // statusName,
  95. // cardTypeName,
  96. // sourceName
  97. // }
  98. // });
  99. // pagination.value.total = res.data.total;
  100. // })
  101. // }
  102. onMounted(() => {
  103. // intData();
  104. })
  105. </script>
  106. <style scoped lang="less">
  107. .silent-expire-alarm {
  108. padding: 20px !important;
  109. // background: #fcf;
  110. }
  111. .search-section {
  112. margin-bottom: 20px;
  113. }
  114. .arco-table-th {
  115. white-space: nowrap;
  116. }
  117. .audit-txt {
  118. display: flex;
  119. justify-content: center;
  120. align-items: center;
  121. .audit-tag {
  122. margin-left: 20px;
  123. background: #63c2c6;
  124. color: #fff;
  125. font-size: 12px;
  126. display: flex;
  127. justify-content: center;
  128. align-items: center;
  129. padding: 0 10px;
  130. box-sizing: border-box;
  131. border-radius: 50px;
  132. }
  133. }
  134. .audit-btn {
  135. margin-bottom: 10px;
  136. }
  137. .detail-box {
  138. .detail-item-box {
  139. display: flex;
  140. justify-content: space-between;
  141. align-items: center;
  142. margin-bottom: 10px;
  143. .detail-item {
  144. //styleName: Body/Medium;
  145. font-family: PingFang SC;
  146. font-size: 14px;
  147. font-weight: 400;
  148. line-height: 22px;
  149. text-align: left;
  150. display: flex;
  151. align-items: center;
  152. min-width: 350px;
  153. .item-label {
  154. color: rgba(0, 0, 0, 0.4);
  155. width: 120px;
  156. text-align: right;
  157. margin-right: 10px;
  158. }
  159. .item-content {
  160. color: rgba(51, 51, 51, 1);
  161. }
  162. }
  163. }
  164. }
  165. .detail-table {
  166. margin-top: 20px;
  167. }
  168. .line_heis {
  169. color: #FF8839;
  170. cursor: pointer;
  171. display: inline-block;
  172. }
  173. .line_heis:hover {
  174. color: #168cff;
  175. }
  176. </style>