Commit 4aeb5a87 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix:

parent 6d86ab1b
......@@ -17,8 +17,6 @@ import { constructTableData, transformDataForNiceForm } from '../../effect'
import PriceModal from './priceModal'
import ProductModal from './productModal'
import MemberModal from './memberModal'
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect'
import { fectchShopListsSource } from '@/utils/type'
const { Search } = Input
......@@ -29,10 +27,6 @@ export interface PriceSettingProps {
formSubmit?(values),
}
const fetchShopLists = async () => {
return await fectchShopListsSource({type: 1})
}
const PriceSetting:React.FC<PriceSettingProps> = (props) => {
const { addSchemaAction, schema, formSubmit, onFieldChange = () => {} } = props
const priceRef = useRef<any>({})
......@@ -98,6 +92,7 @@ const PriceSetting:React.FC<PriceSettingProps> = (props) => {
}
const handleSetProductPrice = (record: any) => {
console.log(record, 'record')
if(record?.id) {
priceRef.current.setVisible(true)
priceRef.current.setCurrentSetPriceRow(record)
......@@ -230,7 +225,7 @@ const PriceSetting:React.FC<PriceSettingProps> = (props) => {
FormEffectHooks.onFormInputChange$().subscribe(() => {
onFieldChange()
})
useAsyncSelect('shopId', fetchShopLists, ['name', 'id'])
$('onFieldValueChange', 'shopId').subscribe(parentState => {
if (parentState.value) {
ctx.setFieldState('shopId', state => {
......
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