|
|
@@ -17,6 +17,39 @@ function ConfirmImport() {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+function CheckImport(table, key, loadindex, index) {
|
|
|
+ $.ajax({
|
|
|
+ url: "/Admin/PreAmountRecord/CheckImportV2?r=" + Math.random(1),
|
|
|
+ data: "key=" + key,
|
|
|
+ dataType: "json",
|
|
|
+ success: function (data) {
|
|
|
+ if (data.status == 1) {
|
|
|
+ layer.msg("成功操作" + data.data + "条", {
|
|
|
+ time: 2000
|
|
|
+ }, function () {
|
|
|
+ layer.close(index); //关闭弹层
|
|
|
+ layer.close(loadindex);
|
|
|
+ table.reload('LAY-list-manage'); //数据刷新
|
|
|
+ });
|
|
|
+ } else if (data.status == 2) {
|
|
|
+ layer.close(index); //关闭弹层
|
|
|
+ layer.close(loadindex);
|
|
|
+ var content = '';
|
|
|
+ for (var i = 0; i < data.errList.length; i++) {
|
|
|
+ content += data.errList[i] + '<br/>'
|
|
|
+ }
|
|
|
+ layer.alert(content);
|
|
|
+ } else {
|
|
|
+ layer.msg(data.data, {
|
|
|
+ time: 1000
|
|
|
+ }, function () {
|
|
|
+ CheckImport(table, key, loadindex, index);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
var excel;
|
|
|
layui.config({
|
|
|
base: '/layuiadmin/' //静态资源所在路径
|