83 lines
2.4 KiB
Plaintext
83 lines
2.4 KiB
Plaintext
@{
|
|
ViewBag.Title = "confirmBookUploadNew";
|
|
Layout = "~/Views/Shared/_InfoLayout.cshtml";
|
|
|
|
var pageObj = new
|
|
{
|
|
Id = ViewBag.Id,
|
|
SendMailId = ViewBag.SendMailId
|
|
};
|
|
}
|
|
|
|
@section CSS{
|
|
<style>
|
|
.formlabel.col-auto {
|
|
width: 100px;
|
|
min-width: 100px;
|
|
}
|
|
</style>
|
|
}
|
|
|
|
@section JS{
|
|
<script>
|
|
var page = @Json.Serialize(pageObj);
|
|
|
|
function UploadFiles1() {
|
|
if (main.isEmpty(page.Id)) {
|
|
main.message("id没有传入");
|
|
return;
|
|
}
|
|
//alert(tradeNumber);
|
|
var encryptId = page.Id;
|
|
var files = $("#openFile")[0].files;
|
|
|
|
if (files.length <= 0) {
|
|
main.message("请选择需上传的文件");
|
|
return;
|
|
}
|
|
var description = $("#fileDescription").val();
|
|
|
|
var data = new FormData();
|
|
for (var x = 0; x < files.length; x++) {
|
|
data.append(files[x].name, files[x]);
|
|
}
|
|
data.append("contractCode", encryptId);
|
|
|
|
$.ajax({
|
|
type: "Post",
|
|
//async: false,
|
|
url: "/trade/UploadContractFileNew",
|
|
contentType: false,
|
|
processData: false,
|
|
data: data,
|
|
success: function (res) {
|
|
if (!res.success) {
|
|
main.message(res.msg);
|
|
return;
|
|
}
|
|
parent.SearchClick()
|
|
layer.closeSelf();
|
|
},
|
|
beforeSend(jqXHR) {
|
|
main.waitMe(true);
|
|
},
|
|
complete(jqXHR, textStatus) {
|
|
main.waitMe(false);
|
|
}
|
|
});
|
|
}
|
|
</script>
|
|
}
|
|
<div class="yc-panel">
|
|
<div class="form-group row">
|
|
<label class="formlabel col-auto">选择文件</label>
|
|
<div class="col"><input type="file" id="openFile" name="file" accept=".xlsx,.xls,.pdf,.docx,.doc" style="width:90%;" /></div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label class="formlabel col-auto"> </label>
|
|
<div class="col">
|
|
<a class="btn btn-primary" onclick="UploadFiles1()"> 上传 </a>
|
|
<a class="btn btn-primary" onclick="layer.closeMe()"> 取消 </a>
|
|
</div>
|
|
</div>
|
|
</div> |