提交 8214c908 编写于 作者: ibizdev's avatar ibizdev

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

上级 1cd8f32b
...@@ -48,12 +48,16 @@ export default { ...@@ -48,12 +48,16 @@ export default {
srfuf: "", srfuf: "",
srfdeid: "", srfdeid: "",
srfsourcekey: "", srfsourcekey: "",
ibizbookid: "图书标识",
ibizbookname: "图书名称", ibizbookname: "图书名称",
author: "图书作者",
press: "图书出版社",
price: "图书价格",
type: "图书类型",
createman: "建立人", createman: "建立人",
createdate: "建立时间", createdate: "建立时间",
updateman: "更新人", updateman: "更新人",
updatedate: "更新时间", updatedate: "更新时间",
ibizbookid: "图书标识",
}, },
uiactions: { uiactions: {
}, },
......
...@@ -47,12 +47,16 @@ export default { ...@@ -47,12 +47,16 @@ export default {
srfuf: "", srfuf: "",
srfdeid: "", srfdeid: "",
srfsourcekey: "", srfsourcekey: "",
ibizbookid: "图书标识",
ibizbookname: "图书名称", ibizbookname: "图书名称",
author: "图书作者",
press: "图书出版社",
price: "图书价格",
type: "图书类型",
createman: "建立人", createman: "建立人",
createdate: "建立时间", createdate: "建立时间",
updateman: "更新人", updateman: "更新人",
updatedate: "更新时间", updatedate: "更新时间",
ibizbookid: "图书标识",
}, },
uiactions: { uiactions: {
}, },
......
...@@ -15,7 +15,17 @@ ...@@ -15,7 +15,17 @@
<i-col v-show="detailsModel.group1.visible" :style="{}" :lg="{ span: 24, offset: 0 }"> <i-col v-show="detailsModel.group1.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group :uiService="appUIService" :data="transformData(data)" :manageContainerStatus="detailsModel.group1.manageContainerStatus" :isManageContainer="detailsModel.group1.isManageContainer" @managecontainerclick="manageContainerClick('group1')" layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.group1.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.ibizbook.main_form.details.group1')" :isShowCaption="true" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" > <app-form-group :uiService="appUIService" :data="transformData(data)" :manageContainerStatus="detailsModel.group1.manageContainerStatus" :isManageContainer="detailsModel.group1.isManageContainer" @managecontainerclick="manageContainerClick('group1')" layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.group1.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.ibizbook.main_form.details.group1')" :isShowCaption="true" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" >
<row> <row>
<i-col v-show="detailsModel.ibizbookname.visible" :style="{}" :lg="{ span: 24, offset: 0 }"> <i-col v-show="detailsModel.ibizbookid.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='ibizbookid' :itemRules="this.rules().ibizbookid" class='' :caption="$t('entities.ibizbook.main_form.details.ibizbookid')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.ibizbookid.error" :isEmptyCaption="false" labelPos="LEFT">
<app-span name='ibizbookid' :value="data.ibizbookid" dataType="GUID" :precision="0"
:data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style="">
</app-span>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.ibizbookname.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='ibizbookname' :itemRules="this.rules().ibizbookname" class='' :caption="$t('entities.ibizbook.main_form.details.ibizbookname')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.ibizbookname.error" :isEmptyCaption="false" labelPos="LEFT"> <app-form-item name='ibizbookname' :itemRules="this.rules().ibizbookname" class='' :caption="$t('entities.ibizbook.main_form.details.ibizbookname')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.ibizbookname.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box <input-box
v-model="data.ibizbookname" v-model="data.ibizbookname"
...@@ -28,6 +38,63 @@ ...@@ -28,6 +38,63 @@
</app-form-item> </app-form-item>
</i-col>
<i-col v-show="detailsModel.author.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='author' :itemRules="this.rules().author" class='' :caption="$t('entities.ibizbook.main_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.press.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='press' :itemRules="this.rules().press" class='' :caption="$t('entities.ibizbook.main_form.details.press')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.press.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box
v-model="data.press"
@enter="onEnter($event)"
unit=""
:disabled="detailsModel.press.disabled"
type='text'
style="">
</input-box>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.price.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='price' :itemRules="this.rules().price" class='' :caption="$t('entities.ibizbook.main_form.details.price')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.price.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box
v-model="data.price"
@enter="onEnter($event)"
:disabled="detailsModel.price.disabled"
type='number'
style="">
</input-box>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.type.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='type' :itemRules="this.rules().type" class='' :caption="$t('entities.ibizbook.main_form.details.type')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.type.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box
v-model="data.type"
@enter="onEnter($event)"
unit=""
:disabled="detailsModel.type.disabled"
type='text'
style="">
</input-box>
</app-form-item>
</i-col> </i-col>
</row> </row>
...@@ -262,7 +329,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -262,7 +329,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @type {string} * @type {string}
* @memberof MainBase * @memberof MainBase
*/ */
public formKeyItemName: string = ''; public formKeyItemName: string = 'ibizbookid';
/** /**
* 界面UI服务对象 * 界面UI服务对象
...@@ -482,12 +549,16 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -482,12 +549,16 @@ export default class MainBase extends Vue implements ControlInterface {
srfuf: null, srfuf: null,
srfdeid: null, srfdeid: null,
srfsourcekey: null, srfsourcekey: null,
ibizbookid: null,
ibizbookname: null, ibizbookname: null,
author: null,
press: null,
price: null,
type: null,
createman: null, createman: null,
createdate: null, createdate: null,
updateman: null, updateman: null,
updatedate: null, updatedate: null,
ibizbookid: null,
ibizbook:null, ibizbook:null,
}; };
...@@ -539,10 +610,30 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -539,10 +610,30 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
public rules() :any { public rules() :any {
return { return {
ibizbookid: [
{ required: this.detailsModel.ibizbookid.required, type: 'string', message: '图书标识 值不能为空', trigger: 'change' },
{ required: this.detailsModel.ibizbookid.required, type: 'string', message: '图书标识 值不能为空', trigger: 'blur' },
],
ibizbookname: [ ibizbookname: [
{ required: this.detailsModel.ibizbookname.required, type: 'string', message: '图书名称 值不能为空', trigger: 'change' }, { required: this.detailsModel.ibizbookname.required, type: 'string', message: '图书名称 值不能为空', trigger: 'change' },
{ required: this.detailsModel.ibizbookname.required, type: 'string', message: '图书名称 值不能为空', trigger: 'blur' }, { 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' },
],
press: [
{ required: this.detailsModel.press.required, type: 'string', message: '图书出版社 值不能为空', trigger: 'change' },
{ required: this.detailsModel.press.required, type: 'string', message: '图书出版社 值不能为空', trigger: 'blur' },
],
price: [
{ required: this.detailsModel.price.required, type: 'string', message: '图书价格 值不能为空', trigger: 'change' },
{ required: this.detailsModel.price.required, type: 'string', message: '图书价格 值不能为空', trigger: 'blur' },
],
type: [
{ required: this.detailsModel.type.required, type: 'string', message: '图书类型 值不能为空', trigger: 'change' },
{ required: this.detailsModel.type.required, type: 'string', message: '图书类型 值不能为空', trigger: 'blur' },
],
createman: [ createman: [
{ required: this.detailsModel.createman.required, type: 'string', message: '建立人 值不能为空', trigger: 'change' }, { required: this.detailsModel.createman.required, type: 'string', message: '建立人 值不能为空', trigger: 'change' },
{ required: this.detailsModel.createman.required, type: 'string', message: '建立人 值不能为空', trigger: 'blur' }, { required: this.detailsModel.createman.required, type: 'string', message: '建立人 值不能为空', trigger: 'blur' },
...@@ -681,8 +772,18 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -681,8 +772,18 @@ export default class MainBase extends Vue implements ControlInterface {
srfdeid: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfdeid', 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 }) srfsourcekey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfsourcekey', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, 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 })
, ,
ibizbookname: new FormItemModel({ caption: '图书名称', detailType: 'FORMITEM', name: 'ibizbookname', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:true, 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 })
,
press: new FormItemModel({ caption: '图书出版社', detailType: 'FORMITEM', name: 'press', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
price: new FormItemModel({ caption: '图书价格', detailType: 'FORMITEM', name: 'price', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
type: new FormItemModel({ caption: '图书类型', detailType: 'FORMITEM', name: 'type', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
, ,
createman: new FormItemModel({ caption: '建立人', detailType: 'FORMITEM', name: 'createman', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 }) createman: new FormItemModel({ caption: '建立人', detailType: 'FORMITEM', name: 'createman', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
, ,
...@@ -691,8 +792,6 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -691,8 +792,6 @@ export default class MainBase extends Vue implements ControlInterface {
updateman: new FormItemModel({ caption: '更新人', detailType: 'FORMITEM', name: 'updateman', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 }) updateman: new FormItemModel({ caption: '更新人', detailType: 'FORMITEM', name: 'updateman', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
, ,
updatedate: new FormItemModel({ caption: '更新时间', detailType: 'FORMITEM', name: 'updatedate', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 }) updatedate: new FormItemModel({ caption: '更新时间', detailType: 'FORMITEM', name: 'updatedate', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, 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 })
, ,
form: new FormTabPanelModel({ caption: 'form', detailType: 'TABPANEL', name: 'form', visible: true, isShowCaption: true, form: this, tabPages: [{ name: 'formpage1', index: 0, visible: true }, { name: 'formpage2', index: 1, visible: true }] }), form: new FormTabPanelModel({ caption: 'form', detailType: 'TABPANEL', name: 'form', visible: true, isShowCaption: true, form: this, tabPages: [{ name: 'formpage1', index: 0, visible: true }, { name: 'formpage2', index: 1, visible: true }] }),
}; };
...@@ -793,6 +892,18 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -793,6 +892,18 @@ export default class MainBase extends Vue implements ControlInterface {
this.formDataChange({ name: 'srfsourcekey', newVal: newVal, oldVal: oldVal }); this.formDataChange({ name: 'srfsourcekey', newVal: newVal, oldVal: oldVal });
} }
/**
* 监控表单属性 ibizbookid 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof MainBase
*/
@Watch('data.ibizbookid')
onIbizbookidChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'ibizbookid', newVal: newVal, oldVal: oldVal });
}
/** /**
* 监控表单属性 ibizbookname 值 * 监控表单属性 ibizbookname 值
* *
...@@ -805,6 +916,54 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -805,6 +916,54 @@ export default class MainBase extends Vue implements ControlInterface {
this.formDataChange({ name: 'ibizbookname', newVal: newVal, oldVal: oldVal }); this.formDataChange({ name: 'ibizbookname', newVal: newVal, oldVal: oldVal });
} }
/**
* 监控表单属性 author 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof MainBase
*/
@Watch('data.author')
onAuthorChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'author', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 press 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof MainBase
*/
@Watch('data.press')
onPressChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'press', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 price 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof MainBase
*/
@Watch('data.price')
onPriceChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'price', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 type 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof MainBase
*/
@Watch('data.type')
onTypeChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'type', newVal: newVal, oldVal: oldVal });
}
/** /**
* 监控表单属性 createman 值 * 监控表单属性 createman 值
* *
...@@ -853,18 +1012,6 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -853,18 +1012,6 @@ export default class MainBase extends Vue implements ControlInterface {
this.formDataChange({ name: 'updatedate', newVal: newVal, oldVal: oldVal }); this.formDataChange({ name: 'updatedate', newVal: newVal, oldVal: oldVal });
} }
/**
* 监控表单属性 ibizbookid 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof MainBase
*/
@Watch('data.ibizbookid')
onIbizbookidChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'ibizbookid', newVal: newVal, oldVal: oldVal });
}
/** /**
* 显示更多模式切换操作 * 显示更多模式切换操作
...@@ -934,6 +1081,10 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -934,6 +1081,10 @@ export default class MainBase extends Vue implements ControlInterface {
...@@ -1395,6 +1546,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1395,6 +1546,7 @@ export default class MainBase extends Vue implements ControlInterface {
const data = response.data; const data = response.data;
this.resetDraftFormStates(); this.resetDraftFormStates();
this.onFormLoad(data,'loadDraft'); this.onFormLoad(data,'loadDraft');
this.data.ibizbookid = null;
data.ibizbook = null; data.ibizbook = null;
this.$emit('load', data); this.$emit('load', data);
this.$nextTick(() => { this.$nextTick(() => {
......
...@@ -55,11 +55,36 @@ export default class MainModel { ...@@ -55,11 +55,36 @@ export default class MainModel {
{ {
name: 'srfsourcekey', name: 'srfsourcekey',
}, },
{
name: 'ibizbookid',
prop: 'ibizbookid',
dataType: 'GUID',
},
{ {
name: 'ibizbookname', name: 'ibizbookname',
prop: 'ibizbookname', prop: 'ibizbookname',
dataType: 'TEXT', dataType: 'TEXT',
}, },
{
name: 'author',
prop: 'author',
dataType: 'TEXT',
},
{
name: 'press',
prop: 'press',
dataType: 'TEXT',
},
{
name: 'price',
prop: 'price',
dataType: 'CURRENCY',
},
{
name: 'type',
prop: 'type',
dataType: 'TEXT',
},
{ {
name: 'createman', name: 'createman',
prop: 'createman', prop: 'createman',
...@@ -80,11 +105,6 @@ export default class MainModel { ...@@ -80,11 +105,6 @@ export default class MainModel {
prop: 'updatedate', prop: 'updatedate',
dataType: 'DATETIME', dataType: 'DATETIME',
}, },
{
name: 'ibizbookid',
prop: 'ibizbookid',
dataType: 'GUID',
},
{ {
name: 'ibizbook', name: 'ibizbook',
prop: 'ibizbookid', prop: 'ibizbookid',
......
...@@ -172,6 +172,7 @@ export default class MainService extends ControlService { ...@@ -172,6 +172,7 @@ export default class MainService extends ControlService {
@Errorlog @Errorlog
public add(action: string, context: any = {},data: any = {}, isloading?: boolean,isWorkflow?:boolean): Promise<any> { public add(action: string, context: any = {},data: any = {}, isloading?: boolean,isWorkflow?:boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data); const {data:Data,context:Context} = this.handleRequestData(action,context,data);
Object.assign(Data,{ibizbookid: data.ibizbookid, srffrontuf: '1'});
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
let result: Promise<any>; let result: Promise<any>;
const _appEntityService: any = this.appEntityService; const _appEntityService: any = this.appEntityService;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册