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
Hide 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
Chat
from
"@/customer-service/xim"
;
import
{
metaRow
,
UniplatSdkExtender
}
from
"uniplat-sdk"
;
import
{
metaRow
,
UniplatSdkExtender
,
UniplatSdk
}
from
"uniplat-sdk"
;
import
{
import
{
OperationType
,
OperationType
,
OrderStatus
,
OrderStatus
,
...
@@ -17,14 +17,23 @@ class OrderService {
...
@@ -17,14 +17,23 @@ class OrderService {
public
readonly
generalOrderPaymentModel
=
"general_order_payment_info"
;
public
readonly
generalOrderPaymentModel
=
"general_order_payment_info"
;
private
readonly
handler
=
new
UniplatSdkExtender
();
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
:
{
public
openOrder
(
params
:
{
productId
:
string
|
number
;
productId
:
string
|
number
;
srcPlatform
:
SrcPlatform
;
srcPlatform
:
SrcPlatform
;
createdType
:
OperationType
;
createdType
:
OperationType
;
})
{
})
{
const
sdk
=
Chat
.
getSdk
();
return
this
.
getSdk
()
return
sdk
.
model
(
this
.
generalOrder
)
.
model
(
this
.
generalOrder
)
.
action
(
"addOrder"
)
.
action
(
"addOrder"
)
.
addInputs_parameter
({
.
addInputs_parameter
({
...
@@ -40,7 +49,7 @@ class OrderService {
...
@@ -40,7 +49,7 @@ class OrderService {
v
:
number
,
v
:
number
,
status
:
OrderStatus
status
:
OrderStatus
)
{
)
{
return
Chat
.
getSdk
()
return
this
.
getSdk
()
.
model
(
this
.
generalOrder
)
.
model
(
this
.
generalOrder
)
.
action
(
"editStatus"
)
.
action
(
"editStatus"
)
.
addInputs_parameter
({
.
addInputs_parameter
({
...
@@ -52,7 +61,7 @@ class OrderService {
...
@@ -52,7 +61,7 @@ class OrderService {
}
}
public
getOrders
(
index
:
number
)
{
public
getOrders
(
index
:
number
)
{
return
Chat
.
getSdk
()
return
this
.
getSdk
()
.
model
(
this
.
generalOrder
)
.
model
(
this
.
generalOrder
)
.
list
(
"userOrderList"
)
.
list
(
"userOrderList"
)
.
query
({
item_size
:
100
,
pageIndex
:
index
})
.
query
({
item_size
:
100
,
pageIndex
:
index
})
...
@@ -65,7 +74,7 @@ class OrderService {
...
@@ -65,7 +74,7 @@ class OrderService {
}
}
public
getPayments
(
id
:
number
)
{
public
getPayments
(
id
:
number
)
{
return
Chat
.
getSdk
()
return
this
.
getSdk
()
.
model
(
orderService
.
generalOrderPaymentModel
)
.
model
(
orderService
.
generalOrderPaymentModel
)
.
list
()
.
list
()
.
addPrefilter
({
OrderId
:
id
})
.
addPrefilter
({
OrderId
:
id
})
...
@@ -90,7 +99,7 @@ class OrderService {
...
@@ -90,7 +99,7 @@ class OrderService {
}
}
public
getPayment
(
id
:
string
|
number
)
{
public
getPayment
(
id
:
string
|
number
)
{
return
Chat
.
getSdk
()
return
this
.
getSdk
()
.
model
(
orderService
.
generalOrderPaymentModel
)
.
model
(
orderService
.
generalOrderPaymentModel
)
.
detail
(
id
as
string
,
"userOrderPaymentDetail"
)
.
detail
(
id
as
string
,
"userOrderPaymentDetail"
)
.
query
()
.
query
()
...
@@ -110,7 +119,7 @@ class OrderService {
...
@@ -110,7 +119,7 @@ class OrderService {
}
}
public
addImage4Payment
(
payment
:
number
|
string
,
v
:
number
,
path
:
string
)
{
public
addImage4Payment
(
payment
:
number
|
string
,
v
:
number
,
path
:
string
)
{
return
Chat
.
getSdk
()
return
this
.
getSdk
()
.
model
(
orderService
.
generalOrderPaymentModel
)
.
model
(
orderService
.
generalOrderPaymentModel
)
.
action
(
"addImages"
)
.
action
(
"addImages"
)
.
updateInitialParams
({
selected_list
:
[{
v
,
id
:
payment
as
number
}]
})
.
updateInitialParams
({
selected_list
:
[{
v
,
id
:
payment
as
number
}]
})
...
@@ -119,7 +128,7 @@ class OrderService {
...
@@ -119,7 +128,7 @@ class OrderService {
}
}
public
getImages4Payment
(
payment
:
number
)
{
public
getImages4Payment
(
payment
:
number
)
{
return
Chat
.
getSdk
()
return
this
.
getSdk
()
.
model
(
"general_order_payment_file_info"
)
.
model
(
"general_order_payment_file_info"
)
.
list
()
.
list
()
.
addPrefilter
({
PaymentId
:
payment
})
.
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