particularsAll.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. <template>
  2. <div class="container-particulars">
  3. <el-dialog
  4. v-dialogDrag
  5. :close-on-click-modal="false"
  6. :modal-append-to-body="false"
  7. center
  8. :append-to-body="true"
  9. :visible.sync="particularsDialogVisible"
  10. :before-close="okBtn"
  11. :width="subscribe == '报名失败详情' ? '1000px' : '1100px'"
  12. >
  13. <div slot="title" style="display: flex; align-items: center">
  14. <img :src="$icons.warntop" style="color: #fff; width: 16px; height: 16px; margin-right: 5px" />
  15. <span style="font-size: 16px">报名人数</span>
  16. </div>
  17. <div class="content-box">
  18. <div class="top-text" style="margin-bottom: 20px">
  19. <template v-if="memberType == 'Admin'"> 共有{{ total }}人报名</template>
  20. <template v-else-if="memberType == 'Sale'"> 共有{{ total }}人报名,其中本人名下客户{{ myTotal }}人 </template>
  21. <template v-else> 共有{{ total }}人报名,其中本组名下客户{{ myTotal }}人 </template>
  22. </div>
  23. <div class="table-box">
  24. <el-table height="400px" :data="dataList" border style="width: 100%">
  25. <el-table-column min-width="80" align="center" prop="RealName" key="name" label="姓名"></el-table-column>
  26. <el-table-column v-if="dialogVisibleList.SpecialType == 1" min-width="115" align="center" prop="Mobile" key="mobile" label="手机号"></el-table-column>
  27. <el-table-column v-if="dialogVisibleList.SpecialType == 1" min-width="140" align="center" key="outboundMobile" label="外呼号码">
  28. <template slot-scope="scope">
  29. <span>{{ scope.row.OutboundMobile }}</span>
  30. <img @click="modification(scope.row.Id, scope.row.OutboundMobile)" :src="$icons.amend" style="color: #fff; width: 12px; height: 12px; margin-left: 5px; vertical-align: middle" />
  31. </template>
  32. </el-table-column>
  33. <el-table-column min-width="135" align="center" prop="CompanyName" key="company" label="公司名称"></el-table-column>
  34. <el-table-column min-width="110" align="center" prop="SellerName" key="seller" label="所属销售"></el-table-column>
  35. <el-table-column min-width="160" align="center" prop="CreateTime" key="seller" label="报名时间"></el-table-column>
  36. <el-table-column min-width="135" align="center" prop="" key="cz1" label="操作">
  37. <template slot-scope="scope">
  38. <span class="editsty" @click="cancelApply(scope.row)">取消报名</span>
  39. </template>
  40. </el-table-column>
  41. </el-table>
  42. </div>
  43. </div>
  44. <div slot="footer" class="dialog-footer">
  45. <div style="margin: 10px 0">
  46. <span style="margin-left: 30px">
  47. <a :href="exportUser" download>
  48. <el-button type="primary">下载名单</el-button>
  49. </a>
  50. </span>
  51. <el-button style="margin-left: 30px" type="primary" plain @click="okBtn">知道了</el-button>
  52. </div>
  53. </div>
  54. </el-dialog>
  55. <edit-mobile :editMobileDialogVisible.sync="editMobileDialogVisible" :editMobileId="editMobileId" :outboundMobile="outboundMobile" isType="专项" />
  56. </div>
  57. </template>
  58. <script>
  59. import { raiInterface, raiSpecial } from "@/api/api.js";
  60. import EditMobile from "../../components/editMobile.vue";
  61. export default {
  62. name: "",
  63. components: { EditMobile },
  64. props: {
  65. particularsDialogVisible: {
  66. type: Boolean,
  67. default: false,
  68. },
  69. subscribe: {
  70. type: String,
  71. default: "报名详情",
  72. },
  73. dialogVisibleList: {
  74. type: Object,
  75. },
  76. },
  77. data() {
  78. return {
  79. dataList: [], //表格
  80. total: "",
  81. myTotal: "",
  82. memberType: "",
  83. editMobileDialogVisible: false, //
  84. editMobileId: "", //
  85. outboundMobile: "",
  86. isFullNum: false, //报名人数是否已满
  87. };
  88. },
  89. computed: {
  90. exportUser() {
  91. let param_token = localStorage.getItem("auth") || "";
  92. return import.meta.env.VITE_APP_API_ROOT + "/cygx/special/tripList?ActivityId=" + this.dialogVisibleList.ActivityId + "&IsExport=" + true + "&" + param_token;
  93. },
  94. },
  95. watch: {
  96. particularsDialogVisible: {
  97. handler(newval) {
  98. if (newval) {
  99. this.getsDataList();
  100. }
  101. },
  102. },
  103. },
  104. created() {},
  105. mounted() {},
  106. methods: {
  107. okBtn() {
  108. this.$parent.particularsDialogVisible = false;
  109. },
  110. //列表表格
  111. getsDataList() {
  112. raiSpecial
  113. .getSpecialtripList({
  114. ActivityId: this.dialogVisibleList.ActivityId,
  115. })
  116. .then((res) => {
  117. if (res.Ret !== 200) return;
  118. this.$nextTick(() => {
  119. this.dataList = res.Data.List;
  120. this.total = res.Data.Total;
  121. this.memberType = res.Data.MemberType;
  122. this.myTotal = res.Data.MyTotal;
  123. });
  124. });
  125. },
  126. modification(id, value) {
  127. this.editMobileDialogVisible = true;
  128. this.editMobileId = id;
  129. this.outboundMobile = value;
  130. },
  131. //取消报名
  132. cancelApply(item) {
  133. this.$confirm(`确定要取消该用户的报名吗?`, `取消报名`, {
  134. confirmButtonText: "是",
  135. cancelButtonText: "否",
  136. type: "warning",
  137. })
  138. .then(async () => {
  139. const res = await raiSpecial.cancelSpecialtripList({
  140. UserId: item.UserId,
  141. ActivityId: item.ActivityId,
  142. });
  143. if (res.Ret !== 200) return;
  144. this.$message({
  145. type: "success",
  146. message: `取消报名成功!`,
  147. });
  148. this.getsDataList();
  149. this.$parent.getsDataList();
  150. })
  151. .catch(() => {
  152. this.$message({
  153. type: "info",
  154. message: "已取消操作",
  155. });
  156. });
  157. },
  158. },
  159. };
  160. </script>
  161. <style lang="scss">
  162. .container-particulars {
  163. .table-box {
  164. margin: 20px auto;
  165. }
  166. .top-text {
  167. display: flex;
  168. align-items: center;
  169. div {
  170. margin-left: 20px;
  171. }
  172. }
  173. .el-radio {
  174. margin-right: 15px !important;
  175. }
  176. .el-switch__label {
  177. color: #606266;
  178. font-size: 14px;
  179. font-weight: 400;
  180. }
  181. .is-active {
  182. color: #409eff !important;
  183. }
  184. .el-radio__label {
  185. font-weight: 400;
  186. }
  187. }
  188. </style>