|
|
@@ -1680,92 +1680,115 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
|
|
|
processWork: function () {
|
|
|
if (!this.businessData.work.startTime) {
|
|
|
this.startDraftProcess();
|
|
|
+ } else if( this.json.submitFormType === "select" ){
|
|
|
+
|
|
|
+ } else if( this.json.submitFormType === "script" ){
|
|
|
+
|
|
|
} else {
|
|
|
if (this.json.mode == "Mobile") {
|
|
|
setTimeout(function () {
|
|
|
this.processWork_mobile();
|
|
|
}.bind(this), 100);
|
|
|
-
|
|
|
} else {
|
|
|
- this.fireEvent("beforeProcessWork");
|
|
|
- if (this.app && this.app.fireEvent) this.app.fireEvent("beforeProcessWork");
|
|
|
+ this.processWork_pc();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ processWork_custom : function(){
|
|
|
+ this.fireEvent("beforeProcessWork");
|
|
|
+ if (this.app && this.app.fireEvent) this.app.fireEvent("beforeProcessWork");
|
|
|
|
|
|
- if (!this.formCustomValidation("", "")) {
|
|
|
- this.app.content.unmask();
|
|
|
- // if (callback) callback();
|
|
|
- return false;
|
|
|
- }
|
|
|
- // MWF.require("MWF.widget.Mask", function() {
|
|
|
- // this.mask = new MWF.widget.Mask({"style": "desktop", "zIndex": 50000});
|
|
|
- // this.mask.loadNode(this.app.content);
|
|
|
-
|
|
|
- if (!this.formValidation("", "")) {
|
|
|
- this.app.content.unmask();
|
|
|
- // if (callback) callback();
|
|
|
- return false;
|
|
|
- }
|
|
|
+ if (!this.formCustomValidation("", "")) {
|
|
|
+ this.app.content.unmask();
|
|
|
+ // if (callback) callback();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
|
|
|
- var setSize = function (notRecenter) {
|
|
|
- debugger;
|
|
|
- var dlg = this;
|
|
|
- if (!dlg || !dlg.node) return;
|
|
|
- dlg.node.setStyle("display", "block");
|
|
|
- var size = processNode.getSize();
|
|
|
- dlg.content.setStyles({
|
|
|
- "height": size.y,
|
|
|
- "width": size.x
|
|
|
- });
|
|
|
- var s = dlg.setContentSize();
|
|
|
- if (dlg.content.getStyle("overflow-y") === "auto" && dlg.content.getStyle("overflow-x") !== "auto") {
|
|
|
- dlg.node.setStyle("width", dlg.node.getStyle("width").toInt() + 20 + "px");
|
|
|
- dlg.content.setStyle("width", dlg.content.getStyle("width").toInt() + 20 + "px");
|
|
|
- }
|
|
|
- if (!notRecenter) dlg.reCenter();
|
|
|
- }
|
|
|
+ if (!this.formValidation("", "")) {
|
|
|
+ this.app.content.unmask();
|
|
|
+ // if (callback) callback();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
|
|
|
- //var node = new Element("div", {"styles": this.css.rollbackAreaNode});
|
|
|
- var processNode = new Element("div", { "styles": this.app.css.processNode_Area }).inject(this.node);
|
|
|
- this.setProcessNode(processNode, "process", function () {
|
|
|
- this.processDlg = o2.DL.open({
|
|
|
- "title": this.app.lp.process,
|
|
|
- "style": this.json.dialogStyle || "user",
|
|
|
- "isResize": false,
|
|
|
- "content": processNode,
|
|
|
- "maskNode": this.app.content,
|
|
|
- "positionHeight": 800,
|
|
|
- "maxHeight": 800,
|
|
|
- "maxHeightPercent": "98%",
|
|
|
- "minTop": 5,
|
|
|
- "width": "auto", //processNode.retrieve("width") || 1000, //600,
|
|
|
- "height": "auto", //processNode.retrieve("height") || 401,
|
|
|
- "buttonList": [
|
|
|
- {
|
|
|
- "type": "ok",
|
|
|
- "text": MWF.LP.process.button.ok,
|
|
|
- "action": function (d, e) {
|
|
|
- if (this.processor) this.processor.okButton.click();
|
|
|
- }.bind(this)
|
|
|
- },
|
|
|
- {
|
|
|
- "type": "cancel",
|
|
|
- "text": MWF.LP.process.button.cancel,
|
|
|
- "action": function () {
|
|
|
- this.processDlg.close();
|
|
|
- if (this.processor) this.processor.destroy();
|
|
|
- }.bind(this)
|
|
|
- }
|
|
|
- ],
|
|
|
- "onPostLoad": function () {
|
|
|
- setSize.call(this)
|
|
|
- }
|
|
|
- });
|
|
|
|
|
|
- }.bind(this), function () {
|
|
|
- if (this.processDlg) setSize.call(this.processDlg, true)
|
|
|
- }.bind(this));
|
|
|
+ },
|
|
|
+ processWork_pc: function(){
|
|
|
+ this.fireEvent("beforeProcessWork");
|
|
|
+ if (this.app && this.app.fireEvent) this.app.fireEvent("beforeProcessWork");
|
|
|
+
|
|
|
+ if (!this.formCustomValidation("", "")) {
|
|
|
+ this.app.content.unmask();
|
|
|
+ // if (callback) callback();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ // MWF.require("MWF.widget.Mask", function() {
|
|
|
+ // this.mask = new MWF.widget.Mask({"style": "desktop", "zIndex": 50000});
|
|
|
+ // this.mask.loadNode(this.app.content);
|
|
|
|
|
|
+ if (!this.formValidation("", "")) {
|
|
|
+ this.app.content.unmask();
|
|
|
+ // if (callback) callback();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ var setSize = function (notRecenter) {
|
|
|
+ debugger;
|
|
|
+ var dlg = this;
|
|
|
+ if (!dlg || !dlg.node) return;
|
|
|
+ dlg.node.setStyle("display", "block");
|
|
|
+ var size = processNode.getSize();
|
|
|
+ dlg.content.setStyles({
|
|
|
+ "height": size.y,
|
|
|
+ "width": size.x
|
|
|
+ });
|
|
|
+ var s = dlg.setContentSize();
|
|
|
+ if (dlg.content.getStyle("overflow-y") === "auto" && dlg.content.getStyle("overflow-x") !== "auto") {
|
|
|
+ dlg.node.setStyle("width", dlg.node.getStyle("width").toInt() + 20 + "px");
|
|
|
+ dlg.content.setStyle("width", dlg.content.getStyle("width").toInt() + 20 + "px");
|
|
|
}
|
|
|
+ if (!notRecenter) dlg.reCenter();
|
|
|
}
|
|
|
+
|
|
|
+ //var node = new Element("div", {"styles": this.css.rollbackAreaNode});
|
|
|
+ var processNode = new Element("div", { "styles": this.app.css.processNode_Area }).inject(this.node);
|
|
|
+ this.setProcessNode(processNode, "process", function () {
|
|
|
+ this.processDlg = o2.DL.open({
|
|
|
+ "title": this.app.lp.process,
|
|
|
+ "style": this.json.dialogStyle || "user",
|
|
|
+ "isResize": false,
|
|
|
+ "content": processNode,
|
|
|
+ "maskNode": this.app.content,
|
|
|
+ "positionHeight": 800,
|
|
|
+ "maxHeight": 800,
|
|
|
+ "maxHeightPercent": "98%",
|
|
|
+ "minTop": 5,
|
|
|
+ "width": "auto", //processNode.retrieve("width") || 1000, //600,
|
|
|
+ "height": "auto", //processNode.retrieve("height") || 401,
|
|
|
+ "buttonList": [
|
|
|
+ {
|
|
|
+ "type": "ok",
|
|
|
+ "text": MWF.LP.process.button.ok,
|
|
|
+ "action": function (d, e) {
|
|
|
+ if (this.processor) this.processor.okButton.click();
|
|
|
+ }.bind(this)
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "type": "cancel",
|
|
|
+ "text": MWF.LP.process.button.cancel,
|
|
|
+ "action": function () {
|
|
|
+ this.processDlg.close();
|
|
|
+ if (this.processor) this.processor.destroy();
|
|
|
+ }.bind(this)
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "onPostLoad": function () {
|
|
|
+ setSize.call(this)
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ }.bind(this), function () {
|
|
|
+ if (this.processDlg) setSize.call(this.processDlg, true)
|
|
|
+ }.bind(this));
|
|
|
},
|
|
|
processWork_mobile: function () {
|
|
|
if (this.app.inBrowser) {
|