Commit 05dfe4d1 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix: 下单中选商品高级筛选品类切换为树的模式

parent 4605d602
......@@ -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',
......
......@@ -11,6 +11,7 @@ const SelectContent = (props) => {
<div style={{padding: '12px'}}>
<Input.Search
onChange={handleChange}
placeholder="按拼音搜索"
/>
</div>
{props.children}
......
.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;
}
}
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')}
/>
......
......@@ -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'),
......
......@@ -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
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment