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

fix:交易规则配置

parent c39b0484
......@@ -235,17 +235,18 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
useEffect(() => {
async function getInitValue() {
const { data } = await PublicApi.getOrderTradingRulesDetails({id: id});
const { data } = await PublicApi.getOrderTradingRulesDetails({id: id})
if(data.isTacitlyApprove === 2) {
const res = await getBindingProducts({id: id.toString(), current: '1', pageSize: '10'});
addSchemaAction.setFieldState('products', (state) => {
const res = await getBindingProducts({id: id.toString(), current: '1', pageSize: '10'})
addSchemaAction.setFieldState('products', state => {
state.value = res.data
})
setProductsLength(res.totalCount);
setProductsLength(res.totalCount)
}
addSchemaAction.setFieldValue('isElectronicContract', data?.isElectronicContract ? true : false)
addSchemaAction.setFieldValue('transactionProcesssId', data?.transactionProcesssId)
addSchemaAction.setFieldValue('isTacitlyApprove', data?.isTacitlyApprove)
addSchemaAction.setFieldValue('isElectronicContract', data.isElectronicContract ? true : false)
addSchemaAction.setFieldValue('transactionProcesssId', data.transactionProcesssId)
console.log(data)
addSchemaAction.setFieldValue('isTacitlyApprove', data.isTacitlyApprove)
setInitialValue(data)
}
if(id != '') {
......@@ -263,7 +264,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
if(id !== '') {
const result = await getBindingProducts({id, current: page.toString(), pageSize: size.toString()})
addSchemaAction.setFieldValue('products', result.data)
}
}
}
return (
......@@ -291,7 +292,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
state.visible = parentState.value
})
})
$('onFieldValueChange', 'shopIds').subscribe(parentState => {
$('onFieldInputChange', 'shopIds').subscribe(parentState => {
setFieldState('isTacitlyApprove', state => {
state.value = 1
})
......
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