maker-details-change.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  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. <style>
  17. #user_rank_explan {padding: 0;}
  18. #user_rank_explan .creater_main_panel .productbtn{color:#333;}
  19. #user_rank_explan .van-popup {width: 100% !important;padding: 0 !important;}
  20. #user_rank_explan .sppop {width: 85% !important;}
  21. #user_rank_explan .keeptime {width:48%;height: 1.12rem;line-height: 1.12rem;background-color:#f5f5f5;border-radius:8px;text-align: center;}
  22. #user_rank_explan .spitem{background-color:#FFD500;}
  23. #user_rank_explan .test .van-field__right-icon i{transform:rotate(90deg);}
  24. </style>
  25. </head>
  26. <body class="pt0" id="user_rank_explan">
  27. <div class="merchant-verification" id="app" style="padding:none;" v-cloak>
  28. <van-sticky>
  29. <van-nav-bar class="user_rank_explan_title user_title_normal" title="修改职级" left-arrow @click-left="backbtn" v-if="toptitleisshow">
  30. <template #left> <img src="./static/images/left.png" alt=""></template>
  31. </van-nav-bar>
  32. </van-sticky>
  33. <div class="userpanel bordertop df borderbottom ovh">
  34. <div class="imgbox tc mr12" @click="speclick"><img class="headportrait" :src="createrinfo.HeadPhoto" alt=""><img class="grade_rank" :src="gradephoto[createrinfo.UserLevel-1]" alt=""></div>
  35. <div class="infobox">
  36. <div class="userinfo df spb">
  37. <div class="right">
  38. <div class="name f16"> <span class="mr12">{{createrinfo.RealName}}</span><span>{{createrinfo.MakerCode}}</span></div>
  39. <div class="phonenumber f12 c999">{{createrinfo.phoneNum}}</div>
  40. </div>
  41. <div class="leftbtn">
  42. <button class="c333" @click="takephone(createrinfo.Mobile)">联系TA</button>
  43. </div>
  44. </div>
  45. <div class="time c999">注册时间 {{createrinfo.CreateDate}} | 实名时间 {{createrinfo.AuthDate}}</div>
  46. </div>
  47. </div>
  48. <div style="padding:.64rem" v-if="changed">
  49. <div class="flex1">
  50. <div class="f14 c999">调整日期</div>
  51. <div class="f16" style="margin-top:.2667rem">{{CreateDate}}</div>
  52. </div>
  53. <div class="flex1" style="margin-top:.8rem">
  54. <div class="f14 c999">到期时间</div>
  55. <div class="f16" style="margin-top:.2667rem">{{arriveDate}}</div>
  56. </div>
  57. </div>
  58. <van-form class="formWarp test" :show-error-message="false" :show-error="false">
  59. <div class="label">
  60. <div class="f14">修改后职级</div>
  61. <van-field @click="rankHandler" :value="formInfo.rank" readonly name="rank" placeholder="请选择职级" right-icon="play"></van-field>
  62. <van-popup v-model="showPicker" position="bottom">
  63. <van-picker show-toolbar :columns="columns" @confirm="onConfirm" @cancel="showPicker = false"></van-picker>
  64. </van-popup>
  65. </div>
  66. <div class="label">
  67. <div class="f14">到期时间</div>
  68. <div class="df f14 c333" style="justify-content:space-between;">
  69. <div class="keeptime" :class="selecttype === 1 ? 'spitem':''" @click="sixbtn">6个月</div>
  70. <div class="keeptime" :class="selecttype === 2 ? 'spitem':''" @click="twobtn">12个月</div>
  71. </div>
  72. <div class="f12 c999 mt8">*分润计算以自然月最后一天时等级为准</div>
  73. <div class="f12 c999 mt8">*创客到期后会根据交易额恢复实际职级,到期前不可修改,请慎重调整;若创客在保持职级期间业绩做到更高职级,则以高职级为准</div>
  74. </div>
  75. <div class="df bc333" style="padding:.4267rem">
  76. <van-button round block type="primary" color="#FDD500" @click="onSubmit">确认修改</van-button>
  77. </div>
  78. </van-form>
  79. <van-popup class="sppop" v-model="success" round>
  80. <div class="warp" style="height:3.2rem;padding:.4267rem">
  81. <div class="f14 c333 tc mt16" style="margin-bottom:.8533rem">修改成功</div>
  82. <div class="bc333">
  83. <van-button class="btn" round block type="primary" color="#FDD500" @click="success = false">确定</van-button>
  84. </div>
  85. </div>
  86. </van-popup>
  87. </div>
  88. <script src="./static/js/klm-vv.min.js"></script>
  89. <script src="./static/js/appfunc.min.js"></script>
  90. <script src="./static/js/klm-axios-config.js"></script>
  91. <script src="./static/js/publicfn.js"></script>
  92. <script src="./static/js/performanceechart.js"></script>
  93. <script>
  94. PublicLib.SetStatusBarBgColor({bgcolor:'ffffff'});
  95. // 在 #app 标签下渲染一个按钮组件
  96. let app = new Vue({
  97. el: '#app',
  98. data() {
  99. return {
  100. toptitleisshow:false,
  101. createrinfo:[],
  102. minDate:new Date(),
  103. maxDate:new Date(2025,1,1),
  104. showPicker:false,
  105. success:false,
  106. showDatePicker:false,
  107. changed:true,
  108. CreateDate:'暂无调整',
  109. arriveDate:'暂无调整',
  110. formDate:'',
  111. columns: ['k1', 'k2', 'k3', 'k4', 'k5','k6','k7','k8','k9'],
  112. formInfo:{
  113. },
  114. gradephoto:[
  115. './static/images/grade-k1.png',
  116. './static/images/grade-k2.png',
  117. './static/images/grade-k3.png',
  118. './static/images/grade-k4.png',
  119. './static/images/grade-k5.png',
  120. './static/images/grade-k6.png',
  121. './static/images/grade-k7.png',
  122. './static/images/grade-k8.png',
  123. './static/images/grade-k9.png',
  124. ],
  125. ischeck:0,
  126. ischeck2:0,
  127. selecttype:1,
  128. };
  129. },
  130. created(){
  131. this.toptitleisshow = toptitleisshow;
  132. this.getcreaterinfo();
  133. this.getChangeFalg();
  134. this.sixbtn();
  135. if(PublicLib.getCookieInfo('userId') === '14'){
  136. this.columns = ['k1', 'k2', 'k3', 'k4', 'k5','k6','k7','k8','k9'];
  137. }else{
  138. this.columns = ['k1', 'k2', 'k3', 'k4', 'k5','k6','k7'];
  139. };
  140. },
  141. methods: {
  142. speclick(){
  143. if(PublicLib.getCookieInfo('userId') === '1'){
  144. const id = PublicLib.getCookieInfo('querycreaterid');
  145. PublicLib.putCookieInfo('userId',id);
  146. setTimeout(()=>{
  147. PublicLib.GoBack({Level:2});
  148. },300)
  149. };
  150. },
  151. sixbtn(){
  152. this.selecttype = 1;
  153. let month = (new Date().getMonth() + 7);
  154. let year = new Date().getFullYear();
  155. if(month > 12) {
  156. year = year + 1;
  157. month = month - 12;
  158. };
  159. this.formDate = year + '-' + fillzero(month);;
  160. },
  161. twobtn(){
  162. this.selecttype = 2;
  163. let month = (new Date().getMonth() + 13);
  164. let year = new Date().getFullYear();
  165. if(month > 12) {
  166. year = year + 1;
  167. month = month - 12;
  168. };
  169. this.formDate = year + '-' + fillzero(month);;
  170. },
  171. //- 提交修改
  172. onSubmit(){
  173. let date = new Date()
  174. if(!this.formInfo.rank){
  175. tips('请选择职级!')
  176. return;
  177. }
  178. //- if(!this.formInfo.date){
  179. //- tips('请输入日期!')
  180. //- return;
  181. //- }
  182. vant.Dialog.confirm({
  183. message: '确认修改?',
  184. })
  185. .then(async () => {
  186. let obj = {
  187. UserId:PublicLib.getCookieInfo('querycreaterid'),
  188. //- ExpireDate:this.formDate,
  189. ExpireDate:this.formDate,
  190. UserLevel :this.formInfo.rank.slice(-1)
  191. };
  192. let res = await postRequest('api/v1/userrankwhite/setlevel',JSON.stringify(obj));
  193. if(res.status !== '1') return tips(res.info);
  194. this.success = true;
  195. this.getChangeFalg();
  196. this.getcreaterinfo();
  197. this.changed = true;
  198. })
  199. },
  200. //- 查询更改项
  201. async getChangeFalg(){
  202. let Id = PublicLib.getCookieInfo('querycreaterid');
  203. let res = await getRequest('api/v1/userrankwhite/detail?t='+Math.random(6),JSON.stringify({Id}));
  204. if (res.status === '1'){
  205. this.changed = true;
  206. this.CreateDate = res.data.CreateDate;
  207. this.arriveDate = res.data.ExpiredDate;
  208. };
  209. },
  210. rankHandler(){
  211. if(PublicLib.getCookieInfo('userId') === '14'){
  212. // TODO:上传服务器全部权限
  213. }else{
  214. if(this.createrinfo.UserLevel >= 7) return tips('已经是最高职级!');
  215. if(this.createrinfo.UserLevel){
  216. if(PublicLib.getCookieInfo('userId') !== '14'){
  217. this.columns = ['k1', 'k2', 'k3', 'k4', 'k5','k6','k7'];
  218. }else{
  219. this.columns = ['k1', 'k2', 'k3', 'k4', 'k5','k6','k7','k8','k9'];
  220. }
  221. this.columns = this.columns.splice(this.createrinfo.UserLevel)
  222. }
  223. };
  224. this.showPicker = true
  225. },
  226. onConfirm(value) {
  227. this.formInfo.rank = value;
  228. this.showPicker = false;
  229. },
  230. onConfirmDate(value) {
  231. this.formInfo.date = value.getFullYear().toString() + '-' + fillzero(value.getMonth() + 1).toString();
  232. this.formDate = value.getFullYear().toString() + '-' + fillzero(value.getMonth() + 1)
  233. //- this.arriveDate = `${value.getFullYear()}-${fillzero(value.getMonth() + 1)}-${fillzero(value.getDate())}`;
  234. //- console.log(value.getFullYear().toString() + fillzero(value.getMonth() + 1))
  235. this.showDatePicker = false;
  236. },
  237. formatter(type, val) {
  238. if (type === 'year') {
  239. return `${val}年`;
  240. } else if (type === 'month') {
  241. return `${val}月`;
  242. }
  243. return val;
  244. },
  245. backbtn(){
  246. PublicLib.GoBack({Level:1});
  247. },
  248. //- 获取创客信息
  249. async getcreaterinfo(){
  250. const Id = PublicLib.getCookieInfo('querycreaterid');
  251. const res = await getRequest('api/v1/users/personalinfo?t='+Math.random(6),JSON.stringify({Id}));
  252. if(res.status !== '1') return tips('获取创客信息失败,请重试!');
  253. res.data.phoneNum = hidemiddlenum(res.data.Mobile,3,4);
  254. this.createrinfo = res.data;
  255. },
  256. takephone(phonenum){
  257. PublicLib.PhoneCall(phonenum);
  258. },
  259. }
  260. });
  261. </script>
  262. </body>
  263. </html>