meeting-special-list.vue 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. <template>
  2. <div class="pd-16" style="overflow: auto;">
  3. <div class="d-flex f-s-26">配置后按配置金额收费</div>
  4. <div class="d-flex j-st pt-20">
  5. <!-- <div>
  6. <searchTabs v-if="form?.conditions?.totalCheck == '1'" v-model="queryParams.res" @change="handleQuery" :list="tabs" key-label="name" key-count="num" key-value="type"></searchTabs>
  7. </div> -->
  8. <span style="width: 1px;"></span>
  9. <el-form :model="queryParams" ref="queryFormRef" :inline="true" label-width="auto">
  10. <el-form-item label="手机号:" prop="phone">
  11. <el-input v-model="queryParams.phone" placeholder="请输入手机号" clearable style="width: 180px" />
  12. </el-form-item>
  13. <el-form-item label="姓名:" prop="name">
  14. <el-input v-model="queryParams.name" placeholder="请输入姓名" clearable style="width: 180px" />
  15. </el-form-item>
  16. <el-form-item>
  17. <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
  18. <el-button icon="Refresh" @click="resetQuery" class="mr-10">重置</el-button>
  19. <el-upload class="upload-demo" :action="uploadFileUrl" multiple :limit="1" :on-success="handleSuccess" :headers="headers" :show-file-list="false" accept=".xls,.xlsx">
  20. <el-button class="pl-10 mr-10">导入特殊清单</el-button>
  21. </el-upload>
  22. <el-button @click="dialogVisible = true">清空特殊清单</el-button>
  23. </el-form-item>
  24. </el-form>
  25. </div>
  26. <vxe-table v-if="form" :loading="loading" border :data="list" min-height="0">
  27. <!-- 序号 -->
  28. <vxe-column type="seq" width="60" title="序号" align="center" />
  29. <vxe-column title="姓名" field="name" min-width="100" :formatter="colNoData" />
  30. <!-- <vxe-column title="职务" field="position" min-width="100" :formatter="colNoData" /> -->
  31. <vxe-column title="手机号" field="contact" min-width="100" :formatter="colNoData" />
  32. <vxe-column title="参会费用" field="joinFee" min-width="100" :formatter="colNoData" v-if="form?.meetingCharge?.hasFee =='1'">
  33. <template #default="{ row }">
  34. <div class="f-w-5">{{ row?.joinFee }}</div>
  35. </template>
  36. </vxe-column>
  37. </vxe-table>
  38. <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
  39. <el-dialog v-model="dialogVisible" title="清空所有数据" width="500">
  40. <span>确定清空所有数据吗?</span>
  41. <template #footer>
  42. <div class="dialog-footer">
  43. <el-button @click="dialogVisible = false">取消</el-button>
  44. <el-button type="primary" @click="clearData()">确认</el-button>
  45. </div>
  46. </template>
  47. </el-dialog>
  48. </div>
  49. </template>
  50. <script setup name="MeetingDetailInfo" lang="ts">
  51. import {trainingfee,importFeeList,clearFeeList} from '@/api/training';
  52. import { colNoData } from '@/utils/noData';
  53. import { searchTabs } from '@/views/models';
  54. import { debounce } from 'lodash';
  55. import { onMounted, reactive, ref ,ComponentPublicInstance} from 'vue';
  56. import registrationInfo from './registration-info.vue';
  57. import { AreaCascader } from '@/views/components';
  58. import { globalHeaders } from '@/utils/request';
  59. import { isWindow } from 'element-plus/es/utils';
  60. const { proxy } = getCurrentInstance() as ComponentInternalInstance;
  61. const { cpy_res_status, lm_signup_status_app_show, dm_check_join_type,temp_join_type,dm_pay_status,lm_signup_status_app_query} = toRefs<any>(proxy?.useDict('cpy_res_status', 'lm_signup_status_app_show', 'dm_check_join_type','temp_join_type','dm_pay_status',"lm_signup_status_app_query"));
  62. // 获取详情
  63. const props = defineProps({
  64. form: {
  65. type: Object,
  66. default: () => ({})
  67. }
  68. });
  69. const baseUrl = import.meta.env.VITE_APP_BASE_API;
  70. const uploadFileUrl = ref(baseUrl + '/resource/oss/upload'); // 上传文件服务器地址
  71. const rules = reactive({
  72. res: [
  73. { required: true, message: '请选择审核结果', trigger: 'blur' }
  74. ],
  75. msgRequired: [ // For "不通过" (value="2")
  76. { required: true, message: '请填写不通过的理由', trigger: 'blur' }
  77. ],
  78. msgOptional: [ // For "通过" (value="1")
  79. { required: false, trigger: 'blur' }
  80. ]
  81. })
  82. const headers = ref(globalHeaders());
  83. const fromvalue = ref<any>({
  84. targetId: '',
  85. msg: ''
  86. })
  87. const query = useRoute().query;
  88. const queryParams = ref<any>({
  89. pageNum: 1,
  90. pageSize: 10,
  91. trainId: query?.id || '',
  92. phone:'',
  93. });
  94. const loading = ref(false);
  95. const total = ref(0);
  96. const list = ref<any>([]);
  97. const tabs = ref([]);
  98. const formRef = ref()
  99. const dialogVisible = ref(false)
  100. const getList = async () => {
  101. loading.value = true;
  102. const res = await trainingfee(queryParams.value);
  103. if (!res || res.code !== 200) return;
  104. list.value = res.rows;
  105. total.value = res.total;
  106. loading.value = false;
  107. };
  108. const clearData = async()=>{
  109. await clearFeeList(props.form.id)
  110. dialogVisible.value = false
  111. getList();
  112. }
  113. const handleQuery = () => {
  114. queryParams.value.pageNum = 1;
  115. getList();
  116. };
  117. const queryFormRef = ref<ElFormInstance>();
  118. const resetQuery = () => {
  119. queryFormRef.value?.resetFields();
  120. handleQuery();
  121. };
  122. const handleSuccess = async(res,uploadFile)=>{
  123. await importFeeList({
  124. trainingId:props.form.id,
  125. xlsUrl:res.data.url
  126. })
  127. getList();
  128. }
  129. onMounted(() => {
  130. getList();
  131. });
  132. </script>
  133. <style scoped lang="scss">
  134. .tabs-item {
  135. margin-right: 20px;
  136. padding: 8px 20px;
  137. font-size: 14px;
  138. border-color: #d7d7d7;
  139. border-style: solid;
  140. border-width: 1px 1px 0 1px;
  141. cursor: pointer;
  142. user-select: none;
  143. &.checked {
  144. color: #fff;
  145. border-color: var(--el-color-primary);
  146. background-color: var(--el-color-primary);
  147. }
  148. }
  149. .border-botttom {
  150. border-bottom: 1px solid #d7d7d7;
  151. }
  152. .reject-radio :deep(.el-radio__label) {
  153. color: #F56C6C;
  154. }
  155. .orange-radio :deep(.el-radio__label) {
  156. color: orange;
  157. }
  158. .reject-radio :deep(.el-radio__inner) {
  159. border-color: #F56C6C;
  160. background: #F56C6C;
  161. }
  162. .reject-radio :deep(.el-radio__border) {
  163. border-color: #F56C6C;
  164. }
  165. :deep(.reject-radio.el-radio.is-bordered.is-checked) {
  166. border-color: #F56C6C !important;
  167. }
  168. .single{
  169. position: absolute;
  170. top: -20px;
  171. right: 30px;
  172. width: 200px;
  173. left: 70px;
  174. }
  175. .orange-button{
  176. border:1px solid #d7d7d7;
  177. height: 100px;
  178. width: 300px;
  179. display: flex;
  180. align-items: center;
  181. justify-content: center;
  182. cursor: pointer;
  183. font-size: 36px;
  184. margin-right: 40px;
  185. margin-bottom: 40px;
  186. font-weight: 600;
  187. }
  188. .orange-button:hover{
  189. color: white;
  190. background-color: orange;
  191. border: 1px solid orange;
  192. opacity: 0.5;
  193. }
  194. .green-button:hover{
  195. color: white;
  196. background-color: green;
  197. border: 1px solid green;
  198. opacity: 0.5;
  199. }
  200. .green-button{
  201. border:1px solid #d7d7d7;
  202. height: 100px;
  203. width: 300px;
  204. display: flex;
  205. align-items: center;
  206. justify-content: center;
  207. cursor: pointer;
  208. font-size: 36px;
  209. margin-right: 40px;
  210. margin-bottom: 40px;
  211. font-weight: 600;
  212. }
  213. .orange-active{
  214. color: white;
  215. background-color: orange;
  216. border: 1px solid orange;
  217. }
  218. .green-active{
  219. color: white;
  220. background-color: green;
  221. border: 1px solid green;
  222. }
  223. .titleClass{
  224. font-size: 30px !important;
  225. }
  226. </style>