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

lab_gzf 发布系统代码

上级 b5785947
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<template> <template>
<studio-view-style2 viewName="accountinfo" viewTitle="客户信息" class='detabexpview account-info'> <studio-view-style2 viewName="accountinfo" viewTitle="客户信息" class='detabexpview account-info'>
<template slot='title'> <template slot='title'>
<span class='caption-image'><img src=' '/></span>
<span class='caption-info'>{{$t(model.srfTitle)}}</span> <span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template> </template>
<template slot="toolbar"> <template slot="toolbar">
......
...@@ -901,33 +901,42 @@ export default class CampaignListGridViewBase extends Vue { ...@@ -901,33 +901,42 @@ export default class CampaignListGridViewBase extends Vue {
public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) { public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) {
let localContext:any = null; let localContext:any = null;
let localViewParam:any =null; let localViewParam:any =null;
const data: any = {}; if(batchAddPSAppViews.length == 0 || !this.context.srfparentdename){
if(args[0].srfsourcekey){ this.$Notice.warning({ title: '错误', desc: '批量添加需添加N:N关系' });
data.srfsourcekey = args[0].srfsourcekey; return;
} }
let tempContext = JSON.parse(JSON.stringify(this.context)); let openViewModel:any = batchAddPSAppViews.find((item:any) =>{
delete tempContext.campaignlist; return (item.res && (item.res[0] !== this.context.srfparentdename));
if(args.length >0){ })
Object.assign(tempContext,args[0]); let otherViewModel:any = batchAddPSAppViews.find((item:any) =>{
return (item.res && (item.res[0] == this.context.srfparentdename));
})
let container: Subject<any> = this.$appmodal.openModal(openViewModel.view, JSON.parse(JSON.stringify(this.context)), args[0]);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
} }
let deResParameters: any[] = []; if(result.datas && result.datas.length == 0){
if(tempContext.campaign && true){ return;
deResParameters = [
{ pathName: 'campaigns', parameterName: 'campaign' },
]
} }
const parameters: any[] = [ let requestParam:Array<any> = [];
{ pathName: 'campaignlists', parameterName: 'campaignlist' }, result.datas.forEach((record:any) => {
{ pathName: 'editview', parameterName: 'editview' }, let tempParam:any = {};
]; tempParam[otherViewModel.resAppKey] = this.context['srfparentkey'];
const _this: any = this; tempParam[openViewModel.resAppKey] = record.srfkey;
const openIndexViewTab = (data: any) => { requestParam.push(tempParam);
const _data: any = { w: (new Date().getTime()) }; });
Object.assign(_data, data); this.appEntityService.createBatch(JSON.parse(JSON.stringify(this.context)),requestParam,true).then((response:any) =>{
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, _data); if (!response || response.status !== 200) {
this.$router.push(routePath); this.$Notice.error({ title: '错误', desc: '批处理操作失败' });
return;
} }
openIndexViewTab(data); if (!xData || !(xData.refresh instanceof Function)) {
return;
}
xData.refresh(result.datas);
});
});
} }
......
...@@ -898,45 +898,42 @@ export default class ListAccountByListBase extends Vue { ...@@ -898,45 +898,42 @@ export default class ListAccountByListBase extends Vue {
public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) { public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) {
let localContext:any = null; let localContext:any = null;
let localViewParam:any =null; let localViewParam:any =null;
const data: any = {}; if(batchAddPSAppViews.length == 0 || !this.context.srfparentdename){
if(args[0].srfsourcekey){ this.$Notice.warning({ title: '错误', desc: '批量添加需添加N:N关系' });
data.srfsourcekey = args[0].srfsourcekey; return;
}
let tempContext = JSON.parse(JSON.stringify(this.context));
delete tempContext.listaccount;
if(args.length >0){
Object.assign(tempContext,args[0]);
}
let deResParameters: any[] = [];
if(tempContext.account && true){
deResParameters = [
{ pathName: 'accounts', parameterName: 'account' },
]
} }
const parameters: any[] = [ let openViewModel:any = batchAddPSAppViews.find((item:any) =>{
{ pathName: 'listaccounts', parameterName: 'listaccount' }, return (item.res && (item.res[0] !== this.context.srfparentdename));
]; })
const _this: any = this; let otherViewModel:any = batchAddPSAppViews.find((item:any) =>{
const openDrawer = (view: any, data: any) => { return (item.res && (item.res[0] == this.context.srfparentdename));
let container: Subject<any> = this.$appdrawer.openDrawer(view, tempContext, data); })
let container: Subject<any> = this.$appmodal.openModal(openViewModel.view, JSON.parse(JSON.stringify(this.context)), args[0]);
container.subscribe((result: any) => { container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) { if (!result || !Object.is(result.ret, 'OK')) {
return; return;
} }
if(result.datas && result.datas.length == 0){
return;
}
let requestParam:Array<any> = [];
result.datas.forEach((record:any) => {
let tempParam:any = {};
tempParam[otherViewModel.resAppKey] = this.context['srfparentkey'];
tempParam[openViewModel.resAppKey] = record.srfkey;
requestParam.push(tempParam);
});
this.appEntityService.createBatch(JSON.parse(JSON.stringify(this.context)),requestParam,true).then((response:any) =>{
if (!response || response.status !== 200) {
this.$Notice.error({ title: '错误', desc: '批处理操作失败' });
return;
}
if (!xData || !(xData.refresh instanceof Function)) { if (!xData || !(xData.refresh instanceof Function)) {
return; return;
} }
xData.refresh(result.datas); xData.refresh(result.datas);
}); });
} });
const view: any = {
viewname: 'list-account-quick-create-by-list',
height: 0,
width: 450,
title: this.$t('entities.listaccount.views.quickcreatebylist.title'),
placement: 'DRAWER_RIGHT',
};
openDrawer(view, data);
} }
......
...@@ -901,33 +901,42 @@ export default class ListContactGridViewBase extends Vue { ...@@ -901,33 +901,42 @@ export default class ListContactGridViewBase extends Vue {
public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) { public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) {
let localContext:any = null; let localContext:any = null;
let localViewParam:any =null; let localViewParam:any =null;
const data: any = {}; if(batchAddPSAppViews.length == 0 || !this.context.srfparentdename){
if(args[0].srfsourcekey){ this.$Notice.warning({ title: '错误', desc: '批量添加需添加N:N关系' });
data.srfsourcekey = args[0].srfsourcekey; return;
} }
let tempContext = JSON.parse(JSON.stringify(this.context)); let openViewModel:any = batchAddPSAppViews.find((item:any) =>{
delete tempContext.listcontact; return (item.res && (item.res[0] !== this.context.srfparentdename));
if(args.length >0){ })
Object.assign(tempContext,args[0]); let otherViewModel:any = batchAddPSAppViews.find((item:any) =>{
return (item.res && (item.res[0] == this.context.srfparentdename));
})
let container: Subject<any> = this.$appmodal.openModal(openViewModel.view, JSON.parse(JSON.stringify(this.context)), args[0]);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
} }
let deResParameters: any[] = []; if(result.datas && result.datas.length == 0){
if(tempContext.contact && true){ return;
deResParameters = [
{ pathName: 'contacts', parameterName: 'contact' },
]
} }
const parameters: any[] = [ let requestParam:Array<any> = [];
{ pathName: 'listcontacts', parameterName: 'listcontact' }, result.datas.forEach((record:any) => {
{ pathName: 'editview', parameterName: 'editview' }, let tempParam:any = {};
]; tempParam[otherViewModel.resAppKey] = this.context['srfparentkey'];
const _this: any = this; tempParam[openViewModel.resAppKey] = record.srfkey;
const openIndexViewTab = (data: any) => { requestParam.push(tempParam);
const _data: any = { w: (new Date().getTime()) }; });
Object.assign(_data, data); this.appEntityService.createBatch(JSON.parse(JSON.stringify(this.context)),requestParam,true).then((response:any) =>{
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, _data); if (!response || response.status !== 200) {
this.$router.push(routePath); this.$Notice.error({ title: '错误', desc: '批处理操作失败' });
return;
} }
openIndexViewTab(data); if (!xData || !(xData.refresh instanceof Function)) {
return;
}
xData.refresh(result.datas);
});
});
} }
......
...@@ -898,45 +898,42 @@ export default class ListLeadByListBase extends Vue { ...@@ -898,45 +898,42 @@ export default class ListLeadByListBase extends Vue {
public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) { public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) {
let localContext:any = null; let localContext:any = null;
let localViewParam:any =null; let localViewParam:any =null;
const data: any = {}; if(batchAddPSAppViews.length == 0 || !this.context.srfparentdename){
if(args[0].srfsourcekey){ this.$Notice.warning({ title: '错误', desc: '批量添加需添加N:N关系' });
data.srfsourcekey = args[0].srfsourcekey; return;
}
let tempContext = JSON.parse(JSON.stringify(this.context));
delete tempContext.listlead;
if(args.length >0){
Object.assign(tempContext,args[0]);
}
let deResParameters: any[] = [];
if(tempContext.lead && true){
deResParameters = [
{ pathName: 'leads', parameterName: 'lead' },
]
} }
const parameters: any[] = [ let openViewModel:any = batchAddPSAppViews.find((item:any) =>{
{ pathName: 'listleads', parameterName: 'listlead' }, return (item.res && (item.res[0] !== this.context.srfparentdename));
]; })
const _this: any = this; let otherViewModel:any = batchAddPSAppViews.find((item:any) =>{
const openDrawer = (view: any, data: any) => { return (item.res && (item.res[0] == this.context.srfparentdename));
let container: Subject<any> = this.$appdrawer.openDrawer(view, tempContext, data); })
let container: Subject<any> = this.$appmodal.openModal(openViewModel.view, JSON.parse(JSON.stringify(this.context)), args[0]);
container.subscribe((result: any) => { container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) { if (!result || !Object.is(result.ret, 'OK')) {
return; return;
} }
if(result.datas && result.datas.length == 0){
return;
}
let requestParam:Array<any> = [];
result.datas.forEach((record:any) => {
let tempParam:any = {};
tempParam[otherViewModel.resAppKey] = this.context['srfparentkey'];
tempParam[openViewModel.resAppKey] = record.srfkey;
requestParam.push(tempParam);
});
this.appEntityService.createBatch(JSON.parse(JSON.stringify(this.context)),requestParam,true).then((response:any) =>{
if (!response || response.status !== 200) {
this.$Notice.error({ title: '错误', desc: '批处理操作失败' });
return;
}
if (!xData || !(xData.refresh instanceof Function)) { if (!xData || !(xData.refresh instanceof Function)) {
return; return;
} }
xData.refresh(result.datas); xData.refresh(result.datas);
}); });
} });
const view: any = {
viewname: 'list-lead-quick-create-by-list',
height: 0,
width: 450,
title: this.$t('entities.listlead.views.quickcreatebylist.title'),
placement: 'DRAWER_RIGHT',
};
openDrawer(view, data);
} }
......
...@@ -1637,6 +1637,8 @@ const router = new Router({ ...@@ -1637,6 +1637,8 @@ const router = new Router({
meta: { meta: {
caption: 'entities.account.views.info.title', caption: 'entities.account.views.info.title',
info:'', info:'',
imgPath: '',
iconCls: 'fa fa-user',
parameters: [ parameters: [
{ pathName: 'central', parameterName: 'central' }, { pathName: 'central', parameterName: 'central' },
{ pathName: 'accounts', parameterName: 'account' }, { pathName: 'accounts', parameterName: 'account' },
...@@ -2393,6 +2395,8 @@ const router = new Router({ ...@@ -2393,6 +2395,8 @@ const router = new Router({
meta: { meta: {
caption: 'entities.account.views.info.title', caption: 'entities.account.views.info.title',
info:'', info:'',
imgPath: '',
iconCls: 'fa fa-user',
parameters: [ parameters: [
{ pathName: 'accounts', parameterName: 'account' }, { pathName: 'accounts', parameterName: 'account' },
{ pathName: 'info', parameterName: 'info' }, { pathName: 'info', parameterName: 'info' },
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性--> <!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="CampaignCampaignResultMap" databaseId="mysql"> <select id="selectById" resultMap="CampaignCampaignResultMap" databaseId="mysql">
<![CDATA[select t1.* from (SELECT t1.`ENTITY2ID` AS `CAMPAIGN2ID`, t1.`ENTITY2NAME` AS `CAMPAIGN2NAME`, t1.`ENTITYID` AS `CAMPAIGNID`, t1.`ENTITYNAME` AS `CAMPAIGNNAME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`RELATIONSHIPSID`, t1.`RELATIONSHIPSNAME`, t1.`RELATIONSHIPSTYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `RELATIONSHIPS` t1 ) t1 where relationshipsid=#{id}]]> <![CDATA[select t1.* from (SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENTITY2ID`, t1.`ENTITY2NAME`, t1.`ENTITYID`, t1.`ENTITYNAME`, t1.`RELATIONSHIPSID`, t1.`RELATIONSHIPSNAME`, t1.`RELATIONSHIPSTYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `RELATIONSHIPS` t1 ) t1 where relationshipsid=#{id}]]>
</select> </select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 --> <!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
...@@ -47,13 +47,13 @@ ...@@ -47,13 +47,13 @@
<!--数据查询[Default]--> <!--数据查询[Default]-->
<sql id="Default" databaseId="mysql"> <sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`ENTITY2ID` AS `CAMPAIGN2ID`, t1.`ENTITY2NAME` AS `CAMPAIGN2NAME`, t1.`ENTITYID` AS `CAMPAIGNID`, t1.`ENTITYNAME` AS `CAMPAIGNNAME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`RELATIONSHIPSID`, t1.`RELATIONSHIPSNAME`, t1.`RELATIONSHIPSTYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `RELATIONSHIPS` t1 <![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENTITY2ID`, t1.`ENTITY2NAME`, t1.`ENTITYID`, t1.`ENTITYNAME`, t1.`RELATIONSHIPSID`, t1.`RELATIONSHIPSNAME`, t1.`RELATIONSHIPSTYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `RELATIONSHIPS` t1
WHERE ( t1.`RELATIONSHIPSTYPE` = 'CAMPAIGNCAMPAIGN' ) WHERE ( t1.`RELATIONSHIPSTYPE` = 'CAMPAIGNCAMPAIGN' )
]]> ]]>
</sql> </sql>
<!--数据查询[View]--> <!--数据查询[View]-->
<sql id="View" databaseId="mysql"> <sql id="View" databaseId="mysql">
<![CDATA[ SELECT t1.`ENTITY2ID` AS `CAMPAIGN2ID`, t1.`ENTITY2NAME` AS `CAMPAIGN2NAME`, t1.`ENTITYID` AS `CAMPAIGNID`, t1.`ENTITYNAME` AS `CAMPAIGNNAME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`RELATIONSHIPSID`, t1.`RELATIONSHIPSNAME`, t1.`RELATIONSHIPSTYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `RELATIONSHIPS` t1 <![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENTITY2ID`, t1.`ENTITY2NAME`, t1.`ENTITYID`, t1.`ENTITYNAME`, t1.`RELATIONSHIPSID`, t1.`RELATIONSHIPSNAME`, t1.`RELATIONSHIPSTYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `RELATIONSHIPS` t1
WHERE ( t1.`RELATIONSHIPSTYPE` = 'CAMPAIGNCAMPAIGN' ) WHERE ( t1.`RELATIONSHIPSTYPE` = 'CAMPAIGNCAMPAIGN' )
]]> ]]>
</sql> </sql>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册