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

xignzi006 发布系统代码

上级 4b7e4e35
...@@ -478,9 +478,9 @@ export class LeadConLeadGridViewBase extends GridViewBase { ...@@ -478,9 +478,9 @@ export class LeadConLeadGridViewBase extends GridViewBase {
Object.assign(tempContext,args[0]); Object.assign(tempContext,args[0]);
} }
let deResParameters: any[] = []; let deResParameters: any[] = [];
if(tempContext.campaign && true){ if(tempContext.account && true){
deResParameters = [ deResParameters = [
{ pathName: 'campaigns', parameterName: 'campaign' }, { pathName: 'accounts', parameterName: 'account' },
] ]
} }
const parameters: any[] = [ const parameters: any[] = [
...@@ -529,9 +529,9 @@ export class LeadConLeadGridViewBase extends GridViewBase { ...@@ -529,9 +529,9 @@ export class LeadConLeadGridViewBase extends GridViewBase {
Object.assign(tempContext,args[0]); Object.assign(tempContext,args[0]);
} }
let deResParameters: any[] = []; let deResParameters: any[] = [];
if(tempContext.campaign && true){ if(tempContext.account && true){
deResParameters = [ deResParameters = [
{ pathName: 'campaigns', parameterName: 'campaign' }, { pathName: 'accounts', parameterName: 'account' },
] ]
} }
const parameters: any[] = [ const parameters: any[] = [
......
...@@ -478,9 +478,9 @@ export class LeadExcludedGridViewBase extends GridViewBase { ...@@ -478,9 +478,9 @@ export class LeadExcludedGridViewBase extends GridViewBase {
Object.assign(tempContext,args[0]); Object.assign(tempContext,args[0]);
} }
let deResParameters: any[] = []; let deResParameters: any[] = [];
if(tempContext.campaign && true){ if(tempContext.account && true){
deResParameters = [ deResParameters = [
{ pathName: 'campaigns', parameterName: 'campaign' }, { pathName: 'accounts', parameterName: 'account' },
] ]
} }
const parameters: any[] = [ const parameters: any[] = [
...@@ -529,9 +529,9 @@ export class LeadExcludedGridViewBase extends GridViewBase { ...@@ -529,9 +529,9 @@ export class LeadExcludedGridViewBase extends GridViewBase {
Object.assign(tempContext,args[0]); Object.assign(tempContext,args[0]);
} }
let deResParameters: any[] = []; let deResParameters: any[] = [];
if(tempContext.campaign && true){ if(tempContext.account && true){
deResParameters = [ deResParameters = [
{ pathName: 'campaigns', parameterName: 'campaign' }, { pathName: 'accounts', parameterName: 'account' },
] ]
} }
const parameters: any[] = [ const parameters: any[] = [
......
...@@ -478,9 +478,9 @@ export class LeadGridViewBase extends GridViewBase { ...@@ -478,9 +478,9 @@ export class LeadGridViewBase extends GridViewBase {
Object.assign(tempContext,args[0]); Object.assign(tempContext,args[0]);
} }
let deResParameters: any[] = []; let deResParameters: any[] = [];
if(tempContext.campaign && true){ if(tempContext.account && true){
deResParameters = [ deResParameters = [
{ pathName: 'campaigns', parameterName: 'campaign' }, { pathName: 'accounts', parameterName: 'account' },
] ]
} }
const parameters: any[] = [ const parameters: any[] = [
...@@ -529,9 +529,9 @@ export class LeadGridViewBase extends GridViewBase { ...@@ -529,9 +529,9 @@ export class LeadGridViewBase extends GridViewBase {
Object.assign(tempContext,args[0]); Object.assign(tempContext,args[0]);
} }
let deResParameters: any[] = []; let deResParameters: any[] = [];
if(tempContext.campaign && true){ if(tempContext.account && true){
deResParameters = [ deResParameters = [
{ pathName: 'campaigns', parameterName: 'campaign' }, { pathName: 'accounts', parameterName: 'account' },
] ]
} }
const parameters: any[] = [ const parameters: any[] = [
......
...@@ -618,9 +618,9 @@ export class LeadOnGridViewBase extends GridViewBase { ...@@ -618,9 +618,9 @@ export class LeadOnGridViewBase extends GridViewBase {
Object.assign(tempContext,args[0]); Object.assign(tempContext,args[0]);
} }
let deResParameters: any[] = []; let deResParameters: any[] = [];
if(tempContext.campaign && true){ if(tempContext.account && true){
deResParameters = [ deResParameters = [
{ pathName: 'campaigns', parameterName: 'campaign' }, { pathName: 'accounts', parameterName: 'account' },
] ]
} }
const parameters: any[] = [ const parameters: any[] = [
...@@ -669,9 +669,9 @@ export class LeadOnGridViewBase extends GridViewBase { ...@@ -669,9 +669,9 @@ export class LeadOnGridViewBase extends GridViewBase {
Object.assign(tempContext,args[0]); Object.assign(tempContext,args[0]);
} }
let deResParameters: any[] = []; let deResParameters: any[] = [];
if(tempContext.campaign && true){ if(tempContext.account && true){
deResParameters = [ deResParameters = [
{ pathName: 'campaigns', parameterName: 'campaign' }, { pathName: 'accounts', parameterName: 'account' },
] ]
} }
const parameters: any[] = [ const parameters: any[] = [
......
...@@ -443,9 +443,9 @@ export class OpportunityConOppGridViewBase extends GridViewBase { ...@@ -443,9 +443,9 @@ export class OpportunityConOppGridViewBase extends GridViewBase {
Object.assign(tempContext,args[0]); Object.assign(tempContext,args[0]);
} }
let deResParameters: any[] = []; let deResParameters: any[] = [];
if(tempContext.contact && true){ if(tempContext.account && true){
deResParameters = [ deResParameters = [
{ pathName: 'contacts', parameterName: 'contact' }, { pathName: 'accounts', parameterName: 'account' },
] ]
} }
const parameters: any[] = [ const parameters: any[] = [
...@@ -494,9 +494,9 @@ export class OpportunityConOppGridViewBase extends GridViewBase { ...@@ -494,9 +494,9 @@ export class OpportunityConOppGridViewBase extends GridViewBase {
Object.assign(tempContext,args[0]); Object.assign(tempContext,args[0]);
} }
let deResParameters: any[] = []; let deResParameters: any[] = [];
if(tempContext.contact && true){ if(tempContext.account && true){
deResParameters = [ deResParameters = [
{ pathName: 'contacts', parameterName: 'contact' }, { pathName: 'accounts', parameterName: 'account' },
] ]
} }
const parameters: any[] = [ const parameters: any[] = [
......
...@@ -478,9 +478,9 @@ export class OpportunityGridViewBase extends GridViewBase { ...@@ -478,9 +478,9 @@ export class OpportunityGridViewBase extends GridViewBase {
Object.assign(tempContext,args[0]); Object.assign(tempContext,args[0]);
} }
let deResParameters: any[] = []; let deResParameters: any[] = [];
if(tempContext.contact && true){ if(tempContext.account && true){
deResParameters = [ deResParameters = [
{ pathName: 'contacts', parameterName: 'contact' }, { pathName: 'accounts', parameterName: 'account' },
] ]
} }
const parameters: any[] = [ const parameters: any[] = [
...@@ -529,9 +529,9 @@ export class OpportunityGridViewBase extends GridViewBase { ...@@ -529,9 +529,9 @@ export class OpportunityGridViewBase extends GridViewBase {
Object.assign(tempContext,args[0]); Object.assign(tempContext,args[0]);
} }
let deResParameters: any[] = []; let deResParameters: any[] = [];
if(tempContext.contact && true){ if(tempContext.account && true){
deResParameters = [ deResParameters = [
{ pathName: 'contacts', parameterName: 'contact' }, { pathName: 'accounts', parameterName: 'account' },
] ]
} }
const parameters: any[] = [ const parameters: any[] = [
......
<studio-view-style2 viewName="opportunitygridview" viewTitle="商机信息" class='degridview opportunity-grid-view'> <studio-view-style2 viewName="opportunitygridview" viewTitle="商机信息" class='degridview opportunity-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)"/> <i-input slot="quickSearch" v-show="!isExpandSearchForm" v-model="query" search @on-search="onSearch($event)"/>
<template slot="toolbar"> <template slot="toolbar">
<view-toolbar mode="STYLE2" :model="toolBarModels" @item-click="toolbar_click($event)"/> </template> <view-toolbar mode="STYLE2" :model="toolBarModels" @item-click="toolbar_click($event)"/> </template>
......
<studio-view-style2 viewName="salesordergridview" viewTitle="订单信息" class='degridview sales-order-grid-view'> <studio-view-style2 viewName="salesordergridview" viewTitle="订单信息" class='degridview sales-order-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)"/> <i-input slot="quickSearch" v-show="!isExpandSearchForm" v-model="query" search @on-search="onSearch($event)"/>
<template slot="toolbar"> <template slot="toolbar">
<view-toolbar mode="STYLE2" :model="toolBarModels" @item-click="toolbar_click($event)"/> </template> <view-toolbar mode="STYLE2" :model="toolBarModels" @item-click="toolbar_click($event)"/> </template>
......
...@@ -64,6 +64,36 @@ export default class AccountServiceBase extends EntityService { ...@@ -64,6 +64,36 @@ export default class AccountServiceBase extends EntityService {
*/ */
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {}; let masterData:any = {};
let opportunitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunities'),'undefined')){
opportunitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunities') as any);
if(opportunitiesData && opportunitiesData.length && opportunitiesData.length > 0){
opportunitiesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.opportunityid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunities = opportunitiesData;
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 listaccountsData:any = []; let listaccountsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listaccounts'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listaccounts'),'undefined')){
listaccountsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listaccounts') as any); listaccountsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listaccounts') as any);
...@@ -103,6 +133,8 @@ export default class AccountServiceBase extends EntityService { ...@@ -103,6 +133,8 @@ export default class AccountServiceBase extends EntityService {
} }
let tempContext:any = JSON.parse(JSON.stringify(context)); let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/accounts`,data,isloading); let res:any = await Http.getInstance().post(`/accounts`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
this.tempStorage.setItem(tempContext.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(tempContext.srfsessionkey+'_listaccounts',JSON.stringify(res.data.listaccounts)); this.tempStorage.setItem(tempContext.srfsessionkey+'_listaccounts',JSON.stringify(res.data.listaccounts));
this.tempStorage.setItem(tempContext.srfsessionkey+'_contacts',JSON.stringify(res.data.contacts)); this.tempStorage.setItem(tempContext.srfsessionkey+'_contacts',JSON.stringify(res.data.contacts));
return res; return res;
...@@ -119,6 +151,36 @@ export default class AccountServiceBase extends EntityService { ...@@ -119,6 +151,36 @@ export default class AccountServiceBase extends EntityService {
*/ */
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {}; let masterData:any = {};
let opportunitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunities'),'undefined')){
opportunitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunities') as any);
if(opportunitiesData && opportunitiesData.length && opportunitiesData.length > 0){
opportunitiesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.opportunityid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunities = opportunitiesData;
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 listaccountsData:any = []; let listaccountsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listaccounts'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listaccounts'),'undefined')){
listaccountsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listaccounts') as any); listaccountsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listaccounts') as any);
...@@ -151,6 +213,8 @@ export default class AccountServiceBase extends EntityService { ...@@ -151,6 +213,8 @@ export default class AccountServiceBase extends EntityService {
masterData.contacts = contactsData; masterData.contacts = contactsData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/accounts/${context.account}`,data,isloading); let res:any = await Http.getInstance().put(`/accounts/${context.account}`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(context.srfsessionkey+'_listaccounts',JSON.stringify(res.data.listaccounts)); this.tempStorage.setItem(context.srfsessionkey+'_listaccounts',JSON.stringify(res.data.listaccounts));
this.tempStorage.setItem(context.srfsessionkey+'_contacts',JSON.stringify(res.data.contacts)); this.tempStorage.setItem(context.srfsessionkey+'_contacts',JSON.stringify(res.data.contacts));
return res; return res;
...@@ -180,6 +244,8 @@ export default class AccountServiceBase extends EntityService { ...@@ -180,6 +244,8 @@ export default class AccountServiceBase extends EntityService {
*/ */
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/accounts/${context.account}`,isloading); let res:any = await Http.getInstance().get(`/accounts/${context.account}`,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(context.srfsessionkey+'_listaccounts',JSON.stringify(res.data.listaccounts)); this.tempStorage.setItem(context.srfsessionkey+'_listaccounts',JSON.stringify(res.data.listaccounts));
this.tempStorage.setItem(context.srfsessionkey+'_contacts',JSON.stringify(res.data.contacts)); this.tempStorage.setItem(context.srfsessionkey+'_contacts',JSON.stringify(res.data.contacts));
return res; return res;
...@@ -197,6 +263,8 @@ export default class AccountServiceBase extends EntityService { ...@@ -197,6 +263,8 @@ export default class AccountServiceBase extends EntityService {
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/accounts/getdraft`,isloading); let res:any = await Http.getInstance().get(`/accounts/getdraft`,isloading);
res.data.account = data.account; res.data.account = data.account;
this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(context.srfsessionkey+'_listaccounts',JSON.stringify(res.data.listaccounts)); this.tempStorage.setItem(context.srfsessionkey+'_listaccounts',JSON.stringify(res.data.listaccounts));
this.tempStorage.setItem(context.srfsessionkey+'_contacts',JSON.stringify(res.data.contacts)); this.tempStorage.setItem(context.srfsessionkey+'_contacts',JSON.stringify(res.data.contacts));
return res; return res;
...@@ -269,6 +337,36 @@ export default class AccountServiceBase extends EntityService { ...@@ -269,6 +337,36 @@ export default class AccountServiceBase extends EntityService {
*/ */
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {}; let masterData:any = {};
let opportunitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunities'),'undefined')){
opportunitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunities') as any);
if(opportunitiesData && opportunitiesData.length && opportunitiesData.length > 0){
opportunitiesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.opportunityid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunities = opportunitiesData;
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 listaccountsData:any = []; let listaccountsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listaccounts'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listaccounts'),'undefined')){
listaccountsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listaccounts') as any); listaccountsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listaccounts') as any);
...@@ -301,6 +399,8 @@ export default class AccountServiceBase extends EntityService { ...@@ -301,6 +399,8 @@ export default class AccountServiceBase extends EntityService {
masterData.contacts = contactsData; masterData.contacts = contactsData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/accounts/${context.account}/save`,data,isloading); let res:any = await Http.getInstance().post(`/accounts/${context.account}/save`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(context.srfsessionkey+'_listaccounts',JSON.stringify(res.data.listaccounts)); this.tempStorage.setItem(context.srfsessionkey+'_listaccounts',JSON.stringify(res.data.listaccounts));
this.tempStorage.setItem(context.srfsessionkey+'_contacts',JSON.stringify(res.data.contacts)); this.tempStorage.setItem(context.srfsessionkey+'_contacts',JSON.stringify(res.data.contacts));
return res; return res;
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
valueitem='originatingleadid' valueitem='originatingleadid'
:value="data.originatingleadname" :value="data.originatingleadname"
editortype="" editortype=""
:pickupView="{ viewname: 'lead-pickup-view', title: $t('entities.lead.views.pickupview.title'), deResParameters: [{ pathName: 'campaigns', parameterName: 'campaign' }, ], parameters: [{ pathName: 'leads', parameterName: 'lead' }, { pathName: 'pickupview', parameterName: 'pickupview' } ], placement:'' }" :pickupView="{ viewname: 'lead-pickup-view', title: $t('entities.lead.views.pickupview.title'), deResParameters: [{ pathName: 'accounts', parameterName: 'account' }, ], parameters: [{ pathName: 'leads', parameterName: 'lead' }, { pathName: 'pickupview', parameterName: 'pickupview' } ], placement:'' }"
style="" style=""
@formitemvaluechange="onFormItemValueChange($event)"> @formitemvaluechange="onFormItemValueChange($event)">
</app-picker> </app-picker>
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
valueitem='entity2id' valueitem='entity2id'
:value="data.entity2name" :value="data.entity2name"
editortype="" editortype=""
:pickupView="{ viewname: 'lead-pickup-view', title: $t('entities.lead.views.pickupview.title'), deResParameters: [{ pathName: 'campaigns', parameterName: 'campaign' }, ], parameters: [{ pathName: 'leads', parameterName: 'lead' }, { pathName: 'pickupview', parameterName: 'pickupview' } ], placement:'' }" :pickupView="{ viewname: 'lead-pickup-view', title: $t('entities.lead.views.pickupview.title'), deResParameters: [{ pathName: 'accounts', parameterName: 'account' }, ], parameters: [{ pathName: 'leads', parameterName: 'lead' }, { pathName: 'pickupview', parameterName: 'pickupview' } ], placement:'' }"
style="" style=""
@formitemvaluechange="onFormItemValueChange($event)"> @formitemvaluechange="onFormItemValueChange($event)">
</app-picker> </app-picker>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册