提交 73e1b0cc 编写于 作者: ibizdev's avatar ibizdev

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

上级 5342dfab
......@@ -120,6 +120,10 @@ function getLocaleResourceBase(){
caption: commonLogic.appcommonhandle("编辑表单内置功能",null),
title: commonLogic.appcommonhandle("图书编辑视图(内置功能)",null),
},
editview9: {
caption: commonLogic.appcommonhandle("图书",null),
title: commonLogic.appcommonhandle("图书管理",null),
},
usreditview_plugin: {
caption: commonLogic.appcommonhandle("编辑视图插件测试-底部工具栏",null),
title: commonLogic.appcommonhandle("编辑视图插件测试-底部工具栏",null),
......@@ -595,6 +599,28 @@ function getLocaleResourceBase(){
uiactions: {
},
},
meditform_form: {
details: {
formpage1: 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),
ibizbookname: commonLogic.appcommonhandle("图书名称",null),
author: commonLogic.appcommonhandle("图书作者",null),
booknumber: commonLogic.appcommonhandle("图书数量",null),
borrowway: commonLogic.appcommonhandle("借阅方式",null),
lendouttime: commonLogic.appcommonhandle("借出日期",null),
returntime: commonLogic.appcommonhandle("归还日期",null),
ibizbookid: commonLogic.appcommonhandle("图书标识",null),
},
uiactions: {
},
},
rulesform_form: {
details: {
group1: commonLogic.appcommonhandle("系统值规则",null),
......
......@@ -120,6 +120,10 @@ function getLocaleResourceBase(){
caption: commonLogic.appcommonhandle("Entity Edit View",null),
title: commonLogic.appcommonhandle("图书编辑视图(内置功能)",null),
},
editview9: {
caption: commonLogic.appcommonhandle("图书",null),
title: commonLogic.appcommonhandle("图书管理",null),
},
usreditview_plugin: {
caption: commonLogic.appcommonhandle("编辑视图插件测试-底部工具栏",null),
title: commonLogic.appcommonhandle("编辑视图插件测试-底部工具栏",null),
......@@ -595,6 +599,28 @@ function getLocaleResourceBase(){
uiactions: {
},
},
meditform_form: {
details: {
formpage1: 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),
ibizbookname: commonLogic.appcommonhandle("图书名称",null),
author: commonLogic.appcommonhandle("图书作者",null),
booknumber: commonLogic.appcommonhandle("图书数量",null),
borrowway: commonLogic.appcommonhandle("借阅方式",null),
lendouttime: commonLogic.appcommonhandle("借出日期",null),
returntime: commonLogic.appcommonhandle("归还日期",null),
ibizbookid: commonLogic.appcommonhandle("图书标识",null),
},
uiactions: {
},
},
rulesform_form: {
details: {
group1: commonLogic.appcommonhandle("系统值规则",null),
......
......@@ -120,6 +120,10 @@ function getLocaleResourceBase(){
caption: commonLogic.appcommonhandle("编辑表单内置功能",null),
title: commonLogic.appcommonhandle("图书编辑视图(内置功能)",null),
},
editview9: {
caption: commonLogic.appcommonhandle("图书",null),
title: commonLogic.appcommonhandle("图书管理",null),
},
usreditview_plugin: {
caption: commonLogic.appcommonhandle("编辑视图插件测试-底部工具栏",null),
title: commonLogic.appcommonhandle("编辑视图插件测试-底部工具栏",null),
......@@ -595,6 +599,28 @@ function getLocaleResourceBase(){
uiactions: {
},
},
meditform_form: {
details: {
formpage1: 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),
ibizbookname: commonLogic.appcommonhandle("图书名称",null),
author: commonLogic.appcommonhandle("图书作者",null),
booknumber: commonLogic.appcommonhandle("图书数量",null),
borrowway: commonLogic.appcommonhandle("借阅方式",null),
lendouttime: commonLogic.appcommonhandle("借出日期",null),
returntime: commonLogic.appcommonhandle("归还日期",null),
ibizbookid: commonLogic.appcommonhandle("图书标识",null),
},
uiactions: {
},
},
rulesform_form: {
details: {
group1: commonLogic.appcommonhandle("系统值规则",null),
......
......@@ -1034,6 +1034,19 @@ const router = new Router({
},
component: () => import('@pages/sample/app-portal-view2/app-portal-view2.vue'),
},
{
path: '/ibizbooks/:ibizbook?/editview9/:editview9?',
meta: {
caption: 'entities.ibizbook.views.editview9.caption',
info:'',
parameters: [
{ pathName: 'ibizbooks', parameterName: 'ibizbook' },
{ pathName: 'editview9', parameterName: 'editview9' },
],
requireAuth: true,
},
component: () => import('@pages/sample/ibizbookedit-view9/ibizbookedit-view9.vue'),
},
{
path: '/ibizbooks/:ibizbook?/usreditview_plugin/:usreditview_plugin?',
meta: {
......
<template>
<app-edit-view-layout class="deeditview9 ibizbookedit-view9 view-no-toolbar">
<template #headerTop>
</template>
<template #headerLeft>
<app-caption caption="图书"></app-caption>
</template>
<template #headerRight>
</template>
<template #contentTop>
</template>
<template #default>
<view_form
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:pViewCtx="viewCtx"
:autosave="false"
:viewtag="viewtag"
:showBusyIndicator="true"
updateAction="Update"
removeAction="Remove"
loaddraftAction="GetDraft"
loadAction="Get"
createAction="Create"
WFSubmitAction=""
WFStartAction=""
style=''
name="form"
ref='form'
@load="form_load($event)"
@save="form_save($event)"
@remove="form_remove($event)"
@closeview="closeView($event)">
</view_form>
</template>
<template #contentBottom>
</template>
</app-edit-view-layout>
</template>
// 基于 @VIEW/实体编辑视图(部件视图)/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 IBIZBOOKService from '@/service/ibizbook/ibizbook-service';
import IBIZBOOKAuthService from '@/authservice/ibizbook/ibizbook-auth-service';
import EditView9Engine from '@engine/view/edit-view9-engine';
import IBIZBOOKUIService from '@/uiservice/ibizbook/ibizbook-ui-service';
@Component({
components: {
},
})
export default class IBIZBOOKEditView9Base extends Vue {
/**
* 实体服务对象
*
* @type {IBIZBOOKService}
* @memberof IBIZBOOKEditView9Base
*/
public appEntityService: IBIZBOOKService = new IBIZBOOKService();
/**
* 实体UI服务对象
*
* @type IBIZBOOKUIService
* @memberof IBIZBOOKEditView9Base
*/
public appUIService: IBIZBOOKUIService = new IBIZBOOKUIService();
/**
* 数据变化
*
* @param {*} val
* @returns {*}
* @memberof IBIZBOOKEditView9Base
*/
@Emit()
public viewDatasChange(val: any):any {
return val;
}
/**
* 传入视图上下文
*
* @type {string}
* @memberof IBIZBOOKEditView9Base
*/
@Prop() public viewdata!: string;
/**
* 传入视图参数
*
* @type {string}
* @memberof IBIZBOOKEditView9Base
*/
@Prop() public viewparam!: string;
/**
* 视图默认使用
*
* @type {boolean}
* @memberof IBIZBOOKEditView9Base
*/
@Prop({ default: true }) public viewDefaultUsage!: boolean;
/**
* 视图默认使用
*
* @type {string}
* @memberof IBIZBOOKEditView9Base
*/
@Inject({from:'navModel',default: 'tab'})
public navModel!:string;
/**
* 视图标识
*
* @type {string}
* @memberof IBIZBOOKEditView9Base
*/
public viewtag: string = '3e2f62b8585df5ca82caff3830826b39';
/**
* 视图类型
*
* @type {string}
* @memberof IBIZBOOKEditView9Base
*/
public viewType: string = 'DEEDITVIEW9';
/**
* 自定义视图导航上下文集合
*
* @type {*}
* @memberof IBIZBOOKEditView9Base
*/
public customViewNavContexts:any ={
};
/**
* 自定义视图导航参数集合
*
* @type {*}
* @memberof IBIZBOOKEditView9Base
*/
public customViewParams:any ={
};
/**
* 视图模型数据
*
* @type {*}
* @memberof IBIZBOOKEditView9Base
*/
public model: any = {
srfCaption: 'entities.ibizbook.views.editview9.caption',
srfTitle: 'entities.ibizbook.views.editview9.title',
srfSubTitle: 'entities.ibizbook.views.editview9.subtitle',
dataInfo: ''
}
/**
* 视图参数变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof IBIZBOOKEditView9Base
*/
@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 IBIZBOOKEditView9Base
*/
@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 IBIZBOOKEditView9Base
*/
public containerModel: any = {
view_form: { name: 'form', type: 'FORM' },
};
/**
* 视图操作参数
*
* @type {*}
* @readonly
* @memberof IBIZBOOKEditView9Base
*/
public viewCtx: any = {};
/**
* 视图刷新
*
* @param {*} args
* @memberof IBIZBOOKEditView9Base
*/
public refresh(args?: any): void {
const refs: any = this.$refs;
if (refs && refs.form) {
refs.form.refresh();
}
}
/**
* 计数器刷新
*
* @memberof IBIZBOOKEditView9Base
*/
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 IBIZBOOKEditView9Base
*/
public viewState: Subject<ViewState> = new Subject();
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof IBIZBOOKEditView9Base
*/
public engine: EditView9Engine = new EditView9Engine();
/**
* 引擎初始化
*
* @public
* @memberof IBIZBOOKEditView9Base
*/
public engineInit(): void {
this.engine.init({
view: this,
form: this.$refs.form,
p2k: '0',
keyPSDEField: 'ibizbook',
majorPSDEField: 'ibizbookname',
isLoadDefault: true,
});
}
/**
* 应用导航服务
*
* @type {*}
* @memberof IBIZBOOKEditView9Base
*/
public navDataService = NavDataService.getInstance();
/**
* 导航服务事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof IBIZBOOKEditView9Base
*/
public serviceStateEvent: Subscription | undefined;
/**
* 门户部件状态对象
*
* @type {*}
* @memberof IBIZBOOKEditView9Base
*/
@Prop() public portletState?: any;
/**
* 门户部件状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof IBIZBOOKEditView9Base
*/
public portletStateEvent: Subscription | undefined;
/**
* 门户部件状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof IBIZBOOKEditView9Base
*/
public formDruipartEvent: Subscription | undefined;
/**
* 应用上下文
*
* @type {*}
* @memberof IBIZBOOKEditView9Base
*/
public context:any = {};
/**
* 视图参数
*
* @type {*}
* @memberof IBIZBOOKEditView9Base
*/
public viewparams:any = {};
/**
* 视图缓存数据
*
* @type {*}
* @memberof IBIZBOOKEditView9Base
*/
public viewCacheData:any;
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof IBIZBOOKEditView9Base
*/
public counterServiceArray:Array<any> = [];
/**
* 解析视图参数
*
* @public
* @memberof IBIZBOOKEditView9Base
*/
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,{'ibizbook':inputvalue});
}
//初始化视图唯一标识
Object.assign(this.context,{srfsessionid:this.$util.createUUID()});
this.handleCustomViewData();
//初始化导航数据
this.initNavDataWithRoute();
}
/**
* 处理自定义视图数据
*
* @memberof IBIZBOOKEditView9Base
*/
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 IBIZBOOKEditView9Base
*/
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 IBIZBOOKEditView9Base
*/
public initNavDataWithRoute(data:any = null, isNew:boolean = false, isAlways:boolean = false){
if( isAlways || (this.viewDefaultUsage && Object.is(this.navModel,"route")) ){
this.navDataService.addNavData({id:'ibizbookedit-view9',tag:this.viewtag,srfkey:isNew ? null : this.context.ibizbook,title:this.$t(this.model.srfCaption),data:data,context:this.context,viewparams:this.viewparams,path:this.$route.fullPath});
}
}
/**
* 初始化导航数据(分页模式)
*
* @memberof IBIZBOOKEditView9Base
*/
public initNavDataWithTab(data:any = null,isOnlyAdd:boolean = true, isAlways:boolean = false){
if( isAlways || (this.viewDefaultUsage && !Object.is(this.navModel,"route")) ){
this.navDataService.addNavDataByOnly({id:'ibizbookedit-view9',tag:this.viewtag,srfkey:this.context.ibizbook,title:this.$t(this.model.srfCaption),data:data,context:this.context,viewparams:this.viewparams,path:this.$route.fullPath},isOnlyAdd);
}
}
/**
* Vue声明周期
*
* @memberof IBIZBOOKEditView9Base
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof IBIZBOOKEditView9Base
*/
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,'ibizbookedit-view9')){
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,'IBIZBOOKEditView9')){
return;
}
if(Object.is(res.action,'refresh') && _this.refresh && _this.refresh instanceof Function){
_this.refresh();
}
})
}
_this.initViewCtx();
if (this.panelState) {
this.panelStateEvent = this.panelState.subscribe((res:any) => {
if (Object.is(res.tag, 'meditviewpanel')) {
if (Object.is(res.action, 'save')) {
this.viewState.next({ tag:'form', action: 'save', data: res.data });
}
if (Object.is(res.action, 'remove')) {
this.viewState.next({ tag:'form', action: 'remove', data: res.data });
}
}
});
}
}
/**
* 初始化视图操作参数
*
* @memberof IBIZBOOKEditView9Base
*/
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 IBIZBOOKEditView9Base
*/
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();
}
if (_this.panelStateEvent) {
_this.panelStateEvent.unsubscribe();
}
}
/**
* Vue声明周期(组件初始化完毕)
*
* @memberof IBIZBOOKEditView9Base
*/
public mounted() {
this.afterMounted();
}
/**
* 执行mounted后的逻辑
*
* @memberof IBIZBOOKEditView9Base
*/
public afterMounted(){
const _this: any = this;
_this.engineInit();
if (_this.loadModel && _this.loadModel instanceof Function) {
_this.loadModel();
}
}
/**
* form 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof IBIZBOOKEditView9Base
*/
public form_load($event: any, $event2?: any) {
this.engine.onCtrlEvent('form', 'load', $event);
}
/**
* form 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof IBIZBOOKEditView9Base
*/
public form_save($event: any, $event2?: any) {
this.engine.onCtrlEvent('form', 'save', $event);
}
/**
* form 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof IBIZBOOKEditView9Base
*/
public form_remove($event: any, $event2?: any) {
this.engine.onCtrlEvent('form', 'remove', $event);
}
/**
* 关闭视图
*
* @param {any[]} args
* @memberof IBIZBOOKEditView9Base
*/
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 IBIZBOOKEditView9Base
*/
public destroyed(){
this.afterDestroyed();
}
/**
* 执行destroyed后的逻辑
*
* @memberof IBIZBOOKEditView9Base
*/
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();
}
})
}
}
/**
* meditview9状态下发变量
*
* @memberof IBIZBOOKEditView9Base
*/
@Prop() public panelState?: Subject<ViewState>;
/**
* meditview9状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof IBIZBOOKEditView9Base
*/
public panelStateEvent: Subscription | undefined;
}
</script>
<style lang='scss'>
@import './ibizbookedit-view9.scss';
</style>
\ No newline at end of file
// 基于 @VIEW/实体编辑视图(部件视图)/VIEW.scss.ftl 生成
.view-card {
>.ivu-card-extra {
top: 5px;
right: 0px;
}
}
.ibizbookedit-view9{
position: relative;
}
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import IBIZBOOKEditView9Base from './ibizbookedit-view9-base.vue';
import view_form from '@widgets/ibizbook/meditform-form/meditform-form.vue';
// 基于 @VIEW/实体编辑视图(部件视图)/VIEW.vue.ftl 生成
@Component({
components: {
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 IBIZBOOKEditView9 extends IBIZBOOKEditView9Base {
}
</script>
\ No newline at end of file
......@@ -192,6 +192,7 @@ export const PageComponents = {
Vue.component('ibizcustomer-usr2-mpickup-view', () => import('@pages/sample/ibizcustomer-usr2-mpickup-view/ibizcustomer-usr2-mpickup-view.vue'));
Vue.component('ibizcustomer-intfmpickup-view', () => import('@pages/sample/ibizcustomer-intfmpickup-view/ibizcustomer-intfmpickup-view.vue'));
Vue.component('ibizcustomer-mpickup-view', () => import('@pages/sample/ibizcustomer-mpickup-view/ibizcustomer-mpickup-view.vue'));
Vue.component('ibizbookedit-view9', () => import('@pages/sample/ibizbookedit-view9/ibizbookedit-view9.vue'));
Vue.component('ibizorder-f19-edit-view', () => import('@pages/sample/ibizorder-f19-edit-view/ibizorder-f19-edit-view.vue'));
Vue.component('ibizbookedit-view', () => import('@pages/sample/ibizbookedit-view/ibizbookedit-view.vue'));
Vue.component('ibizhardware-sgrid-view', () => import('@pages/sample/ibizhardware-sgrid-view/ibizhardware-sgrid-view.vue'));
......
......@@ -2941,6 +2941,20 @@ const router = new Router({
},
component: () => import('@pages/sample/ibizcustomer-mpickup-view/ibizcustomer-mpickup-view.vue'),
},
{
path: 'ibizbooks/:ibizbook?/editview9/:editview9?',
meta: {
caption: 'entities.ibizbook.views.editview9.caption',
info:'',
parameters: [
{ pathName: 'index', parameterName: 'index' },
{ pathName: 'ibizbooks', parameterName: 'ibizbook' },
{ pathName: 'editview9', parameterName: 'editview9' },
],
requireAuth: true,
},
component: () => import('@pages/sample/ibizbookedit-view9/ibizbookedit-view9.vue'),
},
{
path: 'ibizorders/:ibizorder?/f19editview/:f19editview?',
meta: {
......@@ -4573,6 +4587,19 @@ const router = new Router({
},
component: () => import('@pages/sample/app-portal-view2/app-portal-view2.vue'),
},
{
path: '/ibizbooks/:ibizbook?/editview9/:editview9?',
meta: {
caption: 'entities.ibizbook.views.editview9.caption',
info:'',
parameters: [
{ pathName: 'ibizbooks', parameterName: 'ibizbook' },
{ pathName: 'editview9', parameterName: 'editview9' },
],
requireAuth: true,
},
component: () => import('@pages/sample/ibizbookedit-view9/ibizbookedit-view9.vue'),
},
{
path: '/ibizbooks/:ibizbook?/usreditview_plugin/:usreditview_plugin?',
meta: {
......
......@@ -852,6 +852,19 @@ const router = new Router({
},
component: () => import('@pages/sample/app-portal-view2/app-portal-view2.vue'),
},
{
path: '/ibizbooks/:ibizbook?/editview9/:editview9?',
meta: {
caption: 'entities.ibizbook.views.editview9.caption',
info:'',
parameters: [
{ pathName: 'ibizbooks', parameterName: 'ibizbook' },
{ pathName: 'editview9', parameterName: 'editview9' },
],
requireAuth: true,
},
component: () => import('@pages/sample/ibizbookedit-view9/ibizbookedit-view9.vue'),
},
{
path: '/ibizbooks/:ibizbook?/usreditview_plugin/:usreditview_plugin?',
meta: {
......
......@@ -571,7 +571,7 @@ export const viewstate: any = {
viewaction: '',
viewdatachange: false,
refviews: [
'37e96c2a2e91cfbb1c2b076eb854a18e',
'3e2f62b8585df5ca82caff3830826b39',
],
},
{
......@@ -603,6 +603,15 @@ export const viewstate: any = {
refviews: [
],
},
{
viewtag: '3e2f62b8585df5ca82caff3830826b39',
viewmodule: 'Sample',
viewname: 'IBIZBOOKEditView9',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{
viewtag: '427E25F6-DBD4-451B-B20E-87929E061C95',
viewmodule: 'Sample',
......
......@@ -120,6 +120,7 @@ export default class IBIZBOOKUIServiceBase extends UIService {
this.allViewMap.set(':',{viewname:'valuerulesgridview',viewType:'DEGRIDVIEW',srfappde:'ibizbooks',component:'ibizbookvalue-rules-grid-view'});
this.allViewMap.set(':',{viewname:'usr2meditview9',viewType:'DEMEDITVIEW9',srfappde:'ibizbooks',component:'ibizbookusr2-medit-view9'});
this.allViewMap.set(':',{viewname:'interfunceditview',viewType:'DEEDITVIEW',srfappde:'ibizbooks',component:'ibizbookinter-func-edit-view'});
this.allViewMap.set(':',{viewname:'editview9',viewType:'DEEDITVIEW9',srfappde:'ibizbooks',component:'ibizbookedit-view9'});
this.allViewMap.set(':',{viewname:'usreditview_plugin',viewType:'DEEDITVIEW',srfappde:'ibizbooks',component:'ibizbookusr-edit-view-plugin'});
this.allViewMap.set(':',{viewname:'usr4calendarview',viewType:'DECALENDARVIEW',srfappde:'ibizbooks',component:'ibizbookusr4-calendar-view'});
this.allViewMap.set(':',{viewname:'editview2',viewType:'DEEDITVIEW2',srfappde:'ibizbooks',component:'ibizbookedit-view2'});
......
......@@ -639,7 +639,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: 'IBIZAPPEDITORGridView' + (this.$t('app.searchForm.notConfig.loadAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZAPPEDITORListView' + (this.$t('app.searchForm.notConfig.loadAction') as string) });
return;
}
const arg: any = { ...opt };
......@@ -675,7 +675,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: 'IBIZAPPEDITORGridView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZAPPEDITORListView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) });
return;
}
const arg: any = { ...opt } ;
......
<template>
<i-form :model="this.data" class='app-form' ref='form' id='ibizbook_meditform' style="" @on-validate="formItemValidate">
<input style="display:none;" />
<row >
<i-col v-show="detailsModel.ibizbookname.visible" :style="{}" :lg="{ span: 24, offset: 0 }" :xl="{ span: 8, offset: 0 }">
<app-form-item name='ibizbookname' :itemRules="this.rules().ibizbookname" class='' :caption="$t('entities.ibizbook.meditform_form.details.ibizbookname')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.ibizbookname.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box
v-model="data.ibizbookname"
@enter="onEnter($event)"
unit=""
:disabled="detailsModel.ibizbookname.disabled"
type='text'
style="">
</input-box>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.author.visible" :style="{}" :lg="{ span: 24, offset: 0 }" :xl="{ span: 8, offset: 0 }">
<app-form-item name='author' :itemRules="this.rules().author" class='' :caption="$t('entities.ibizbook.meditform_form.details.author')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.author.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box
v-model="data.author"
@enter="onEnter($event)"
unit=""
:disabled="detailsModel.author.disabled"
type='text'
style="">
</input-box>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.booknumber.visible" :style="{}" :lg="{ span: 24, offset: 0 }" :xl="{ span: 8, offset: 0 }">
<app-form-item name='booknumber' :itemRules="this.rules().booknumber" class='' :caption="$t('entities.ibizbook.meditform_form.details.booknumber')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.booknumber.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box
v-model="data.booknumber"
@enter="onEnter($event)"
unit=""
:disabled="detailsModel.booknumber.disabled"
type='number'
style="">
</input-box>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.borrowway.visible" :style="{}" :lg="{ span: 24, offset: 0 }" :xl="{ span: 8, offset: 0 }">
<app-form-item name='borrowway' :itemRules="this.rules().borrowway" class='' :caption="$t('entities.ibizbook.meditform_form.details.borrowway')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.borrowway.error" :isEmptyCaption="false" labelPos="LEFT">
<dropdown-list
v-model="data.borrowway"
:data="data"
:context="context"
:viewparams="viewparams"
:formState="formState"
:localContext ='{ }'
:localParam ='{ }'
:disabled="detailsModel.borrowway.disabled"
valueType="string"
tag='CodeList25'
codelistType='STATIC'
placeholder='请选择...' style="">
</dropdown-list>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.lendouttime.visible" :style="{}" :lg="{ span: 24, offset: 0 }" :xl="{ span: 8, offset: 0 }">
<app-form-item name='lendouttime' :itemRules="this.rules().lendouttime" class='' :caption="$t('entities.ibizbook.meditform_form.details.lendouttime')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.lendouttime.error" :isEmptyCaption="false" labelPos="LEFT">
<date-picker type="date" :transfer="true" format="yyyy-MM-dd" :value="data.lendouttime" :disabled="detailsModel.lendouttime.disabled" style="min-width: 150px; width:100px;" @on-change="(val1, val2) => { this.data.lendouttime = val1 }"></date-picker>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.returntime.visible" :style="{}" :lg="{ span: 24, offset: 0 }" :xl="{ span: 8, offset: 0 }">
<app-form-item name='returntime' :itemRules="this.rules().returntime" class='' :caption="$t('entities.ibizbook.meditform_form.details.returntime')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.returntime.error" :isEmptyCaption="false" labelPos="LEFT">
<date-picker type="date" :transfer="true" format="yyyy-MM-dd" :value="data.returntime" :disabled="detailsModel.returntime.disabled" style="min-width: 150px; width:100px;" @on-change="(val1, val2) => { this.data.returntime = val1 }"></date-picker>
</app-form-item>
</i-col>
</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 IBIZBOOKEntityService from '@/service/ibizbook/ibizbook-service';
import MeditformService from './meditform-form-service';
import IBIZBOOKUIService from '@/uiservice/ibizbook/ibizbook-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 MeditformBase extends Vue implements ControlInterface {
/**
* 名称
*
* @type {string}
* @memberof MeditformBase
*/
@Prop() public name?: string;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof MeditformBase
*/
@Prop() public viewState!: Subject<ViewState>;
/**
* 应用上下文
*
* @type {*}
* @memberof MeditformBase
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof MeditformBase
*/
@Prop() public viewparams!: any;
/**
* 视图操作参数(父级)
*
* @type {*}
* @memberof MeditformBase
*/
@Prop() public pViewCtx!: any;
/**
* 视图操作参数
*
* @type {*}
* @memberof MeditformBase
*/
public viewCtx: any = {};
/**
* 监听视图操作参数变化
*
* @type {*}
* @memberof MeditformBase
*/
@Watch('pViewCtx', { immediate: true })
public onViewCtxChange(newVal: any, oldVal: any) {
Object.assign(this.viewCtx, newVal, { xData: this, ctrl: this });
}
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof MeditformBase
*/
public viewStateEvent: Subscription | undefined;
/**
* 获取部件类型
*
* @returns {string}
* @memberof MeditformBase
*/
public getControlType(): string {
return 'FORM'
}
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof MeditformBase
*/
public counterServiceArray:Array<any> = [];
/**
* 建构部件服务对象
*
* @type {MeditformService}
* @memberof MeditformBase
*/
public service: MeditformService = new MeditformService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {IBIZBOOKService}
* @memberof MeditformBase
*/
public appEntityService: IBIZBOOKEntityService = new IBIZBOOKEntityService({ $store: this.$store });
/**
* 转化数据
*
* @param {any} args
* @memberof MeditformBase
*/
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 MeditformBase
*/
public closeView(args: any): void {
let _this: any = this;
_this.$emit('closeview', [args]);
}
/**
* 计数器刷新
*
* @memberof MeditformBase
*/
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 MeditformBase
*/
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 MeditformBase
*/
@Inject({from:'navModel',default: 'tab'})
public navModel!:string;
/**
* 主键表单项名称
*
* @protected
* @type {string}
* @memberof MeditformBase
*/
public formKeyItemName: string = '';
/**
* 是否自动加载
*
* @type {boolean}
* @memberof MeditformBase
*/
@Prop({default:false}) public isautoload?:boolean;
/**
* 界面UI服务对象
*
* @type {IBIZBOOKUIService}
* @memberof MeditformBase
*/
public appUIService:IBIZBOOKUIService = new IBIZBOOKUIService();
/**
* 工作流审批意见控件绑定值
*
* @memberof MeditformBase
*/
public srfwfmemo:string = "";
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof MeditformBase
*/
public getDatas(): any[] {
return [this.data];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof MeditformBase
*/
public getData(): any {
return this.data;
}
/**
* 是否默认保存
*
* @type {boolean}
* @memberof MeditformBase
*/
@Prop({ default: false }) public autosave?: boolean;
/**
* 显示处理提示
*
* @type {boolean}
* @memberof MeditformBase
*/
@Prop({ default: true }) public showBusyIndicator?: boolean;
/**
* 部件行为--submit
*
* @type {string}
* @memberof MeditformBase
*/
@Prop() public WFSubmitAction!: string;
/**
* 部件行为--start
*
* @type {string}
* @memberof MeditformBase
*/
@Prop() public WFStartAction!: string;
/**
* 部件行为--update
*
* @type {string}
* @memberof MeditformBase
*/
@Prop() public updateAction!: string;
/**
* 部件行为--remove
*
* @type {string}
* @memberof MeditformBase
*/
@Prop() public removeAction!: string;
/**
* 部件行为--loaddraft
*
* @type {string}
* @memberof MeditformBase
*/
@Prop() public loaddraftAction!: string;
/**
* 部件行为--load
*
* @type {string}
* @memberof MeditformBase
*/
@Prop() public loadAction!: string;
/**
* 部件行为--create
*
* @type {string}
* @memberof MeditformBase
*/
@Prop() public createAction!: string;
/**
* 部件行为--create
*
* @type {string}
* @memberof MeditformBase
*/
@Prop() public searchAction!: string;
/**
* 视图标识
*
* @type {string}
* @memberof MeditformBase
*/
@Prop() public viewtag!: string;
/**
* 表单状态
*
* @type {Subject<any>}
* @memberof MeditformBase
*/
public formState: Subject<any> = new Subject();
/**
* 忽略表单项值变化
*
* @type {boolean}
* @memberof MeditformBase
*/
public ignorefieldvaluechange: boolean = false;
/**
* 数据变化
*
* @public
* @type {Subject<any>}
* @memberof MeditformBase
*/
public dataChang: Subject<any> = new Subject();
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof MeditformBase
*/
public dataChangEvent: Subscription | undefined;
/**
* 原始数据
*
* @public
* @type {*}
* @memberof MeditformBase
*/
public oldData: any = {};
/**
* 混入表单数据对象
*
* @type {*}
* @memberof MeditformBase
*/
public mixinData:any = {};
/**
* 表单项校验错误提示信息
*
* @memberof MeditformBase
*/
public errorMessages: Array<any> = [];
/**
* 应用状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof MeditformBase
*/
public appStateEvent: Subscription | undefined;
/**
* 设置表单项错误提示信息
*
* @param {*} prop 表单项字段名
* @param {*} status 校验状态
* @param {*} error 错误信息
* @memberof MeditformBase
*/
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 MeditformBase
*/
public data: any = {
srfupdatedate: null,
srforikey: null,
srfkey: null,
srfmajortext: null,
srftempmode: null,
srfuf: null,
srfdeid: null,
srfsourcekey: null,
ibizbookname: null,
author: null,
booknumber: null,
borrowway: null,
lendouttime: null,
returntime: null,
ibizbookid: null,
ibizbook:null,
};
/**
* 当前执行的行为逻辑
*
* @type {string}
* @memberof MeditformBase
*/
public currentAction: string = "";
/**
* 关系界面计数器
*
* @type {number}
* @memberof MeditformBase
*/
public drcounter: number = 0;
/**
* 需要等待关系界面保存时,第一次调用save参数的备份
*
* @type {number}
* @memberof MeditformBase
*/
public drsaveopt: any = {};
/**
* 表单保存回调存储对象
*
* @type {any}
* @memberof MeditformBase
*/
public saveState:any ;
/**
* 主信息属性映射表单项名称
*
* @type {string}
* @memberof MeditformBase
*/
public majorMessageField: string = "ibizbookname";
/**
* 值规则
*
* @type {*}
* @memberof MeditformBase
*/
public rules() :any {
return {
ibizbookname: [
{ required: this.detailsModel.ibizbookname.required, type: 'string', message: '图书名称 值不能为空', trigger: 'change' },
{ required: this.detailsModel.ibizbookname.required, type: 'string', message: '图书名称 值不能为空', trigger: 'blur' },
],
author: [
{ required: this.detailsModel.author.required, type: 'string', message: '图书作者 值不能为空', trigger: 'change' },
{ required: this.detailsModel.author.required, type: 'string', message: '图书作者 值不能为空', trigger: 'blur' },
],
booknumber: [
{ required: this.detailsModel.booknumber.required, type: 'number', message: '图书数量 值不能为空', trigger: 'change' },
{ required: this.detailsModel.booknumber.required, type: 'number', message: '图书数量 值不能为空', trigger: 'blur' },
],
borrowway: [
{ required: this.detailsModel.borrowway.required, type: 'string', message: '借阅方式 值不能为空', trigger: 'change' },
{ required: this.detailsModel.borrowway.required, type: 'string', message: '借阅方式 值不能为空', trigger: 'blur' },
],
lendouttime: [
{ required: this.detailsModel.lendouttime.required, type: 'string', message: '借出日期 值不能为空', trigger: 'change' },
{ required: this.detailsModel.lendouttime.required, type: 'string', message: '借出日期 值不能为空', trigger: 'blur' },
],
returntime: [
{ required: this.detailsModel.returntime.required, type: 'string', message: '归还日期 值不能为空', trigger: 'change' },
{ required: this.detailsModel.returntime.required, type: 'string', message: '归还日期 值不能为空', trigger: 'blur' },
],
}
}
/**
* 属性值规则
*
* @type {*}
* @memberof MeditformBase
*/
public deRules(){
return {
}
}
/**
* 校验属性值规则
*
* @public
* @param {{ name: string }} { name }
* @memberof MeditformBase
*/
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 MeditformBase
*/
public detailsModel: any = {
formpage1: new FormPageModel({ caption: '基本信息', detailType: 'FORMPAGE', name: 'formpage1', 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 })
,
ibizbookname: new FormItemModel({ caption: '图书名称', detailType: 'FORMITEM', name: 'ibizbookname', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:true, disabled: false, enableCond: 3 })
,
author: new FormItemModel({ caption: '图书作者', detailType: 'FORMITEM', name: 'author', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
booknumber: new FormItemModel({ caption: '图书数量', detailType: 'FORMITEM', name: 'booknumber', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
borrowway: new FormItemModel({ caption: '借阅方式', detailType: 'FORMITEM', name: 'borrowway', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
lendouttime: new FormItemModel({ caption: '借出日期', detailType: 'FORMITEM', name: 'lendouttime', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:true, disabled: false, enableCond: 3 })
,
returntime: new FormItemModel({ caption: '归还日期', detailType: 'FORMITEM', name: 'returntime', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:true, disabled: false, enableCond: 3 })
,
ibizbookid: new FormItemModel({ caption: '图书标识', detailType: 'FORMITEM', name: 'ibizbookid', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
};
/**
* 监控表单属性 srfupdatedate 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof MeditformBase
*/
@Watch('data.srfupdatedate')
onSrfupdatedateChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'srfupdatedate', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 srforikey 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof MeditformBase
*/
@Watch('data.srforikey')
onSrforikeyChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'srforikey', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 srfkey 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof MeditformBase
*/
@Watch('data.srfkey')
onSrfkeyChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'srfkey', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 srfmajortext 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof MeditformBase
*/
@Watch('data.srfmajortext')
onSrfmajortextChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'srfmajortext', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 srftempmode 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof MeditformBase
*/
@Watch('data.srftempmode')
onSrftempmodeChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'srftempmode', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 srfuf 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof MeditformBase
*/
@Watch('data.srfuf')
onSrfufChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'srfuf', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 srfdeid 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof MeditformBase
*/
@Watch('data.srfdeid')
onSrfdeidChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'srfdeid', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 srfsourcekey 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof MeditformBase
*/
@Watch('data.srfsourcekey')
onSrfsourcekeyChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'srfsourcekey', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 ibizbookname 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof MeditformBase
*/
@Watch('data.ibizbookname')
onIbizbooknameChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'ibizbookname', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 author 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof MeditformBase
*/
@Watch('data.author')
onAuthorChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'author', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 booknumber 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof MeditformBase
*/
@Watch('data.booknumber')
onBooknumberChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'booknumber', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 borrowway 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof MeditformBase
*/
@Watch('data.borrowway')
onBorrowwayChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'borrowway', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 lendouttime 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof MeditformBase
*/
@Watch('data.lendouttime')
onLendouttimeChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'lendouttime', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 returntime 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof MeditformBase
*/
@Watch('data.returntime')
onReturntimeChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'returntime', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 ibizbookid 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof MeditformBase
*/
@Watch('data.ibizbookid')
onIbizbookidChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'ibizbookid', newVal: newVal, oldVal: oldVal });
}
/**
* 显示更多模式切换操作
*
* @type {string}
* @memberof MeditformBase
*/
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 MeditformBase
*/
public resetFormData({ name, newVal, oldVal }: { name: string, newVal: any, oldVal: any }): void {
}
/**
* 置空对象
*
* @param {any[]} args
* @memberof MeditformBase
*/
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 MeditformBase
*/
public async formLogic({ name, newVal, oldVal }: { name: string, newVal: any, oldVal: any }){
}
/**
* 表单项检查逻辑
*
* @public
* @param name 属性名
* @memberof MeditformBase
*/
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 MeditformBase
*/
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 MeditformBase
*/
public onFormLoad(data: any = {},action:string): void {
if(Object.is(action,"save") || Object.is(action,"autoSave") || Object.is(action,"submit"))
// 更新context的实体主键
if(data.ibizbook){
Object.assign(this.context,{ibizbook:data.ibizbook})
}
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 MeditformBase
*/
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 MeditformBase
*/
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 MeditformBase
*/
public resetDraftFormStates(): void {
const form: any = this.$refs.form;
if (form) {
form.resetFields();
}
}
/**
* 重置校验结果
*
* @memberof MeditformBase
*/
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 MeditformBase
*/
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 MeditformBase
*/
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 MeditformBase
*/
public getValues(): any {
return this.data;
}
/**
* 表单项值变更
*
* @param {{ name: string, value: any }} $event
* @returns {void}
* @memberof MeditformBase
*/
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 MeditformBase
*/
public onFormItemActionClick(arg:any){
if(arg && (arg instanceof Function)) arg();
}
/**
* 设置数据项值
*
* @param {string} name
* @param {*} value
* @returns {void}
* @memberof MeditformBase
*/
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 MeditformBase
*/
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 MeditformBase
*/
public groupUIActionClick($event: any): void {
if (!$event) {
return;
}
const item:any = $event.item;
}
/**
* Vue声明周期(处理组件的输入属性)
*
* @memberof MeditformBase
*/
public created(): void {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof MeditformBase
*/
public afterCreated(){
if(this.isautoload){
this.autoLoad({srfkey:this.context.ibizbook});
}
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 MeditformBase
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof MeditformBase
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
if (this.dataChangEvent) {
this.dataChangEvent.unsubscribe();
}
if(this.appStateEvent){
this.appStateEvent.unsubscribe();
}
}
/**
*打印
*@memberof @memberof MeditformBase
*/
public print(){
let _this:any = this;
_this.$print({id:'ibizbook_meditform',popTitle:'多编辑表单'});
}
/**
* 部件刷新
*
* @param {any} args
* @memberof MeditformBase
*/
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 MeditformBase
*/
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 MeditformBase
*/
public async load(opt: any = {}): Promise<any> {
if(!this.loadAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKEditView9' + (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;
// 拷贝模式下主信息属性拼接 '-副本'
if (this.viewparams && (this.viewparams.copymode === true || this.viewparams.copymode === 'true')) {
data['srfmajortext'] = data['srfmajortext'] + '-副本';
data['ibizbookname'] = data['ibizbookname'] + '-副本';
}
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 MeditformBase
*/
public async loadDraft(opt: any = {}): Promise<any> {
if (!this.loaddraftAction) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKEditView9' + (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 = await 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.ibizbook = 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 MeditformBase
*/
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: 'IBIZBOOKEditView9' + (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:"IBIZBOOK",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 MeditformBase
*/
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: 'IBIZBOOKEditView9' + (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:"IBIZBOOK",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);
})
});
})
})
}
/**
* 保存草稿
*
* @param {*} [opt={}]
* @param {boolean} [showResultInfo]
* @param {boolean} [ifStateNext] formState是否下发通知
* @returns {Promise<any>}
* @memberof MeditformBase
*/
public saveDraft(opt: any = {}, showResultInfo?: boolean, ifStateNext: boolean = true): Promise<any> {
return new Promise((resolve: any, reject: any) => {
showResultInfo = showResultInfo === undefined ? true : false;
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(this.viewparams && this.viewparams.copymode){
data.srfuf = '0';
}
const action: any = 'SaveDraft'
Object.assign(arg, { viewparams: this.viewparams });
this.handleCtrlEvents('onbeforesave', { data: arg }).then((beforeSaveResult: boolean) => {
if (!beforeSaveResult) {
return;
}
const post: Promise<any> = this.service.update(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:"IBIZBOOK",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 MeditformBase
*/
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: 'IBIZBOOKEditView9' + (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:"IBIZBOOK",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 MeditformBase
*/
public async wfstart(data: any,localdata?:any): Promise<any> {
return new Promise((resolve: any, reject: any) => {
const _this: any = this;
const copyData:any = data && Array.isArray(data) ?Util.deepCopy(data)[0]: {};
const formData:any = this.getData();
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);
this.$nextTick(() => {
this.formState.next({ type: 'save', data: arg });
});
// 准备提交参数
if(this.viewparams){
let copyViewParams:any = Util.deepCopy(this.viewparams);
if(copyViewParams.w){
delete copyViewParams.w;
}
Object.assign(responseData,copyViewParams);
}
// 准备工作流操作视图参数
if(copyData && Object.keys(copyData).length >0){
Object.keys(copyData).forEach((key:string) =>{
if(!arg.hasOwnProperty(key) || (arg.hasOwnProperty(key) && (copyData[key] !== null && copyData[key] !== undefined))){
Object.assign(responseData,{[key]:copyData[key]});
}
})
}
Object.assign(arg,{viewparams:responseData});
// 准备工作流数据,填充未存库数据
Object.assign(arg,copyData);
// 强制补充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;
}
AppCenterService.notifyMessage({name:"IBIZBOOK",action:'appRefresh',data:arg});
AppCenterService.notifyMessage({name:"srfwftodo",action:'appRefresh',data:arg});
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 MeditformBase
*/
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.ibizbook || Object.is(arg.ibizbook, '')) {
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);
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;
}
AppCenterService.notifyMessage({name:"IBIZBOOK",action:'appRefresh',data:data});
AppCenterService.notifyMessage({name:"srfwftodo",action:'appRefresh',data:arg});
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 MeditformBase
*/
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 MeditformBase
*/
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:"IBIZBOOK",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 MeditformBase
*/
public onEnter($event: any): void {
}
/**
* 保存并退出
*
* @param {any[]} args
* @memberof MeditformBase
*/
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 MeditformBase
*/
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 MeditformBase
*/
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 MeditformBase
*/
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 MeditformBase
*/
public createDefault(){
}
/**
* 更新默认值
* @memberof MeditformBase
*/
public updateDefault(){
}
/**
* 面板数据变化处理事件
* @param {any} item 当前列数据
* @param {any} $event 面板事件数据
*
* @memberof MeditformBase
*/
public onPanelDataChange(item:any,$event:any) {
Object.assign(item, $event, {rowDataState:'update'});
}
}
</script>
<style lang='scss'>
@import './meditform-form.scss';
</style>
\ No newline at end of file
// 基于 @CONTROL/表单/MODEL.ts.ftl 生成
/**
* Meditform 部件模型
*
* @export
* @class MeditformModel
*/
export default class MeditformModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof MeditformModel
*/
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: 'ibizbookid',
dataType: 'GUID',
},
{
name: 'srfmajortext',
prop: 'ibizbookname',
dataType: 'TEXT',
},
{
name: 'srftempmode',
},
{
name: 'srfuf',
},
{
name: 'srfdeid',
},
{
name: 'srfsourcekey',
},
{
name: 'ibizbookname',
prop: 'ibizbookname',
dataType: 'TEXT',
},
{
name: 'author',
prop: 'author',
dataType: 'TEXT',
},
{
name: 'booknumber',
prop: 'booknumber',
dataType: 'INT',
},
{
name: 'borrowway',
prop: 'borrowway',
dataType: 'SSCODELIST',
},
{
name: 'lendouttime',
prop: 'lendouttime',
dataType: 'DATE',
},
{
name: 'returntime',
prop: 'returntime',
dataType: 'DATE',
},
{
name: 'ibizbookid',
prop: 'ibizbookid',
dataType: 'GUID',
},
{
name: 'ibizbook',
prop: 'ibizbookid',
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 IBIZBOOKService from '@/service/ibizbook/ibizbook-service';
import MeditformModel from './meditform-form-model';
/**
* Meditform 部件服务对象
*
* @export
* @class MeditformService
*/
export default class MeditformService extends ControlService {
/**
* 图书服务对象
*
* @type {IBIZBOOKService}
* @memberof MeditformService
*/
public appEntityService: IBIZBOOKService = new IBIZBOOKService();
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof MeditformService
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of MeditformService.
*
* @param {*} [opts={}]
* @memberof MeditformService
*/
constructor(opts: any = {}) {
super(opts);
this.model = new MeditformModel();
}
/**
* 远端数据
*
* @type {*}
* @memberof MeditformService
*/
private remoteCopyData:any = {};
/**
* 处理数据
*
* @private
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof MeditformService
*/
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 MeditformService
*/
@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 MeditformService
*/
@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 MeditformService
*/
@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 MeditformService
*/
@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 MeditformService
*/
@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 MeditformService
*/
@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 MeditformService
*/
@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 MeditformService
*/
@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.ibizbookid = PrimaryKey;
Data.ibizbook = 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.ibizbookid = 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 MeditformService
*/
@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 MeditformService
*/
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 MeditformService
*/
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 MeditformService
*/
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 MeditformService
*/
public setRemoteCopyData(result:any){
if (result && result.status === 200) {
this.remoteCopyData = Util.deepCopy(result.data);
}
}
/**
* 获取远端数据
*
* @memberof MeditformService
*/
public getRemoteCopyData(){
return this.remoteCopyData;
}
}
\ No newline at end of file
// 基于 @CONTROL/表单/CONTROL.scss.ftl 生成
.ivu-tabs-no-animation>.ivu-tabs-content{
padding: 0 16px;
}
.ivu-card-head{
padding: 14px 0;
}
.app-form {
overflow: auto;
> .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: 10px;
}
// 表单按钮margin
.app-form-button{
margin:0 6px;
}
}
// this is scss
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import MeditformBase from './meditform-form-base.vue';
// 基于 @CONTROL/表单/CONTROL.vue.ftl 生成
@Component({
components: {
}
})
export default class Meditform extends MeditformBase {
}
</script>
\ No newline at end of file
......@@ -963,7 +963,7 @@ export default class MainBase extends Vue implements ControlInterface {
if (!this.fetchAction) {
this.$Notice.error({
title: this.$t("app.commonWords.wrong") as string,
desc: "IBIZOrderDetailSGridView9" + (this.$t("app.gridpage.notConfig.fetchAction") as string),
desc: "IBIZOrderDetailGridView9" + (this.$t("app.gridpage.notConfig.fetchAction") as string),
});
return;
}
......@@ -1103,7 +1103,7 @@ export default class MainBase extends Vue implements ControlInterface {
if (!this.removeAction) {
this.$Notice.error({
title: (this.$t('app.commonWords.wrong') as string),
desc: 'IBIZOrderDetailSGridView9' + (this.$t('app.gridpage.notConfig.removeAction') as string)
desc: 'IBIZOrderDetailGridView9' + (this.$t('app.gridpage.notConfig.removeAction') as string)
});
return;
}
......@@ -1217,7 +1217,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: 'IBIZOrderDetailSGridView9'+(this.$t('app.gridpage.notConfig.fetchAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderDetailGridView9'+(this.$t('app.gridpage.notConfig.fetchAction') as string) });
return;
}
if(!arg){
......@@ -2112,7 +2112,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: 'IBIZOrderDetailSGridView9'+(this.$t('app.gridpage.notConfig.createAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderDetailGridView9'+(this.$t('app.gridpage.notConfig.createAction') as string) });
} else {
Object.assign(item, { viewparams: this.viewparams });
const tempContext = Util.deepCopy(this.context);
......@@ -2121,7 +2121,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: 'IBIZOrderDetailSGridView9'+(this.$t('app.gridpage.notConfig.updateAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderDetailGridView9'+(this.$t('app.gridpage.notConfig.updateAction') as string) });
} else {
Object.assign(item, { viewparams: this.viewparams });
const tempContext = Util.deepCopy(this.context);
......@@ -2197,7 +2197,7 @@ export default class MainBase extends Vue implements ControlInterface {
if(!this.loaddraftAction){
this.$Notice.error({
title: (this.$t('app.commonWords.wrong') as string),
desc: 'IBIZOrderDetailSGridView9' + (this.$t('app.gridpage.notConfig.loaddraftAction') as string)
desc: 'IBIZOrderDetailGridView9' + (this.$t('app.gridpage.notConfig.loaddraftAction') as string)
});
return;
}
......
......@@ -5568,6 +5568,14 @@
"rTMOSFilePath" : "psmodeldata$psdataentities/InterFuncEditView_layout",
"realModelSubType" : "DEEDITVIEW",
"realModelType" : "PSDEVIEWBASE"
}, {
"codeName" : "EditView9",
"logicName" : "图书管理",
"mOSFilePath" : "psmodeldata$psdataentities/EditView9",
"name" : "图书管理",
"rTMOSFilePath" : "psmodeldata$psdataentities/EditView9",
"realModelSubType" : "DEEDITVIEW9",
"realModelType" : "PSDEVIEWBASE"
}, {
"codeName" : "Usr3ListView",
"logicName" : "图书实体列表视图(主状态)",
......@@ -5679,6 +5687,15 @@
"rTMOSFilePath" : "psmodeldata$psdataentities/guideViewForm",
"realModelSubType" : "EDITFORM",
"realModelType" : "PSDEFORM"
}, {
"codeName" : "meditform",
"logicName" : "多编辑表单",
"mOSFilePath" : "psmodeldata$psdataentities/meditform",
"modelTag2" : "0",
"name" : "多编辑表单",
"rTMOSFilePath" : "psmodeldata$psdataentities/meditform",
"realModelSubType" : "EDITFORM",
"realModelType" : "PSDEFORM"
}, {
"codeName" : "Main",
"logicName" : "主编辑表单",
......
......@@ -6464,6 +6464,10 @@
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDEVIEWS/IBIZBOOKInterFuncEditView.json",
"viewType" : "DEEDITVIEW"
}, {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDEVIEWS/IBIZBOOKEditView9.json",
"viewType" : "DEEDITVIEW9"
}, {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDEVIEWS/IBIZBOOKUsrEditView_plugin.json",
......
{
"codeName" : "Meditform",
"controlType" : "FORM",
"getCreatePSControlAction" : {
"modelref" : true,
"id" : "create"
},
"defaultLabelWidth" : 130,
"dynaModelFilePath" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZBOOK/PSFORMS/Meditform.json",
"getGetDraftFromPSControlAction" : {
"modelref" : true,
"id" : "loaddraftfrom"
},
"getGetDraftPSControlAction" : {
"modelref" : true,
"id" : "loaddraft"
},
"getGetPSControlAction" : {
"modelref" : true,
"id" : "load"
},
"hookEventNames" : [ "LOAD", "SAVE", "REMOVE" ],
"logicName" : "多编辑表单",
"mOSFilePath" : "psmodules/Sample/psdataentities/IBIZBOOK/psdeform_editforms/Meditform",
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZBOOK.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" : "IBIZBOOKID",
"codeName" : "IBIZBOOKId"
}
}, {
"id" : "srfmajortext",
"hidden" : true,
"dataType" : 25,
"getPSAppDEField" : {
"name" : "IBIZBOOKNAME",
"codeName" : "IBIZBOOKName"
}
}, {
"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" : "ibizbookname",
"dataType" : 25,
"getPSAppDEField" : {
"name" : "IBIZBOOKNAME",
"codeName" : "IBIZBOOKName"
}
}, {
"id" : "author",
"dataType" : 25,
"getPSAppDEField" : {
"name" : "AUTHOR",
"codeName" : "Author"
}
}, {
"id" : "booknumber",
"dataType" : 9,
"getPSAppDEField" : {
"name" : "BOOKNUMBER",
"codeName" : "Booknumber"
}
}, {
"id" : "borrowway",
"dataType" : 25,
"getPSAppDEField" : {
"name" : "BORROWWAY",
"codeName" : "Borrowway"
}
}, {
"id" : "lendouttime",
"dataType" : 5,
"getPSAppDEField" : {
"name" : "LENDOUTTIME",
"codeName" : "Lendouttime"
}
}, {
"id" : "returntime",
"dataType" : 5,
"getPSAppDEField" : {
"name" : "RETURNTIME",
"codeName" : "Returntime"
}
}, {
"id" : "ibizbookid",
"hidden" : true,
"dataType" : 25,
"getPSAppDEField" : {
"name" : "IBIZBOOKID",
"codeName" : "IBIZBOOKId"
}
} ],
"getPSDEFormPages" : [ {
"caption" : "基本信息",
"codeName" : "formpage1",
"detailStyle" : "DEFAULT",
"detailType" : "FORMPAGE",
"mOSFilePath" : "psdeformdetail_formpages/formpage1",
"name" : "formpage1",
"getPSDEFormDetails" : [ {
"getCapPSLanguageRes" : {
"lanResTag" : "DEF.LNAME.IBIZBOOKNAME",
"mOSFilePath" : "pslanguageres/Auto1983",
"rTMOSFilePath" : "pslanguageres/Auto1983"
},
"caption" : "图书名称",
"codeName" : "ibizbookname",
"dataType" : 25,
"detailStyle" : "DEFAULT",
"detailType" : "FORMITEM",
"enableCond" : 3,
"ignoreInput" : 0,
"labelPos" : "LEFT",
"labelWidth" : 130,
"mOSFilePath" : "psdeformdetail_formitems/ibizbookname",
"name" : "ibizbookname",
"noPrivDisplayMode" : 1,
"getPSAppDEField" : {
"name" : "IBIZBOOKNAME",
"codeName" : "IBIZBOOKName"
},
"getPSEditor" : {
"editorType" : "TEXTBOX",
"maxLength" : 200,
"name" : "ibizbookname"
},
"getPSLayoutPos" : {
"colLG" : 8,
"colMD" : 24,
"layout" : "TABLE_24COL"
},
"rTMOSFilePath" : "psdeformdetail_formitems/ibizbookname",
"allowEmpty" : false,
"showCaption" : true
}, {
"getCapPSLanguageRes" : {
"lanResTag" : "DEF.LNAME.AUTHOR",
"mOSFilePath" : "pslanguageres/Auto2038",
"rTMOSFilePath" : "pslanguageres/Auto2038"
},
"caption" : "图书作者",
"codeName" : "author",
"dataType" : 25,
"detailStyle" : "DEFAULT",
"detailType" : "FORMITEM",
"enableCond" : 3,
"ignoreInput" : 0,
"labelPos" : "LEFT",
"labelWidth" : 130,
"mOSFilePath" : "psdeformdetail_formitems/author",
"name" : "author",
"noPrivDisplayMode" : 1,
"getPSAppDEField" : {
"name" : "AUTHOR",
"codeName" : "Author"
},
"getPSEditor" : {
"editorType" : "TEXTBOX",
"maxLength" : 100,
"name" : "author"
},
"getPSLayoutPos" : {
"colLG" : 8,
"colMD" : 24,
"layout" : "TABLE_24COL"
},
"rTMOSFilePath" : "psdeformdetail_formitems/author",
"allowEmpty" : true,
"showCaption" : true
}, {
"getCapPSLanguageRes" : {
"lanResTag" : "DEF.LNAME.BOOKNUMBER",
"mOSFilePath" : "pslanguageres/Auto2067",
"rTMOSFilePath" : "pslanguageres/Auto2067"
},
"caption" : "图书数量",
"codeName" : "booknumber",
"dataType" : 9,
"detailStyle" : "DEFAULT",
"detailType" : "FORMITEM",
"enableCond" : 3,
"ignoreInput" : 0,
"labelPos" : "LEFT",
"labelWidth" : 130,
"mOSFilePath" : "psdeformdetail_formitems/booknumber",
"name" : "booknumber",
"noPrivDisplayMode" : 1,
"getPSAppDEField" : {
"name" : "BOOKNUMBER",
"codeName" : "Booknumber"
},
"getPSEditor" : {
"editorType" : "TEXTBOX",
"name" : "booknumber"
},
"getPSLayoutPos" : {
"colLG" : 8,
"colMD" : 24,
"layout" : "TABLE_24COL"
},
"rTMOSFilePath" : "psdeformdetail_formitems/booknumber",
"allowEmpty" : true,
"showCaption" : true
}, {
"getCapPSLanguageRes" : {
"lanResTag" : "DEF.LNAME.BORROWWAY",
"mOSFilePath" : "pslanguageres/Auto2100",
"rTMOSFilePath" : "pslanguageres/Auto2100"
},
"caption" : "借阅方式",
"codeName" : "borrowway",
"dataType" : 25,
"detailStyle" : "DEFAULT",
"detailType" : "FORMITEM",
"enableCond" : 3,
"ignoreInput" : 0,
"labelPos" : "LEFT",
"labelWidth" : 130,
"mOSFilePath" : "psdeformdetail_formitems/borrowway",
"name" : "borrowway",
"noPrivDisplayMode" : 1,
"getPSAppDEField" : {
"name" : "BORROWWAY",
"codeName" : "Borrowway"
},
"getPSEditor" : {
"editorType" : "DROPDOWNLIST",
"name" : "borrowway",
"getPSAppCodeList" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPCODELISTS/CodeList25.json"
},
"singleSelect" : true
},
"getPSLayoutPos" : {
"colLG" : 8,
"colMD" : 24,
"layout" : "TABLE_24COL"
},
"rTMOSFilePath" : "psdeformdetail_formitems/borrowway",
"allowEmpty" : true,
"needCodeListConfig" : true,
"showCaption" : true
}, {
"getCapPSLanguageRes" : {
"lanResTag" : "DEF.LNAME.LENDOUTTIME",
"mOSFilePath" : "pslanguageres/Auto2028",
"rTMOSFilePath" : "pslanguageres/Auto2028"
},
"caption" : "借出日期",
"codeName" : "lendouttime",
"dataType" : 5,
"detailStyle" : "DEFAULT",
"detailType" : "FORMITEM",
"enableCond" : 3,
"ignoreInput" : 0,
"itemWidth" : 230.0,
"labelPos" : "LEFT",
"labelWidth" : 130,
"mOSFilePath" : "psdeformdetail_formitems/lendouttime",
"name" : "lendouttime",
"noPrivDisplayMode" : 1,
"getPSAppDEField" : {
"name" : "LENDOUTTIME",
"codeName" : "Lendouttime"
},
"getPSEditor" : {
"dateTimeFormat" : "YYYY-MM-DD",
"editorParams" : {
"TIMEFMT" : "YYYY-MM-DD"
},
"editorType" : "DATEPICKEREX_NOTIME",
"editorWidth" : 100.0,
"name" : "lendouttime"
},
"getPSLayoutPos" : {
"colLG" : 8,
"colMD" : 24,
"layout" : "TABLE_24COL"
},
"rTMOSFilePath" : "psdeformdetail_formitems/lendouttime",
"valueFormat" : "YYYY-MM-DD",
"allowEmpty" : false,
"showCaption" : true
}, {
"getCapPSLanguageRes" : {
"lanResTag" : "DEF.LNAME.RETURNTIME",
"mOSFilePath" : "pslanguageres/Auto1979",
"rTMOSFilePath" : "pslanguageres/Auto1979"
},
"caption" : "归还日期",
"codeName" : "returntime",
"dataType" : 5,
"detailStyle" : "DEFAULT",
"detailType" : "FORMITEM",
"enableCond" : 3,
"ignoreInput" : 0,
"itemWidth" : 230.0,
"labelPos" : "LEFT",
"labelWidth" : 130,
"mOSFilePath" : "psdeformdetail_formitems/returntime",
"name" : "returntime",
"noPrivDisplayMode" : 1,
"getPSAppDEField" : {
"name" : "RETURNTIME",
"codeName" : "Returntime"
},
"getPSEditor" : {
"dateTimeFormat" : "YYYY-MM-DD",
"editorParams" : {
"TIMEFMT" : "YYYY-MM-DD"
},
"editorType" : "DATEPICKEREX_NOTIME",
"editorWidth" : 100.0,
"name" : "returntime"
},
"getPSLayoutPos" : {
"colLG" : 8,
"colMD" : 24,
"layout" : "TABLE_24COL"
},
"rTMOSFilePath" : "psdeformdetail_formitems/returntime",
"valueFormat" : "YYYY-MM-DD",
"allowEmpty" : false,
"showCaption" : true
} ],
"getPSLayout" : {
"childColLG" : 8,
"childColMD" : 24,
"childColSM" : -1,
"childColXS" : -1,
"columnCount" : 24,
"layout" : "TABLE_24COL"
},
"rTMOSFilePath" : "psdeformdetail_formpages/formpage1",
"infoGroupMode" : false
} ],
"getPSLayout" : {
"childColLG" : -1,
"childColMD" : 24,
"childColSM" : -1,
"childColXS" : -1,
"columnCount" : 24,
"layout" : "TABLE_24COL"
},
"rTMOSFilePath" : "pssysapps/Web/psappdeviews/IBIZBOOKEditView9/psappviewctrls/form",
"getRemovePSControlAction" : {
"modelref" : true,
"id" : "remove"
},
"tabHeaderPos" : "TOP",
"getUpdatePSControlAction" : {
"modelref" : true,
"id" : "update"
},
"noTabHeader" : true,
"modelid" : "662A1E03-A3EC-43F1-ABC5-135358F690A8",
"modeltype" : "PSDEFORM_EDITFORM"
}
\ No newline at end of file
{
"accUserMode" : 2,
"getCapPSLanguageRes" : {
"lanResTag" : "DE.LNAME.IBIZBOOK",
"mOSFilePath" : "pslanguageres/Auto395",
"rTMOSFilePath" : "pslanguageres/Auto395"
},
"caption" : "图书",
"codeName" : "IBIZBOOKEditView9",
"dynaModelFilePath" : "PSSYSAPPS/Web/PSAPPDEVIEWS/IBIZBOOKEditView9.json",
"mOSFilePath" : "pssysapps/Web/psappdeviews/IBIZBOOKEditView9",
"name" : "IBIZBOOKEditView9",
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZBOOK.json"
},
"getPSAppModule" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPMODULES/Sample.json"
},
"getPSAppViewEngines" : [ {
"engineCat" : "VIEW",
"engineType" : "EditView9",
"mOSFilePath" : "pssysapps/Web/psappdeviews/IBIZBOOKEditView9/psappviewengines/engine",
"name" : "engine",
"getPSUIEngineParams" : [ {
"ctrlName" : "form",
"name" : "FORM",
"paramType" : "CTRL"
}, {
"name" : "P2K",
"paramType" : "VALUE",
"value" : 0
} ]
} ],
"getPSControls" : [ {
"codeName" : "Meditform",
"controlType" : "FORM",
"getCreatePSControlAction" : {
"modelref" : true,
"id" : "create"
},
"defaultLabelWidth" : 130,
"dynaModelFilePath" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZBOOK/PSFORMS/Meditform.json",
"getGetDraftFromPSControlAction" : {
"modelref" : true,
"id" : "loaddraftfrom"
},
"getGetDraftPSControlAction" : {
"modelref" : true,
"id" : "loaddraft"
},
"getGetPSControlAction" : {
"modelref" : true,
"id" : "load"
},
"hookEventNames" : [ "LOAD", "SAVE", "REMOVE" ],
"logicName" : "多编辑表单",
"mOSFilePath" : "psmodules/Sample/psdataentities/IBIZBOOK/psdeform_editforms/Meditform",
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZBOOK.json"
},
"getPSControlHandler" : {
"getPSHandlerActions" : [ {
"actionName" : "GetDraft",
"actionType" : "DEACTION",
"dataAccessAction" : "CREATE",
"name" : "loaddraft",
"getPSAppDEMethod" : {
"modelref" : true,
"id" : "GetDraft"
},
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZBOOK.json"
}
}, {
"actionName" : "GETDRAFTFROM",
"actionType" : "DEACTION",
"dataAccessAction" : "CREATE",
"name" : "loaddraftfrom",
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZBOOK.json"
}
}, {
"actionName" : "Get",
"actionType" : "DEACTION",
"dataAccessAction" : "READ",
"name" : "load",
"getPSAppDEMethod" : {
"modelref" : true,
"id" : "Get"
},
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZBOOK.json"
}
}, {
"actionName" : "Create",
"actionType" : "DEACTION",
"dataAccessAction" : "CREATE",
"name" : "create",
"getPSAppDEMethod" : {
"modelref" : true,
"id" : "Create"
},
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZBOOK.json"
}
}, {
"actionName" : "Update",
"actionType" : "DEACTION",
"dataAccessAction" : "UPDATE",
"name" : "update",
"getPSAppDEMethod" : {
"modelref" : true,
"id" : "Update"
},
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZBOOK.json"
}
}, {
"actionName" : "Remove",
"actionType" : "DEACTION",
"dataAccessAction" : "DELETE",
"name" : "remove",
"getPSAppDEMethod" : {
"modelref" : true,
"id" : "Remove"
},
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZBOOK.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" : "IBIZBOOKID",
"codeName" : "IBIZBOOKId"
}
}, {
"id" : "srfmajortext",
"hidden" : true,
"dataType" : 25,
"getPSAppDEField" : {
"name" : "IBIZBOOKNAME",
"codeName" : "IBIZBOOKName"
}
}, {
"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" : "ibizbookname",
"dataType" : 25,
"getPSAppDEField" : {
"name" : "IBIZBOOKNAME",
"codeName" : "IBIZBOOKName"
}
}, {
"id" : "author",
"dataType" : 25,
"getPSAppDEField" : {
"name" : "AUTHOR",
"codeName" : "Author"
}
}, {
"id" : "booknumber",
"dataType" : 9,
"getPSAppDEField" : {
"name" : "BOOKNUMBER",
"codeName" : "Booknumber"
}
}, {
"id" : "borrowway",
"dataType" : 25,
"getPSAppDEField" : {
"name" : "BORROWWAY",
"codeName" : "Borrowway"
}
}, {
"id" : "lendouttime",
"dataType" : 5,
"getPSAppDEField" : {
"name" : "LENDOUTTIME",
"codeName" : "Lendouttime"
}
}, {
"id" : "returntime",
"dataType" : 5,
"getPSAppDEField" : {
"name" : "RETURNTIME",
"codeName" : "Returntime"
}
}, {
"id" : "ibizbookid",
"hidden" : true,
"dataType" : 25,
"getPSAppDEField" : {
"name" : "IBIZBOOKID",
"codeName" : "IBIZBOOKId"
}
} ],
"getPSDEFormPages" : [ {
"caption" : "基本信息",
"codeName" : "formpage1",
"detailStyle" : "DEFAULT",
"detailType" : "FORMPAGE",
"mOSFilePath" : "psdeformdetail_formpages/formpage1",
"name" : "formpage1",
"getPSDEFormDetails" : [ {
"getCapPSLanguageRes" : {
"lanResTag" : "DEF.LNAME.IBIZBOOKNAME",
"mOSFilePath" : "pslanguageres/Auto1983",
"rTMOSFilePath" : "pslanguageres/Auto1983"
},
"caption" : "图书名称",
"codeName" : "ibizbookname",
"dataType" : 25,
"detailStyle" : "DEFAULT",
"detailType" : "FORMITEM",
"enableCond" : 3,
"ignoreInput" : 0,
"labelPos" : "LEFT",
"labelWidth" : 130,
"mOSFilePath" : "psdeformdetail_formitems/ibizbookname",
"name" : "ibizbookname",
"noPrivDisplayMode" : 1,
"getPSAppDEField" : {
"name" : "IBIZBOOKNAME",
"codeName" : "IBIZBOOKName"
},
"getPSEditor" : {
"editorType" : "TEXTBOX",
"maxLength" : 200,
"name" : "ibizbookname"
},
"getPSLayoutPos" : {
"colLG" : 8,
"colMD" : 24,
"layout" : "TABLE_24COL"
},
"rTMOSFilePath" : "psdeformdetail_formitems/ibizbookname",
"allowEmpty" : false,
"showCaption" : true
}, {
"getCapPSLanguageRes" : {
"lanResTag" : "DEF.LNAME.AUTHOR",
"mOSFilePath" : "pslanguageres/Auto2038",
"rTMOSFilePath" : "pslanguageres/Auto2038"
},
"caption" : "图书作者",
"codeName" : "author",
"dataType" : 25,
"detailStyle" : "DEFAULT",
"detailType" : "FORMITEM",
"enableCond" : 3,
"ignoreInput" : 0,
"labelPos" : "LEFT",
"labelWidth" : 130,
"mOSFilePath" : "psdeformdetail_formitems/author",
"name" : "author",
"noPrivDisplayMode" : 1,
"getPSAppDEField" : {
"name" : "AUTHOR",
"codeName" : "Author"
},
"getPSEditor" : {
"editorType" : "TEXTBOX",
"maxLength" : 100,
"name" : "author"
},
"getPSLayoutPos" : {
"colLG" : 8,
"colMD" : 24,
"layout" : "TABLE_24COL"
},
"rTMOSFilePath" : "psdeformdetail_formitems/author",
"allowEmpty" : true,
"showCaption" : true
}, {
"getCapPSLanguageRes" : {
"lanResTag" : "DEF.LNAME.BOOKNUMBER",
"mOSFilePath" : "pslanguageres/Auto2067",
"rTMOSFilePath" : "pslanguageres/Auto2067"
},
"caption" : "图书数量",
"codeName" : "booknumber",
"dataType" : 9,
"detailStyle" : "DEFAULT",
"detailType" : "FORMITEM",
"enableCond" : 3,
"ignoreInput" : 0,
"labelPos" : "LEFT",
"labelWidth" : 130,
"mOSFilePath" : "psdeformdetail_formitems/booknumber",
"name" : "booknumber",
"noPrivDisplayMode" : 1,
"getPSAppDEField" : {
"name" : "BOOKNUMBER",
"codeName" : "Booknumber"
},
"getPSEditor" : {
"editorType" : "TEXTBOX",
"name" : "booknumber"
},
"getPSLayoutPos" : {
"colLG" : 8,
"colMD" : 24,
"layout" : "TABLE_24COL"
},
"rTMOSFilePath" : "psdeformdetail_formitems/booknumber",
"allowEmpty" : true,
"showCaption" : true
}, {
"getCapPSLanguageRes" : {
"lanResTag" : "DEF.LNAME.BORROWWAY",
"mOSFilePath" : "pslanguageres/Auto2100",
"rTMOSFilePath" : "pslanguageres/Auto2100"
},
"caption" : "借阅方式",
"codeName" : "borrowway",
"dataType" : 25,
"detailStyle" : "DEFAULT",
"detailType" : "FORMITEM",
"enableCond" : 3,
"ignoreInput" : 0,
"labelPos" : "LEFT",
"labelWidth" : 130,
"mOSFilePath" : "psdeformdetail_formitems/borrowway",
"name" : "borrowway",
"noPrivDisplayMode" : 1,
"getPSAppDEField" : {
"name" : "BORROWWAY",
"codeName" : "Borrowway"
},
"getPSEditor" : {
"editorType" : "DROPDOWNLIST",
"name" : "borrowway",
"getPSAppCodeList" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPCODELISTS/CodeList25.json"
},
"singleSelect" : true
},
"getPSLayoutPos" : {
"colLG" : 8,
"colMD" : 24,
"layout" : "TABLE_24COL"
},
"rTMOSFilePath" : "psdeformdetail_formitems/borrowway",
"allowEmpty" : true,
"needCodeListConfig" : true,
"showCaption" : true
}, {
"getCapPSLanguageRes" : {
"lanResTag" : "DEF.LNAME.LENDOUTTIME",
"mOSFilePath" : "pslanguageres/Auto2028",
"rTMOSFilePath" : "pslanguageres/Auto2028"
},
"caption" : "借出日期",
"codeName" : "lendouttime",
"dataType" : 5,
"detailStyle" : "DEFAULT",
"detailType" : "FORMITEM",
"enableCond" : 3,
"ignoreInput" : 0,
"itemWidth" : 230.0,
"labelPos" : "LEFT",
"labelWidth" : 130,
"mOSFilePath" : "psdeformdetail_formitems/lendouttime",
"name" : "lendouttime",
"noPrivDisplayMode" : 1,
"getPSAppDEField" : {
"name" : "LENDOUTTIME",
"codeName" : "Lendouttime"
},
"getPSEditor" : {
"dateTimeFormat" : "YYYY-MM-DD",
"editorParams" : {
"TIMEFMT" : "YYYY-MM-DD"
},
"editorType" : "DATEPICKEREX_NOTIME",
"editorWidth" : 100.0,
"name" : "lendouttime"
},
"getPSLayoutPos" : {
"colLG" : 8,
"colMD" : 24,
"layout" : "TABLE_24COL"
},
"rTMOSFilePath" : "psdeformdetail_formitems/lendouttime",
"valueFormat" : "YYYY-MM-DD",
"allowEmpty" : false,
"showCaption" : true
}, {
"getCapPSLanguageRes" : {
"lanResTag" : "DEF.LNAME.RETURNTIME",
"mOSFilePath" : "pslanguageres/Auto1979",
"rTMOSFilePath" : "pslanguageres/Auto1979"
},
"caption" : "归还日期",
"codeName" : "returntime",
"dataType" : 5,
"detailStyle" : "DEFAULT",
"detailType" : "FORMITEM",
"enableCond" : 3,
"ignoreInput" : 0,
"itemWidth" : 230.0,
"labelPos" : "LEFT",
"labelWidth" : 130,
"mOSFilePath" : "psdeformdetail_formitems/returntime",
"name" : "returntime",
"noPrivDisplayMode" : 1,
"getPSAppDEField" : {
"name" : "RETURNTIME",
"codeName" : "Returntime"
},
"getPSEditor" : {
"dateTimeFormat" : "YYYY-MM-DD",
"editorParams" : {
"TIMEFMT" : "YYYY-MM-DD"
},
"editorType" : "DATEPICKEREX_NOTIME",
"editorWidth" : 100.0,
"name" : "returntime"
},
"getPSLayoutPos" : {
"colLG" : 8,
"colMD" : 24,
"layout" : "TABLE_24COL"
},
"rTMOSFilePath" : "psdeformdetail_formitems/returntime",
"valueFormat" : "YYYY-MM-DD",
"allowEmpty" : false,
"showCaption" : true
} ],
"getPSLayout" : {
"childColLG" : 8,
"childColMD" : 24,
"childColSM" : -1,
"childColXS" : -1,
"columnCount" : 24,
"layout" : "TABLE_24COL"
},
"rTMOSFilePath" : "psdeformdetail_formpages/formpage1",
"infoGroupMode" : false
} ],
"getPSLayout" : {
"childColLG" : -1,
"childColMD" : 24,
"childColSM" : -1,
"childColXS" : -1,
"columnCount" : 24,
"layout" : "TABLE_24COL"
},
"rTMOSFilePath" : "pssysapps/Web/psappdeviews/IBIZBOOKEditView9/psappviewctrls/form",
"getRemovePSControlAction" : {
"modelref" : true,
"id" : "remove"
},
"tabHeaderPos" : "TOP",
"getUpdatePSControlAction" : {
"modelref" : true,
"id" : "update"
},
"noTabHeader" : true,
"name" : "form",
"modelid" : "662A1E03-A3EC-43F1-ABC5-135358F690A8",
"modeltype" : "PSDEFORM_EDITFORM"
} ],
"getPSDEViewCodeName" : "EditView9",
"getPSDEViewId" : "EBC6B451-2EAD-4070-B67E-BF0750C79E69",
"getPSViewLayoutPanel" : {
"codeName" : "Layoutpanel",
"controlStyle" : "APPDEEDITVIEW9",
"controlType" : "VIEWLAYOUTPANEL",
"mOSFilePath" : "psmodules/Sample/psdataentities/IBIZBOOK/pssysviewlayoutpanels/Layoutpanel",
"name" : "layoutpanel",
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZBOOK.json"
},
"getPSControlParam" : { },
"rTMOSFilePath" : "pssysapps/Web/psappdeviews/IBIZBOOKEditView9/psappviewctrls/layoutpanel",
"layoutBodyOnly" : true,
"layoutPanel" : true,
"useDefaultLayout" : true
},
"rTMOSFilePath" : "pssysapps/Web/psappdeviews/IBIZBOOKEditView9",
"title" : "图书管理",
"viewStyle" : "DEFAULT",
"viewType" : "DEEDITVIEW9",
"xDataControlName" : "form",
"enableDP" : true,
"showDataInfoBar" : false,
"modelid" : "3e2f62b8585df5ca82caff3830826b39",
"modeltype" : "PSAPPDEVIEW"
}
\ No newline at end of file
......@@ -54,8 +54,8 @@
"dynaModelFilePath" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/IBIZBOOK/PSMULTIEDITVIEWPANELS/Main.json",
"getEmbeddedPSAppView" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDEVIEWS/IBIZBOOKInterFuncEditView.json",
"viewType" : "DEEDITVIEW"
"path" : "PSSYSAPPS/Web/PSAPPDEVIEWS/IBIZBOOKEditView9.json",
"viewType" : "DEEDITVIEW9"
},
"getFetchPSControlAction" : {
"modelref" : true,
......
......@@ -16455,6 +16455,12 @@
"path" : "PSSYSAPPS/Web/PSAPPPORTALVIEWS/AppPortalView2.json",
"viewType" : "APPPORTALVIEW",
"view" : "AppPortalView2"
}, {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDEVIEWS/IBIZBOOKEditView9.json",
"viewType" : "DEEDITVIEW9",
"resource" : "IBIZBOOK",
"view" : "EditView9"
}, {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDEVIEWS/IBIZBOOKUsrEditView_plugin.json",
......@@ -36030,6 +36036,10 @@
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDEVIEWS/IBIZBOOKInterFuncEditView.json",
"viewType" : "DEEDITVIEW"
}, {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDEVIEWS/IBIZBOOKEditView9.json",
"viewType" : "DEEDITVIEW9"
}, {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDEVIEWS/IBIZBOOKUsrEditView_plugin.json",
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册