Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
64b29bb8
Commit
64b29bb8
authored
Jul 03, 2020
by
孙亚楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
42544b26
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
23 deletions
+17
-23
esign-admin/app/base/controller/impl/order/orderCtl.js
+14
-20
esign-admin/app/base/system.js
+3
-3
No files found.
esign-admin/app/base/controller/impl/order/orderCtl.js
View file @
64b29bb8
...
...
@@ -56,6 +56,12 @@ class OrderCtl extends CtlBase {
if
(
pobj
.
product_type
==
'1'
){
//如果是单个产品 需要转化单价
pobj
.
product_unit_price
=
system
.
y2f
(
pobj
.
product_unit_price
);
}
//格式化产品价格(组合产品 的子产品价格)
if
(
pobj
.
product_type
==
'2'
&&
pobj
.
product_arr
&&
pobj
.
product_arr
.
length
>
0
){
for
(
let
item
of
pobj
.
product_arr
)
{
item
.
price
=
system
.
y2f
(
item
.
price
);
}
}
// 需要去调用商户钱包 扣钱
if
(
pobj
.
id
){
let
reduceAccountBalanceRes
=
await
this
.
merchantaccountSve
.
addordelavailable
({
merchant_id
:
this
.
trim
(
pobj
.
merchant_id
),
amount
:
pobj
.
price
*
(
-
1
)});
...
...
@@ -67,11 +73,12 @@ class OrderCtl extends CtlBase {
let
res
=
await
this
.
orderSve
.
saveEorder
(
pobj
);
if
(
res
.
status
==
0
&&
res
.
data
&&
res
.
data
.
price
&&
res
.
data
.
product_type
){
res
.
data
.
price
=
system
.
f2y
(
res
.
data
.
price
)
||
0
;
res
.
data
.
product_unit_price
=
system
.
f2y
(
res
.
data
.
product_unit_price
)
||
0
;
if
(
res
.
data
.
product_type
==
'2'
){
//如果是组合产品
res
.
data
.
product_specifications
=
system
.
f2y
(
res
.
data
.
product_specifications
)
||
0
;
}
}
return
system
.
getResult
(
res
)
;
return
res
;
}
catch
(
e
)
{
console
.
log
(
e
);
return
system
.
getResult
(
null
,
`系统错误`
);
...
...
@@ -152,8 +159,13 @@ class OrderCtl extends CtlBase {
return
system
.
getResult
(
null
,
`订单【
${
pobj
.
id
}
】不存在`
);
}
let
res
=
await
this
.
orderSve
.
getEorderById
(
pobj
);
if
(
res
.
status
==
0
&&
res
.
data
.
productChildren
){
for
(
let
item
of
res
.
data
.
productChildren
){
item
.
price
=
system
.
f2y
(
item
.
price
);
}
}
// 计费
//
await this.feeSve.setRowsFee([res.data], "engine_account_id");
let
feeRes
=
await
this
.
feeSve
.
setRowsFee
([
res
.
data
],
"engine_account_id"
);
return
res
;
}
catch
(
e
)
{
console
.
log
(
e
);
...
...
@@ -230,23 +242,6 @@ class OrderCtl extends CtlBase {
}
}
/**
* fn:查看日志
* @param pobj
* @param pobj2
* @param req
* @param res
* @returns {Promise<void>}
*/
async
pageEorderLog
(
pobj
,
pobj2
,
req
,
res
){
if
(
pobj
.
product_property
==
'1'
){
return
await
this
.
orderauthlogCtl
.
pageEorderAuthLog
(
pobj
);
}
else
if
(
pobj
.
product_property
==
'2'
){
return
await
this
.
ordersignlogSve
.
pageEorderSignLog
(
pobj
);
}
else
{
return
system
.
getResult
(
null
,
`参数错误 产品类型属性不存在`
);
}
}
}
module
.
exports
=
OrderCtl
;
\ No newline at end of file
esign-admin/app/base/system.js
View file @
64b29bb8
...
...
@@ -184,13 +184,13 @@ class System {
var
path
=
"/api/op/action/springboard"
;
if
(
settings
.
env
==
"dev"
)
{
let
local
=
"http://127.0.0.1"
;
let
liangwenkai
=
"http://192.168.2
10.210
"
;
let
liangwenkai
=
"http://192.168.2
00.183
"
;
let
dev
=
"http://39.107.234.14"
;
return
{
// 产品引擎
engine_product
:
l
iangwenkai
+
":3571"
+
path
,
engine_product
:
l
ocal
+
":3571"
+
path
,
// 计费引擎
engine_fee
:
local
+
":3572"
+
path
,
engine_fee
:
dev
+
":3572"
+
path
,
// 认证引擎
engine_auth
:
local
+
":3573"
+
path
,
// 签约引擎
...
...
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