提交 526f5eac 编写于 作者: ibizdev's avatar ibizdev

tony001 发布系统代码 [后台服务,演示应用]

上级 4c1caca0
......@@ -679,6 +679,14 @@
"viewname": "IBIZOrderWFActionView",
"viewtag": "484749cb43a4564c74763781b756e00e"
},
"ibizsample0021usr1114433946wfdynaeditview": {
"title": "实体工作流动态编辑视图",
"caption": "订单",
"viewtype": "DEWFDYNAEDITVIEW",
"viewmodule": "Sample",
"viewname": "IBIZSample0021Usr1114433946WFDynaEditView",
"viewtag": "49E66C2F-237A-415A-B7B9-6B90DF532A83"
},
"ibizsample0003stabexpview_layout": {
"title": "实体分页导航视图",
"caption": "示例实体03",
......
......@@ -351,6 +351,7 @@ function getAppLocale(){
menuitem21: commonLogic.appcommonhandle("工作流动态操作视图",null),
menuitem214: commonLogic.appcommonhandle("统一待办",null),
menuitem231: commonLogic.appcommonhandle("工作流动态编辑视图(分页关系)",null),
menuitem232: commonLogic.appcommonhandle("工作流动态编辑视图",null),
menuitem11: commonLogic.appcommonhandle("其他视图",null),
menuitem98: commonLogic.appcommonhandle("自定义视图",null),
menuitem212: commonLogic.appcommonhandle("自定义实现表格视图",null),
......
......@@ -351,6 +351,7 @@ function getAppLocale(){
menuitem21: commonLogic.appcommonhandle("工作流动态操作视图",null),
menuitem214: commonLogic.appcommonhandle("统一待办",null),
menuitem231: commonLogic.appcommonhandle("工作流动态编辑视图(分页关系)",null),
menuitem232: commonLogic.appcommonhandle("工作流动态编辑视图",null),
menuitem11: commonLogic.appcommonhandle("Other Views",null),
menuitem98: commonLogic.appcommonhandle("Custom View",null),
menuitem212: commonLogic.appcommonhandle("自定义实现表格视图",null),
......
......@@ -351,6 +351,7 @@ function getAppLocale(){
menuitem21: commonLogic.appcommonhandle("工作流动态操作视图",null),
menuitem214: commonLogic.appcommonhandle("统一待办",null),
menuitem231: commonLogic.appcommonhandle("工作流动态编辑视图(分页关系)",null),
menuitem232: commonLogic.appcommonhandle("工作流动态编辑视图",null),
menuitem11: commonLogic.appcommonhandle("其他视图",null),
menuitem98: commonLogic.appcommonhandle("自定义视图",null),
menuitem212: commonLogic.appcommonhandle("自定义实现表格视图",null),
......
......@@ -25,6 +25,10 @@ function getLocaleResourceBase(){
caption: commonLogic.appcommonhandle(" 实体工作流动态导航表格视图",null),
title: commonLogic.appcommonhandle(" 实体工作流动态导航表格视图",null),
},
usr1114433946wfdynaeditview: {
caption: commonLogic.appcommonhandle("订单",null),
title: commonLogic.appcommonhandle("实体工作流动态编辑视图",null),
},
wfdynaeditview: {
caption: commonLogic.appcommonhandle("订单",null),
title: commonLogic.appcommonhandle("订单工作流编辑视图",null),
......@@ -124,6 +128,30 @@ function getLocaleResourceBase(){
uiactions: {
},
},
usr1114790802_form: {
details: {
group1: commonLogic.appcommonhandle("订单基本信息",null),
formpage1: commonLogic.appcommonhandle("基本信息",null),
group2: commonLogic.appcommonhandle("操作信息",null),
formpage2: commonLogic.appcommonhandle("其它",null),
srfupdatedate: commonLogic.appcommonhandle("更新时间",null),
srforikey: commonLogic.appcommonhandle("",null),
srfkey: commonLogic.appcommonhandle("订单标识",null),
srfmajortext: commonLogic.appcommonhandle("订单名称",null),
srftempmode: commonLogic.appcommonhandle("",null),
srfuf: commonLogic.appcommonhandle("",null),
srfdeid: commonLogic.appcommonhandle("",null),
srfsourcekey: commonLogic.appcommonhandle("",null),
ibizsample0021name: commonLogic.appcommonhandle("订单名称",null),
createman: commonLogic.appcommonhandle("建立人",null),
createdate: commonLogic.appcommonhandle("建立时间",null),
updateman: commonLogic.appcommonhandle("更新人",null),
updatedate: commonLogic.appcommonhandle("更新时间",null),
ibizsample0021id: commonLogic.appcommonhandle("订单标识",null),
},
uiactions: {
},
},
main_grid: {
columns: {
ibizsample0021name: commonLogic.appcommonhandle("订单名称",null),
......@@ -256,6 +284,8 @@ function getLocaleResourceBase(){
tip: commonLogic.appcommonhandle("开始",null),
},
},
usr1114433946wfdynaeditviewtoolbar_toolbar: {
},
gridviewtoolbar_toolbar: {
tbitem3: {
caption: commonLogic.appcommonhandle("新建",null),
......
......@@ -25,6 +25,10 @@ function getLocaleResourceBase(){
caption: commonLogic.appcommonhandle("Workflow Dynamic Navigation View",null),
title: commonLogic.appcommonhandle(" 实体工作流动态导航表格视图",null),
},
usr1114433946wfdynaeditview: {
caption: commonLogic.appcommonhandle("订单",null),
title: commonLogic.appcommonhandle("实体工作流动态编辑视图",null),
},
wfdynaeditview: {
caption: commonLogic.appcommonhandle("订单",null),
title: commonLogic.appcommonhandle("订单工作流编辑视图",null),
......@@ -124,6 +128,30 @@ function getLocaleResourceBase(){
uiactions: {
},
},
usr1114790802_form: {
details: {
group1: commonLogic.appcommonhandle("订单基本信息",null),
formpage1: commonLogic.appcommonhandle("基本信息",null),
group2: commonLogic.appcommonhandle("操作信息",null),
formpage2: commonLogic.appcommonhandle("其它",null),
srfupdatedate: commonLogic.appcommonhandle("更新时间",null),
srforikey: commonLogic.appcommonhandle("",null),
srfkey: commonLogic.appcommonhandle("订单标识",null),
srfmajortext: commonLogic.appcommonhandle("订单名称",null),
srftempmode: commonLogic.appcommonhandle("",null),
srfuf: commonLogic.appcommonhandle("",null),
srfdeid: commonLogic.appcommonhandle("",null),
srfsourcekey: commonLogic.appcommonhandle("",null),
ibizsample0021name: commonLogic.appcommonhandle("订单名称",null),
createman: commonLogic.appcommonhandle("建立人",null),
createdate: commonLogic.appcommonhandle("建立时间",null),
updateman: commonLogic.appcommonhandle("更新人",null),
updatedate: commonLogic.appcommonhandle("更新时间",null),
ibizsample0021id: commonLogic.appcommonhandle("订单标识",null),
},
uiactions: {
},
},
main_grid: {
columns: {
ibizsample0021name: commonLogic.appcommonhandle("订单名称",null),
......@@ -256,6 +284,8 @@ function getLocaleResourceBase(){
tip: commonLogic.appcommonhandle("开始",null),
},
},
usr1114433946wfdynaeditviewtoolbar_toolbar: {
},
gridviewtoolbar_toolbar: {
tbitem3: {
caption: commonLogic.appcommonhandle("New",null),
......
......@@ -25,6 +25,10 @@ function getLocaleResourceBase(){
caption: commonLogic.appcommonhandle(" 实体工作流动态导航表格视图",null),
title: commonLogic.appcommonhandle(" 实体工作流动态导航表格视图",null),
},
usr1114433946wfdynaeditview: {
caption: commonLogic.appcommonhandle("订单",null),
title: commonLogic.appcommonhandle("实体工作流动态编辑视图",null),
},
wfdynaeditview: {
caption: commonLogic.appcommonhandle("订单",null),
title: commonLogic.appcommonhandle("订单工作流编辑视图",null),
......@@ -124,6 +128,30 @@ function getLocaleResourceBase(){
uiactions: {
},
},
usr1114790802_form: {
details: {
group1: commonLogic.appcommonhandle("订单基本信息",null),
formpage1: commonLogic.appcommonhandle("基本信息",null),
group2: commonLogic.appcommonhandle("操作信息",null),
formpage2: commonLogic.appcommonhandle("其它",null),
srfupdatedate: commonLogic.appcommonhandle("更新时间",null),
srforikey: commonLogic.appcommonhandle("",null),
srfkey: commonLogic.appcommonhandle("订单标识",null),
srfmajortext: commonLogic.appcommonhandle("订单名称",null),
srftempmode: commonLogic.appcommonhandle("",null),
srfuf: commonLogic.appcommonhandle("",null),
srfdeid: commonLogic.appcommonhandle("",null),
srfsourcekey: commonLogic.appcommonhandle("",null),
ibizsample0021name: commonLogic.appcommonhandle("订单名称",null),
createman: commonLogic.appcommonhandle("建立人",null),
createdate: commonLogic.appcommonhandle("建立时间",null),
updateman: commonLogic.appcommonhandle("更新人",null),
updatedate: commonLogic.appcommonhandle("更新时间",null),
ibizsample0021id: commonLogic.appcommonhandle("订单标识",null),
},
uiactions: {
},
},
main_grid: {
columns: {
ibizsample0021name: commonLogic.appcommonhandle("订单名称",null),
......@@ -256,6 +284,8 @@ function getLocaleResourceBase(){
tip: commonLogic.appcommonhandle("开始",null),
},
},
usr1114433946wfdynaeditviewtoolbar_toolbar: {
},
gridviewtoolbar_toolbar: {
tbitem3: {
caption: commonLogic.appcommonhandle("新建",null),
......
......@@ -2483,6 +2483,24 @@ mock.onGet('v7/main-menuappmenu').reply((config: any) => {
textcls: '',
appfunctag: 'AppFunc131',
resourcetag: '',
},
{
id: 'E1A32720-BBDB-484B-811B-B9A6EC722452',
name: 'menuitem232',
text: '工作流动态编辑视图',
type: 'MENUITEM',
counterid: '',
tooltip: '工作流动态编辑视图',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: '',
icon: '',
textcls: '',
appfunctag: 'AppFunc132',
resourcetag: '',
},
],
},
......
......@@ -687,6 +687,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "IBIZOrderWFActionView",
"viewtag": "484749cb43a4564c74763781b756e00e"
},
"ibizsample0021usr1114433946wfdynaeditview": {
"title": "实体工作流动态编辑视图",
"caption": "订单",
"viewtype": "DEWFDYNAEDITVIEW",
"viewmodule": "Sample",
"viewname": "IBIZSample0021Usr1114433946WFDynaEditView",
"viewtag": "49E66C2F-237A-415A-B7B9-6B90DF532A83"
},
"ibizsample0003stabexpview_layout": {
"title": "实体分页导航视图",
"caption": "示例实体03",
......
<template>
<div class="view-container dewfdynaeditview ibizsample0021-usr1114433946-wfdyna-edit-view">
<app-studioaction :viewTitle="$t(model.srfCaption)" viewName="ibizsample0021usr1114433946wfdynaeditview"></app-studioaction>
<card class='view-card ' :disHover="true" :padding="0" :bordered="false">
<div slot='title' class="header-container">
<span class='caption-info' :title="$t(model.srfCaption)">{{$t(model.srfCaption)}}</span>
</div>
<div slot="extra">
<div class='toolbar-container'>
<tooltip :transfer="true" :max-width="600" v-for="(linkItem, index) in linkModel" :key="index">
<i-button @click="dynamic_toolbar_click(linkItem, $event)">
<span class='caption'>{{linkItem.sequenceFlowName}}</span>
</i-button>
<div slot='content'>{{linkItem.sequenceFlowName}}</div>
</tooltip>
</div>
</div>
<div class="content-container">
<component
:is="activeForm.name"
:isautoload="true"
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:autosave="false"
:viewtag="viewtag"
:showBusyIndicator="activeForm.showBusyIndicator"
:updateAction="activeForm.updateAction"
:removeAction="activeForm.removeAction"
:loaddraftAction="activeForm.loaddraftAction"
:loadAction="activeForm.loadAction"
:createAction="activeForm.createAction"
:WFSubmitAction="activeForm.WFSubmitAction"
:WFStartAction="activeForm.WFStartAction"
name="form"
ref='form'
@save="form_save($event)"
@remove="form_remove($event)"
@load="form_load($event)"
@closeview="closeView($event)">
</component>
</div>
</card>
</div>
</template>
// 基于 @VIEW/@MACRO/VIEW-BASE.vue.ftl 生成
<script lang='tsx'>
import { Vue, Component, Prop, Provide, Emit, Watch,Inject } from 'vue-property-decorator';
import { UIActionTool, Util } from '@/utils';
import axios from 'axios';
import { AppMessageBox } from '@/utils/app-message-box/app-message-box';
import NavDataService from '@/service/app/navdata-service';
import { Subject,Subscription } from 'rxjs';
import IBIZSample0021Service from '@/service/ibizsample0021/ibizsample0021-service';
import IBIZSample0021AuthService from '@/authservice/ibizsample0021/ibizsample0021-auth-service';
import WFDynaEditViewEngine from '@engine/view/wfdyna-edit-view-engine';
import IBIZSample0021UIService from '@/uiservice/ibizsample0021/ibizsample0021-ui-service';
@Component({
components: {
},
})
export default class IBIZSample0021Usr1114433946WFDynaEditViewBase extends Vue {
/**
* 实体服务对象
*
* @type {IBIZSample0021Service}
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public appEntityService: IBIZSample0021Service = new IBIZSample0021Service();
/**
* 实体UI服务对象
*
* @type IBIZSample0021UIService
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public appUIService: IBIZSample0021UIService = new IBIZSample0021UIService();
/**
* 数据变化
*
* @param {*} val
* @returns {*}
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
@Emit()
public viewDatasChange(val: any):any {
return val;
}
/**
* 传入视图上下文
*
* @type {string}
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
@Prop() public viewdata!: string;
/**
* 传入视图参数
*
* @type {string}
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
@Prop() public viewparam!: string;
/**
* 视图默认使用
*
* @type {boolean}
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
@Prop({ default: true }) public viewDefaultUsage!: boolean;
/**
* 视图默认使用
*
* @type {string}
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
@Inject({from:'navModel',default: 'tab'})
public navModel!:string;
/**
* 视图标识
*
* @type {string}
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public viewtag: string = '49E66C2F-237A-415A-B7B9-6B90DF532A83';
/**
* 视图类型
*
* @type {string}
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public viewType: string = 'DEWFDYNAEDITVIEW';
/**
* 自定义视图导航上下文集合
*
* @type {*}
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public customViewNavContexts:any ={
};
/**
* 自定义视图导航参数集合
*
* @type {*}
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public customViewParams:any ={
};
/**
* 视图模型数据
*
* @type {*}
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public model: any = {
srfCaption: 'entities.ibizsample0021.views.usr1114433946wfdynaeditview.caption',
srfTitle: 'entities.ibizsample0021.views.usr1114433946wfdynaeditview.title',
srfSubTitle: 'entities.ibizsample0021.views.usr1114433946wfdynaeditview.subtitle',
dataInfo: ''
}
/**
* 视图参数变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
@Watch('viewparam',{immediate: true, deep: true})
onParamData(newVal: any, oldVal: any) {
if(newVal){
this.viewparams = {};
if(typeof newVal == 'string') {
Object.assign(this.viewparams, JSON.parse(this.viewparam));
}else{
this.viewparams = Util.deepCopy(this.viewparam);
}
}
}
/**
* 处理应用上下文变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
@Watch('viewdata')
onViewData(newVal: any, oldVal: any) {
const _this: any = this;
if (!Object.is(newVal, oldVal) && _this.engine) {
this.$nextTick(()=>{
_this.parseViewParam();
_this.engine.load();
});
} else if(!Object.is(newVal, oldVal) && _this.refresh && _this.refresh instanceof Function) {
_this.refresh();
}
}
/**
* 容器模型
*
* @type {*}
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_wfform_operationform: { name: 'wfform_operationform', type: 'FORM' },
view_form: { name: 'form', type: 'FORM' },
wflinks: [],
};
/**
* 视图操作参数
*
* @type {*}
* @readonly
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public viewCtx: any = {};
/**
* 视图刷新
*
* @param {*} args
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public refresh(args?: any): void {
const refs: any = this.$refs;
if (refs && refs.form) {
refs.form.refresh();
}
}
/**
* 计数器刷新
*
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public counterRefresh(){
const _this:any =this;
if(_this.counterServiceArray && _this.counterServiceArray.length >0){
_this.counterServiceArray.forEach((item:any) =>{
if(item.refreshData && item.refreshData instanceof Function){
item.refreshData();
}
})
}
}
/**
* 视图状态订阅对象
*
* @public
* @type {Subject<{action: string, data: any}>}
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public viewState: Subject<ViewState> = new Subject();
/**
* 工具栏模型
*
* @type {*}
* @memberof IBIZSample0021Usr1114433946WFDynaEditView
*/
public toolBarModels: any = {
};
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public engine: WFDynaEditViewEngine = new WFDynaEditViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
form: this.$refs.form,
p2k: '0',
keyPSDEField: 'ibizsample0021',
majorPSDEField: 'ibizsample0021name',
isLoadDefault: true,
});
}
/**
* 应用导航服务
*
* @type {*}
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public navDataService = NavDataService.getInstance();
/**
* 导航服务事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public serviceStateEvent: Subscription | undefined;
/**
* 门户部件状态对象
*
* @type {*}
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
@Prop() public portletState?: any;
/**
* 门户部件状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public portletStateEvent: Subscription | undefined;
/**
* 门户部件状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public formDruipartEvent: Subscription | undefined;
/**
* 应用上下文
*
* @type {*}
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public context:any = {};
/**
* 视图参数
*
* @type {*}
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public viewparams:any = {};
/**
* 视图缓存数据
*
* @type {*}
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public viewCacheData:any;
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public counterServiceArray:Array<any> = [];
/**
* 解析视图参数
*
* @public
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public parseViewParam(inputvalue:any = null): void {
for(let key in this.context){
delete this.context[key];
}
if(this.$store.getters.getAppData() && this.$store.getters.getAppData().context){
Object.assign(this.context,this.$store.getters.getAppData().context);
}
if (!this.viewDefaultUsage && this.viewdata && !Object.is(this.viewdata, '')) {
if(typeof this.viewdata == 'string') {
Object.assign(this.context, JSON.parse(this.viewdata));
}
if(this.context && this.context.srfparentdename){
Object.assign(this.viewparams,{srfparentdename:this.context.srfparentdename});
}
if(this.context && this.context.srfparentkey){
Object.assign(this.viewparams,{srfparentkey:this.context.srfparentkey});
}
this.handleCustomViewData();
return;
}
const path = (this.$route.matched[this.$route.matched.length - 1]).path;
const keys: Array<any> = [];
const curReg = this.$pathToRegExp.pathToRegexp(path, keys);
const matchArray = curReg.exec(this.$route.path);
let tempValue: Object = {};
keys.forEach((item: any, index: number) => {
if(matchArray[index + 1]){
Object.defineProperty(tempValue, item.name, {
enumerable: true,
value: decodeURIComponent(matchArray[index + 1])
});
}
});
this.$viewTool.formatRouteParams(tempValue,this.$route,this.context,this.viewparams);
if(inputvalue){
Object.assign(this.context,{'ibizsample0021':inputvalue});
}
//初始化视图唯一标识
Object.assign(this.context,{srfsessionid:this.$util.createUUID()});
this.handleCustomViewData();
//初始化导航数据
this.initNavDataWithRoute();
}
/**
* 处理自定义视图数据
*
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public handleCustomViewData(){
if(Object.keys(this.customViewNavContexts).length > 0){
Object.keys(this.customViewNavContexts).forEach((item:any) =>{
let tempContext:any = {};
let curNavContext:any = this.customViewNavContexts[item];
this.handleCustomDataLogic(curNavContext,tempContext,item);
Object.assign(this.context,tempContext);
})
}
if(Object.keys(this.customViewParams).length > 0){
Object.keys(this.customViewParams).forEach((item:any) =>{
let tempParam:any = {};
let curNavParam:any = this.customViewParams[item];
this.handleCustomDataLogic(curNavParam,tempParam,item);
Object.assign(this.viewparams,tempParam);
})
}
}
/**
* 处理自定义视图数据逻辑
*
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public handleCustomDataLogic(curNavData:any,tempData:any,item:string){
// 直接值直接赋值
if(curNavData.isRawValue){
if(Object.is(curNavData.value,"null") || Object.is(curNavData.value,"")){
Object.defineProperty(tempData, item.toLowerCase(), {
value: null,
writable : true,
enumerable : true,
configurable : true
});
}else{
Object.defineProperty(tempData, item.toLowerCase(), {
value: curNavData.value,
writable : true,
enumerable : true,
configurable : true
});
}
}else{
// 先从导航上下文取数,没有再从导航参数(URL)取数,如果导航上下文和导航参数都没有则为null
if(this.context[(curNavData.value).toLowerCase()] != null){
Object.defineProperty(tempData, item.toLowerCase(), {
value: this.context[(curNavData.value).toLowerCase()],
writable : true,
enumerable : true,
configurable : true
});
}else{
if(this.viewparams[(curNavData.value).toLowerCase()] != null){
Object.defineProperty(tempData, item.toLowerCase(), {
value: this.viewparams[(curNavData.value).toLowerCase()],
writable : true,
enumerable : true,
configurable : true
});
}else{
Object.defineProperty(tempData, item.toLowerCase(), {
value: null,
writable : true,
enumerable : true,
configurable : true
});
}
}
}
}
/**
* 初始化导航数据(路由模式)
*
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public initNavDataWithRoute(data:any = null, isNew:boolean = false, isAlways:boolean = false){
if( isAlways || (this.viewDefaultUsage && Object.is(this.navModel,"route")) ){
this.navDataService.addNavData({id:'ibizsample0021-usr1114433946-wfdyna-edit-view',tag:this.viewtag,srfkey:isNew ? null : this.context.ibizsample0021,title:this.$t(this.model.srfCaption),data:data,context:this.context,viewparams:this.viewparams,path:this.$route.fullPath});
}
}
/**
* 初始化导航数据(分页模式)
*
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public initNavDataWithTab(data:any = null,isOnlyAdd:boolean = true, isAlways:boolean = false){
if( isAlways || (this.viewDefaultUsage && !Object.is(this.navModel,"route")) ){
this.navDataService.addNavDataByOnly({id:'ibizsample0021-usr1114433946-wfdyna-edit-view',tag:this.viewtag,srfkey:this.context.ibizsample0021,title:this.$t(this.model.srfCaption),data:data,context:this.context,viewparams:this.viewparams,path:this.$route.fullPath},isOnlyAdd);
}
}
/**
* Vue声明周期
*
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public afterCreated(){
let _this:any = this;
const secondtag = _this.$util.createUUID();
_this.$store.commit('viewaction/createdView', { viewtag: _this.viewtag, secondtag: secondtag });
_this.viewtag = secondtag;
_this.parseViewParam();
_this.serviceStateEvent = _this.navDataService.serviceState.subscribe(({ action,name, data }:{ action:string,name:any,data:any }) => {
if(!Object.is(name,'ibizsample0021-usr1114433946-wfdyna-edit-view')){
return;
}
if (Object.is(action, 'viewrefresh')) {
_this.$nextTick(()=>{
_this.parseViewParam(data);
if(_this.engine){
_this.engine.load();
}
});
}
});
if(_this.portletState){
_this.portletStateEvent = _this.portletState.subscribe((res:any) =>{
if(!Object.is(res.name,'IBIZSample0021Usr1114433946WFDynaEditView')){
return;
}
if(Object.is(res.action,'refresh') && _this.refresh && _this.refresh instanceof Function){
_this.refresh();
}
})
}
_this.initViewCtx();
}
/**
* 初始化视图操作参数
*
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
initViewCtx() {
Object.assign(this.viewCtx, {
app: this.$root,
view: this,
viewGlobal: {},
viewNavData: {},
viewNavContext: this.context,
viewNavParam: this.viewparams,
messagebox: AppMessageBox.getInstance(),
});
Object.assign(this.viewCtx, { appGlobal: this.$store.getters.getAppGlobal() });
if (this.$store.getters.getRouteViewGlobal(this.context.srfsessionid)) {
Object.assign(this.viewCtx, { routeViewGlobal: this.$store.getters.getRouteViewGlobal(this.context.srfsessionid) });
} else {
this.$store.commit('addRouteViewGlobal', { tag: this.context.srfsessionid, param: {} });
Object.assign(this.viewCtx, { routeViewGlobal: this.$store.getters.getRouteViewGlobal(this.context.srfsessionid) });
}
if (!this.viewDefaultUsage && this.viewdata && !Object.is(this.viewdata, '')) {
// 嵌入视图
Object.assign(this.viewCtx, {
topview: this.$store.getters.getView(this.context.srfsessionid)
});
} else {
// 顶层视图
this.$store.commit('addView', { tag: this.context.srfsessionid, param: this });
Object.assign(this.viewCtx, { topview: this });
}
}
/**
* 销毁之前
*
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public beforeDestroy() {
this.$store.commit('viewaction/removeView', this.viewtag);
let _this: any = this
if (_this.serviceStateEvent) {
_this.serviceStateEvent.unsubscribe();
}
if (_this.portletStateEvent) {
_this.portletStateEvent.unsubscribe();
}
if (_this.formDruipartEvent) {
_this.formDruipartEvent.unsubscribe();
}
if (_this.engine) {
_this.engine.destroy();
}
}
/**
* Vue声明周期(组件初始化完毕)
*
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public mounted() {
this.afterMounted();
}
/**
* 执行mounted后的逻辑
*
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public afterMounted(){
const _this: any = this;
_this.engineInit();
if (_this.loadModel && _this.loadModel instanceof Function) {
_this.loadModel();
}
}
/**
* form 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public form_load($event: any, $event2?: any) {
this.engine.onCtrlEvent('form', 'load', $event);
}
/**
* form 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public form_save($event: any, $event2?: any) {
this.engine.onCtrlEvent('form', 'save', $event);
}
/**
* form 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public form_remove($event: any, $event2?: any) {
this.engine.onCtrlEvent('form', 'remove', $event);
}
/**
* 关闭视图
*
* @param {any[]} args
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public closeView(args: any[]): void {
let _view: any = this;
if (_view.viewdata) {
_view.$emit('viewdataschange', Array.isArray(args)?args:[args]);
_view.$emit('close', Array.isArray(args)?args:[args]);
} else if (_view.$tabPageExp) {
_view.$tabPageExp.onClose(_view.$route.fullPath);
}
}
/**
* 销毁视图回调
*
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public destroyed(){
this.afterDestroyed();
}
/**
* 执行destroyed后的逻辑
*
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public afterDestroyed(){
if (this.viewDefaultUsage) {
let localStoreLength = Object.keys(localStorage);
if(localStoreLength.length > 0){
localStoreLength.forEach((item:string) =>{
if(item.startsWith(this.context.srfsessionid)){
localStorage.removeItem(item);
}
})
}
if(Object.is(this.navModel,"tab")){
this.navDataService.removeNavDataByTag(this.viewtag);
}
}
// 销毁计数器定时器
if(this.counterServiceArray && this.counterServiceArray.length >0){
this.counterServiceArray.forEach((item:any) =>{
if(item.destroyCounter && item.destroyCounter instanceof Function){
item.destroyCounter();
}
})
}
}
/**
* 工具栏模型数据
*
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public linkModel:Array<any> = [];
/**
* 激活表单
*
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public activeForm:any = {};
/**
* 所有表单数据
*
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public allForm: any = {
"wfform_operationform":{name:"view_wfform_operationform",autosave:"false",showBusyIndicator:"true",updateAction:"Update",removeAction:"Remove",loaddraftAction:"GetDraft",loadAction:"Get",createAction:"Create",WFSubmitAction:"",WFStartAction:""},
"form":{name:"view_form",autosave:"false",showBusyIndicator:"true",updateAction:"Update",removeAction:"Remove",loaddraftAction:"GetDraft",loadAction:"Get",createAction:"Create",WFSubmitAction:"",WFStartAction:""}
};
/**
* 视图引用数据
*
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public viewRefData:any = {
"WFACTION@WFDynaActionView":{viewname:"ibizsample0021-wfdyna-action-view",title:"entities.ibizsample0021.views.wfdynaactionview.caption", width: 800, height: 500}
};
/**
* 获取工具栏按钮
*
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public getWFLinkModel():Promise<any>{
return new Promise((resolve:any, reject:any) =>{
let datas: any[] = [];
if (Object.keys(this.viewparams).length > 0) {
Object.assign(datas, { 'processDefinitionKey': this.viewparams.processDefinitionKey });
Object.assign(datas, { 'taskDefinitionKey': this.viewparams.taskDefinitionKey || this.viewparams.userTaskId });
}
this.appEntityService.GetWFLink(JSON.parse(JSON.stringify(this.context)),datas,true).then((response:any) =>{
if (response && response.status === 200) {
this.linkModel = response.data;
if(response.headers && response.headers['process-form']){
this.computeActivedForm(response.headers['process-form']);
}else{
this.computeActivedForm(null);
}
resolve(response.data);
}
}).catch((response: any) => {
if (response && response.status) {
this.$Notice.error({ title: '错误', desc: response.message });
return;
}
if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' });
return;
}
});
});
}
/**
* 计算激活表单
*
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public computeActivedForm(inputForm:any){
if(!inputForm){
this.activeForm = this.allForm && Object.values(this.allForm)[0];
return;
}
if(this.allForm && Object.keys(this.allForm).length >0){
Object.keys(this.allForm).forEach((name:string) =>{
if(Object.is(name,`wfform_${inputForm.toLowerCase()}`)){
this.activeForm = this.allForm[name];
}
})
}
}
/**
* 动态工具栏点击
*
* @memberof IBIZSample0021Usr1114433946WFDynaEditViewBase
*/
public dynamic_toolbar_click(linkItem:any, $event:any){
let datas: any[] = [];
let xData: any = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
const submit:Function = (submitData:any,linkItem:any) =>{
xData.wfsubmit(submitData,linkItem).then((response: any) => {
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
if (this.viewdata) {
this.$emit('viewdataschange', [{ ..._data }]);
this.$emit('close');
} else if (this.$tabPageExp) {
this.$tabPageExp.onClose(this.$route.fullPath);
}
});
}
if(linkItem && linkItem.sequenceflowview && this.viewRefData[`WFACTION@${linkItem.sequenceflowview}`]){
let tempContext:any = Util.deepCopy(this.context);
Object.assign(tempContext,{ibizsample0021:datas && datas[0].srfkey});
let tempViewParam:any = {actionView:linkItem.sequenceflowview,actionForm:linkItem.sequenceflowform};
let targetView:any = this.viewRefData[`WFACTION@${linkItem.sequenceflowview}`];
const appmodal = this.$appmodal.openModal({viewname:targetView.viewname, title:(this.$t(targetView.title) as string), height: targetView.height, width: targetView.width}, tempContext,tempViewParam);
appmodal.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
let tempSubmitData:any = Util.deepCopy(datas);
tempSubmitData.forEach((element:any) => {
Object.assign(element,result.datas && result.datas[0]);
});
submit(tempSubmitData,linkItem);
});
}else{
submit(datas,linkItem);
}
}
}
</script>
<style lang='less'>
@import './ibizsample0021-usr1114433946-wfdyna-edit-view.less';
</style>
\ No newline at end of file
// 基于 @VIEW/实体工作流动态编辑视图/VIEW.less.ftl 生成
.ibizsample0021-usr1114433946-wfdyna-edit-view{
position: relative;
}
.toolbar-container {
button {
margin: 6px 0px 4px 4px;
.caption {
margin-left: 4px;
}
}
.seperator {
color: #dcdee2;
margin: 0 0px 0 4px;
}
}
// this is less
.dewfdynaeditview{
>.view-card{
.ivu-card-extra{
top: 6px;
}
}
}
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import IBIZSample0021Usr1114433946WFDynaEditViewBase from './ibizsample0021-usr1114433946-wfdyna-edit-view-base.vue';
import view_wfform_operationform from '@widgets/ibizsample0021/operation-form-form/operation-form-form.vue';
import view_form from '@widgets/ibizsample0021/usr1114790802-form/usr1114790802-form.vue';
// 基于 @VIEW/@MACRO/VIEW.vue.ftl 生成
@Component({
components: {
view_wfform_operationform,
view_form,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
if(!Object.is(vm.navModel,"route")){
vm.initNavDataWithTab(vm.viewCacheData);
}
vm.$store.commit('addCurPageViewtag', { fullPath: to.fullPath, viewtag: vm.viewtag });
});
},
})
export default class IBIZSample0021Usr1114433946WFDynaEditView extends IBIZSample0021Usr1114433946WFDynaEditViewBase {
}
</script>
\ No newline at end of file
......@@ -94,6 +94,7 @@ export const PageComponents = {
Vue.component('ibizsample0021-grid-view', () => import('@pages/sample/ibizsample0021-grid-view/ibizsample0021-grid-view.vue'));
Vue.component('ibizsample0021-wfdyna-action-view', () => import('@pages/sample/ibizsample0021-wfdyna-action-view/ibizsample0021-wfdyna-action-view.vue'));
Vue.component('ibizsample0021-usr1114865995-wfdyna-edit-view3', () => import('@pages/sample/ibizsample0021-usr1114865995-wfdyna-edit-view3/ibizsample0021-usr1114865995-wfdyna-edit-view3.vue'));
Vue.component('ibizsample0021-usr1114433946-wfdyna-edit-view', () => import('@pages/sample/ibizsample0021-usr1114433946-wfdyna-edit-view/ibizsample0021-usr1114433946-wfdyna-edit-view.vue'));
Vue.component('ibizbookcustom-view', () => import('@pages/sample/ibizbookcustom-view/ibizbookcustom-view.vue'));
Vue.component('ibizcustom-custom-grid-view', () => import('@pages/sample/ibizcustom-custom-grid-view/ibizcustom-custom-grid-view.vue'));
Vue.component('ibizorder-sf5-grid-view', () => import('@pages/sample/ibizorder-sf5-grid-view/ibizorder-sf5-grid-view.vue'));
......
......@@ -1453,6 +1453,20 @@ const router = new Router({
},
component: () => import('@pages/sample/ibizsample0021-usr1114865995-wfdyna-edit-view3/ibizsample0021-usr1114865995-wfdyna-edit-view3.vue'),
},
{
path: 'ibizsample0021s/:ibizsample0021?/usr1114433946wfdynaeditview/:usr1114433946wfdynaeditview?',
meta: {
caption: 'entities.ibizsample0021.views.usr1114433946wfdynaeditview.caption',
info:'',
parameters: [
{ pathName: 'index', parameterName: 'index' },
{ pathName: 'ibizsample0021s', parameterName: 'ibizsample0021' },
{ pathName: 'usr1114433946wfdynaeditview', parameterName: 'usr1114433946wfdynaeditview' },
],
requireAuth: true,
},
component: () => import('@pages/sample/ibizsample0021-usr1114433946-wfdyna-edit-view/ibizsample0021-usr1114433946-wfdyna-edit-view.vue'),
},
{
path: 'ibizbooks/:ibizbook?/customview/:customview?',
meta: {
......@@ -4261,6 +4275,19 @@ const router = new Router({
},
component: () => import('@pages/sample/ibizappeditorgrid-view/ibizappeditorgrid-view.vue'),
},
{
path: '/ibizsample0021s/:ibizsample0021?/usr1114433946wfdynaeditview/:usr1114433946wfdynaeditview?',
meta: {
caption: 'entities.ibizsample0021.views.usr1114433946wfdynaeditview.caption',
info:'',
parameters: [
{ pathName: 'ibizsample0021s', parameterName: 'ibizsample0021' },
{ pathName: 'usr1114433946wfdynaeditview', parameterName: 'usr1114433946wfdynaeditview' },
],
requireAuth: true,
},
component: () => import('@pages/sample/ibizsample0021-usr1114433946-wfdyna-edit-view/ibizsample0021-usr1114433946-wfdyna-edit-view.vue'),
},
{
path: '/ibizsample0003s/:ibizsample0003?/stabexpview_layout/:stabexpview_layout?',
meta: {
......
......@@ -860,6 +860,19 @@ const router = new Router({
},
component: () => import('@pages/sample/ibizappeditorgrid-view/ibizappeditorgrid-view.vue'),
},
{
path: '/ibizsample0021s/:ibizsample0021?/usr1114433946wfdynaeditview/:usr1114433946wfdynaeditview?',
meta: {
caption: 'entities.ibizsample0021.views.usr1114433946wfdynaeditview.caption',
info:'',
parameters: [
{ pathName: 'ibizsample0021s', parameterName: 'ibizsample0021' },
{ pathName: 'usr1114433946wfdynaeditview', parameterName: 'usr1114433946wfdynaeditview' },
],
requireAuth: true,
},
component: () => import('@pages/sample/ibizsample0021-usr1114433946-wfdyna-edit-view/ibizsample0021-usr1114433946-wfdyna-edit-view.vue'),
},
{
path: '/ibizsample0003s/:ibizsample0003?/stabexpview_layout/:stabexpview_layout?',
meta: {
......
......@@ -625,6 +625,16 @@ export const viewstate: any = {
'6d3a1e5d74674f7d9ba445e4708216e0',
],
},
{
viewtag: '49E66C2F-237A-415A-B7B9-6B90DF532A83',
viewmodule: 'Sample',
viewname: 'IBIZSample0021Usr1114433946WFDynaEditView',
viewaction: '',
viewdatachange: false,
refviews: [
'0f4df2881b94c291b6e268dd172bdb67',
],
},
{
viewtag: '4a0d51e3bca39ffa8dc989e13a1a613f',
viewmodule: 'Sample',
......@@ -925,6 +935,7 @@ export const viewstate: any = {
'0f4df2881b94c291b6e268dd172bdb67',
'C1022CE5-B44E-467C-86F0-6EDD0940B339',
'53757392-B5A2-4E4C-84F6-99DCC4C490AB',
'49E66C2F-237A-415A-B7B9-6B90DF532A83',
'a9ac702e20306caf5a733545d652cfa9',
'F25AC36D-6D69-43FA-89B4-BE7552CE99E2',
'4e142abbc82a33d405dd609368612421',
......
......@@ -100,6 +100,7 @@ export default class IBIZSample0021UIServiceBase extends UIService {
public initViewMap(){
this.allViewMap.set(':',{viewname:'wfdynaactionview',srfappde:'ibizsample0021s',component:'ibizsample0021-wfdyna-action-view'});
this.allViewMap.set(':',{viewname:'wfdynaexpgridview',srfappde:'ibizsample0021s',component:'ibizsample0021-wfdyna-exp-grid-view'});
this.allViewMap.set(':',{viewname:'usr1114433946wfdynaeditview',srfappde:'ibizsample0021s',component:'ibizsample0021-usr1114433946-wfdyna-edit-view'});
this.allViewMap.set(':',{viewname:'wfdynaeditview',srfappde:'ibizsample0021s',component:'ibizsample0021-wfdyna-edit-view'});
this.allViewMap.set(':',{viewname:'usr1114865995wfdynaeditview3',srfappde:'ibizsample0021s',component:'ibizsample0021-usr1114865995-wfdyna-edit-view3'});
this.allViewMap.set(':',{viewname:'wfdynaactionview_layout',srfappde:'ibizsample0021s',component:'ibizsample0021-wfdyna-action-view-layout'});
......
......@@ -929,6 +929,9 @@ export default class MainMenuBase extends Vue implements ControlInterface {
case 'AppFunc131':
this.clickAppFunc131(item);
return;
case 'AppFunc132':
this.clickAppFunc132(item);
return;
case 'AppFunc22':
this.clickAppFunc22(item);
return;
......@@ -3260,6 +3263,29 @@ export default class MainMenuBase extends Vue implements ControlInterface {
})
}
/**
* 工作流动态编辑
*
* @param {*} [item={}]
* @memberof MainMenu
*/
public clickAppFunc132(item: any = {}) {
const viewparam: any = {};
Object.assign(viewparam, {});
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'ibizsample0021s', parameterName: 'ibizsample0021' },
{ pathName: 'usr1114433946wfdynaeditview', parameterName: 'usr1114433946wfdynaeditview' },
];
const path: string = this.$viewTool.buildUpRoutePath(this.$route, {}, deResParameters, parameters, [], viewparam);
if(Object.is(this.$route.fullPath,path)){
return;
}
this.$nextTick(function(){
this.$router.push(path);
})
}
/**
* 自定义视图
*
......
......@@ -2623,6 +2623,25 @@ export default class MainMenuModel {
appfunctag: 'AppFunc131',
resourcetag: '',
authtag:'Web-MainMenu-menuitem231',
},
{
id: 'E1A32720-BBDB-484B-811B-B9A6EC722452',
name: 'menuitem232',
text: '工作流动态编辑视图',
type: 'MENUITEM',
counterid: '',
tooltip: '工作流动态编辑视图',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: '',
icon: '',
textcls: '',
appfunctag: 'AppFunc132',
resourcetag: '',
authtag:'Web-MainMenu-menuitem232',
},
],
},
......@@ -5182,6 +5201,18 @@ export default class MainMenuModel {
{ pathName: 'usr1114865995wfdynaeditview3', parameterName: 'usr1114865995wfdynaeditview3' },
],
},
{
appfunctag: 'AppFunc132',
appfuncyype: 'APPVIEW',
openmode: '',
codename: 'ibizsample0021usr1114433946wfdynaeditview',
deResParameters: [],
routepath: '/index/:index?/ibizsample0021s/:ibizsample0021?/usr1114433946wfdynaeditview/:usr1114433946wfdynaeditview?',
parameters: [
{ pathName: 'ibizsample0021s', parameterName: 'ibizsample0021' },
{ pathName: 'usr1114433946wfdynaeditview', parameterName: 'usr1114433946wfdynaeditview' },
],
},
{
appfunctag: 'AppFunc22',
appfuncyype: 'APPVIEW',
......
......@@ -712,7 +712,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/
public load(opt: any = {}): void {
if(!this.loadAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr9GridView' + (this.$t('app.searchForm.notConfig.loadAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKCalendarView' + (this.$t('app.searchForm.notConfig.loadAction') as string) });
return;
}
const arg: any = { ...opt };
......@@ -748,7 +748,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/
public async loadDraft(opt: any = {},mode?:string): Promise<any> {
if(!this.loaddraftAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr9GridView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKCalendarView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) });
return;
}
const arg: any = { ...opt } ;
......
......@@ -698,7 +698,7 @@ export default class Usr4Base extends Vue implements ControlInterface {
*/
public async load(opt: any = {}, isReset: boolean = false): Promise<any> {
if(!this.fetchAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKTestCLDataView' + (this.$t('app.list.notConfig.fetchAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr4DataView' + (this.$t('app.list.notConfig.fetchAction') as string) });
return;
}
const arg: any = {...opt};
......@@ -792,7 +792,7 @@ export default class Usr4Base extends Vue implements ControlInterface {
*/
public async remove(datas: any[]): Promise<any> {
if(!this.removeAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKTestCLDataView' + (this.$t('app.gridpage.notConfig.removeAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr4DataView' + (this.$t('app.gridpage.notConfig.removeAction') as string) });
return;
}
let _datas:any[] = [];
......@@ -908,7 +908,7 @@ export default class Usr4Base extends Vue implements ControlInterface {
try {
if(Object.is(item.rowDataState, 'create')){
if(!this.createAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKTestCLDataView' + (this.$t('app.list.notConfig.createAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr4DataView' + (this.$t('app.list.notConfig.createAction') as string) });
}else{
Object.assign(item,{viewparams:this.viewparams});
let response = await this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator);
......@@ -916,7 +916,7 @@ export default class Usr4Base extends Vue implements ControlInterface {
}
}else if(Object.is(item.rowDataState, 'update')){
if(!this.updateAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKTestCLDataView' + (this.$t('app.list.notConfig.updateAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr4DataView' + (this.$t('app.list.notConfig.updateAction') as string) });
}else{
Object.assign(item,{viewparams:this.viewparams});
if(item.ibizbook){
......
......@@ -70,6 +70,11 @@ export default class Usr4Model {
prop: 'n_ibizbookname_like',
dataType: 'QUERYPARAM'
},
{
name: 'n_price_gtandeq',
prop: 'n_price_gtandeq',
dataType: 'QUERYPARAM'
},
{
......
......@@ -736,7 +736,7 @@ export default class CardNavigationBase extends Vue implements ControlInterface
*/
public async load(opt: any = {}, isReset: boolean = false): Promise<any> {
if(!this.fetchAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderDataViewExpView' + (this.$t('app.list.notConfig.fetchAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderDataViewExpView_layout' + (this.$t('app.list.notConfig.fetchAction') as string) });
return;
}
const arg: any = {...opt};
......@@ -830,7 +830,7 @@ export default class CardNavigationBase extends Vue implements ControlInterface
*/
public async remove(datas: any[]): Promise<any> {
if(!this.removeAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderDataViewExpView' + (this.$t('app.gridpage.notConfig.removeAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderDataViewExpView_layout' + (this.$t('app.gridpage.notConfig.removeAction') as string) });
return;
}
let _datas:any[] = [];
......@@ -946,7 +946,7 @@ export default class CardNavigationBase extends Vue implements ControlInterface
try {
if(Object.is(item.rowDataState, 'create')){
if(!this.createAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderDataViewExpView' + (this.$t('app.list.notConfig.createAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderDataViewExpView_layout' + (this.$t('app.list.notConfig.createAction') as string) });
}else{
Object.assign(item,{viewparams:this.viewparams});
let response = await this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator);
......@@ -954,7 +954,7 @@ export default class CardNavigationBase extends Vue implements ControlInterface
}
}else if(Object.is(item.rowDataState, 'update')){
if(!this.updateAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderDataViewExpView' + (this.$t('app.list.notConfig.updateAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderDataViewExpView_layout' + (this.$t('app.list.notConfig.updateAction') as string) });
}else{
Object.assign(item,{viewparams:this.viewparams});
if(item.ibizorder){
......
......@@ -319,7 +319,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZOrderSF1GridViewBase
* @memberof IBIZOrderPickupGridViewBase
*/
public Edit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
......@@ -462,20 +462,6 @@ export default class MainBase extends Vue implements ControlInterface {
return this.selections[0];
}
/**
* 打开新建数据视图
*
* @type {any}
* @memberof MainBase
*/
@Prop() public newdata: any;
/**
* 打开编辑数据视图
*
* @type {any}
* @memberof MainBase
*/
@Prop() public opendata: any;
/**
* 是否嵌入关系界面
......@@ -1010,7 +996,7 @@ export default class MainBase extends Vue implements ControlInterface {
if (!this.fetchAction) {
this.$Notice.error({
title: this.$t("app.commonWords.wrong") as string,
desc: "IBIZOrderSF1GridView" + (this.$t("app.gridpage.notConfig.fetchAction") as string),
desc: "IBIZOrderPickupGridView" + (this.$t("app.gridpage.notConfig.fetchAction") as string),
});
return;
}
......@@ -1139,7 +1125,7 @@ export default class MainBase extends Vue implements ControlInterface {
if (!this.removeAction) {
this.$Notice.error({
title: (this.$t('app.commonWords.wrong') as string),
desc: 'IBIZOrderSF1GridView' + (this.$t('app.gridpage.notConfig.removeAction') as string)
desc: 'IBIZOrderPickupGridView' + (this.$t('app.gridpage.notConfig.removeAction') as string)
});
return;
}
......@@ -1253,7 +1239,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/
public addBatch(arg: any = {}): void {
if(!this.fetchAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderSF1GridView'+(this.$t('app.gridpage.notConfig.fetchAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderPickupGridView'+(this.$t('app.gridpage.notConfig.fetchAction') as string) });
return;
}
if(!arg){
......@@ -2184,7 +2170,7 @@ export default class MainBase extends Vue implements ControlInterface {
try {
if (Object.is(item.rowDataState, 'create')) {
if (!this.createAction) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderSF1GridView'+(this.$t('app.gridpage.notConfig.createAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderPickupGridView'+(this.$t('app.gridpage.notConfig.createAction') as string) });
} else {
Object.assign(item, { viewparams: this.viewparams });
const tempContext = Util.deepCopy(this.context);
......@@ -2193,7 +2179,7 @@ export default class MainBase extends Vue implements ControlInterface {
}
}else if (Object.is(item.rowDataState, 'update')){
if (!this.updateAction) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderSF1GridView'+(this.$t('app.gridpage.notConfig.updateAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderPickupGridView'+(this.$t('app.gridpage.notConfig.updateAction') as string) });
} else {
Object.assign(item, { viewparams: this.viewparams });
const tempContext = Util.deepCopy(this.context);
......@@ -2269,7 +2255,7 @@ export default class MainBase extends Vue implements ControlInterface {
if(!this.loaddraftAction){
this.$Notice.error({
title: (this.$t('app.commonWords.wrong') as string),
desc: 'IBIZOrderSF1GridView' + (this.$t('app.gridpage.notConfig.loaddraftAction') as string)
desc: 'IBIZOrderPickupGridView' + (this.$t('app.gridpage.notConfig.loaddraftAction') as string)
});
return;
}
......
......@@ -105,21 +105,6 @@ export default class MainModel {
prop: 'n_ibizordername_like',
dataType: 'QUERYPARAM'
},
{
name: 'n_orderstate_eq',
prop: 'n_orderstate_eq',
dataType: 'QUERYPARAM'
},
{
name: 'n_ordertime_gt',
prop: 'n_ordertime_gt',
dataType: 'QUERYPARAM'
},
{
name: 'n_ordertime_lt',
prop: 'n_ordertime_lt',
dataType: 'QUERYPARAM'
},
{
name:'size',
......
<template>
<i-form :model="this.data" class='app-form' ref='form' id='ibizsample0021_usr1114790802' style="" @on-validate="formItemValidate">
<input style="display:none;" />
<row >
<tabs :animated="false" name='usr1114790802' :value="detailsModel.form.activiedPage"
@on-click="detailsModel.form.clickPage($event)">
<tab-pane v-show="detailsModel.formpage1.visible" name='formpage1' :index="0" tab='usr1114790802' class=''
:label="(h) =>{
return h('span',{
class:'caption'
},[
$t('entities.ibizsample0021.usr1114790802_form.details.formpage1')
])
}">
<i-col v-show="detailsModel.group1.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group :uiService="appUIService" :data="transformData(data)" :manageContainerStatus="detailsModel.group1.manageContainerStatus" :isManageContainer="detailsModel.group1.isManageContainer" @managecontainerclick="manageContainerClick('group1')" layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.group1.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.ibizsample0021.usr1114790802_form.details.group1')" :isShowCaption="true" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" >
<row>
<i-col v-show="detailsModel.ibizsample0021name.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='ibizsample0021name' :itemRules="this.rules().ibizsample0021name" class='' :caption="$t('entities.ibizsample0021.usr1114790802_form.details.ibizsample0021name')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.ibizsample0021name.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box
v-model="data.ibizsample0021name"
@enter="onEnter($event)"
unit=""
:disabled="detailsModel.ibizsample0021name.disabled"
type='text'
style="">
</input-box>
</app-form-item>
</i-col>
</row>
</app-form-group>
</i-col>
</tab-pane>
<tab-pane v-show="detailsModel.formpage2.visible" name='formpage2' :index="1" tab='usr1114790802' class=''
:label="(h) =>{
return h('span',{
class:'caption'
},[
$t('entities.ibizsample0021.usr1114790802_form.details.formpage2')
])
}">
<i-col v-show="detailsModel.group2.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group :uiService="appUIService" :data="transformData(data)" :manageContainerStatus="detailsModel.group2.manageContainerStatus" :isManageContainer="detailsModel.group2.isManageContainer" @managecontainerclick="manageContainerClick('group2')" layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.group2.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.ibizsample0021.usr1114790802_form.details.group2')" :isShowCaption="true" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" >
<row>
<i-col v-show="detailsModel.createman.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='createman' :itemRules="this.rules().createman" class='' :caption="$t('entities.ibizsample0021.usr1114790802_form.details.createman')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.createman.error" :isEmptyCaption="false" labelPos="LEFT">
<app-span name='createman' :value="data.createman" dataType="TEXT" unitName="" :precision="0"
tag='SysOperator' codelistType='DYNAMIC' :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style="">
</app-span>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.createdate.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='createdate' :itemRules="this.rules().createdate" class='' :caption="$t('entities.ibizsample0021.usr1114790802_form.details.createdate')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.createdate.error" :isEmptyCaption="false" labelPos="LEFT">
<app-span name='createdate' :value="data.createdate" dataType="DATETIME" unitName="" valueFormat="%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS" :precision="0"
:data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style="">
</app-span>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.updateman.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='updateman' :itemRules="this.rules().updateman" class='' :caption="$t('entities.ibizsample0021.usr1114790802_form.details.updateman')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.updateman.error" :isEmptyCaption="false" labelPos="LEFT">
<app-span name='updateman' :value="data.updateman" dataType="TEXT" unitName="" :precision="0"
tag='SysOperator' codelistType='DYNAMIC' :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style="">
</app-span>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.updatedate.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='updatedate' :itemRules="this.rules().updatedate" class='' :caption="$t('entities.ibizsample0021.usr1114790802_form.details.updatedate')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.updatedate.error" :isEmptyCaption="false" labelPos="LEFT">
<app-span name='updatedate' :value="data.updatedate" dataType="DATETIME" unitName="" valueFormat="%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS" :precision="0"
:data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style="">
</app-span>
</app-form-item>
</i-col>
</row>
</app-form-group>
</i-col>
</tab-pane>
</tabs>
</row>
</i-form>
</template>
// 基于 @CONTROL/表单/CONTROL-BASE.vue.ftl 生成
<script lang='tsx'>
import { Vue, Component, Prop, Provide, Emit, Watch, Model,Inject } from 'vue-property-decorator';
import { CreateElement } from 'vue';
import { Subject, Subscription } from 'rxjs';
import { ControlInterface } from '@/interface/control';
import { UIActionTool,Util,ViewTool } from '@/utils';
import NavDataService from '@/service/app/navdata-service';
import AppCenterService from "@service/app/app-center-service";
import IBIZSample0021EntityService from '@/service/ibizsample0021/ibizsample0021-service';
import Usr1114790802Service from './usr1114790802-form-service';
import IBIZSample0021UIService from '@/uiservice/ibizsample0021/ibizsample0021-ui-service';
import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail';
import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
import schema from 'async-validator';
import { Environment } from '@/environments/environment';
@Component({
components: {
}
})
export default class Usr1114790802Base extends Vue implements ControlInterface {
/**
* 名称
*
* @type {string}
* @memberof Usr1114790802Base
*/
@Prop() public name?: string;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof Usr1114790802Base
*/
@Prop() public viewState!: Subject<ViewState>;
/**
* 应用上下文
*
* @type {*}
* @memberof Usr1114790802Base
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof Usr1114790802Base
*/
@Prop() public viewparams!: any;
/**
* 视图操作参数(父级)
*
* @type {*}
* @memberof Usr1114790802Base
*/
@Prop() public pViewCtx!: any;
/**
* 视图操作参数
*
* @type {*}
* @memberof Usr1114790802Base
*/
public viewCtx: any = {};
/**
* 监听视图操作参数变化
*
* @type {*}
* @memberof Usr1114790802Base
*/
@Watch('pViewCtx', { immediate: true })
public onViewCtxChange(newVal: any, oldVal: any) {
Object.assign(this.viewCtx, newVal, { xData: this, ctrl: this });
}
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof Usr1114790802Base
*/
public viewStateEvent: Subscription | undefined;
/**
* 获取部件类型
*
* @returns {string}
* @memberof Usr1114790802Base
*/
public getControlType(): string {
return 'FORM'
}
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof Usr1114790802Base
*/
public counterServiceArray:Array<any> = [];
/**
* 建构部件服务对象
*
* @type {Usr1114790802Service}
* @memberof Usr1114790802Base
*/
public service: Usr1114790802Service = new Usr1114790802Service({ $store: this.$store });
/**
* 实体服务对象
*
* @type {IBIZSample0021Service}
* @memberof Usr1114790802Base
*/
public appEntityService: IBIZSample0021EntityService = new IBIZSample0021EntityService({ $store: this.$store });
/**
* 转化数据
*
* @param {any} args
* @memberof Usr1114790802Base
*/
public transformData(args: any) {
let _this: any = this;
if(_this.service && _this.service.handleRequestData instanceof Function && _this.service.handleRequestData('transform',_this.context,args)){
return _this.service.handleRequestData('transform',_this.context,args)['data'];
}
}
/**
* 关闭视图
*
* @param {any} args
* @memberof Usr1114790802Base
*/
public closeView(args: any): void {
let _this: any = this;
_this.$emit('closeview', [args]);
}
/**
* 计数器刷新
*
* @memberof Usr1114790802Base
*/
public counterRefresh(){
const _this:any =this;
if(_this.counterServiceArray && _this.counterServiceArray.length >0){
_this.counterServiceArray.forEach((item:any) =>{
if(item.refreshData && item.refreshData instanceof Function){
item.refreshData();
}
})
}
}
/**
* 处理部件事件
*
* @memberof Usr1114790802Base
*/
public async handleCtrlEvents(eventName: string, args: any = {}): Promise<boolean> {
const actionData = {
data: this.getData() || {},
context: Util.deepCopy(this.context),
viewparams: Util.deepCopy(this.viewparams),
xData: this
}
let result: boolean = true;
Object.assign(actionData, args);
if (!result) {
return false;
}
this.$emit(eventName, actionData);
return true;
}
/**
* 视图默认使用
*
* @type {string}
* @memberof Usr1114790802Base
*/
@Inject({from:'navModel',default: 'tab'})
public navModel!:string;
/**
* 主键表单项名称
*
* @protected
* @type {string}
* @memberof Usr1114790802Base
*/
public formKeyItemName: string = '';
/**
* 是否自动加载
*
* @type {boolean}
* @memberof Usr1114790802Base
*/
@Prop({default:false}) public isautoload?:boolean;
/**
* 界面UI服务对象
*
* @type {IBIZSample0021UIService}
* @memberof Usr1114790802Base
*/
public appUIService:IBIZSample0021UIService = new IBIZSample0021UIService();
/**
* 工作流审批意见控件绑定值
*
* @memberof Usr1114790802Base
*/
public srfwfmemo:string = "";
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof Usr1114790802Base
*/
public getDatas(): any[] {
return [this.data];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof Usr1114790802Base
*/
public getData(): any {
return this.data;
}
/**
* 是否默认保存
*
* @type {boolean}
* @memberof Usr1114790802Base
*/
@Prop({ default: false }) public autosave?: boolean;
/**
* 显示处理提示
*
* @type {boolean}
* @memberof Usr1114790802Base
*/
@Prop({ default: true }) public showBusyIndicator?: boolean;
/**
* 部件行为--submit
*
* @type {string}
* @memberof Usr1114790802Base
*/
@Prop() public WFSubmitAction!: string;
/**
* 部件行为--start
*
* @type {string}
* @memberof Usr1114790802Base
*/
@Prop() public WFStartAction!: string;
/**
* 部件行为--update
*
* @type {string}
* @memberof Usr1114790802Base
*/
@Prop() public updateAction!: string;
/**
* 部件行为--remove
*
* @type {string}
* @memberof Usr1114790802Base
*/
@Prop() public removeAction!: string;
/**
* 部件行为--loaddraft
*
* @type {string}
* @memberof Usr1114790802Base
*/
@Prop() public loaddraftAction!: string;
/**
* 部件行为--load
*
* @type {string}
* @memberof Usr1114790802Base
*/
@Prop() public loadAction!: string;
/**
* 部件行为--create
*
* @type {string}
* @memberof Usr1114790802Base
*/
@Prop() public createAction!: string;
/**
* 部件行为--create
*
* @type {string}
* @memberof Usr1114790802Base
*/
@Prop() public searchAction!: string;
/**
* 视图标识
*
* @type {string}
* @memberof Usr1114790802Base
*/
@Prop() public viewtag!: string;
/**
* 表单状态
*
* @type {Subject<any>}
* @memberof Usr1114790802Base
*/
public formState: Subject<any> = new Subject();
/**
* 忽略表单项值变化
*
* @type {boolean}
* @memberof Usr1114790802Base
*/
public ignorefieldvaluechange: boolean = false;
/**
* 数据变化
*
* @public
* @type {Subject<any>}
* @memberof Usr1114790802Base
*/
public dataChang: Subject<any> = new Subject();
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof Usr1114790802Base
*/
public dataChangEvent: Subscription | undefined;
/**
* 原始数据
*
* @public
* @type {*}
* @memberof Usr1114790802Base
*/
public oldData: any = {};
/**
* 混入表单数据对象
*
* @type {*}
* @memberof Usr1114790802Base
*/
public mixinData:any = {};
/**
* 表单项校验错误提示信息
*
* @memberof Usr1114790802Base
*/
public errorMessages: Array<any> = [];
/**
* 应用状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof Usr1114790802Base
*/
public appStateEvent: Subscription | undefined;
/**
* 设置表单项错误提示信息
*
* @param {*} prop 表单项字段名
* @param {*} status 校验状态
* @param {*} error 错误信息
* @memberof Usr1114790802Base
*/
public formItemValidate(prop: string,status: boolean, error: string){
error = error ? error : '';
if(this.errorMessages && this.errorMessages.length > 0){
const index = this.errorMessages.findIndex((errorMessage:any) => Object.is(errorMessage.prop,prop));
if(index != -1){
this.errorMessages[index].error = error;
}else{
this.errorMessages.push({prop: prop,error: error});
}
}else{
this.errorMessages.push({prop: prop,error: error});
}
}
/**
* 表单数据对象
*
* @type {*}
* @memberof Usr1114790802Base
*/
public data: any = {
srfupdatedate: null,
srforikey: null,
srfkey: null,
srfmajortext: null,
srftempmode: null,
srfuf: null,
srfdeid: null,
srfsourcekey: null,
ibizsample0021name: null,
createman: null,
createdate: null,
updateman: null,
updatedate: null,
ibizsample0021id: null,
ibizsample0021:null,
};
/**
* 当前执行的行为逻辑
*
* @type {string}
* @memberof Usr1114790802Base
*/
public currentAction: string = "";
/**
* 关系界面计数器
*
* @type {number}
* @memberof Usr1114790802Base
*/
public drcounter: number = 0;
/**
* 需要等待关系界面保存时,第一次调用save参数的备份
*
* @type {number}
* @memberof Usr1114790802Base
*/
public drsaveopt: any = {};
/**
* 表单保存回调存储对象
*
* @type {any}
* @memberof Usr1114790802Base
*/
public saveState:any ;
/**
* 主信息属性映射表单项名称
*
* @type {string}
* @memberof Usr1114790802Base
*/
public majorMessageField: string = "ibizsample0021name";
/**
* 值规则
*
* @type {*}
* @memberof Usr1114790802Base
*/
public rules() :any {
return {
ibizsample0021name: [
{ required: this.detailsModel.ibizsample0021name.required, type: 'string', message: '订单名称 值不能为空', trigger: 'change' },
{ required: this.detailsModel.ibizsample0021name.required, type: 'string', message: '订单名称 值不能为空', trigger: 'blur' },
],
createman: [
{ required: this.detailsModel.createman.required, type: 'string', message: '建立人 值不能为空', trigger: 'change' },
{ required: this.detailsModel.createman.required, type: 'string', message: '建立人 值不能为空', trigger: 'blur' },
],
createdate: [
{ required: this.detailsModel.createdate.required, type: 'string', message: '建立时间 值不能为空', trigger: 'change' },
{ required: this.detailsModel.createdate.required, type: 'string', message: '建立时间 值不能为空', trigger: 'blur' },
],
updateman: [
{ required: this.detailsModel.updateman.required, type: 'string', message: '更新人 值不能为空', trigger: 'change' },
{ required: this.detailsModel.updateman.required, type: 'string', message: '更新人 值不能为空', trigger: 'blur' },
],
updatedate: [
{ required: this.detailsModel.updatedate.required, type: 'string', message: '更新时间 值不能为空', trigger: 'change' },
{ required: this.detailsModel.updatedate.required, type: 'string', message: '更新时间 值不能为空', trigger: 'blur' },
],
}
}
/**
* 属性值规则
*
* @type {*}
* @memberof Usr1114790802Base
*/
public deRules(){
return {
}
}
/**
* 校验属性值规则
*
* @public
* @param {{ name: string }} { name }
* @memberof Usr1114790802Base
*/
public verifyDeRules(name:string,rule:any = this.deRules(),op:string = "AND") :{isPast:boolean,infoMessage:string}{
let falg:any = {infoMessage:""};
if(!rule[name]){
return falg;
}
let opValue = op == 'AND'? true :false;
let startOp = (val:boolean)=>{
if(falg.isPast){
if(opValue){
falg.isPast = falg.isPast && val;
}else{
falg.isPast = falg.isPast || val;
}
}else{
falg.isPast = val;
}
}
for(let i=0;i<rule[name].length;i++){
let item:any = rule[name][i];
let dataValue = item.deName?this.data[this.service.getItemNameByDeName(item.deName)]:"";
item.ruleInfo = item.ruleInfo ? item.ruleInfo : this.$t('app.formpage.valuecheckex');
if((dataValue === null || dataValue === undefined || dataValue === "") && (item.type != 'GROUP')){
startOp(true);
return falg;
}
try {
// 常规规则
if(item.type == 'SIMPLE'){
startOp(!this.$verify.checkFieldSimpleRule(dataValue,item.condOP,item.paramValue,item.ruleInfo,item.paramType,this.data,item.isKeyCond));
falg.infoMessage = item.ruleInfo;
if(!falg.isPast) return falg;
}
// 数值范围
if(item.type == 'VALUERANGE2'){
startOp( !this.$verify.checkFieldValueRangeRule(dataValue,item.minValue,item.isIncludeMinValue,item.maxValue,item.isIncludeMaxValue,item.ruleInfo,item.isKeyCond));
falg.infoMessage = item.ruleInfo;
if(!falg.isPast) return falg;
}
// 正则式
if (item.type == "REGEX") {
startOp(!this.$verify.checkFieldRegExRule(dataValue,item.regExCode,item.ruleInfo,item.isKeyCond));
falg.infoMessage = item.ruleInfo;
if(!falg.isPast) return falg;
}
// 长度
if (item.type == "STRINGLENGTH") {
startOp(!this.$verify.checkFieldStringLengthRule(dataValue,item.minValue,item.isIncludeMinValue,item.maxValue,item.isIncludeMaxValue,item.ruleInfo,item.isKeyCond));
falg.infoMessage = item.ruleInfo;
if(!falg.isPast) return falg;
}
// 系统值规则
if(item.type == "SYSVALUERULE") {
startOp(!this.$verify.checkFieldSysValueRule(dataValue,item.sysRule.regExCode,item.ruleInfo,item.isKeyCond));
falg.infoMessage = item.ruleInfo;
if(!falg.isPast) return falg;
}
} catch(error) {
falg.infoMessage = item.ruleInfo;
startOp(false);
if(!falg.isPast) return falg;
}
// 分组
if(item.type == 'GROUP'){
falg = this.verifyDeRules('group',item,item.condOP?item.condOP:"AND");
if(item.isNotMode){
falg.isPast = !falg.isPast;
}
if(!falg.isPast) return falg;
}
}
if(!falg.hasOwnProperty("isPast")){
falg.isPast = true;
}
if(!this.data[name] && this.data[name] != 0){
falg.isPast = true;
}
return falg;
}
/**
* 详情模型集合
*
* @type {*}
* @memberof Usr1114790802Base
*/
public detailsModel: any = {
group1: new FormGroupPanelModel({ caption: '订单基本信息', detailType: 'GROUPPANEL', name: 'group1', visible: true, isShowCaption: true, form: this, isControlledContent: false , uiActionGroup: { caption: '', langbase: 'entities.ibizsample0021.usr1114790802_form', extractMode: 'ITEM', details: [] }, isManageContainer: false, showMoreModeItems: [] })
,
formpage1: new FormPageModel({ caption: '基本信息', detailType: 'FORMPAGE', name: 'formpage1', visible: true, isShowCaption: true, form: this, isControlledContent: false })
,
group2: new FormGroupPanelModel({ caption: '操作信息', detailType: 'GROUPPANEL', name: 'group2', visible: true, isShowCaption: true, form: this, isControlledContent: false , uiActionGroup: { caption: '', langbase: 'entities.ibizsample0021.usr1114790802_form', extractMode: 'ITEM', details: [] }, isManageContainer: false, showMoreModeItems: [] })
,
formpage2: new FormPageModel({ caption: '其它', detailType: 'FORMPAGE', name: 'formpage2', visible: true, isShowCaption: true, form: this, isControlledContent: false })
,
srfupdatedate: new FormItemModel({ caption: '更新时间', detailType: 'FORMITEM', name: 'srfupdatedate', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
srforikey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srforikey', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
srfkey: new FormItemModel({ caption: '订单标识', detailType: 'FORMITEM', name: 'srfkey', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
srfmajortext: new FormItemModel({ caption: '订单名称', detailType: 'FORMITEM', name: 'srfmajortext', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
srftempmode: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srftempmode', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
srfuf: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfuf', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
srfdeid: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfdeid', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
srfsourcekey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfsourcekey', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
ibizsample0021name: new FormItemModel({ caption: '订单名称', detailType: 'FORMITEM', name: 'ibizsample0021name', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
createman: new FormItemModel({ caption: '建立人', detailType: 'FORMITEM', name: 'createman', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
createdate: new FormItemModel({ caption: '建立时间', detailType: 'FORMITEM', name: 'createdate', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
updateman: new FormItemModel({ caption: '更新人', detailType: 'FORMITEM', name: 'updateman', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
updatedate: new FormItemModel({ caption: '更新时间', detailType: 'FORMITEM', name: 'updatedate', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
ibizsample0021id: new FormItemModel({ caption: '订单标识', detailType: 'FORMITEM', name: 'ibizsample0021id', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
form: new FormTabPanelModel({ caption: 'form', detailType: 'TABPANEL', name: 'form', visible: true, isShowCaption: true, form: this, tabPages: [{ name: 'formpage1', index: 0, visible: true }, { name: 'formpage2', index: 1, visible: true }] }),
};
/**
* 监控表单属性 srfupdatedate 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof Usr1114790802Base
*/
@Watch('data.srfupdatedate')
onSrfupdatedateChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'srfupdatedate', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 srforikey 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof Usr1114790802Base
*/
@Watch('data.srforikey')
onSrforikeyChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'srforikey', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 srfkey 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof Usr1114790802Base
*/
@Watch('data.srfkey')
onSrfkeyChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'srfkey', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 srfmajortext 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof Usr1114790802Base
*/
@Watch('data.srfmajortext')
onSrfmajortextChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'srfmajortext', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 srftempmode 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof Usr1114790802Base
*/
@Watch('data.srftempmode')
onSrftempmodeChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'srftempmode', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 srfuf 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof Usr1114790802Base
*/
@Watch('data.srfuf')
onSrfufChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'srfuf', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 srfdeid 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof Usr1114790802Base
*/
@Watch('data.srfdeid')
onSrfdeidChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'srfdeid', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 srfsourcekey 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof Usr1114790802Base
*/
@Watch('data.srfsourcekey')
onSrfsourcekeyChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'srfsourcekey', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 ibizsample0021name 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof Usr1114790802Base
*/
@Watch('data.ibizsample0021name')
onIbizsample0021nameChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'ibizsample0021name', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 createman 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof Usr1114790802Base
*/
@Watch('data.createman')
onCreatemanChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'createman', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 createdate 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof Usr1114790802Base
*/
@Watch('data.createdate')
onCreatedateChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'createdate', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 updateman 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof Usr1114790802Base
*/
@Watch('data.updateman')
onUpdatemanChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'updateman', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 updatedate 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof Usr1114790802Base
*/
@Watch('data.updatedate')
onUpdatedateChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'updatedate', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 ibizsample0021id 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof Usr1114790802Base
*/
@Watch('data.ibizsample0021id')
onIbizsample0021idChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'ibizsample0021id', newVal: newVal, oldVal: oldVal });
}
/**
* 显示更多模式切换操作
*
* @type {string}
* @memberof Usr1114790802Base
*/
public manageContainerClick(name: string){
let model = this.detailsModel[name];
if(model.isManageContainer){
model.setManageContainerStatus(!model.manageContainerStatus);
model.showMoreModeItems.forEach((item:any) => {
if(this.detailsModel[item].isControlledContent){
this.detailsModel[item].setVisible(model.manageContainerStatus? this.detailsModel[item].oldVisible : false);
}
});
}
}
/**
* 重置表单项值
*
* @public
* @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal }
* @memberof Usr1114790802Base
*/
public resetFormData({ name, newVal, oldVal }: { name: string, newVal: any, oldVal: any }): void {
}
/**
* 置空对象
*
* @param {any[]} args
* @memberof Usr1114790802Base
*/
public ResetData(_datas:any){
if(Object.keys(_datas).length >0){
Object.keys(_datas).forEach((name: string) => {
if (this.data.hasOwnProperty(name)) {
this.data[name] = null;
}
});
}
}
/**
* 表单逻辑
*
* @public
* @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal }
* @memberof Usr1114790802Base
*/
public async formLogic({ name, newVal, oldVal }: { name: string, newVal: any, oldVal: any }){
}
/**
* 表单项检查逻辑
*
* @public
* @param name 属性名
* @memberof Usr1114790802Base
*/
public checkItem(name:string):Promise<any> {
return new Promise((resolve, reject) => {
var validator = new schema({[name]:this.rules()[name]});
validator.validate({[name]:this.data[name]}).then(()=>{
resolve(true);
})
.catch(() => {
resolve(false);
});;
})
}
/**
* 表单值变化
*
* @public
* @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal }
* @returns {void}
* @memberof Usr1114790802Base
*/
public formDataChange({ name, newVal, oldVal }: { name: string, newVal: any, oldVal: any }): void {
if (this.ignorefieldvaluechange) {
return;
}
this.resetFormData({ name: name, newVal: newVal, oldVal: oldVal });
this.formLogic({ name: name, newVal: newVal, oldVal: oldVal });
this.dataChang.next(JSON.stringify(this.data));
}
/**
* 表单加载完成
*
* @public
* @param {*} [data={}]
* @param {string} [action]
* @memberof Usr1114790802Base
*/
public onFormLoad(data: any = {},action:string): void {
if(Object.is(action,"save") || Object.is(action,"autoSave") || Object.is(action,"submit"))
// 更新context的实体主键
if(data.ibizsample0021){
Object.assign(this.context,{ibizsample0021:data.ibizsample0021})
}
this.setFormEnableCond(data);
this.computeButtonState(data);
this.fillForm(data,action);
this.oldData = {};
Object.assign(this.oldData, JSON.parse(JSON.stringify(this.data)));
this.$store.commit('viewaction/setViewDataChange', { viewtag: this.viewtag, viewdatachange: false });
this.formLogic({ name: '', newVal: null, oldVal: null });
}
/**
* 值填充
*
* @param {*} [_datas={}]
* @param {string} [action]
* @memberof Usr1114790802Base
*/
public fillForm(_datas: any = {},action:string): void {
this.mixinData = _datas;
this.ignorefieldvaluechange = true;
Object.keys(_datas).forEach((name: string) => {
if (this.data.hasOwnProperty(name)) {
this.data[name] = _datas[name];
}
});
if(Object.is(action,'loadDraft')){
this.createDefault();
}
if(Object.is(action,'load')){
this.updateDefault();
}
this.$nextTick(function () {
this.ignorefieldvaluechange = false;
})
}
/**
* 设置表单项是否启用
*
* @public
* @param {*} data
* @memberof Usr1114790802Base
*/
public setFormEnableCond(data: any): void {
Object.values(this.detailsModel).forEach((detail: any) => {
if (!Object.is(detail.detailType, 'FORMITEM')) {
return;
}
const formItem: FormItemModel = detail;
formItem.setEnableCond(data.srfuf);
});
}
/**
* 重置草稿表单状态
*
* @public
* @memberof Usr1114790802Base
*/
public resetDraftFormStates(): void {
const form: any = this.$refs.form;
if (form) {
form.resetFields();
}
}
/**
* 重置校验结果
*
* @memberof Usr1114790802Base
*/
public resetValidates(): void {
Object.values(this.detailsModel).forEach((detail: any) => {
if (!Object.is(detail.detailType, 'FORMITEM')) {
return;
}
const formItem: FormItemModel = detail;
formItem.setError('');
});
}
/**
* 填充校验结果 (后台)
*
* @param {any[]} fieldErrors
* @memberof Usr1114790802Base
*/
public fillValidates(fieldErrors: any[]): void {
fieldErrors.forEach((error: any) => {
const formItem: FormItemModel = this.detailsModel[error.field];
if (!formItem) {
return;
}
this.$nextTick(() => {
formItem.setError(error.message);
});
});
}
/**
* 表单校验状态
*
* @returns {boolean}
* @memberof Usr1114790802Base
*/
public formValidateStatus(): boolean {
const form: any = this.$refs.form;
let validatestate: boolean = true;
form.validate((valid: boolean) => {
validatestate = valid ? true : false;
});
return validatestate
}
/**
* 获取全部值
*
* @returns {*}
* @memberof Usr1114790802Base
*/
public getValues(): any {
return this.data;
}
/**
* 表单项值变更
*
* @param {{ name: string, value: any }} $event
* @returns {void}
* @memberof Usr1114790802Base
*/
public onFormItemValueChange($event: { name: string, value: any }): void {
if (!$event) {
return;
}
if (!$event.name || Object.is($event.name, '') || !this.data.hasOwnProperty($event.name)) {
return;
}
this.data[$event.name] = $event.value;
}
/**
* 编辑器行为触发
*
* @param {*} arg
* @returns {void}
* @memberof Usr1114790802Base
*/
public onFormItemActionClick(arg:any){
if(arg && (arg instanceof Function)) arg();
}
/**
* 设置数据项值
*
* @param {string} name
* @param {*} value
* @returns {void}
* @memberof Usr1114790802Base
*/
public setDataItemValue(name: string, value: any): void {
if (!name || Object.is(name, '') || !this.data.hasOwnProperty(name)) {
return;
}
if (Object.is(this.data[name], value)) {
return;
}
this.data[name] = value;
}
/**
* 计算表单按钮权限状态
*
* @param {*} [data] 传入数据
* @memberof Usr1114790802Base
*/
public computeButtonState(data:any){
let targetData:any = this.transformData(data);
if(this.detailsModel && Object.keys(this.detailsModel).length >0){
Object.keys(this.detailsModel).forEach((name:any) =>{
if(this.detailsModel[name] && this.detailsModel[name].uiaction && this.detailsModel[name].uiaction.dataaccaction && Object.is(this.detailsModel[name].detailType,"BUTTON")){
this.detailsModel[name].isPower = true;
let tempUIAction:any = JSON.parse(JSON.stringify(this.detailsModel[name].uiaction));
let result: any[] = ViewTool.calcActionItemAuthState(targetData,[tempUIAction],this.appUIService);
this.detailsModel[name].visible = tempUIAction.visabled;
this.detailsModel[name].disabled = tempUIAction.disabled;
this.detailsModel[name].isPower = result[0] === 1 ? true : false;
}
})
}
}
/**
* 分组界面行为事件
*
* @param {*} $event
* @memberof Usr1114790802Base
*/
public groupUIActionClick($event: any): void {
if (!$event) {
return;
}
const item:any = $event.item;
}
/**
* Vue声明周期(处理组件的输入属性)
*
* @memberof Usr1114790802Base
*/
public created(): void {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof Usr1114790802Base
*/
public afterCreated(){
if(this.isautoload){
this.autoLoad({srfkey:this.context.ibizsample0021});
}
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
if (Object.is('autoload', action)) {
this.autoLoad(data);
}
if (Object.is('load', action)) {
this.load(data);
}
if (Object.is('loaddraft', action)) {
this.loadDraft(data);
}
if (Object.is('save', action)) {
this.save(data,data.showResultInfo);
}
if (Object.is('remove', action)) {
this.remove(data);
}
if (Object.is('saveandexit', action)) {
this.saveAndExit(data);
}
if (Object.is('saveandnew', action)) {
this.saveAndNew(data);
}
if (Object.is('removeandexit', action)) {
this.removeAndExit(data);
}
if (Object.is('refresh', action)) {
this.refresh(data);
}
if (Object.is('panelaction', action)) {
this.panelAction(data.action,data.emitAction,data.data);
}
});
}
this.dataChangEvent = this.dataChang
.pipe(
debounceTime(300),
distinctUntilChanged()
).subscribe((data: any) => {
if (this.autosave) {
this.autoSave();
}
const state = !Object.is(JSON.stringify(this.oldData), JSON.stringify(this.data)) ? true : false;
this.$store.commit('viewaction/setViewDataChange', { viewtag: this.viewtag, viewdatachange: state });
});
}
/**
* vue 生命周期
*
* @memberof Usr1114790802Base
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof Usr1114790802Base
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
if (this.dataChangEvent) {
this.dataChangEvent.unsubscribe();
}
if(this.appStateEvent){
this.appStateEvent.unsubscribe();
}
}
/**
*打印
*@memberof @memberof Usr1114790802Base
*/
public print(){
let _this:any = this;
_this.$print({id:'ibizsample0021_usr1114790802',popTitle:'实体工作流动态编辑视图_表单'});
}
/**
* 部件刷新
*
* @param {any} args
* @memberof Usr1114790802Base
*/
public refresh(args?: any): void {
let arg: any = {};
Object.assign(arg,args?args[0]:{});
if (this.data.srfkey && !Object.is(this.data.srfkey, '')) {
Object.assign(arg, { srfkey: this.data.srfkey });
this.load(arg);
return;
}
if (this.data.srfkeys && !Object.is(this.data.srfkeys, '')) {
Object.assign(arg, { srfkey: this.data.srfkeys });
this.load(arg);
return;
}
}
/**
* 自动加载
*
* @param {*} [arg={}]
* @returns {void}
* @memberof Usr1114790802Base
*/
public autoLoad(arg: any = {}): void {
if (arg.srfkey && !Object.is(arg.srfkey, '')) {
Object.assign(arg, { srfkey: arg.srfkey });
this.load(arg);
return;
}
if (arg.srfkeys && !Object.is(arg.srfkeys, '')) {
Object.assign(arg, { srfkey: arg.srfkeys });
this.load(arg);
return;
}
this.loadDraft(arg);
}
/**
* 加载
*
* @public
* @param {*} [opt={}]
* @memberof Usr1114790802Base
*/
public async load(opt: any = {}): Promise<any> {
if(!this.loadAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZSample0021Usr1114433946WFDynaEditView' + (this.$t('app.formpage.notconfig.loadaction') as string) });
return;
}
const arg: any = { ...opt };
let viewparamResult:any = Object.assign(arg, this.viewparams);
const tempContext = Util.deepCopy(this.context);
if (!(await this.handleCtrlEvents('onbeforeload', { context: tempContext, viewparams: viewparamResult, data: arg }))) {
return;
}
const response: any = await this.service.get(this.loadAction, tempContext, { viewparams: viewparamResult }, this.showBusyIndicator);
try {
if (response && response.status === 200) {
if (!(await this.handleCtrlEvents('onloadsuccess', { data: response.data }))) {
return;
}
const data = response.data;
this.onFormLoad(data,'load');
this.$emit('load', data);
this.$nextTick(() => {
this.formState.next({ type: 'load', data: data });
});
} else {
if (!(await this.handleCtrlEvents('onloaderror', { data: response.data }))) {
return;
}
}
return response;
} catch (response: any) {
if (!(await this.handleCtrlEvents('onloaderror', { context: tempContext, viewparams: viewparamResult, data: response && response.data ? response.data : arg }))) {
return;
}
if (response && response.status && response.data) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
return;
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
}
}
/**
* 加载草稿
*
* @param {*} [opt={}]
* @memberof Usr1114790802Base
*/
public async loadDraft(opt: any = {}): Promise<any> {
if (!this.loaddraftAction) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZSample0021Usr1114433946WFDynaEditView' + (this.$t('app.formpage.notconfig.loaddraftaction') as string) });
return;
}
const arg: any = { ...opt } ;
let viewparamResult:any = Object.assign(arg, this.viewparams);
try {
if (!(await this.handleCtrlEvents('onbeforeloaddraft', { data: arg }))) {
return;
}
const response: any = this.service.loadDraft(this.loaddraftAction,JSON.parse(JSON.stringify(this.context)),{viewparams:viewparamResult}, this.showBusyIndicator);
if (!response.status || response.status !== 200) {
if (!(await this.handleCtrlEvents('onloaddrafterror', { data: response.data ? response.data : arg }))) {
return;
}
if (response.data) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
}
return;
}
if (!(await this.handleCtrlEvents('onloaddraftsuccess', { data: response.data }))) {
return;
}
const data = response.data;
this.resetDraftFormStates();
this.onFormLoad(data,'loadDraft');
data.ibizsample0021 = null;
this.$emit('load', data);
this.$nextTick(() => {
this.formState.next({ type: 'load', data: data });
});
setTimeout(() => {
const form: any = this.$refs.form;
if (form) {
form.fields.forEach((field: any) => {
field.validateMessage = "";
field.validateState = "";
field.validateStatus = false;
});
}
});
return response;
} catch (response: any) {
if (!(await this.handleCtrlEvents('onloaddrafterror', { data: response.data ? response.data : arg }))) {
return;
}
if (response && response.status && response.data) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
return response;
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
}
}
/**
* 自动保存
*
* @param {*} [opt={}]
* @memberof Usr1114790802Base
*/
public autoSave(opt: any = {}): void {
if (!this.formValidateStatus()) {
return;
}
const arg: any = { ...opt };
const data = this.getValues();
Object.assign(arg, data);
Object.assign(arg,{srfmajortext:data[this.majorMessageField]});
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
if(!action){
let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction";
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZSample0021Usr1114433946WFDynaEditView' + (this.$t('app.formpage.notconfig.actionname') as string) });
return;
}
Object.assign(arg,{viewparams:this.viewparams});
const post: Promise<any> = this.service.add(action, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator);
post.then((response: any) => {
if (!response.status || response.status !== 200) {
if (response.data) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
}
return;
}
const data = response.data;
this.onFormLoad(data,'autoSave');
this.$emit('save', data);
AppCenterService.notifyMessage({name:"IBIZSample0021",action:'appRefresh',data:data});
this.$nextTick(() => {
this.formState.next({ type: 'save', data: data });
});
}).catch((response: any) => {
if (response && response.status && response.data) {
if (response.data.errorKey) {
if(Object.is(response.data.errorKey, "versionCheck")) {
this.$Modal.confirm({
title: (this.$t('app.formpage.saveerror') as string),
content: (this.$t('app.formpage.savecontent') as string),
onOk: () => {
this.refresh([]);
},
onCancel: () => { }
});
} else if(Object.is(response.data.errorKey, 'DupCheck')) {
let errorProp: string = response.data.message.match(/\[[a-zA-Z]*\]/)[0];
let name: string = this.service.getNameByProp(errorProp.substr(1, errorProp.length-2));
if(name) {
this.$Notice.error({
title: (this.$t('app.commonWords.createFailed') as string),
desc: this.detailsModel[name].caption + " : " + arg[name] + (this.$t('app.commonWords.isExist') as string) + '!',
});
} else {
this.$Notice.error({
title: (this.$t('app.commonWords.createFailed') as string),
desc: response.data.message?response.data.message:(this.$t('app.commonWords.sysException') as string),
})
}
}else if(Object.is(response.data.errorKey, 'DuplicateKeyException')){
this.$Notice.error({
title: (this.$t('app.commonWords.createFailed') as string),
desc: this.detailsModel[this.formKeyItemName].caption + " : " + arg[this.formKeyItemName] + (this.$t('app.commonWords.isExist') as string) + '!',
});
} else {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message?response.data.message:(this.$t('app.commonWords.sysException') as string) });
}
} else {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message?response.data.message:(this.$t('app.commonWords.sysException') as string) });
}
return;
} else {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
}
});
}
/**
* 保存
*
* @param {*} [opt={}]
* @param {boolean} [showResultInfo]
* @param {boolean} [ifStateNext] formState是否下发通知
* @returns {Promise<any>}
* @memberof Usr1114790802Base
*/
public save(opt: any = {}, showResultInfo?: boolean, ifStateNext: boolean = true): Promise<any> {
return new Promise((resolve: any, reject: any) => {
showResultInfo = showResultInfo === undefined ? true : false;
if (!this.formValidateStatus()) {
if(this.errorMessages && this.errorMessages.length > 0) {
let descMessage: string = '';
this.errorMessages.forEach((message: any) => {
descMessage = descMessage + '<p>' + message.error + '<p>';
})
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: descMessage });
} else {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.formpage.valuecheckex') as string) });
}
return;
}
const arg: any = { ...opt };
const data = this.getValues();
Object.assign(arg, this.context);
Object.assign(arg, data);
Object.assign(arg,{srfmajortext:data[this.majorMessageField]});
if (ifStateNext) {
this.drcounter = 0;
if(this.drcounter !== 0){
this.drsaveopt = opt;
this.formState.next({ type: 'beforesave', data: arg });//先通知关系界面保存
this.saveState = resolve;
return;
}
}
if(this.viewparams && this.viewparams.copymode){
data.srfuf = '0';
}
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
if(!action){
let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction";
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZSample0021Usr1114433946WFDynaEditView' + (this.$t('app.formpage.notconfig.actionname') as string) });
return;
}
Object.assign(arg, { viewparams: this.viewparams });
this.handleCtrlEvents('onbeforesave', { data: arg }).then((beforeSaveResult: boolean) => {
if (!beforeSaveResult) {
return;
}
const post: Promise<any> = Object.is(data.srfuf, '1') ? this.service.update(action, JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator):this.service.add(action,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator);
post.then((response: any) => {
if (!response.status || response.status !== 200) {
this.handleCtrlEvents('onsaverror', { data: response && response.data ? response.data : arg }).then((saveErrorResult: boolean) => {
// 保存失败处理
})
if (response.data) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
}
return;
}
this.handleCtrlEvents('onsavesuccess', { data: response.data }).then((saveSuccessResult: boolean) => {
if (!saveSuccessResult) {
return;
}
this.viewparams.copymode = false;
const data = response.data;
this.onFormLoad(data,'save');
this.$emit('save', data);
AppCenterService.notifyMessage({name:"IBIZSample0021",action:'appRefresh',data:data});
this.$nextTick(() => {
this.formState.next({ type: 'save', data: data });
});
if (showResultInfo) {
this.$Notice.success({ title: '', desc: (data.srfmajortext ? data.srfmajortext : '') + '&nbsp;'+ (this.$t('app.formpage.savesuccess') as string) });
}
resolve(response);
})
}).catch((response: any) => {
this.handleCtrlEvents('onsaveerror', { data: response && response.data ? response.data : {} }).then((saveErrorResult: boolean) => {
if (!saveErrorResult) {
return;
}
if (response && response.status && response.data) {
if (response.data.errorKey) {
if(Object.is(response.data.errorKey, "versionCheck")) {
this.$Modal.confirm({
title: (this.$t('app.formpage.saveerror') as string),
content: (this.$t('app.formpage.savecontent') as string),
onOk: () => {
this.refresh([]);
},
onCancel: () => { }
});
} else if(Object.is(response.data.errorKey, 'DupCheck')) {
let errorProp: string = response.data.message.match(/\[[a-zA-Z]*\]/)[0];
let name: string = this.service.getNameByProp(errorProp.substr(1, errorProp.length-2));
if(name) {
this.$Notice.error({
title: (this.$t('app.commonWords.createFailed') as string),
desc: this.detailsModel[name].caption + " : " + arg[name] + (this.$t('app.commonWords.isExist') as string) + '!',
});
} else {
this.$Notice.error({
title: (this.$t('app.commonWords.createFailed') as string),
desc: response.data.message,
})
}
} else {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
}
} else {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
reject(response);
}
return;
} else {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
reject(response);
}
reject(response);
})
});
})
})
}
/**
* 删除
*
* @public
* @param {*} [opt={}]
* @memberof Usr1114790802Base
*/
public remove(opt:Array<any> = [],showResultInfo?: boolean): Promise<any> {
return new Promise((resolve: any, reject: any) => {
if(!this.removeAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZSample0021Usr1114433946WFDynaEditView' + (this.$t('app.formpage.notconfig.removeaction') as string) });
return;
}
const arg: any = opt[0];
const _this: any = this;
Object.assign(arg, { viewparams: this.viewparams });
this.handleCtrlEvents('onbeforeremove', { data: arg }).then((beforeRemoveResult: boolean) => {
if (!beforeRemoveResult) {
return;
}
this.service.delete(_this.removeAction, JSON.parse(JSON.stringify(this.context)), arg, showResultInfo).then((response: any) => {
if (response && response.status === 200) {
this.handleCtrlEvents('onremovesuccess', { data: response.data }).then((removeSuccessResult: boolean) => {
const data = response.data;
this.$emit('remove',data);
this.formState.next({ type: 'remove', data: data });
this.data.ismodify = false;
this.$Notice.success({ title: '', desc: (data.srfmajortext ? data.srfmajortext : '') + '&nbsp;' + (this.$t('app.formpage.deletesuccess') as string) });
AppCenterService.notifyMessage({name:"IBIZSample0021",action:'appRefresh',data:data});
resolve(response);
})
} else {
this.handleCtrlEvents('onremoveerror', { data: response && response.data ? response.data : arg });
}
}).catch((error: any) => {
this.handleCtrlEvents('onremoveerror', { data: error && error.data ? error.data : arg }).then((removeErrorResult) => {
if (!removeErrorResult) {
const { data: _data } = error;
this.$Notice.error({ title: _data.title, desc: _data.message });
reject(error);
}
})
});
})
});
}
/**
* 工作流启动
*
* @param {*} [data={}]
* @param {*} [localdata={}]
* @returns {Promise<any>}
* @memberof Usr1114790802Base
*/
public async wfstart(data: any,localdata?:any): Promise<any> {
return new Promise((resolve: any, reject: any) => {
const _this: any = this;
const formData:any = this.getData();
const copyData:any = Util.deepCopy(formData);
const post: Promise<any> = Object.is(formData.srfuf, '1')?this.service.update(this.updateAction, JSON.parse(JSON.stringify(this.context)),formData, this.showBusyIndicator,true):this.service.add(this.createAction,JSON.parse(JSON.stringify(this.context)),formData, this.showBusyIndicator,true);
post.then((response:any) =>{
const responseData:any = response.data;
let tempResponseData:any = Util.deepCopy(response);
this.service.handleResponse('save', tempResponseData);
const arg:any = tempResponseData.data;
// 保存完成UI处理
this.onFormLoad(arg,'save');
this.$emit('save', arg);
AppCenterService.notifyMessage({name:"IBIZSample0021",action:'appRefresh',data:data});
this.$nextTick(() => {
this.formState.next({ type: 'save', data: arg });
});
// 准备工作流数据,填充未存库数据
Object.assign(arg,copyData);
// 准备提交参数
if(this.viewparams){
let copyViewParams:any = Util.deepCopy(this.viewparams);
if(copyViewParams.w){
delete copyViewParams.w;
}
Object.assign(responseData,copyViewParams);
}
Object.assign(arg,{viewparams:responseData});
// 强制补充srfwfmemo
if(this.srfwfmemo){
Object.assign(arg,{srfwfmemo:this.srfwfmemo});
}
const result: Promise<any> = this.service.wfstart(_this.WFStartAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator,localdata);
result.then((response: any) => {
if (!response || response.status !== 200) {
if(response.data){
this.$Notice.error({ title: '', desc: (this.$t('app.formpage.workflow.starterror') as string) + ', ' + response.data.message });
}
return;
}
this.$Notice.info({ title: '', desc: (this.$t('app.formpage.workflow.startsuccess') as string) });
resolve(response);
}).catch((response: any) => {
if (response && response.status && response.data) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
reject(response);
return;
}
if (!response || !response.status || !response.data) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
reject(response);
return;
}
reject(response);
});
}).catch((response: any) => {
if (response && response.status && response.data) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
reject(response);
return;
}
if (!response || !response.status || !response.data) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
reject(response);
return;
}
reject(response);
})
});
}
/**
* 工作流提交
*
* @param {*} [data={}]
* @param {*} [localdata={}]
* @returns {Promise<any>}
* @memberof Usr1114790802Base
*/
public async wfsubmit(data: any,localdata?:any): Promise<any> {
return new Promise((resolve: any, reject: any) => {
const _this: any = this;
const arg: any = data[0];
const copyData:any = Util.deepCopy(arg);
Object.assign(arg,{viewparams:this.viewparams});
if (!arg.ibizsample0021 || Object.is(arg.ibizsample0021, '')) {
return;
}
const post: Promise<any> = Object.is(arg.srfuf, '1')?this.service.update(this.updateAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator,true):this.service.add(this.createAction,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator,true);
post.then((response:any) =>{
const responseData:any = response.data;
let tempResponseData:any = Util.deepCopy(response);
this.service.handleResponse('save', tempResponseData);
const arg:any = tempResponseData.data;
// 保存完成UI处理
this.onFormLoad(arg,'save');
this.$emit('save', arg);
AppCenterService.notifyMessage({name:"IBIZSample0021",action:'appRefresh',data:data});
this.$nextTick(() => {
this.formState.next({ type: 'save', data: arg });
});
// 准备工作流数据,填充未存库数据
Object.assign(arg,copyData);
// 准备提交参数
if(this.viewparams){
Object.assign(responseData,this.viewparams);
}
Object.assign(arg,{viewparams:responseData});
// 强制补充srfwfmemo
if(this.srfwfmemo){
Object.assign(arg,{srfwfmemo:this.srfwfmemo});
}
const result: Promise<any> = this.service.wfsubmit(_this.WFSubmitAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator,localdata);
result.then((response: any) => {
if (!response || response.status !== 200) {
if(response.data){
this.$Notice.error({ title: '', desc: (this.$t('app.formpage.workflow.submiterror') as string) + ', ' + response.data.message });
}
return;
}
this.onFormLoad(arg,'submit');
this.$store.dispatch('viewaction/datasaved', { viewtag: this.viewtag });
this.$Notice.info({ title: '', desc: (this.$t('app.formpage.workflow.submitsuccess') as string) });
resolve(response);
}).catch((response: any) => {
if (response && response.status && response.data) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
reject(response);
return;
}
if (!response || !response.status || !response.data) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
reject(response);
return;
}
reject(response);
});
}).catch((response: any) => {
if (response && response.status && response.data) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
reject(response);
return;
}
if (!response || !response.status || !response.data) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
reject(response);
return;
}
reject(response);
})
})
}
/**
* 面板行为
*
* @param {string} [action] 调用的实体行为
* @param {string} [emitAction] 抛出行为
* @param {*} [data={}] 传入数据
* @param {boolean} [showloading] 是否显示加载状态
*
* @memberof Usr1114790802Base
*/
public panelAction(action:string,emitAction:string,data:any ={},showloading?:boolean):void{
if (!action || (action && Object.is(action, ''))) {
return;
}
const arg: any = { ...data };
const formdata = this.getValues();
Object.assign(arg, formdata);
Object.assign(arg,this.viewparams);
const post: Promise<any> = this.service.frontLogic(action,JSON.parse(JSON.stringify(this.context)),arg, showloading);
post.then((response: any) => {
if (!response.status || response.status !== 200) {
if (response.data) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
}
return;
}
const data = response.data;
this.onFormLoad(data,emitAction);
this.$emit(emitAction, data);
this.$nextTick(() => {
this.formState.next({ type: emitAction, data: data });
});
}).catch((response: any) => {
if (response && response.status && response.data) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
return;
}
if (!response || !response.status || !response.data) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
return;
}
});
}
/**
* 表单项更新
*
* @param {string} mode 界面行为名称
* @param {*} [data={}] 请求数据
* @param {string[]} updateDetails 更新项
* @param {boolean} [showloading] 是否显示加载状态
* @returns {void}
* @memberof Usr1114790802Base
*/
public updateFormItems(mode: string, data: any = {}, updateDetails: string[], showloading?: boolean): void {
if (!mode || (mode && Object.is(mode, ''))) {
return;
}
const arg: any = { ...data };
Object.assign(arg,this.viewparams);
const post: Promise<any> = this.service.frontLogic(mode,JSON.parse(JSON.stringify(this.context)),arg, showloading);
post.then((response: any) => {
if (!response || response.status !== 200) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.formpage.updateerror') as string) });
return;
}
const data = response.data;
const _data: any = {};
updateDetails.forEach((name: string) => {
if (!data.hasOwnProperty(name)) {
return;
}
Object.assign(_data, { [name]: data[name] });
});
this.setFormEnableCond(_data);
this.fillForm(_data,'updateFormItem');
this.formLogic({ name: '', newVal: null, oldVal: null });
this.dataChang.next(JSON.stringify(this.data));
AppCenterService.notifyMessage({name:"IBIZSample0021",action:'appRefresh',data:data});
this.$nextTick(() => {
this.formState.next({ type: 'updateformitem', ufimode: arg.srfufimode, data: _data });
});
}).catch((response: any) => {
if (response && response.status && response.data) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
return;
}
if (!response || !response.status || !response.data) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
return;
}
});
}
/**
* 回车事件
*
* @param {*} $event
* @memberof Usr1114790802Base
*/
public onEnter($event: any): void {
}
/**
* 保存并退出
*
* @param {any[]} args
* @memberof Usr1114790802Base
*/
public saveAndExit(data:any[]):Promise<any>{
let _this = this;
return new Promise((resolve: any, reject: any) =>{
let arg: any = {};
if(data && data.length > 0){
Object.assign(arg,data[0]);
}
_this.currentAction = "saveAndExit";
_this.save([arg]).then((res) =>{
if(res){
_this.closeView(res.data);
}
resolve(res);
}).catch((error) =>{
reject(error);
})
})
}
/**
* 保存并新建
*
* @param {any[]} args
* @memberof Usr1114790802Base
*/
public saveAndNew(data:any[]):Promise<any>{
let _this = this;
return new Promise((resolve: any, reject: any) =>{
let arg: any = {};
if(data && data.length > 0){
Object.assign(arg,data[0]);
}
_this.currentAction = "saveAndNew";
_this.save([arg]).then((res) =>{
_this.ResetData(res);
_this.loadDraft({});
}).catch((error) =>{
reject(error);
})
})
}
/**
* 删除并退出
*
* @param {any[]} args
* @memberof Usr1114790802Base
*/
public removeAndExit(data:any[]):Promise<any>{
let _this = this;
return new Promise((resolve: any, reject: any) =>{
let arg: any = {};
if(data && data.length > 0){
Object.assign(arg,data[0]);
}
_this.remove([arg]).then((res) =>{
if(res){
_this.closeView(res.data);
}
resolve(res);
}).catch((error) =>{
reject(error);
})
})
}
/**
* 关系界面数据保存完成
*
* @param {any} $event
* @memberof Usr1114790802Base
*/
public drdatasaved($event:any){
let _this = this;
this.drcounter--;
if(this.drcounter === 0){
this.save(this.drsaveopt, undefined, false).then((res) =>{
this.saveState(res);
this.drsaveopt = {};
if(Object.is(_this.currentAction, "saveAndNew")){
_this.ResetData(res);
_this.loadDraft({});
}else if(Object.is(_this.currentAction, "saveAndExit")){
if(res){
_this.closeView(res.data);
}
}
});
}
}
/**
* 新建默认值
* @memberof Usr1114790802Base
*/
public createDefault(){
}
/**
* 更新默认值
* @memberof Usr1114790802Base
*/
public updateDefault(){
}
/**
* 面板数据变化处理事件
* @param {any} item 当前列数据
* @param {any} $event 面板事件数据
*
* @memberof Usr1114790802Base
*/
public onPanelDataChange(item:any,$event:any) {
Object.assign(item, $event, {rowDataState:'update'});
}
}
</script>
<style lang='less'>
@import './usr1114790802-form.less';
</style>
\ No newline at end of file
// 基于 @CONTROL/表单/MODEL.ts.ftl 生成
/**
* Usr1114790802 部件模型
*
* @export
* @class Usr1114790802Model
*/
export default class Usr1114790802Model {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof Usr1114790802Model
*/
public getDataItems(): any[] {
return [
{
name: 'srfwfmemo',
prop: 'srfwfmemo',
dataType: 'TEXT',
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name: 'srffrontuf',
prop: 'srffrontuf',
dataType: 'TEXT',
},
{
name: 'srfupdatedate',
prop: 'updatedate',
dataType: 'DATETIME',
},
{
name: 'srforikey',
},
{
name: 'srfkey',
prop: 'ibizsample0021id',
dataType: 'GUID',
},
{
name: 'srfmajortext',
prop: 'ibizsample0021name',
dataType: 'TEXT',
},
{
name: 'srftempmode',
},
{
name: 'srfuf',
},
{
name: 'srfdeid',
},
{
name: 'srfsourcekey',
},
{
name: 'ibizsample0021name',
prop: 'ibizsample0021name',
dataType: 'TEXT',
},
{
name: 'createman',
prop: 'createman',
dataType: 'TEXT',
},
{
name: 'createdate',
prop: 'createdate',
dataType: 'DATETIME',
},
{
name: 'updateman',
prop: 'updateman',
dataType: 'TEXT',
},
{
name: 'updatedate',
prop: 'updatedate',
dataType: 'DATETIME',
},
{
name: 'ibizsample0021id',
prop: 'ibizsample0021id',
dataType: 'GUID',
},
{
name: 'ibizsample0021',
prop: 'ibizsample0021id',
dataType: 'FONTKEY',
},
]
}
}
\ No newline at end of file
// 基于 @CONTROL/表单/SERVICE.ts.ftl 生成
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import IBIZSample0021Service from '@/service/ibizsample0021/ibizsample0021-service';
import Usr1114790802Model from './usr1114790802-form-model';
/**
* Usr1114790802 部件服务对象
*
* @export
* @class Usr1114790802Service
*/
export default class Usr1114790802Service extends ControlService {
/**
* 订单服务对象
*
* @type {IBIZSample0021Service}
* @memberof Usr1114790802Service
*/
public appEntityService: IBIZSample0021Service = new IBIZSample0021Service();
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof Usr1114790802Service
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of Usr1114790802Service.
*
* @param {*} [opts={}]
* @memberof Usr1114790802Service
*/
constructor(opts: any = {}) {
super(opts);
this.model = new Usr1114790802Model();
}
/**
* 远端数据
*
* @type {*}
* @memberof Usr1114790802Service
*/
private remoteCopyData:any = {};
/**
* 处理数据
*
* @private
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof Usr1114790802Service
*/
private doItems(promise: Promise<any>, deKeyField: string, deName: string): Promise<any> {
return new Promise((resolve, reject) => {
promise.then((response: any) => {
if (response && response.status === 200) {
const data = response.data;
data.forEach((item:any,index:number) =>{
item[deName] = item[deKeyField];
data[index] = item;
});
resolve(data);
} else {
reject([])
}
}).catch((response: any) => {
reject([])
});
});
}
/**
* 获取跨实体数据集合
*
* @param {string} serviceName 服务名称
* @param {string} interfaceName 接口名称
* @param {*} data
* @param {boolean} [isloading]
* @returns {Promise<any[]>}
* @memberof Usr1114790802Service
*/
@Errorlog
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
data.page = data.page ? data.page : 0;
data.size = data.size ? data.size : 1000;
return Promise.reject([])
}
/**
* 启动工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof Usr1114790802Service
*/
@Errorlog
public wfstart(action: string,context: any = {},data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data,true);
context = this.handleRequestData(action,context,data).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.WFStart(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 提交工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof Usr1114790802Service
*/
@Errorlog
public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data,true);
context = this.handleRequestData(action,context,data,true).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.WFSubmit(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {boolean} [isWorkflow] 是否在工作流中添加数据
* @returns {Promise<any>}
* @memberof Usr1114790802Service
*/
@Errorlog
public add(action: string, context: any = {},data: any = {}, isloading?: boolean,isWorkflow?:boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Create(Context,Data, isloading);
}
result.then((response) => {
if(isWorkflow){
resolve(response);
}else{
this.handleResponse(action, response);
resolve(response);
}
}).catch(response => {
reject(response);
});
});
}
/**
* 删除数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof Usr1114790802Service
*/
@Errorlog
public delete(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Remove(Context,Data, isloading);
}
result.then((response) => {
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 修改数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {boolean} [isWorkflow] 是否在工作流中修改数据
* @returns {Promise<any>}
* @memberof Usr1114790802Service
*/
@Errorlog
public update(action: string, context: any = {},data: any = {}, isloading?: boolean,isWorkflow?:boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Update(Context,Data, isloading);
}
result.then((response) => {
if(isWorkflow){
resolve(response);
}else{
this.handleResponse(action, response);
resolve(response);
}
}).catch(response => {
reject(response);
});
});
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof Usr1114790802Service
*/
@Errorlog
public get(action: string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Get(Context,Data, isloading);
}
result.then((response) => {
this.setRemoteCopyData(response);
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 加载草稿
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof Usr1114790802Service
*/
@Errorlog
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据
const PrimaryKey = Util.createUUID();
Data.ibizsample0021id = PrimaryKey;
Data.ibizsample0021 = PrimaryKey;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.GetDraft(Context,Data, isloading);
}
result.then((response) => {
this.setRemoteCopyData(response);
response.data.ibizsample0021id = PrimaryKey;
this.handleResponse(action, response, true);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 前台逻辑
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof Usr1114790802Service
*/
@Errorlog
public frontLogic(action:string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any)=>{
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
return Promise.reject({ status: 500, data: { title: '失败', message: '系统异常' } });
}
result.then((response) => {
this.handleResponse(action, response,true);
resolve(response);
}).catch(response => {
reject(response);
});
})
}
/**
* 处理请求数据
*
* @param action 行为
* @param data 数据
* @memberof Usr1114790802Service
*/
public handleRequestData(action: string,context:any, data: any = {},isMerge:boolean = false){
let mode: any = this.getMode();
if (!mode && mode.getDataItems instanceof Function) {
return data;
}
let formItemItems: any[] = mode.getDataItems();
let requestData:any = {};
if(isMerge && (data && data.viewparams)){
Object.assign(requestData,data.viewparams);
}
formItemItems.forEach((item:any) =>{
if(item && item.dataType && Object.is(item.dataType,'FONTKEY')){
if(item && item.prop){
requestData[item.prop] = context[item.name];
}
}else{
if(item && item.prop){
requestData[item.prop] = data[item.name];
}else{
if(item.dataType && Object.is(item.dataType,"FORMPART")){
Object.assign(requestData,data[item.name]);
}
}
}
});
let tempContext:any = JSON.parse(JSON.stringify(context));
if(tempContext && tempContext.srfsessionid){
tempContext.srfsessionkey = tempContext.srfsessionid;
delete tempContext.srfsessionid;
}
return {context:tempContext,data:requestData};
}
/**
* 通过属性名称获取表单项名称
*
* @param name 实体属性名称
* @memberof Usr1114790802Service
*/
public getItemNameByDeName(name:string) :string{
let itemName = name;
let mode: any = this.getMode();
if (!mode && mode.getDataItems instanceof Function) {
return name;
}
let formItemItems: any[] = mode.getDataItems();
formItemItems.forEach((item:any)=>{
if(item.prop === name){
itemName = item.name;
}
});
return itemName.trim();
}
/**
* 重写处理返回数据
*
* @param {string} action
* @param {*} response
* @memberof Usr1114790802Service
*/
public handleResponseData(action: string, data: any = {},isCreate?:boolean,codelistArray?:any){
let model: any = this.getMode();
if (!model && model.getDataItems instanceof Function) {
return data;
}
let item: any = {};
let dataItems: any[] = model.getDataItems();
dataItems.forEach(dataitem => {
let val = data.hasOwnProperty(dataitem.prop) ? data[dataitem.prop] : null;
if (val === null) {
val = data.hasOwnProperty(dataitem.name) ? data[dataitem.name] : null;
}
if((isCreate === undefined || isCreate === null ) && Object.is(dataitem.dataType, 'GUID') && Object.is(dataitem.name, 'srfkey') && (val && !Object.is(val, ''))){
isCreate = true;
}
item[dataitem.name] = val;
// 转化代码表
if(codelistArray && dataitem.codelist){
if(codelistArray.get(dataitem.codelist.tag) && codelistArray.get(dataitem.codelist.tag).get(val)){
item[dataitem.name] = codelistArray.get(dataitem.codelist.tag).get(val);
}
}
});
item.srfuf = data.srfuf ? data.srfuf : (isCreate ? "0" : "1");
item = Object.assign(data,item);
return item;
}
/**
* 设置远端数据
*
* @param result 远端请求结果
* @memberof Usr1114790802Service
*/
public setRemoteCopyData(result:any){
if (result && result.status === 200) {
this.remoteCopyData = Util.deepCopy(result.data);
}
}
/**
* 获取远端数据
*
* @memberof Usr1114790802Service
*/
public getRemoteCopyData(){
return this.remoteCopyData;
}
}
\ No newline at end of file
// 基于 @CONTROL/表单/CONTROL.less.ftl 生成
.ivu-tabs-no-animation>.ivu-tabs-content{
padding: 0 16px;
}
.ivu-card-head{
padding: 14px 0;
}
.app-form {
overflow: auto;
padding: 6px;
> .ivu-row {
> .ivu-tabs {
height: 100%;
display: flex;
flex-direction: column;
> .ivu-tabs-content {
flex-grow: 1;
overflow: auto;
> .ivu-tabs-tabpane {
height: 100%;
}
}
}
}
}
.app-tabpanel-flex {
height: 100%;
> .ivu-tabs-content {
height: calc(100% - 52px);
> .ivu-tabs-tabpane {
height: 100%;
}
}
}
.app-form {
>.ivu-row:nth-child(2) {
>.ivu-col:nth-child(1) {
>.ivu-row.app-form-group.app-group-hiddden-caption:nth-child(1) {
margin-top: 12px;
}
}
}
}
.app-form{
// 表单行间距
.app-form-item{
margin-bottom: 20px;
}
// 表单按钮margin
.app-form-button{
margin:0 6px;
}
}
// this is less
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import Usr1114790802Base from './usr1114790802-form-base.vue';
// 基于 @CONTROL/@MACRO/CONTROL/CONTROL.vue.ftl 生成
@Component({
components: {
}
})
export default class Usr1114790802 extends Usr1114790802Base {
}
</script>
\ No newline at end of file
......@@ -1525,6 +1525,12 @@
"name" : "订单实体表格视图(布局面板)",
"realModelSubType" : "DEGRIDVIEW",
"realModelType" : "PSDEVIEWBASE"
}, {
"codeName" : "Usr1114433946WFDynaEditView",
"logicName" : "实体工作流动态编辑视图",
"name" : "实体工作流动态编辑视图",
"realModelSubType" : "DEWFDYNAEDITVIEW",
"realModelType" : "PSDEVIEWBASE"
}, {
"codeName" : "approvedForm",
"logicName" : "部门领导审批通过操作表单",
......@@ -1561,6 +1567,13 @@
"name" : "主编辑表单",
"realModelSubType" : "EDITFORM",
"realModelType" : "PSDEFORM"
}, {
"codeName" : "Usr1114790802",
"logicName" : "实体工作流动态编辑视图_表单",
"modelTag2" : "0",
"name" : "实体工作流动态编辑视图_表单",
"realModelSubType" : "EDITFORM",
"realModelType" : "PSDEFORM"
}, {
"codeName" : "refuseForm",
"logicName" : "部门领导审批不通过操作表单",
......
{
"codeName" : "Usr1114790802",
"controlType" : "FORM",
"getCreatePSControlAction" : {
"modelref" : true,
"id" : "create"
},
"dynaModelFilePath" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZSample0021/PSFORMS/Usr1114790802.json",
"getGetDraftFromPSControlAction" : {
"modelref" : true,
"id" : "loaddraftfrom"
},
"getGetDraftPSControlAction" : {
"modelref" : true,
"id" : "loaddraft"
},
"getGetPSControlAction" : {
"modelref" : true,
"id" : "load"
},
"hookEventNames" : [ "LOAD", "SAVE", "REMOVE" ],
"logicName" : "实体工作流动态编辑视图_表单",
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZSample0021.json"
},
"getPSControlLogics" : [ {
"eventNames" : "LOAD;SAVE;REMOVE",
"logicTag" : "form",
"logicType" : "APPVIEWENGINE",
"name" : "engine_form",
"getPSAppViewEngine" : {
"modelref" : true,
"id" : "engine"
}
} ],
"getPSDEFormItems" : [ {
"id" : "srfupdatedate",
"hidden" : true,
"dataType" : 5,
"getPSAppDEField" : {
"name" : "UPDATEDATE",
"codeName" : "UpdateDate"
}
}, {
"id" : "srforikey",
"hidden" : true,
"dataType" : 25
}, {
"id" : "srfkey",
"hidden" : true,
"dataType" : 25,
"getPSAppDEField" : {
"name" : "IBIZSAMPLE0021ID",
"codeName" : "IBIZSample0021Id"
}
}, {
"id" : "srfmajortext",
"hidden" : true,
"dataType" : 25,
"getPSAppDEField" : {
"name" : "IBIZSAMPLE0021NAME",
"codeName" : "IBIZSample0021Name"
}
}, {
"id" : "srftempmode",
"hidden" : true,
"dataType" : 25
}, {
"id" : "srfuf",
"hidden" : true,
"dataType" : 25
}, {
"id" : "srfdeid",
"hidden" : true,
"dataType" : 25
}, {
"id" : "srfsourcekey",
"hidden" : true,
"dataType" : 25
}, {
"id" : "ibizsample0021name",
"dataType" : 25,
"getPSAppDEField" : {
"name" : "IBIZSAMPLE0021NAME",
"codeName" : "IBIZSample0021Name"
}
}, {
"id" : "createman",
"dataType" : 25,
"getPSAppDEField" : {
"name" : "CREATEMAN",
"codeName" : "CreateMan"
}
}, {
"id" : "createdate",
"dataType" : 5,
"getPSAppDEField" : {
"name" : "CREATEDATE",
"codeName" : "CreateDate"
}
}, {
"id" : "updateman",
"dataType" : 25,
"getPSAppDEField" : {
"name" : "UPDATEMAN",
"codeName" : "UpdateMan"
}
}, {
"id" : "updatedate",
"dataType" : 5,
"getPSAppDEField" : {
"name" : "UPDATEDATE",
"codeName" : "UpdateDate"
}
}, {
"id" : "ibizsample0021id",
"hidden" : true,
"dataType" : 25,
"getPSAppDEField" : {
"name" : "IBIZSAMPLE0021ID",
"codeName" : "IBIZSample0021Id"
}
} ],
"getPSDEFormPages" : [ {
"caption" : "基本信息",
"codeName" : "formpage1",
"detailStyle" : "DEFAULT",
"detailType" : "FORMPAGE",
"name" : "formpage1",
"getPSDEFormDetails" : [ {
"actionGroupExtractMode" : "ITEM",
"caption" : "订单基本信息",
"codeName" : "group1",
"detailStyle" : "DEFAULT",
"detailType" : "GROUPPANEL",
"name" : "group1",
"getPSDEFormDetails" : [ {
"getCapPSLanguageRes" : {
"lanResTag" : "DEF.LNAME.IBIZSAMPLE0021NAME"
},
"caption" : "订单名称",
"codeName" : "ibizsample0021name",
"dataType" : 25,
"detailStyle" : "DEFAULT",
"detailType" : "FORMITEM",
"enableCond" : 3,
"ignoreInput" : 0,
"labelPos" : "LEFT",
"labelWidth" : 130,
"name" : "ibizsample0021name",
"noPrivDisplayMode" : 1,
"getPSAppDEField" : {
"name" : "IBIZSAMPLE0021NAME",
"codeName" : "IBIZSample0021Name"
},
"getPSEditor" : {
"editorType" : "TEXTBOX",
"maxLength" : 200,
"name" : "ibizsample0021name"
},
"getPSLayoutPos" : {
"colMD" : 24,
"layout" : "TABLE_24COL"
},
"allowEmpty" : true,
"showCaption" : true
} ],
"getPSLayout" : {
"columnCount" : 24,
"layout" : "TABLE_24COL"
},
"getPSLayoutPos" : {
"colMD" : 24,
"layout" : "TABLE_24COL"
},
"infoGroupMode" : false,
"showCaption" : true
} ],
"getPSLayout" : {
"columnCount" : 24,
"layout" : "TABLE_24COL"
},
"infoGroupMode" : false
}, {
"caption" : "其它",
"codeName" : "formpage2",
"detailStyle" : "DEFAULT",
"detailType" : "FORMPAGE",
"name" : "formpage2",
"getPSDEFormDetails" : [ {
"actionGroupExtractMode" : "ITEM",
"caption" : "操作信息",
"codeName" : "group2",
"detailStyle" : "DEFAULT",
"detailType" : "GROUPPANEL",
"name" : "group2",
"getPSDEFormDetails" : [ {
"getCapPSLanguageRes" : {
"lanResTag" : "DEF.LNAME.CREATEMAN"
},
"caption" : "建立人",
"codeName" : "createman",
"dataType" : 25,
"detailStyle" : "DEFAULT",
"detailType" : "FORMITEM",
"enableCond" : 3,
"ignoreInput" : 3,
"labelPos" : "LEFT",
"labelWidth" : 130,
"name" : "createman",
"noPrivDisplayMode" : 1,
"getPSAppDEField" : {
"name" : "CREATEMAN",
"codeName" : "CreateMan"
},
"getPSEditor" : {
"editorType" : "SPAN",
"name" : "createman",
"getPSAppCodeList" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPCODELISTS/SysOperator.json"
},
"enableLinkView" : false
},
"getPSLayoutPos" : {
"colMD" : 24,
"layout" : "TABLE_24COL"
},
"allowEmpty" : true,
"convertToCodeItemText" : true,
"showCaption" : true
}, {
"getCapPSLanguageRes" : {
"lanResTag" : "DEF.LNAME.CREATEDATE"
},
"caption" : "建立时间",
"codeName" : "createdate",
"dataType" : 5,
"detailStyle" : "DEFAULT",
"detailType" : "FORMITEM",
"enableCond" : 3,
"ignoreInput" : 3,
"labelPos" : "LEFT",
"labelWidth" : 130,
"name" : "createdate",
"noPrivDisplayMode" : 1,
"getPSAppDEField" : {
"name" : "CREATEDATE",
"codeName" : "CreateDate"
},
"getPSEditor" : {
"editorType" : "SPAN",
"name" : "createdate",
"enableLinkView" : false
},
"getPSLayoutPos" : {
"colMD" : 24,
"layout" : "TABLE_24COL"
},
"valueFormat" : "YYYY-MM-DD HH:mm:ss",
"allowEmpty" : true,
"showCaption" : true
}, {
"getCapPSLanguageRes" : {
"lanResTag" : "DEF.LNAME.UPDATEMAN"
},
"caption" : "更新人",
"codeName" : "updateman",
"dataType" : 25,
"detailStyle" : "DEFAULT",
"detailType" : "FORMITEM",
"enableCond" : 3,
"ignoreInput" : 3,
"labelPos" : "LEFT",
"labelWidth" : 130,
"name" : "updateman",
"noPrivDisplayMode" : 1,
"getPSAppDEField" : {
"name" : "UPDATEMAN",
"codeName" : "UpdateMan"
},
"getPSEditor" : {
"editorType" : "SPAN",
"name" : "updateman",
"getPSAppCodeList" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPCODELISTS/SysOperator.json"
},
"enableLinkView" : false
},
"getPSLayoutPos" : {
"colMD" : 24,
"layout" : "TABLE_24COL"
},
"allowEmpty" : true,
"convertToCodeItemText" : true,
"showCaption" : true
}, {
"getCapPSLanguageRes" : {
"lanResTag" : "DEF.LNAME.UPDATEDATE"
},
"caption" : "更新时间",
"codeName" : "updatedate",
"dataType" : 5,
"detailStyle" : "DEFAULT",
"detailType" : "FORMITEM",
"enableCond" : 3,
"ignoreInput" : 3,
"labelPos" : "LEFT",
"labelWidth" : 130,
"name" : "updatedate",
"noPrivDisplayMode" : 1,
"getPSAppDEField" : {
"name" : "UPDATEDATE",
"codeName" : "UpdateDate"
},
"getPSEditor" : {
"editorType" : "SPAN",
"name" : "updatedate",
"enableLinkView" : false
},
"getPSLayoutPos" : {
"colMD" : 24,
"layout" : "TABLE_24COL"
},
"valueFormat" : "YYYY-MM-DD HH:mm:ss",
"allowEmpty" : true,
"showCaption" : true
} ],
"getPSLayout" : {
"columnCount" : 24,
"layout" : "TABLE_24COL"
},
"getPSLayoutPos" : {
"colMD" : 24,
"layout" : "TABLE_24COL"
},
"infoGroupMode" : false,
"showCaption" : true
} ],
"getPSLayout" : {
"columnCount" : 24,
"layout" : "TABLE_24COL"
},
"infoGroupMode" : false
} ],
"getPSLayout" : {
"columnCount" : 24,
"layout" : "TABLE_24COL"
},
"getRemovePSControlAction" : {
"modelref" : true,
"id" : "remove"
},
"tabHeaderPos" : "TOP",
"getUpdatePSControlAction" : {
"modelref" : true,
"id" : "update"
},
"getWFStartPSControlAction" : {
"modelref" : true,
"id" : "WFSTART"
},
"getWFSubmitPSControlAction" : {
"modelref" : true,
"id" : "WFSUBMIT"
},
"noTabHeader" : false,
"modelid" : "C4677046-82CC-4099-AAC9-0CFAEB876ECC",
"modeltype" : "PSDEFORM_EDITFORM"
}
\ No newline at end of file
{
"accUserMode" : 2,
"getCapPSLanguageRes" : {
"lanResTag" : "DE.LNAME.IBIZSAMPLE0021"
},
"caption" : "订单",
"codeName" : "IBIZSample0021Usr1114433946WFDynaEditView",
"dynaModelFilePath" : "PSSYSAPPS/Web/PSAPPDEVIEWS/IBIZSample0021Usr1114433946WFDynaEditView.json",
"name" : "IBIZSample0021Usr1114433946WFDynaEditView",
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZSample0021.json"
},
"getPSAppViewEngines" : [ {
"engineCat" : "VIEW",
"engineType" : "WFDynaEditView",
"name" : "engine",
"getPSUIEngineParams" : [ {
"ctrlName" : "form",
"name" : "FORM",
"paramType" : "CTRL"
}, {
"name" : "P2K",
"paramType" : "VALUE",
"value" : 0
} ]
} ],
"getPSAppViewRefs" : [ {
"name" : "WFACTION@WFDynaActionView",
"realOpenMode" : "POPUPMODAL",
"realTitle" : "订单工作流动态操作视图",
"getRefPSAppView" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDEVIEWS/IBIZSample0021WFDynaActionView.json",
"viewType" : "DEWFDYNAACTIONVIEW"
}
} ],
"getPSControls" : [ {
"codeName" : "Usr1114433946WFDynaEditViewtoolbar",
"controlType" : "TOOLBAR",
"logicName" : "实体工作流动态编辑视图_工具栏",
"name" : "toolbar",
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZSample0021.json"
},
"getPSControlParam" : {
"id" : "TOOLBAR"
},
"modelid" : "E8D94037-1147-4C2E-9083-E9D93A773B3B",
"modeltype" : "PSDETOOLBAR"
}, {
"codeName" : "OperationForm",
"controlType" : "FORM",
"getCreatePSControlAction" : {
"modelref" : true,
"id" : "create"
},
"dynaModelFilePath" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZSample0021/PSFORMS/OperationForm.json",
"getGetDraftFromPSControlAction" : {
"modelref" : true,
"id" : "loaddraftfrom"
},
"getGetDraftPSControlAction" : {
"modelref" : true,
"id" : "loaddraft"
},
"getGetPSControlAction" : {
"modelref" : true,
"id" : "load"
},
"logicName" : "操作表单",
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZSample0021.json"
},
"getPSControlHandler" : {
"getPSHandlerActions" : [ {
"actionName" : "GetDraft",
"actionType" : "DEACTION",
"dataAccessAction" : "CREATE",
"name" : "loaddraft",
"getPSAppDEMethod" : {
"modelref" : true,
"id" : "GetDraft"
},
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZSample0021.json"
}
}, {
"actionName" : "GETDRAFTFROM",
"actionType" : "DEACTION",
"dataAccessAction" : "CREATE",
"name" : "loaddraftfrom",
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZSample0021.json"
}
}, {
"actionName" : "Get",
"actionType" : "DEACTION",
"dataAccessAction" : "READ",
"name" : "load",
"getPSAppDEMethod" : {
"modelref" : true,
"id" : "Get"
},
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZSample0021.json"
}
}, {
"actionName" : "Create",
"actionType" : "DEACTION",
"dataAccessAction" : "CREATE",
"name" : "create",
"getPSAppDEMethod" : {
"modelref" : true,
"id" : "Create"
},
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZSample0021.json"
}
}, {
"actionName" : "Update",
"actionType" : "DEACTION",
"dataAccessAction" : "UPDATE",
"name" : "update",
"getPSAppDEMethod" : {
"modelref" : true,
"id" : "Update"
},
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZSample0021.json"
}
}, {
"actionName" : "Remove",
"actionType" : "DEACTION",
"dataAccessAction" : "DELETE",
"name" : "remove",
"getPSAppDEMethod" : {
"modelref" : true,
"id" : "Remove"
},
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZSample0021.json"
}
}, {
"actionName" : "WFSTART",
"actionType" : "WFACTION",
"name" : "WFSTART",
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZSample0021.json"
}
}, {
"actionName" : "WFSUBMIT",
"actionType" : "WFACTION",
"name" : "WFSUBMIT",
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZSample0021.json"
}
} ],
"enableDEFieldPrivilege" : false,
"id" : "编辑表单处理器"
},
"getPSControlParam" : {
"autoLoad" : true,
"showBusyIndicator" : true,
"id" : "wfform_operationform"
},
"getPSDEFormItems" : [ {
"id" : "srfupdatedate",
"hidden" : true,
"dataType" : 5,
"getPSAppDEField" : {
"name" : "UPDATEDATE",
"codeName" : "UpdateDate"
}
}, {
"id" : "srforikey",
"hidden" : true,
"dataType" : 25
}, {
"id" : "srfkey",
"hidden" : true,
"dataType" : 25,
"getPSAppDEField" : {
"name" : "IBIZSAMPLE0021ID",
"codeName" : "IBIZSample0021Id"
}
}, {
"id" : "srfmajortext",
"hidden" : true,
"dataType" : 25,
"getPSAppDEField" : {
"name" : "IBIZSAMPLE0021NAME",
"codeName" : "IBIZSample0021Name"
}
}, {
"id" : "srftempmode",
"hidden" : true,
"dataType" : 25
}, {
"id" : "srfuf",
"hidden" : true,
"dataType" : 25
}, {
"id" : "srfdeid",
"hidden" : true,
"dataType" : 25
}, {
"id" : "srfsourcekey",
"hidden" : true,
"dataType" : 25
}, {
"id" : "ibizsample0021name",
"dataType" : 25,
"getPSAppDEField" : {
"name" : "IBIZSAMPLE0021NAME",
"codeName" : "IBIZSample0021Name"
}
}, {
"id" : "approvalopinions",
"dataType" : 25
}, {
"id" : "ibizsample0021id",
"hidden" : true,
"dataType" : 25,
"getPSAppDEField" : {
"name" : "IBIZSAMPLE0021ID",
"codeName" : "IBIZSample0021Id"
}
} ],
"getPSDEFormPages" : [ {
"caption" : "基本信息",
"codeName" : "formpage1",
"detailStyle" : "DEFAULT",
"detailType" : "FORMPAGE",
"name" : "formpage1",
"getPSDEFormDetails" : [ {
"getCapPSLanguageRes" : {
"lanResTag" : "DEF.LNAME.IBIZSAMPLE0021NAME"
},
"caption" : "订单名称",
"codeName" : "ibizsample0021name",
"dataType" : 25,
"detailStyle" : "DEFAULT",
"detailType" : "FORMITEM",
"enableCond" : 3,
"ignoreInput" : 0,
"labelPos" : "LEFT",
"labelWidth" : 130,
"name" : "ibizsample0021name",
"noPrivDisplayMode" : 1,
"getPSAppDEField" : {
"name" : "IBIZSAMPLE0021NAME",
"codeName" : "IBIZSample0021Name"
},
"getPSEditor" : {
"editorType" : "SPAN",
"name" : "ibizsample0021name",
"enableLinkView" : false
},
"getPSLayoutPos" : {
"colMD" : 24,
"layout" : "TABLE_24COL"
},
"allowEmpty" : true,
"showCaption" : true
}, {
"caption" : "审批意见",
"codeName" : "approvalopinions",
"dataType" : 25,
"detailStyle" : "DEFAULT",
"detailType" : "FORMITEM",
"enableCond" : 3,
"ignoreInput" : 0,
"itemHeight" : 200.0,
"labelPos" : "LEFT",
"labelWidth" : 130,
"name" : "approvalopinions",
"noPrivDisplayMode" : 1,
"getPSEditor" : {
"editorHeight" : 200.0,
"editorParams" : {
"HEIGHT" : "200"
},
"editorType" : "TEXTAREA_10",
"name" : "approvalopinions",
"showMaxLength" : true
},
"getPSLayoutPos" : {
"colMD" : 24,
"layout" : "TABLE_24COL"
},
"allowEmpty" : true,
"showCaption" : true
} ],
"getPSLayout" : {
"columnCount" : 24,
"layout" : "TABLE_24COL"
},
"infoGroupMode" : false
} ],
"getPSLayout" : {
"columnCount" : 24,
"layout" : "TABLE_24COL"
},
"getRemovePSControlAction" : {
"modelref" : true,
"id" : "remove"
},
"tabHeaderPos" : "TOP",
"getUpdatePSControlAction" : {
"modelref" : true,
"id" : "update"
},
"getWFStartPSControlAction" : {
"modelref" : true,
"id" : "WFSTART"
},
"getWFSubmitPSControlAction" : {
"modelref" : true,
"id" : "WFSUBMIT"
},
"noTabHeader" : true,
"name" : "wfform_operationform",
"modelid" : "4d32352cb9f17d077353b81cae29bac0",
"modeltype" : "PSDEFORM_EDITFORM"
}, {
"codeName" : "Usr1114790802",
"controlType" : "FORM",
"getCreatePSControlAction" : {
"modelref" : true,
"id" : "create"
},
"dynaModelFilePath" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZSample0021/PSFORMS/Usr1114790802.json",
"getGetDraftFromPSControlAction" : {
"modelref" : true,
"id" : "loaddraftfrom"
},
"getGetDraftPSControlAction" : {
"modelref" : true,
"id" : "loaddraft"
},
"getGetPSControlAction" : {
"modelref" : true,
"id" : "load"
},
"hookEventNames" : [ "LOAD", "SAVE", "REMOVE" ],
"logicName" : "实体工作流动态编辑视图_表单",
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZSample0021.json"
},
"getPSControlHandler" : {
"getPSHandlerActions" : [ {
"actionName" : "GetDraft",
"actionType" : "DEACTION",
"dataAccessAction" : "CREATE",
"name" : "loaddraft",
"getPSAppDEMethod" : {
"modelref" : true,
"id" : "GetDraft"
},
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZSample0021.json"
}
}, {
"actionName" : "GETDRAFTFROM",
"actionType" : "DEACTION",
"dataAccessAction" : "CREATE",
"name" : "loaddraftfrom",
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZSample0021.json"
}
}, {
"actionName" : "Get",
"actionType" : "DEACTION",
"dataAccessAction" : "READ",
"name" : "load",
"getPSAppDEMethod" : {
"modelref" : true,
"id" : "Get"
},
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZSample0021.json"
}
}, {
"actionName" : "Create",
"actionType" : "DEACTION",
"dataAccessAction" : "CREATE",
"name" : "create",
"getPSAppDEMethod" : {
"modelref" : true,
"id" : "Create"
},
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZSample0021.json"
}
}, {
"actionName" : "Update",
"actionType" : "DEACTION",
"dataAccessAction" : "UPDATE",
"name" : "update",
"getPSAppDEMethod" : {
"modelref" : true,
"id" : "Update"
},
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZSample0021.json"
}
}, {
"actionName" : "Remove",
"actionType" : "DEACTION",
"dataAccessAction" : "DELETE",
"name" : "remove",
"getPSAppDEMethod" : {
"modelref" : true,
"id" : "Remove"
},
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZSample0021.json"
}
}, {
"actionName" : "WFSTART",
"actionType" : "WFACTION",
"name" : "WFSTART",
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZSample0021.json"
}
}, {
"actionName" : "WFSUBMIT",
"actionType" : "WFACTION",
"name" : "WFSUBMIT",
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZSample0021.json"
}
} ],
"enableDEFieldPrivilege" : false,
"id" : "编辑表单处理器"
},
"getPSControlLogics" : [ {
"eventNames" : "LOAD;SAVE;REMOVE",
"logicTag" : "form",
"logicType" : "APPVIEWENGINE",
"name" : "engine_form",
"getPSAppViewEngine" : {
"modelref" : true,
"id" : "engine"
}
} ],
"getPSControlParam" : {
"autoLoad" : true,
"showBusyIndicator" : true,
"id" : "FORM"
},
"getPSDEFormItems" : [ {
"id" : "srfupdatedate",
"hidden" : true,
"dataType" : 5,
"getPSAppDEField" : {
"name" : "UPDATEDATE",
"codeName" : "UpdateDate"
}
}, {
"id" : "srforikey",
"hidden" : true,
"dataType" : 25
}, {
"id" : "srfkey",
"hidden" : true,
"dataType" : 25,
"getPSAppDEField" : {
"name" : "IBIZSAMPLE0021ID",
"codeName" : "IBIZSample0021Id"
}
}, {
"id" : "srfmajortext",
"hidden" : true,
"dataType" : 25,
"getPSAppDEField" : {
"name" : "IBIZSAMPLE0021NAME",
"codeName" : "IBIZSample0021Name"
}
}, {
"id" : "srftempmode",
"hidden" : true,
"dataType" : 25
}, {
"id" : "srfuf",
"hidden" : true,
"dataType" : 25
}, {
"id" : "srfdeid",
"hidden" : true,
"dataType" : 25
}, {
"id" : "srfsourcekey",
"hidden" : true,
"dataType" : 25
}, {
"id" : "ibizsample0021name",
"dataType" : 25,
"getPSAppDEField" : {
"name" : "IBIZSAMPLE0021NAME",
"codeName" : "IBIZSample0021Name"
}
}, {
"id" : "createman",
"dataType" : 25,
"getPSAppDEField" : {
"name" : "CREATEMAN",
"codeName" : "CreateMan"
}
}, {
"id" : "createdate",
"dataType" : 5,
"getPSAppDEField" : {
"name" : "CREATEDATE",
"codeName" : "CreateDate"
}
}, {
"id" : "updateman",
"dataType" : 25,
"getPSAppDEField" : {
"name" : "UPDATEMAN",
"codeName" : "UpdateMan"
}
}, {
"id" : "updatedate",
"dataType" : 5,
"getPSAppDEField" : {
"name" : "UPDATEDATE",
"codeName" : "UpdateDate"
}
}, {
"id" : "ibizsample0021id",
"hidden" : true,
"dataType" : 25,
"getPSAppDEField" : {
"name" : "IBIZSAMPLE0021ID",
"codeName" : "IBIZSample0021Id"
}
} ],
"getPSDEFormPages" : [ {
"caption" : "基本信息",
"codeName" : "formpage1",
"detailStyle" : "DEFAULT",
"detailType" : "FORMPAGE",
"name" : "formpage1",
"getPSDEFormDetails" : [ {
"actionGroupExtractMode" : "ITEM",
"caption" : "订单基本信息",
"codeName" : "group1",
"detailStyle" : "DEFAULT",
"detailType" : "GROUPPANEL",
"name" : "group1",
"getPSDEFormDetails" : [ {
"getCapPSLanguageRes" : {
"lanResTag" : "DEF.LNAME.IBIZSAMPLE0021NAME"
},
"caption" : "订单名称",
"codeName" : "ibizsample0021name",
"dataType" : 25,
"detailStyle" : "DEFAULT",
"detailType" : "FORMITEM",
"enableCond" : 3,
"ignoreInput" : 0,
"labelPos" : "LEFT",
"labelWidth" : 130,
"name" : "ibizsample0021name",
"noPrivDisplayMode" : 1,
"getPSAppDEField" : {
"name" : "IBIZSAMPLE0021NAME",
"codeName" : "IBIZSample0021Name"
},
"getPSEditor" : {
"editorType" : "TEXTBOX",
"maxLength" : 200,
"name" : "ibizsample0021name"
},
"getPSLayoutPos" : {
"colMD" : 24,
"layout" : "TABLE_24COL"
},
"allowEmpty" : true,
"showCaption" : true
} ],
"getPSLayout" : {
"columnCount" : 24,
"layout" : "TABLE_24COL"
},
"getPSLayoutPos" : {
"colMD" : 24,
"layout" : "TABLE_24COL"
},
"infoGroupMode" : false,
"showCaption" : true
} ],
"getPSLayout" : {
"columnCount" : 24,
"layout" : "TABLE_24COL"
},
"infoGroupMode" : false
}, {
"caption" : "其它",
"codeName" : "formpage2",
"detailStyle" : "DEFAULT",
"detailType" : "FORMPAGE",
"name" : "formpage2",
"getPSDEFormDetails" : [ {
"actionGroupExtractMode" : "ITEM",
"caption" : "操作信息",
"codeName" : "group2",
"detailStyle" : "DEFAULT",
"detailType" : "GROUPPANEL",
"name" : "group2",
"getPSDEFormDetails" : [ {
"getCapPSLanguageRes" : {
"lanResTag" : "DEF.LNAME.CREATEMAN"
},
"caption" : "建立人",
"codeName" : "createman",
"dataType" : 25,
"detailStyle" : "DEFAULT",
"detailType" : "FORMITEM",
"enableCond" : 3,
"ignoreInput" : 3,
"labelPos" : "LEFT",
"labelWidth" : 130,
"name" : "createman",
"noPrivDisplayMode" : 1,
"getPSAppDEField" : {
"name" : "CREATEMAN",
"codeName" : "CreateMan"
},
"getPSEditor" : {
"editorType" : "SPAN",
"name" : "createman",
"getPSAppCodeList" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPCODELISTS/SysOperator.json"
},
"enableLinkView" : false
},
"getPSLayoutPos" : {
"colMD" : 24,
"layout" : "TABLE_24COL"
},
"allowEmpty" : true,
"convertToCodeItemText" : true,
"showCaption" : true
}, {
"getCapPSLanguageRes" : {
"lanResTag" : "DEF.LNAME.CREATEDATE"
},
"caption" : "建立时间",
"codeName" : "createdate",
"dataType" : 5,
"detailStyle" : "DEFAULT",
"detailType" : "FORMITEM",
"enableCond" : 3,
"ignoreInput" : 3,
"labelPos" : "LEFT",
"labelWidth" : 130,
"name" : "createdate",
"noPrivDisplayMode" : 1,
"getPSAppDEField" : {
"name" : "CREATEDATE",
"codeName" : "CreateDate"
},
"getPSEditor" : {
"editorType" : "SPAN",
"name" : "createdate",
"enableLinkView" : false
},
"getPSLayoutPos" : {
"colMD" : 24,
"layout" : "TABLE_24COL"
},
"valueFormat" : "YYYY-MM-DD HH:mm:ss",
"allowEmpty" : true,
"showCaption" : true
}, {
"getCapPSLanguageRes" : {
"lanResTag" : "DEF.LNAME.UPDATEMAN"
},
"caption" : "更新人",
"codeName" : "updateman",
"dataType" : 25,
"detailStyle" : "DEFAULT",
"detailType" : "FORMITEM",
"enableCond" : 3,
"ignoreInput" : 3,
"labelPos" : "LEFT",
"labelWidth" : 130,
"name" : "updateman",
"noPrivDisplayMode" : 1,
"getPSAppDEField" : {
"name" : "UPDATEMAN",
"codeName" : "UpdateMan"
},
"getPSEditor" : {
"editorType" : "SPAN",
"name" : "updateman",
"getPSAppCodeList" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPCODELISTS/SysOperator.json"
},
"enableLinkView" : false
},
"getPSLayoutPos" : {
"colMD" : 24,
"layout" : "TABLE_24COL"
},
"allowEmpty" : true,
"convertToCodeItemText" : true,
"showCaption" : true
}, {
"getCapPSLanguageRes" : {
"lanResTag" : "DEF.LNAME.UPDATEDATE"
},
"caption" : "更新时间",
"codeName" : "updatedate",
"dataType" : 5,
"detailStyle" : "DEFAULT",
"detailType" : "FORMITEM",
"enableCond" : 3,
"ignoreInput" : 3,
"labelPos" : "LEFT",
"labelWidth" : 130,
"name" : "updatedate",
"noPrivDisplayMode" : 1,
"getPSAppDEField" : {
"name" : "UPDATEDATE",
"codeName" : "UpdateDate"
},
"getPSEditor" : {
"editorType" : "SPAN",
"name" : "updatedate",
"enableLinkView" : false
},
"getPSLayoutPos" : {
"colMD" : 24,
"layout" : "TABLE_24COL"
},
"valueFormat" : "YYYY-MM-DD HH:mm:ss",
"allowEmpty" : true,
"showCaption" : true
} ],
"getPSLayout" : {
"columnCount" : 24,
"layout" : "TABLE_24COL"
},
"getPSLayoutPos" : {
"colMD" : 24,
"layout" : "TABLE_24COL"
},
"infoGroupMode" : false,
"showCaption" : true
} ],
"getPSLayout" : {
"columnCount" : 24,
"layout" : "TABLE_24COL"
},
"infoGroupMode" : false
} ],
"getPSLayout" : {
"columnCount" : 24,
"layout" : "TABLE_24COL"
},
"getRemovePSControlAction" : {
"modelref" : true,
"id" : "remove"
},
"tabHeaderPos" : "TOP",
"getUpdatePSControlAction" : {
"modelref" : true,
"id" : "update"
},
"getWFStartPSControlAction" : {
"modelref" : true,
"id" : "WFSTART"
},
"getWFSubmitPSControlAction" : {
"modelref" : true,
"id" : "WFSUBMIT"
},
"noTabHeader" : false,
"name" : "form",
"modelid" : "C4677046-82CC-4099-AAC9-0CFAEB876ECC",
"modeltype" : "PSDEFORM_EDITFORM"
} ],
"getPSDEViewCodeName" : "Usr1114433946WFDynaEditView",
"getPSDEViewId" : "F5A6DF8D-D1D7-483C-93D9-F2F8D09C2A30",
"getPSViewLayoutPanel" : {
"codeName" : "Layoutpanel",
"controlStyle" : "APPDEWFDYNAEDITVIEW",
"controlType" : "VIEWLAYOUTPANEL",
"name" : "layoutpanel",
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZSample0021.json"
},
"getPSControlParam" : { },
"layoutBodyOnly" : true,
"layoutPanel" : true,
"useDefaultLayout" : true
},
"title" : "实体工作流动态编辑视图",
"viewStyle" : "DEFAULT",
"viewType" : "DEWFDYNAEDITVIEW",
"xDataControlName" : "form",
"enableDP" : true,
"enableWF" : true,
"showDataInfoBar" : true,
"wFIAMode" : true,
"modelid" : "49E66C2F-237A-415A-B7B9-6B90DF532A83",
"modeltype" : "PSAPPDEVIEW"
}
\ No newline at end of file
......@@ -2778,6 +2778,24 @@
"layout" : "TABLE_24COL"
},
"tooltip" : "工作流动态编辑视图(分页关系)"
}, {
"accUserMode" : 2,
"caption" : "工作流动态编辑视图",
"itemType" : "MENUITEM",
"name" : "menuitem232",
"getPSAppFunc" : {
"modelref" : true,
"id" : "AppFunc132"
},
"getPSLayout" : {
"columnCount" : 24,
"layout" : "TABLE_24COL"
},
"getPSLayoutPos" : {
"colMD" : 24,
"layout" : "TABLE_24COL"
},
"tooltip" : "工作流动态编辑视图"
} ],
"getPSLayout" : {
"columnCount" : 24,
......
......@@ -1697,6 +1697,16 @@
"id" : "AppFunc131"
},
"tooltip" : "工作流动态编辑视图(分页关系)"
}, {
"accUserMode" : 2,
"caption" : "工作流动态编辑视图",
"itemType" : "MENUITEM",
"name" : "menuitem232",
"getPSAppFunc" : {
"modelref" : true,
"id" : "AppFunc132"
},
"tooltip" : "工作流动态编辑视图"
} ],
"tooltip" : "工作流"
}, {
......
......@@ -2489,6 +2489,16 @@
"path" : "PSSYSAPPS/Web/PSAPPDEVIEWS/IBIZOrderSGridView2.json",
"viewType" : "DEGRIDVIEW2"
}
}, {
"appFuncType" : "APPVIEW",
"codeName" : "AppFunc132",
"name" : "工作流动态编辑",
"openMode" : "INDEXVIEWTAB",
"getPSAppView" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDEVIEWS/IBIZSample0021Usr1114433946WFDynaEditView.json",
"viewType" : "DEWFDYNAEDITVIEW"
}
}, {
"appFuncType" : "APPVIEW",
"codeName" : "UsrAppFunc1109441753",
......@@ -13759,6 +13769,12 @@
"viewType" : "DEWFACTIONVIEW",
"resource" : "IBIZOrder",
"view" : "WFActionView"
}, {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDEVIEWS/IBIZSample0021Usr1114433946WFDynaEditView.json",
"viewType" : "DEWFDYNAEDITVIEW",
"resource" : "IBIZSample0021",
"view" : "Usr1114433946WFDynaEditView"
}, {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDEVIEWS/IBIZSample0003STabExpView_layout.json",
......@@ -17943,6 +17959,24 @@
"layout" : "TABLE_24COL"
},
"tooltip" : "工作流动态编辑视图(分页关系)"
}, {
"accUserMode" : 2,
"caption" : "工作流动态编辑视图",
"itemType" : "MENUITEM",
"name" : "menuitem232",
"getPSAppFunc" : {
"modelref" : true,
"id" : "AppFunc132"
},
"getPSLayout" : {
"columnCount" : 24,
"layout" : "TABLE_24COL"
},
"getPSLayoutPos" : {
"colMD" : 24,
"layout" : "TABLE_24COL"
},
"tooltip" : "工作流动态编辑视图"
} ],
"getPSLayout" : {
"columnCount" : 24,
......
......@@ -1160,7 +1160,7 @@
<!--输出实体[IBIZSAMPLE0021]数据结构 -->
<changeSet author="a_LAB01_df847bdfd" id="tab-ibizsample0021-76-39">
<changeSet author="a_LAB01_df847bdfd" id="tab-ibizsample0021-84-39">
<createTable tableName="T_IBIZSAMPLE0021">
<column name="IBIZSAMPLE0021ID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_IBIZSAMPLE0021_IBIZSAMPLE00"/>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册