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
05dfe4d1
Commit
05dfe4d1
authored
Feb 22, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 下单中选商品高级筛选品类切换为树的模式
parent
4605d602
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
174 additions
and
166 deletions
+174
-166
index.ts
src/components/ModalTable/schema/index.ts
+22
-22
SearchSelect.tsx
src/components/NiceForm/components/SearchSelect.tsx
+1
-0
index.less
src/pages/transaction/components/orderPayModal/index.less
+138
-132
index.tsx
src/pages/transaction/components/orderPayModal/index.tsx
+3
-3
index.tsx
...Order/orderCollect/components/productModalTable/index.tsx
+8
-8
index.ts
...s/transaction/purchaseOrder/orderCollect/effects/index.ts
+2
-1
No files found.
src/components/ModalTable/schema/index.ts
View file @
05dfe4d1
...
...
@@ -176,31 +176,31 @@ 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',
// 'x-component-props': {
// placeholder: '商品品类',
// showSearch: true,
// notFoundContent: null,
// style: { width: '174px' },
// dataoption: [],
// fieldNames: { label: 'title', value: 'id', children: 'children' },
// },
// "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'
,
'x-component-props'
:
{
placeholder
:
'商品品类'
,
showSearch
:
true
,
notFoundContent
:
null
,
style
:
{
width
:
'174px'
},
dataoption
:
[],
fieldNames
:
{
label
:
'title'
,
value
:
'id'
,
children
:
'children'
},
},
},
brandId
:
{
type
:
'string'
,
"x-component"
:
'SearchSelect'
,
...
...
src/components/NiceForm/components/SearchSelect.tsx
View file @
05dfe4d1
...
...
@@ -11,6 +11,7 @@ const SelectContent = (props) => {
<
div
style=
{
{
padding
:
'12px'
}
}
>
<
Input
.
Search
onChange=
{
handleChange
}
placeholder=
"按拼音搜索"
/>
</
div
>
{
props
.
children
}
...
...
src/pages/transaction/components/orderPayModal/index.less
View file @
05dfe4d1
.payRadio {
min-width: 130px;
padding: 4px 6px;
background: #fff;
text-align: center;
font-size: 12px;
color: #606266;
border:1px solid rgba(235,236,240,1);
cursor: pointer;
margin-right: 12px;
margin-bottom: 12px;
&:last-child {
margin-right: 0;
}
&.active {
border-color: #00B382;
position: relative;
&::after {
content: '';
position: absolute;
bottom: 0;
right: 0;
width: 0;
height: 0;
border: 6px solid transparent;
border-right: 6px solid #00B382;
border-bottom: 6px solid #00B382;
}
}
}
.radioBox {
display: flex;
flex-wrap: wrap;
}
.title {
display: inline-block;
width: 122px;
font-weight: 400;
}
.amount {
font-size: 24px;
font-weight: 500;
color: #172B4D;
}
.amount1 {
font-size: 16px;
}
.amount2 {
font-size: 16px;
color: #E63F3B;
}
// 支付密码
.payContainer {
margin: 90px 0;
text-align: center;
.title {
font-size: 14px;
font-weight: 400;
color: #6B778C;
margin-bottom: 24px;
}
.inputBox {
position: relative;
width: 336px;
margin: 0 auto;
display: flex;
justify-content: space-between;
font-weight: bold;
.codeItem {
width: 48px;
height: 48px;
line-height: 0.5;
text-align: center;
background: #FFFFFF;
border: 1px solid #EBECF0;
font-size: 80px;
}
.codeInput {
height: 48px;
position: absolute;
outline: none;
color: transparent;
caret-color: #EBECF0;
font-size: 28px;
padding: 0 14px;
letter-spacing: 48px;
width: 336px;
border: none;
background: none;
-webkit-appearance: none;
&:focus {
border: none!important;
box-shadow: 0 0 0 0 #fff;
}
&::-webkit-input-safebox-button{
display: none;
}
}
}
}
// 扫码
.qrCodeImage {
text-align: center;
width: 224px;
height: 224px;
margin: 20px auto 42px;
&>img {
display: block;
width: 100%;
height: 100%;
}
}
.scanTips {
display: flex;
justify-content: center;
align-items: center;
color: #6b778c;
margin-bottom: 18px;
.scanIcon {
font-size: 30px;
margin-right: @margin-sm;
}
}
\ No newline at end of file
.payRadio {
min-width: 130px;
padding: 4px 6px;
background: #fff;
text-align: center;
font-size: 12px;
color: #606266;
border:1px solid rgba(235,236,240,1);
cursor: pointer;
margin-right: 12px;
margin-bottom: 12px;
&:last-child {
margin-right: 0;
}
&.active {
border-color: #00B382;
position: relative;
&::after {
content: '';
position: absolute;
bottom: 0;
right: 0;
width: 0;
height: 0;
border: 6px solid transparent;
border-right: 6px solid #00B382;
border-bottom: 6px solid #00B382;
}
}
}
.radioBox {
display: flex;
flex-wrap: wrap;
}
.title {
display: inline-block;
width: 122px;
font-weight: 400;
}
.amount {
font-size: 24px;
font-weight: 500;
color: #172B4D;
}
.amount1 {
font-size: 16px;
}
.amount2 {
font-size: 16px;
color: #E63F3B;
}
// 支付密码
.payContainer {
// 禁用选择
// -moz-user-select: none;
// -webkit-user-select: none;
// -ms-user-select: none;
// -khtml-user-select: none;
// user-select: none;
margin: 90px 0;
text-align: center;
.title {
font-size: 14px;
font-weight: 400;
color: #6B778C;
margin-bottom: 24px;
}
.inputBox {
position: relative;
width: 336px;
margin: 0 auto;
display: flex;
justify-content: space-between;
font-weight: bold;
.codeItem {
width: 48px;
height: 48px;
line-height: 0.5;
text-align: center;
background: #FFFFFF;
border: 1px solid #EBECF0;
font-size: 80px;
}
.codeInput {
height: 48px;
position: absolute;
outline: none;
color: transparent;
caret-color: #EBECF0;
font-size: 28px;
padding: 0 14px;
letter-spacing: 48px;
width: 336px;
border: none;
background: none;
-webkit-appearance: none;
&:focus {
border: none!important;
box-shadow: 0 0 0 0 #fff;
}
&::-webkit-input-safebox-button{
display: none;
}
}
}
}
// 扫码
.qrCodeImage {
text-align: center;
width: 224px;
height: 224px;
margin: 20px auto 42px;
&>img {
display: block;
width: 100%;
height: 100%;
}
}
.scanTips {
display: flex;
justify-content: center;
align-items: center;
color: #6b778c;
margin-bottom: 18px;
.scanIcon {
font-size: 30px;
margin-right: @margin-sm;
}
}
src/pages/transaction/components/orderPayModal/index.tsx
View file @
05dfe4d1
import
React
,
{
useState
,
useEffect
,
useContext
,
useRef
}
from
'react'
import
{
Modal
,
Steps
,
Row
,
Col
,
Spin
,
message
,
Upload
,
Button
,
Input
}
from
'antd'
import
{
Modal
,
Steps
,
Row
,
Col
,
Spin
,
message
,
Upload
,
Button
,
Input
,
Form
}
from
'antd'
import
style
from
'./index.less'
import
{
OrderDetailContext
}
from
'../../_public/order/context'
import
cx
from
'classnames'
...
...
@@ -11,7 +11,6 @@ import { history } from 'umi'
import
{
useHttpRequest
}
from
'@/hooks/useHttpRequest'
import
{
encryptedByAES
}
from
'@/utils/cryptoAes'
import
QRCode
from
'qrcode'
import
{
cond
}
from
'lodash'
export
interface
OrderPayModalProps
{
currentRef
:
any
,
...
...
@@ -552,7 +551,7 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
className=
{
style
.
codeItem
}
key=
{
index
}
>
{
code
[
index
]?.
replace
(
/
[
0-9
]
/g
,
'·'
)
}
{
code
[
index
]?.
replace
(
/
[
0-9
]
/g
,
'·'
)
}
</
div
>)
}
<
Input
.
Password
...
...
@@ -562,6 +561,7 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
onChange=
{
onChange
}
visibilityToggle=
{
false
}
readOnly=
{
true
}
autoComplete=
"new-password"
onFocus=
{
(
e
)
=>
e
.
target
.
removeAttribute
(
'readonly'
)
}
onBlur=
{
(
e
)
=>
e
.
target
.
setAttribute
(
'readonly'
,
'true'
)
}
/>
...
...
src/pages/transaction/purchaseOrder/orderCollect/components/productModalTable/index.tsx
View file @
05dfe4d1
...
...
@@ -226,15 +226,15 @@ 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('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'
),
...
...
src/pages/transaction/purchaseOrder/orderCollect/effects/index.ts
View file @
05dfe4d1
...
...
@@ -366,7 +366,8 @@ export const searchCustomerCategoryOptionEffect = (ctx: any, mctx: any, fieldNam
params
[
'memberId'
]
=
ctx
.
getFieldValue
(
'supplyMembersId'
)
params
[
'memberRoleId'
]
=
ctx
.
getFieldValue
(
'supplyMembersRoleId'
)
mctx
.
getFieldState
(
fieldName
,
state
=>
{
PublicApi
.
getProductSelectGetMemberCategory
(
params
).
then
(
res
=>
{
// PublicApi.getProductSelectGetMemberCategory(params).then(res => {
PublicApi
.
getProductCustomerGetMemberCustomerCategoryTree
(
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