提交 22a66d77 authored 作者: 钟是志's avatar 钟是志

24451 学生资助管理/师生捐款“春风基金--突发事件”特困生补助/特困生补助申请,201901030228 这个附件上传字段 加星必填的功能没有限制到

上级 3692dab1
...@@ -152,6 +152,7 @@ class UploadCom extends React.Component { ...@@ -152,6 +152,7 @@ class UploadCom extends React.Component {
}; };
render() { render() {
// console.log(this.props.value);
const { files, previewVisible, previewImage, previewImageName } = this.state; const { files, previewVisible, previewImage, previewImageName } = this.state;
const { isMultiple, accept, btnName, disabled } = this.props; const { isMultiple, accept, btnName, disabled } = this.props;
const props = { const props = {
......
...@@ -1429,6 +1429,10 @@ export default class tableCom extends Component { ...@@ -1429,6 +1429,10 @@ export default class tableCom extends Component {
</> </>
); );
} }
// if(json.comName !== 'UploadCom'){
// return null;
// }
if (json.comName == 'Excel') { if (json.comName == 'Excel') {
const value = getCellValue(i, j, currentFormTitle); const value = getCellValue(i, j, currentFormTitle);
const xx = ( const xx = (
...@@ -2460,8 +2464,6 @@ export default class tableCom extends Component { ...@@ -2460,8 +2464,6 @@ export default class tableCom extends Component {
otherProps = {}; otherProps = {};
} }
} }
console.log(otherProps);
if (get === 'mobile') { if (get === 'mobile') {
cm = getFieldDecorator(dataColumn.base52, { cm = getFieldDecorator(dataColumn.base52, {
initialValue: initValue, initialValue: initValue,
...@@ -3049,20 +3051,23 @@ export default class tableCom extends Component { ...@@ -3049,20 +3051,23 @@ export default class tableCom extends Component {
if (initValue != null && !isEmpty(initValue.files)) { if (initValue != null && !isEmpty(initValue.files)) {
files = initValue.files; files = initValue.files;
} }
// console.log(dataColumn.base52);
cm = getFieldDecorator(dataColumn.base52, { cm = getFieldDecorator(dataColumn.base52, {
initialValue: { files: files }, initialValue: { files, },
rules: [ rules: [
{ {
validator: (rule, value, callback) => { required,
if (value.files.length == 0 && required != null && required) { message: '请选择附件',
var errors = [];
validator: (rule, valueUploadCom, callback) => {
// console.log(valueUploadCom, rule, );
var errors = [];
// errors.push(new Error('至少上传一个', rule.field));
if ((!valueUploadCom || valueUploadCom?.files.length === 0) && required) {
errors.push(new Error('至少上传一个', rule.field)); errors.push(new Error('至少上传一个', rule.field));
} }
callback(errors); callback(errors);
}, },
required: required,
message: '请选择附件',
}, },
], ],
})( })(
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论