提交 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 deResParameters: any[] = []; })
if(tempContext.campaign && true){ let container: Subject<any> = this.$appmodal.openModal(openViewModel.view, JSON.parse(JSON.stringify(this.context)), args[0]);
deResParameters = [ container.subscribe((result: any) => {
{ pathName: 'campaigns', parameterName: 'campaign' }, if (!result || !Object.is(result.ret, 'OK')) {
] return;
} }
const parameters: any[] = [ if(result.datas && result.datas.length == 0){
{ pathName: 'campaignlists', parameterName: 'campaignlist' }, return;
{ pathName: 'editview', parameterName: 'editview' }, }
]; let requestParam:Array<any> = [];
const _this: any = this; result.datas.forEach((record:any) => {
const openIndexViewTab = (data: any) => { let tempParam:any = {};
const _data: any = { w: (new Date().getTime()) }; tempParam[otherViewModel.resAppKey] = this.context['srfparentkey'];
Object.assign(_data, data); tempParam[openViewModel.resAppKey] = record.srfkey;
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, _data); requestParam.push(tempParam);
this.$router.push(routePath); });
} this.appEntityService.createBatch(JSON.parse(JSON.stringify(this.context)),requestParam,true).then((response:any) =>{
openIndexViewTab(data); if (!response || response.status !== 200) {
this.$Notice.error({ title: '错误', desc: '批处理操作失败' });
return;
}
if (!xData || !(xData.refresh instanceof Function)) {
return;
}
xData.refresh(result.datas);
});
});
} }
......
...@@ -898,29 +898,34 @@ export default class ListAccountByListBase extends Vue { ...@@ -898,29 +898,34 @@ 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)); let openViewModel:any = batchAddPSAppViews.find((item:any) =>{
delete tempContext.listaccount; 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 deResParameters: any[] = []; })
if(tempContext.account && true){ let container: Subject<any> = this.$appmodal.openModal(openViewModel.view, JSON.parse(JSON.stringify(this.context)), args[0]);
deResParameters = [ container.subscribe((result: any) => {
{ pathName: 'accounts', parameterName: 'account' }, if (!result || !Object.is(result.ret, 'OK')) {
] return;
} }
const parameters: any[] = [ if(result.datas && result.datas.length == 0){
{ pathName: 'listaccounts', parameterName: 'listaccount' }, return;
]; }
const _this: any = this; let requestParam:Array<any> = [];
const openDrawer = (view: any, data: any) => { result.datas.forEach((record:any) => {
let container: Subject<any> = this.$appdrawer.openDrawer(view, tempContext, data); let tempParam:any = {};
container.subscribe((result: any) => { tempParam[otherViewModel.resAppKey] = this.context['srfparentkey'];
if (!result || !Object.is(result.ret, 'OK')) { 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; return;
} }
if (!xData || !(xData.refresh instanceof Function)) { if (!xData || !(xData.refresh instanceof Function)) {
...@@ -928,15 +933,7 @@ export default class ListAccountByListBase extends Vue { ...@@ -928,15 +933,7 @@ export default class ListAccountByListBase extends Vue {
} }
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 deResParameters: any[] = []; })
if(tempContext.contact && true){ let container: Subject<any> = this.$appmodal.openModal(openViewModel.view, JSON.parse(JSON.stringify(this.context)), args[0]);
deResParameters = [ container.subscribe((result: any) => {
{ pathName: 'contacts', parameterName: 'contact' }, if (!result || !Object.is(result.ret, 'OK')) {
] return;
} }
const parameters: any[] = [ if(result.datas && result.datas.length == 0){
{ pathName: 'listcontacts', parameterName: 'listcontact' }, return;
{ pathName: 'editview', parameterName: 'editview' }, }
]; let requestParam:Array<any> = [];
const _this: any = this; result.datas.forEach((record:any) => {
const openIndexViewTab = (data: any) => { let tempParam:any = {};
const _data: any = { w: (new Date().getTime()) }; tempParam[otherViewModel.resAppKey] = this.context['srfparentkey'];
Object.assign(_data, data); tempParam[openViewModel.resAppKey] = record.srfkey;
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, _data); requestParam.push(tempParam);
this.$router.push(routePath); });
} this.appEntityService.createBatch(JSON.parse(JSON.stringify(this.context)),requestParam,true).then((response:any) =>{
openIndexViewTab(data); if (!response || response.status !== 200) {
this.$Notice.error({ title: '错误', desc: '批处理操作失败' });
return;
}
if (!xData || !(xData.refresh instanceof Function)) {
return;
}
xData.refresh(result.datas);
});
});
} }
......
...@@ -898,29 +898,34 @@ export default class ListLeadByListBase extends Vue { ...@@ -898,29 +898,34 @@ 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)); let openViewModel:any = batchAddPSAppViews.find((item:any) =>{
delete tempContext.listlead; 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 deResParameters: any[] = []; })
if(tempContext.lead && true){ let container: Subject<any> = this.$appmodal.openModal(openViewModel.view, JSON.parse(JSON.stringify(this.context)), args[0]);
deResParameters = [ container.subscribe((result: any) => {
{ pathName: 'leads', parameterName: 'lead' }, if (!result || !Object.is(result.ret, 'OK')) {
] return;
} }
const parameters: any[] = [ if(result.datas && result.datas.length == 0){
{ pathName: 'listleads', parameterName: 'listlead' }, return;
]; }
const _this: any = this; let requestParam:Array<any> = [];
const openDrawer = (view: any, data: any) => { result.datas.forEach((record:any) => {
let container: Subject<any> = this.$appdrawer.openDrawer(view, tempContext, data); let tempParam:any = {};
container.subscribe((result: any) => { tempParam[otherViewModel.resAppKey] = this.context['srfparentkey'];
if (!result || !Object.is(result.ret, 'OK')) { 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; return;
} }
if (!xData || !(xData.refresh instanceof Function)) { if (!xData || !(xData.refresh instanceof Function)) {
...@@ -928,15 +933,7 @@ export default class ListLeadByListBase extends Vue { ...@@ -928,15 +933,7 @@ export default class ListLeadByListBase extends Vue {
} }
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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册