提交 074be2ba authored 作者: 徐立's avatar 徐立
......@@ -475,6 +475,7 @@ export default class ZdyTable extends Component {
j={j} // 当前行数下班
fatherCode={fatherCode}
index={index}
fatherObj={this.props.fatherObj}
datas={datas}
uuid={cell.uuid}
isEdit={isEdit}
......@@ -553,6 +554,7 @@ export default class ZdyTable extends Component {
fatherCode={fatherCode}
datas={datas}
isEdit={isEdit}
fatherObj={this.props.fatherObj}
formKey={currentFormKey}
init={init}
get={get}
......
......@@ -119,7 +119,7 @@ export default class ChildForm extends React.Component {
return ""
}
return <Row key={r} gutter={gutter} ><Col style={{ textAlign: 'right' }} span={isEdit ? 23 : span} >
<ZdyTable key={r} formConfig={datas} get='mobile' fatherCode={base52} isEdit={isEdit} index={r} obj={objs[r]} init={objs} isChild={true} form={form} mapData={mapData} sqlData={sqlData} {...datas} defaultValues={defaultValues} />
<ZdyTable key={r} formConfig={datas} get='mobile' fatherCode={base52} isEdit={isEdit} index={r} obj={objs[r]} fatherObj={this.props.fatherObj} init={objs} isChild={true} form={form} mapData={mapData} sqlData={sqlData} {...datas} defaultValues={defaultValues} />
{rights.includes("delete") && isEdit ? <Button type='danger' onClick={this.delete.bind(this, r)}>{deleteName || "删除"} </Button> : ''}
</Col>
</Row>
......@@ -142,7 +142,7 @@ export default class ChildForm extends React.Component {
span={span}
>
<ZdyTable formConfig={datas} key={r} fatherCode={base52} isEdit={isEdit} index={r} obj={objs[r]} init={objs} isChild={true} get="web" form={form} mapData={mapData} sqlData={sqlData} {...datas} defaultValues={defaultValues} />
<ZdyTable formConfig={datas} key={r} fatherCode={base52} isEdit={isEdit} index={r} obj={objs[r]} fatherObj={this.props.fatherObj} init={objs} isChild={true} get="web" form={form} mapData={mapData} sqlData={sqlData} {...datas} defaultValues={defaultValues} />
{rights.includes("delete") && isEdit ? <Button size="small"
style={{ position: "absolute", right: 10, top: '50%',transform:'translateY(-50%)' }}
......
......@@ -938,7 +938,7 @@ export default class tableCom extends Component {
}
sqlUtil = (base52, json,orgCallback, sqlKey, params, callback, options = {}) => {
//查缓存
var isChange = false;
const { sqlKeys } = this.state
......@@ -1113,12 +1113,20 @@ export default class tableCom extends Component {
return
} */
const base52 = column.base52
try {
var fun1 = new Function("obj","init", "defaultValues", "env", "index", "fatherCode", "utils", fun);
const obj = { ...this.props.obj, ...this.props.form.getFieldsValue(), ...this.props.defaultValues[this.props.formKey] }
let obj
if(!this.props.isEdit&&this.props.fatherCode){
obj = { ...this.props.fatherObj, ...this.props.form.getFieldsValue(), ...this.props.defaultValues[this.props.formKey] }
console.log("xxxxxxxxxxxxxxxxxxxxxxxxxxxttttttttt",this.props.fatherObj)
}else{
obj = { ...this.props.obj, ...this.props.form.getFieldsValue(), ...this.props.defaultValues[this.props.formKey] }
}
const value = fun1(obj,this.props.init, this.props.defaultValues, { clientType: this.props.get,formCode:this.props.formCode,formId:this.props.formId }, this.props.index, this.props.fatherCode,
{
moment: moment,
......@@ -1929,7 +1937,7 @@ export default class tableCom extends Component {
delete xxxxx[""]
}
cm = <ChildForm json={json} rights={json.rights || ["add", "delete"]} isMobile={get === 'mobile'} value={xxxxx} deleteName={json.deleteName} addName={json.addName} isEdit={isEdit} base52={dataColumn.base52} mapData={mapData} datas={datas ? datas[json.childFormKey] : null} defaultValues={defaultValues} sqlData={sqlData} form={this.props.form} />
cm = <ChildForm fatherObj={obj} json={json} rights={json.rights || ["add", "delete"]} isMobile={get === 'mobile'} value={xxxxx} deleteName={json.deleteName} addName={json.addName} isEdit={isEdit} base52={dataColumn.base52} mapData={mapData} datas={datas ? datas[json.childFormKey] : null} defaultValues={defaultValues} sqlData={sqlData} form={this.props.form} />
break;
case 'Button':
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论