提交 1349fe2f 编写于 作者: KK's avatar KK

update

上级 c5885e73
......@@ -1064,10 +1064,34 @@ import { toastController, alertController } from '@ionic/core';
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
protected async wfsubmit(data: any, linkItem: any,datas: any): Promise<any> {
const _this: any = this;
const arg: any = { ...data };
Object.assign(arg, this.viewparams,linkItem);
// 强制补充srfwfmemo
if(this.srfwfmemo){
Object.assign(arg,{srfwfmemo:this.srfwfmemo});
}
const response: any = await this.service.wfsubmit(this.currentAction,JSON.parse(JSON.stringify(this.context)), datas,this.showBusyIndicator, arg);
if (response && response.status === 200) {
this.$notice.success('工作流提交成功');
} else if (response && response.status !== 401) {
this.$notice.error('工作流提交失败, ' + response.error.message);
return response;
}
}
/**
* 工作流审批意见
*
* @protected
* @param {*} linkItem
* @returns {Promise<any>}
* @memberof YDDTBJ
*/
public async openSrfwfmemo(linkItem:any) :Promise<any>{
let falg = false;
const alert = await alertController.create({
header: linkItem.sequenceFlowName,
message: '请输入'+linkItem.sequenceFlowName+"理由",
buttons: [{
text: '取消',
},
......@@ -1081,24 +1105,13 @@ import { toastController, alertController } from '@ionic/core';
name: 'srfwfmemo',
id: 'srfwfmemo',
type: 'textarea',
placeholder: '请输入'+linkItem.sequenceFlowName+"理由",
placeholder: '请输入'+linkItem.sequenceFlowName+"意见(非必填)",
value:this.srfwfmemo
},]});
await alert.present();
let reData = await alert.onDidDismiss();
this.srfwfmemo = reData.data.values.srfwfmemo;
if(falg){
const _this: any = this;
const arg: any = { ...data };
Object.assign(arg, this.viewparams,linkItem);
const response: any = await this.service.wfsubmit(this.currentAction,JSON.parse(JSON.stringify(this.context)), datas,this.showBusyIndicator, arg);
if (response && response.status === 200) {
this.$notice.success('工作流提交成功');
} else if (response && response.status !== 401) {
this.$notice.error('工作流提交失败, ' + response.error.message);
return response;
}
}
return falg;
}
</#if>
......
......@@ -46,6 +46,10 @@
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = xData.getDatas()[0];
}
let falg = await xData.openSrfwfmemo(linkItem);
if(!falg){
return
}
let res = await xData.save();
if (!res || res.status !== 200) {
return;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册