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
d4659c55
Commit
d4659c55
authored
Dec 08, 2019
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
e7dddb14
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
70 additions
and
4 deletions
+70
-4
xggsve-order/app/base/db/models/order/iborder.js
+1
-0
xggsve-order/app/base/service/impl/order/iborderSve.js
+1
-0
xggsve-order/app/base/service/impl/order/iborderdeliverSve.js
+68
-4
No files found.
xggsve-order/app/base/db/models/order/iborder.js
View file @
d4659c55
...
...
@@ -56,6 +56,7 @@ module.exports = (db, DataTypes) => {
deliverNo
:
DataTypes
.
STRING
,
deliverImg
:
DataTypes
.
STRING
,
productItems
:
DataTypes
.
STRING
,
completeFile
:
DataTypes
.
STRING
,
},
{
paranoid
:
true
,
//假的删除
underscored
:
true
,
...
...
xggsve-order/app/base/service/impl/order/iborderSve.js
View file @
d4659c55
...
...
@@ -879,6 +879,7 @@ class IborderService extends ServiceBase {
deliverType
:
self
.
trim
(
params
.
deliverType
),
deliverNo
:
self
.
trim
(
params
.
deliverNo
),
deliverImg
:
self
.
trim
(
params
.
deliverImg
),
completeFile
:
self
.
trim
(
params
.
completeFile
),
}
await
self
.
dao
.
update
(
orderFields
,
t
);
await
self
.
businessmenDao
.
update
({
...
...
xggsve-order/app/base/service/impl/order/iborderdeliverSve.js
View file @
d4659c55
...
...
@@ -272,21 +272,85 @@ class IborderdeliverService extends ServiceBase {
this
.
addWhereTime
(
where
,
'created_at'
,
params
.
createdBegin
,
params
.
createdEnd
);
var
page
=
await
this
.
getPageList
(
currentPage
,
pageSize
,
where
,
orderby
);
if
(
page
&&
page
.
rows
)
{
await
this
.
setOrder
(
page
.
rows
,
"`id`, `legalName`, `legalMobile`, `price`, `idcard`, `productItems` "
);
for
(
var
row
of
page
.
rows
)
{
await
this
.
dao
.
setRowCodeName
(
row
,
"status"
);
// 下一个状态
var
nextObj
=
await
this
.
orderBusinessStatus
.
findOrderNextBusinessStatus
(
row
.
status
);
row
.
nextStatus
=
nextObj
.
status
;
row
.
nextStatusName
=
nextObj
.
name
;
await
this
.
setNextStatus
(
row
);
// var nextObj = await this.orderBusinessStatus.findOrderNextBusinessStatus(row.status);
// row.nextStatus = nextObj.status;
// row.nextStatusName = nextObj.name;
this
.
handleDate
(
row
,
[
"created_at"
],
null
,
-
8
);
}
await
this
.
setOrder
(
page
.
rows
,
"`id`, `legalName`, `legalMobile`, `price`, `idcard`"
);
}
return
system
.
getResultSuccess
(
page
);
}
async
setNextStatus
(
row
)
{
if
(
!
row
)
{
return
;
}
let
items
=
this
.
trim
(
row
.
productItems
);
if
(
items
)
{
let
itemArr
=
items
.
split
(
","
);
// 当前订单状态
let
curStatus
=
row
.
status
;
let
nextStatus
=
""
;
if
(
curStatus
==
"1030"
)
{
if
(
itemArr
.
indexOf
(
"1050"
)
!=
-
1
)
{
nextStatus
=
"1050"
;
}
else
if
(
itemArr
.
indexOf
(
"1070"
)
!=
-
1
)
{
nextStatus
=
"1070"
;
}
else
if
(
itemArr
.
indexOf
(
"1090"
)
!=
-
1
)
{
nextStatus
=
"1090"
;
}
else
if
(
itemArr
.
indexOf
(
"1110"
)
!=
-
1
)
{
nextStatus
=
"1110"
;
}
else
{
nextStatus
=
await
this
.
orderBusinessStatus
.
findOrderNextBusinessStatus
(
curStatus
);
}
}
else
if
(
curStatus
==
"1050"
)
{
if
(
itemArr
.
indexOf
(
"1070"
)
!=
-
1
)
{
nextStatus
=
"1070"
;
}
else
if
(
itemArr
.
indexOf
(
"1090"
)
!=
-
1
)
{
nextStatus
=
"1090"
;
}
else
if
(
itemArr
.
indexOf
(
"1110"
)
!=
-
1
)
{
nextStatus
=
"1110"
;
}
else
{
nextStatus
=
await
this
.
orderBusinessStatus
.
findOrderNextBusinessStatus
(
curStatus
);
}
}
else
if
(
curStatus
==
"1070"
)
{
if
(
itemArr
.
indexOf
(
"1090"
)
!=
-
1
)
{
nextStatus
=
"1090"
;
}
else
if
(
itemArr
.
indexOf
(
"1110"
)
!=
-
1
)
{
nextStatus
=
"1110"
;
}
else
{
nextStatus
=
await
this
.
orderBusinessStatus
.
findOrderNextBusinessStatus
(
curStatus
);
}
}
else
if
(
curStatus
==
"1090"
)
{
if
(
itemArr
.
indexOf
(
"1110"
)
!=
-
1
)
{
nextStatus
=
"1110"
;
}
else
{
nextStatus
=
await
this
.
orderBusinessStatus
.
findOrderNextBusinessStatus
(
curStatus
);
}
}
else
{
nextStatus
=
await
this
.
orderBusinessStatus
.
findOrderNextBusinessStatus
(
curStatus
);
}
var
nextObj
=
await
this
.
orderBusinessStatus
.
findOrderBusinessStatus
(
nextStatus
);
row
.
nextStatus
=
nextObj
.
status
;
row
.
nextStatusName
=
nextObj
.
name
;
return
;
}
var
nextObj
=
await
this
.
orderBusinessStatus
.
findOrderNextBusinessStatus
(
row
.
status
);
row
.
nextStatus
=
nextObj
.
status
;
row
.
nextStatusName
=
nextObj
.
name
;
}
async
setOrder
(
rows
,
attrs
)
{
if
(
!
rows
||
rows
.
length
==
0
)
{
return
;
...
...
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