提交 ba0adbfb 编写于 作者: 蔡祥熠

Merge branch 'fix/ImportModel' into 'wrdp'

Merge of fix/ImportModel 修复导入模型、数据模板、人员职务信息的问题 to wrdp

See merge request o2oa/o2oa!4206

(cherry picked from commit 7362a1eb)

13f4fd40 导入模型修改
9df4ad17 导入模型修改
60f2f927 修复导入模型、数据模板、人员职务信息的问题
上级 478b9de7
......@@ -244,6 +244,13 @@ o2.widget.O2Person = new Class({
this.action.actions = {"getPerson": {"uri": "/jaxrs/person/{id}"}};
this.action.invoke({"name": "getPerson", "async": false, "parameter": {"id": (this.data.id || this.data.name)}, "success": function(json){
this.data = json.data;
var dutyList = [];
if( this.data.woIdentityList && this.data.woIdentityList.length ){
this.data.woIdentityList.each(function (id) {
if(id.woUnitDutyList && id.woUnitDutyList.length)dutyList = dutyList.concat(id.woUnitDutyList);
})
}
this.data.dutys = dutyList;
}.bind(this)});
}
return this.data;
......
......@@ -648,6 +648,8 @@ MWF.xApplication.process.Xform.DatatablePC = new Class(
_delLine: function(line){
this.fireEvent("deleteLine", [line]);
debugger;
var saveFlag = line.deleteAttachment();
//使用数据驱动
var data = this.getData();
......@@ -1339,8 +1341,10 @@ MWF.xApplication.process.Xform.DatatablePC.Line = new Class({
// }else if(this.options.isEdited){
// this.data[templateJsonId] = module.getData();
// }
if(this.options.isEdited){
this.data[templateJsonId] = module.getData();
if(this.options.isEdited) {
if (json.type !== "Attachment" && json.type !== "AttachmentDg"){
this.data[templateJsonId] = module.getData();
}
}
this.allField[id] = module;
this.allField_templateId[templateJsonId] = module;
......
{
"path": "",
"events": {
// "beforeImport" : {
// "code": "",
......
{
"path": "",
"dataType_CMSProcess": "string",
"dataType_Querytable" : "string",
"validFieldType" : true,
......
......@@ -985,6 +985,7 @@ MWF.xApplication.query.Query.Importer.Row = new Class({
this.importer.fireEvent("beforeCreateRowData", [this]);
json.data.columnList.each( function (columnJson, i) {
if(!columnJson.path)return;
var value = this.importedData[i] || "";
if( !value )return;
......@@ -1019,6 +1020,7 @@ MWF.xApplication.query.Query.Importer.Row = new Class({
var data = this.importer.Macro.exec( fieldJson.valueScript, this );
if( o2.typeOf(data) === "null" )return;
if( !fieldJson.path )return;
if( json.type === "dynamicTable" ){
this.data[ fieldJson.path ] = data;
......@@ -1188,6 +1190,8 @@ MWF.xApplication.query.Query.Importer.Row = new Class({
setDataWithField: function(obj, fieldName, path, isName){
if(!this.pathIndexMap)this.pathIndexMap = {};
if( !path )return;
var json = this.importer.json;
if( json.data[fieldName] ){
var f = json.data[fieldName];
......
......@@ -235,8 +235,8 @@ MWF.xApplication.query.Query.LP = {
"reExecuteImport": "Re-execute import",
"importPerson": "Import Person",
"showFiveColumn": "(Show the first 5 columns)",
"showAll": "(show all)",
"showFiveColumn": "(Click to show the first 5 columns)",
"showAll": "(Click to show all)",
"deleteDocument": "It cannot be restored after deletion. Are you sure you want to delete the import record?",
"deleteDocumentTitle": "Delete Import Record Confirmation",
......
......@@ -239,8 +239,8 @@ MWF.xApplication.query.Query.LP = {
"reExecuteImport": "重新执行导入",
"importPerson": "导入人",
"showFiveColumn": "(显示前5列)",
"showAll": "(显示全部)",
"showFiveColumn": "(点击显示前5列)",
"showAll": "(点击显示全部)",
"deleteDocument": "删除后无法恢复,确定要删除该导入记录?",
"deleteDocumentTitle": "删除导入记录确认",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册