trainingCamp-establishteam.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>首页-特训营-爽客邦</title>
  6. <meta name="keywords" content="首页-特训营-爽客邦">
  7. <meta name="description" content="首页-特训营-爽客邦">
  8. <meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,shrink-to-fit=no,user-scalable=no" name="viewport" viewport="cover">
  9. <meta name="apple-mobile-web-app-capable" content="yes">
  10. <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
  11. <meta content="telephone=no" name="format-detection">
  12. <meta content="email=no" name="format-detection">
  13. <meta name="apple-mobile-web-app-title" content="首页-特训营-爽客邦">
  14. <meta http-equiv="Cache-Control" content="no-siteapp">
  15. <link rel="stylesheet" href="./static/css/main.css">
  16. </head>
  17. <body class="bgcf7">
  18. <div id="app" v-cloak>
  19. <van-sticky>
  20. <van-nav-bar class="camp_unactive_title f16" title="组建团队" @click-left="successbtn" v-if="toptitleisshow" left-arrow>
  21. <template #left>
  22. <van-icon name="arrow-left" color="#fff" size="20"></van-icon>
  23. </template>
  24. </van-nav-bar>
  25. </van-sticky>
  26. <div class="camp_unactive_titlebox rel activetitle">
  27. <div class="abs establishpanel bgcfff">
  28. <div class="step rel">
  29. <van-steps :active="active" active-color="#333">
  30. <van-step>
  31. <template #active-icon>
  32. <div class="activeicon"></div>
  33. </template>
  34. <template #finish-icon>
  35. <div class="activeicon"></div>
  36. </template>
  37. <template #inactive-icon>
  38. <div class="unactiveicon"></div>
  39. </template><span class="steptext l f12">组队须知</span>
  40. </van-step>
  41. <van-step>
  42. <template #active-icon>
  43. <div class="activeicon"></div>
  44. </template>
  45. <template #inactive-icon>
  46. <div class="unactiveicon"></div>
  47. </template>
  48. <template #finish-icon>
  49. <div class="activeicon"></div>
  50. </template><span class="steptext f12">填写资料 </span>
  51. </van-step>
  52. <van-step>
  53. <template #active-icon>
  54. <div class="activeicon"></div>
  55. </template>
  56. <template #inactive-icon>
  57. <div class="unactiveicon"></div>
  58. </template>
  59. <template #finish-icon>
  60. <div class="activeicon"></div>
  61. </template><span class="steptext r f12">提交审核 </span>
  62. </van-step>
  63. </van-steps>
  64. </div>
  65. <div class="dottedcard df">
  66. <div class="leftroll bgcf7"></div>
  67. <div class="line flex1"></div>
  68. <div class="rightroll bgcf7"></div>
  69. </div>
  70. <div class="main" v-if="active === 0">
  71. <div class="title tc f14 c333">组队须知</div>
  72. <div class="content f12 c666 mt24">
  73. <p>(1)组队审核通过或组队成功后均不得因私人原因随意退出; </p>
  74. <p>(2)发布组队通知后可自己邀请好友参队也可由合创联盟用户自由加入;</p>
  75. <p>(3)队长需对全体成员负责,尊重团队成员的意见,保护团队成员的个人隐私和切身利益; </p>
  76. <p>(4)队长对已报名的队员有审核权限,最迟3个工作日给审核答复,对于未审核的队员,队员有取消报名资格; </p>
  77. <p>(5)对于审核通过的队员需及时联系,告知活动流程及详细地址; </p>
  78. <p>(6)所有发布的K战队活动,报名截止到活动前一天晚上20:00,请妥善进行组队; </p>
  79. <p>(7)同意并遵守特训营活动说明;</p>
  80. </div>
  81. <div class="df cm">
  82. <van-checkbox class="agreen mt52" v-model="ischecked">我已阅读并同意此活动条款</van-checkbox>
  83. </div>
  84. <div class="tc">
  85. <van-button class="w145 h40 mt40" type="primary" round color="#FF502A" :disabled="ischecked ? false : true" @click="next">下一步</van-button>
  86. </div>
  87. </div>
  88. <div class="main" v-if="active === 1">
  89. <van-field class="f14 c333 pb16 pt16" readonly clickable :value="area" name="area" label="活动地点" placeholder="请选择举办活动的城市" @click="showArea = true">
  90. <template #right-icon>
  91. <van-icon name="arrow" size=".32rem" color="#ccc"></van-icon>
  92. </template>
  93. </van-field>
  94. <van-field class="f14 c333 pb16 pt16" readonly name="date" label="活动时间">
  95. <template #input><span class="f14 cccc" @click="onShowDate(true)" :class="startDate !== ''? 'spcolor' : ''">{{startDate !== '' ? startDate : '开始时间'}}</span><span class="f14 c999 pl16 pr16">至</span><span class="f14 cccc" @click="onShowDate(false)" :class="endDate !== ''? 'spcolor' : ''">{{endDate !== '' ? endDate : '结束时间'}}</span></template>
  96. </van-field>
  97. <div class="pl16 c999 f10 pt4">活动时间需在7~10日内</div>
  98. <van-field class="f14 c333 pb16 pt16" readonly clickable :value="pnum" name="teamnum" label="团队人数" placeholder="请选择团队人数" @click="showNum = true">
  99. <template #right-icon>
  100. <van-icon name="arrow" size=".32rem" color="#ccc"></van-icon>
  101. </template>
  102. </van-field>
  103. <div class="pl16 c999 f10 pt4">团队人数需在10~100人</div>
  104. <van-field class="f14 c333 pb16 pt16" v-model="establishteaminfo.TeamName" label="团队名称" placeholder="请输入团队名称"></van-field>
  105. <van-field class="f14 c333 pb16 pt16" v-model="establishteaminfo.WatchWord" label="团队口号" placeholder="请输入口号"></van-field>
  106. <van-field class="f14 c333 pb16 pt16" v-model="establishteaminfo.Remark" label="备注说明" placeholder="请输入备注或说明"></van-field>
  107. <div class="tc rel mt47"><span class="previousstep c666 f14 abs" @click="previousstep">上一步</span>
  108. <van-button class="w145 h40 mt40" type="primary" round color="#FF502A" :disabled="formrules ? false : true" @click="next">提交审核</van-button>
  109. </div>
  110. </div>
  111. <div class="main rel cm" v-if="active === 2">
  112. <div class="successinfo tc"><img src="./static/images/success@3x.png" alt="">
  113. <div class="successtitle f16">申请提交成功</div>
  114. <div class="successtext f12 c999">将在3个工作日内给您审核,通过后不能撤回,请注意APP消息通知</div>
  115. </div>
  116. <div class="tc abs mt47 successbtn">
  117. <van-button class="w145 h40 mt40" type="primary" round color="#FF502A" :disabled="formrules ? false : true" @click="successbtn">知道了</van-button>
  118. </div>
  119. </div>
  120. </div>
  121. </div>
  122. <van-popup v-model="showArea" position="bottom" round style="padding-top:0;">
  123. <van-area :area-list="areaList" @confirm="onareaConfirm" @cancel="showArea = false" :columns-num="2"> </van-area>
  124. </van-popup>
  125. <van-popup v-model="showNum" position="bottom" round style="padding-top:0;">
  126. <van-picker show-toolbar :columns="columns" @confirm="onnumConfirm" @cancel="showNum = false" @change="peoplenumchange"></van-picker>
  127. </van-popup>
  128. <van-popup class="product_mymerchant_transaction" v-model="showDate" position="bottom" :style="{ height: '50%' }" v-cloak>
  129. <van-datetime-picker v-model="currentDate" type="date" title="选择年月日" :min-date="minDate" :max-date="maxDate" :formatter="formatter" @cancel="showDate = false" @confirm="onConfirmDate(isStartDate)"></van-datetime-picker>
  130. </van-popup>
  131. </div>
  132. <script src="./static/js/arealist.js"></script>
  133. <script src="./static/js/klm-vv.min.js"></script>
  134. <script src="./static/js/klm-axios-config.js"></script>
  135. <script>
  136. // 在 #app 标签下渲染一个按钮组件
  137. let app = new Vue({
  138. el: '#app',
  139. data() {
  140. return {
  141. toptitleisshow:true,
  142. active:0,
  143. ischecked:false,
  144. establishteaminfo:{
  145. TeamName:'',
  146. Areas:'',
  147. EffectStartDate:'',
  148. EffectEndDate:'',
  149. MinUserNum:'',
  150. MaxUserNum:'',
  151. WatchWord:'',
  152. Remark:'',
  153. },
  154. //- 地区
  155. area:'',
  156. //- 人数
  157. pnum:'',
  158. showArea:false,
  159. showNum:false,
  160. areaList,
  161. //- 人数
  162. columns: [
  163. {values:[]},
  164. {values:[]},
  165. ],
  166. showDate: false,
  167. minDate: new Date(),
  168. maxDate: new Date(2025, 10, 1),
  169. currentDate: new Date(),
  170. //- 时间
  171. startDate: '',
  172. endDate: '',
  173. }
  174. },
  175. created() {
  176. this.setpeopelnum();
  177. },
  178. computed:{
  179. // 模仿表单验证
  180. formrules(){
  181. if(this.area !== '' && this.pnum !== '' && this.startDate !== ''&& this.endDate !== '' && this.slogan !== '' && this.remarks !== '' && this.teamname !== ''){
  182. return true;
  183. } else {
  184. return false;
  185. };
  186. }
  187. },
  188. methods: {
  189. peoplenumchange(picker,num){
  190. const firstnum = Number(num[0].substr(0,num[0].length - 1));
  191. if(firstnum !== 10){
  192. this.columns[1].values = [];
  193. for(let peopelnum = firstnum+1;peopelnum <= 100;peopelnum++){
  194. this.columns[1].values.push(`${peopelnum}人`);
  195. }
  196. }
  197. },
  198. setpeopelnum(){
  199. for(let peopelnum = 10;peopelnum <= 100;peopelnum++){
  200. this.columns[0].values.push(`${peopelnum}人`);
  201. this.columns[1].values.push(`${peopelnum}人`);
  202. }
  203. },
  204. onShowDate(isStartDate){
  205. if(isStartDate){
  206. this.minDate = new Date();
  207. this.maxDate = new Date(2025, 10, 1)
  208. }else if(!isStartDate && this.startDate === ''){
  209. this.maxDate = new Date(2025, 10, 1);
  210. }
  211. this.isStartDate = isStartDate ? true : false;
  212. this.showDate = !this.showDate;
  213. },
  214. formatter(type, val) {
  215. if (type === 'year') {
  216. return `${val}年`;
  217. } else if (type === 'month') {
  218. return `${val}月`;
  219. } else if (type === 'day') {
  220. return `${val}日`;
  221. }
  222. return val;
  223. },
  224. onConfirmDate(isStartDate) {
  225. this.showDate = false;
  226. if(isStartDate){
  227. this.startDate = this.currentDate.getFullYear() + '-' + (this.currentDate.getMonth() + 1) + '-' + this.currentDate.getDate();
  228. this.establishteaminfo.EffectStartDate = formatDate(this.currentDate.getFullYear(),(this.currentDate.getMonth() + 1), this.currentDate.getDate());
  229. this.minDate = new Date(this.startDate);
  230. this.maxDate = new Date(this.minDate.getFullYear(), this.minDate.getMonth(), this.minDate.getDate()+10);
  231. this.endDate = '';
  232. //- this.establishteaminfo.MaxUserNum = '';
  233. }else{
  234. this.endDate = this.currentDate.getFullYear() + '-' + (this.currentDate.getMonth() + 1) + '-' + this.currentDate.getDate();
  235. this.establishteaminfo.EffectEndDate = formatDate(this.currentDate.getFullYear(),(this.currentDate.getMonth() + 1), this.currentDate.getDate());
  236. this.maxDate = new Date(this.endDate);
  237. this.minDate = new Date(this.maxDate.getFullYear(), this.maxDate.getMonth(), this.maxDate.getDate()-10).getTime() > new Date().getTime() ? new Date(new Date(this.maxDate.getFullYear(), this.maxDate.getMonth(), this.maxDate.getDate()-10).getTime()) : new Date(new Date().getTime());
  238. }
  239. },
  240. async next(){
  241. if(this.active === 1){
  242. PublicLib.ShowLoading({Message:''});
  243. const UserId = PublicLib.getCookieInfo('userId');
  244. const res = await postRequest('/api/v1/teamapply/confirmapply',JSON.stringify({UserId,...this.establishteaminfo}));
  245. console.log(res);
  246. if(res.status !== '1') return tips(res.info);
  247. PublicLib.HideLoading();
  248. }
  249. this.active++;
  250. },
  251. onareaConfirm(value){
  252. let str = '';
  253. let area = '';
  254. value.forEach(item=>{
  255. str += item.name
  256. area += `${item.name},`
  257. });
  258. area = area.substr(0,area.length - 1);
  259. this.establishteaminfo.Areas = area;
  260. this.area = str;
  261. this.showArea = false;
  262. },
  263. onnumConfirm(value){
  264. this.pnum = value[0] +'~'+value[1];
  265. this.establishteaminfo.MinUserNum = value[0].substr(0,value[0].length - 1);
  266. this.establishteaminfo.MaxUserNum = value[1].substr(0,value[1].length - 1);
  267. this.showNum = false;
  268. },
  269. previousstep(){
  270. this.active--;
  271. },
  272. successbtn(){
  273. PublicLib.GoBack({Level:1});
  274. }
  275. }
  276. });
  277. </script>
  278. </body>
  279. </html>