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
6481d6c8
Commit
6481d6c8
authored
Dec 05, 2020
by
allan0815
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加新月销售利润报表
parent
260853d6
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1140 additions
and
0 deletions
+1140
-0
mMonthSaleProfitNew_Input.cs
Bailun.DC.Models/mMonthSaleProfitNew_Input.cs
+197
-0
FinanceReportServices.cs
Bailun.DC.Services/FinanceReportServices.cs
+360
-0
FinanceController.cs
Bailun.DC.Web/Areas/Reports/Controllers/FinanceController.cs
+335
-0
MonthSaleProfitNew.cshtml
...Web/Areas/Reports/Views/Finance/MonthSaleProfitNew.cshtml
+245
-0
Bailun.DC.Web.csproj
Bailun.DC.Web/Bailun.DC.Web.csproj
+3
-0
No files found.
Bailun.DC.Models/mMonthSaleProfitNew_Input.cs
0 → 100644
View file @
6481d6c8
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Bailun.DC.Models
{
public
class
mMonthSaleProfitNew_Input
{
/// <summary>
/// 月份
/// </summary>
public
string
month
{
get
;
set
;
}
/// <summary>
/// 总销售额
/// </summary>
public
decimal
?
amount_sales
{
get
;
set
;
}
/// <summary>
/// 销售额-精油
/// </summary>
public
decimal
?
amount_sales_jingyou
{
get
;
set
;
}
/// <summary>
/// 销售额-电子
/// </summary>
public
decimal
?
amount_sales_dianzi
{
get
;
set
;
}
/// <summary>
/// 销售额-家居产品
/// </summary>
public
decimal
?
amount_sales_jiaju
{
get
;
set
;
}
/// <summary>
/// 销售额-美容美甲产品
/// </summary>
public
decimal
?
amount_sales_meirongmj
{
get
;
set
;
}
/// <summary>
/// 销售额-服装
/// </summary>
public
decimal
?
amount_sales_fuzhuang
{
get
;
set
;
}
/// <summary>
/// 销售额-其他
/// </summary>
public
decimal
?
amount_sales_other
{
get
;
set
;
}
/// <summary>
/// 总成本
/// </summary>
public
decimal
?
cost
{
get
;
set
;
}
/// <summary>
/// 精油成本
/// </summary>
public
decimal
?
cost_jingyou
{
get
;
set
;
}
/// <summary>
/// 电子成本
/// </summary>
public
decimal
?
cost_dianzi
{
get
;
set
;
}
/// <summary>
/// 家居成本
/// </summary>
public
decimal
?
cost_jiaju
{
get
;
set
;
}
/// <summary>
/// 美容美甲产品成本
/// </summary>
public
decimal
?
cost_meirongmj
{
get
;
set
;
}
/// <summary>
/// 服装成本
/// </summary>
public
decimal
?
cost_fuzhuang
{
get
;
set
;
}
/// <summary>
/// 其他成本
/// </summary>
public
decimal
?
cost_other
{
get
;
set
;
}
/// <summary>
/// 平台扣费及退款
/// </summary>
public
decimal
?
fee_platform_and_refund
{
get
;
set
;
}
/// <summary>
/// 平台费
/// </summary>
public
decimal
?
fee_platform
{
get
;
set
;
}
/// <summary>
/// FBA费
/// </summary>
public
decimal
?
fee_fba
{
get
;
set
;
}
/// <summary>
/// 平台退款
/// </summary>
public
decimal
?
fee_refund
{
get
;
set
;
}
/// <summary>
/// 平台提现回款
/// </summary>
public
decimal
?
amount_withdraw
{
get
;
set
;
}
/// <summary>
/// 物流仓储费用
/// </summary>
public
decimal
?
fee_logistics_storage
{
get
;
set
;
}
/// <summary>
/// 头程费
/// </summary>
public
decimal
?
fee_logistics_first
{
get
;
set
;
}
/// <summary>
/// 直邮物流费
/// </summary>
public
decimal
?
fee_logistics_direct
{
get
;
set
;
}
/// <summary>
/// 海外仓仓储及其他费用
/// </summary>
public
decimal
?
fee_storage
{
get
;
set
;
}
/// <summary>
/// 付现销售费用
/// </summary>
public
decimal
?
fee_paycash_sales
{
get
;
set
;
}
/// <summary>
/// 销售费用合计
/// </summary>
public
decimal
?
fee_sales_count
{
get
;
set
;
}
/// <summary>
/// 销售利润
/// </summary>
public
decimal
?
profit_sales
{
get
;
set
;
}
/// <summary>
/// 销售毛利率
/// </summary>
public
decimal
?
rate_profit_sales
{
get
;
set
;
}
/// <summary>
/// 管理成本-香港百伦
/// </summary>
public
decimal
?
managecost_bl_xg
{
get
;
set
;
}
/// <summary>
/// 管理成本-广州百伦
/// </summary>
public
decimal
?
managecost_bl_gz
{
get
;
set
;
}
/// <summary>
/// 管理成本-美容美甲店
/// </summary>
public
decimal
?
managecost_meijia
{
get
;
set
;
}
/// <summary>
/// 管理成本-杨杉
/// </summary>
public
decimal
?
managercost_yangshan
{
get
;
set
;
}
/// <summary>
/// 管理成本-成品仓
/// </summary>
public
decimal
?
managercost_chengpincang
{
get
;
set
;
}
/// <summary>
/// 管理成本-信荟蓝
/// </summary>
public
decimal
?
managercost_xinhuilan
{
get
;
set
;
}
/// <summary>
/// 管理成本合计
/// </summary>
public
decimal
?
managercost_count
{
get
;
set
;
}
/// <summary>
/// 财务费用
/// </summary>
public
decimal
?
fee_finance
{
get
;
set
;
}
/// <summary>
/// 营业利润
/// </summary>
public
decimal
?
profit
{
get
;
set
;
}
/// <summary>
/// 营业毛利率
/// </summary>
public
decimal
?
rate_profit
{
get
;
set
;
}
/// <summary>
/// 加:其他收入
/// </summary>
public
decimal
?
incoming_other
{
get
;
set
;
}
/// <summary>
/// 加:营业外收入
/// </summary>
public
decimal
?
incoming_non_operating
{
get
;
set
;
}
/// <summary>
/// 减:营业外支出
/// </summary>
public
decimal
?
pay_non_operating
{
get
;
set
;
}
/// <summary>
/// 实际利润
/// </summary>
public
decimal
?
actual_profit
{
get
;
set
;
}
/// <summary>
/// 减:分红
/// </summary>
public
decimal
?
dividend
{
get
;
set
;
}
/// <summary>
/// 利润结余
/// </summary>
public
decimal
?
profit_balance
{
get
;
set
;
}
/// <summary>
/// 净利润率
/// </summary>
public
decimal
?
rate_profit_actual
{
get
;
set
;
}
}
}
Bailun.DC.Services/FinanceReportServices.cs
View file @
6481d6c8
...
...
@@ -5242,6 +5242,329 @@ group by currency";
}
/// <summary>
/// 更新销售利润报表
/// </summary>
/// <param name="m"></param>
/// <param name="uid"></param>
/// <param name="username"></param>
/// <returns></returns>
public
string
UpdateMonthSaleProfitNew
(
mMonthSaleProfitNew_Input
m
,
int
uid
,
string
username
)
{
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString
))
{
if
(
cn
.
State
==
ConnectionState
.
Closed
)
{
cn
.
Open
();
}
var
obj
=
cn
.
QueryFirstOrDefault
<
dc_month_sales_profit
>(
"select * from dc_month_sales_profit where isedit=1 and month='"
+
m
.
month
+
"'"
);
if
(
obj
==
null
)
{
obj
=
new
dc_month_sales_profit
{
month
=
m
.
month
,
amount_sales
=
0
,
amount_sales_dianzi
=
0
,
amount_sales_fuzhuang
=
0
,
amount_sales_jiaju
=
0
,
amount_sales_jingyou
=
0
,
amount_sales_meirongmj
=
0
,
actual_profit
=
0
,
amount_withdraw
=
0
,
fee_platform_and_refund
=
0
,
fee_fba
=
0
,
fee_finance
=
0
,
fee_logistics_direct
=
0
,
fee_logistics_first
=
0
,
fee_logistics_storage
=
0
,
fee_paycash_sales
=
0
,
fee_platform
=
0
,
fee_refund
=
0
,
fee_sales_count
=
0
,
fee_storage
=
0
,
cost_fuzhuang
=
0
,
cost
=
0
,
cost_dianzi
=
0
,
cost_jiaju
=
0
,
cost_jingyou
=
0
,
cost_meirongmj
=
0
,
createtime
=
DateTime
.
Now
,
managercost_chengpincang
=
0
,
managercost_count
=
0
,
managecost_bl_gz
=
0
,
managecost_bl_xg
=
0
,
managecost_meijia
=
0
,
managercost_yangshan
=
0
,
dividend
=
0
,
incoming_non_operating
=
0
,
incoming_other
=
0
,
isedit
=
1
,
lastupdatetime
=
DateTime
.
Now
,
lastupdateuserid
=
uid
,
lastupdateusername
=
username
,
profit_sales
=
0
,
pay_non_operating
=
0
,
rate_profit_sales
=
0
,
profit
=
0
,
profit_balance
=
0
,
rate_profit
=
0
,
rate_profit_actual
=
0
,
amount_sales_other
=
0
,
cost_other
=
0
,
managercost_xinhuilan
=
0
,
};
}
#
region
赋值
if
(
m
.
amount_sales
.
HasValue
)
{
obj
.
amount_sales
=
m
.
amount_sales
.
Value
;
}
if
(
m
.
amount_sales_jingyou
.
HasValue
)
{
obj
.
amount_sales_jingyou
=
m
.
amount_sales_jingyou
.
Value
;
}
if
(
m
.
amount_sales_dianzi
.
HasValue
)
{
obj
.
amount_sales_dianzi
=
m
.
amount_sales_dianzi
.
Value
;
}
if
(
m
.
amount_sales_jiaju
.
HasValue
)
{
obj
.
amount_sales_jiaju
=
m
.
amount_sales_jiaju
.
Value
;
}
if
(
m
.
amount_sales_meirongmj
.
HasValue
)
{
obj
.
amount_sales_meirongmj
=
m
.
amount_sales_meirongmj
.
Value
;
}
if
(
m
.
amount_sales_fuzhuang
.
HasValue
)
{
obj
.
amount_sales_fuzhuang
=
m
.
amount_sales_fuzhuang
.
Value
;
}
if
(
m
.
amount_sales_other
.
HasValue
)
{
obj
.
amount_sales_other
=
m
.
amount_sales_other
.
Value
;
}
if
(
m
.
cost
.
HasValue
)
{
obj
.
cost
=
m
.
cost
.
Value
;
}
if
(
m
.
cost_jingyou
.
HasValue
)
{
obj
.
cost_jingyou
=
m
.
cost_jingyou
.
Value
;
}
if
(
m
.
cost_dianzi
.
HasValue
)
{
obj
.
cost_dianzi
=
m
.
cost_dianzi
.
Value
;
}
if
(
m
.
cost_jiaju
.
HasValue
)
{
obj
.
cost_jiaju
=
m
.
cost_jiaju
.
Value
;
}
if
(
m
.
cost_meirongmj
.
HasValue
)
{
obj
.
cost_meirongmj
=
m
.
cost_meirongmj
.
Value
;
}
if
(
m
.
cost_fuzhuang
.
HasValue
)
{
obj
.
cost_fuzhuang
=
m
.
cost_fuzhuang
.
Value
;
}
if
(
m
.
cost_other
.
HasValue
)
{
obj
.
cost_other
=
m
.
cost_other
.
Value
;
}
if
(
m
.
fee_fba
.
HasValue
)
{
obj
.
fee_fba
=
m
.
fee_fba
.
Value
;
}
if
(
m
.
fee_finance
.
HasValue
)
{
obj
.
fee_finance
=
m
.
fee_finance
.
Value
;
}
if
(
m
.
fee_logistics_direct
.
HasValue
)
{
obj
.
fee_logistics_direct
=
m
.
fee_logistics_direct
.
Value
;
}
if
(
m
.
fee_logistics_first
.
HasValue
)
{
obj
.
fee_logistics_first
=
m
.
fee_logistics_first
.
Value
;
}
if
(
m
.
fee_logistics_storage
.
HasValue
)
{
obj
.
fee_logistics_storage
=
m
.
fee_logistics_storage
.
Value
;
}
if
(
m
.
fee_paycash_sales
.
HasValue
)
{
obj
.
fee_paycash_sales
=
m
.
fee_paycash_sales
.
Value
;
}
if
(
m
.
fee_platform
.
HasValue
)
{
obj
.
fee_platform
=
m
.
fee_platform
.
Value
;
}
if
(
m
.
fee_platform_and_refund
.
HasValue
)
{
obj
.
fee_platform_and_refund
=
m
.
fee_platform_and_refund
.
Value
;
}
if
(
m
.
fee_refund
.
HasValue
)
{
obj
.
fee_refund
=
m
.
fee_refund
.
Value
;
}
if
(
m
.
fee_sales_count
.
HasValue
)
{
obj
.
fee_sales_count
=
m
.
fee_sales_count
.
Value
;
}
if
(
m
.
fee_storage
.
HasValue
)
{
obj
.
fee_storage
=
m
.
fee_storage
.
Value
;
}
if
(
m
.
incoming_non_operating
.
HasValue
)
{
obj
.
incoming_non_operating
=
m
.
incoming_non_operating
.
Value
;
}
if
(
m
.
incoming_other
.
HasValue
)
{
obj
.
incoming_other
=
m
.
incoming_other
.
Value
;
}
if
(
m
.
managecost_bl_gz
.
HasValue
)
{
obj
.
managecost_bl_gz
=
m
.
managecost_bl_gz
.
Value
;
}
if
(
m
.
managecost_bl_xg
.
HasValue
)
{
obj
.
managecost_bl_xg
=
m
.
managecost_bl_xg
.
Value
;
}
if
(
m
.
managecost_meijia
.
HasValue
)
{
obj
.
managecost_meijia
=
m
.
managecost_meijia
.
Value
;
}
if
(
m
.
managercost_chengpincang
.
HasValue
)
{
obj
.
managercost_chengpincang
=
m
.
managercost_chengpincang
.
Value
;
}
if
(
m
.
managercost_count
.
HasValue
)
{
obj
.
managercost_count
=
m
.
managercost_count
.
Value
;
}
if
(
m
.
managercost_xinhuilan
.
HasValue
)
{
obj
.
managercost_xinhuilan
=
m
.
managercost_xinhuilan
.
Value
;
}
if
(
m
.
managercost_yangshan
.
HasValue
)
{
obj
.
managercost_yangshan
=
m
.
managercost_yangshan
.
Value
;
}
if
(
m
.
pay_non_operating
.
HasValue
)
{
obj
.
pay_non_operating
=
m
.
pay_non_operating
.
Value
;
}
if
(
m
.
profit
.
HasValue
)
{
obj
.
profit
=
m
.
profit
.
Value
;
}
if
(
m
.
profit_balance
.
HasValue
)
{
obj
.
profit_balance
=
m
.
profit_balance
.
Value
;
}
//销售额=家居用品类+服装类+电子产品类+精油类+美容美甲类+其他
obj
.
amount_sales
=
obj
.
amount_sales_dianzi
+
obj
.
amount_sales_fuzhuang
+
obj
.
amount_sales_jiaju
+
obj
.
amount_sales_jingyou
+
obj
.
amount_sales_meirongmj
+
obj
.
amount_sales_other
;
//产品成本=家居用品类+服装类+电子产品类+精油类+美容美甲类+其他类型成本
obj
.
cost
=
obj
.
cost_dianzi
+
obj
.
cost_fuzhuang
+
obj
.
cost_jiaju
+
obj
.
cost_jingyou
+
obj
.
cost_meirongmj
+
obj
.
cost_other
;
//平台扣费及退款
obj
.
fee_platform_and_refund
=
obj
.
fee_platform
+
obj
.
fee_fba
+
obj
.
fee_refund
;
//物流仓储费用 = 头程运输+直邮物流费+海外仓仓储及其他费用
obj
.
fee_logistics_storage
=
obj
.
fee_logistics_first
+
obj
.
fee_logistics_direct
+
obj
.
fee_storage
;
//销售费用合计=平台扣费及退款+物流仓储费用+付现销售费用
obj
.
fee_sales_count
=
obj
.
fee_platform_and_refund
+
obj
.
fee_logistics_storage
+
obj
.
fee_paycash_sales
;
//销售利润=销售额-产品成本-销售费用合计
obj
.
profit_sales
=
obj
.
amount_sales
-
obj
.
cost
-
obj
.
fee_sales_count
;
//销售毛利率=销售利润/销售额
obj
.
rate_profit_sales
=
obj
.
amount_sales
>
0
?
obj
.
profit_sales
/
obj
.
amount_sales
:
0
;
//管理成本=香港百伦+广州百伦+美容美甲店+杨杉+信荟蓝+成品仓
obj
.
managercost_count
=
obj
.
managecost_bl_gz
+
obj
.
managecost_bl_xg
+
obj
.
managecost_meijia
+
obj
.
managercost_chengpincang
+
obj
.
managercost_xinhuilan
+
obj
.
managercost_yangshan
;
//营业利润=销售利润-管理成本合计-财务费用
obj
.
profit
=
obj
.
profit_sales
-
obj
.
managercost_count
-
obj
.
fee_finance
;
//营业毛利率=营业利润/销售额
obj
.
rate_profit
=
obj
.
amount_sales
>
0
?
obj
.
profit
/
obj
.
amount_sales
:
0
;
//实际利润=营业利润+其他收入+营业外收入-营业外支出
obj
.
actual_profit
=
obj
.
profit
+
obj
.
incoming_other
+
obj
.
incoming_non_operating
-
obj
.
pay_non_operating
;
//利润结余=实际利润-分红
obj
.
profit_balance
=
obj
.
actual_profit
-
obj
.
dividend
;
//净利率 = 利润结余/销售额
obj
.
rate_profit_actual
=
obj
.
amount_sales
>
0
?
obj
.
profit_balance
/
obj
.
amount_sales
:
0
;
#
endregion
if
(
obj
.
id
>
0
)
{
var
result
=
cn
.
Update
<
dc_month_sales_profit
>(
obj
);
return
result
>
0
?
""
:
"更新失败,请重试"
;
}
else
{
var
result
=
cn
.
Insert
<
dc_month_sales_profit
>(
obj
);
return
(
result
??
0
)
>
0
?
""
:
"编辑失败"
;
}
}
}
/// <summary>
/// 月度利润报表 数据说明
/// </summary>
/// <param name="start">开始月份</param>
...
...
@@ -5765,6 +6088,43 @@ group by currency";
#
endregion
#
region
新月度利润报表
/// <summary>
/// 月度利润报表
/// </summary>
/// <param name="start">开始月份</param>
/// <param name="end">结束月份</param>
/// <returns></returns>
public
List
<
dc_month_sales_profit
>
ListMonthSaleProfitNew
(
string
start
,
string
end
)
{
var
sql
=
$"select * from dc_month_sales_profit where month>='
{
start
}
' "
;
if
(!
string
.
IsNullOrEmpty
(
end
))
{
sql
+=
(
" and month<='"
+
end
+
"'"
);
}
sql
+=
" order by month desc limit 6"
;
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString_read
))
{
if
(
cn
.
State
==
ConnectionState
.
Closed
)
{
if
(
cn
.
State
==
ConnectionState
.
Closed
)
{
cn
.
Open
();
}
}
var
obj
=
cn
.
Query
<
dc_month_sales_profit
>(
sql
,
null
,
null
,
true
,
2
*
60
);
return
obj
.
ToList
();
}
}
#
endregion
#
region
应收账款
/// <summary>
...
...
Bailun.DC.Web/Areas/Reports/Controllers/FinanceController.cs
View file @
6481d6c8
...
...
@@ -8228,6 +8228,341 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
});
}
#
region
新表
public
ActionResult
MonthSaleProfitNew
()
{
return
View
();
}
/// <summary>
/// 月度销售利润统计
/// </summary>
/// <param name="start">开始月份</param>
/// <param name="end">结束月份</param>
/// <returns></returns>
[
HttpPost
]
[
BrowseLog
(
"Bailun_data"
,
"访问【百伦数据中心】->【财务报表】->【月度新销售利润统计】->【查询】页面"
,
0
)]
public
JsonResult
ListMonthSaleProfitNew
(
string
month
)
{
var
_service
=
new
Services
.
FinanceReportServices
();
try
{
var
obj
=
_service
.
ListMonthSaleProfitNew
(
month
,
""
);
//var objDescription = _service.ListMonthSaleProfitDescription(month, "");
var
list
=
obj
.
Select
(
a
=>
new
{
amount_sales
=
a
.
amount_sales
.
ToString
(
"N2"
),
amount_sales_dianzi
=
a
.
amount_sales_dianzi
.
ToString
(
"N2"
),
amount_sales_fuzhuang
=
a
.
amount_sales_fuzhuang
.
ToString
(
"N2"
),
amount_sales_jiaju
=
a
.
amount_sales_jiaju
.
ToString
(
"N2"
),
amount_sales_jingyou
=
a
.
amount_sales_jingyou
.
ToString
(
"N2"
),
amount_sales_meirongmj
=
a
.
amount_sales_meirongmj
.
ToString
(
"N2"
),
amount_sales_other
=
a
.
amount_sales_other
.
ToString
(
"N2"
),
amount_withdraw
=
a
.
amount_withdraw
.
ToString
(
"N2"
),
cost
=
a
.
cost
.
ToString
(
"N2"
),
cost_dianzi
=
a
.
cost_dianzi
.
ToString
(
"N2"
),
cost_fuzhuang
=
a
.
cost_fuzhuang
.
ToString
(
"N2"
),
cost_jiaju
=
a
.
cost_jiaju
.
ToString
(
"N2"
),
cost_jingyou
=
a
.
cost_jingyou
.
ToString
(
"N2"
),
cost_meirongmj
=
a
.
cost_meirongmj
.
ToString
(
"N2"
),
cost_other
=
a
.
cost_other
.
ToString
(
"N2"
),
fee_fba
=
a
.
fee_fba
.
ToString
(
"N2"
),
fee_finance
=
a
.
fee_finance
.
ToString
(
"N2"
),
fee_logistics_direct
=
a
.
fee_logistics_direct
.
ToString
(
"N2"
),
fee_logistics_first
=
a
.
fee_logistics_first
.
ToString
(
"N2"
),
fee_logistics_storage
=
a
.
fee_logistics_storage
.
ToString
(
"N2"
),
fee_paycash_sales
=
a
.
fee_paycash_sales
.
ToString
(
"N2"
),
fee_platform
=
a
.
fee_platform
.
ToString
(
"N2"
),
fee_platform_and_refund
=
a
.
fee_platform_and_refund
.
ToString
(
"N2"
),
fee_refund
=
a
.
fee_refund
.
ToString
(
"N2"
),
fee_sales_count
=
a
.
fee_sales_count
.
ToString
(
"N2"
),
fee_storage
=
a
.
fee_storage
.
ToString
(
"N2"
),
incoming_non_operating
=
a
.
incoming_non_operating
.
ToString
(
"N2"
),
incoming_other
=
a
.
incoming_other
.
ToString
(
"N2"
),
a
.
isedit
,
managecost_bl_gz
=
a
.
managecost_bl_gz
.
ToString
(
"N2"
),
managecost_bl_xg
=
a
.
managecost_bl_xg
.
ToString
(
"N2"
),
managecost_meijia
=
a
.
managecost_meijia
.
ToString
(
"N2"
),
managercost_chengpincang
=
a
.
managercost_chengpincang
.
ToString
(
"N2"
),
managercost_count
=
a
.
managercost_count
.
ToString
(
"N2"
),
managercost_xinhuilan
=
a
.
managercost_xinhuilan
.
ToString
(
"N2"
),
managercost_yangshan
=
a
.
managercost_yangshan
.
ToString
(
"N2"
),
pay_non_operating
=
a
.
pay_non_operating
.
ToString
(
"N2"
),
profit
=
a
.
profit
.
ToString
(
"N2"
),
profit_balance
=
a
.
profit_balance
.
ToString
(
"N2"
),
profit_sales
=
a
.
profit_sales
.
ToString
(
"N2"
),
rate_profit
=
(
a
.
rate_profit
*
100
).
ToString
(
"N2"
),
rate_profit_actual
=
(
a
.
rate_profit_actual
*
100
).
ToString
(
"N2"
),
rate_profit_sales
=
(
a
.
rate_profit_sales
*
100
).
ToString
(
"N2"
),
actual_profit
=
a
.
actual_profit
.
ToString
(
"N2"
),
dividend
=
a
.
dividend
.
ToString
(
"N2"
),
a
.
month
});
var
listHead
=
new
List
<
Tuple
<
string
,
string
,
int
>>();
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"销售额"
,
"amount_sales"
,
1
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"精油产品"
,
"amount_sales_jingyou"
,
0
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"电子产品"
,
"amount_sales_dianzi"
,
0
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"家居产品"
,
"amount_sales_jiaju"
,
0
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"美容美甲产品"
,
"amount_sales_meirongmj"
,
0
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"服装"
,
"amount_sales_fuzhuang"
,
0
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"其他"
,
"amount_sales_other"
,
0
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"成本"
,
"cost"
,
1
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"精油产品"
,
"cost_jingyou"
,
0
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"电子产品"
,
"cost_dianzi"
,
0
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"家居产品"
,
"cost_jiaju"
,
0
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"美容美甲产品"
,
"cost_meirongmj"
,
0
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"服装"
,
"cost_fuzhuang"
,
0
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"其他"
,
"cost_other"
,
0
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"平台扣费及退款"
,
"fee_platform_and_refund"
,
1
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"平台费"
,
"fee_platform"
,
0
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"FBA费"
,
"fee_fba"
,
0
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"平台退款"
,
"fee_refund"
,
0
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"平台提现回款"
,
"amount_withdraw"
,
0
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"物流仓储费用"
,
"fee_logistics_storage"
,
1
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"头程运输"
,
"fee_logistics_first"
,
0
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"直邮物流费"
,
"fee_logistics_direct"
,
0
));
//listHead.Add(new Tuple<string, string, int>("尾程物流费", "", 0));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"海外仓仓储费"
,
"fee_storage"
,
0
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"付现销售费用"
,
"fee_paycash_sales"
,
0
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"销售费用合计"
,
"fee_sales_count"
,
1
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"销售利润"
,
"profit_sales"
,
0
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"销售毛利率"
,
"rate_profit_sales"
,
0
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"管理成本合计"
,
"managercost_count"
,
1
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"香港百伦"
,
"managecost_bl_xg"
,
0
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"广州百伦"
,
"managecost_bl_gz"
,
0
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"美容美甲店"
,
"managecost_meijia"
,
0
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"杨杉"
,
"managercost_yangshan"
,
0
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"信荟蓝"
,
"managercost_xinhuilan"
,
0
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"成品仓"
,
"managercost_chengpincang"
,
0
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"财务费用"
,
"fee_finance"
,
1
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"营业利润"
,
"profit"
,
1
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"营业毛利率"
,
"rate_profit"
,
0
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"加:其他收入"
,
"incoming_other"
,
0
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"加:营业外收入"
,
"incoming_non_operating"
,
0
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"减:营业外支出"
,
"pay_non_operating"
,
0
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"实际利润"
,
"actual_profit"
,
0
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"减:分红"
,
"dividend"
,
0
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"利润结余"
,
"profit_balance"
,
0
));
listHead
.
Add
(
new
Tuple
<
string
,
string
,
int
>(
"净利率"
,
"rate_profit_actual"
,
1
));
var
listCount
=
new
List
<
dc_month_sales_profit
>();
var
listMonth
=
obj
.
GroupBy
(
a
=>
a
.
month
);
foreach
(
var
item
in
listMonth
)
{
var
m
=
new
dc_month_sales_profit
();
m
.
amount_sales
=
item
?.
Sum
(
a
=>
a
.
amount_sales
)??
0
;
m
.
amount_sales_dianzi
=
item
?.
Sum
(
a
=>
a
.
amount_sales_dianzi
)
??
0
;
m
.
amount_sales_fuzhuang
=
item
.
Sum
(
a
=>
a
.
amount_sales_fuzhuang
);
m
.
amount_sales_jiaju
=
item
.
Sum
(
a
=>
a
.
amount_sales_jiaju
);
m
.
amount_sales_jingyou
=
item
.
Sum
(
a
=>
a
.
amount_sales_jingyou
);
m
.
amount_sales_meirongmj
=
item
.
Sum
(
a
=>
a
.
amount_sales_meirongmj
);
m
.
amount_sales_other
=
item
.
Sum
(
a
=>
a
.
amount_sales_other
);
m
.
amount_withdraw
=
item
.
Sum
(
a
=>
a
.
amount_withdraw
);
m
.
cost
=
item
.
Sum
(
a
=>
a
.
cost
);
m
.
cost_dianzi
=
item
.
Sum
(
a
=>
a
.
cost_dianzi
);
m
.
cost_fuzhuang
=
item
.
Sum
(
a
=>
a
.
cost_fuzhuang
);
m
.
cost_jiaju
=
item
.
Sum
(
a
=>
a
.
cost_jiaju
);
m
.
cost_jingyou
=
item
.
Sum
(
a
=>
a
.
cost_jingyou
);
m
.
cost_meirongmj
=
item
.
Sum
(
a
=>
a
.
cost_meirongmj
);
m
.
cost_other
=
item
.
Sum
(
a
=>
a
.
cost_other
);
m
.
dividend
=
item
.
Sum
(
a
=>
a
.
dividend
);
m
.
fee_fba
=
item
.
Sum
(
a
=>
a
.
fee_fba
);
m
.
fee_finance
=
item
.
Sum
(
a
=>
a
.
fee_finance
);
m
.
fee_logistics_direct
=
item
.
Sum
(
a
=>
a
.
fee_logistics_direct
);
m
.
fee_logistics_first
=
item
.
Sum
(
a
=>
a
.
fee_logistics_first
);
m
.
fee_logistics_storage
=
item
.
Sum
(
a
=>
a
.
fee_logistics_storage
);
m
.
fee_paycash_sales
=
item
.
Sum
(
a
=>
a
.
fee_paycash_sales
);
m
.
fee_platform
=
item
.
Sum
(
a
=>
a
.
fee_platform
);
m
.
fee_platform_and_refund
=
item
.
Sum
(
a
=>
a
.
fee_platform_and_refund
);
m
.
fee_refund
=
item
.
Sum
(
a
=>
a
.
fee_refund
);
m
.
fee_sales_count
=
item
.
Sum
(
a
=>
a
.
fee_sales_count
);
m
.
fee_storage
=
item
.
Sum
(
a
=>
a
.
fee_storage
);
m
.
incoming_non_operating
=
item
.
Sum
(
a
=>
a
.
incoming_non_operating
);
m
.
incoming_other
=
item
.
Sum
(
a
=>
a
.
incoming_other
);
m
.
isedit
=
2
;
//合并的
m
.
managecost_bl_gz
=
item
.
Sum
(
a
=>
a
.
managecost_bl_gz
);
m
.
managecost_bl_xg
=
item
.
Sum
(
a
=>
a
.
managecost_bl_xg
);
m
.
managecost_meijia
=
item
.
Sum
(
a
=>
a
.
managecost_meijia
);
m
.
managercost_chengpincang
=
item
.
Sum
(
a
=>
a
.
managercost_chengpincang
);
m
.
managercost_count
=
item
.
Sum
(
a
=>
a
.
managercost_count
);
m
.
managercost_xinhuilan
=
item
.
Sum
(
a
=>
a
.
managercost_xinhuilan
);
m
.
managercost_yangshan
=
item
.
Sum
(
a
=>
a
.
managercost_yangshan
);
m
.
month
=
item
.
Key
;
m
.
pay_non_operating
=
item
.
Sum
(
a
=>
a
.
pay_non_operating
);
//销售额=家居用品类+服装类+电子产品类+精油类+美容美甲类+其他
m
.
amount_sales
=
m
.
amount_sales_dianzi
+
m
.
amount_sales_fuzhuang
+
m
.
amount_sales_jiaju
+
m
.
amount_sales_jingyou
+
m
.
amount_sales_meirongmj
+
m
.
amount_sales_other
;
//产品成本=家居用品类+服装类+电子产品类+精油类+美容美甲类+其他类型成本
m
.
cost
=
m
.
cost_dianzi
+
m
.
cost_fuzhuang
+
m
.
cost_jiaju
+
m
.
cost_jingyou
+
m
.
cost_meirongmj
+
m
.
cost_other
;
//平台扣费及退款
m
.
fee_platform_and_refund
=
m
.
fee_platform
+
m
.
fee_fba
+
m
.
fee_refund
;
//物流仓储费用 = 头程运输+直邮物流费+海外仓仓储及其他费用
m
.
fee_logistics_storage
=
m
.
fee_logistics_first
+
m
.
fee_logistics_direct
+
m
.
fee_storage
;
//销售费用合计=平台扣费及退款+物流仓储费用+付现销售费用
m
.
fee_sales_count
=
m
.
fee_platform_and_refund
+
m
.
fee_logistics_storage
+
m
.
fee_paycash_sales
;
//销售利润=销售额-产品成本-销售费用合计
m
.
profit_sales
=
m
.
amount_sales
-
m
.
cost
-
m
.
fee_sales_count
;
//销售毛利率=销售利润/销售额
m
.
rate_profit_sales
=
m
.
amount_sales
>
0
?
m
.
profit_sales
/
m
.
amount_sales
:
0
;
//管理成本=香港百伦+广州百伦+美容美甲店+杨杉+信荟蓝+成品仓
m
.
managercost_count
=
m
.
managecost_bl_gz
+
m
.
managecost_bl_xg
+
m
.
managecost_meijia
+
m
.
managercost_chengpincang
+
m
.
managercost_xinhuilan
+
m
.
managercost_yangshan
;
//营业利润=销售利润-管理成本合计-财务费用
m
.
profit
=
m
.
profit_sales
-
m
.
managercost_count
-
m
.
fee_finance
;
//营业毛利率=营业利润/销售额
m
.
rate_profit
=
m
.
amount_sales
>
0
?
m
.
profit
/
m
.
amount_sales
:
0
;
//实际利润=营业利润+其他收入+营业外收入-营业外支出
m
.
actual_profit
=
m
.
profit
+
m
.
incoming_other
+
m
.
incoming_non_operating
-
m
.
pay_non_operating
;
//利润结余=实际利润-分红
m
.
profit_balance
=
m
.
actual_profit
-
m
.
dividend
;
//净利率 = 利润结余/销售额
m
.
rate_profit_actual
=
m
.
amount_sales
>
0
?
m
.
profit_balance
/
m
.
amount_sales
:
0
;
listCount
.
Add
(
m
);
}
var
objCount
=
listCount
.
Select
(
a
=>
new
{
amount_sales
=
a
.
amount_sales
.
ToString
(
"N2"
),
amount_sales_dianzi
=
a
.
amount_sales_dianzi
.
ToString
(
"N2"
),
amount_sales_fuzhuang
=
a
.
amount_sales_fuzhuang
.
ToString
(
"N2"
),
amount_sales_jiaju
=
a
.
amount_sales_jiaju
.
ToString
(
"N2"
),
amount_sales_jingyou
=
a
.
amount_sales_jingyou
.
ToString
(
"N2"
),
amount_sales_meirongmj
=
a
.
amount_sales_meirongmj
.
ToString
(
"N2"
),
amount_sales_other
=
a
.
amount_sales_other
.
ToString
(
"N2"
),
amount_withdraw
=
a
.
amount_withdraw
.
ToString
(
"N2"
),
cost
=
a
.
cost
.
ToString
(
"N2"
),
cost_dianzi
=
a
.
cost_dianzi
.
ToString
(
"N2"
),
cost_fuzhuang
=
a
.
cost_fuzhuang
.
ToString
(
"N2"
),
cost_jiaju
=
a
.
cost_jiaju
.
ToString
(
"N2"
),
cost_jingyou
=
a
.
cost_jingyou
.
ToString
(
"N2"
),
cost_meirongmj
=
a
.
cost_meirongmj
.
ToString
(
"N2"
),
cost_other
=
a
.
cost_other
.
ToString
(
"N2"
),
fee_fba
=
a
.
fee_fba
.
ToString
(
"N2"
),
fee_finance
=
a
.
fee_finance
.
ToString
(
"N2"
),
fee_logistics_direct
=
a
.
fee_logistics_direct
.
ToString
(
"N2"
),
fee_logistics_first
=
a
.
fee_logistics_first
.
ToString
(
"N2"
),
fee_logistics_storage
=
a
.
fee_logistics_storage
.
ToString
(
"N2"
),
fee_paycash_sales
=
a
.
fee_paycash_sales
.
ToString
(
"N2"
),
fee_platform
=
a
.
fee_platform
.
ToString
(
"N2"
),
fee_platform_and_refund
=
a
.
fee_platform_and_refund
.
ToString
(
"N2"
),
fee_refund
=
a
.
fee_refund
.
ToString
(
"N2"
),
fee_sales_count
=
a
.
fee_sales_count
.
ToString
(
"N2"
),
fee_storage
=
a
.
fee_storage
.
ToString
(
"N2"
),
incoming_non_operating
=
a
.
incoming_non_operating
.
ToString
(
"N2"
),
incoming_other
=
a
.
incoming_other
.
ToString
(
"N2"
),
a
.
isedit
,
managecost_bl_gz
=
a
.
managecost_bl_gz
.
ToString
(
"N2"
),
managecost_bl_xg
=
a
.
managecost_bl_xg
.
ToString
(
"N2"
),
managecost_meijia
=
a
.
managecost_meijia
.
ToString
(
"N2"
),
managercost_chengpincang
=
a
.
managercost_chengpincang
.
ToString
(
"N2"
),
managercost_count
=
a
.
managercost_count
.
ToString
(
"N2"
),
managercost_xinhuilan
=
a
.
managercost_xinhuilan
.
ToString
(
"N2"
),
managercost_yangshan
=
a
.
managercost_yangshan
.
ToString
(
"N2"
),
pay_non_operating
=
a
.
pay_non_operating
.
ToString
(
"N2"
),
profit
=
a
.
profit
.
ToString
(
"N2"
),
profit_balance
=
a
.
profit_balance
.
ToString
(
"N2"
),
profit_sales
=
a
.
profit_sales
.
ToString
(
"N2"
),
rate_profit
=
(
a
.
rate_profit
*
100
).
ToString
(
"N2"
),
rate_profit_actual
=
(
a
.
rate_profit_actual
*
100
).
ToString
(
"N2"
),
rate_profit_sales
=
(
a
.
rate_profit_sales
*
100
).
ToString
(
"N2"
),
actual_profit
=
a
.
actual_profit
.
ToString
(
"N2"
),
dividend
=
a
.
dividend
.
ToString
(
"N2"
),
a
.
month
});
return
Json
(
new
{
success
=
true
,
msg
=
""
,
data
=
list
.
Where
(
a
=>
a
.
isedit
==
0
).
ToList
(),
listEdit
=
list
.
Where
(
a
=>
a
.
isedit
==
1
).
ToList
(),
head
=
listHead
,
listCount
=
objCount
});
}
catch
(
Exception
ex
)
{
return
Json
(
new
{
success
=
false
,
msg
=
"出现异常,异常信息:"
+
ex
.
Message
});
}
}
/// <summary>
/// 更新编辑项
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
JsonResult
SaveMonthSaleProfitNew
(
mMonthSaleProfitNew_Input
m
)
{
var
user
=
HttpContextHelper
.
Current
?.
User
;
var
_service
=
new
Services
.
FinanceReportServices
();
var
result
=
_service
.
UpdateMonthSaleProfitNew
(
m
,
user
!=
null
?
user
.
GetUid
()
:
0
,
user
!=
null
?
user
.
GetUserName
()
:
""
);
return
Json
(
new
{
success
=
string
.
IsNullOrEmpty
(
result
),
msg
=
result
});
}
#
endregion
#
endregion
#
region
平台应收账款
...
...
Bailun.DC.Web/Areas/Reports/Views/Finance/MonthSaleProfitNew.cshtml
0 → 100644
View file @
6481d6c8
@{
ViewData["Title"] = "月度销售利润报表";
Layout = "~/Pages/Shared/_MainLayout.cshtml";
ViewBag.Nav = new string[] { "财务报表", "月度销售利润报表" };
}
<div class="row">
<div class="col-sm-12">
<div class="alert alert-warning" style="display:none;">
说明:数据从2019年9月份开始
</div>
<div class="ibox-content m-b-sm border-bottom">
<form id="toolbar">
<div class="form-inline" style="line-height:40px;">
<div class="form-group">
<label>请选择开始月份</label>
<input id="month" name="month" class="form-control" style="width:130px;" placeholder="年.月" value="@(DateTime.Now.AddMonths(-1).ToString("yyyy-MM"))" />
</div>
<div class="form-group">
<label> </label>
<button type="button" class="btn btn-primary" onclick="list();"><i class="fa fa-search"></i> 查询</button>
@*<button type="button" class="btn btn-danger" onclick="exportxls();">导出</button>*@
</div>
</div>
</form>
</div>
<div class="ibox-content m-b-sm border-bottom">
<h2 style="text-align:center;">月份销售利润表</h2>
<div class="bootstrap-table">
<div class="fixed-table-container">
<div class="fixed-table-body">
<table id="tb" style="table-layout: fixed;" class="table table-border table-bordered table-hover table-bg table-sort form-inline">
<thead>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
@section css{
<style>
a {margin-left:10px;}
</style>
}
@section scripts{
<script src="~/css/Layer-2.1/extend/layer.ext.js"></script>
<script type="text/javascript">
$(document).ready(function () {
laydate.render({ elem: '#month', type: 'month' });
list();
})
function list() {
$.submit({
url: '@Url.Content("~/Reports/Finance/ListMonthSaleProfitNew")',
type: 'POST',
paramData: $("#toolbar").serialize(),
func: function (result) {
if (result.success) {
$('#tb').find('thead').html('');
$('#tb').find('tbody').html('');
if (result.data.length > 0) {
var s = '';
var m = '<tr><th style="height:40px;text-align: center;line-height: 40px;" rowspan="2">项目</th>';
var m2 = '<tr>';
for (var i in result.data) {
m += ('<th style="height:40px;text-align: center;line-height: 40px;" colspan="3">' + result.data[i]['month'] + '月份</th>');
m2 += '<td>基础数据</td><td>调整数据</td><td>合计数据</td>';
}
m2 += '</tr>';
m += '</tr>';
$('#tb').find('thead').html(m + m2);
//组装行
var rows = '';
for (var i in result.head) {
var col = result.head[i];
var row = col.item3 == 0 ? '<tr><td>' + col.item1 + '</td>':'<tr><td style="font-weight:bold;">' + col.item1 + '</td>';
for (var d in result.data) {
var objData = result.data[d];
var count = 0;
for (var a in objData) {
if (a == col.item2) {
row += '<td>' + objData[a] + '</td>';
count = parseFloat(objData[a].replace(/,/g, ''));
continue;
}
}
//查看是否有编辑对象
var objEdit = undefined;
for (var e in result.listEdit) {
if (objData.month == result.listEdit[e].month) {
objEdit = result.listEdit[e];
continue;
}
}
if (objEdit != undefined) {
for (var a in objEdit) {
if (a == col.item2) {
row += '<td>' + objEdit[a] + (col.item3==1?"":('<a href="javascript:;" onclick="EditFee(\''+col.item1+'\',\'' + col.item2 + '\',' + objEdit[a] + ',\'' + objData.month + '\')">编辑</a>'))+'</td>';
count += parseFloat(objEdit[a].replace(/,/g, ''));
continue;
}
}
}
else {
row += '<td>0' + (col.item3 == 1 ? "" :'<a href="javascript:;" onclick="EditFee(\'' + col.item1 +'\',\'' + col.item2 + '\',0,\'' + objData.month + '\')">编辑</a>')+'</td>';
}
//合计
var objCount = undefined;
for (var e in result.listCount) {
if (objData.month == result.listCount[e].month) {
objCount = result.listCount[e];
continue;
}
}
if (objCount != undefined) {
for (var a in objCount) {
if (a == col.item2) {
//合计
row += '<td>' + objCount[a] + '</td>';
}
}
}
else {
//合计
row += '<td>0</td>';
}
}
row += '</tr>';
rows += row;
}
$('#tb').find('tbody').append(rows);
}
else {
layer.msg('没有' + $('#month').val()+'月份的销售利润数据。');
}
}
else {
layer.msg(result.msg);
}
return false;
}
})
}
function EditFee(name, col,v,mon) {
layer.prompt({ title: '编辑' + name, value:v}, function (text, index) {
layer.close(index);
Save(col, text, mon);
});
}
function Save(col, val,mon) {
$.submit({
url: '@Url.Content("~/Reports/Finance/SaveMonthSaleProfitNew")',
paramData: 'month=' + mon+'&'+col+'='+val,
type:'POST',
func: function (result) {
if (result.success) {
layer.msg('提交成功');
setTimeout(function () {
list();
}, 1.5 * 1000);
}
else {
layer.msg(result.msg);
}
}
})
}
function EditDescription(col, val, mon, name) {
layer.prompt({ title: '编辑 ' + name, value: val }, function (text, index) {
layer.close(index);
SaveDescription(col, text, mon);
});
}
function SaveDescription(col, val, mon) {
$.submit({
url: '@Url.Content("~/Reports/Finance/UpdateMonthSaleProfitDescription")',
paramData: 'month=' + mon+'&'+col+'='+val,
type:'POST',
func: function (result) {
if (result.success) {
layer.msg('提交成功');
setTimeout(function () {
list();
}, 1.5 * 1000);
}
else {
layer.msg(result.msg);
}
}
})
}
function ShowDetail(col, mon, name) {
layer_show(mon + ' ' + name + "的明细", '@Url.Content("~/Reports/Finance/MonthSaleProfitDetails")' + '?month=' + mon + '&col=' + col + '&colname=' + name, '95%', '95%');
}
function clearHtml(s) {
// 去除 富文本格式
s = s.replace(/(\n)/g, "");
s = s.replace(/(\t)/g, "");
s = s.replace(/(\r)/g, "");
s = s.replace(/<\/?[^>]*>/g, "");
s = s.replace(/\s*/g, "");
return s;
}
</script>
}
Bailun.DC.Web/Bailun.DC.Web.csproj
View file @
6481d6c8
...
...
@@ -51,6 +51,9 @@
<Content Update="appsettings.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Update="Areas\Reports\Views\Finance\MonthSaleProfitNew.cshtml">
<Pack>$(IncludeRazorContentInPack)</Pack>
</Content>
</ItemGroup>
</Project>
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