11
This commit is contained in:
parent
c164958ad1
commit
620aa14642
@ -157,8 +157,8 @@ namespace MineTec.ProManager.GalleryAnnexDocuments
|
||||
string root = Dir.Parent.Parent.FullName;//获取当前站点路径
|
||||
|
||||
|
||||
string webRootPath = @"D:\FileStore\"; //保存文件路径--本地测试
|
||||
//string webRootPath = @"D:\ProMananger\WebApi\wwwroot"; //保存文件路径--服务器
|
||||
//string webRootPath = @"D:\FileStore\"; //保存文件路径--本地测试
|
||||
string webRootPath = @"D:\ProMananger\WebApi\wwwroot"; //保存文件路径--服务器
|
||||
string uploadPath = Path.Combine("uploads", DateTime.Now.ToString("yyyyMMdd"));//增加日期文件夹
|
||||
string dirPath = Path.Combine(webRootPath, uploadPath);
|
||||
//创建路径
|
||||
|
@ -188,8 +188,8 @@ namespace MineTec.ProManager.GalleryFiles
|
||||
string root = Dir.Parent.Parent.FullName;//获取当前站点路径
|
||||
|
||||
|
||||
string webRootPath = @"E:\FileStore\"; //保存文件路径--本地测试
|
||||
//string webRootPath = @"D:\ProMananger\WebApi\wwwroot"; //保存文件路径--服务器
|
||||
//string webRootPath = @"E:\FileStore\"; //保存文件路径--本地测试
|
||||
string webRootPath = @"D:\ProMananger\WebApi\wwwroot"; //保存文件路径--服务器
|
||||
string uploadPath = Path.Combine("uploads", DateTime.Now.ToString("yyyyMMdd"));//增加日期文件夹
|
||||
string dirPath = Path.Combine(webRootPath, uploadPath);
|
||||
//创建路径
|
||||
|
Binary file not shown.
@ -45,6 +45,7 @@
|
||||
<div class="layui-btn-container">
|
||||
<button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn" lay-event="add"> 添加 </button>
|
||||
<button class="layui-btn layui-btn-sm layui-btn-danger data-delete-btn" lay-event="delete"> 删除 </button>
|
||||
<button type="button" id="LAY-excel-download" class="layui-btn layui-btn-sm" lay-event="download"><i class="layui-icon"></i>下载模板</button>
|
||||
<button type="button" id="LAY-excel-upload" class="layui-btn layui-btn-sm"><i class="layui-icon"></i>导入</button>
|
||||
</div>
|
||||
</script>
|
||||
@ -184,6 +185,10 @@
|
||||
delGalleryFiles(data);
|
||||
return false;
|
||||
}
|
||||
else if (obj.event === 'download') { // 监听删除操作
|
||||
var url = 'http://192.168.3.112:21021/TemplateFiles/图样管理批量导入模板.xlsx';
|
||||
window.location.href = url;
|
||||
}
|
||||
});
|
||||
|
||||
//监听表格复选框选择
|
||||
@ -308,20 +313,20 @@
|
||||
excel.importExcel(files, {
|
||||
// 读取数据的同时梳理数据
|
||||
fields: {
|
||||
'number': 'A',
|
||||
'patterntype': 'B',
|
||||
'filename': 'C',
|
||||
'signaturecode': 'D',
|
||||
'subcode': 'E',
|
||||
'pictureframe': 'F',
|
||||
'remark': 'G',
|
||||
'number': 'C',
|
||||
'patterntype': 'G',
|
||||
'filename': 'J',
|
||||
'signaturecode': 'H',
|
||||
'subcode': 'I',
|
||||
'pictureframe': 'K',
|
||||
'remark': 'L',
|
||||
}
|
||||
}, function (data) {
|
||||
var dataArr = data[0].Sheet1;
|
||||
//数据校验
|
||||
if (dataArr.length > 0) {
|
||||
if (dataArr.length > 1) {
|
||||
//从1开始,避过标题
|
||||
for (let index = 1; index < dataArr.length; index++) {
|
||||
for (let index = 2; index < dataArr.length; index++) {
|
||||
if (dataArr[index].patterntype != 0 && dataArr[index].patterntype != 2 && dataArr[index].patterntype != 5 && dataArr[index].patterntype != 6 && dataArr[index].patterntype != 8) {
|
||||
//图样类型
|
||||
layer.msg("序号:" + dataArr[index].number + " 的数据,图样类型有误,请检查!");
|
||||
@ -362,7 +367,7 @@
|
||||
}
|
||||
|
||||
//校验无误,保存导入的数据
|
||||
for (let index = 1; index < dataArr.length; index++) {
|
||||
for (let index = 2; index < dataArr.length; index++) {
|
||||
var CurrUserInfo = layui.sessionData('CurrUserInfo');
|
||||
var order = '';
|
||||
$.ajax({
|
||||
|
Loading…
x
Reference in New Issue
Block a user