Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shenshaokai
jinfa-platform
Commits
52fbc939
Commit
52fbc939
authored
Mar 16, 2022
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 处理saas多租户售后申请获取供应商逻辑
parent
38fa5150
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
41 deletions
+26
-41
index.ts
.../exchangePrSubmit/components/ExchangeForm/schema/index.ts
+2
-13
index.ts
...tion/repairPrSubmit/components/RepairForm/schema/index.ts
+2
-13
index.ts
...tion/returnPrSubmit/components/ReturnForm/schema/index.ts
+2
-13
utils.ts
src/pages/afterService/utils.ts
+20
-2
No files found.
src/pages/afterService/exchangeApplication/exchangePrSubmit/components/ExchangeForm/schema/index.ts
View file @
52fbc939
...
...
@@ -16,7 +16,7 @@ import {
ORDER_TYPE2_POINTS
,
ORDER_TYPE2_CHANNEL_POINTS
,
}
from
'@/constants/order'
;
import
{
isMaterialOrder
}
from
'../../../../../utils'
;
import
{
isMaterialOrder
,
fetchSupplierList
}
from
'../../../../../utils'
;
const
intl
=
getIntl
();
...
...
@@ -49,17 +49,6 @@ const supplierColumns = [
},
];
// 获取供应会员
const
getSupplier
=
async
(
params
)
=>
{
const
res
=
await
getMemberManageAftersaleReplacePage
({
...
params
,
})
if
(
res
.
code
===
1000
)
{
return
res
.
data
;
}
return
{
totalCount
:
0
,
data
:
[]
};
};
const
supplierSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
...
...
@@ -151,7 +140,7 @@ export const addSchema = (orderType: number): ISchema => {
keepAlive
:
false
,
},
columns
:
supplierColumns
,
fetchTableData
:
getSupplier
,
fetchTableData
:
fetchSupplierList
,
formilyProps
:
{
ctx
:
{
schema
:
supplierSchema
,
...
...
src/pages/afterService/repairApplication/repairPrSubmit/components/RepairForm/schema/index.ts
View file @
52fbc939
...
...
@@ -11,7 +11,7 @@ import {
ORDER_TYPE_POINTS
,
ORDER_TYPE_CHANNEL_POINTS
,
}
from
'@/constants/order'
;
import
{
isMaterialOrder
}
from
'../../../../../utils'
;
import
{
isMaterialOrder
,
fetchSupplierList
}
from
'../../../../../utils'
;
const
intl
=
getIntl
();
...
...
@@ -44,17 +44,6 @@ const supplierColumns = [
},
];
// 获取供应会员
const
getSupplier
=
async
(
params
)
=>
{
const
res
=
await
getMemberManageAftersaleReplacePage
({
...
params
,
})
if
(
res
.
code
===
1000
)
{
return
res
.
data
;
}
return
{
totalCount
:
0
,
data
:
[]
};
};
const
supplierSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
...
...
@@ -145,7 +134,7 @@ export const addSchema = (orderType: number): ISchema => {
keepAlive
:
false
,
},
columns
:
supplierColumns
,
fetchTableData
:
getSupplier
,
fetchTableData
:
fetchSupplierList
,
formilyProps
:
{
ctx
:
{
schema
:
supplierSchema
,
...
...
src/pages/afterService/returnApplication/returnPrSubmit/components/ReturnForm/schema/index.ts
View file @
52fbc939
...
...
@@ -12,7 +12,7 @@ import {
ORDER_TYPE_POINTS
,
ORDER_TYPE_CHANNEL_POINTS
,
}
from
'@/constants/order'
;
import
{
isMaterialOrder
}
from
'../../../../../utils'
;
import
{
isMaterialOrder
,
fetchSupplierList
}
from
'../../../../../utils'
;
const
intl
=
getIntl
();
...
...
@@ -45,17 +45,6 @@ const supplierColumns = [
},
];
// 获取供应会员
const
getSupplier
=
async
(
params
)
=>
{
const
res
=
await
getMemberManageAftersaleReplacePage
({
...
params
,
})
if
(
res
.
code
===
1000
)
{
return
res
.
data
;
}
return
{
totalCount
:
0
,
data
:
[]
};
};
const
supplierSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
...
...
@@ -150,7 +139,7 @@ export const addSchema = (orderType: number): ISchema => {
keepAlive
:
false
,
},
columns
:
supplierColumns
,
fetchTableData
:
getSupplier
,
fetchTableData
:
fetchSupplierList
,
formilyProps
:
{
ctx
:
{
schema
:
supplierSchema
,
...
...
src/pages/afterService/utils.ts
View file @
52fbc939
...
...
@@ -11,6 +11,8 @@ import {
ORDER_TYPE_TENDER_CONTRACT
,
ORDER_TYPE_REQUISITION
,
}
from
'@/constants/order'
;
import
{
getMemberManageAftersaleReplacePage
,
getMemberManageUpperProviderMerchantPage
}
from
'@/services/MemberV220318Api'
;
import
BASE_CONFIG
from
'@/../config/base.config.json'
;
// 是否是采购订单
export
const
isMaterialOrder
=
(
orderType
:
number
)
=>
{
...
...
@@ -32,4 +34,20 @@ export type AsType = 2 | 3 | 4;
* 售后地址角色
* 寄件人 'sender' 收件人 'receiver'
*/
export
type
AsAddressRole
=
'sender'
|
'receiver'
\ No newline at end of file
export
type
AsAddressRole
=
'sender'
|
'receiver'
const
SUPPLIER_LIST_MAP
=
{
0
:
getMemberManageAftersaleReplacePage
,
1
:
getMemberManageUpperProviderMerchantPage
,
};
export
const
fetchSupplierList
=
async
(
params
)
=>
{
const
enableMultiTenancy
=
BASE_CONFIG
.
global
.
siteInfo
.
enableMultiTenancy
||
0
;
const
res
=
await
SUPPLIER_LIST_MAP
[
enableMultiTenancy
]({
...
params
,
})
if
(
res
.
code
===
1000
)
{
return
res
.
data
;
}
return
{
totalCount
:
0
,
data
:
[]
};
};
\ No newline at end of file
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