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
802212bf
Commit
802212bf
authored
Apr 29, 2020
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
550eb7bb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
10 deletions
+70
-10
xgg-deliver/app/base/controller/impl/order/orderCtl.js
+59
-1
xgg-deliver/app/base/controller/impl/uc/userCtl.js
+11
-9
No files found.
xgg-deliver/app/base/controller/impl/order/orderCtl.js
View file @
802212bf
...
...
@@ -594,7 +594,10 @@ class OrderCtl extends CtlBase {
return
system
.
getResult
(
null
,
`省份不能为空`
)
}
try
{
return
await
this
.
orderSve
.
handleStatus
(
pobj
);
let
rs
=
await
this
.
orderSve
.
handleStatus
(
pobj
);
if
(
rs
&&
rs
.
status
===
0
)
{
this
.
createAccount
(
pobj
);
}
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
...
...
@@ -602,6 +605,61 @@ class OrderCtl extends CtlBase {
}
/**
* @params 建仗
*/
async
createAccount
(
params
)
{
try
{
// 查个体户
let
businessmen
=
await
this
.
callms
(
"order"
,
"queryObusinessmen"
,
params
);
businessmen
=
businessmen
.
data
;
// 查个体户的交付商
var
deliver
=
await
this
.
callms
(
"common"
,
"deliverInfo"
,
{
id
:
params
.
deliver_id
});
deliver
=
deliver
.
data
;
let
user
=
await
this
.
callms
(
"common"
,
"deliverUserInfo"
,
{
id
:
deliver
.
admin_id
})
||
{};
user
=
(
user
.
data
||
{}).
user
||
{};
let
data
=
{
customerName
:
businessmen
.
name
,
initPeriod
:
Number
(
moment
().
format
(
"YYYYMM"
)),
// initPeriod: moment().format("YYYYMM"),
accountStandard
:
1
,
valueAddedTax
:
2
,
bankStatus
:
businessmen
.
is_bank
?
1
:
0
,
accountant
:
user
.
nt_user_id
,
province
:
params
.
province
,
companyId
:
deliver
.
nt_company_id
,
}
let
url
=
settings
.
ntapi
().
createCustomer
;
let
res
=
await
this
.
callApi
(
url
,
data
,
"建账"
);
console
.
log
(
res
);
if
(
!
res
||
!
res
.
data
)
{
return
system
.
getResult
(
null
,
"建账失败"
);
}
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
,
businessmen
:
businessmen
});
}
return
system
.
getResultSuccess
();
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
error
);
}
}
/**
* ali客户交付
* @param {*} params
*/
...
...
xgg-deliver/app/base/controller/impl/uc/userCtl.js
View file @
802212bf
...
...
@@ -166,12 +166,13 @@ class UserCtl extends CtlBase {
"name"
:
"订单中心"
,
"icon"
:
"iconfont icon-gth-gsdingdanzhongxin"
,
"team"
:
[
{
"name"
:
"我的业务订单"
,
"path"
:
"/trading/orderInformation"
},
{
"name"
:
"工商注册"
,
"path"
:
"/trading/ywyRegister"
},
{
"name"
:
"刻章办理"
,
"path"
:
"/trading/ywyHandle"
},
{
"name"
:
"银行开户"
,
"path"
:
"/trading/ywyBank"
},
{
"name"
:
"税务报道"
,
"path"
:
"/trading/ywyReport"
},
{
"name"
:
"代理记账"
,
"path"
:
"/trading/ywyAccount"
},
{
"name"
:
"我的业务订单"
,
"path"
:
"/trading/glyorderInformation"
},
{
"name"
:
"工商注册"
,
"path"
:
"/trading/glyRegister"
},
{
"name"
:
"刻章办理"
,
"path"
:
"/trading/glyHandle"
},
{
"name"
:
"银行开户"
,
"path"
:
"/trading/glyBank"
},
{
"name"
:
"税务报道"
,
"path"
:
"/trading/glyReport"
},
{
"name"
:
"代理记账"
,
"path"
:
"/trading/glyAccount"
},
]
},
{
...
...
@@ -204,7 +205,8 @@ class UserCtl extends CtlBase {
icon
:
"iconfont icon-gth-gsfapiaozhongxin"
,
team
:
[
{
name
:
"发票申请"
,
path
:
"/trading/invoiceApplyFor"
},
{
name
:
"发票管理"
,
path
:
"/trading/invoiceManagement"
},
{
name
:
"发票办理"
,
path
:
"/trading/invoiceManagement"
},
{
name
:
"我的发票业务"
,
path
:
"/trading/invoiceApplyMy"
},
]
}
];
...
...
@@ -219,8 +221,8 @@ class UserCtl extends CtlBase {
name
:
"发票中心"
,
icon
:
"iconfont icon-gth-gsfapiaozhongxin"
,
team
:
[
{
name
:
"
我的业务发票"
,
path
:
"/trading/invoiceApplyMy
"
},
{
name
:
"我的
全部发票"
,
path
:
"/trading/invoicesAll
My"
},
{
name
:
"
发票办理"
,
path
:
"/trading/invoiceManagement
"
},
{
name
:
"我的
发票业务"
,
path
:
"/trading/invoiceApply
My"
},
]
}
];
...
...
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