合同清单导入未完成
parent
2b67e65246
commit
b7cdad54f5
|
@ -144,8 +144,8 @@
|
|||
<div class="col-xs-12">
|
||||
<!-- <button type="button" class="btn btn-white btn-sm" onclick="addRow()"><i class="fa fa-plus"> 增加</i></button>-->
|
||||
<button type="button" class="btn btn-white btn-sm" onclick="sub.delRow()"><i class="fa fa-minus"> 删除</i></button>
|
||||
<button type="button" class="btn btn-white btn-sm" onclick="importList()"><i class="fa fa-download"> 导入</i></button>
|
||||
|
||||
<button type="button" class="btn btn-white btn-sm" onclick="downloadTem()"><i class="fa fa-download"> 下载模板</i></button>
|
||||
<button type="button" class="btn btn-white btn-sm" onclick="importList()"><i class="fa fa-upload"> 导入</i></button>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
|
@ -338,13 +338,27 @@
|
|||
function importList(){
|
||||
$('#uploadInput').click()
|
||||
}
|
||||
document.getElementById('uploadInput').addEventListener('change', function(event) {
|
||||
function downloadTem(){
|
||||
$.modal.loading("正在下载,请稍候...");
|
||||
$.post( prefix + "/list/export", {}, function(result) {
|
||||
if (result.code == web_status.SUCCESS) {
|
||||
window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true;
|
||||
} else if (result.code == web_status.WARNING) {
|
||||
$.modal.alertWarning(result.msg)
|
||||
} else {
|
||||
$.modal.alertError(result.msg);
|
||||
}
|
||||
$.modal.closeLoading();
|
||||
})
|
||||
|
||||
} document.getElementById('uploadInput').addEventListener('change', function(event) {
|
||||
const file = event.target.files[0];
|
||||
let data=new FormData()
|
||||
data.append('file',file)
|
||||
data.append('deliveryId',$('#bootstrap-table').attr('deliveryid'))
|
||||
data.append('orderId',$('#bootstrap-table').attr('deliveryid'))
|
||||
|
||||
var xhr = new XMLHttpRequest(); // 创建XMLHttpRequest对象
|
||||
xhr.open('POST',prefix+'/importData', true); // 设置请求类型和URL
|
||||
xhr.open('POST',prefix+'/list/importData', true); // 设置请求类型和URL
|
||||
// 当请求完成时执行的回调函数
|
||||
xhr.onload = function (res) {
|
||||
let data=JSON.parse(res.currentTarget.response)
|
||||
|
|
|
@ -138,6 +138,10 @@
|
|||
<h4 class="form-header h4">合同清单列表</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<button type="button" class="btn btn-white btn-sm" onclick="sub.delRow()"><i class="fa fa-minus"> 删除</i></button>
|
||||
<button type="button" class="btn btn-white btn-sm" onclick="downloadTem()"><i class="fa fa-download"> 下载模板</i></button>
|
||||
<button type="button" class="btn btn-white btn-sm" onclick="importList()"><i class="fa fa-upload"> 导入</i></button>
|
||||
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -107,10 +107,10 @@
|
|||
field: 'orderDate',
|
||||
title: '合同签定日期'
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '合同状态'
|
||||
},
|
||||
// {
|
||||
// field: 'status',
|
||||
// title: '合同状态'
|
||||
// },
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
|
|
Loading…
Reference in New Issue