|
@@ -976,14 +976,14 @@ TalentInfoInfoDlg.upload = function (fileTypeId, fileId, tableIndex, trIndex) {
|
|
|
$("#uploadForm").submit();
|
|
|
}
|
|
|
//删除附件
|
|
|
-TalentInfoInfoDlg.deleteFile = function (id, state) {
|
|
|
+TalentInfoInfoDlg.deleteFile = function (id, obj) {
|
|
|
if (!TalentInfoInfoDlg.validateIsEdit())
|
|
|
return;
|
|
|
var operation = function () {
|
|
|
var ajax = new $ax(Feng.ctxPath + "/common/api/deleteFile", function (data) {
|
|
|
if (data.code == 200) {
|
|
|
Feng.success(data.msg);
|
|
|
- $("input[name='uploadFiles[]'][value='" + id + "']").parents("li").remove();
|
|
|
+ $(obj).parents("li").remove();
|
|
|
//$("#fileTable").bootstrapTable("refresh", {});
|
|
|
} else {
|
|
|
Feng.error(data.msg);
|
|
@@ -1119,7 +1119,7 @@ TalentInfoInfoDlg.validUploadButton = function (type, fileTypeId, fileId, tableI
|
|
|
return "<button type=\'button\' onclick=\"TalentInfoInfoDlg.checkFile(this," + fileTypeId + "," + fileId + "," + tableIndex + "," + trIndex + ")\" style=\'margin-right: 10px\' class=\"btn btn-xs btn-info\">" +
|
|
|
"<i class=\"fa fa-paste\"></i>修改" +
|
|
|
"</button>" +
|
|
|
- "<button type='button' onclick=\"TalentInfoInfoDlg.deleteFile(" + fileId + ")\" class=\"btn btn-xs btn-danger\">" +
|
|
|
+ "<button type='button' onclick=\"TalentInfoInfoDlg.deleteFile(" + fileId + ",this)\" class=\"btn btn-xs btn-danger\">" +
|
|
|
"<i class=\"fa fa-times\"></i>删除" +
|
|
|
"</button>";
|
|
|
}
|
|
@@ -1157,7 +1157,7 @@ TalentInfoInfoDlg.callBack = function (data) {
|
|
|
<div style="width: 10%;">' + imgStr + '</div>\n\
|
|
|
<div style="width: 20%;">\n\
|
|
|
<button type="button" onclick="TalentInfoInfoDlg.checkFile(this,' + data.typeId + ',' + data.id + ',' + tableIndex + ',' + trIndex + ')" style="margin-right: 10px" class="btn btn-xs btn-info"><i class="fa fa-paste"></i>修改</button>\n\
|
|
|
-<button type="button" onclick="TalentInfoInfoDlg.deleteFile(' + data.id + ')" class="btn btn-xs btn-danger"><i class="fa fa-times"></i>删除</button>\n\
|
|
|
+<button type="button" onclick="TalentInfoInfoDlg.deleteFile(' + data.id + ',this)" class="btn btn-xs btn-danger"><i class="fa fa-times"></i>删除</button>\n\
|
|
|
</div></li></ul>';
|
|
|
$(".fileTable").eq(tableIndex).find("tr[data-index='" + trIndex + "']").next("tr.detail-view").find(".imgs").append(html);
|
|
|
}
|