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
3de3adb4
Commit
3de3adb4
authored
Jan 10, 2020
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
fd9b95a4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
155 additions
and
2 deletions
+155
-2
xgg-admin/app/base/controller/impl/order/orderCtl.js
+138
-2
xgg-admin/app/base/service/impl/order/orderSve.js
+17
-0
xgg-admin/app/front/entry/public/apidoc/order/order.md
+0
-0
No files found.
xgg-admin/app/base/controller/impl/order/orderCtl.js
View file @
3de3adb4
...
@@ -43,11 +43,63 @@ class OrderCtl extends CtlBase {
...
@@ -43,11 +43,63 @@ class OrderCtl extends CtlBase {
}
}
}
}
async
myOrders
(
pobj
,
pobj2
,
req
)
{
var
condition
=
{
currentPage
:
pobj
.
currentPage
||
1
,
pageSize
:
pobj
.
pageSize
||
10
,
id
:
this
.
trim
(
pobj
.
id
),
bd_path
:
req
.
loginUser
.
orgpath
,
deliver_id
:
this
.
trim
(
pobj
.
deliver_id
),
status
:
pobj
.
status
,
createdBegin
:
this
.
trim
(
pobj
.
createdBegin
),
createdEnd
:
this
.
trim
(
pobj
.
createdEnd
),
}
if
(
!
condition
.
bd_path
)
{
return
system
.
getResultSuccess
({
count
:
0
,
rows
:[],
warning
:
"该用户组织机构为空"
});
}
this
.
doTimeCondition
(
condition
,
[
"createdBegin"
,
"createdEnd"
]);
try
{
return
await
this
.
orderSve
.
orders
(
condition
);
}
catch
(
e
)
{
console
.
log
(
e
);
return
system
.
getResultFail
(
500
,
"接口错误"
);
}
}
async
orderInfo
(
pobj
,
pobj2
,
req
)
{
try
{
return
await
this
.
orderSve
.
orderInfoAll
({
id
:
this
.
trim
(
pobj
.
id
)});
}
catch
(
e
)
{
console
.
log
(
e
);
return
system
.
getResultFail
(
500
,
"接口错误"
);
}
}
async
orderChooseProducts
(
pobj
,
pobj2
,
req
)
{
let
orderId
=
this
.
trim
(
pobj
.
id
);
let
order
=
await
this
.
orderSve
.
orderInfo
({
id
:
orderId
});
if
(
!
order
.
data
||
!
order
.
data
.
product_id
)
{
return
system
.
getResult
(
null
,
"订单不存在"
);
}
let
params
=
{
pid
:
order
.
data
.
product_id
,
is_choose
:
1
,
}
try
{
return
await
this
.
orderSve
.
productDics
(
params
);
}
catch
(
e
)
{
console
.
log
(
e
);
return
system
.
getResultFail
(
500
,
"接口错误"
);
}
}
async
orderAssign
(
pobj
,
pobj2
,
req
)
{
async
orderAssign
(
pobj
,
pobj2
,
req
)
{
var
condition
=
{
var
condition
=
{
id
:
this
.
trim
(
pobj
.
id
),
id
:
this
.
trim
(
pobj
.
id
),
status
:
pobj
.
status
,
status
:
pobj
.
status
,
bd_id
:
Number
(
pobj
.
bd_id
)
bd_id
:
Number
(
pobj
.
bd_id
),
assign_user_id
:
req
.
loginUser
.
id
,
}
}
// * @bd_path String 业务员权限
// * @bd_path String 业务员权限
let
bd
=
await
this
.
userSve
.
queryById
({
id
:
condition
.
bd_id
});
let
bd
=
await
this
.
userSve
.
queryById
({
id
:
condition
.
bd_id
});
...
@@ -61,15 +113,98 @@ class OrderCtl extends CtlBase {
...
@@ -61,15 +113,98 @@ class OrderCtl extends CtlBase {
}
}
condition
.
bd_path
=
bd
.
orgpath
;
condition
.
bd_path
=
bd
.
orgpath
;
console
.
log
(
bd
);
try
{
try
{
return
await
this
.
orderSve
.
handleStatus
(
condition
);
return
await
this
.
orderSve
.
handleStatus
(
condition
);
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
e
);
console
.
log
(
e
);
return
system
.
getResultFail
(
500
,
"接口错误"
);
return
system
.
getResultFail
(
500
,
"接口错误"
);
}
}
}
async
perfectInformation
(
pobj
,
pobj2
,
req
)
{
let
params
=
{};
params
.
id
=
this
.
trim
(
pobj
.
id
);
params
.
status
=
this
.
trim
(
pobj
.
status
);
params
.
legal_name
=
this
.
trim
(
pobj
.
legal_name
);
params
.
id_card
=
this
.
trim
(
pobj
.
id_card
);
params
.
legal_mobile
=
this
.
trim
(
pobj
.
legal_mobile
);
params
.
names
=
this
.
trim
(
pobj
.
names
);
params
.
capital
=
this
.
trim
(
pobj
.
capital
);
params
.
domicile_id
=
this
.
trim
(
pobj
.
domicile_id
);
params
.
domicile_name
=
this
.
trim
(
pobj
.
domicile_name
);
params
.
business_scope_id
=
this
.
trim
(
pobj
.
business_scope_id
);
params
.
business_type
=
this
.
trim
(
pobj
.
business_type
);
params
.
business_scope
=
this
.
trim
(
pobj
.
business_scope
);
params
.
idcard_front
=
this
.
trim
(
pobj
.
idcard_front
);
params
.
idcard_back
=
this
.
trim
(
pobj
.
idcard_back
);
params
.
other_file
=
this
.
trim
(
pobj
.
other_file
);
params
.
guest_mail_addr
=
this
.
trim
(
pobj
.
guest_mail_addr
);
params
.
guest_mail_to
=
this
.
trim
(
pobj
.
guest_mail_to
);
params
.
guest_mail_mobile
=
this
.
trim
(
pobj
.
guest_mail_mobile
);
if
(
!
params
.
id
)
{
return
system
.
getResult
(
null
,
`订单不存在`
);
}
if
(
!
params
.
status
)
{
return
system
.
getResult
(
null
,
`订单状态错误`
);
}
if
(
!
params
.
legal_name
){
return
system
.
getResult
(
null
,
`参数错误 法人姓名不能为空`
);
}
if
(
!
params
.
id_card
){
return
system
.
getResult
(
null
,
`参数错误 法人身份证不能为空`
);
}
if
(
!
params
.
legal_mobile
){
return
system
.
getResult
(
null
,
`参数错误 法人电话不能为空`
);
}
if
(
!
params
.
names
){
return
system
.
getResult
(
null
,
`参数错误 个体户名称不能为空`
);
}
if
(
!
params
.
capital
){
return
system
.
getResult
(
null
,
`参数错误 注册资本不能为空`
);
}
if
(
!
params
.
domicile_id
){
return
system
.
getResult
(
null
,
`参数错误 注册地id不能为空`
);
}
if
(
!
params
.
domicile_name
){
return
system
.
getResult
(
null
,
`参数错误 注册地名称不能为空`
);
}
if
(
!
params
.
business_scope_id
){
return
system
.
getResult
(
null
,
`参数错误 经营范围id不能为空`
);
}
if
(
!
params
.
business_type
){
return
system
.
getResult
(
null
,
`参数错误 经营范围不能为空`
);
}
if
(
!
params
.
business_scope
){
return
system
.
getResult
(
null
,
`参数错误 经营范围详情不能为空`
);
}
if
(
!
params
.
idcard_front
){
return
system
.
getResult
(
null
,
`参数错误 身份证正面照片不能为空`
);
}
if
(
!
params
.
idcard_back
){
return
system
.
getResult
(
null
,
`参数错误 身份证反面照片不能为空`
);
}
if
(
!
params
.
other_file
){
return
system
.
getResult
(
null
,
`参数错误 其他文件不能为空`
);
}
if
(
!
params
.
guest_mail_addr
){
return
system
.
getResult
(
null
,
`参数错误 邮寄客户地址不能为空`
);
}
if
(
!
params
.
guest_mail_to
){
return
system
.
getResult
(
null
,
`参数错误 客户收件人不能为空`
);
}
if
(
!
params
.
guest_mail_mobile
){
return
system
.
getResult
(
null
,
`参数错误 客户收件人电话不能为空`
);
}
try
{
return
await
this
.
orderSve
.
handleStatus
(
params
);
}
catch
(
e
)
{
console
.
log
(
e
);
return
system
.
getResultFail
(
500
,
"接口错误"
);
}
}
}
}
}
module
.
exports
=
OrderCtl
;
module
.
exports
=
OrderCtl
;
\ No newline at end of file
xgg-admin/app/base/service/impl/order/orderSve.js
View file @
3de3adb4
...
@@ -26,6 +26,23 @@ class OrderService extends ServiceBase {
...
@@ -26,6 +26,23 @@ class OrderService extends ServiceBase {
return
await
this
.
callms
(
"order"
,
"handleStatus"
,
params
);
return
await
this
.
callms
(
"order"
,
"handleStatus"
,
params
);
}
}
async
orderInfo
(
params
)
{
var
rs
=
await
this
.
callms
(
"order"
,
"orderInfo"
,
params
);
return
rs
;
}
async
orderInfoAll
(
params
)
{
var
rs
=
await
this
.
callms
(
"order"
,
"orderInfoAll"
,
params
);
await
this
.
setUcUser
([
rs
.
data
.
order
]);
return
rs
;
}
async
productDics
(
params
)
{
var
rs
=
await
this
.
callms
(
"order"
,
"productDics"
,
params
);
return
rs
;
}
async
statManageData
(
params
)
{
async
statManageData
(
params
)
{
var
res
=
await
this
.
callms
(
"order"
,
"statTransData"
,
params
);
var
res
=
await
this
.
callms
(
"order"
,
"statTransData"
,
params
);
return
res
;
return
res
;
...
...
xgg-admin/app/front/entry/public/apidoc/order/order.md
View file @
3de3adb4
This diff is collapsed.
Click to expand it.
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