|
版本: |
|
小版本号: |
|
|
|
数据库: |
|
服务器操作系统: |
|
应用服务器: |
|
客户端操作系统: |
|
浏览器: |
|
|
|
- // 启动流程
- Model.prototype.button3Click = function(event) {
- debugger;
- var c = this.getContext().getTask();
- this.tasks = [];
- rowIDs = this.comp("grid1").getCheckeds();
- // for(var i=0;i<rowIDs.length;i++){
- var p = this.comp("process");
- var taskData = this.comp("taskData");
- var id = this.comp("mainData").getCurrentRowID();
- // var id=rowIDs[i];
- var DeliverGoods = this.comp("mainData");
- var self = this;
- taskData.setFilter("filter", "SA_Task.sData1 = '" + id + "' and SA_Task.sAIStatusID = 'run'");
- taskData.refreshData();
- if (DeliverGoods.getValueByID("fStatus", id) != "未发货" && DeliverGoods.getValueByID("fStatus", id) != "生成发货单") {
- justep.Util.hint("只能选择'未发货'状态的数据");
- return;
- }
- if (taskData.count() > 0) {
- p.advanceQueryExt(taskData.getCurrentRowID());
- // p.advanceQuery(taskData.getCurrentRowID());
- // p.advanceExt(taskData.getCurrentRowID());
- } else {
- p.start("/erp/marketSys/process/DeliverGoods/deliverGoodsProcess", null, id,// 批中启动流程
- {
- "onSuccess" : function(event) {
- p.advanceQueryExt(taskData.getCurrentRowID());
- // p.advanceExt(taskData.getCurrentRowID());
- // justep.Util.hint("启动流程成功");
- // var DeliverGoods = self.comp("DeliverGoods");
- DeliverGoods.setValueByID("fStatus", "生成发货单", id);// circulation
- DeliverGoods.saveData();
- },
- "onError" : function(event) {
- justep.Util.hint("启动流程失败");
- }
- });
- }
- // }
- };
复制代码 流转选择人员后,先点击取消,流程已经启动了;再次点击流程按钮时选择人员后点击确定,没法流转到下个流程。不点取消,同样的流转按钮 同样的taskID是可以的。为什么?
p.advanceQueryExt(taskData.getCurrentRowID());
// p.advanceQuery(taskData.getCurrentRowID()); 这2个方法 有什么区别,注释的这个会报任务标识不能为空,第一个则没有问题
|
|