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

lab_gzf 发布系统代码

上级 ecbac8ff
......@@ -139,6 +139,16 @@
"viewtag": "0ff3eacd51054572cf899247b1c57018",
"memo": "系统自动添加"
},
"salesliteratureinfoview": {
"title": "销售宣传资料信息",
"caption": "销售宣传资料",
"viewtype": "DETABEXPVIEW",
"viewmodule": "Sales",
"viewname": "SalesLiteratureInfoView",
"viewfilename": "sales-literature-info-view",
"viewtag": "10a21b9907d91ab1764c82df73571709",
"memo": ""
},
"campaignresponsebyparentkey": {
"title": "市场活动响应表格视图",
"caption": "市场活动响应",
......
......@@ -38,6 +38,10 @@ export default {
caption: "销售宣传资料",
title: "销售宣传资料数据看板视图",
},
infoview: {
caption: "销售宣传资料",
title: "销售宣传资料信息",
},
editview: {
caption: "销售宣传资料",
title: "销售宣传资料编辑视图",
......
......@@ -37,6 +37,10 @@ export default {
caption: "销售宣传资料",
title: "销售宣传资料数据看板视图",
},
infoview: {
caption: "销售宣传资料",
title: "销售宣传资料信息",
},
editview: {
caption: "销售宣传资料",
title: "销售宣传资料编辑视图",
......
......@@ -119,6 +119,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "SalesOrderEditView",
"viewtag": "0ff3eacd51054572cf899247b1c57018"
},
"salesliteratureinfoview": {
"title": "销售宣传资料信息",
"caption": "销售宣传资料",
"viewtype": "DETABEXPVIEW",
"viewmodule": "Sales",
"viewname": "SalesLiteratureInfoView",
"viewtag": "10a21b9907d91ab1764c82df73571709"
},
"campaignresponsebyparentkey": {
"title": "市场活动响应表格视图",
"caption": "市场活动响应",
......
import { Subject } from 'rxjs';
import { EditViewBase } from '@/studio-core';
import ProductSalesLiteratureService from '@/service/product-sales-literature/product-sales-literature-service';
import EditViewEngine from '@engine/view/edit-view-engine';
/**
* 宣传资料产品明细视图基类
*
* @export
* @class ProductSalesLiteratureSalLitProEditViewBase
* @extends {EditViewBase}
*/
export class ProductSalesLiteratureSalLitProEditViewBase extends EditViewBase {
/**
* 实体服务对象
*
* @type {ProductSalesLiteratureService}
* @memberof ProductSalesLiteratureSalLitProEditViewBase
*/
protected appEntityService: ProductSalesLiteratureService = new ProductSalesLiteratureService;
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof ProductSalesLiteratureSalLitProEditViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof ProductSalesLiteratureSalLitProEditViewBase
*/
protected model: any = {
srfCaption: 'entities.productsalesliterature.views.sallitproeditview.caption',
srfTitle: 'entities.productsalesliterature.views.sallitproeditview.title',
srfSubTitle: 'entities.productsalesliterature.views.sallitproeditview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof ProductSalesLiteratureSalLitProEditViewBase
*/
protected containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_form: { name: 'form', type: 'FORM' },
};
/**
* 工具栏模型
*
* @type {*}
* @memberof ProductSalesLiteratureSalLitProEditView
*/
public toolBarModels: any = {
tbitem1: { name: 'tbitem1', caption: '保存并关闭','isShowCaption':true,'isShowIcon':true, tooltip: '保存并关闭', iconcls: 'fa fa-power-off', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'SaveAndExit', target: '' }, class: '' },
tbitem2: { name: 'tbitem2', caption: '关闭','isShowCaption':true,'isShowIcon':true, tooltip: '关闭', iconcls: 'fa fa-sign-out', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Exit', target: '' }, class: '' },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = 'b87dd501aa922d2c6278451ca1282c53';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof ProductSalesLiteratureSalLitProEditViewBase
*/
public engine: EditViewEngine = new EditViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof ProductSalesLiteratureSalLitProEditViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
form: this.$refs.form,
p2k: '0',
keyPSDEField: 'productsalesliterature',
majorPSDEField: 'relationshipsname',
isLoadDefault: true,
});
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof ProductSalesLiteratureSalLitProEditViewBase
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'tbitem1')) {
this.toolbar_tbitem1_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem2')) {
this.toolbar_tbitem2_click(null, '', $event2);
}
}
/**
* form 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof ProductSalesLiteratureSalLitProEditViewBase
*/
public form_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'save', $event);
}
/**
* form 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof ProductSalesLiteratureSalLitProEditViewBase
*/
public form_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'remove', $event);
}
/**
* form 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof ProductSalesLiteratureSalLitProEditViewBase
*/
public form_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'load', $event);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem1_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.SaveAndExit(datas, contextJO,paramJO, $event, xData,this,"ProductSalesLiterature");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem2_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Exit(datas, contextJO,paramJO, $event, xData,this,"ProductSalesLiterature");
}
/**
* 保存并关闭
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof ProductSalesLiteratureSalLitProEditViewBase
*/
public SaveAndExit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (xData && xData.saveAndExit instanceof Function) {
xData.saveAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
} else if (_this.saveAndExit && _this.saveAndExit instanceof Function) {
_this.saveAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
}
}
/**
* 关闭
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof ProductSalesLiteratureSalLitProEditViewBase
*/
public Exit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
this.closeView(args);
if(window.parent){
window.parent.postMessage([{ ...args }],'*');
}
}
}
\ No newline at end of file
<studio-view-style2 viewName="productsalesliteraturesallitproeditview" viewTitle="宣传资料产品明细" class='deeditview product-sales-literature-sal-lit-pro-edit-view'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template>
<template slot="toolbar">
<view-toolbar mode="STYLE2" :model="toolBarModels" @item-click="toolbar_click($event)"/> </template>
<view_form
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:autosave="false"
:viewtag="viewtag"
:showBusyIndicator="true"
updateAction="Update"
removeAction="Remove"
loaddraftAction="GetDraft"
loadAction="Get"
createAction="Create"
WFSubmitAction=""
WFStartAction=""
style=''
name="form"
ref='form'
@save="form_save($event)"
@remove="form_remove($event)"
@load="form_load($event)"
@closeview="closeView($event)">
</view_form>
</studio-view-style2>
\ No newline at end of file
<template src="./product-sales-literature-sal-lit-pro-edit-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { ProductSalesLiteratureSalLitProEditViewBase } from './product-sales-literature-sal-lit-pro-edit-view-base';
import view_form from '@widgets/product-sales-literature/sal-lit-pro-form/sal-lit-pro-form.vue';
/**
* 宣传资料产品明细视图
*
* @export
* @class ProductSalesLiteratureSalLitProEditView
* @extends {ProductSalesLiteratureSalLitProEditViewBase}
*/
@Component({
components: {
view_form,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$store.commit('addCurPageViewtag', { route: to, viewtag: vm.viewtag });
});
}
})
@VueLifeCycleProcessing()
export default class ProductSalesLiteratureSalLitProEditView extends ProductSalesLiteratureSalLitProEditViewBase { }
</script>
<studio-view-style2 viewName="productsalesliteraturesallitprogridview" viewTitle="宣传资料产品明细" class='degridview product-sales-literature-sal-lit-pro-grid-view'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template>
<i-input slot="quickSearch" v-show="!isExpandSearchForm" v-model="query" search @on-search="onSearch($event)"/>
<template slot="toolbar">
<view-toolbar mode="STYLE2" :model="toolBarModels" @item-click="toolbar_click($event)"/> </template>
<template slot="searchForm">
<view_searchform
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:showBusyIndicator="true"
v-show="isExpandSearchForm"
loaddraftAction="FilterGetDraft"
loadAction="FilterGet"
name="searchform"
ref='searchform'
@save="searchform_save($event)"
@search="searchform_search($event)"
@load="searchform_load($event)"
@closeview="closeView($event)">
</view_searchform>
</template>
<view_grid
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:isSingleSelect="isSingleSelect"
:showBusyIndicator="true"
:isOpenEdit="false"
:gridRowActiveMode="gridRowActiveMode"
@save="onSave"
updateAction=""
removeAction="Remove"
loaddraftAction=""
loadAction=""
createAction=""
fetchAction="FetchDefault"
:newdata="newdata"
:opendata="opendata"
name="grid"
ref='grid'
@selectionchange="grid_selectionchange($event)"
@beforeload="grid_beforeload($event)"
@rowdblclick="grid_rowdblclick($event)"
@remove="grid_remove($event)"
@load="grid_load($event)"
@closeview="closeView($event)">
</view_grid>
</studio-view-style2>
\ No newline at end of file
<template src="./product-sales-literature-sal-lit-pro-grid-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { ProductSalesLiteratureSalLitProGridViewBase } from './product-sales-literature-sal-lit-pro-grid-view-base';
import view_grid from '@widgets/product-sales-literature/sal-lit-pro-grid-grid/sal-lit-pro-grid-grid.vue';
import view_searchform from '@widgets/product-sales-literature/default-searchform/default-searchform.vue';
/**
* 宣传资料产品明细视图
*
* @export
* @class ProductSalesLiteratureSalLitProGridView
* @extends {ProductSalesLiteratureSalLitProGridViewBase}
*/
@Component({
components: {
view_grid,
view_searchform,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$store.commit('addCurPageViewtag', { route: to, viewtag: vm.viewtag });
});
}
})
@VueLifeCycleProcessing()
export default class ProductSalesLiteratureSalLitProGridView extends ProductSalesLiteratureSalLitProGridViewBase { }
</script>
......@@ -517,7 +517,7 @@ export class SalesLiteratureGridViewBase extends GridViewBase {
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'salesliteratures', parameterName: 'salesliterature' },
{ pathName: 'editview', parameterName: 'editview' },
{ pathName: 'infoview', parameterName: 'infoview' },
];
const _this: any = this;
const openIndexViewTab = (data: any) => {
......
import { Subject } from 'rxjs';
import { EditViewBase } from '@/studio-core';
import SalesLiteratureService from '@/service/sales-literature/sales-literature-service';
import EditViewEngine from '@engine/view/edit-view-engine';
/**
* 销售宣传资料编辑视图视图基类
*
* @export
* @class SalesLiteratureInfo_SalLitViewBase
* @extends {EditViewBase}
*/
export class SalesLiteratureInfo_SalLitViewBase extends EditViewBase {
/**
* 实体服务对象
*
* @type {SalesLiteratureService}
* @memberof SalesLiteratureInfo_SalLitViewBase
*/
protected appEntityService: SalesLiteratureService = new SalesLiteratureService;
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof SalesLiteratureInfo_SalLitViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof SalesLiteratureInfo_SalLitViewBase
*/
protected model: any = {
srfCaption: 'entities.salesliterature.views.info_sallitview.caption',
srfTitle: 'entities.salesliterature.views.info_sallitview.title',
srfSubTitle: 'entities.salesliterature.views.info_sallitview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof SalesLiteratureInfo_SalLitViewBase
*/
protected containerModel: any = {
view_form: { name: 'form', type: 'FORM' },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = 'a04bb3dac3122438b3b1096f5f370516';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof SalesLiteratureInfo_SalLitViewBase
*/
public engine: EditViewEngine = new EditViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof SalesLiteratureInfo_SalLitViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
form: this.$refs.form,
p2k: '0',
keyPSDEField: 'salesliterature',
majorPSDEField: 'salesliteraturename',
isLoadDefault: true,
});
}
/**
* form 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SalesLiteratureInfo_SalLitViewBase
*/
public form_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'save', $event);
}
/**
* form 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SalesLiteratureInfo_SalLitViewBase
*/
public form_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'remove', $event);
}
/**
* form 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SalesLiteratureInfo_SalLitViewBase
*/
public form_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'load', $event);
}
}
\ No newline at end of file
<studio-view-style2 viewName="salesliteratureinfo_sallitview" viewTitle="销售宣传资料编辑视图" class='deeditview sales-literature-info-sal-lit-view'>
<view_form
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:autosave="false"
:viewtag="viewtag"
:showBusyIndicator="true"
updateAction="Update"
removeAction="Remove"
loaddraftAction="GetDraft"
loadAction="Get"
createAction="Create"
WFSubmitAction=""
WFStartAction=""
style=''
name="form"
ref='form'
@save="form_save($event)"
@remove="form_remove($event)"
@load="form_load($event)"
@closeview="closeView($event)">
</view_form>
</studio-view-style2>
\ No newline at end of file
<template src="./sales-literature-info-sal-lit-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { SalesLiteratureInfo_SalLitViewBase } from './sales-literature-info-sal-lit-view-base';
import view_form from '@widgets/sales-literature/info-form/info-form.vue';
/**
* 销售宣传资料编辑视图视图
*
* @export
* @class SalesLiteratureInfo_SalLitView
* @extends {SalesLiteratureInfo_SalLitViewBase}
*/
@Component({
components: {
view_form,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$store.commit('addCurPageViewtag', { route: to, viewtag: vm.viewtag });
});
}
})
@VueLifeCycleProcessing()
export default class SalesLiteratureInfo_SalLitView extends SalesLiteratureInfo_SalLitViewBase { }
</script>
import { Subject } from 'rxjs';
import { TabExpViewBase } from '@/studio-core';
import SalesLiteratureService from '@/service/sales-literature/sales-literature-service';
import TabExpViewEngine from '@engine/view/tab-exp-view-engine';
/**
* 销售宣传资料信息视图基类
*
* @export
* @class SalesLiteratureInfoViewBase
* @extends {TabExpViewBase}
*/
export class SalesLiteratureInfoViewBase extends TabExpViewBase {
/**
* 实体服务对象
*
* @type {SalesLiteratureService}
* @memberof SalesLiteratureInfoViewBase
*/
protected appEntityService: SalesLiteratureService = new SalesLiteratureService;
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof SalesLiteratureInfoViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof SalesLiteratureInfoViewBase
*/
protected model: any = {
srfCaption: 'entities.salesliterature.views.infoview.caption',
srfTitle: 'entities.salesliterature.views.infoview.title',
srfSubTitle: 'entities.salesliterature.views.infoview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof SalesLiteratureInfoViewBase
*/
protected containerModel: any = {
view_tabexppanel: { name: 'tabexppanel', type: 'TABEXPPANEL' },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = '10a21b9907d91ab1764c82df73571709';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof SalesLiteratureInfoViewBase
*/
public engine: TabExpViewEngine = new TabExpViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof SalesLiteratureInfoViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
keyPSDEField: 'salesliterature',
majorPSDEField: 'salesliteraturename',
isLoadDefault: true,
});
}
/**
* 加载模型
*
* @protected
* @memberof SalesLiteratureInfoViewBase
*/
protected async loadModel(): Promise<any> {
if(this.context.salesliterature){
this.appEntityService.getDataInfo(JSON.parse(JSON.stringify(this.context)),{},false).then((response:any) =>{
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
if (_data.salesliteraturename) {
Object.assign(this.model, { dataInfo: _data.salesliteraturename });
if (this.$tabPageExp) {
this.$tabPageExp.setCurPageCaption(this.model.srfTitle, this.model.srfTitle, this.model.dataInfo);
}
if(this.$route){
this.$route.meta.info = this.model.dataInfo;
}
Object.assign(this.model, { srfTitle: `${this.$t(this.model.srfTitle)} - ${this.model.dataInfo}` });
}
})
}
}
}
\ No newline at end of file
<studio-view-style2 viewName="salesliteratureinfoview" viewTitle="销售宣传资料信息" class='detabexpview sales-literature-info-view'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template>
<view_tabexppanel
:viewState="viewState"
:viewparams="viewparams"
:context="context"
name="tabexppanel"
ref='tabexppanel'
@closeview="closeView($event)">
</view_tabexppanel>
</studio-view-style2>
\ No newline at end of file
<template src="./sales-literature-info-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { SalesLiteratureInfoViewBase } from './sales-literature-info-view-base';
import view_tabexppanel from '@widgets/sales-literature/info-viewtabexppanel-tabexppanel/info-viewtabexppanel-tabexppanel.vue';
/**
* 销售宣传资料信息视图
*
* @export
* @class SalesLiteratureInfoView
* @extends {SalesLiteratureInfoViewBase}
*/
@Component({
components: {
view_tabexppanel,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$store.commit('addCurPageViewtag', { route: to, viewtag: vm.viewtag });
});
}
})
@VueLifeCycleProcessing()
export default class SalesLiteratureInfoView extends SalesLiteratureInfoViewBase { }
</script>
import { Subject } from 'rxjs';
import { EditViewBase } from '@/studio-core';
import SalesLiteratureItemService from '@/service/sales-literature-item/sales-literature-item-service';
import EditViewEngine from '@engine/view/edit-view-engine';
/**
* 销售附件编辑视图视图基类
*
* @export
* @class SalesLiteratureItemEditViewBase
* @extends {EditViewBase}
*/
export class SalesLiteratureItemEditViewBase extends EditViewBase {
/**
* 实体服务对象
*
* @type {SalesLiteratureItemService}
* @memberof SalesLiteratureItemEditViewBase
*/
protected appEntityService: SalesLiteratureItemService = new SalesLiteratureItemService;
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof SalesLiteratureItemEditViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof SalesLiteratureItemEditViewBase
*/
protected model: any = {
srfCaption: 'entities.salesliteratureitem.views.editview.caption',
srfTitle: 'entities.salesliteratureitem.views.editview.title',
srfSubTitle: 'entities.salesliteratureitem.views.editview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof SalesLiteratureItemEditViewBase
*/
protected containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_form: { name: 'form', type: 'FORM' },
};
/**
* 工具栏模型
*
* @type {*}
* @memberof SalesLiteratureItemEditView
*/
public toolBarModels: any = {
tbitem1: { name: 'tbitem1', caption: '保存并关闭','isShowCaption':true,'isShowIcon':true, tooltip: '保存并关闭', iconcls: 'fa fa-power-off', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'SaveAndExit', target: '' }, class: '' },
tbitem2: { name: 'tbitem2', caption: '关闭','isShowCaption':true,'isShowIcon':true, tooltip: '关闭', iconcls: 'fa fa-sign-out', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Exit', target: '' }, class: '' },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = 'bb5324c14c92a03092c9f6eae01eb908';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof SalesLiteratureItemEditViewBase
*/
public engine: EditViewEngine = new EditViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof SalesLiteratureItemEditViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
form: this.$refs.form,
p2k: '0',
keyPSDEField: 'salesliteratureitem',
majorPSDEField: 'title',
isLoadDefault: true,
});
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SalesLiteratureItemEditViewBase
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'tbitem1')) {
this.toolbar_tbitem1_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem2')) {
this.toolbar_tbitem2_click(null, '', $event2);
}
}
/**
* form 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SalesLiteratureItemEditViewBase
*/
public form_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'save', $event);
}
/**
* form 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SalesLiteratureItemEditViewBase
*/
public form_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'remove', $event);
}
/**
* form 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SalesLiteratureItemEditViewBase
*/
public form_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'load', $event);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem1_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.SaveAndExit(datas, contextJO,paramJO, $event, xData,this,"SalesLiteratureItem");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem2_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Exit(datas, contextJO,paramJO, $event, xData,this,"SalesLiteratureItem");
}
/**
* 保存并关闭
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof SalesLiteratureItemEditViewBase
*/
public SaveAndExit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (xData && xData.saveAndExit instanceof Function) {
xData.saveAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
} else if (_this.saveAndExit && _this.saveAndExit instanceof Function) {
_this.saveAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
}
}
/**
* 关闭
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof SalesLiteratureItemEditViewBase
*/
public Exit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
this.closeView(args);
if(window.parent){
window.parent.postMessage([{ ...args }],'*');
}
}
}
\ No newline at end of file
<studio-view-style2 viewName="salesliteratureitemeditview" viewTitle="销售附件编辑视图" class='deeditview sales-literature-item-edit-view'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template>
<template slot="toolbar">
<view-toolbar mode="STYLE2" :model="toolBarModels" @item-click="toolbar_click($event)"/> </template>
<view_form
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:autosave="false"
:viewtag="viewtag"
:showBusyIndicator="true"
updateAction="Update"
removeAction="Remove"
loaddraftAction="GetDraft"
loadAction="Get"
createAction="Create"
WFSubmitAction=""
WFStartAction=""
style=''
name="form"
ref='form'
@save="form_save($event)"
@remove="form_remove($event)"
@load="form_load($event)"
@closeview="closeView($event)">
</view_form>
</studio-view-style2>
\ No newline at end of file
<template src="./sales-literature-item-edit-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { SalesLiteratureItemEditViewBase } from './sales-literature-item-edit-view-base';
import view_form from '@widgets/sales-literature-item/main-form/main-form.vue';
/**
* 销售附件编辑视图视图
*
* @export
* @class SalesLiteratureItemEditView
* @extends {SalesLiteratureItemEditViewBase}
*/
@Component({
components: {
view_form,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$store.commit('addCurPageViewtag', { route: to, viewtag: vm.viewtag });
});
}
})
@VueLifeCycleProcessing()
export default class SalesLiteratureItemEditView extends SalesLiteratureItemEditViewBase { }
</script>
<studio-view-style2 viewName="salesliteratureitemgridview" viewTitle="销售附件表格视图" class='degridview sales-literature-item-grid-view'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template>
<i-input slot="quickSearch" v-show="!isExpandSearchForm" v-model="query" search @on-search="onSearch($event)"/>
<template slot="toolbar">
<view-toolbar mode="STYLE2" :model="toolBarModels" @item-click="toolbar_click($event)"/> </template>
<template slot="searchForm">
<view_searchform
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:showBusyIndicator="true"
v-show="isExpandSearchForm"
loaddraftAction="FilterGetDraft"
loadAction="FilterGet"
name="searchform"
ref='searchform'
@save="searchform_save($event)"
@search="searchform_search($event)"
@load="searchform_load($event)"
@closeview="closeView($event)">
</view_searchform>
</template>
<view_grid
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:isSingleSelect="isSingleSelect"
:showBusyIndicator="true"
:isOpenEdit="false"
:gridRowActiveMode="gridRowActiveMode"
@save="onSave"
updateAction=""
removeAction="Remove"
loaddraftAction=""
loadAction=""
createAction=""
fetchAction="FetchDefault"
:newdata="newdata"
:opendata="opendata"
name="grid"
ref='grid'
@selectionchange="grid_selectionchange($event)"
@beforeload="grid_beforeload($event)"
@rowdblclick="grid_rowdblclick($event)"
@remove="grid_remove($event)"
@load="grid_load($event)"
@closeview="closeView($event)">
</view_grid>
</studio-view-style2>
\ No newline at end of file
<template src="./sales-literature-item-grid-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { SalesLiteratureItemGridViewBase } from './sales-literature-item-grid-view-base';
import view_grid from '@widgets/sales-literature-item/main-grid/main-grid.vue';
import view_searchform from '@widgets/sales-literature-item/default-searchform/default-searchform.vue';
/**
* 销售附件表格视图视图
*
* @export
* @class SalesLiteratureItemGridView
* @extends {SalesLiteratureItemGridViewBase}
*/
@Component({
components: {
view_grid,
view_searchform,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$store.commit('addCurPageViewtag', { route: to, viewtag: vm.viewtag });
});
}
})
@VueLifeCycleProcessing()
export default class SalesLiteratureItemGridView extends SalesLiteratureItemGridViewBase { }
</script>
import { Subject } from 'rxjs';
import { DashboardViewBase } from '@/studio-core';
import SalesLiteratureService from '@/service/sales-literature/sales-literature-service';
import PortalViewEngine from '@engine/view/portal-view-engine';
/**
* 销售宣传资料数据看板视图视图基类
*
* @export
* @class SalesLiteratureSummaryViewBase
* @extends {DashboardViewBase}
*/
export class SalesLiteratureSummaryViewBase extends DashboardViewBase {
/**
* 实体服务对象
*
* @type {SalesLiteratureService}
* @memberof SalesLiteratureSummaryViewBase
*/
protected appEntityService: SalesLiteratureService = new SalesLiteratureService;
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof SalesLiteratureSummaryViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof SalesLiteratureSummaryViewBase
*/
protected model: any = {
srfCaption: 'entities.salesliterature.views.summaryview.caption',
srfTitle: 'entities.salesliterature.views.summaryview.title',
srfSubTitle: 'entities.salesliterature.views.summaryview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof SalesLiteratureSummaryViewBase
*/
protected containerModel: any = {
view_dashboard: { name: 'dashboard', type: 'DASHBOARD' },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = '00e76d9dd6b3065c8231e9dc15334d05';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof SalesLiteratureSummaryViewBase
*/
public engine: PortalViewEngine = new PortalViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof SalesLiteratureSummaryViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
dashboard: this.$refs.dashboard,
keyPSDEField: 'salesliterature',
majorPSDEField: 'salesliteraturename',
isLoadDefault: true,
});
}
/**
* dashboard 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SalesLiteratureSummaryViewBase
*/
public dashboard_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('dashboard', 'load', $event);
}
}
\ No newline at end of file
<studio-view-style2 viewName="salesliteraturesummaryview" viewTitle="销售宣传资料数据看板视图" class='deportalview sales-literature-summary-view'>
<view_dashboard
:viewState="viewState"
:viewparams="viewparams"
:context="JSON.parse(JSON.stringify(context))"
:isEnableCustomized = "false"
name="dashboard"
ref='dashboard'
@load="dashboard_load($event)"
@closeview="closeView($event)">
</view_dashboard>
</studio-view-style2>
\ No newline at end of file
<template src="./sales-literature-summary-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { SalesLiteratureSummaryViewBase } from './sales-literature-summary-view-base';
import view_dashboard from '@widgets/sales-literature/sal-lit-info-dashboard/sal-lit-info-dashboard.vue';
/**
* 销售宣传资料数据看板视图视图
*
* @export
* @class SalesLiteratureSummaryView
* @extends {SalesLiteratureSummaryViewBase}
*/
@Component({
components: {
view_dashboard,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$store.commit('addCurPageViewtag', { route: to, viewtag: vm.viewtag });
});
}
})
@VueLifeCycleProcessing()
export default class SalesLiteratureSummaryView extends SalesLiteratureSummaryViewBase { }
</script>
......@@ -7,7 +7,9 @@ export const PageComponents = {
Vue.component('competitor-option-view', () => import('@pages/sales/competitor-option-view/competitor-option-view.vue'));
Vue.component('campaign-response-by-parent-key', () => import('@pages/marketing/campaign-response-by-parent-key/campaign-response-by-parent-key.vue'));
Vue.component('account-edit-view', () => import('@pages/base/account-edit-view/account-edit-view.vue'));
Vue.component('sales-literature-summary-view', () => import('@pages/sales/sales-literature-summary-view/sales-literature-summary-view.vue'));
Vue.component('lead-pickup-view', () => import('@pages/sales/lead-pickup-view/lead-pickup-view.vue'));
Vue.component('product-sales-literature-sal-lit-pro-grid-view', () => import('@pages/sales/product-sales-literature-sal-lit-pro-grid-view/product-sales-literature-sal-lit-pro-grid-view.vue'));
Vue.component('incident-edit-view', () => import('@pages/service/incident-edit-view/incident-edit-view.vue'));
Vue.component('product-pickup-view', () => import('@pages/product/product-pickup-view/product-pickup-view.vue'));
Vue.component('quote-info-abstract', () => import('@pages/sales/quote-info-abstract/quote-info-abstract.vue'));
......@@ -66,8 +68,10 @@ export const PageComponents = {
Vue.component('invoice-summary-view', () => import('@pages/finance/invoice-summary-view/invoice-summary-view.vue'));
Vue.component('opportunity-edit-view', () => import('@pages/sales/opportunity-edit-view/opportunity-edit-view.vue'));
Vue.component('lead-info-contact', () => import('@pages/sales/lead-info-contact/lead-info-contact.vue'));
Vue.component('sales-literature-item-edit-view', () => import('@pages/sales/sales-literature-item-edit-view/sales-literature-item-edit-view.vue'));
Vue.component('competitor-grid-view', () => import('@pages/sales/competitor-grid-view/competitor-grid-view.vue'));
Vue.component('account-summary', () => import('@pages/base/account-summary/account-summary.vue'));
Vue.component('sales-literature-info-view', () => import('@pages/sales/sales-literature-info-view/sales-literature-info-view.vue'));
Vue.component('opportunity-product-opp-opp-pro-grid-view', () => import('@pages/sales/opportunity-product-opp-opp-pro-grid-view/opportunity-product-opp-opp-pro-grid-view.vue'));
Vue.component('ibiz-list-quick-create', () => import('@pages/marketing/ibiz-list-quick-create/ibiz-list-quick-create.vue'));
Vue.component('appointment-quick-create', () => import('@pages/base/appointment-quick-create/appointment-quick-create.vue'));
......@@ -84,6 +88,7 @@ export const PageComponents = {
Vue.component('sales-literature-grid-view', () => import('@pages/sales/sales-literature-grid-view/sales-literature-grid-view.vue'));
Vue.component('product-edit-view', () => import('@pages/product/product-edit-view/product-edit-view.vue'));
Vue.component('quote-grid-view', () => import('@pages/sales/quote-grid-view/quote-grid-view.vue'));
Vue.component('sales-literature-info-sal-lit-view', () => import('@pages/sales/sales-literature-info-sal-lit-view/sales-literature-info-sal-lit-view.vue'));
Vue.component('quote-option-view', () => import('@pages/sales/quote-option-view/quote-option-view.vue'));
Vue.component('campaign-edit-view', () => import('@pages/marketing/campaign-edit-view/campaign-edit-view.vue'));
Vue.component('opportunity-summary', () => import('@pages/sales/opportunity-summary/opportunity-summary.vue'));
......@@ -108,8 +113,8 @@ export const PageComponents = {
Vue.component('invoice-info-view', () => import('@pages/finance/invoice-info-view/invoice-info-view.vue'));
Vue.component('contact-by-account', () => import('@pages/base/contact-by-account/contact-by-account.vue'));
Vue.component('opportunity-opp-pro-dashboard-view', () => import('@pages/sales/opportunity-opp-pro-dashboard-view/opportunity-opp-pro-dashboard-view.vue'));
Vue.component('sales-literature-edit-view', () => import('@pages/sales/sales-literature-edit-view/sales-literature-edit-view.vue'));
Vue.component('ibiz-list-summary', () => import('@pages/marketing/ibiz-list-summary/ibiz-list-summary.vue'));
Vue.component('sales-literature-item-grid-view', () => import('@pages/sales/sales-literature-item-grid-view/sales-literature-item-grid-view.vue'));
Vue.component('lead-dashboard-view', () => import('@pages/sales/lead-dashboard-view/lead-dashboard-view.vue'));
Vue.component('sales-order-pickup-grid-view', () => import('@pages/sales/sales-order-pickup-grid-view/sales-order-pickup-grid-view.vue'));
Vue.component('list-account-quick-create-by-list', () => import('@pages/marketing/list-account-quick-create-by-list/list-account-quick-create-by-list.vue'));
......@@ -132,6 +137,7 @@ export const PageComponents = {
Vue.component('list-account-inner', () => import('@pages/marketing/list-account-inner/list-account-inner.vue'));
Vue.component('contact-summary', () => import('@pages/base/contact-summary/contact-summary.vue'));
Vue.component('task-edit-view', () => import('@pages/base/task-edit-view/task-edit-view.vue'));
Vue.component('product-sales-literature-sal-lit-pro-edit-view', () => import('@pages/sales/product-sales-literature-sal-lit-pro-edit-view/product-sales-literature-sal-lit-pro-edit-view.vue'));
Vue.component('sales-order-summary-view', () => import('@pages/sales/sales-order-summary-view/sales-order-summary-view.vue'));
Vue.component('contact-info-market', () => import('@pages/base/contact-info-market/contact-info-market.vue'));
Vue.component('quote-detail-edit-view', () => import('@pages/sales/quote-detail-edit-view/quote-detail-edit-view.vue'));
......
......@@ -62,21 +62,6 @@ export default class CampaignServiceBase extends EntityService {
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
let leadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){
leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any);
if(leadsData && leadsData.length && leadsData.length > 0){
leadsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.leadid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.leads = leadsData;
let campaigncampaignsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_campaigncampaigns'),'undefined')){
campaigncampaignsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_campaigncampaigns') as any);
......@@ -107,6 +92,21 @@ export default class CampaignServiceBase extends EntityService {
}
}
masterData.campaignlists = campaignlistsData;
let leadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){
leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any);
if(leadsData && leadsData.length && leadsData.length > 0){
leadsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.leadid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.leads = leadsData;
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
......@@ -116,9 +116,9 @@ export default class CampaignServiceBase extends EntityService {
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/campaigns`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(tempContext.srfsessionkey+'_campaigncampaigns',JSON.stringify(res.data.campaigncampaigns));
this.tempStorage.setItem(tempContext.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists));
this.tempStorage.setItem(tempContext.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
return res;
}
......@@ -133,21 +133,6 @@ export default class CampaignServiceBase extends EntityService {
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
let leadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){
leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any);
if(leadsData && leadsData.length && leadsData.length > 0){
leadsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.leadid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.leads = leadsData;
let campaigncampaignsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_campaigncampaigns'),'undefined')){
campaigncampaignsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_campaigncampaigns') as any);
......@@ -178,11 +163,26 @@ export default class CampaignServiceBase extends EntityService {
}
}
masterData.campaignlists = campaignlistsData;
let leadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){
leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any);
if(leadsData && leadsData.length && leadsData.length > 0){
leadsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.leadid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.leads = leadsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/campaigns/${context.campaign}/save`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(context.srfsessionkey+'_campaigncampaigns',JSON.stringify(res.data.campaigncampaigns));
this.tempStorage.setItem(context.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists));
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
return res;
}
......@@ -198,9 +198,9 @@ export default class CampaignServiceBase extends EntityService {
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/campaigns/getdraft`,isloading);
res.data.campaign = data.campaign;
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(context.srfsessionkey+'_campaigncampaigns',JSON.stringify(res.data.campaigncampaigns));
this.tempStorage.setItem(context.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists));
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
return res;
}
......@@ -215,21 +215,6 @@ export default class CampaignServiceBase extends EntityService {
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
let leadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){
leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any);
if(leadsData && leadsData.length && leadsData.length > 0){
leadsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.leadid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.leads = leadsData;
let campaigncampaignsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_campaigncampaigns'),'undefined')){
campaigncampaignsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_campaigncampaigns') as any);
......@@ -260,11 +245,26 @@ export default class CampaignServiceBase extends EntityService {
}
}
masterData.campaignlists = campaignlistsData;
let leadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){
leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any);
if(leadsData && leadsData.length && leadsData.length > 0){
leadsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.leadid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.leads = leadsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/campaigns/${context.campaign}`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(context.srfsessionkey+'_campaigncampaigns',JSON.stringify(res.data.campaigncampaigns));
this.tempStorage.setItem(context.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists));
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
return res;
}
......@@ -279,9 +279,9 @@ export default class CampaignServiceBase extends EntityService {
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/campaigns/${context.campaign}`,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(context.srfsessionkey+'_campaigncampaigns',JSON.stringify(res.data.campaigncampaigns));
this.tempStorage.setItem(context.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists));
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
return res;
}
......
......@@ -3,6 +3,16 @@
*/
export const viewstate: any = {
appviews: [
{
viewtag: '00e76d9dd6b3065c8231e9dc15334d05',
viewmodule: 'Sales',
viewname: 'SalesLiteratureSummaryView',
viewaction: '',
viewdatachange: false,
refviews: [
'a04bb3dac3122438b3b1096f5f370516',
],
},
{
viewtag: '016506dd3f47a5cf8530f2ca3dbdc7b7',
viewmodule: 'Base',
......@@ -118,6 +128,17 @@ export const viewstate: any = {
'da3f8c1f20f440f3df54d6c13a8de586',
],
},
{
viewtag: '10a21b9907d91ab1764c82df73571709',
viewmodule: 'Sales',
viewname: 'SalesLiteratureInfoView',
viewaction: '',
viewdatachange: false,
refviews: [
'00e76d9dd6b3065c8231e9dc15334d05',
'96cc644d7d763e47f3644aed0d9850f0',
],
},
{
viewtag: '10c5d33db64f3a1bda18c7571a679438',
viewmodule: 'Marketing',
......@@ -192,6 +213,16 @@ export const viewstate: any = {
refviews: [
],
},
{
viewtag: '1bc1e98908024887f7476018b9e314d1',
viewmodule: 'Sales',
viewname: 'SalesLiteratureItemGridView',
viewaction: '',
viewdatachange: false,
refviews: [
'bb5324c14c92a03092c9f6eae01eb908',
],
},
{
viewtag: '1bc48b15dbe69c5f30dafe489f58aacb',
viewmodule: 'Sales',
......@@ -319,15 +350,6 @@ export const viewstate: any = {
'44a690a1d62a390708480cb43f67d98b',
],
},
{
viewtag: '303fcfed216ca770612be2c0a97be789',
viewmodule: 'Sales',
viewname: 'SalesLiteratureEditView',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{
viewtag: '30458f00562fda145be535e56948b067',
viewmodule: 'Marketing',
......@@ -979,8 +1001,8 @@ export const viewstate: any = {
viewaction: '',
viewdatachange: false,
refviews: [
'303fcfed216ca770612be2c0a97be789',
'e45cd3d0a9959e1979243837b5dcfd2d',
'10a21b9907d91ab1764c82df73571709',
],
},
{
......@@ -1054,6 +1076,16 @@ export const viewstate: any = {
'c74c14188b89f72079643170a83c25f5',
],
},
{
viewtag: '96cc644d7d763e47f3644aed0d9850f0',
viewmodule: 'Sales',
viewname: 'ProductSalesLiteratureSalLitProGridView',
viewaction: '',
viewdatachange: false,
refviews: [
'b87dd501aa922d2c6278451ca1282c53',
],
},
{
viewtag: '99d4a530c13b03a98cd143f341394354',
viewmodule: 'Service',
......@@ -1089,6 +1121,17 @@ export const viewstate: any = {
'a5213905238dbc5d8e1a505029105cc9',
],
},
{
viewtag: 'a04bb3dac3122438b3b1096f5f370516',
viewmodule: 'Sales',
viewname: 'SalesLiteratureInfo_SalLitView',
viewaction: '',
viewdatachange: false,
refviews: [
'e52af970c14fd89546ac8ccaecab460c',
'1bc1e98908024887f7476018b9e314d1',
],
},
{
viewtag: 'a0baf844a4d48914ee2623448b1a73fb',
viewmodule: 'Marketing',
......@@ -1349,6 +1392,16 @@ export const viewstate: any = {
'85781d107d628dfc6cdf9693797f073e',
],
},
{
viewtag: 'b87dd501aa922d2c6278451ca1282c53',
viewmodule: 'Sales',
viewname: 'ProductSalesLiteratureSalLitProEditView',
viewaction: '',
viewdatachange: false,
refviews: [
'ba34ee36c1d0de288403607e17e7eb3e',
],
},
{
viewtag: 'ba34ee36c1d0de288403607e17e7eb3e',
viewmodule: 'Product',
......@@ -1380,6 +1433,15 @@ export const viewstate: any = {
'a5213905238dbc5d8e1a505029105cc9',
],
},
{
viewtag: 'bb5324c14c92a03092c9f6eae01eb908',
viewmodule: 'Sales',
viewname: 'SalesLiteratureItemEditView',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{
viewtag: 'bf670ca93d5a63c4feba5a3cc3de7a9c',
viewmodule: 'Sales',
......
......@@ -80,6 +80,7 @@ export default class SalesLiteratureUIServiceBase extends UIService {
*/
public initViewMap(){
this.allViewMap.set(':',{viewname:'summaryview',srfappde:'salesliteratures'});
this.allViewMap.set(':',{viewname:'infoview',srfappde:'salesliteratures'});
this.allViewMap.set('EDITVIEW:',{viewname:'editview',srfappde:'salesliteratures'});
this.allViewMap.set('MDATAVIEW:',{viewname:'gridview',srfappde:'salesliteratures'});
this.allViewMap.set(':',{viewname:'info_sallitview',srfappde:'salesliteratures'});
......
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, SearchFormControlBase } from '@/studio-core';
import ProductSalesLiteratureService from '@/service/product-sales-literature/product-sales-literature-service';
import DefaultService from './default-searchform-service';
import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail';
import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
/**
* searchform部件基类
*
* @export
* @class SearchFormControlBase
* @extends {DefaultSearchFormBase}
*/
export class DefaultSearchFormBase extends SearchFormControlBase {
/**
* 建构部件服务对象
*
* @type {DefaultService}
* @memberof DefaultSearchFormBase
*/
public service: DefaultService = new DefaultService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {ProductSalesLiteratureService}
* @memberof DefaultSearchFormBase
*/
public appEntityService: ProductSalesLiteratureService = new ProductSalesLiteratureService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof DefaultSearchFormBase
*/
protected appDeName: string = 'productsalesliterature';
/**
* 表单数据对象
*
* @type {*}
* @memberof DefaultSearchFormBase
*/
public data: any = {
};
/**
* 详情模型集合
*
* @type {*}
* @memberof DefaultSearchFormBase
*/
public detailsModel: any = {
formpage1: new FormPageModel({ caption: '常规条件', detailType: 'FORMPAGE', name: 'formpage1', visible: true, isShowCaption: true, form: this })
,
};
}
\ No newline at end of file
/**
* Default 部件模型
*
* @export
* @class DefaultModel
*/
export default class DefaultModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof DefaultModel
*/
public getDataItems(): any[] {
return [
{
name: 'srfwfmemo',
prop: 'srfwfmemo',
dataType: 'TEXT',
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name: 'srffrontuf',
prop: 'srffrontuf',
dataType: 'TEXT',
},
]
}
}
\ No newline at end of file
<i-form :model="this.data" class='app-search-form' ref='searchform' style="">
<input style="display:none;"/>
<div class="search-button">
<i-button size="small" type="primary" ghost @click="onSearch.apply(_self, arguments)">{{$t('app.searchButton.search')}}</i-button>
<i-button size="small" type="default" ghost @click="onReset.apply(_self, arguments)">{{this.$t('app.searchButton.reset')}}</i-button>
</div>
<div class="form-content">
</div>
</i-form>
\ No newline at end of file
<template src="./default-searchform.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { DefaultSearchFormBase } from './default-searchform-base';
/**
* searchform部件
*
* @export
* @class DefaultSearchForm
* @extends {DefaultSearchFormBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class DefaultSearchForm extends DefaultSearchFormBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, EditFormControlBase } from '@/studio-core';
import ProductSalesLiteratureService from '@/service/product-sales-literature/product-sales-literature-service';
import SalLitProService from './sal-lit-pro-form-service';
import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail';
/**
* form部件基类
*
* @export
* @class EditFormControlBase
* @extends {SalLitProEditFormBase}
*/
export class SalLitProEditFormBase extends EditFormControlBase {
/**
* 建构部件服务对象
*
* @type {SalLitProService}
* @memberof SalLitProEditFormBase
*/
public service: SalLitProService = new SalLitProService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {ProductSalesLiteratureService}
* @memberof SalLitProEditFormBase
*/
public appEntityService: ProductSalesLiteratureService = new ProductSalesLiteratureService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof SalLitProEditFormBase
*/
protected appDeName: string = 'productsalesliterature';
/**
* 表单数据对象
*
* @type {*}
* @memberof SalLitProEditFormBase
*/
public data: any = {
srfupdatedate: null,
srforikey: null,
srfkey: null,
srfmajortext: null,
srftempmode: null,
srfuf: null,
srfdeid: null,
srfsourcekey: null,
entity2id: null,
entityname: null,
relationshipsid: null,
entityid: null,
productsalesliterature:null,
};
/**
* 属性值规则
*
* @type {*}
* @memberof SalLitProEditFormBase
*/
public rules: any = {
}
/**
* 详情模型集合
*
* @type {*}
* @memberof SalLitProEditFormBase
*/
public detailsModel: any = {
group1: new FormGroupPanelModel({ caption: '产品宣传资料基本信息', detailType: 'GROUPPANEL', name: 'group1', visible: true, isShowCaption: false, form: this, uiActionGroup: { caption: '', langbase: 'entities.productsalesliterature.sallitpro_form', extractMode: 'ITEM', details: [] } }),
formpage1: new FormPageModel({ caption: '基本信息', detailType: 'FORMPAGE', name: 'formpage1', visible: true, isShowCaption: true, form: this }),
srfupdatedate: new FormItemModel({ caption: '更新时间', detailType: 'FORMITEM', name: 'srfupdatedate', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srforikey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srforikey', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srfkey: new FormItemModel({ caption: '关系标识', detailType: 'FORMITEM', name: 'srfkey', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srfmajortext: new FormItemModel({ caption: '关系名称', detailType: 'FORMITEM', name: 'srfmajortext', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srftempmode: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srftempmode', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srfuf: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfuf', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srfdeid: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfdeid', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srfsourcekey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfsourcekey', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
entity2id: new FormItemModel({ caption: '销售宣传资料', detailType: 'FORMITEM', name: 'entity2id', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
entityname: new FormItemModel({ caption: '产品', detailType: 'FORMITEM', name: 'entityname', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
relationshipsid: new FormItemModel({ caption: '关系标识', detailType: 'FORMITEM', name: 'relationshipsid', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
entityid: new FormItemModel({ caption: '产品', detailType: 'FORMITEM', name: 'entityid', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
};
}
\ No newline at end of file
<template src="./sal-lit-pro-form.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { SalLitProEditFormBase } from './sal-lit-pro-form-base';
/**
* form部件
*
* @export
* @class SalLitProEditForm
* @extends {SalLitProEditFormBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class SalLitProEditForm extends SalLitProEditFormBase { }
</script>
<i-form :model="this.data" class='app-search-form' ref='searchform' style="">
<input style="display:none;"/>
<div class="search-button">
<i-button size="small" type="primary" ghost @click="onSearch.apply(_self, arguments)">{{$t('app.searchButton.search')}}</i-button>
<i-button size="small" type="default" ghost @click="onReset.apply(_self, arguments)">{{this.$t('app.searchButton.reset')}}</i-button>
</div>
<div class="form-content">
</div>
</i-form>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册