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

xignzi006 发布系统代码

上级 081f356c
......@@ -741,6 +741,16 @@
"codename":"Campaignresponse",
"value": "CAMPAIGNRESPONSE",
"disabled": false
}
, {
"id": "CAMPAIGNACTIVITY",
"label": "市场活动项目",
"text": "市场活动项目",
"data":"",
"codename":"Campaignactivity",
"value": "CAMPAIGNACTIVITY",
"disabled": false
}
]
......
......@@ -90,6 +90,7 @@ export default {
'FAX': "传真",
'SERVICEAPPOINTMENT': "服务活动",
'CAMPAIGNRESPONSE': "市场活动响应",
'CAMPAIGNACTIVITY': "市场活动项目",
empty: "",
},
Account__AccountClassificationCode: {
......
......@@ -90,6 +90,7 @@ export default {
'FAX': "传真",
'SERVICEAPPOINTMENT': "服务活动",
'CAMPAIGNRESPONSE': "市场活动响应",
'CAMPAIGNACTIVITY': "市场活动项目",
empty: "",
},
Account__AccountClassificationCode: {
......
......@@ -93,10 +93,12 @@ export default {
title: '市场活动项目表格视图',
},
},
quickcreate_form: {
main_form: {
details: {
group1: "campaignactivity基本信息",
formpage1: "基本信息",
group2: "操作信息",
formpage2: "其它",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "市场活动项目",
......@@ -106,27 +108,19 @@ export default {
srfdeid: "",
srfsourcekey: "",
subject: "主题",
category: "类别",
channeltypecode: "渠道",
description: "说明",
scheduledstart: "计划开始时间",
scheduledend: "计划结束时间",
actualstart: "实际开始时间",
actualend: "实际结束时间",
budgetedcost: "预算分配",
actualcost: "实际成本",
regardingobjectid: "关于",
createman: "建立人",
createdate: "建立时间",
updateman: "更新人",
updatedate: "更新时间",
activityid: "市场活动项目",
},
uiactions: {
},
},
main_form: {
quickcreate_form: {
details: {
group1: "campaignactivity基本信息",
formpage1: "基本信息",
group2: "操作信息",
formpage2: "其它",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "市场活动项目",
......@@ -136,10 +130,16 @@ export default {
srfdeid: "",
srfsourcekey: "",
subject: "主题",
createman: "建立人",
createdate: "建立时间",
updateman: "更新人",
updatedate: "更新时间",
category: "类别",
channeltypecode: "渠道",
description: "说明",
scheduledstart: "计划开始时间",
scheduledend: "计划结束时间",
actualstart: "实际开始时间",
actualend: "实际结束时间",
budgetedcost: "预算分配",
actualcost: "实际成本",
regardingobjectid: "关于",
activityid: "市场活动项目",
},
uiactions: {
......@@ -161,44 +161,6 @@ export default {
uiactions: {
},
},
byparentkeytoolbar_toolbar: {
tbitem3: {
caption: "New",
tip: "New",
},
tbitem4: {
caption: "Edit",
tip: "Edit {0}",
},
tbitem6: {
caption: "Copy",
tip: "Copy {0}",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "Remove",
tip: "Remove {0}",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "Export",
tip: "Export {0} Data To Excel",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "Filter",
tip: "Filter",
},
},
editviewtoolbar_toolbar: {
tbitem3: {
caption: "Save",
......@@ -237,6 +199,44 @@ export default {
tip: "Copy {0}",
},
},
byparentkeytoolbar_toolbar: {
tbitem3: {
caption: "New",
tip: "New",
},
tbitem4: {
caption: "Edit",
tip: "Edit {0}",
},
tbitem6: {
caption: "Copy",
tip: "Copy {0}",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "Remove",
tip: "Remove {0}",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "Export",
tip: "Export {0} Data To Excel",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "Filter",
tip: "Filter",
},
},
gridviewtoolbar_toolbar: {
tbitem3: {
caption: "New",
......
......@@ -92,10 +92,12 @@ export default {
title: '市场活动项目表格视图',
},
},
quickcreate_form: {
main_form: {
details: {
group1: 'campaignactivity基本信息',
formpage1: '基本信息',
group2: '操作信息',
formpage2: '其它',
srfupdatedate: '更新时间',
srforikey: '',
srfkey: '市场活动项目',
......@@ -105,27 +107,19 @@ export default {
srfdeid: '',
srfsourcekey: '',
subject: '主题',
category: '类别',
channeltypecode: '渠道',
description: '说明',
scheduledstart: '计划开始时间',
scheduledend: '计划结束时间',
actualstart: '实际开始时间',
actualend: '实际结束时间',
budgetedcost: '预算分配',
actualcost: '实际成本',
regardingobjectid: '关于',
createman: '建立人',
createdate: '建立时间',
updateman: '更新人',
updatedate: '更新时间',
activityid: '市场活动项目',
},
uiactions: {
},
},
main_form: {
quickcreate_form: {
details: {
group1: 'campaignactivity基本信息',
formpage1: '基本信息',
group2: '操作信息',
formpage2: '其它',
srfupdatedate: '更新时间',
srforikey: '',
srfkey: '市场活动项目',
......@@ -135,10 +129,16 @@ export default {
srfdeid: '',
srfsourcekey: '',
subject: '主题',
createman: '建立人',
createdate: '建立时间',
updateman: '更新人',
updatedate: '更新时间',
category: '类别',
channeltypecode: '渠道',
description: '说明',
scheduledstart: '计划开始时间',
scheduledend: '计划结束时间',
actualstart: '实际开始时间',
actualend: '实际结束时间',
budgetedcost: '预算分配',
actualcost: '实际成本',
regardingobjectid: '关于',
activityid: '市场活动项目',
},
uiactions: {
......@@ -160,44 +160,6 @@ export default {
uiactions: {
},
},
byparentkeytoolbar_toolbar: {
tbitem3: {
caption: '新建',
tip: '新建',
},
tbitem4: {
caption: '编辑',
tip: '编辑',
},
tbitem6: {
caption: '拷贝',
tip: '拷贝',
},
tbitem7: {
caption: '-',
tip: '',
},
tbitem8: {
caption: '删除',
tip: '删除',
},
tbitem9: {
caption: '-',
tip: '',
},
tbitem13: {
caption: '导出',
tip: '导出',
},
tbitem10: {
caption: '-',
tip: '',
},
tbitem19: {
caption: '过滤',
tip: '过滤',
},
},
editviewtoolbar_toolbar: {
tbitem3: {
caption: '保存',
......@@ -236,6 +198,44 @@ export default {
tip: '拷贝',
},
},
byparentkeytoolbar_toolbar: {
tbitem3: {
caption: '新建',
tip: '新建',
},
tbitem4: {
caption: '编辑',
tip: '编辑',
},
tbitem6: {
caption: '拷贝',
tip: '拷贝',
},
tbitem7: {
caption: '-',
tip: '',
},
tbitem8: {
caption: '删除',
tip: '删除',
},
tbitem9: {
caption: '-',
tip: '',
},
tbitem13: {
caption: '导出',
tip: '导出',
},
tbitem10: {
caption: '-',
tip: '',
},
tbitem19: {
caption: '过滤',
tip: '过滤',
},
},
gridviewtoolbar_toolbar: {
tbitem3: {
caption: '新建',
......
......@@ -749,6 +749,16 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => {
"codename":"Campaignresponse",
value: 'CAMPAIGNRESPONSE',
disabled: false,
},
{
id: 'CAMPAIGNACTIVITY',
label: "市场活动项目",
text: "市场活动项目",
"data":"",
"codename":"Campaignactivity",
value: 'CAMPAIGNACTIVITY',
disabled: false,
},
]
......
<template>
<studio-view viewName="campaignactivityeditview" viewTitle="campaignactivity编辑视图" class='deeditview campaign-activity-edit-view'>
<studio-view-style2 viewName="campaignactivityeditview" viewTitle="市场活动项目编辑视图" class='deeditview campaign-activity-edit-view'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template>
<template slot="toolbar">
<div class='toolbar-container'>
<i-button :title="$t('entities.campaignactivity.editviewtoolbar_toolbar.tbitem3.tip')" v-show="toolBarModels.tbitem3.visabled" :disabled="toolBarModels.tbitem3.disabled" class='' @click="toolbar_click({ tag: 'tbitem3' }, $event)">
<i class='fa fa-save'></i>
<span class='caption'>{{$t('entities.campaignactivity.editviewtoolbar_toolbar.tbitem3.caption')}}</span>
</i-button>
<i-button :title="$t('entities.campaignactivity.editviewtoolbar_toolbar.tbitem4.tip')" v-show="toolBarModels.tbitem4.visabled" :disabled="toolBarModels.tbitem4.disabled" class='' @click="toolbar_click({ tag: 'tbitem4' }, $event)">
<i class='sx-tb-saveandnew'></i>
<span class='caption'>{{$t('entities.campaignactivity.editviewtoolbar_toolbar.tbitem4.caption')}}</span>
</i-button>
<i-button :title="$t('entities.campaignactivity.editviewtoolbar_toolbar.tbitem5.tip')" v-show="toolBarModels.tbitem5.visabled" :disabled="toolBarModels.tbitem5.disabled" class='' @click="toolbar_click({ tag: 'tbitem5' }, $event)">
<i class='sx-tb-saveandclose'></i>
<span class='caption'>{{$t('entities.campaignactivity.editviewtoolbar_toolbar.tbitem5.caption')}}</span>
</i-button>
<span class='seperator'>|</span> <i-button :title="$t('entities.campaignactivity.editviewtoolbar_toolbar.tbitem7.tip')" v-show="toolBarModels.tbitem7.visabled" :disabled="toolBarModels.tbitem7.disabled" class='' @click="toolbar_click({ tag: 'tbitem7' }, $event)">
<i class='fa fa-remove'></i>
<span class='caption'>{{$t('entities.campaignactivity.editviewtoolbar_toolbar.tbitem7.caption')}}</span>
</i-button>
<span class='seperator'>|</span> <i-button :title="$t('entities.campaignactivity.editviewtoolbar_toolbar.tbitem12.tip')" v-show="toolBarModels.tbitem12.visabled" :disabled="toolBarModels.tbitem12.disabled" class='' @click="toolbar_click({ tag: 'tbitem12' }, $event)">
<i class='fa fa-file-text-o'></i>
<span class='caption'>{{$t('entities.campaignactivity.editviewtoolbar_toolbar.tbitem12.caption')}}</span>
</i-button>
<span class='seperator'>|</span> <i-button :title="$t('entities.campaignactivity.editviewtoolbar_toolbar.tbitem14.tip')" v-show="toolBarModels.tbitem14.visabled" :disabled="toolBarModels.tbitem14.disabled" class='' @click="toolbar_click({ tag: 'tbitem14' }, $event)">
<i class='fa fa-copy'></i>
<span class='caption'>{{$t('entities.campaignactivity.editviewtoolbar_toolbar.tbitem14.caption')}}</span>
</i-button>
</div>
</template>
<view-toolbar mode="STYLE2" :model="toolBarModels" @item-click="toolbar_click"/> </template>
<view_form
:viewState="viewState"
:viewparams="viewparams"
......@@ -53,24 +27,29 @@
@load="form_load($event)"
@closeview="closeView($event)">
</view_form>
</studio-view>
</studio-view-style2>
</template>
<script lang='tsx'>
import { Vue, Component, Prop, Provide, Emit, Watch } from 'vue-property-decorator';
import { UIActionTool,Util } from '@/utils';
import { Component, Prop, Provide, Emit, Watch } from 'vue-property-decorator';
import { Subject } from 'rxjs';
import { UIActionTool, Util } from '@/utils';
import { VueLifeCycleProcessing, EditViewBase } from '@/studio-core';
import CampaignActivityService from '@/service/campaign-activity/campaign-activity-service';
import EditViewEngine from '@engine/view/edit-view-engine';
@Component({
components: {
},
})
export default class CampaignActivityEditViewBase extends Vue {
/**
* 市场活动项目编辑视图视图基类
*
* @export
* @class CampaignActivityEditViewBase
* @extends {EditViewBase}
*/
@Component({})
@VueLifeCycleProcessing()
export default class CampaignActivityEditViewBase extends EditViewBase {
/**
* 实体服务对象
......@@ -78,164 +57,64 @@ export default class CampaignActivityEditViewBase extends Vue {
* @type {CampaignActivityService}
* @memberof CampaignActivityEditViewBase
*/
public appEntityService: CampaignActivityService = new CampaignActivityService;
protected appEntityService: CampaignActivityService = new CampaignActivityService;
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof CampaignActivityEditViewBase
*/
public counterServiceArray:Array<any> = [];
/**
* 数据变化
*
* @param {*} val
* @returns {*}
* @memberof CampaignActivityEditViewBase
*/
@Emit()
public viewDatasChange(val: any):any {
return val;
}
/**
* 传入视图上下文
*
* @type {string}
* @memberof CampaignActivityEditViewBase
*/
@Prop() public viewdata!: string;
/**
* 传入视图参数
*
* @type {string}
* @memberof CampaignActivityEditViewBase
*/
@Prop() public viewparam!: string;
/**
* 视图默认使用
*
* @type {boolean}
* @memberof CampaignActivityEditViewBase
*/
@Prop({ default: true }) public viewDefaultUsage!: boolean;
/**
* 视图标识
*
* @type {string}
* @memberof CampaignActivityEditViewBase
*/
public viewtag: string = '30458f00562fda145be535e56948b067';
protected counterServiceArray: Array<any> = [];
/**
* 自定义视图导航上下文集合
*
* @protected
* @type {*}
* @memberof CampaignActivityEditViewBase
*/
public customViewNavContexts:any ={
protected customViewNavContexts: any = {
};
/**
* 自定义视图导航参数集合
*
* @protected
* @type {*}
* @memberof CampaignActivityEditViewBase
*/
public customViewParams:any ={
protected customViewParams: any = {
};
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof CampaignActivityEditViewBase
*/
public model: any = {
protected model: any = {
srfCaption: 'entities.campaignactivity.views.editview.caption',
srfTitle: 'entities.campaignactivity.views.editview.title',
srfSubTitle: 'entities.campaignactivity.views.editview.subtitle',
dataInfo: ''
}
/**
* 视图参数变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof CampaignActivityEditViewBase
*/
@Watch('viewparam',{immediate: true, deep: true})
onParamData(newVal: any, oldVal: any) {
if(newVal){
for(let key in this.viewparams){
delete this.viewparams[key];
}
Object.assign(this.viewparams, JSON.parse(this.viewparam));
}
}
/**
* 处理应用上下文变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof CampaignActivityEditViewBase
*/
@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();
});
}
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof CampaignActivityEditViewBase
*/
public containerModel: any = {
protected containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_form: { name: 'form', type: 'FORM' },
};
/**
* 计数器刷新
*
* @memberof CampaignActivityEditViewBase
*/
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 CampaignActivityEditViewBase
*/
public viewState: Subject<ViewState> = new Subject();
/**
* 工具栏模型
*
......@@ -247,7 +126,7 @@ export default class CampaignActivityEditViewBase extends Vue {
tbitem4: { name: 'tbitem4', caption: '保存并新建','isShowCaption':true,'isShowIcon':true, tooltip: '保存并新建', iconcls: 'sx-tb-saveandnew', icon: '../sasrfex/images/default/icon_saveandnew.png', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'SaveAndNew', target: '' }, class: '' },
tbitem5: { name: 'tbitem5', caption: '保存并关闭','isShowCaption':true,'isShowIcon':true, tooltip: '保存并关闭', iconcls: 'sx-tb-saveandclose', icon: '../sasrfex/images/default/icon_saveandclose.png', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'SaveAndExit', target: '' }, class: '' },
tbitem5: { name: 'tbitem5', caption: '保存并关闭','isShowCaption':true,'isShowIcon':true, tooltip: '保存并关闭', iconcls: 'fa fa-power-off', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'SaveAndExit', target: '' }, class: '' },
tbitem6: { name: 'tbitem6', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem7: { name: 'tbitem7', caption: '删除并关闭','isShowCaption':true,'isShowIcon':true, tooltip: '删除并关闭', iconcls: 'fa fa-remove', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'RemoveAndExit', target: 'SINGLEKEY' }, class: '' },
......@@ -289,198 +168,6 @@ export default class CampaignActivityEditViewBase extends Vue {
});
}
/**
* 应用上下文
*
* @type {*}
* @memberof CampaignActivityEditViewBase
*/
public context:any = {};
/**
* 视图参数
*
* @type {*}
* @memberof CampaignActivityEditViewBase
*/
public viewparams:any = {};
/**
* 解析视图参数
*
* @public
* @memberof CampaignActivityEditViewBase
*/
public parseViewParam(): void {
for(let key in this.context){
delete this.context[key];
}
if (!this.viewDefaultUsage && this.viewdata && !Object.is(this.viewdata, '')) {
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});
}
if(this.$store.getters.getAppData() && this.$store.getters.getAppData().context){
Object.assign(this.context,this.$store.getters.getAppData().context);
}
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) => {
Object.defineProperty(tempValue, item.name, {
enumerable: true,
value: matchArray[index + 1]
});
});
this.$viewTool.formatRouteParams(tempValue,this.$route,this.context,this.viewparams);
if(this.$store.getters.getAppData() && this.$store.getters.getAppData().context){
Object.assign(this.context,this.$store.getters.getAppData().context);
}
//初始化视图唯一标识
Object.assign(this.context,{srfsessionid:this.$util.createUUID()});
this.handleCustomViewData();
}
/**
* 处理自定义视图数据
*
* @memberof CampaignActivityEditViewBase
*/
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 CampaignActivityEditViewBase
*/
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()]){
Object.defineProperty(tempData, item.toLowerCase(), {
value: this.context[(curNavData.value).toLowerCase()],
writable : true,
enumerable : true,
configurable : true
});
}else{
if(this.viewparams[(curNavData.value).toLowerCase()]){
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
});
}
}
}
}
/**
* Vue声明周期
*
* @memberof CampaignActivityEditViewBase
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof CampaignActivityEditViewBase
*/
public afterCreated(){
const secondtag = this.$util.createUUID();
this.$store.commit('viewaction/createdView', { viewtag: this.viewtag, secondtag: secondtag });
this.viewtag = secondtag;
this.parseViewParam();
}
/**
* 销毁之前
*
* @memberof CampaignActivityEditViewBase
*/
public beforeDestroy() {
this.$store.commit('viewaction/removeView', this.viewtag);
}
/**
* Vue声明周期(组件初始化完毕)
*
* @memberof CampaignActivityEditViewBase
*/
public mounted() {
this.afterMounted();
}
/**
* 执行mounted后的逻辑
*
* @memberof CampaignActivityEditViewBase
*/
public afterMounted(){
const _this: any = this;
_this.engineInit();
if (_this.loadModel && _this.loadModel instanceof Function) {
_this.loadModel();
}
}
/**
* toolbar 部件 click 事件
*
......@@ -488,7 +175,7 @@ export default class CampaignActivityEditViewBase extends Vue {
* @param {*} $event
* @memberof CampaignActivityEditViewBase
*/
public toolbar_click($event: any, $event2?: any) {
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'tbitem3')) {
this.toolbar_tbitem3_click(null, '', $event2);
}
......@@ -518,7 +205,6 @@ export default class CampaignActivityEditViewBase extends Vue {
}
}
/**
* form 部件 save 事件
*
......@@ -526,11 +212,10 @@ export default class CampaignActivityEditViewBase extends Vue {
* @param {*} $event
* @memberof CampaignActivityEditViewBase
*/
public form_save($event: any, $event2?: any) {
public form_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'save', $event);
}
/**
* form 部件 remove 事件
*
......@@ -538,11 +223,10 @@ export default class CampaignActivityEditViewBase extends Vue {
* @param {*} $event
* @memberof CampaignActivityEditViewBase
*/
public form_remove($event: any, $event2?: any) {
public form_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'remove', $event);
}
/**
* form 部件 load 事件
*
......@@ -550,12 +234,10 @@ export default class CampaignActivityEditViewBase extends Vue {
* @param {*} $event
* @memberof CampaignActivityEditViewBase
*/
public form_load($event: any, $event2?: any) {
public form_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'load', $event);
}
/**
* 逻辑事件
*
......@@ -1060,49 +742,6 @@ export default class CampaignActivityEditViewBase extends Vue {
xData.print();
}
/**
* 关闭视图
*
* @param {any[]} args
* @memberof CampaignActivityEditViewBase
*/
public closeView(args: any[]): void {
let _view: any = this;
if (_view.viewdata) {
_view.$emit('viewdataschange', [args]);
_view.$emit('close', [args]);
} else if (_view.$tabPageExp) {
_view.$tabPageExp.onClose(_view.$route.fullPath);
}
}
/**
* 销毁视图回调
*
* @memberof CampaignActivityEditViewBase
*/
public destroyed(){
this.afterDestroyed();
}
/**
* 执行destroyed后的逻辑
*
* @memberof CampaignActivityEditViewBase
*/
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);
}
})
}
}
}
}
</script>
......
......@@ -34,6 +34,7 @@ export const PageComponents = {
Vue.component('account-info-major-contact', () => import('@pages/base/account-info-major-contact/account-info-major-contact.vue'));
Vue.component('lead-info-company', () => import('@pages/sales/lead-info-company/lead-info-company.vue'));
Vue.component('sales-order-grid-view', () => import('@pages/sales/sales-order-grid-view/sales-order-grid-view.vue'));
Vue.component('campaign-activity-edit-view', () => import('@pages/marketing/campaign-activity-edit-view/campaign-activity-edit-view.vue'));
Vue.component('contact-quick-create', () => import('@pages/base/contact-quick-create/contact-quick-create.vue'));
Vue.component('lead-info-market', () => import('@pages/sales/lead-info-market/lead-info-market.vue'));
Vue.component('phone-call-edit-view', () => import('@pages/base/phone-call-edit-view/phone-call-edit-view.vue'));
......
......@@ -908,6 +908,20 @@ const router = new Router({
},
component: () => import('@pages/sales/sales-order-grid-view/sales-order-grid-view.vue'),
},
{
path: 'campaignactivities/:campaignactivity?/editview/:editview?',
meta: {
caption: 'entities.campaignactivity.views.editview.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'campaignactivities', parameterName: 'campaignactivity' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/marketing/campaign-activity-edit-view/campaign-activity-edit-view.vue'),
},
{
path: 'accounts/:account?/contacts/:contact?/quickcreate/:quickcreate?',
meta: {
......@@ -2642,6 +2656,20 @@ const router = new Router({
},
component: () => import('@pages/sales/quote-edit-view/quote-edit-view.vue'),
},
{
path: 'accounts/:account?/edit_accountinfo/:edit_accountinfo?',
meta: {
caption: 'entities.account.views.edit_accountinfo.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'accounts', parameterName: 'account' },
{ pathName: 'edit_accountinfo', parameterName: 'edit_accountinfo' },
],
requireAuth: true,
},
component: () => import('@pages/base/account-edit-account-info/account-edit-account-info.vue'),
},
{
path: 'incidents/:incident?/gridview/:gridview?',
meta: {
......@@ -2685,20 +2713,6 @@ const router = new Router({
},
component: () => import('@pages/base/contact-edit-address/contact-edit-address.vue'),
},
{
path: 'accounts/:account?/edit_accountinfo/:edit_accountinfo?',
meta: {
caption: 'entities.account.views.edit_accountinfo.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'accounts', parameterName: 'account' },
{ pathName: 'edit_accountinfo', parameterName: 'edit_accountinfo' },
],
requireAuth: true,
},
component: () => import('@pages/base/account-edit-account-info/account-edit-account-info.vue'),
},
{
path: 'accounts/:account?/innerpickupview/:innerpickupview?',
meta: {
......@@ -3284,6 +3298,19 @@ const router = new Router({
},
component: () => import('@pages/sales/sales-literature-edit-view/sales-literature-edit-view.vue'),
},
{
path: '/campaignactivities/:campaignactivity?/editview/:editview?',
meta: {
caption: 'entities.campaignactivity.views.editview.title',
info:'',
parameters: [
{ pathName: 'campaignactivities', parameterName: 'campaignactivity' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/marketing/campaign-activity-edit-view/campaign-activity-edit-view.vue'),
},
{
path: '/accounts/:account?/contacts/:contact?/listcontacts/:listcontact?/gridview/:gridview?',
meta: {
......
......@@ -265,6 +265,15 @@ export const viewstate: any = {
refviews: [
],
},
{
viewtag: '30458f00562fda145be535e56948b067',
viewmodule: 'Marketing',
viewname: 'CampaignActivityEditView',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{
viewtag: '3124753ba4abff3aaf49355a5197c4ab',
viewmodule: 'Marketing',
......@@ -366,6 +375,7 @@ export const viewstate: any = {
refviews: [
'24e222a530526aab94ed4ed22cfedf9a',
'99d4a530c13b03a98cd143f341394354',
'30458f00562fda145be535e56948b067',
'b3cfac5362b3bfb70d1471932f120fa5',
'3d538df4ca389d372347f7b53d67269f',
'a50134133db91e46c8434ad0ebff22c7',
......@@ -973,6 +983,7 @@ export const viewstate: any = {
'aa79d35850f36fbc1a5085353ecd5af5',
'24e222a530526aab94ed4ed22cfedf9a',
'99d4a530c13b03a98cd143f341394354',
'30458f00562fda145be535e56948b067',
'b3cfac5362b3bfb70d1471932f120fa5',
'3d538df4ca389d372347f7b53d67269f',
'893e62d6fbdc4580de7e3e802aec9108',
......
package cn.ibizlab.businesscentral.core.marketing.mapping;
import org.mapstruct.*;
import cn.ibizlab.businesscentral.core.marketing.domain.CampaignActivity;
import cn.ibizlab.businesscentral.core.base.domain.ActivityPointer;
import java.util.List;
@Mapper(componentModel = "spring", uses = {})
public interface CampaignActivityInheritMapping {
@Mappings({
@Mapping(source ="activityid",target = "activityid"),
@Mapping(source ="subject",target = "subject"),
@Mapping(target ="focusNull",ignore = true),
})
ActivityPointer toActivitypointer(CampaignActivity campaignactivity);
@Mappings({
@Mapping(source ="activityid" ,target = "activityid"),
@Mapping(source ="subject" ,target = "subject"),
@Mapping(target ="focusNull",ignore = true),
})
CampaignActivity toCampaignactivity(ActivityPointer activitypointer);
List<ActivityPointer> toActivitypointer(List<CampaignActivity> campaignactivity);
List<CampaignActivity> toCampaignactivity(List<ActivityPointer> activitypointer);
}
......@@ -54,6 +54,7 @@ public class CampaignActivityServiceImpl extends ServiceImpl<CampaignActivityMap
@Transactional
public boolean remove(String key) {
boolean result=removeById(key);
activitypointerService.remove(key);
return result ;
}
......@@ -96,6 +97,7 @@ public class CampaignActivityServiceImpl extends ServiceImpl<CampaignActivityMap
@Override
@Transactional
public boolean update(CampaignActivity et) {
activitypointerService.update(campaignactivityInheritMapping.toActivitypointer(et));
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("activityid",et.getActivityid())))
return false;
CachedBeanCopier.copy(get(et.getActivityid()),et);
......@@ -119,6 +121,7 @@ public class CampaignActivityServiceImpl extends ServiceImpl<CampaignActivityMap
@Override
@Transactional
public boolean create(CampaignActivity et) {
createIndexMajorEntityData(et);
if(!this.retBool(this.baseMapper.insert(et)))
return false;
CachedBeanCopier.copy(get(et.getActivityid()),et);
......@@ -176,6 +179,23 @@ public class CampaignActivityServiceImpl extends ServiceImpl<CampaignActivityMap
@Autowired
cn.ibizlab.businesscentral.core.marketing.mapping.CampaignActivityInheritMapping campaignactivityInheritMapping;
@Autowired
@Lazy
private cn.ibizlab.businesscentral.core.base.service.IActivityPointerService activitypointerService;
/**
* 创建索引主实体数据
* @param et
*/
private void createIndexMajorEntityData(CampaignActivity et){
if(ObjectUtils.isEmpty(et.getActivityid()))
et.setActivityid((String)et.getDefaultKey(true));
cn.ibizlab.businesscentral.core.base.domain.ActivityPointer activitypointer =campaignactivityInheritMapping.toActivitypointer(et);
activitypointer.set("activitytypecode","CAMPAIGNACTIVITY");
activitypointerService.create(activitypointer);
}
@Override
public List<JSONObject> select(String sql, Map param){
......
......@@ -5042,7 +5042,7 @@
<!--输出实体[CAMPAIGNACTIVITY]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-campaignactivity-28-57">
<changeSet author="a_LAB01_e85d8801c" id="tab-campaignactivity-29-57">
<createTable tableName="CAMPAIGNACTIVITY">
<column name="STATUSCODE" remarks="" type="INT">
</column>
......@@ -9043,7 +9043,7 @@
<!--输出实体[ACTIVITYPOINTER]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-activitypointer-58-99">
<changeSet author="a_LAB01_e85d8801c" id="tab-activitypointer-59-99">
<createTable tableName="ACTIVITYPOINTER">
<column name="SERIESID" remarks="" type="VARCHAR(60)">
</column>
......@@ -9840,7 +9840,7 @@
<!--输出实体[LIST]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-list-61-110">
<changeSet author="a_LAB01_e85d8801c" id="tab-list-68-110">
<createTable tableName="LIST">
<column name="OWNERIDTYPE" remarks="" type="VARCHAR(100)">
</column>
......@@ -10397,7 +10397,7 @@
<!--输出实体[OPPORTUNITY]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-opportunity-21-120">
<changeSet author="a_LAB01_e85d8801c" id="tab-opportunity-23-120">
<createTable tableName="OPPORTUNITY">
<column name="DECISIONMAKER" remarks="" type="INT">
</column>
......@@ -11174,7 +11174,7 @@
<addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="SERVICEAPPOINTMENT" constraintName="DER1N_SERVICEAPPOINTMENT__TRAN" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/>
</changeSet>
<!--输出实体[CAMPAIGNACTIVITY]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-campaignactivity-28-267">
<changeSet author="a_LAB01_e85d8801c" id="fk-campaignactivity-29-267">
<addForeignKeyConstraint baseColumnNames="SLAID" baseTableName="CAMPAIGNACTIVITY" constraintName="DER1N_CAMPAIGNACTIVITY__SLA__S" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SLAID" referencedTableName="SLA" validate="true"/>
</changeSet>
<!--输出实体[ENTITLEMENTTEMPLATE]外键关系 -->
......@@ -11492,13 +11492,13 @@
<addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="PRODUCTSUBSTITUTE" constraintName="DER1N_PRODUCTSUBSTITUTE__TRANS" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/>
</changeSet>
<!--输出实体[ACTIVITYPOINTER]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-activitypointer-58-370">
<changeSet author="a_LAB01_e85d8801c" id="fk-activitypointer-59-370">
<addForeignKeyConstraint baseColumnNames="SERVICEID" baseTableName="ACTIVITYPOINTER" constraintName="DER1N_ACTIVITYPOINTER__SERVICE" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SERVICEID" referencedTableName="SERVICE" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-activitypointer-58-371">
<changeSet author="a_LAB01_e85d8801c" id="fk-activitypointer-59-371">
<addForeignKeyConstraint baseColumnNames="SLAID" baseTableName="ACTIVITYPOINTER" constraintName="DER1N_ACTIVITYPOINTER__SLA__SL" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SLAID" referencedTableName="SLA" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-activitypointer-58-372">
<changeSet author="a_LAB01_e85d8801c" id="fk-activitypointer-59-372">
<addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="ACTIVITYPOINTER" constraintName="DER1N_ACTIVITYPOINTER__TRANSAC" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/>
</changeSet>
<!--输出实体[BULKDELETEFAILURE]外键关系 -->
......@@ -11572,7 +11572,7 @@
<!--输出实体[POST]外键关系 -->
<!--输出实体[CONTRACTTEMPLATE]外键关系 -->
<!--输出实体[LIST]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-list-61-394">
<changeSet author="a_LAB01_e85d8801c" id="fk-list-68-394">
<addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="LIST" constraintName="DER1N_LIST__TRANSACTIONCURRENC" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/>
</changeSet>
<!--输出实体[KNOWLEDGEBASERECORD]外键关系 -->
......@@ -11612,25 +11612,25 @@
<!--输出实体[RELATIONSHIPS]外键关系 -->
<!--输出实体[CONNECTIONROLE]外键关系 -->
<!--输出实体[OPPORTUNITY]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-opportunity-21-404">
<changeSet author="a_LAB01_e85d8801c" id="fk-opportunity-23-404">
<addForeignKeyConstraint baseColumnNames="PARENTACCOUNTID" baseTableName="OPPORTUNITY" constraintName="DER1N_OPPORTUNITY__ACCOUNT__PA" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ACCOUNTID" referencedTableName="ACCOUNT" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-opportunity-21-405">
<changeSet author="a_LAB01_e85d8801c" id="fk-opportunity-23-405">
<addForeignKeyConstraint baseColumnNames="CAMPAIGNID" baseTableName="OPPORTUNITY" constraintName="DER1N_OPPORTUNITY__CAMPAIGN__C" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="CAMPAIGNID" referencedTableName="CAMPAIGN" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-opportunity-21-406">
<changeSet author="a_LAB01_e85d8801c" id="fk-opportunity-23-406">
<addForeignKeyConstraint baseColumnNames="PARENTCONTACTID" baseTableName="OPPORTUNITY" constraintName="DER1N_OPPORTUNITY__CONTACT__PA" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="CONTACTID" referencedTableName="CONTACT" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-opportunity-21-407">
<changeSet author="a_LAB01_e85d8801c" id="fk-opportunity-23-407">
<addForeignKeyConstraint baseColumnNames="ORIGINATINGLEADID" baseTableName="OPPORTUNITY" constraintName="DER1N_OPPORTUNITY__LEAD__ORIGI" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="LEADID" referencedTableName="LEAD" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-opportunity-21-408">
<changeSet author="a_LAB01_e85d8801c" id="fk-opportunity-23-408">
<addForeignKeyConstraint baseColumnNames="PRICELEVELID" baseTableName="OPPORTUNITY" constraintName="DER1N_OPPORTUNITY__PRICELEVEL_" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="PRICELEVELID" referencedTableName="PRICELEVEL" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-opportunity-21-409">
<changeSet author="a_LAB01_e85d8801c" id="fk-opportunity-23-409">
<addForeignKeyConstraint baseColumnNames="SLAID" baseTableName="OPPORTUNITY" constraintName="DER1N_OPPORTUNITY__SLA__SLAID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SLAID" referencedTableName="SLA" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-opportunity-21-410">
<changeSet author="a_LAB01_e85d8801c" id="fk-opportunity-23-410">
<addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="OPPORTUNITY" constraintName="DER1N_OPPORTUNITY__TRANSACTION" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/>
</changeSet>
<!--输出实体[ANNOTATION]外键关系 -->
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册