You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
295 lines
13 KiB
295 lines
13 KiB
{layout name="public/layout" /}
|
|
<ol class="breadcrumb" style="margin-top:10px">
|
|
<li><i class="glyphicon glyphicon-home"></i> <a href="{:url('center/index')}">用户中心</a></li>
|
|
<li class="active">我的托管</li>
|
|
</ol>
|
|
<table id="mytg" class="table">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col" width="20px">#</th>
|
|
<th scope="col" width="80px">托管类型</th>
|
|
<th scope="col" width="80px">申请时间</th>
|
|
<th scope="col" >申请状态</th>
|
|
<th scope="col" width="60px">待操作</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
<script src="{$yf_theme_path}public/js/layer/layer.js"></script>
|
|
<script type="text/javascript">
|
|
function to_deit(tg_id){
|
|
$.ajax({type:"POST",
|
|
url:'{:url(\'Listn/tg_upcheck\')}',
|
|
data:{"tg_id":tg_id},
|
|
async: false,
|
|
success:function (data) {
|
|
if (data.code == 1) {
|
|
window.location.href = data.url;
|
|
}else{
|
|
layer.alert(data.msg, {icon: 5}, function (index) {
|
|
layer.close(index);
|
|
});
|
|
}
|
|
}
|
|
})
|
|
}
|
|
function data2str(_data,format){
|
|
format=format||"yyyy-MM-dd";
|
|
var o = {
|
|
"M+" : _data.getMonth()+1, //month
|
|
"d+" : _data.getDate(), //day
|
|
"h+" : _data.getHours(), //hour
|
|
"m+" : _data.getMinutes(), //minute
|
|
"s+" : _data.getSeconds(), //second
|
|
"q+" : Math.floor((_data.getMonth()+3)/3), //quarter
|
|
"S" : _data.getMilliseconds() //millisecond
|
|
};
|
|
//console.log(o);
|
|
if(/(y+)/.test(format)) format=format.replace(RegExp.$1,
|
|
(_data.getFullYear()+"").substr(4 - RegExp.$1.length));
|
|
for(var k in o)if(new RegExp("("+ k +")").test(format))
|
|
format = format.replace(RegExp.$1,
|
|
RegExp.$1.length==1 ? o[k] :
|
|
("00"+ o[k]).substr((""+ o[k]).length));
|
|
return format;
|
|
}
|
|
//http://dev-hsx.hdsj.tvm.cn/api/capital/getList
|
|
function getList(){
|
|
$.ajax({type:"get",
|
|
url:'/api/capital/getList',
|
|
data:{apply_type:2},
|
|
success:function (data) {
|
|
if(data && typeof(data)=="string"){
|
|
data=JSON.parse(data);
|
|
}
|
|
|
|
//console.log('--data-=-',data);
|
|
var databodyobj=$("#mytg tbody");
|
|
databodyobj.empty();
|
|
if(data.data && data.data.data){
|
|
var list=data.data.data;
|
|
//console.log('--list-=-',list);
|
|
var listsize=list==null?0:list.length;
|
|
for(var i=0;i<listsize;i++){
|
|
//`apply_type` tinyint(2) unsigned NOT NULL COMMENT '申请类型 1 文化 2艺术品',
|
|
var onelist=list[i];
|
|
var apply_id=onelist.apply_id;
|
|
var apply_type=onelist.apply_type;
|
|
var apply_status=onelist.apply_status;
|
|
var status=onelist.status;
|
|
var contract=onelist.contract;
|
|
var contract_status=onelist.contract_status;
|
|
var status_name=onelist.status_name;
|
|
var statusdesc="";
|
|
if(apply_status==0){
|
|
statusdesc="待审核";
|
|
}else if(apply_status==1){
|
|
statusdesc="审核通过";
|
|
}else if(apply_status==2){
|
|
statusdesc="审核不通过";
|
|
}
|
|
switch(status){
|
|
case '10':
|
|
break;
|
|
case '20':
|
|
break;
|
|
case '30':
|
|
break;
|
|
case '40':
|
|
break;
|
|
case '50':
|
|
break;
|
|
case '60':
|
|
break;
|
|
case '70':
|
|
break;
|
|
case '80':
|
|
break;
|
|
case '90':
|
|
break;
|
|
}
|
|
var descstr1=(status_name||statusdesc);
|
|
if(apply_status==1 || apply_status==2){
|
|
if(onelist.advice){
|
|
descstr1='<div><small>'+descstr1+'</small><div style="font-size:10px;color:#808080">'+onelist.advice+'</div></div>';
|
|
}
|
|
}
|
|
|
|
var create_time=onelist.create_time;
|
|
var datestr=data2str(new Date(create_time*1000));
|
|
var html='<tr>'
|
|
+'<th scope="row">'+(i+1)+'</th>'
|
|
+'<td>'+(apply_type==1?'文化资产':apply_type==2?'艺术资产':apply_type==3?'古建资产':'')+'</td>'
|
|
+'<td>'+datestr+'</td>'
|
|
+'<td>'+descstr1+'<span id="pro'+apply_id+'"></span></td>'
|
|
+'<td><div class="dropdown"><button class="btn btn-danger btn-xs dropdown-toggle" type="button" id="dropdownMenu'+i+'" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">操作<span class="caret"></span></button>'
|
|
+'<ul class="dropdown-menu" aria-labelledby="dropdownMenu'+i+'"><li><a class="btn btn-danger btn-xs" href="jointg2.html?tg_type=2&id='+apply_id+'">项目信息</a></li>';
|
|
//apply_status
|
|
|
|
var advice=onelist.advice;
|
|
if(contract){
|
|
html+='<li><a class="btn btn-danger btn-xs" href="{:SITE_PATH}'+contract+'">服务协议</a></li>';
|
|
if(contract_status==1){
|
|
html+='<li><div style="position:relative;width:100%;" class="btn btn-danger btn-xs">'
|
|
+'上传协议'
|
|
+'<input style="left:0px;top:0px;" accept="pdf" onchange="to_contract(this,'+apply_id+')" type="file" class="upfileter file_name">'
|
|
+'</div></li>';
|
|
}
|
|
}
|
|
if(status==60 && apply_status==0){
|
|
html+='<li><div style="position:relative;width:100%;" class="btn btn-danger btn-xs">'
|
|
+'上传缴费凭证'
|
|
+'<input style="left:0px;top:0px;" accept="image/jpeg" onchange="to_deit1(this,'+apply_id+')" type="file" class="upfileter file_name">'
|
|
+'</div></li>';
|
|
|
|
}else if(status==10 && apply_status==2||status==20 && apply_status==2){
|
|
html+='<li>'
|
|
+'<a class="btn btn-danger btn-xs" href="jointg2.html?tg_type=2&id='+apply_id+'">补交材料</a>'
|
|
+'</li>';
|
|
}
|
|
html+='</ul></div></td>'
|
|
+'</tr>';
|
|
//console.log(html);
|
|
databodyobj.append(html);
|
|
}
|
|
}
|
|
$(".advice").each(function(){
|
|
$(this).click(function(event){
|
|
event.preventDefault();
|
|
var msg=$(this).data("msg");
|
|
if(typeof msg!="undefined"){
|
|
layer.alert(msg, {icon: 6}, function (index) {
|
|
layer.close(index);
|
|
});
|
|
}
|
|
});
|
|
});
|
|
|
|
}
|
|
})
|
|
}
|
|
|
|
getList();
|
|
function to_contract(fileobj,apply_id){
|
|
if(fileobj.length==0)return;
|
|
|
|
var fname = fileobj.files[0].name;
|
|
var filetype = fname.substring(fname.lastIndexOf(".")+1).toUpperCase();
|
|
|
|
if(filetype!="PDF"){
|
|
alert("请上传服务协议!");
|
|
return;
|
|
}
|
|
var proobj=$("#pro"+apply_id);
|
|
function processcallback(result){
|
|
proobj.text(result.percent);
|
|
}
|
|
function successcallback(result){
|
|
var msg="上传服务协议失败!";
|
|
var icon=5;
|
|
if(result && result.data){
|
|
msg="上传服务协议成功!";
|
|
icon=6;
|
|
}
|
|
layer.msg(msg, {icon:icon});
|
|
if(result && result.data){
|
|
setTimeout(function(){
|
|
window.location.reload();
|
|
},2000);
|
|
}
|
|
proobj.empty();
|
|
}
|
|
var urlstr="/api/capital/setContract";
|
|
uploadfile(apply_id,fileobj,processcallback,successcallback,urlstr)
|
|
}
|
|
function show_deit1(){
|
|
try{
|
|
event.stopPropagation();
|
|
}catch(ex){}
|
|
$('#infodiv1').reveal($(this).data());
|
|
}
|
|
function gotoinfo(apply_id){
|
|
window.location.href='/pviews/render/content/tgadd.html?id='+apply_id+'&t='+(new Date().getTime());
|
|
}
|
|
|
|
function to_deit1(fileobj,apply_id){
|
|
try{
|
|
event.stopPropagation();
|
|
}catch(ex){}
|
|
|
|
if(fileobj.length==0)return;
|
|
|
|
var fname = fileobj.files[0].name;
|
|
var filetype = fname.substring(fname.lastIndexOf(".")+1).toUpperCase();
|
|
if(filetype=="JPG" || filetype=="PNG" || filetype=="JPEG"){
|
|
|
|
}else{
|
|
alert("请选择图片上传!");
|
|
return;
|
|
}
|
|
var proobj=$("#pro"+apply_id);
|
|
function processcallback(result){
|
|
proobj.text(result.percent);
|
|
}
|
|
function successcallback(result){
|
|
var msg="上传缴费凭证失败!";
|
|
if(result && result.data){
|
|
msg="上传缴费凭证成功!";
|
|
}
|
|
layer.alert(msg, {icon: 6}, function (index) {
|
|
layer.close(index);
|
|
});
|
|
proobj.empty();
|
|
}
|
|
var urlstr="/api/capital/setPayImg";
|
|
uploadfile(apply_id,fileobj,processcallback,successcallback,urlstr)
|
|
}
|
|
function uploadfile(apply_id,fileobj,processcallback,successcallback,urlstr){
|
|
var xhr = new XMLHttpRequest();
|
|
xhr.upload.onprogress = function(_upevent){
|
|
if (_upevent.lengthComputable) {
|
|
var oksize=_upevent.loaded;
|
|
var percentComplete =oksize / _upevent.total;
|
|
var bfbint=parseInt(percentComplete*100);
|
|
var bfbstr=bfbint+"%";
|
|
console.log({"percent":bfbstr,"loaded":_upevent.loaded,"total":_upevent.total});
|
|
processcallback({"percent":bfbstr,"loaded":_upevent.loaded,"total":_upevent.total});
|
|
}
|
|
};
|
|
var fileobjs=fileobj.files;
|
|
onefileobj=fileobjs[0];
|
|
xhr.open("POST",urlstr,true);
|
|
var formdata = new FormData();
|
|
formdata.append("apply_id",apply_id);
|
|
formdata.append("file",onefileobj);
|
|
xhr.onload = function(res) {
|
|
if(this.status==200){
|
|
var _responseText=this.responseText;
|
|
var attachjson=JSON.parse(_responseText);
|
|
console.log('attachjson',attachjson);
|
|
successcallback(attachjson);
|
|
}else{
|
|
successcallback();
|
|
console.error('res',res);
|
|
}
|
|
};
|
|
xhr.send(formdata);
|
|
}
|
|
</script>
|
|
|
|
<div id="infodiv1" class="reveal-modal" style="padding-top: 15px;display:none;">
|
|
<div class="modeub" style="margin-bottom: 20px;">
|
|
<div class="cardregisterpage" style="margin-top:40px;">
|
|
<div style="font-size:14px">请在三个工作日内一次性支付托管服务费用</div>
|
|
<div style="font-size:12px">深圳文化产权交易所收款账户及开户银行: </div>
|
|
<div style="font-size:12px">开户名:深圳文化产权交易所有限公司 </div>
|
|
<div style="font-size:12px">开户银行:工商银行深圳中心区支行 </div>
|
|
<div style="font-size:12px">开户账号:4000115819100036124</div>
|
|
</div>
|
|
</div>
|
|
|
|
<a class="close-reveal-modal" style="top: 14px !important;">×</a>
|
|
</div>
|