import { Button, Row, Col, InputNumber, Modal, message } from 'antd'; import {observer} from 'mobx-react'; import { WeaSearchGroup, WeaFormItem, WeaDialog, WeaUpload, WeaProgress, WeaLocaleProvider, WeaTableEditable, WeaNewScroll } from 'ecCom'; import { WeaSwitch } from "comsMobx" import { toJS } from "mobx" const getLabel = WeaLocaleProvider.getLabel; @observer class FeedBackInfoDialog extends React.Component { constructor(props) { super(props); this.state={ width:1020, height:650, } } render() { const {feedBackInfoStore} = this.props; const {visible,handleFeedBackInfoDialog,fieldinfo,form,setFormFields,title,mxdatas,setMxDatas} = feedBackInfoStore; const { isFormInit } = form; const columns = [{ title: 'id', dataIndex: 'id', width: '0%', com: [ {type: 'INPUT', key: 'id'} ], colSpan: 0 },{ title: {getLabel('22069', '完成情况')}, dataIndex: 'ctx', width: '50%', com: [ {type: 'INPUT', key: 'ctx'} ], }, { title: {getLabel('156', '附件')}, dataIndex: 'attach', key: 'attach', width: '50%', com: [ { type: 'CUSTOM', key: 'attach', render: (text, record, number, onEdit) => { return ( { onEdit({ type: "CUSTOM", record: { ...record, }, index : record.key, key: "attach", value: list }); } } />) } } ], } ] let group = []; const formParams = form.getFormParams(); isFormInit && fieldinfo.map((c,i) => { let items = []; c.items.map(fields => { let hide = false; let dom; let hasunderline = false; //只读样式控制 let stylecss = { 'margin-right': '5px', 'margin-top': '6px' }; if (fields.viewAttr == "1" || (fields.conditionType == "BROWSER" && fields.browserConditionParam.viewAttr == "1")) { hasunderline = true; stylecss = { 'margin-right': '5px', 'margin-top': '16px' }; } if (fields.domkey[0] == "finish") { if (fields.viewAttr == "1") { dom = {fields.befSpan || ""} } else { dom = { this.checkProgress(v); }} /> % } }else { dom = ; } if (hasunderline) { items.push({ com: ( {dom} ), colSpan: 1, hide: hide }); } else { items.push({ com: ( {dom} ), colSpan: 1, hide: hide }); } }); group.push() }); return (
handleFeedBackInfoDialog(false)} buttons={this.getDialogButtons()} > {group} { setMxDatas(datas); }} />
) } getDialogButtons(){ const {store,prjid,feedBackInfoStore} = this.props; let btn = []; btn.push(); btn.push(); return btn } checkProgress = (value) => { //进度编辑校验 const { finishmax, setFormFields } = this.props.feedBackInfoStore; if (Number(finishmax) == 99) { if (value > 99) { message.error(getLabel(383829, "该任务所必须的相关文档或者相关流程不存在,任务不能完成100%。")); setFormFields({ finish: { value: 99 } }); } else { setFormFields({ finish: { value: value } }); } } else { if (value > 100) { setFormFields({ finish: { value: 100 } }); } else { setFormFields({ finish: { value: value } }); } } } } export default FeedBackInfoDialog;