master
sunke 5 years ago
parent adb10b2959
commit 303a176f8b

@ -154,7 +154,11 @@ class SafeController extends BaseController{
//修改用户信息
public function modifyBaseInfo() {
if($_POST) {
$id = get_pid();
$ver_status = M('promote','tab_')->where(['id'=>$id])->getField('ver_status',true);
if($ver_status !== 0) {
return $this->success('认证',U('editModify'));
}
$username = $_REQUEST['username']; //真实姓名
$id_card = $_REQUEST["id_card"]; //身份证号码
$tel = $_REQUEST['tel'];
@ -242,7 +246,6 @@ class SafeController extends BaseController{
$this->error('卡号格式错误');
return false;
}
$id = get_pid();
$data["real_name"] = $username;
$data['mobile_phone'] = $tel;
$data['idcard'] = $id_card;
@ -317,7 +320,72 @@ class SafeController extends BaseController{
}
$this->display();
}
public function editModify() {
$id = get_pid();
$rs = M("promote","tab_")->field('anothpic,ver_status')->where(['id'=>$id])->find();
$anothpic = $rs['anothpic'];
if(!empty($anothpic)) {
$idcarpicArr = explode(',', $anothpic);
foreach ($idcarpicArr as $key => $value) {
$promoteInfo['valuedata'][$key] = $value;
}
}
$this->assign('ver_status',$rs['ver_status']);
$this->assign('promoteInfo',$promoteInfo);
$this->display();
}
public function edit() {
$tel = $_REQUEST["tel"];
$address = $_REQUEST["address"];
$email = $_REQUEST["email"];
$account_type = $_REQUEST["account_type"];
$bank = $_REQUEST["bank"];
$agreementpic = $_REQUEST["agreementpic"];
$data['mobile_phone'] = $tel;
$data['address'] = $address;
$data['email'] = $email;
$data['account_type'] = $account_type;
$data['bank_card'] = $bank;
// $data['agreementpic'] = $
$data['anothpic'] = $agreementpic;
$id = get_pid();
$updateRs = M("promote","tab_")->where(['id'=>$id])->save($data);
if($updateRs) {
$this->success("更新信息成功");
}else {
$this->error("更新信息失败");
}
}
public function ajaxEdit() {
$id = get_pid();
$rs = M("promote","tab_")->field('mobile_phone,address,email,account_type,bank_card')->where(['id'=>$id])->find();
$this->assign('tel',$rs['mobile_phone']);
$this->assign('address',$rs['address']);
$this->assign('email',$rs['email']);
$this->assign('account_type',$rs['account_type']);
$this->assign('bank_card',$rs['bank_card']);
$res = [
'tel'=> $rs['mobile_phone'],
'address'=> $rs['address'],
'email'=> $rs['email'],
'account_type'=> $rs['account_type'],
'bank_card'=> $rs['bank_card'],
'idcarpic' => $rs['idcarpic'],
];
if($rs['account_type'] == 1) {
$res['complanystatus'] = true;
$res['personalstatus'] = false;
}else {
$res['personalstatus'] = true;
$res['complanystatus'] = false;
}
$this->ajaxReturn($res);
}
public function safeDocument() {
$time = time();
$today = date('Y-m-d');

@ -0,0 +1,375 @@
<extend name="Public/promote_base"/>
<block name="css">
<link href="__CSS__/20180207/account.css" rel="stylesheet" >
<link rel="stylesheet" type="text/css" href="__CSS__/admin_table.css" media="all">
<link rel="stylesheet" type="text/css" href="__STATIC__/webuploader/webuploader.css" media="all">
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
<script type="text/javascript" src="__STATIC__/webuploader/webuploader.js"></script>
<script type="text/javascript" src="__JS__/jquery-1.11.1.min.js"></script>
<!-- <script type="text/javascript" src="__STATIC__/webuploader/webuploader.inc.js"></script> -->
<script type="text/javascript" src="__STATIC__/webuploader/webuploader.before.js"></script>
<style>.notice_tip {padding-left:20px;color:#999;font-size:12px;}
.formtxt{display:inline-block;width:232px;}
.trunk-list .table2 .r .qrcodeboxwrap {padding-left:0;padding-right:20px;padding-bottom:20px;}
.qrcodebox img {width:100px;height:100px;}
.qrcodebox p {font-size:12px;margin:0;color:#666;}
.qrcodebox p span{color:red;}
.qrcodeboxwrap~.notice_tip{vertical-align:top;display:inline-block;margin-top:20px;}
.mail_suffix {position: absolute;
top: 43px;
border: 1px solid rgb(229,229,229);
border-radius: 2px;
color: #666;
font-size: 11px;
width: 230px;
padding: 0 10px;
line-height: 1.4;
z-index: 1;
background: #FFF;
height: 200px;
overflow: hidden;
overflow-y: auto;}
.mail_suffix li {
padding: 2px 0;
cursor: pointer;
}
.mail_suffix li:first-child {padding-top:4px;}
.mail_suffix li:last-child{padding-bottom:4px;}
#tab{
margin-top:10px;
height:46px;display:flex;
justify-content: space-between;
align-items: center;
background: #ecf4f5;
width:100%;
}
.contain {
display: flex;
width:100%;
height:100%;
flex-direction: column;
}
.zizhi {
margin-top:30px;
margin-left:2%;
width:94%;
display: flex;
height:300px;
flex-direction: column;
}
.line_title {
width:100%;
display: flex;
height:50px;
font-size:18px;
font-weight: bold;
align-items: center;
justify-content: space-between;
}
.line_text {
display: flex;
margin-top:10px;
width:94%;
margin-left:3%;
height: 30px;
align-items: center;
font-size:14px;
}
.jiesuan {
margin-top:86px;
margin-left:2%;
width:94%;
display: flex;
height:300px;
flex-direction: column;
}
.editjiesuan {
margin-top:40px;
margin-left:5%;
width:90%;
display: flex;
height:300px;
flex-direction: column;
}
.line_jiesuan_text {
margin-top:20px;
margin-left:7%;
width:86%;
display: flex;
height:300px;
align-items: center;
align-content: center;
font-size:14px;
}
.inputcss {
margin-left:30px;
height:30px;
}
</style>
</block>
<block name="body" >
<div class="contain">
<div class="zizhi">
<div class="line_title">资质认证</div>
<div class="line_text">
真实姓名: 蔡俊威
</div>
<div class="line_text">
身份证号码: 12345664156465
</div>
<div class="line_text">
身份证扫描: <span style="color:#449acb">已认证<span>
</div>
<div class="line_text">
营业执照: <span style="color:#449acb">已认证<span>
</div>
<div class="line_text">
合作合同: <span style="color:#449acb">已认证{$promoteInfo['valuedata'][0]}<span>
</div>
</div>
<div class="jiesuan">
<div class="line_title">资质认证</div>
<div class="line_text">
电话: 185****5662
</div>
<div class="line_text">
联系地址: 福建省福州市仓山区万达广场
</div>
<div class="line_text">
邮箱: 641326314@qq.com
</div>
<div class="line_text">
账户类型: <span style="color:#449acb">已认证<span>
</div>
<div class="line_text">
开户银行: 621226**********088 &nbsp; &nbsp; &nbsp;
<span onclick="ed(1)" id="edit" style="color:#449acb">修改</span>
</div>
</div>
</div>
<script src="__LAY__/layui.js" type="text/javascript" ></script>
<link rel="stylesheet" href="__LAY__/css/layui.css" media="all">
<script>
</script>
<script>
function ed(id) {
$.ajax({
type:"POST",
url:"{:U('Safe/ajaxEdit')}",
data:{'id':id},
dataType:'json',
success:function(res) {
var tel = res.tel
var address = res.address
var email = res.email
var account_type = res.account_type
var bank_card = res.bank_card
var complanystatus = res.complanystatus
var personalstatus = res.personalstatus
console.log(res)
layer.open({
type: 1
,title: false //不显示标题栏
,closeBtn: true
,area: ["800px","700px"]
,shade: 0.8
,id: 'LAY_layuipro' //设定一个id防止重复弹出
,moveType: 1 //拖拽模式0或者1
,content: '<div class="trunk-title"> <span class="title_main">结算信息</span></div> <div class="trunk-content article"> <div class="trunk-list baseInfo">'
+'<form action="{:U("safe/edit")}" novalidate="novalidate" method="post" class="paw_info">'
+'<table class="table2" style="margin-top:20px;margin-left:30px;width:100%" >'
+'<tr><td class="l">电话:</td><td class="r"><input type="text" class="input txt" name="tel" id="password" style="width:430px" placeholder="" value="'+tel+'">'
+'<span id="password_tip"></span></td>'
+'</tr><tr><td class="l">联系地址:</td>'
+'<td class="r"><input type="text" class="input txt" name="address" id="confirm_password" style="width:430px" placeholder="" value="'+address+'">'
+'<span id="confirm_password_tip"></span></td></tr>'
+' <tr><td class="l">邮箱:</td><td class="r"><input type="text" class="input txt" name="email" id="confirm_password" style="width:430px" placeholder="" value="'+email+'">'
+'<span id="confirm_password_tip"></span></td></tr>'
+' <tr><td class="l">账户类型:</td><td class="r"><input type="radio" class="input txt" name="account_type" value="公司" checked="'+complanystatus+'">公司<input type="radio" class="input txt" style="margin-left:20px" name="account_type" value="个人" checked="'+personalstatus+'">个人'
+'<span id="confirm_password_tip"></span></td></tr>'
+' <tr><td class="l">开户银行:</td><td class="r"><input type="text" class="input txt" name="bank" id="confirm_password" style="width:430px" placeholder="" value="'+bank_card+'">'
+'<span id="confirm_password_tip"></span></td></tr>'
+' <tr> <td class="l" style="margin-top:20px">补充协议:</td><td class="r">'
+' <input type="hidden" name="agreementpic" id="" value=""/>'
+'<div id="uploader-demo" > <div id="agreementpic"><div class="webuploader-pick" style="line-height:30px" onclick="">点击上传</div></div>'
+'<div id="agreementpicList" class="uploader-list" style="display: flex;"></div></td></tr>'
+'<tr><td class="l" colspan="5"><div style="margin-top:40px;" id="tab"><span style="padding-left:20px;color:#26c7dbd4" >*须补充修改协议(联系平台签署)</span></div> </td></tr>'
+'<tr style=""><td class="l"></td><td style="margin-top:50px" class="r">'
+'<input type="submit" class="tj btn ajax-post" value="保存" style="margin-top:40px;width:200px" title="" target-form="paw_info">'
+'</td> </tr></table></form>'
+'</div></div></div>'
// ,content:content
})
var uploaderImgagreementpic = WebUploader.create({
// 选完文件后,是否自动上传。
auto: true,
// swf文件路径
swf: '__STATIC__/webuploader/Uploader.swf',
// 文件接收服务端。
server: "{:U('File/uploadPicture',array('session_id'=>session_id(),'flag'=>true))}",
// 选择文件的按钮。可选。
// 内部根据当前运行是创建可能是input元素也可能是flash.
pick: {
id:'#agreementpic',
multiple:true
},
// dnd: false,
paste: document.body,
accept: {
title: '图片',
extensions: 'png,gif,jpg,jpeg,bmp',
mimeTypes: '.png,.gif,.jpg,.jpeg,.bmp',
},
// 不压缩image, 默认如果是jpeg文件上传前会压缩一把再上传
resize: false,
disableGlobalDnd: true,
fileNumLimit:5,
threads:5,
thumb:true,
compress:false,
prepareNextFile: true,
formData: function(){return $.extend(true, {}, userInfo);},
chunked:false,
duplicate: true
});
var imgListagreementpicData = [];
<?php if (!empty($promoteInfo['valuedata'])) :?>
var html = '';
$('#agreementpicList').css('margin-top','10px');
<?php foreach ($promoteInfo['valuedata'] as $value1) { ?>
<?php $value1 = (int)$value1; ?>
imgListagreementpicData.push(<?=$value1?>);
html += '<div id="' + <?=$value1?> + '" class="item flooring_page_img_box" style="margin-right: 10px;">';
html += '<a href="javascript:;"><img src="<?=get_cover($value1,"path")?>" style="width: 100px;height: 100px;cursor: move;"></a>';
html += '<h4 class="info" style="text-align: center;">';
html += '<a href="javascript:;" class="jsdelzip table_click" style="float:none;display:inline-block;" img-id="' + <?=$value1?> + '">删除</a>';
html += '</h4>';
html += '<div class="progress progress-striped active" style="display: none;">';
html += '<div class="progress-bar" role="progressbar" style="width: 100%;">100%</div>';
html += '</div>';
html += '</div>';
<?php }?>
$('#agreementpicList').html(html);
$('#agreementpicList').children().children('h4').children('.jsdelzip').on('click', function() {
var thisId = $(this).attr('img-id');
$(this).parent().parent().remove();
$.each(imgListagreementpicData,function(index, item) {
if (thisId == item) {
imgListagreementpicData.splice(index,1);
return false;
}
});
setagreementpicVal();
});
<?php endif ;?>
var thisIndex1 = 0;
var imgagreementpicList = $("#agreementpicList");
uploaderImgagreementpic.on( 'fileQueued', function( file ) {
var html = '';
html += '<div id="' + file.id + '" class="item" style="margin-right: 10px;">';
html += '<a href="javascript:;"><img src="" style="width: 100px;height: 100px;cursor: move;"></a>';
html += '<h4 class="info">' + file.name + '</h4>';
html += '<p class="state">等待上传...</p>';
html += '</div>';
imgagreementpicList.append(html);
imgagreementpicList.css('margin-top','10px');
var img1 = imgagreementpicList.children('#'+file.id).find('img');
uploaderImgagreementpic.makeThumb(file, function (error, src) {
if (error) {
return;
}
img1.attr('src', src);
}, 300, 300);
});
// 文件上传过程中创建进度条实时显示。
uploaderImgagreementpic.on( 'uploadProgress', function( file, percentage ) {
var $li = $( '#'+file.id ),
$percent = $li.find('.progress .progress-bar');
// 避免重复创建
if ( !$percent.length ) {
$percent = $('<div class="progress progress-striped active">' +
'<div class="progress-bar" role="progressbar" style="width: 0%">' +
'</div>' +
'</div>').appendTo( $li ).find('.progress-bar');
}
$li.find('p.state').text('上传中');
$percent.css( 'width', percentage * 100 + '%' );
$percent.text( (percentage * 100).toFixed(0) + '%' );
});
uploaderImgagreementpic.on( 'uploadSuccess', function( file , response) {
console.log(response)
imgListagreementpicData.push(Number(response.id));
setagreementpicVal();
$( '#'+file.id ).find('p.state').text('已上传').fadeOut(800);
//alert(JSON.stringify(response));
$('#'+file.id).find('h4.info').append('<a href="javascript:;" class="jsdelzip table_click" style="float:none;display:inline-block;margin-left:10px;">删除</a>');
$('#'+file.id).find('.jsdelzip').on('click',function() {
uploaderImgagreementpic.removeFile( file.id );
$('#'+file.id).remove();
$.each(imgListagreementpicData,function(index, item) {
if (response.id == item) {
imgListagreementpicData.splice(index,1);
return false;
}
});
setagreementpicVal();
console.log(imgListagreementpicData);
return false;
});
});
function setagreementpicVal()
{
var agreementpic = '';
$.each(imgListagreementpicData,function(index, item) {
agreementpic += item + ',';
});
console.log('444444444444444444')
console.log(agreementpic)
agreementpic = agreementpic.substring(0, agreementpic.length - 1);
$('input[name=agreementpic]').val(agreementpic);
}
}
})
}
</script>
</block>
<block name="script">
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
<script type="text/javascript" src="__STATIC__/mail_suffix.js"></script>
<script type="text/javascript" src="__STATIC__/bank.js"></script>
</block>

@ -49,28 +49,43 @@
<block name="body" >
<script type="text/javascript" src="__STATIC__/provincecityarea/area1.js" ></script>
<?php if($promoteinfo['ver_status'] == 3) {?>
<div style="background: RGB(252,236,236);" id="tab">
<span style="padding-left:20px;color:red" >正在审核中,请耐心等待~加急,请联系您的平台对接人员</span>
</div>
<?php };?>
<div class="page-list normal_list promote-base_info-form" style="min-height:120vh">
<div class="trunk-title">
<img src="__IMG__/20180207/icon_normal_zhanghu.png">
<span class="title_main">资质认证</span>
</div>
<div class="trunk-content article">
<div class="trunk-list baseInfo">
<!-- <div style="" id="tab">
<span style="padding-left:20px;color:#26c7dbd4" >注意:密码必须由字母与数字组合</span>
</div>-->
<form action="{:U('Safe/modifyBaseInfo')}" novalidate="novalidate" method="post" class="paw_info">
<table class="table2" style="margin-top:20px;margin-left:30px;width:100%" >
<tr>
<td class="l">真实姓名:</td>
<td class="r"><input type="text" class="input txt" name="username" id="password" style="width:430px" placeholder="{$promoteinfo['real_name']}" value="{$promoteinfo['real_name']}">
<td class="r">
<?php if($ver_status !== 0 ){?>
<input type="text" disabled ="disabled" class="input txt" name="username" id="password" style="width:430px" placeholder="{$promoteinfo['real_name']}" value="{$promoteinfo['real_name']}">
<?php }?>
<?php if($ver_status === 0 ){?>
<input type="text" class="input txt" name="username" id="password" style="width:430px" placeholder="{$promoteinfo['real_name']}" value="{$promoteinfo['real_name']}">
<?php }?>
<span id="password_tip"></span></td>
</tr>
<tr>
<td class="l">身份证号码:</td>
<td class="r"><input type="text" class="input txt" name="id_card" id="confirm_password" style="width:430px" placeholder="{$promoteinfo['idcard']}" value="{$promoteinfo['idcard']}">
<td class="r">
<?php if($ver_status !== 0 ){?>
<input type="text" disabled ="disabled" class="input txt" name="id_card" id="confirm_password" style="width:430px" placeholder="{$promoteinfo['idcard']}" value="{$promoteinfo['idcard']}">
<?php }?>
<?php if($ver_status === 0 ){?>
<input type="text" class="input txt" name="id_card" id="confirm_password" style="width:430px" placeholder="{$promoteinfo['idcard']}" value="{$promoteinfo['idcard']}">
<?php }?>
<span id="confirm_password_tip"></span></td>
</tr>
<tr>
@ -168,7 +183,14 @@
<tr style="margin-top:50px">
<td class="l">电话:</td>
<td class="r"><input type="text" class="input txt" name="tel" id="confirm_password" style="width:430px" placeholder="{$promoteinfo['mobile_phone']}" value="{$promoteinfo['mobile_phone']}">
<td class="r">
<?php if($ver_status !== 0 ){?>
<input type="text" disabled ="disabled" class="input txt" name="tel" id="confirm_password" style="width:430px" placeholder="{$promoteinfo['mobile_phone']}" value="{$promoteinfo['mobile_phone']}">
<?php }?>
<?php if($ver_status === 0 ){?>
<input type="text" class="input txt" name="tel" id="confirm_password" style="width:430px" placeholder="{$promoteinfo['mobile_phone']}" value="{$promoteinfo['mobile_phone']}">
<?php }?>
<span id="confirm_password_tip"></span></td>
</tr>
@ -180,7 +202,13 @@
<select id="s_province" name="s_province" class="areaselect1 select_gallery" style="width: 90px;"></select>  
<select id="s_city" name="s_city" class="areaselect2 select_gallery" style="width: 120px;"></select>  
<select id="s_county" name="s_county" class="areaselect3 select_gallery" style="width: 90px;"></select>
<input type="text" class="input txt" name="address" id="confirm_password" style="width:430px;margin-left:20px" placeholder="{$promoteinfo['address'][1]}" value="{$promoteinfo['address'][1]}">
<?php if($ver_status !== 0 ){?>
<input type="text" class="input txt" disabled ="disabled" name="address" id="confirm_password" style="width:430px;margin-left:20px" placeholder="" value="{$promoteinfo['address'][1]}">
<?php }?>
<?php if($ver_status === 0 ){?>
<input type="text" class="input txt" name="address" id="confirm_password" style="width:430px;margin-left:20px" placeholder="" value="{$promoteinfo['address'][1]}">
<?php }?>
<script type="text/javascript" >
var pro="{:$promoteinfo['addressdata']['0']}";
var city="{:$promoteinfo['addressdata']['1']}";
@ -206,7 +234,14 @@
<tr>
<td class="l">邮箱:</td>
<td class="r"><input type="text" class="input txt" name="email" id="confirm_password" style="width:430px" placeholder="{$promoteinfo['email']}" value="{$promoteinfo['email']}">
<td class="r">
<?php if($ver_status !== 0 ){?>
<input type="text" class="input txt" disabled ="disabled" name="email" id="confirm_password" style="width:430px" placeholder="{$promoteinfo['email']}" value="{$promoteinfo['email']}">
<?php }?>
<?php if($ver_status === 0 ){?>
<input type="text" class="input txt" name="email" id="confirm_password" style="width:430px" placeholder="{$promoteinfo['email']}" value="{$promoteinfo['email']}">
<?php }?>
<span id="confirm_password_tip"></span></td>
</tr>
@ -217,19 +252,40 @@
</tr>
<tr>
<td class="l">开户银行:</td>
<td class="r"><input type="text" class="input txt" name="bank_name" id="confirm_password" style="width:430px" placeholder="{$promoteinfo['bank_name']}" value="{$promoteinfo['bank_name']}">
<td class="r">
<?php if($ver_status !== 0 ){?>
<input type="text" class="input txt" disabled ="disabled" name="bank_name" id="confirm_password" style="width:430px" placeholder="{$promoteinfo['bank_name']}" value="{$promoteinfo['bank_name']}">
<?php }?>
<?php if($ver_status === 0 ){?>
<input type="text" class="input txt" name="bank_name" id="confirm_password" style="width:430px" placeholder="{$promoteinfo['bank_name']}" value="{$promoteinfo['bank_name']}">
<?php }?>
<span id="confirm_password_tip"></span></td>
</tr>
<tr>
<td class="l">银行账户名:</td>
<td class="r"><input type="text" class="input txt" name="bank_account" id="confirm_password" style="width:430px" placeholder="{$promoteinfo['bank_account']}" value="{$promoteinfo['bank_account']}">
<td class="r">
<?php if($ver_status !== 0 ){?>
<input type="text" class="input txt" disabled ="disabled" name="bank_account" id="confirm_password" style="width:430px" placeholder="{$promoteinfo['bank_account']}" value="{$promoteinfo['bank_account']}">
<?php }?>
<?php if($ver_status === 0 ){?>
<input type="text" class="input txt" name="bank_account" id="confirm_password" style="width:430px" placeholder="{$promoteinfo['bank_account']}" value="{$promoteinfo['bank_account']}">
<?php }?>
<span id="confirm_password_tip"></span></td>
</tr>
<tr>
<td class="l">银行账号:</td>
<td class="r"><input type="text" class="input txt" name="bank_card" id="confirm_password" style="width:430px" placeholder="{$promoteinfo['bank_card']}" value="{$promoteinfo['bank_card']}">
<td class="r">
<?php if($ver_status !== 0 ){?>
<input type="text" class="input txt" disabled ="disabled" name="bank_card" id="confirm_password" style="width:430px" placeholder="{$promoteinfo['bank_card']}" value="{$promoteinfo['bank_card']}">
<?php }?>
<?php if($ver_status === 0 ){?>
<input type="text" class="input txt" name="bank_card" id="confirm_password" style="width:430px" placeholder="{$promoteinfo['bank_card']}" value="{$promoteinfo['bank_card']}">
<?php }?>
<span id="confirm_password_tip"></span></td>
</tr>

Loading…
Cancel
Save