Commit 2033f7a2 authored by XieZhiXiong's avatar XieZhiXiong

chore: 去掉数量校验

parent 2f3ccddc
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2020-11-03 18:30:47 * @Date: 2020-11-03 18:30:47
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-24 10:36:02 * @LastEditTime: 2021-01-21 16:26:34
* @Description: 联动逻辑相关 * @Description: 联动逻辑相关
*/ */
import { Modal } from 'antd'; import { Modal } from 'antd';
...@@ -61,18 +61,19 @@ export const useBusinessEffects = (context, actions) => { ...@@ -61,18 +61,19 @@ export const useBusinessEffects = (context, actions) => {
state => state.value.remaining, state => state.value.remaining,
); );
setFieldState( // 不需要做数量校验
FormPath.transform(name, /\d/, $1 => { // setFieldState(
return `replaceGoodsList.${$1}.replaceCount` // FormPath.transform(name, /\d/, $1 => {
}), // return `replaceGoodsList.${$1}.replaceCount`
state => { // }),
if (+value > replacedCountValue) { // state => {
state.errors = '填写值已超过最大可换货数量,请重新填写'; // if (+value > replacedCountValue) {
} else { // state.errors = '填写值已超过最大可换货数量,请重新填写';
state.errors = ''; // } else {
} // state.errors = '';
} // }
); // }
// );
}); });
// 供应会员联动 单据明细 // 供应会员联动 单据明细
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2020-11-03 18:30:47 * @Date: 2020-11-03 18:30:47
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-17 10:32:48 * @LastEditTime: 2021-01-21 16:26:00
* @Description: 联动逻辑相关 * @Description: 联动逻辑相关
*/ */
import { Modal } from 'antd'; import { Modal } from 'antd';
...@@ -38,18 +38,19 @@ export const useBusinessEffects = (context, actions) => { ...@@ -38,18 +38,19 @@ export const useBusinessEffects = (context, actions) => {
state => state.value.remaining, state => state.value.remaining,
); );
setFieldState( // 不需要做数量校验
FormPath.transform(name, /\d/, $1 => { // setFieldState(
return `repairGoodsList.${$1}.repairCount` // FormPath.transform(name, /\d/, $1 => {
}), // return `repairGoodsList.${$1}.repairCount`
state => { // }),
if (+value > repairedCountValue) { // state => {
state.errors = '填写值已超过最大可维修数量,请重新填写'; // if (+value > repairedCountValue) {
} else { // state.errors = '填写值已超过最大可维修数量,请重新填写';
state.errors = ''; // } else {
} // state.errors = '';
} // }
); // }
// );
}); });
// 供应会员联动 单据明细 // 供应会员联动 单据明细
......
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