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
5e474e27
Commit
5e474e27
authored
Apr 07, 2020
by
王昆
Browse files
Options
Browse Files
Download
Plain Diff
dd
parents
2333da26
c8ec1a44
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
11 deletions
+46
-11
xgg-admin/app/base/service/impl/business/businessmenSve.js
+42
-7
xgg-admin/app/base/system.js
+4
-4
No files found.
xgg-admin/app/base/service/impl/business/businessmenSve.js
View file @
5e474e27
...
...
@@ -7,6 +7,7 @@ class BusinessmenService extends ServiceBase {
constructor
()
{
super
();
}
async
info
(
params
)
{
let
rs
=
await
this
.
callms
(
"order"
,
"queryObusinessmen"
,
params
);
this
.
transField
([
rs
.
data
]);
...
...
@@ -25,7 +26,7 @@ class BusinessmenService extends ServiceBase {
/**
* @params 个体户签约
*/
async
signing
(
params
){
async
signing
(
params
)
{
try
{
return
await
this
.
callms
(
"order"
,
"signing"
,
params
);
}
catch
(
error
)
{
...
...
@@ -34,7 +35,7 @@ class BusinessmenService extends ServiceBase {
}
}
async
signNames
(
params
){
async
signNames
(
params
)
{
try
{
return
await
this
.
callms
(
"order"
,
"signNames"
,
params
);
}
catch
(
error
)
{
...
...
@@ -46,7 +47,7 @@ class BusinessmenService extends ServiceBase {
/**
* @params 建仗
*/
async
createAccount
(
params
){
async
createAccount
(
params
)
{
try
{
// 查个体户
let
businessmen
=
await
this
.
callms
(
"order"
,
"queryObusinessmen"
,
params
);
...
...
@@ -71,15 +72,24 @@ class BusinessmenService extends ServiceBase {
let
url
=
settings
.
ntapi
().
createCustomer
;
let
res
=
await
this
.
callApi
(
url
,
data
,
"建账"
);
console
.
log
(
res
);
if
(
!
res
||
!
res
.
data
)
{
if
(
!
res
||
!
res
.
data
)
{
return
system
.
getResult
(
null
,
"建账失败"
);
}
if
(
res
.
data
)
{
if
(
res
.
data
)
{
await
this
.
callms
(
"order"
,
"createAccount"
,
{
id
:
params
.
id
,
province
:
params
.
province
,
customer_id
:
res
.
data
,
});
// 异步推送建账信息 TODO 孙总统测
this
.
pushBusinessmenInfo
({
order_id
:
businessmen
.
order_id
,
company_id
:
deliver
.
nt_company_id
,
customer_id
:
res
.
data
,
name
:
businessmen
.
name
,
credit_code
:
businessmen
.
credit_code
,
});
}
return
system
.
getResultSuccess
();
}
catch
(
error
)
{
...
...
@@ -88,13 +98,38 @@ class BusinessmenService extends ServiceBase {
}
}
// 推送建账信息 TODO 孙总统测
async
pushBusinessmenInfo
(
params
)
{
let
order
=
await
this
.
callms
(
"order"
,
"orderInfo"
,
{
id
:
params
.
order_id
})
||
{};
order
=
order
.
data
;
if
(
!
order
)
{
return
;
}
if
(
!
order
.
saas_deliver_api
)
{
return
;
}
let
data
=
{
source_no
:
order
.
source_no
,
status
:
"1000000"
,
company_id
:
params
.
company_id
,
customer_id
:
params
.
customer_id
,
name
:
params
.
name
,
credit_code
:
params
.
credit_code
,
}
axios
({
method
:
'post'
,
url
:
order
.
saas_deliver_api
,
data
:
data
});
}
transField
(
rows
)
{
if
(
!
rows
)
{
return
;
}
for
(
var
row
of
rows
)
{
if
(
!
row
)
{
if
(
!
row
)
{
continue
;
}
row
.
costRate
=
system
.
f2y
(
row
.
costRate
);
...
...
@@ -115,7 +150,7 @@ class BusinessmenService extends ServiceBase {
if
(
!
f
)
{
continue
;
}
if
(
!
row
[
f
])
{
if
(
!
row
[
f
])
{
row
[
f
]
=
[];
continue
;
}
...
...
xgg-admin/app/base/system.js
View file @
5e474e27
...
...
@@ -182,12 +182,12 @@ class System {
// merchant: "http://127.0.0.1:3101" + path,
// 订单服务
order
:
domain
+
":3103"
+
path
,
// order: domain
2
+ ":3103" + path,
order
:
domain
2
+
":3103"
+
path
,
// order: domain + ":3103" + path,
// 发票服务
invoice
:
domain2
+
":3105"
+
path
,
// invoice: "http://127.0.0.1
:3105" + path,
//
invoice: domain2 + ":3105" + path,
invoice
:
domain
+
"
:3105"
+
path
,
// 用户中心
uc
:
domain
+
":3106"
+
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