import {Form, Input, Button, } from 'antd'; import {WeaDialog ,WeaTools,WeaFormItem,WeaSearchGroup,WeaLocaleProvider} from 'ecCom'; import {WeaSwitch} from "comsMobx" import {inject, observer} from "mobx-react"; import {toJS} from 'mobx'; const getLabel = WeaLocaleProvider.getLabel; @observer class RelateCrmDialog extends React.Component { constructor(props) { super(props); this.state={ visible:false, conditioninfo: [ { "items": [ { "conditionType": "BROWSER", 'rules': 'required|string', // 校验规则 "labelcol": 6, "colSpan": 2, "viewAttr": 3, "value": "1", "domkey": [ "crmid" ], "fieldcol": 16, "label": getLabel(136,"客户"), "browserConditionParam": { "isAutoComplete": 1, "isDetail": 0, "title": getLabel(136,"客户"), "linkUrl": "/crm/data/ViewCustomer.jsp?CustomerID=", "isMultCheckbox": false, "hasAdd": false, "viewAttr": 2, "dataParams": {}, "hasAdvanceSerach": true, "isSingle": true, "replaceDatas": [], "type": "7" } },{ "conditionType": "INPUT", "labelcol":6, "colSpan": 2, "viewAttr": 2, "value": "", "domkey": [ "reasondesc" ], "fieldcol": 16, "label": getLabel(433,"描述"), } ] } ] } } componentDidMount(){ const {relateCrmform} = this.props.contentStore; relateCrmform.initFormFields(this.state.conditioninfo); } render() { const {contentStore,} = this.props; const {crmType,crmVisible,handleRelateCrmDialog} = contentStore; return (
{handleRelateCrmDialog(false)}} style={{width:'500px', height:'220px'}} > {this.getSearchs()}
) } getButtons(){ const {contentStore,} = this.props; let btnArr = []; btnArr.push() btnArr.push() return btnArr; } getSearchs() { const { relateCrmform } = this.props.contentStore; const {isFormInit} = relateCrmform; let group = []; isFormInit && this.state.conditioninfo.map((c,i) =>{ let items = []; c.items.map((field,index) => { items.push({ com:( ), colSpan:1 }) }); group.push() }); return group; } } export default RelateCrmDialog;