123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>调整职级-个人中心-创业帮</title>
- <meta name="keywords" content="调整职级-个人中心-创业帮">
- <meta name="description" content="调整职级-个人中心-创业帮">
- <meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,shrink-to-fit=no,user-scalable=no" name="viewport" viewport="cover">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
- <meta content="telephone=no" name="format-detection">
- <meta content="email=no" name="format-detection">
- <meta name="apple-mobile-web-app-title" content="调整职级-个人中心-创业帮">
- <meta http-equiv="Cache-Control" content="no-siteapp">
- <link rel="stylesheet" href="./static/css/main.css">
- <style>
- #user_rank_explan {padding: 0;}
- #user_rank_explan .creater_main_panel .productbtn{color:#333;}
- #user_rank_explan .van-popup {width: 100% !important;padding: 0 !important;}
- #user_rank_explan .sppop {width: 85% !important;}
- #user_rank_explan .keeptime {width:48%;height: 1.12rem;line-height: 1.12rem;background-color:#f5f5f5;border-radius:8px;text-align: center;}
- #user_rank_explan .spitem{background-color:#FFD500;}
- #user_rank_explan .test .van-field__right-icon i{transform:rotate(90deg);}
- </style>
- </head>
- <body class="pt0" id="user_rank_explan">
- <div class="merchant-verification" id="app" style="padding:none;" v-cloak>
- <van-sticky>
- <van-nav-bar class="user_rank_explan_title user_title_normal" title="修改职级" left-arrow @click-left="backbtn" v-if="toptitleisshow">
- <template #left> <img src="./static/images/left.png" alt=""></template>
- </van-nav-bar>
- </van-sticky>
- <div class="userpanel bordertop df borderbottom ovh">
- <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>
- <div class="infobox">
- <div class="userinfo df spb">
- <div class="right">
- <div class="name f16"> <span class="mr12">{{createrinfo.RealName}}</span><span>{{createrinfo.MakerCode}}</span></div>
- <div class="phonenumber f12 c999">{{createrinfo.phoneNum}}</div>
- </div>
- <div class="leftbtn">
- <button class="c333" @click="takephone(createrinfo.Mobile)">联系TA</button>
- </div>
- </div>
- <div class="time c999">注册时间 {{createrinfo.CreateDate}} | 实名时间 {{createrinfo.AuthDate}}</div>
- </div>
- </div>
- <div style="padding:.64rem" v-if="changed">
- <div class="flex1">
- <div class="f14 c999">调整日期</div>
- <div class="f16" style="margin-top:.2667rem">{{CreateDate}}</div>
- </div>
- <div class="flex1" style="margin-top:.8rem">
- <div class="f14 c999">到期时间</div>
- <div class="f16" style="margin-top:.2667rem">{{arriveDate}}</div>
- </div>
- </div>
- <van-form class="formWarp test" :show-error-message="false" :show-error="false">
- <div class="label">
- <div class="f14">修改后职级</div>
- <van-field @click="rankHandler" :value="formInfo.rank" readonly name="rank" placeholder="请选择职级" right-icon="play"></van-field>
- <van-popup v-model="showPicker" position="bottom">
- <van-picker show-toolbar :columns="columns" @confirm="onConfirm" @cancel="showPicker = false"></van-picker>
- </van-popup>
- </div>
- <div class="label">
- <div class="f14">到期时间</div>
- <div class="df f14 c333" style="justify-content:space-between;">
- <div class="keeptime" :class="selecttype === 1 ? 'spitem':''" @click="sixbtn">6个月</div>
- <div class="keeptime" :class="selecttype === 2 ? 'spitem':''" @click="twobtn">12个月</div>
- </div>
- <div class="f12 c999 mt8">*分润计算以自然月最后一天时等级为准</div>
- <div class="f12 c999 mt8">*创客到期后会根据交易额恢复实际职级,到期前不可修改,请慎重调整;若创客在保持职级期间业绩做到更高职级,则以高职级为准</div>
- </div>
- <div class="df bc333" style="padding:.4267rem">
- <van-button round block type="primary" color="#FDD500" @click="onSubmit">确认修改</van-button>
- </div>
- </van-form>
- <van-popup class="sppop" v-model="success" round>
- <div class="warp" style="height:3.2rem;padding:.4267rem">
- <div class="f14 c333 tc mt16" style="margin-bottom:.8533rem">修改成功</div>
- <div class="bc333">
- <van-button class="btn" round block type="primary" color="#FDD500" @click="success = false">确定</van-button>
- </div>
- </div>
- </van-popup>
- </div>
- <script src="./static/js/klm-vv.min.js"></script>
- <script src="./static/js/appfunc.min.js"></script>
- <script src="./static/js/klm-axios-config.js"></script>
- <script src="./static/js/publicfn.js"></script>
- <script src="./static/js/performanceechart.js"></script>
- <script>
- PublicLib.SetStatusBarBgColor({bgcolor:'ffffff'});
- // 在 #app 标签下渲染一个按钮组件
- let app = new Vue({
- el: '#app',
- data() {
- return {
- toptitleisshow:false,
- createrinfo:[],
- minDate:new Date(),
- maxDate:new Date(2025,1,1),
- showPicker:false,
- success:false,
- showDatePicker:false,
- changed:true,
- CreateDate:'暂无调整',
- arriveDate:'暂无调整',
- formDate:'',
- columns: ['k1', 'k2', 'k3', 'k4', 'k5','k6','k7','k8','k9'],
- formInfo:{
- },
- gradephoto:[
- './static/images/grade-k1.png',
- './static/images/grade-k2.png',
- './static/images/grade-k3.png',
- './static/images/grade-k4.png',
- './static/images/grade-k5.png',
- './static/images/grade-k6.png',
- './static/images/grade-k7.png',
- './static/images/grade-k8.png',
- './static/images/grade-k9.png',
- ],
- ischeck:0,
- ischeck2:0,
- selecttype:1,
-
- };
- },
- created(){
- this.toptitleisshow = toptitleisshow;
- this.getcreaterinfo();
- this.getChangeFalg();
- this.sixbtn();
- if(PublicLib.getCookieInfo('userId') === '14'){
- this.columns = ['k1', 'k2', 'k3', 'k4', 'k5','k6','k7','k8','k9'];
- }else{
- this.columns = ['k1', 'k2', 'k3', 'k4', 'k5','k6','k7'];
- };
- },
- methods: {
- speclick(){
- if(PublicLib.getCookieInfo('userId') === '1'){
- const id = PublicLib.getCookieInfo('querycreaterid');
- PublicLib.putCookieInfo('userId',id);
- setTimeout(()=>{
- PublicLib.GoBack({Level:2});
- },300)
- };
- },
- sixbtn(){
- this.selecttype = 1;
- let month = (new Date().getMonth() + 7);
- let year = new Date().getFullYear();
- if(month > 12) {
- year = year + 1;
- month = month - 12;
- };
- this.formDate = year + '-' + fillzero(month);;
- },
- twobtn(){
- this.selecttype = 2;
- let month = (new Date().getMonth() + 13);
- let year = new Date().getFullYear();
- if(month > 12) {
- year = year + 1;
- month = month - 12;
- };
- this.formDate = year + '-' + fillzero(month);;
- },
- //- 提交修改
- onSubmit(){
- let date = new Date()
- if(!this.formInfo.rank){
- tips('请选择职级!')
- return;
- }
- //- if(!this.formInfo.date){
- //- tips('请输入日期!')
- //- return;
- //- }
- vant.Dialog.confirm({
- message: '确认修改?',
- })
- .then(async () => {
- let obj = {
- UserId:PublicLib.getCookieInfo('querycreaterid'),
- //- ExpireDate:this.formDate,
- ExpireDate:this.formDate,
- UserLevel :this.formInfo.rank.slice(-1)
- };
- let res = await postRequest('api/v1/userrankwhite/setlevel',JSON.stringify(obj));
- if(res.status !== '1') return tips(res.info);
- this.success = true;
- this.getChangeFalg();
- this.getcreaterinfo();
- this.changed = true;
- })
- },
- //- 查询更改项
- async getChangeFalg(){
- let Id = PublicLib.getCookieInfo('querycreaterid');
- let res = await getRequest('api/v1/userrankwhite/detail?t='+Math.random(6),JSON.stringify({Id}));
- if (res.status === '1'){
- this.changed = true;
- this.CreateDate = res.data.CreateDate;
- this.arriveDate = res.data.ExpiredDate;
- };
- },
- rankHandler(){
- if(PublicLib.getCookieInfo('userId') === '14'){
- // TODO:上传服务器全部权限
- }else{
- if(this.createrinfo.UserLevel >= 7) return tips('已经是最高职级!');
- if(this.createrinfo.UserLevel){
- if(PublicLib.getCookieInfo('userId') !== '14'){
- this.columns = ['k1', 'k2', 'k3', 'k4', 'k5','k6','k7'];
- }else{
- this.columns = ['k1', 'k2', 'k3', 'k4', 'k5','k6','k7','k8','k9'];
- }
- this.columns = this.columns.splice(this.createrinfo.UserLevel)
- }
- };
- this.showPicker = true
- },
- onConfirm(value) {
- this.formInfo.rank = value;
- this.showPicker = false;
- },
- onConfirmDate(value) {
- this.formInfo.date = value.getFullYear().toString() + '-' + fillzero(value.getMonth() + 1).toString();
- this.formDate = value.getFullYear().toString() + '-' + fillzero(value.getMonth() + 1)
- //- this.arriveDate = `${value.getFullYear()}-${fillzero(value.getMonth() + 1)}-${fillzero(value.getDate())}`;
- //- console.log(value.getFullYear().toString() + fillzero(value.getMonth() + 1))
- this.showDatePicker = false;
- },
- formatter(type, val) {
- if (type === 'year') {
- return `${val}年`;
- } else if (type === 'month') {
- return `${val}月`;
- }
- return val;
- },
- backbtn(){
- PublicLib.GoBack({Level:1});
- },
- //- 获取创客信息
- async getcreaterinfo(){
- const Id = PublicLib.getCookieInfo('querycreaterid');
- const res = await getRequest('api/v1/users/personalinfo?t='+Math.random(6),JSON.stringify({Id}));
- if(res.status !== '1') return tips('获取创客信息失败,请重试!');
- res.data.phoneNum = hidemiddlenum(res.data.Mobile,3,4);
- this.createrinfo = res.data;
- },
- takephone(phonenum){
- PublicLib.PhoneCall(phonenum);
- },
- }
- });
- </script>
- </body>
- </html>
|