Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DataCenter_Core2.1_20190520
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bltdc
DataCenter_Core2.1_20190520
Commits
212c5f2a
Commit
212c5f2a
authored
Aug 18, 2021
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
0f62a7da
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
114 additions
and
1 deletion
+114
-1
PlatformOrderController.cs
...reas/DataWareHouse/Controllers/PlatformOrderController.cs
+6
-0
List.cshtml
...un.DC.Web/Areas/DataWareHouse/Views/Logistics/List.cshtml
+1
-0
FinanceAccount_OrderBilling.cshtml
...se/Views/PlatformOrder/FinanceAccount_OrderBilling.cshtml
+61
-0
OrderBillings.cshtml
...as/DataWareHouse/Views/PlatformOrder/OrderBillings.cshtml
+4
-1
ListOrderDetail.cshtml
....DC.Web/Areas/Reports/Views/Orders/ListOrderDetail.cshtml
+4
-0
BaseController.cs
Bailun.DC.Web/Base/BaseController.cs
+38
-0
No files found.
Bailun.DC.Web/Areas/DataWareHouse/Controllers/PlatformOrderController.cs
View file @
212c5f2a
...
@@ -606,6 +606,12 @@ namespace Bailun.DC.Web.Areas.DataWareHouse.Controllers
...
@@ -606,6 +606,12 @@ namespace Bailun.DC.Web.Areas.DataWareHouse.Controllers
}
}
public
JsonResult
UploadFinanceAccount
()
{
return
Json
(
""
);
}
#
endregion
#
endregion
}
}
...
...
Bailun.DC.Web/Areas/DataWareHouse/Views/Logistics/List.cshtml
View file @
212c5f2a
...
@@ -495,6 +495,7 @@
...
@@ -495,6 +495,7 @@
func: function (result) {
func: function (result) {
if (result.success) {
if (result.success) {
alert('文件上传成功,后台会自动解析文件,请稍后再查看数据解析情况!');
alert('文件上传成功,后台会自动解析文件,请稍后再查看数据解析情况!');
$('#txt_tip').html('');
}
}
else {
else {
alert(result.msg);
alert(result.msg);
...
...
Bailun.DC.Web/Areas/DataWareHouse/Views/PlatformOrder/FinanceAccount_OrderBilling.cshtml
View file @
212c5f2a
...
@@ -61,6 +61,7 @@
...
@@ -61,6 +61,7 @@
<label> </label>
<label> </label>
<button type="button" class="btn btn-primary" onclick="list();"><i class="fa fa-search"></i> 查询</button>
<button type="button" class="btn btn-primary" onclick="list();"><i class="fa fa-search"></i> 查询</button>
<button type="button" class="btn btn-success" onclick="exportxls();">导出</button>
<button type="button" class="btn btn-success" onclick="exportxls();">导出</button>
<button id="btn_uploadFlowing" type="button" class="btn btn-warning">导入流水</button>
</div>
</div>
</div>
</div>
</form>
</form>
...
@@ -126,6 +127,8 @@
...
@@ -126,6 +127,8 @@
//获取平台
//获取平台
getPlatform();
getPlatform();
})
})
initUpload();
})
})
function list() {
function list() {
...
@@ -244,5 +247,63 @@
...
@@ -244,5 +247,63 @@
})
})
}
}
function initUpload() {
uploadfile('btn_uploadFlowing',
'@Url.Content("~/DataWareHouse/PlatformOrder/UploadFileFragment")' + '?platform=' + platform + '&website=' + website + '&month=' + month,
function(result){
if(result.success)
{
alert('文件上传成功');
}
else
{
alert(result.msg);
}
});
}
function uploadfile(id,url,callback)
{
var _GUID = WebUploader.Base.guid();//一个GUID
var uploader = new WebUploader.Uploader({
// swf文件路径
swf: BASE_URL + 'Uploader.swf',
// 文件接收服务端。
server: url!=undefined?url:'@Url.Content("~/File/UploadFile")',
// 选择文件的按钮。可选。
// 内部根据当前运行是创建,可能是input元素,也可能是flash.
pick: '#'+id,
// 不压缩image, 默认如果是jpeg,文件上传前会压缩一把再上传!
resize: false,
auto: true,
timeout: 0,
accept: {
extensions: "xls,xlsx",
mimeTypes: ".xls,.xlsx"
},
chunked: false,//开始分片上传
chunkSize: 2048000,//每一片的大小
formData: {
guid: _GUID //自定义参数,待会儿解释
}
});
uploader.on('uploadSuccess', function (file, response) {
if (callback) {
callback(response);
}
});
uploader.on('uploadProgress', function (file, percentage) {
//$("#uploader .progress-bar").width(percentage * 100 + '%');
$('#txt_tip').html('正在上传文件,当前进度:' + percentage * 100 + '%');
});
uploader.on('uploadError', function (file) {
layer.msg("上传出错");
});
}
</script>
</script>
}
}
Bailun.DC.Web/Areas/DataWareHouse/Views/PlatformOrder/OrderBillings.cshtml
View file @
212c5f2a
...
@@ -371,10 +371,12 @@
...
@@ -371,10 +371,12 @@
uploadfile('btn_Upload',
uploadfile('btn_Upload',
'@Url.Content("~/DataWareHouse/PlatformOrder/UploadFileFragment")' + '?platform=' + platform + '&website=' + website + '&month=' + month,
'@Url.Content("~/DataWareHouse/PlatformOrder/UploadFileFragment")' + '?platform=' + platform + '&website=' + website + '&month=' + month,
//'http://192.168.6.251:8085/upload/UploadFileFragment',
function(result){
function(result){
if(result.success)
if(result.success)
{
{
alert('文件上传成功,后台会自动解析文件,请稍后再查看数据解析情况!');
alert('文件上传成功,后台会自动解析文件,请稍后再查看数据解析情况!');
$('#txt_tip').html('');
}
}
else
else
{
{
...
@@ -527,7 +529,8 @@
...
@@ -527,7 +529,8 @@
$.submit({
$.submit({
type:'post',
type:'post',
url: '@Url.Content("~/DataWareHouse/PlatformOrder/MergeUploadFile")',
url: '@Url.Content("~/DataWareHouse/PlatformOrder/MergeUploadFile")',
paramData: 'guid=' + _GUID + '&filename=' + file.name + '&platform=' + platform + '&website=' + website+'&month='+month,
//url: 'http://192.168.6.251:8085/upload/merge',
paramData: 'guid=' + _GUID + '&filename=' + file.name + '&platform=' + platform + '&website=' + website + '&month=' + month +'&bucket=bailun-data-center',
func: function (result) {
func: function (result) {
if (result.success) {
if (result.success) {
alert('文件上传成功,后台会自动解析文件,请稍后再查看数据解析情况!');
alert('文件上传成功,后台会自动解析文件,请稍后再查看数据解析情况!');
...
...
Bailun.DC.Web/Areas/Reports/Views/Orders/ListOrderDetail.cshtml
View file @
212c5f2a
...
@@ -198,6 +198,10 @@
...
@@ -198,6 +198,10 @@
if (result != null && result != undefined) {
if (result != null && result != undefined) {
$('#platform').html('<option value="">选择平台</option>');
$('#platform').html('<option value="">选择平台</option>');
for (var i = 0; i < result.length; i++) {
for (var i = 0; i < result.length; i++) {
if (result[i] == "shopify") {
result[i] = "Shopify";
}
$('#platform').append('<option value="' + result[i] + '">' + result[i]+'</option>');
$('#platform').append('<option value="' + result[i] + '">' + result[i]+'</option>');
}
}
...
...
Bailun.DC.Web/Base/BaseController.cs
View file @
212c5f2a
...
@@ -199,6 +199,40 @@ namespace Bailun.DC.Web.Base
...
@@ -199,6 +199,40 @@ namespace Bailun.DC.Web.Base
{
{
//uploadfiles
//uploadfiles
if
(
string
.
IsNullOrEmpty
(
guid
))
{
return
Json
(
new
{
success
=
false
,
msg
=
"guid不能为空"
}
);
}
if
(
string
.
IsNullOrEmpty
(
platform
))
{
return
Json
(
new
{
success
=
false
,
msg
=
"平台类型不能为空"
}
);
}
if
(
string
.
IsNullOrEmpty
(
month
))
{
return
Json
(
new
{
success
=
false
,
msg
=
"请填写月份"
}
);
}
var
uploadDir
=
Directory
.
GetCurrentDirectory
()
+
"\\tempUploadFile"
;
//Upload 文件夹
var
uploadDir
=
Directory
.
GetCurrentDirectory
()
+
"\\tempUploadFile"
;
//Upload 文件夹
var
dir
=
Path
.
Combine
(
uploadDir
,
guid
);
//临时保存分块的目录
var
dir
=
Path
.
Combine
(
uploadDir
,
guid
);
//临时保存分块的目录
var
files
=
System
.
IO
.
Directory
.
GetFiles
(
dir
);
//获得下面的所有文件
var
files
=
System
.
IO
.
Directory
.
GetFiles
(
dir
);
//获得下面的所有文件
...
@@ -236,6 +270,7 @@ namespace Bailun.DC.Web.Base
...
@@ -236,6 +270,7 @@ namespace Bailun.DC.Web.Base
var
result
=
_platformService
.
SaveFileData
(
uploadFile
);
var
result
=
_platformService
.
SaveFileData
(
uploadFile
);
fs
.
Close
();
fs
.
Close
();
fs
.
Dispose
();
Directory
.
Delete
(
dir
);
//删除文件夹
Directory
.
Delete
(
dir
);
//删除文件夹
...
@@ -254,6 +289,9 @@ namespace Bailun.DC.Web.Base
...
@@ -254,6 +289,9 @@ namespace Bailun.DC.Web.Base
//把七牛云返回的hash值更新到文件记录里面
//把七牛云返回的hash值更新到文件记录里面
result
+=
_platformService
.
UpdateFileData
(
uploadFile
.
id
,
uploadFile
.
hashcode
,
uploadFile
.
filekey
);
result
+=
_platformService
.
UpdateFileData
(
uploadFile
.
id
,
uploadFile
.
hashcode
,
uploadFile
.
filekey
);
fs
.
Close
();
fs
.
Dispose
();
return
Json
(
return
Json
(
new
{
new
{
success
=
string
.
IsNullOrEmpty
(
result
),
success
=
string
.
IsNullOrEmpty
(
result
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment