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
黄庭坚
jinfa-platform
Commits
a616819c
Commit
a616819c
authored
Oct 26, 2021
by
GuanHua
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into v2
parents
a13b185e
a265f520
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
157 additions
and
75 deletions
+157
-75
index.ts
src/components/ModalTable/schema/index.ts
+44
-42
index.tsx
src/pages/afterService/components/GoodsDrawer/index.tsx
+6
-2
index.tsx
...cation/exchangePrSubmit/components/ExchangeForm/index.tsx
+17
-2
index.tsx
...pplication/repairPrSubmit/components/RepairForm/index.tsx
+37
-4
index.tsx
...pplication/returnPrSubmit/components/ReturnForm/index.tsx
+17
-1
index.tsx
src/pages/transaction/components/orderMergeInfo/index.tsx
+2
-2
index.ts
...s/transaction/purchaseOrder/orderCollectB2b/apis/index.ts
+1
-1
usePaymentInfo.tsx
...on/purchaseOrder/orderCollectB2b/model/usePaymentInfo.tsx
+2
-2
index.ts
.../transaction/purchaseOrder/orderCollectCash/apis/index.ts
+1
-1
index.tsx
...ages/transaction/purchaseOrder/orderCollectCash/index.tsx
+1
-1
usePaymentInfo.tsx
...n/purchaseOrder/orderCollectCash/model/usePaymentInfo.tsx
+2
-2
index.tsx
...leOrder/agentOrder/components/productModalTable/index.tsx
+5
-14
index.ts
src/pages/transaction/saleOrder/agentOrder/effects/index.ts
+22
-1
No files found.
src/components/ModalTable/schema/index.ts
View file @
a616819c
...
...
@@ -34,16 +34,16 @@ export const productModalByMemberSchema: ISchema = {
"x-component-props"
:
{
placeholder
:
'请选择品类'
,
className
:
'fixed-ant-selected-down'
,
// 该类强制将显示的下拉框出现在select下, 只有这里出现问题, ??
fetchSearch
:
()
=>
{
let
merber
=
sessionStorage
.
getItem
(
'memberInfo'
);
let
meberInfo
=
JSON
.
parse
(
merber
)
return
new
Promise
(
resolve
=>
{
PublicApi
.
getProductSelectGetMemberCategory
({
name
:
''
,
...
meberInfo
}).
then
(
res
=>
{
console
.
log
(
res
.
data
,
10086
)
resolve
(
res
)
})
})
},
//
fetchSearch: () => {
//
let merber = sessionStorage.getItem('memberInfo');
//
let meberInfo = JSON.parse(merber)
//
return new Promise(resolve => {
//
PublicApi.getProductSelectGetMemberCategory({ name: '', ...meberInfo}).then(res => {
//
console.log(res.data, 10086)
//
resolve(res)
//
})
//
})
//
},
style
:
{
width
:
160
}
...
...
@@ -54,16 +54,16 @@ export const productModalByMemberSchema: ISchema = {
"x-component"
:
'SearchSelect'
,
"x-component-props"
:
{
placeholder
:
'请选择品牌'
,
fetchSearch
:
()
=>
{
let
merber
=
sessionStorage
.
getItem
(
'memberInfo'
);
let
meberInfo
=
JSON
.
parse
(
merber
)
return
new
Promise
(
resolve
=>
{
PublicApi
.
getProductSelectGetMemberBrand
({
name
:
''
,
...
meberInfo
}).
then
(
res
=>
{
console
.
log
(
res
.
data
,
10086
)
resolve
(
res
)
})
})
},
//
fetchSearch: () => {
//
let merber = sessionStorage.getItem('memberInfo');
//
let meberInfo = JSON.parse(merber)
//
return new Promise(resolve => {
//
PublicApi.getProductSelectGetMemberBrand({ name: '', ...meberInfo}).then(res => {
//
console.log(res.data, 10086)
//
resolve(res)
//
})
//
})
//
},
style
:
{
width
:
160
}
...
...
@@ -176,19 +176,6 @@ export const addOrderModalSchema: ISchema = {
},
},
properties
:
{
// customerCategoryId: {
// type: 'string',
// "x-component": 'SearchSelect',
// "x-component-props": {
// placeholder: '请选择品类',
// className: 'fixed-ant-selected-down',
// fetchSearch: PublicApi.getProductSelectGetMemberCategory,
// style: {
// width: 160
// },
// queryParams: {},
// }
// },
customerCategoryId
:
{
type
:
'string'
,
'x-component'
:
'CustomCategorySearch'
,
...
...
@@ -203,16 +190,31 @@ export const addOrderModalSchema: ISchema = {
},
brandId
:
{
type
:
'string'
,
"x-component"
:
'SearchSelect'
,
"x-component-props"
:
{
placeholder
:
'请选择品牌'
,
fetchSearch
:
PublicApi
.
getProductSelectGetMemberBrand
,
style
:
{
width
:
160
},
queryParams
:
{},
}
'x-component'
:
'CustomInputSearch'
,
'x-component-props'
:
{
placeholder
:
'商品品牌'
,
showSearch
:
true
,
showArrow
:
true
,
defaultActiveFirstOption
:
false
,
filterOption
:
false
,
notFoundContent
:
null
,
style
:
{
width
:
'174px'
},
searchValue
:
null
,
dataoption
:
[],
},
},
// brandId: {
// type: 'string',
// "x-component": 'SearchSelect',
// "x-component-props": {
// placeholder: '请选择品牌',
// fetchSearch: PublicApi.getProductSelectGetMemberBrand,
// style: {
// width: 160
// },
// queryParams: {},
// }
// },
submit
:
{
"x-component"
:
'Submit'
,
"x-mega-props"
:
{
...
...
src/pages/afterService/components/GoodsDrawer/index.tsx
View file @
a616819c
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-04 15:09:09
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-
08-23 09:59:10
* @LastEditTime: 2021-
10-26 10:32:48
* @Description: 维修商品抽屉组件
*/
import
React
from
'react'
;
...
...
@@ -180,7 +180,7 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
const
newData
:
{
[
key
:
string
]:
any
}[]
=
data
.
map
((
item
)
=>
({
...
item
,
id
:
item
.
orderId
,
products
:
item
.
products
.
map
(({
productId
,
...
rest
})
=>
({
products
:
item
.
products
.
map
(({
productId
,
logo
,
...
rest
})
=>
({
id
:
productId
,
...
rest
,
quantity
:
+
rest
.
quantity
,
...
...
@@ -193,6 +193,10 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
orderType
:
item
.
orderType
,
contractId
:
item
.
contractId
,
contractNo
:
item
.
contractNo
,
skuPic
:
logo
,
shopId
:
item
.
shopId
,
shopLogo
:
item
.
logo
,
shopName
:
item
.
vendorMemberName
,
})),
}));
newData
.
forEach
((
item
)
=>
{
...
...
src/pages/afterService/exchangeApplication/exchangePrSubmit/components/ExchangeForm/index.tsx
View file @
a616819c
...
...
@@ -360,6 +360,9 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
replaceId
,
manualReplaceGoodsAddress
,
returnBatch
,
shopName
,
shopId
,
shopLogo
,
...
rest
}
=
res
.
data
;
...
...
@@ -414,6 +417,9 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
orderId
:
item
.
orderId
,
},
associated
:
!
item
.
associatedProductId
?
''
:
`
${
item
.
associatedProductId
}
/
${
item
.
associatedProductName
}
/
${
item
.
associatedType
||
' '
}
/
${
item
.
associatedCategory
}
/
${
item
.
associatedBrand
}
`
,
shopName
,
shopId
,
shopLogo
,
})),
...
rest
,
});
...
...
@@ -585,7 +591,9 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
unit
,
extraData
,
associated
,
materielNameAndType
,
shopId
,
shopLogo
,
shopName
,
...
rest
})
=>
({
...
rest
,
...
...
@@ -594,7 +602,10 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
orderRecordId
:
extraData
.
id
,
replaceCount
:
+
replaceCount
,
})),
taskTypeKey
:
replaceGoodsList
[
0
].
extraData
.
taskTypeKey
,
taskTypeKey
:
replaceGoodsList
[
0
].
extraData
.
taskTypeKey
,
shopId
:
replaceGoodsList
[
0
].
shopId
,
shopLogo
:
replaceGoodsList
[
0
].
shopLogo
,
shopName
:
replaceGoodsList
[
0
].
shopName
,
};
PublicApi
.
postAsReplaceGoodsSave
(
payload
)
...
...
@@ -681,6 +692,10 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
associatedBrand
:
item
.
quotedBrand
||
''
,
associatedUnit
:
item
.
unit
||
''
,
skuId
:
item
.
skuId
,
skuPic
:
item
.
skuPic
,
shopId
:
item
.
shopId
,
shopLogo
:
item
.
shopLogo
,
shopName
:
item
.
shopName
,
};
value
.
push
(
atom
);
});
...
...
src/pages/afterService/repairApplication/repairPrSubmit/components/RepairForm/index.tsx
View file @
a616819c
...
...
@@ -90,6 +90,21 @@ const OrderNo = (props: OrderNoProps) => {
};
OrderNo
.
isFieldComponent
=
true
;
type
ExtraType
=
{
/**
* 商城名称
*/
shopName
:
string
,
/**
* 商城id
*/
shopId
:
number
,
/**
* 商城logo
*/
shopLogo
:
string
,
}
const
RepairForm
:
React
.
FC
<
BillsFormProps
>
=
({
id
,
isEdit
=
false
,
...
...
@@ -201,7 +216,7 @@ const RepairForm: React.FC<BillsFormProps> = ({
];
// 获取维修明细列表
const
getRepairGoods
=
()
=>
{
const
getRepairGoods
=
(
extra
:
ExtraType
)
=>
{
if
(
!
id
)
{
return
;
}
...
...
@@ -220,6 +235,7 @@ const RepairForm: React.FC<BillsFormProps> = ({
remaining
:
item
.
purchaseCount
||
0
,
// 已维修数量,这里取 采购数量判断即可
},
associated
:
!
item
.
associatedProductId
?
''
:
`
${
item
.
associatedProductId
}
/
${
item
.
associatedProductName
}
/
${
item
.
associatedType
||
' '
}
/
${
item
.
associatedCategory
}
/
${
item
.
associatedBrand
}
`
,
...
extra
,
})));
setGoodsValue
(
res
.
data
&&
res
.
data
.
data
?
res
.
data
.
data
.
map
(
item
=>
item
.
orderRecordId
)
:
[]);
}
...
...
@@ -254,6 +270,9 @@ const RepairForm: React.FC<BillsFormProps> = ({
outerRecordList
,
outerStatus
,
outerTaskList
,
shopName
,
shopId
,
shopLogo
,
...
rest
}
=
res
.
data
;
...
...
@@ -264,6 +283,12 @@ const RepairForm: React.FC<BillsFormProps> = ({
}
);
getRepairGoods
({
shopName
,
shopId
,
shopLogo
,
});
setOrderTypeValue
(
rest
.
orderType
);
setDetailInfo
({
...
detailInfo
,
...
...
@@ -377,7 +402,6 @@ const RepairForm: React.FC<BillsFormProps> = ({
useEffect
(()
=>
{
getDetailInfo
();
getOrderDetailInfo
();
getRepairGoods
();
},
[]);
const
handleAddGoods
=
()
=>
{
...
...
@@ -438,7 +462,9 @@ const RepairForm: React.FC<BillsFormProps> = ({
unit
,
extraData
,
associated
,
materielNameAndType
,
shopId
,
shopLogo
,
shopName
,
...
rest
})
=>
({
orderId
:
extraData
.
orderId
,
...
...
@@ -448,7 +474,10 @@ const RepairForm: React.FC<BillsFormProps> = ({
unit
:
unit
||
''
,
...
rest
,
})),
...
rest
,
...
rest
,
shopId
:
repairGoodsList
[
0
].
shopId
,
shopLogo
:
repairGoodsList
[
0
].
shopLogo
,
shopName
:
repairGoodsList
[
0
].
shopName
,
};
PublicApi
.
postAsRepairGoodsSave
(
payload
)
...
...
@@ -528,6 +557,10 @@ const RepairForm: React.FC<BillsFormProps> = ({
associatedBrand
:
item
.
quotedBrand
||
''
,
associatedUnit
:
item
.
unit
||
''
,
skuId
:
item
.
skuId
,
skuPic
:
item
.
skuPic
,
shopId
:
item
.
shopId
,
shopLogo
:
item
.
shopLogo
,
shopName
:
item
.
shopName
,
};
value
.
push
(
atom
);
});
...
...
src/pages/afterService/returnApplication/returnPrSubmit/components/ReturnForm/index.tsx
View file @
a616819c
...
...
@@ -368,6 +368,9 @@ const ReturnForm: React.FC<BillsFormProps> = ({
returnId
,
roleId
,
refundList
,
shopName
,
shopId
,
shopLogo
,
...
rest
}
=
res
.
data
;
...
...
@@ -417,6 +420,9 @@ const ReturnForm: React.FC<BillsFormProps> = ({
remaining
:
item
.
purchaseCount
||
0
,
// 可退货数量,这里取 采购数量判断即可
},
associated
:
!
item
.
associatedProductId
?
''
:
`
${
item
.
associatedProductId
}
/
${
item
.
associatedProductName
}
/
${
item
.
associatedType
||
' '
}
/
${
item
.
associatedCategory
}
/
${
item
.
associatedBrand
}
`
,
shopId
,
shopLogo
,
shopName
,
})),
...
rest
,
});
...
...
@@ -587,6 +593,9 @@ const ReturnForm: React.FC<BillsFormProps> = ({
associated
,
returnCount
,
refundAmount
,
shopId
,
shopLogo
,
shopName
,
...
rest
})
=>
({
...
rest
,
...
...
@@ -608,7 +617,10 @@ const ReturnForm: React.FC<BillsFormProps> = ({
};
}),
})),
taskTypeKey
:
returnGoodsList
[
0
].
extraData
.
taskTypeKey
,
taskTypeKey
:
returnGoodsList
[
0
].
extraData
.
taskTypeKey
,
shopId
:
returnGoodsList
[
0
].
shopId
,
shopLogo
:
returnGoodsList
[
0
].
shopLogo
,
shopName
:
returnGoodsList
[
0
].
shopName
,
};
PublicApi
.
postAsReturnGoodsSave
(
payload
)
...
...
@@ -707,6 +719,10 @@ const ReturnForm: React.FC<BillsFormProps> = ({
associatedBrand
:
item
.
quotedBrand
||
''
,
associatedUnit
:
item
.
unit
||
''
,
skuId
:
item
.
skuId
,
skuPic
:
item
.
skuPic
,
shopId
:
item
.
shopId
,
shopLogo
:
item
.
shopLogo
,
shopName
:
item
.
shopName
,
};
value
.
push
(
atom
);
});
...
...
src/pages/transaction/components/orderMergeInfo/index.tsx
View file @
a616819c
...
...
@@ -55,8 +55,8 @@ const OrderMergeInfo: React.FC<OrderMergeInfoProps> = (props) => {
</
div
>
}
</
div
>,
resetCol
:
{
flex
:
'1 1 100%'
}
},
{
title
:
'包装要求'
,
name
:
'requirement
.pageRequire
'
,
render
:
(
t
,
d
)
=>
d
.
requirement
.
detail
?.
pageRequire
||
''
},
{
title
:
'其他要求'
,
name
:
'requirement
.restsRequire
'
,
render
:
(
t
,
d
)
=>
d
.
requirement
.
detail
?.
restsRequire
||
''
},
{
title
:
'包装要求'
,
name
:
'requirement'
,
render
:
(
t
,
d
)
=>
d
.
requirement
.
detail
?.
pageRequire
||
''
},
{
title
:
'其他要求'
,
name
:
'requirement'
,
render
:
(
t
,
d
)
=>
d
.
requirement
.
detail
?.
restsRequire
||
''
},
]
return
(
...
...
src/pages/transaction/purchaseOrder/orderCollectB2b/apis/index.ts
View file @
a616819c
...
...
@@ -37,7 +37,7 @@ export const fetchOrderApi = {
},
/** 获取支付信息列表 */
async
getPayInfoList
(
params
)
{
const
{
data
}
=
await
PublicApi
.
postOrderBuyerCreate
B2b
PaymentFind
(
params
,
{
ctlType
:
'none'
})
const
{
data
}
=
await
PublicApi
.
postOrderBuyerCreatePaymentFind
(
params
,
{
ctlType
:
'none'
})
return
data
},
...
...
src/pages/transaction/purchaseOrder/orderCollectB2b/model/usePaymentInfo.tsx
View file @
a616819c
...
...
@@ -26,7 +26,7 @@ export const usePaymentInfo = (ctx: ISchemaFormActions | ISchemaFormAsyncActions
const
initPayWayList
=
(
memberId
,
memberRoleId
)
=>
{
let
result
=
[]
PublicApi
.
getOrderBuyerCreate
B2b
PayTypes
({
vendorMemberId
:
memberId
,
vendorRoleId
:
memberRoleId
}).
then
(
res
=>
{
PublicApi
.
getOrderBuyerCreatePayTypes
({
vendorMemberId
:
memberId
,
vendorRoleId
:
memberRoleId
}).
then
(
res
=>
{
const
{
data
=
[],
code
}
=
res
for
(
let
item
of
data
)
{
result
.
push
({
...
...
@@ -40,7 +40,7 @@ export const usePaymentInfo = (ctx: ISchemaFormActions | ISchemaFormAsyncActions
}
const
getPayLists
=
(
memberId
,
memberRoleId
)
=>
{
PublicApi
.
postOrderBuyerCreate
B2b
PaymentFind
({
PublicApi
.
postOrderBuyerCreatePaymentFind
({
memberId
,
roleId
:
memberRoleId
,
shopId
:
products
[
0
][
'shopId'
],
...
...
src/pages/transaction/purchaseOrder/orderCollectCash/apis/index.ts
View file @
a616819c
...
...
@@ -37,7 +37,7 @@ export const fetchOrderApi = {
},
/** 获取支付信息列表 */
async
getPayInfoList
(
params
)
{
const
{
data
}
=
await
PublicApi
.
postOrderBuyerCreate
B2b
PaymentFind
(
params
,
{
ctlType
:
'none'
})
const
{
data
}
=
await
PublicApi
.
postOrderBuyerCreatePaymentFind
(
params
,
{
ctlType
:
'none'
})
return
data
},
...
...
src/pages/transaction/purchaseOrder/orderCollectCash/index.tsx
View file @
a616819c
...
...
@@ -296,7 +296,7 @@ const AgentOrderDetail:React.FC<AgentOrderDetailProps> = () => {
params
.
shopName
=
shop
[
'label'
]
if
(
id
)
{
fnResult
=
await
PublicApi
.
postOrderBuyerCreateUpdate
({...
_params
,
orderId
:
id
})
fnResult
=
await
PublicApi
.
postOrderBuyerCreate
Purchase
Update
({...
_params
,
orderId
:
id
})
}
else
{
fnResult
=
await
PublicApi
.
postOrderBuyerCreatePurchase
(
_params
)
}
...
...
src/pages/transaction/purchaseOrder/orderCollectCash/model/usePaymentInfo.tsx
View file @
a616819c
...
...
@@ -26,7 +26,7 @@ export const usePaymentInfo = (ctx: ISchemaFormActions | ISchemaFormAsyncActions
const
initPayWayList
=
(
memberId
,
memberRoleId
)
=>
{
let
result
=
[]
PublicApi
.
getOrderBuyerCreate
B2b
PayTypes
({
vendorMemberId
:
memberId
,
vendorRoleId
:
memberRoleId
}).
then
(
res
=>
{
PublicApi
.
getOrderBuyerCreatePayTypes
({
vendorMemberId
:
memberId
,
vendorRoleId
:
memberRoleId
}).
then
(
res
=>
{
const
{
data
=
[],
code
}
=
res
for
(
let
item
of
data
)
{
result
.
push
({
...
...
@@ -40,7 +40,7 @@ export const usePaymentInfo = (ctx: ISchemaFormActions | ISchemaFormAsyncActions
}
const
getPayLists
=
(
memberId
,
memberRoleId
)
=>
{
PublicApi
.
postOrderBuyerCreate
B2b
PaymentFind
({
PublicApi
.
postOrderBuyerCreatePaymentFind
({
memberId
,
roleId
:
memberRoleId
,
shopId
:
products
[
0
][
'shopId'
],
...
...
src/pages/transaction/saleOrder/agentOrder/components/productModalTable/index.tsx
View file @
a616819c
...
...
@@ -11,8 +11,9 @@ import Search from '@/components/NiceForm/components/Search'
import
SearchSelect
from
'@/components/NiceForm/components/SearchSelect'
;
import
Submit
from
'@/components/NiceForm/components/Submit'
;
import
DateSelect
from
'@/components/NiceForm/components/DateSelect'
;
import
{
searchCustomerCategoryOptionEffect
}
from
'../../effects'
import
{
search
BrandOptionEffect
,
search
CustomerCategoryOptionEffect
}
from
'../../effects'
import
CustomCategorySearch
from
'@/components/NiceForm/components/CustomCategorySearch'
import
CustomInputSearch
from
'@/components/NiceForm/components/CustomInputSearch'
export
interface
ProductModalTableProps
extends
ModalTableProps
{
type
?:
'radio'
|
'checkbox'
,
...
...
@@ -130,7 +131,6 @@ const ProductModalTable:React.FC<ProductModalTableProps> = (props) => {
v
.
shopId
=
schemaAction
.
getFieldValue
(
'shopId'
)
return
v
})
console
.
log
(
newData
,
'nnn'
)
schemaAction
.
setFieldValue
(
'products'
,
await
filterProductDataById
([],
newData
))
confirmModal
&&
confirmModal
()
setVisible
(
false
)
...
...
@@ -175,7 +175,7 @@ const ProductModalTable:React.FC<ProductModalTableProps> = (props) => {
formilyProps=
{
{
ctx
:
{
schema
:
addOrderModalSchema
,
components
:
{
ModalSearch
:
Search
,
SearchSelect
,
Submit
,
DateSelect
,
CustomCategorySearch
},
components
:
{
ModalSearch
:
Search
,
SearchSelect
,
Submit
,
DateSelect
,
CustomCategorySearch
,
CustomInputSearch
},
effects
:
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
...
...
@@ -183,20 +183,11 @@ const ProductModalTable:React.FC<ProductModalTableProps> = (props) => {
'name'
,
FORM_FILTER_PATH
,
);
// actions.setFieldState('customerCategoryId', state =>
{
// state.props['x-component-props'].queryParams =
{
// memberId: schemaAction.getFieldValue('supplyMembersId'),
// memberRoleId: schemaAction.getFieldValue('supplyMembersRoleId')
//
}
//
})
FormEffectHooks
.
onFieldChange$
(
'customerCategoryId'
).
subscribe
(
state
=>
{
searchCustomerCategoryOptionEffect
(
schemaAction
,
actions
,
'customerCategoryId'
)
})
actions
.
setFieldState
(
'brandId'
,
state
=>
{
state
.
props
[
'x-component-props'
].
queryParams
=
{
memberId
:
schemaAction
.
getFieldValue
(
'supplyMembersId'
),
memberRoleId
:
schemaAction
.
getFieldValue
(
'supplyMembersRoleId'
)
}
FormEffectHooks
.
onFieldChange$
(
'brandId'
).
subscribe
(
state
=>
{
searchBrandOptionEffect
(
schemaAction
,
actions
,
'brandId'
)
})
}
}
...
...
src/pages/transaction/saleOrder/agentOrder/effects/index.ts
View file @
a616819c
...
...
@@ -192,8 +192,8 @@ export const useInvoiceList = (ctx: ISchemaFormActions | ISchemaFormAsyncActions
}
}
// 高级筛选schema中用于输入搜索商品品类的Effect
/**
* 高级筛选schema中用于获取供应商 商品品类Effect
* @param ctx 外部表单action
* @param mctx 模态框表单action
* @param fieldName 字段名称
...
...
@@ -203,6 +203,7 @@ export const searchCustomerCategoryOptionEffect = (ctx: any, mctx: any, fieldNam
params
[
'memberId'
]
=
ctx
.
getFieldValue
(
'vendorMemberId'
)
params
[
'memberRoleId'
]
=
ctx
.
getFieldValue
(
'vendorRoleId'
)
mctx
.
getFieldState
(
fieldName
,
state
=>
{
// params['name'] = state.props['x-component-props'].searchValue
PublicApi
.
getProductCustomerGetMemberCustomerCategoryTree
(
params
).
then
(
res
=>
{
mctx
.
setFieldState
(
fieldName
,
state
=>
{
state
.
props
[
'x-component-props'
].
dataoption
=
res
.
data
...
...
@@ -210,3 +211,23 @@ export const searchCustomerCategoryOptionEffect = (ctx: any, mctx: any, fieldNam
})
})
}
/**
* 高级筛选schema中用于获取供应商 商品品牌Effect
* @param ctx 外部表单action
* @param mctx 模态框表单action
* @param fieldName 字段名称
*/
export
const
searchBrandOptionEffect
=
(
ctx
:
any
,
mctx
:
any
,
fieldName
:
string
)
=>
{
const
params
:
any
=
{}
params
[
'memberId'
]
=
ctx
.
getFieldValue
(
'vendorMemberId'
)
params
[
'memberRoleId'
]
=
ctx
.
getFieldValue
(
'vendorRoleId'
)
mctx
.
getFieldState
(
fieldName
,
state
=>
{
params
[
'name'
]
=
state
.
props
[
'x-component-props'
].
searchValue
PublicApi
.
getProductSelectGetMemberBrand
(
params
).
then
(
res
=>
{
mctx
.
setFieldState
(
fieldName
,
state
=>
{
state
.
props
[
'x-component-props'
].
dataoption
=
res
.
data
})
})
})
}
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