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
linweijiong
jinfa-platform
Commits
7dc42c14
Commit
7dc42c14
authored
Oct 26, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 询价下单/现货下单接口共用替换
parent
38534b91
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
80 additions
and
66 deletions
+80
-66
index.ts
src/components/ModalTable/schema/index.ts
+44
-42
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 @
7dc42c14
...
...
@@ -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/transaction/components/orderMergeInfo/index.tsx
View file @
7dc42c14
...
...
@@ -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 @
7dc42c14
...
...
@@ -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 @
7dc42c14
...
...
@@ -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 @
7dc42c14
...
...
@@ -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 @
7dc42c14
...
...
@@ -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 @
7dc42c14
...
...
@@ -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 @
7dc42c14
...
...
@@ -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 @
7dc42c14
...
...
@@ -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