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

xignzi006 发布系统代码

上级 fcbaff85
......@@ -450,29 +450,35 @@ export class LeadCompetitorCompetitorGridViewBase extends GridViewBase {
public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) {
let localContext:any = null;
let localViewParam:any =null;
const data: any = {};
if(args[0].srfsourcekey){
data.srfsourcekey = args[0].srfsourcekey;
let batchAddPSAppViews:Array<any>=[];
if(batchAddPSAppViews.length == 0 || !this.context.srfparentdename){
this.$Notice.warning({ title: '错误', desc: '批量添加需添加N:N关系' });
return;
}
let tempContext = JSON.parse(JSON.stringify(this.context));
delete tempContext.leadcompetitor;
if(args.length >0){
Object.assign(tempContext,args[0]);
}
let deResParameters: any[] = [];
if(tempContext.competitor && true){
deResParameters = [
{ pathName: 'competitors', parameterName: 'competitor' },
]
}
const parameters: any[] = [
{ pathName: 'leadcompetitors', parameterName: 'leadcompetitor' },
];
const _this: any = this;
const openDrawer = (view: any, data: any) => {
let container: Subject<any> = this.$appdrawer.openDrawer(view, tempContext, data);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
let openViewModel:any = batchAddPSAppViews.find((item:any) =>{
return (item.res && (item.res[0] !== this.context.srfparentdename));
})
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;
}
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)) {
......@@ -480,15 +486,7 @@ export class LeadCompetitorCompetitorGridViewBase extends GridViewBase {
}
xData.refresh(result.datas);
});
}
const view: any = {
viewname: 'lead-competitor-edit-competitor-view',
height: 0,
width: 0,
title: this.$t('entities.leadcompetitor.views.edit_competitorview.title'),
placement: 'DRAWER_RIGHT',
};
openDrawer(view, data);
});
}
......
......@@ -450,29 +450,35 @@ export class LeadCompetitorLeadGridViewBase extends GridViewBase {
public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) {
let localContext:any = null;
let localViewParam:any =null;
const data: any = {};
if(args[0].srfsourcekey){
data.srfsourcekey = args[0].srfsourcekey;
let batchAddPSAppViews:Array<any>=[];
if(batchAddPSAppViews.length == 0 || !this.context.srfparentdename){
this.$Notice.warning({ title: '错误', desc: '批量添加需添加N:N关系' });
return;
}
let tempContext = JSON.parse(JSON.stringify(this.context));
delete tempContext.leadcompetitor;
if(args.length >0){
Object.assign(tempContext,args[0]);
}
let deResParameters: any[] = [];
if(tempContext.competitor && true){
deResParameters = [
{ pathName: 'competitors', parameterName: 'competitor' },
]
}
const parameters: any[] = [
{ pathName: 'leadcompetitors', parameterName: 'leadcompetitor' },
];
const _this: any = this;
const openDrawer = (view: any, data: any) => {
let container: Subject<any> = this.$appdrawer.openDrawer(view, tempContext, data);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
let openViewModel:any = batchAddPSAppViews.find((item:any) =>{
return (item.res && (item.res[0] !== this.context.srfparentdename));
})
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;
}
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)) {
......@@ -480,15 +486,7 @@ export class LeadCompetitorLeadGridViewBase extends GridViewBase {
}
xData.refresh(result.datas);
});
}
const view: any = {
viewname: 'lead-competitor-edit-competitor-view',
height: 0,
width: 0,
title: this.$t('entities.leadcompetitor.views.edit_competitorview.title'),
placement: 'DRAWER_RIGHT',
};
openDrawer(view, data);
});
}
......
......@@ -2419,7 +2419,7 @@
<!--输出实体[COMPETITOR]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-competitor-76-32">
<changeSet author="a_LAB01_e85d8801c" id="tab-competitor-77-32">
<createTable tableName="COMPETITOR">
<column name="ENTITYIMAGE" remarks="" type="VARCHAR(100)">
</column>
......@@ -5805,7 +5805,7 @@
<!--输出实体[LEAD]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-lead-231-70">
<changeSet author="a_LAB01_e85d8801c" id="tab-lead-232-70">
<createTable tableName="LEAD">
<column name="ADDRESS1_FAX" remarks="" type="VARCHAR(50)">
</column>
......@@ -11159,7 +11159,7 @@
<addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="CHARACTERISTIC" constraintName="DER1N_CHARACTERISTIC__TRANSACT" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/>
</changeSet>
<!--输出实体[COMPETITOR]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-competitor-76-190">
<changeSet author="a_LAB01_e85d8801c" id="fk-competitor-77-190">
<addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="COMPETITOR" constraintName="DER1N_COMPETITOR__TRANSACTIONC" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/>
</changeSet>
<!--输出实体[COMPETITORPRODUCT]外键关系 -->
......@@ -11479,28 +11479,28 @@
</changeSet>
<!--输出实体[LANGUAGELOCALE]外键关系 -->
<!--输出实体[LEAD]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-231-301">
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-232-301">
<addForeignKeyConstraint baseColumnNames="PARENTACCOUNTID" baseTableName="LEAD" constraintName="DER1N_LEAD__ACCOUNT__PARENTACC" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ACCOUNTID" referencedTableName="ACCOUNT" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-231-302">
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-232-302">
<addForeignKeyConstraint baseColumnNames="RELATEDOBJECTID" baseTableName="LEAD" constraintName="DER1N_LEAD__CAMPAIGNRESPONSE__" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ACTIVITYID" referencedTableName="CAMPAIGNRESPONSE" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-231-303">
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-232-303">
<addForeignKeyConstraint baseColumnNames="CAMPAIGNID" baseTableName="LEAD" constraintName="DER1N_LEAD__CAMPAIGN__CAMPAIGN" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="CAMPAIGNID" referencedTableName="CAMPAIGN" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-231-304">
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-232-304">
<addForeignKeyConstraint baseColumnNames="PARENTCONTACTID" baseTableName="LEAD" constraintName="DER1N_LEAD__CONTACT__PARENTCON" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="CONTACTID" referencedTableName="CONTACT" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-231-305">
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-232-305">
<addForeignKeyConstraint baseColumnNames="ORIGINATINGCASEID" baseTableName="LEAD" constraintName="DER1N_LEAD__INCIDENT__ORIGINAT" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="INCIDENTID" referencedTableName="INCIDENT" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-231-306">
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-232-306">
<addForeignKeyConstraint baseColumnNames="QUALIFYINGOPPORTUNITYID" baseTableName="LEAD" constraintName="DER1N_LEAD__OPPORTUNITY__QUALI" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="OPPORTUNITYID" referencedTableName="OPPORTUNITY" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-231-307">
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-232-307">
<addForeignKeyConstraint baseColumnNames="SLAID" baseTableName="LEAD" constraintName="DER1N_LEAD__SLA__SLAID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SLAID" referencedTableName="SLA" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-231-308">
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-232-308">
<addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="LEAD" constraintName="DER1N_LEAD__TRANSACTIONCURRENC" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/>
</changeSet>
<!--输出实体[LEADADDRESS]外键关系 -->
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册