|
|
|
@ -677,7 +677,7 @@
|
|
|
|
|
json.form_id = field.form_id;
|
|
|
|
|
json.child_form_id = field.child_form_id;
|
|
|
|
|
let field_type = parseInt(json.field_type);
|
|
|
|
|
if (json.field_type === 1 && json.field_input_type === 2){//系统自动填充
|
|
|
|
|
if (field_type === 1 && json.field_input_type === 2){//系统自动填充
|
|
|
|
|
if (json.filed_auto_input_info === "person_num"){
|
|
|
|
|
json.props.value = this.workers_no?this.workers_no:"";
|
|
|
|
|
}else if (json.filed_auto_input_info === "person_name"){
|
|
|
|
@ -687,36 +687,26 @@
|
|
|
|
|
}
|
|
|
|
|
}else if(json.is_input_field === 1){//输入场
|
|
|
|
|
this.organizeData(json,data)
|
|
|
|
|
}else if(field_type > 200){//子表单、表格 、栅格
|
|
|
|
|
json.field_type = parseInt(field_type.toString().substr(0,2))
|
|
|
|
|
if(parseInt(field_type.toString().substr(2,1)) === 1){//包含其它字段
|
|
|
|
|
if (data){//已经填写过数据的获取子表单填写的数据
|
|
|
|
|
this.sonFormCount += 1;
|
|
|
|
|
this.getChildFormData(json,data.data_id,data.version_no)
|
|
|
|
|
}else{//未填写过数据的 自己构造数据
|
|
|
|
|
if (json.tag === "son_form"){//子表单
|
|
|
|
|
json.props.tableData = [];
|
|
|
|
|
if (json.props.defaultLineCount > 0){//默认显示行数大于1
|
|
|
|
|
for(let i = 0; i < json.props.defaultLineCount; i++){
|
|
|
|
|
let data = {value_id:GUID_UUID.guid()}
|
|
|
|
|
json.props.data.forEach((item)=>{
|
|
|
|
|
// if (item.column_name && item.column_name !== ""){
|
|
|
|
|
// data[item.column_name + "_json"] = _.cloneDeep(item)
|
|
|
|
|
// }else{
|
|
|
|
|
data[item.id + "_json"] = _.cloneDeep(item);
|
|
|
|
|
data[item.id + "_json_copy"] = _.cloneDeep(item)
|
|
|
|
|
// }
|
|
|
|
|
})
|
|
|
|
|
json.props.tableData.push(data)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}else if(json.tag === "son_form"){//子表单
|
|
|
|
|
if (data && data.value_id){//已经填写过数据的获取子表单填写的数据
|
|
|
|
|
this.sonFormCount += 1;
|
|
|
|
|
this.getChildFormData(json,data.data_id,data.version_no)
|
|
|
|
|
}else{//未填写过数据的 自己构造数据
|
|
|
|
|
json.props.tableData = [];
|
|
|
|
|
if (json.props.defaultLineCount > 0){//默认显示行数大于1
|
|
|
|
|
for(let i = 0; i < json.props.defaultLineCount; i++){
|
|
|
|
|
let data = {value_id:GUID_UUID.guid()}
|
|
|
|
|
json.props.data.forEach((item)=>{
|
|
|
|
|
data[item.id + "_json"] = _.cloneDeep(item);
|
|
|
|
|
data[item.id + "_json_copy"] = _.cloneDeep(item);
|
|
|
|
|
})
|
|
|
|
|
json.props.tableData.push(data)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.field_list.push(json);
|
|
|
|
|
})
|
|
|
|
|
// this.field_list = field_list;
|
|
|
|
|
this.mainFormErgodicComplete = true;//主表单遍历完成
|
|
|
|
|
if (this.sonFormCount === this.hasGetFormDataCount){//子表单数据已经全部整理完毕
|
|
|
|
|
this.deleteNotMainField();
|
|
|
|
|