|
|
|
@ -144,7 +144,7 @@
|
|
|
|
|
电话: {$tel}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="line_text">
|
|
|
|
|
联系地址: {$addr}
|
|
|
|
|
联系地址: <?php foreach($addr as $item):?> {$item}<?php endforeach;?>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="line_text">
|
|
|
|
|
邮箱: {$rs['email']}
|
|
|
|
@ -153,10 +153,20 @@
|
|
|
|
|
账户类型: <span style="color:#449acb">已认证<span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="line_text">
|
|
|
|
|
开户银行: {$rs['bank_card']}
|
|
|
|
|
<span onclick="ed(1)" id="edit" style="color:#449acb">修改</span>
|
|
|
|
|
开户银行: {$rs['bank_name']}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="line_text">
|
|
|
|
|
支付宝真实姓名: {$rs['alipay_real_name']}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="line_text">
|
|
|
|
|
支付宝账户: {$rs['alipay_account']}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="margin-top: 30px;">
|
|
|
|
|
<div class="form-group normal_space">
|
|
|
|
|
<input type="submit" class="submit" onclick="ed(1)" value="修改">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<script src="__LAY__/layui.js" type="text/javascript" ></script>
|
|
|
|
|
<link rel="stylesheet" href="__LAY__/css/layui.css" media="all">
|
|
|
|
@ -167,6 +177,8 @@
|
|
|
|
|
</script>
|
|
|
|
|
<script>
|
|
|
|
|
function ed(id) {
|
|
|
|
|
// 检查是否验证过手机号
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
type:"POST",
|
|
|
|
|
url:"{:U('Safe/ajaxEdit')}",
|
|
|
|
@ -174,203 +186,318 @@
|
|
|
|
|
dataType:'json',
|
|
|
|
|
success:function(res) {
|
|
|
|
|
var tel = res.tel
|
|
|
|
|
var address = res.address
|
|
|
|
|
console.log(res)
|
|
|
|
|
var email = res.email
|
|
|
|
|
var account_type = res.account_type
|
|
|
|
|
if(account_type == 1) {
|
|
|
|
|
var complany = 'checked';
|
|
|
|
|
var personal = '';
|
|
|
|
|
}else {
|
|
|
|
|
var complany = '';
|
|
|
|
|
var personal = 'checked';
|
|
|
|
|
if (!tel) {
|
|
|
|
|
layer.msg('请先绑定手机号后再来修改信息');
|
|
|
|
|
return ;
|
|
|
|
|
}
|
|
|
|
|
var bank_card = res.bank_card
|
|
|
|
|
var complanystatus = res.complanystatus
|
|
|
|
|
var personalstatus = res.personalstatus
|
|
|
|
|
var anothpic = res.anothpic
|
|
|
|
|
layer.open({
|
|
|
|
|
type: 1
|
|
|
|
|
// TODO::判断是否需要验证
|
|
|
|
|
//获取短信
|
|
|
|
|
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="公司" '+complany+'>公司<input type="radio" class="input txt" style="margin-left:20px" name="account_type" value="个人" '+personal+'>个人'
|
|
|
|
|
+'<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">'
|
|
|
|
|
+'<input type="button" id="btn" class="tj btn ajax-post" value="返回" style="margin-top:40px;width:200px;margin-left:50px" title="" target-form="paw_info"></td> </tr></table></form>'
|
|
|
|
|
+'</div></div></div>'
|
|
|
|
|
// ,content:content
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
$("#btn").click(function() {
|
|
|
|
|
window.location.href = "{:U('safe/editModify')}"
|
|
|
|
|
})
|
|
|
|
|
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();
|
|
|
|
|
,area: ["700px","400px"]
|
|
|
|
|
,id: 'LAY_layui_smm' //设定一个id,防止重复弹出
|
|
|
|
|
,content:`
|
|
|
|
|
<div class="page-list normal_list promote-base_info-form">
|
|
|
|
|
<div class="trunk-title">
|
|
|
|
|
|
|
|
|
|
<span class="title_main">手机号验证</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="trunk-content article">
|
|
|
|
|
<div class="trunk-list baseInfo">
|
|
|
|
|
|
|
|
|
|
<form action="{:U('Safe/addLoginMobile')}" novalidate="novalidate" method="post" class="paw_info">
|
|
|
|
|
<table class="table2" style="margin-top:50px;margin-left:50px">
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="l"><span style="color:red">*</span>手机号码</td>
|
|
|
|
|
<td class="r">
|
|
|
|
|
<input type="text" class="input txt" name="login_phone" id="login_phone" style="width:430px" value="`+tel+`">
|
|
|
|
|
<span id="confirm_password_tip"></span></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="l"><span style="color:red">*</span>短信验证码</td>
|
|
|
|
|
<td class="r"><input type="text" class="input txt" name="code" id="code" style="width:230px" placeholder="请输入短信验证码">
|
|
|
|
|
<span id="confirm_password_tip"></span>
|
|
|
|
|
<button id="sendtelCode" class="tj btn" target-form="paw_info">发送验证码</button>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="l"></td>
|
|
|
|
|
<td class="r">
|
|
|
|
|
<input type="submit" id="check-code-btn" class="tj btn ajax-post" value="保存" style="margin-top:40px;width:200px" title="" target-form="paw_info">
|
|
|
|
|
<input type="button" class="tj btn ajax-post" value="返回" onclick='window.location.href = "{:U('safe/editModify')}"' style="margin-top:40px;width:200px;margin-left:50px" title="" target-form="paw_info">
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
</div>`
|
|
|
|
|
});
|
|
|
|
|
$('#sendtelCode').on('click',function() {
|
|
|
|
|
if ($(this).hasClass('g-btntn')) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
var phone = $.trim($('#login_phone').val());
|
|
|
|
|
if (phone == '') {
|
|
|
|
|
alert("手机号不能为空");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
if (phone.length !== 11 || !(/^[1][35789][0-9]{9}$/.test(phone))) {
|
|
|
|
|
pmsg.msg("格式不正确");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
$.ajax({
|
|
|
|
|
type:'post',
|
|
|
|
|
dataType:'json',
|
|
|
|
|
data:{'phone':phone, 'exceptExists':0},
|
|
|
|
|
url:'{:U("telsafecode")}',
|
|
|
|
|
success:function(data) {
|
|
|
|
|
if (data.status ==1) {
|
|
|
|
|
r(1);
|
|
|
|
|
} else {
|
|
|
|
|
alert(data.msg);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
error:function() {
|
|
|
|
|
alert('服务器开小差了,请稍后再试。');
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
var r = function(i, t) {
|
|
|
|
|
var e = $('#sendtelCode');
|
|
|
|
|
var t = 60;
|
|
|
|
|
e.addClass('disabled').attr('disabled', true).text(t+'秒');
|
|
|
|
|
var a = setInterval(function() {
|
|
|
|
|
t--;
|
|
|
|
|
e.text(t+'秒');
|
|
|
|
|
t>0 || (clearInterval(a),e.removeClass('disabled').attr('disabled', false).text('重新发送'));
|
|
|
|
|
},1000);
|
|
|
|
|
};
|
|
|
|
|
return false;
|
|
|
|
|
});
|
|
|
|
|
$('#check-code-btn').on('click', function(){
|
|
|
|
|
$.ajax({
|
|
|
|
|
type:"POST",
|
|
|
|
|
url:"{:U('Safe/ajaxVerifyCode')}",
|
|
|
|
|
data:{'phone':tel, 'code':$('#code').val()},
|
|
|
|
|
dataType:'json',
|
|
|
|
|
success:function(verifyResponse){
|
|
|
|
|
if (verifyResponse.status == 0) {
|
|
|
|
|
layer.msg(verifyResponse.info);
|
|
|
|
|
} else { // 验证成功
|
|
|
|
|
layer.closeAll();
|
|
|
|
|
layer.msg(verifyResponse.info)
|
|
|
|
|
var address = res.address
|
|
|
|
|
console.log(res)
|
|
|
|
|
var email = res.email
|
|
|
|
|
var account_type = res.account_type
|
|
|
|
|
if(account_type == 1) {
|
|
|
|
|
var complany = 'checked';
|
|
|
|
|
var personal = '';
|
|
|
|
|
}else {
|
|
|
|
|
var complany = '';
|
|
|
|
|
var personal = 'checked';
|
|
|
|
|
}
|
|
|
|
|
var bank_card = res.bank_card
|
|
|
|
|
var complanystatus = res.complanystatus
|
|
|
|
|
var personalstatus = res.personalstatus
|
|
|
|
|
var anothpic = res.anothpic
|
|
|
|
|
var alipayAccount = res.alipay_account
|
|
|
|
|
var alipayRealName = res.alipay_real_name
|
|
|
|
|
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="公司" '+complany+'>公司<input type="radio" class="input txt" style="margin-left:20px" name="account_type" value="个人" '+personal+'>个人'
|
|
|
|
|
// +'<span id="confirm_password_tip"></span></td></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="" value="'+res.bank_name+'">'
|
|
|
|
|
+'<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="bank_account" style="width:430px" placeholder="" value="'+res.bank_account+'">'
|
|
|
|
|
+'<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="bank_card" style="width:430px" placeholder="" value="'+res.bank_card+'">'
|
|
|
|
|
+'<span id="confirm_password_tip"></span></td></tr>'
|
|
|
|
|
+' <tr><td class="l">支付宝真实姓名:</td><td class="r"><input type="text" class="input txt" name="alipay_real_name" id="alipay_real_name" style="width:430px" placeholder="" value="'+res.alipay_real_name+'">'
|
|
|
|
|
+'<span id="confirm_password_tip"></span></td></tr>'
|
|
|
|
|
+' <tr><td class="l">支付宝账户:</td><td class="r"><input type="text" class="input txt" name="alipay_account" id="alipay_account" style="width:430px" placeholder="" value="'+res.alipay_account+'">'
|
|
|
|
|
+'<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">'
|
|
|
|
|
+'<input type="button" id="btn" class="tj btn ajax-post" value="返回" style="margin-top:40px;width:200px;margin-left:50px" title="" target-form="paw_info"></td> </tr></table></form>'
|
|
|
|
|
+'</div></div></div>'
|
|
|
|
|
// ,content:content
|
|
|
|
|
})
|
|
|
|
|
$("#btn").click(function() {
|
|
|
|
|
window.location.href = "{:U('safe/editModify')}"
|
|
|
|
|
})
|
|
|
|
|
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>';
|
|
|
|
|
$.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');
|
|
|
|
|
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);
|
|
|
|
|
});
|
|
|
|
|
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');
|
|
|
|
|
}
|
|
|
|
|
// 文件上传过程中创建进度条实时显示。
|
|
|
|
|
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) + '%' );
|
|
|
|
|
});
|
|
|
|
|
$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();
|
|
|
|
|
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();
|
|
|
|
|
$( '#'+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);
|
|
|
|
|
$.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);
|
|
|
|
|
}
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
return false;
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|