layer实现加载相应的数据后,再填写不合格数据的原因,效果如下:
function myBackChangeFlag(_this){
debugger;
var obj=$(_this);
var UUID=obj.attr('UUID');
//查询附件列表
$.ajax({
type: "POST",
async: false,
url: 'FileUpload/showFilesNew',
data: {
'LICENSECOMPANYBASEUUID' : UUID,
'coding' : '2'
},
dataType: 'json',
beforeSend: function () {
tiShi = parentMain.layer.load('正在加载中.....', 0);
}, error: function (aa) {
parentMain.layer.close(tiShi);
parentMain.layer.msg('服务器忙 请稍后再试', {time: 1000, icon: 2}, function () {
parentMain.layer.closeAll();
});
}, success: function (objData) {
parentMain.layer.close(tiShi);
var table = '<table id="fuJian" cellspacing="0" cellpadding="0" style="width: 100%;"><tr style="border-bottom: 2px solid rgb(211,211,211) !important; ">' +
'<td width="80px" style="font-size: 20px !important;">序号</td><td style="font-size: 20px !important;">文件标题</td></tr>';
if(objData && objData.length >0){
$.each(objData,function (index,obj) {
table += '<tr style="background-color: rgb(242,249,255);">' +
'<td class="titleNum" style="padding-left: 20px;font-size: 14px;height: 14px;">'+(index+1)+'</td>' +
'<td style="font-size: 14px;height: 14px;">' +
'<input type="checkbox" checkFileid="'+getObjToString(obj.id)+'" id="selectFileId" name="selectFileId" />'+obj.fileNowName+'' +
'<input type="hidden" biaoji="'+getObjToString(obj.biaoJi)+'" biaojivalue="'+getObjToString(obj.biaoJiValue)+'" coding="2" fileid="'+getObjToString(obj.id)+'" name="'+getObjToString(obj.fileNowName)+'" class="validate[required] input-remove" readonly="readonly" disabled="disabled" style="border: 0px;"> ' +
'</td></tr>';
});
}
table += '<tr><td colspan="2"><textarea rows="3" cols="222" id="yiJian" name="yiJian" placeholder="请选择需要补正的附件,并填写补正到外网申报端原因!" class="input-remove form-control"></textarea></td></tr></table>';
daHui_file(obj,table);
}
})
}
function daHui_file(obj,table) {
debugger;
layer.open({
area: ['80%', '80%'],
title: '请填写补正到外网申报端原因',
content: table,
btn: ['退回', '取消'],
offset: 'auto',
yes: function (index, layero) {
parentMain.layer.close(index);
var param={};
param['ID'] = obj.attr('ID');
param['LICENSECOMPANYBASEUUID'] = obj.attr('UUID');
param['huanJie'] = '业务受理';
param['yiJian'] = $("input[name='yiJian']").val();
param['jieLun'] = '补正';
param['shenHeRen'] = $('#sysUserId').val();
parentMain.layer.closeAll();
$.ajax({
type: "POST",
async: true,
data:$.param(param),
url: "license/updateDaHuiShenBao",
beforeSend: function () {
tiShi = parentMain.layer.load('正在加载中.....', 0);
},
error: function (aa) {
parentMain.layer.close(tiShi);
},
success: function (msg) {
parentMain.layer.close(tiShi);
if(msg['biaoJi']=='1'){
parentMain.layer.msg('退回补正成功!', {time: 1000, icon:1});
reSelectList();
}else{
parentMain.layer.msg("服务器忙 请稍后再试!", {time: 1000, icon:2});
}
}
});
},
cancel: function () {
//默认回调 关闭当前窗口,取消
// return false;
}
});
}