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

update 工作流提交

上级 93ff03fc
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
<#assign import_block> <#assign import_block>
import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail'; import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail';
import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
<#if view.getViewType?? && view.getViewType() ?? && view.getViewType()=='DEMOBWFDYNAEDITVIEW'>
import { toastController, alertController } from '@ionic/core';
</#if>
</#assign> </#assign>
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
...@@ -1061,16 +1064,41 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -1061,16 +1064,41 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
protected async wfsubmit(data: any, linkItem: any,datas: any): Promise<any> { protected async wfsubmit(data: any, linkItem: any,datas: any): Promise<any> {
const _this: any = this; let falg = false;
const arg: any = { ...data }; const alert = await alertController.create({
Object.assign(arg, this.viewparams,linkItem); header: linkItem.sequenceFlowName,
const response: any = await this.service.wfsubmit(this.currentAction,JSON.parse(JSON.stringify(this.context)), datas,this.showBusyIndicator, arg); message: '请输入'+linkItem.sequenceFlowName+"理由",
if (response && response.status === 200) { buttons: [{
this.$notice.success('工作流提交成功'); text: '取消',
} else if (response && response.status !== 401) { },
this.$notice.error('工作流提交失败, ' + response.error.message); {
text: '提交',
handler: () => {
falg = true
}
},],
inputs : [{
name: 'srfwfmemo',
id: 'srfwfmemo',
type: 'textarea',
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 response;
} }
</#if> </#if>
......
<#ibizinclude> <#ibizinclude>
../@MACRO/DEFAULT.less.ftl ../@MACRO/DEFAULT.less.ftl
</#ibizinclude> </#ibizinclude>
${view.getViewType()?lower_case}{ .${view.getViewType()?lower_case}{
ion-segment{ ion-segment{
width: 100%; width: 100%;
} }
......
<app-wf-approval v-model="srfwfmemo" :service="appEntityService" :context="JSON.parse(JSON.stringify(context))" :viewparams="JSON.parse(JSON.stringify(viewparams))"></app-wf-approval> <app-wf-approval :service="appEntityService" :context="JSON.parse(JSON.stringify(context))" :viewparams="JSON.parse(JSON.stringify(viewparams))"></app-wf-approval>
\ No newline at end of file \ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册