Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
foreign
/
customer-service
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
12cfe2d1
authored
Dec 02, 2021
by
Sixong.Zhu
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
u
parent
a2dcf20b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
9 deletions
service/order.ts
service/order.ts
View file @
12cfe2d1
import
Chat
from
"@/customer-service/xim"
;
import
{
metaRow
,
UniplatSdkExtender
}
from
"uniplat-sdk"
;
import
{
metaRow
,
UniplatSdkExtender
,
UniplatSdk
}
from
"uniplat-sdk"
;
import
{
OperationType
,
OrderStatus
,
...
...
@@ -17,14 +17,23 @@ class OrderService {
public
readonly
generalOrderPaymentModel
=
"general_order_payment_info"
;
private
readonly
handler
=
new
UniplatSdkExtender
();
private
innerSdk
:
UniplatSdk
|
null
=
null
;
public
injectSdk
(
sdk
:
UniplatSdk
)
{
this
.
innerSdk
=
sdk
;
return
this
;
}
private
getSdk
()
{
return
this
.
innerSdk
||
Chat
.
getSdk
();
}
public
openOrder
(
params
:
{
productId
:
string
|
number
;
srcPlatform
:
SrcPlatform
;
createdType
:
OperationType
;
})
{
const
sdk
=
Chat
.
getSdk
();
return
sdk
return
this
.
getSdk
()
.
model
(
this
.
generalOrder
)
.
action
(
"addOrder"
)
.
addInputs_parameter
({
...
...
@@ -40,7 +49,7 @@ class OrderService {
v
:
number
,
status
:
OrderStatus
)
{
return
Chat
.
getSdk
()
return
this
.
getSdk
()
.
model
(
this
.
generalOrder
)
.
action
(
"editStatus"
)
.
addInputs_parameter
({
...
...
@@ -52,7 +61,7 @@ class OrderService {
}
public
getOrders
(
index
:
number
)
{
return
Chat
.
getSdk
()
return
this
.
getSdk
()
.
model
(
this
.
generalOrder
)
.
list
(
"userOrderList"
)
.
query
({
item_size
:
100
,
pageIndex
:
index
})
...
...
@@ -65,7 +74,7 @@ class OrderService {
}
public
getPayments
(
id
:
number
)
{
return
Chat
.
getSdk
()
return
this
.
getSdk
()
.
model
(
orderService
.
generalOrderPaymentModel
)
.
list
()
.
addPrefilter
({
OrderId
:
id
})
...
...
@@ -90,7 +99,7 @@ class OrderService {
}
public
getPayment
(
id
:
string
|
number
)
{
return
Chat
.
getSdk
()
return
this
.
getSdk
()
.
model
(
orderService
.
generalOrderPaymentModel
)
.
detail
(
id
as
string
,
"userOrderPaymentDetail"
)
.
query
()
...
...
@@ -110,7 +119,7 @@ class OrderService {
}
public
addImage4Payment
(
payment
:
number
|
string
,
v
:
number
,
path
:
string
)
{
return
Chat
.
getSdk
()
return
this
.
getSdk
()
.
model
(
orderService
.
generalOrderPaymentModel
)
.
action
(
"addImages"
)
.
updateInitialParams
({
selected_list
:
[{
v
,
id
:
payment
as
number
}]
})
...
...
@@ -119,7 +128,7 @@ class OrderService {
}
public
getImages4Payment
(
payment
:
number
)
{
return
Chat
.
getSdk
()
return
this
.
getSdk
()
.
model
(
"general_order_payment_file_info"
)
.
list
()
.
addPrefilter
({
PaymentId
:
payment
})
...
...
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