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

xignzi006 发布系统代码

上级 d9f9ad3b
......@@ -1039,13 +1039,13 @@
"viewtag": "e38e7b53a449e0f112cb545d2c5d4b85",
"memo": "系统自动添加"
},
"contactoptionview": {
"title": "联系人选项操作视图",
"contactquickcreate": {
"title": "快速新建",
"caption": "联系人",
"viewtype": "DEOPTVIEW",
"viewmodule": "Base",
"viewname": "ContactOptionView",
"viewfilename": "contact-option-view",
"viewname": "ContactQuickCreate",
"viewfilename": "contact-quick-create",
"viewtag": "e404dc93e70d6284d4e1a083017625ed",
"memo": ""
},
......
......@@ -1605,4 +1605,20 @@ export interface Contact {
* @memberof Contact
*/
preferredequipmentname?: any;
/**
* 客户
*
* @returns {*}
* @memberof Contact
*/
customerid?: any;
/**
* 客户
*
* @returns {*}
* @memberof Contact
*/
cusomername?: any;
}
\ No newline at end of file
......@@ -201,6 +201,8 @@ export default {
transactioncurrencyname: '货币',
preferredservicename: '首选服务',
preferredequipmentname: '首选设施/设备',
customerid: '客户',
cusomername: '客户',
},
views: {
editabstract: {
......@@ -263,9 +265,9 @@ export default {
caption: "联系人",
title: '联系人数据选择视图',
},
optionview: {
quickcreate: {
caption: "联系人",
title: '联系人选项操作视图',
title: '快速新建',
},
editperson: {
caption: "个人信息",
......
......@@ -200,6 +200,8 @@ export default {
transactioncurrencyname: '货币',
preferredservicename: '首选服务',
preferredequipmentname: '首选设施/设备',
customerid: '客户',
cusomername: '客户',
},
views: {
editabstract: {
......@@ -262,9 +264,9 @@ export default {
caption: '联系人',
title: '联系人数据选择视图',
},
optionview: {
quickcreate: {
caption: '联系人',
title: '联系人选项操作视图',
title: '快速新建',
},
editperson: {
caption: '个人信息',
......
......@@ -839,12 +839,12 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "AccountInfo_ContactSetting",
"viewtag": "e38e7b53a449e0f112cb545d2c5d4b85"
},
"contactoptionview": {
"title": "联系人选项操作视图",
"contactquickcreate": {
"title": "快速新建",
"caption": "联系人",
"viewtype": "DEOPTVIEW",
"viewmodule": "Base",
"viewname": "ContactOptionView",
"viewname": "ContactQuickCreate",
"viewtag": "e404dc93e70d6284d4e1a083017625ed"
},
"accountedit_address": {
......
......@@ -245,7 +245,7 @@ export default class AccountGridViewBase extends Vue {
* @memberof AccountGridView
*/
public toolBarModels: any = {
tbitem1_openquickcreateview: { name: 'tbitem1_openquickcreateview', caption: '新建','isShowCaption':true,'isShowIcon':true, tooltip: '新建', iconcls: 'fa fa-file-text-o', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'OpenQuickCreateView', target: 'NONE' }, class: '' },
tbitem1_openquickcreateview: { name: 'tbitem1_openquickcreateview', caption: '新建','isShowCaption':true,'isShowIcon':true, tooltip: '新建', iconcls: 'fa fa-user-plus', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'OpenQuickCreateView', target: 'NONE' }, class: '' },
tbitem2: { name: 'tbitem2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem4: { name: 'tbitem4', caption: '编辑','isShowCaption':true,'isShowIcon':true, tooltip: '编辑', iconcls: 'fa fa-edit', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Edit', target: 'SINGLEKEY' }, class: '' },
......
......@@ -533,7 +533,12 @@ export default class ContactByAccountBase extends Vue {
if(args.length >0){
Object.assign(tempContext,args[0]);
}
const deResParameters: any[] = [];
let deResParameters: any[] = [];
if(tempContext.account && true){
deResParameters = [
{ pathName: 'accounts', parameterName: 'account' },
]
}
const parameters: any[] = [
{ pathName: 'contacts', parameterName: 'contact' },
];
......@@ -551,10 +556,10 @@ export default class ContactByAccountBase extends Vue {
});
}
const view: any = {
viewname: 'contact-option-view',
viewname: 'contact-quick-create',
height: 0,
width: 0,
title: this.$t('entities.contact.views.optionview.title'),
title: this.$t('entities.contact.views.quickcreate.title'),
placement: 'DRAWER_RIGHT',
};
openDrawer(view, data);
......@@ -579,7 +584,12 @@ export default class ContactByAccountBase extends Vue {
if(args.length >0){
Object.assign(tempContext,args[0]);
}
const deResParameters: any[] = [];
let deResParameters: any[] = [];
if(tempContext.account && true){
deResParameters = [
{ pathName: 'accounts', parameterName: 'account' },
]
}
const parameters: any[] = [
{ pathName: 'contacts', parameterName: 'contact' },
{ pathName: 'tabexpview', parameterName: 'tabexpview' },
......
......@@ -242,7 +242,7 @@ export default class ContactGridViewBase extends Vue {
* @memberof ContactGridView
*/
public toolBarModels: any = {
tbitem1_openquickcreateview: { name: 'tbitem1_openquickcreateview', caption: '新建','isShowCaption':true,'isShowIcon':true, tooltip: '新建', iconcls: 'fa fa-file-text-o', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'OpenQuickCreateView', target: 'NONE' }, class: '' },
tbitem1_openquickcreateview: { name: 'tbitem1_openquickcreateview', caption: '新建','isShowCaption':true,'isShowIcon':true, tooltip: '新建', iconcls: 'fa fa-user-plus', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'OpenQuickCreateView', target: 'NONE' }, class: '' },
tbitem2: { name: 'tbitem2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem4: { name: 'tbitem4', caption: '编辑','isShowCaption':true,'isShowIcon':true, tooltip: '编辑', iconcls: 'fa fa-edit', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Edit', target: 'SINGLEKEY' }, class: '' },
......@@ -848,7 +848,12 @@ export default class ContactGridViewBase extends Vue {
if(args.length >0){
Object.assign(tempContext,args[0]);
}
const deResParameters: any[] = [];
let deResParameters: any[] = [];
if(tempContext.account && true){
deResParameters = [
{ pathName: 'accounts', parameterName: 'account' },
]
}
const parameters: any[] = [
{ pathName: 'contacts', parameterName: 'contact' },
];
......@@ -866,10 +871,10 @@ export default class ContactGridViewBase extends Vue {
});
}
const view: any = {
viewname: 'contact-option-view',
viewname: 'contact-quick-create',
height: 0,
width: 0,
title: this.$t('entities.contact.views.optionview.title'),
title: this.$t('entities.contact.views.quickcreate.title'),
placement: 'DRAWER_RIGHT',
};
openDrawer(view, data);
......@@ -894,7 +899,12 @@ export default class ContactGridViewBase extends Vue {
if(args.length >0){
Object.assign(tempContext,args[0]);
}
const deResParameters: any[] = [];
let deResParameters: any[] = [];
if(tempContext.account && true){
deResParameters = [
{ pathName: 'accounts', parameterName: 'account' },
]
}
const parameters: any[] = [
{ pathName: 'contacts', parameterName: 'contact' },
{ pathName: 'tabexpview', parameterName: 'tabexpview' },
......
.option-view {
--option-view: 0;
}
// 避免空文件,后台不让空文件过
.contact-quick-create {
--contact-quick-create: 0;
}
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import ContactQuickCreateBase from './contact-quick-create-base.vue';
import view_form from '@widgets/contact/quick-create-form/quick-create-form.vue';
@Component({
components: {
view_form,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$store.commit('addCurPageViewtag', { route: to, viewtag: vm.viewtag });
});
},
})
export default class ContactQuickCreate extends ContactQuickCreateBase {
}
</script>
\ No newline at end of file
......@@ -68,7 +68,7 @@ export const PageComponents = {
Vue.component('list-lead-by-list', () => import('@pages/marketing/list-lead-by-list/list-lead-by-list.vue'));
Vue.component('account-info-major-contact', () => import('@pages/base/account-info-major-contact/account-info-major-contact.vue'));
Vue.component('sales-order-grid-view', () => import('@pages/sales/sales-order-grid-view/sales-order-grid-view.vue'));
Vue.component('contact-option-view', () => import('@pages/base/contact-option-view/contact-option-view.vue'));
Vue.component('contact-quick-create', () => import('@pages/base/contact-quick-create/contact-quick-create.vue'));
Vue.component('contact-edit-abstract', () => import('@pages/base/contact-edit-abstract/contact-edit-abstract.vue'));
Vue.component('activity-pointer-by-parent-key', () => import('@pages/base/activity-pointer-by-parent-key/activity-pointer-by-parent-key.vue'));
Vue.component('lead-edit-view', () => import('@pages/sales/lead-edit-view/lead-edit-view.vue'));
......
......@@ -77,6 +77,21 @@ export default class AccountServiceBase extends EntityService {
}
}
masterData.listaccounts = listaccountsData;
let contactsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_contacts'),'undefined')){
contactsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_contacts') as any);
if(contactsData && contactsData.length && contactsData.length > 0){
contactsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.contactid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.contacts = contactsData;
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
......@@ -87,6 +102,7 @@ export default class AccountServiceBase extends EntityService {
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/accounts`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_listaccounts',JSON.stringify(res.data.listaccounts));
this.tempStorage.setItem(tempContext.srfsessionkey+'_contacts',JSON.stringify(res.data.contacts));
return res;
}
......@@ -116,9 +132,25 @@ export default class AccountServiceBase extends EntityService {
}
}
masterData.listaccounts = listaccountsData;
let contactsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_contacts'),'undefined')){
contactsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_contacts') as any);
if(contactsData && contactsData.length && contactsData.length > 0){
contactsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.contactid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.contacts = contactsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/accounts/${context.account}`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_listaccounts',JSON.stringify(res.data.listaccounts));
this.tempStorage.setItem(context.srfsessionkey+'_contacts',JSON.stringify(res.data.contacts));
return res;
}
......@@ -162,9 +194,25 @@ export default class AccountServiceBase extends EntityService {
}
}
masterData.listaccounts = listaccountsData;
let contactsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_contacts'),'undefined')){
contactsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_contacts') as any);
if(contactsData && contactsData.length && contactsData.length > 0){
contactsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.contactid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.contacts = contactsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/accounts/${context.account}/save`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_listaccounts',JSON.stringify(res.data.listaccounts));
this.tempStorage.setItem(context.srfsessionkey+'_contacts',JSON.stringify(res.data.contacts));
return res;
}
......@@ -193,6 +241,7 @@ export default class AccountServiceBase extends EntityService {
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/accounts/${context.account}`,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_listaccounts',JSON.stringify(res.data.listaccounts));
this.tempStorage.setItem(context.srfsessionkey+'_contacts',JSON.stringify(res.data.contacts));
return res;
}
......@@ -210,6 +259,7 @@ export default class AccountServiceBase extends EntityService {
let res:any = await Http.getInstance().get(`/accounts/getdraft`,isloading);
res.data.account = data.account;
this.tempStorage.setItem(context.srfsessionkey+'_listaccounts',JSON.stringify(res.data.listaccounts));
this.tempStorage.setItem(context.srfsessionkey+'_contacts',JSON.stringify(res.data.contacts));
return res;
}
......
......@@ -48,6 +48,9 @@ export default class ContactServiceBase extends EntityService {
* @memberof ContactServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact){
return Http.getInstance().get(`/accounts/${context.account}/contacts/${context.contact}/select`,isloading);
}
return Http.getInstance().get(`/contacts/${context.contact}/select`,isloading);
}
......@@ -61,6 +64,9 @@ export default class ContactServiceBase extends EntityService {
* @memberof ContactServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact){
return Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/checkkey`,data,isloading);
}
return Http.getInstance().post(`/contacts/${context.contact}/checkkey`,data,isloading);
}
......@@ -74,6 +80,9 @@ export default class ContactServiceBase extends EntityService {
* @memberof ContactServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact){
return Http.getInstance().delete(`/accounts/${context.account}/contacts/${context.contact}`,isloading);
}
return Http.getInstance().delete(`/contacts/${context.contact}`,isloading);
}
......@@ -88,6 +97,9 @@ export default class ContactServiceBase extends EntityService {
* @memberof ContactServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact){
return Http.getInstance().get(`/accounts/${context.account}/contacts/${context.contact}`,isloading);
}
let res:any = await Http.getInstance().get(`/contacts/${context.contact}`,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
......@@ -106,6 +118,9 @@ export default class ContactServiceBase extends EntityService {
* @memberof ContactServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact){
return Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/save`,data,isloading);
}
let masterData:any = {};
let listcontactsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts'),'undefined')){
......@@ -170,6 +185,9 @@ export default class ContactServiceBase extends EntityService {
* @memberof ContactServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact){
return Http.getInstance().put(`/accounts/${context.account}/contacts/${context.contact}`,data,isloading);
}
let masterData:any = {};
let listcontactsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts'),'undefined')){
......@@ -234,6 +252,9 @@ export default class ContactServiceBase extends EntityService {
* @memberof ContactServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && true){
return Http.getInstance().get(`/accounts/${context.account}/contacts/getdraft`,isloading);
}
let res:any = await Http.getInstance().get(`/contacts/getdraft`,isloading);
res.data.contact = data.contact;
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
......@@ -252,6 +273,15 @@ export default class ContactServiceBase extends EntityService {
* @memberof ContactServiceBase
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && true){
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
}
if(data.srffrontuf){
delete data.srffrontuf;
}
return Http.getInstance().post(`/accounts/${context.account}/contacts`,data,isloading);
}
let masterData:any = {};
let listcontactsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts'),'undefined')){
......@@ -323,6 +353,10 @@ export default class ContactServiceBase extends EntityService {
* @memberof ContactServiceBase
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/accounts/${context.account}/contacts/fetchdefault`,tempData,isloading);
}
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/contacts/fetchdefault`,tempData,isloading);
}
......
......@@ -48,6 +48,9 @@ export default class LeadServiceBase extends EntityService {
* @memberof LeadServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.lead){
return Http.getInstance().get(`/accounts/${context.account}/contacts/${context.contact}/leads/${context.lead}/select`,isloading);
}
if(context.contact && context.lead){
return Http.getInstance().get(`/contacts/${context.contact}/leads/${context.lead}/select`,isloading);
}
......@@ -67,6 +70,9 @@ export default class LeadServiceBase extends EntityService {
* @memberof LeadServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.lead){
return Http.getInstance().put(`/accounts/${context.account}/contacts/${context.contact}/leads/${context.lead}`,data,isloading);
}
if(context.contact && context.lead){
return Http.getInstance().put(`/contacts/${context.contact}/leads/${context.lead}`,data,isloading);
}
......@@ -105,6 +111,9 @@ export default class LeadServiceBase extends EntityService {
* @memberof LeadServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && true){
return Http.getInstance().get(`/accounts/${context.account}/contacts/${context.contact}/leads/getdraft`,isloading);
}
if(context.contact && true){
return Http.getInstance().get(`/contacts/${context.contact}/leads/getdraft`,isloading);
}
......@@ -127,6 +136,9 @@ export default class LeadServiceBase extends EntityService {
* @memberof LeadServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.lead){
return Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/leads/${context.lead}/checkkey`,data,isloading);
}
if(context.contact && context.lead){
return Http.getInstance().post(`/contacts/${context.contact}/leads/${context.lead}/checkkey`,data,isloading);
}
......@@ -146,6 +158,9 @@ export default class LeadServiceBase extends EntityService {
* @memberof LeadServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.lead){
return Http.getInstance().get(`/accounts/${context.account}/contacts/${context.contact}/leads/${context.lead}`,isloading);
}
if(context.contact && context.lead){
return Http.getInstance().get(`/contacts/${context.contact}/leads/${context.lead}`,isloading);
}
......@@ -168,6 +183,9 @@ export default class LeadServiceBase extends EntityService {
* @memberof LeadServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.lead){
return Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/leads/${context.lead}/save`,data,isloading);
}
if(context.contact && context.lead){
return Http.getInstance().post(`/contacts/${context.contact}/leads/${context.lead}/save`,data,isloading);
}
......@@ -206,6 +224,15 @@ export default class LeadServiceBase extends EntityService {
* @memberof LeadServiceBase
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && true){
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
}
if(data.srffrontuf){
delete data.srffrontuf;
}
return Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/leads`,data,isloading);
}
if(context.contact && true){
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
......@@ -263,6 +290,9 @@ export default class LeadServiceBase extends EntityService {
* @memberof LeadServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.lead){
return Http.getInstance().delete(`/accounts/${context.account}/contacts/${context.contact}/leads/${context.lead}`,isloading);
}
if(context.contact && context.lead){
return Http.getInstance().delete(`/contacts/${context.contact}/leads/${context.lead}`,isloading);
}
......@@ -283,6 +313,10 @@ export default class LeadServiceBase extends EntityService {
* @memberof LeadServiceBase
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/accounts/${context.account}/contacts/${context.contact}/leads/fetchdefault`,tempData,isloading);
}
if(context.contact && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/contacts/${context.contact}/leads/fetchdefault`,tempData,isloading);
......
......@@ -48,6 +48,9 @@ export default class ListContactServiceBase extends EntityService {
* @memberof ListContactServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.listcontact){
return Http.getInstance().get(`/accounts/${context.account}/contacts/${context.contact}/listcontacts/${context.listcontact}/select`,isloading);
}
if(context.ibizlist && context.listcontact){
return Http.getInstance().get(`/ibizlists/${context.ibizlist}/listcontacts/${context.listcontact}/select`,isloading);
}
......@@ -67,6 +70,9 @@ export default class ListContactServiceBase extends EntityService {
* @memberof ListContactServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && true){
return Http.getInstance().get(`/accounts/${context.account}/contacts/${context.contact}/listcontacts/getdraft`,isloading);
}
if(context.ibizlist && true){
return Http.getInstance().get(`/ibizlists/${context.ibizlist}/listcontacts/getdraft`,isloading);
}
......@@ -88,6 +94,9 @@ export default class ListContactServiceBase extends EntityService {
* @memberof ListContactServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.listcontact){
return Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/listcontacts/${context.listcontact}/checkkey`,data,isloading);
}
if(context.ibizlist && context.listcontact){
return Http.getInstance().post(`/ibizlists/${context.ibizlist}/listcontacts/${context.listcontact}/checkkey`,data,isloading);
}
......@@ -107,6 +116,9 @@ export default class ListContactServiceBase extends EntityService {
* @memberof ListContactServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.listcontact){
return Http.getInstance().delete(`/accounts/${context.account}/contacts/${context.contact}/listcontacts/${context.listcontact}`,isloading);
}
if(context.ibizlist && context.listcontact){
return Http.getInstance().delete(`/ibizlists/${context.ibizlist}/listcontacts/${context.listcontact}`,isloading);
}
......@@ -127,6 +139,9 @@ export default class ListContactServiceBase extends EntityService {
* @memberof ListContactServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.listcontact){
return Http.getInstance().put(`/accounts/${context.account}/contacts/${context.contact}/listcontacts/${context.listcontact}`,data,isloading);
}
if(context.ibizlist && context.listcontact){
return Http.getInstance().put(`/ibizlists/${context.ibizlist}/listcontacts/${context.listcontact}`,data,isloading);
}
......@@ -149,6 +164,9 @@ export default class ListContactServiceBase extends EntityService {
* @memberof ListContactServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.listcontact){
return Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/listcontacts/${context.listcontact}/save`,data,isloading);
}
if(context.ibizlist && context.listcontact){
return Http.getInstance().post(`/ibizlists/${context.ibizlist}/listcontacts/${context.listcontact}/save`,data,isloading);
}
......@@ -171,6 +189,9 @@ export default class ListContactServiceBase extends EntityService {
* @memberof ListContactServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.listcontact){
return Http.getInstance().get(`/accounts/${context.account}/contacts/${context.contact}/listcontacts/${context.listcontact}`,isloading);
}
if(context.ibizlist && context.listcontact){
return Http.getInstance().get(`/ibizlists/${context.ibizlist}/listcontacts/${context.listcontact}`,isloading);
}
......@@ -192,6 +213,15 @@ export default class ListContactServiceBase extends EntityService {
* @memberof ListContactServiceBase
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && true){
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
}
if(data.srffrontuf){
delete data.srffrontuf;
}
return Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/listcontacts`,data,isloading);
}
if(context.ibizlist && true){
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
......@@ -233,6 +263,10 @@ export default class ListContactServiceBase extends EntityService {
* @memberof ListContactServiceBase
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/accounts/${context.account}/contacts/${context.contact}/listcontacts/fetchdefault`,tempData,isloading);
}
if(context.ibizlist && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/ibizlists/${context.ibizlist}/listcontacts/fetchdefault`,tempData,isloading);
......
......@@ -48,6 +48,9 @@ export default class ListLeadServiceBase extends EntityService {
* @memberof ListLeadServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.lead && context.listlead){
return Http.getInstance().get(`/accounts/${context.account}/contacts/${context.contact}/leads/${context.lead}/listleads/${context.listlead}/select`,isloading);
}
if(context.contact && context.lead && context.listlead){
return Http.getInstance().get(`/contacts/${context.contact}/leads/${context.lead}/listleads/${context.listlead}/select`,isloading);
}
......@@ -73,6 +76,9 @@ export default class ListLeadServiceBase extends EntityService {
* @memberof ListLeadServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.lead && context.listlead){
return Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/leads/${context.lead}/listleads/${context.listlead}/checkkey`,data,isloading);
}
if(context.contact && context.lead && context.listlead){
return Http.getInstance().post(`/contacts/${context.contact}/leads/${context.lead}/listleads/${context.listlead}/checkkey`,data,isloading);
}
......@@ -98,6 +104,9 @@ export default class ListLeadServiceBase extends EntityService {
* @memberof ListLeadServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.lead && context.listlead){
return Http.getInstance().delete(`/accounts/${context.account}/contacts/${context.contact}/leads/${context.lead}/listleads/${context.listlead}`,isloading);
}
if(context.contact && context.lead && context.listlead){
return Http.getInstance().delete(`/contacts/${context.contact}/leads/${context.lead}/listleads/${context.listlead}`,isloading);
}
......@@ -124,6 +133,15 @@ export default class ListLeadServiceBase extends EntityService {
* @memberof ListLeadServiceBase
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.lead && true){
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
}
if(data.srffrontuf){
delete data.srffrontuf;
}
return Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/leads/${context.lead}/listleads`,data,isloading);
}
if(context.contact && context.lead && true){
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
......@@ -183,6 +201,9 @@ export default class ListLeadServiceBase extends EntityService {
* @memberof ListLeadServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.lead && context.listlead){
return Http.getInstance().put(`/accounts/${context.account}/contacts/${context.contact}/leads/${context.lead}/listleads/${context.listlead}`,data,isloading);
}
if(context.contact && context.lead && context.listlead){
return Http.getInstance().put(`/contacts/${context.contact}/leads/${context.lead}/listleads/${context.listlead}`,data,isloading);
}
......@@ -211,6 +232,9 @@ export default class ListLeadServiceBase extends EntityService {
* @memberof ListLeadServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.lead && context.listlead){
return Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/leads/${context.lead}/listleads/${context.listlead}/save`,data,isloading);
}
if(context.contact && context.lead && context.listlead){
return Http.getInstance().post(`/contacts/${context.contact}/leads/${context.lead}/listleads/${context.listlead}/save`,data,isloading);
}
......@@ -239,6 +263,9 @@ export default class ListLeadServiceBase extends EntityService {
* @memberof ListLeadServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.lead && context.listlead){
return Http.getInstance().get(`/accounts/${context.account}/contacts/${context.contact}/leads/${context.lead}/listleads/${context.listlead}`,isloading);
}
if(context.contact && context.lead && context.listlead){
return Http.getInstance().get(`/contacts/${context.contact}/leads/${context.lead}/listleads/${context.listlead}`,isloading);
}
......@@ -266,6 +293,9 @@ export default class ListLeadServiceBase extends EntityService {
* @memberof ListLeadServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.lead && true){
return Http.getInstance().get(`/accounts/${context.account}/contacts/${context.contact}/leads/${context.lead}/listleads/getdraft`,isloading);
}
if(context.contact && context.lead && true){
return Http.getInstance().get(`/contacts/${context.contact}/leads/${context.lead}/listleads/getdraft`,isloading);
}
......@@ -293,6 +323,10 @@ export default class ListLeadServiceBase extends EntityService {
* @memberof ListLeadServiceBase
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.lead && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/accounts/${context.account}/contacts/${context.contact}/leads/${context.lead}/listleads/fetchdefault`,tempData,isloading);
}
if(context.contact && context.lead && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/contacts/${context.contact}/leads/${context.lead}/listleads/fetchdefault`,tempData,isloading);
......
......@@ -48,6 +48,9 @@ export default class OpportunityServiceBase extends EntityService {
* @memberof OpportunityServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.opportunity){
return Http.getInstance().get(`/accounts/${context.account}/contacts/${context.contact}/opportunities/${context.opportunity}/select`,isloading);
}
if(context.contact && context.opportunity){
return Http.getInstance().get(`/contacts/${context.contact}/opportunities/${context.opportunity}/select`,isloading);
}
......@@ -64,6 +67,9 @@ export default class OpportunityServiceBase extends EntityService {
* @memberof OpportunityServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.opportunity){
return Http.getInstance().get(`/accounts/${context.account}/contacts/${context.contact}/opportunities/${context.opportunity}`,isloading);
}
if(context.contact && context.opportunity){
return Http.getInstance().get(`/contacts/${context.contact}/opportunities/${context.opportunity}`,isloading);
}
......@@ -82,6 +88,9 @@ export default class OpportunityServiceBase extends EntityService {
* @memberof OpportunityServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && true){
return Http.getInstance().get(`/accounts/${context.account}/contacts/${context.contact}/opportunities/getdraft`,isloading);
}
if(context.contact && true){
return Http.getInstance().get(`/contacts/${context.contact}/opportunities/getdraft`,isloading);
}
......@@ -100,6 +109,15 @@ export default class OpportunityServiceBase extends EntityService {
* @memberof OpportunityServiceBase
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && true){
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
}
if(data.srffrontuf){
delete data.srffrontuf;
}
return Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/opportunities`,data,isloading);
}
if(context.contact && true){
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
......@@ -132,6 +150,9 @@ export default class OpportunityServiceBase extends EntityService {
* @memberof OpportunityServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.opportunity){
return Http.getInstance().delete(`/accounts/${context.account}/contacts/${context.contact}/opportunities/${context.opportunity}`,isloading);
}
if(context.contact && context.opportunity){
return Http.getInstance().delete(`/contacts/${context.contact}/opportunities/${context.opportunity}`,isloading);
}
......@@ -149,6 +170,9 @@ export default class OpportunityServiceBase extends EntityService {
* @memberof OpportunityServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.opportunity){
return Http.getInstance().put(`/accounts/${context.account}/contacts/${context.contact}/opportunities/${context.opportunity}`,data,isloading);
}
if(context.contact && context.opportunity){
return Http.getInstance().put(`/contacts/${context.contact}/opportunities/${context.opportunity}`,data,isloading);
}
......@@ -168,6 +192,9 @@ export default class OpportunityServiceBase extends EntityService {
* @memberof OpportunityServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.opportunity){
return Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/opportunities/${context.opportunity}/checkkey`,data,isloading);
}
if(context.contact && context.opportunity){
return Http.getInstance().post(`/contacts/${context.contact}/opportunities/${context.opportunity}/checkkey`,data,isloading);
}
......@@ -184,6 +211,9 @@ export default class OpportunityServiceBase extends EntityService {
* @memberof OpportunityServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.opportunity){
return Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/opportunities/${context.opportunity}/save`,data,isloading);
}
if(context.contact && context.opportunity){
return Http.getInstance().post(`/contacts/${context.contact}/opportunities/${context.opportunity}/save`,data,isloading);
}
......@@ -203,6 +233,10 @@ export default class OpportunityServiceBase extends EntityService {
* @memberof OpportunityServiceBase
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/accounts/${context.account}/contacts/${context.contact}/opportunities/fetchdefault`,tempData,isloading);
}
if(context.contact && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/contacts/${context.contact}/opportunities/fetchdefault`,tempData,isloading);
......
......@@ -980,7 +980,7 @@ export const viewstate: any = {
{
viewtag: 'e404dc93e70d6284d4e1a083017625ed',
viewmodule: 'Base',
viewname: 'ContactOptionView',
viewname: 'ContactQuickCreate',
viewaction: '',
viewdatachange: false,
refviews: [
......
......@@ -94,7 +94,7 @@ export default class ContactUIServiceBase extends UIService {
this.allViewMap.set('EDITVIEW:',{viewname:'editview',srfappde:'contacts'});
this.allViewMap.set(':',{viewname:'editbook',srfappde:'contacts'});
this.allViewMap.set('PICKUPVIEW:',{viewname:'pickupview',srfappde:'contacts'});
this.allViewMap.set(':',{viewname:'optionview',srfappde:'contacts'});
this.allViewMap.set(':',{viewname:'quickcreate',srfappde:'contacts'});
this.allViewMap.set(':',{viewname:'editperson',srfappde:'contacts'});
this.allViewMap.set(':',{viewname:'tabexpview',srfappde:'contacts'});
}
......@@ -143,6 +143,11 @@ export default class ContactUIServiceBase extends UIService {
Object.assign(data,parentObj);
Object.assign(context,parentObj);
let deResParameters: any[] = [];
if(context.account && true){
deResParameters = [
{ pathName: 'accounts', parameterName: 'account' },
]
}
const parameters: any[] = [
{ pathName: 'contacts', parameterName: 'contact' },
];
......@@ -203,6 +208,11 @@ export default class ContactUIServiceBase extends UIService {
Object.assign(data,parentObj);
Object.assign(context,parentObj);
let deResParameters: any[] = [];
if(context.account && true){
deResParameters = [
{ pathName: 'accounts', parameterName: 'account' },
]
}
const parameters: any[] = [
{ pathName: 'contacts', parameterName: 'contact' },
];
......@@ -221,10 +231,10 @@ export default class ContactUIServiceBase extends UIService {
});
}
const view: any = {
viewname: 'contact-option-view',
viewname: 'contact-quick-create',
height: 0,
width: 0,
title: actionContext.$t('entities.contact.views.optionview.title'),
title: actionContext.$t('entities.contact.views.quickcreate.title'),
placement: 'DRAWER_RIGHT',
};
openDrawer(view, data);
......@@ -266,6 +276,11 @@ export default class ContactUIServiceBase extends UIService {
Object.assign(data,parentObj);
Object.assign(context,parentObj);
let deResParameters: any[] = [];
if(context.account && true){
deResParameters = [
{ pathName: 'accounts', parameterName: 'account' },
]
}
const parameters: any[] = [
{ pathName: 'contacts', parameterName: 'contact' },
];
......@@ -329,6 +344,11 @@ export default class ContactUIServiceBase extends UIService {
Object.assign(data,parentObj);
Object.assign(context,parentObj);
let deResParameters: any[] = [];
if(context.account && true){
deResParameters = [
{ pathName: 'accounts', parameterName: 'account' },
]
}
const parameters: any[] = [
{ pathName: 'contacts', parameterName: 'contact' },
];
......@@ -392,6 +412,11 @@ export default class ContactUIServiceBase extends UIService {
Object.assign(data,parentObj);
Object.assign(context,parentObj);
let deResParameters: any[] = [];
if(context.account && true){
deResParameters = [
{ pathName: 'accounts', parameterName: 'account' },
]
}
const parameters: any[] = [
{ pathName: 'contacts', parameterName: 'contact' },
];
......@@ -455,6 +480,11 @@ export default class ContactUIServiceBase extends UIService {
Object.assign(data,parentObj);
Object.assign(context,parentObj);
let deResParameters: any[] = [];
if(context.account && true){
deResParameters = [
{ pathName: 'accounts', parameterName: 'account' },
]
}
const parameters: any[] = [
{ pathName: 'contacts', parameterName: 'contact' },
];
......
......@@ -206,6 +206,7 @@
paramItem='account'
:parentdata='{"srfparentdename":"ACCOUNT","SRFPARENTTYPE":"CUSTOM"}'
:parameters="[
{ pathName: 'accounts', parameterName: 'account' },
]"
:context="context"
:viewparams="viewparams"
......@@ -1009,15 +1010,15 @@ export default class Info_AllBase extends Vue implements ControlInterface {
* @memberof Info_All
*/
public detailsModel: any = {
group1: new FormGroupPanelModel({ caption: '账户信息', detailType: 'GROUPPANEL', name: 'group1', visible: true, isShowCaption: true, form: this, uiActionGroup: { caption: '编辑_账户信息', langbase: 'entities.account.info_all_form', extractMode: 'ITEM', details: [{ name: 'group1_uc040f39', caption: '编辑', uiactiontag: 'edit_accountinfo',isShowCaption:true,isShowIcon:true }] } })
group1: new FormGroupPanelModel({ caption: '账户信息', detailType: 'GROUPPANEL', name: 'group1', visible: true, isShowCaption: true, form: this, uiActionGroup: { caption: '编辑_账户信息', langbase: 'entities.account.info_all_form', extractMode: 'ITEM', details: [{ name: 'group1_uc040f39', caption: '编辑', uiactiontag: 'edit_accountinfo', icon: 'fa fa-pencil',isShowCaption:true,isShowIcon:true }] } })
,
grouppanel3: new FormGroupPanelModel({ caption: '简介', detailType: 'GROUPPANEL', name: 'grouppanel3', visible: true, isShowCaption: true, form: this, uiActionGroup: { caption: '编辑_简介信息', langbase: 'entities.account.info_all_form', extractMode: 'ITEM', details: [{ name: 'grouppanel3_uc061117', caption: '编辑', uiactiontag: 'edit_introduction',isShowCaption:true,isShowIcon:true }] } })
grouppanel3: new FormGroupPanelModel({ caption: '简介', detailType: 'GROUPPANEL', name: 'grouppanel3', visible: true, isShowCaption: true, form: this, uiActionGroup: { caption: '编辑_简介信息', langbase: 'entities.account.info_all_form', extractMode: 'ITEM', details: [{ name: 'grouppanel3_uc061117', caption: '编辑', uiactiontag: 'edit_introduction', icon: 'fa fa-pencil',isShowCaption:true,isShowIcon:true }] } })
,
grouppanel1: new FormGroupPanelModel({ caption: '地址信息', detailType: 'GROUPPANEL', name: 'grouppanel1', visible: true, isShowCaption: true, form: this, uiActionGroup: { caption: '编辑_地址信息', langbase: 'entities.account.info_all_form', extractMode: 'ITEM', details: [{ name: 'grouppanel1_u2ccbfc9', caption: '编辑', uiactiontag: 'edit_address',isShowCaption:true,isShowIcon:true }] } })
grouppanel1: new FormGroupPanelModel({ caption: '地址信息', detailType: 'GROUPPANEL', name: 'grouppanel1', visible: true, isShowCaption: true, form: this, uiActionGroup: { caption: '编辑_地址信息', langbase: 'entities.account.info_all_form', extractMode: 'ITEM', details: [{ name: 'grouppanel1_u2ccbfc9', caption: '编辑', uiactiontag: 'edit_address', icon: 'fa fa-pencil',isShowCaption:true,isShowIcon:true }] } })
,
druipart1: new FormDRUIPartModel({ caption: '', detailType: 'DRUIPART', name: 'druipart1', visible: true, isShowCaption: true, form: this })
,
grouppanel4: new FormGroupPanelModel({ caption: '联系人', detailType: 'GROUPPANEL', name: 'grouppanel4', visible: true, isShowCaption: true, form: this, uiActionGroup: { caption: '添加联系人', langbase: 'entities.account.info_all_form', extractMode: 'ITEM', details: [{ name: 'grouppanel4_u5a905ee', caption: '新建', uiactiontag: 'openquickcreateview', icon: 'fa fa-file-text-o',isShowCaption:false,isShowIcon:true }] } })
grouppanel4: new FormGroupPanelModel({ caption: '联系人', detailType: 'GROUPPANEL', name: 'grouppanel4', visible: true, isShowCaption: true, form: this, uiActionGroup: { caption: '添加联系人', langbase: 'entities.account.info_all_form', extractMode: 'ITEM', details: [{ name: 'grouppanel4_u5a905ee', caption: '新建', uiactiontag: 'openquickcreateview', icon: 'fa fa-user-plus',isShowCaption:false,isShowIcon:true }] } })
,
grouppanel2: new FormGroupPanelModel({ caption: '联系人首选项', detailType: 'GROUPPANEL', name: 'grouppanel2', visible: true, isShowCaption: true, form: this, uiActionGroup: { caption: '', langbase: 'entities.account.info_all_form', extractMode: 'ITEM', details: [] } })
,
......
......@@ -28,6 +28,7 @@
paramItem='account'
:parentdata='{"srfparentdename":"ACCOUNT","SRFPARENTTYPE":"CUSTOM"}'
:parameters="[
{ pathName: 'accounts', parameterName: 'account' },
]"
:context="context"
:viewparams="viewparams"
......
......@@ -76,6 +76,11 @@ export default class ByAccountModel {
prop: 'defaultpricelevelid',
dataType: 'PICKUP',
},
{
name: 'customerid',
prop: 'customerid',
dataType: 'PICKUP',
},
{
name: 'emailaddress1',
prop: 'emailaddress1',
......
......@@ -615,6 +615,12 @@ export default class ConAbsModel {
{
name: 'preferredequipmentname',
},
{
name: 'customerid',
},
{
name: 'cusomername',
},
]
}
......
......@@ -76,6 +76,11 @@ export default class MainModel {
prop: 'defaultpricelevelid',
dataType: 'PICKUP',
},
{
name: 'customerid',
prop: 'customerid',
dataType: 'PICKUP',
},
{
name: 'emailaddress1',
prop: 'emailaddress1',
......
......@@ -615,6 +615,12 @@ export default class PickupViewpickupviewpanelModel {
{
name: 'preferredequipmentname',
},
{
name: 'customerid',
},
{
name: 'cusomername',
},
]
}
......
......@@ -1294,7 +1294,7 @@ export default class QuickCreateBase extends Vue implements ControlInterface {
*/
public load(opt: any = {}): void {
if(!this.loadAction){
this.$Notice.error({ title: '错误', desc: 'ContactOptionView视图表单loadAction参数未配置' });
this.$Notice.error({ title: '错误', desc: 'ContactQuickCreate视图表单loadAction参数未配置' });
return;
}
const arg: any = { ...opt };
......@@ -1329,7 +1329,7 @@ export default class QuickCreateBase extends Vue implements ControlInterface {
*/
public loadDraft(opt: any = {}): void {
if(!this.loaddraftAction){
this.$Notice.error({ title: '错误', desc: 'ContactOptionView视图表单loaddraftAction参数未配置' });
this.$Notice.error({ title: '错误', desc: 'ContactQuickCreate视图表单loaddraftAction参数未配置' });
return;
}
const arg: any = { ...opt } ;
......@@ -1391,7 +1391,7 @@ export default class QuickCreateBase extends Vue implements ControlInterface {
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
if(!action){
let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction";
this.$Notice.error({ title: '错误', desc: 'ContactOptionView视图表单'+actionName+'参数未配置' });
this.$Notice.error({ title: '错误', desc: 'ContactQuickCreate视图表单'+actionName+'参数未配置' });
return;
}
Object.assign(arg,{viewparams:this.viewparams});
......@@ -1455,7 +1455,7 @@ export default class QuickCreateBase extends Vue implements ControlInterface {
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
if(!action){
let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction";
this.$Notice.error({ title: '错误', desc: 'ContactOptionView视图表单'+actionName+'参数未配置' });
this.$Notice.error({ title: '错误', desc: 'ContactQuickCreate视图表单'+actionName+'参数未配置' });
return;
}
Object.assign(arg,{viewparams:this.viewparams});
......@@ -1505,7 +1505,7 @@ export default class QuickCreateBase extends Vue implements ControlInterface {
public remove(opt:Array<any> = [],showResultInfo?: boolean): Promise<any> {
return new Promise((resolve: any, reject: any) => {
if(!this.removeAction){
this.$Notice.error({ title: '错误', desc: 'ContactOptionView视图表单removeAction参数未配置' });
this.$Notice.error({ title: '错误', desc: 'ContactQuickCreate视图表单removeAction参数未配置' });
return;
}
const arg: any = opt[0];
......
......@@ -615,6 +615,12 @@ export default class TabExpViewtabexppanelModel {
{
name: 'preferredequipmentname',
},
{
name: 'customerid',
},
{
name: 'cusomername',
},
]
}
......
......@@ -615,6 +615,12 @@ export default class TabExpViewtabviewpanelModel {
{
name: 'preferredequipmentname',
},
{
name: 'customerid',
},
{
name: 'cusomername',
},
]
}
......
......@@ -615,6 +615,12 @@ export default class TabExpViewtabviewpanel2Model {
{
name: 'preferredequipmentname',
},
{
name: 'customerid',
},
{
name: 'cusomername',
},
]
}
......
......@@ -615,6 +615,12 @@ export default class TabExpViewtabviewpanel3Model {
{
name: 'preferredequipmentname',
},
{
name: 'customerid',
},
{
name: 'cusomername',
},
]
}
......
......@@ -615,6 +615,12 @@ export default class TabExpViewtabviewpanel4Model {
{
name: 'preferredequipmentname',
},
{
name: 'customerid',
},
{
name: 'cusomername',
},
]
}
......
......@@ -615,6 +615,12 @@ export default class View_ConAbsModel {
{
name: 'preferredequipmentname',
},
{
name: 'customerid',
},
{
name: 'cusomername',
},
]
}
......
......@@ -615,6 +615,12 @@ export default class View_ConAddModel {
{
name: 'preferredequipmentname',
},
{
name: 'customerid',
},
{
name: 'cusomername',
},
]
}
......
......@@ -615,6 +615,12 @@ export default class View_ConBookModel {
{
name: 'preferredequipmentname',
},
{
name: 'customerid',
},
{
name: 'cusomername',
},
]
}
......
......@@ -615,6 +615,12 @@ export default class View_ConMarModel {
{
name: 'preferredequipmentname',
},
{
name: 'customerid',
},
{
name: 'cusomername',
},
]
}
......
......@@ -615,6 +615,12 @@ export default class View_ConPerModel {
{
name: 'preferredequipmentname',
},
{
name: 'customerid',
},
{
name: 'cusomername',
},
]
}
......
......@@ -1545,6 +1545,29 @@ public class Contact extends EntityMP implements Serializable {
@JSONField(name = "preferredequipmentname")
@JsonProperty("preferredequipmentname")
private String preferredequipmentname;
/**
* 客户
*/
@TableField(value = "customerid")
@JSONField(name = "customerid")
@JsonProperty("customerid")
private String customerid;
/**
* 客户
*/
@DEField(name = "customername")
@TableField(value = "customername")
@JSONField(name = "cusomername")
@JsonProperty("cusomername")
private String cusomername;
/**
*
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.businesscentral.core.base.domain.Account customer;
/**
*
......@@ -3206,6 +3229,22 @@ public class Contact extends EntityMP implements Serializable {
this.modify("preferredequipmentname",preferredequipmentname);
}
/**
* 设置 [客户]
*/
public void setCustomerid(String customerid){
this.customerid = customerid ;
this.modify("customerid",customerid);
}
/**
* 设置 [客户]
*/
public void setCusomername(String cusomername){
this.cusomername = cusomername ;
this.modify("customername",cusomername);
}
}
......
......@@ -321,6 +321,27 @@ public class ContactSearchContext extends QueryWrapperContext<Contact> {
this.getSearchCond().like("preferredequipmentname", n_preferredequipmentname_like);
}
}
private String n_customerid_eq;//[客户]
public void setN_customerid_eq(String n_customerid_eq) {
this.n_customerid_eq = n_customerid_eq;
if(!ObjectUtils.isEmpty(this.n_customerid_eq)){
this.getSearchCond().eq("customerid", n_customerid_eq);
}
}
private String n_customername_eq;//[客户]
public void setN_customername_eq(String n_customername_eq) {
this.n_customername_eq = n_customername_eq;
if(!ObjectUtils.isEmpty(this.n_customername_eq)){
this.getSearchCond().eq("customername", n_customername_eq);
}
}
private String n_customername_like;//[客户]
public void setN_customername_like(String n_customername_like) {
this.n_customername_like = n_customername_like;
if(!ObjectUtils.isEmpty(this.n_customername_like)){
this.getSearchCond().like("customername", n_customername_like);
}
}
/**
* 启用快速搜索
......
......@@ -62,6 +62,8 @@ public interface ContactMapper extends BaseMapper<Contact>{
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<Contact> selectByCustomerid(@Param("accountid") Serializable accountid) ;
List<Contact> selectByPreferredequipmentid(@Param("equipmentid") Serializable equipmentid) ;
List<Contact> selectByOriginatingleadid(@Param("leadid") Serializable leadid) ;
......
......@@ -37,6 +37,8 @@ public interface IContactService extends IService<Contact>{
boolean create(Contact et) ;
void createBatch(List<Contact> list) ;
Page<Contact> searchDefault(ContactSearchContext context) ;
List<Contact> selectByCustomerid(String accountid) ;
void removeByCustomerid(String accountid) ;
List<Contact> selectByPreferredequipmentid(String equipmentid) ;
void removeByPreferredequipmentid(String equipmentid) ;
List<Contact> selectByOriginatingleadid(String leadid) ;
......
......@@ -51,6 +51,9 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
private cn.ibizlab.businesscentral.core.scheduling.service.IBookableResourceService bookableresourceService;
@Autowired
@Lazy
private cn.ibizlab.businesscentral.core.base.service.IContactService contactService;
@Autowired
@Lazy
private cn.ibizlab.businesscentral.core.sales.service.ILeadService leadService;
@Autowired
@Lazy
......@@ -63,9 +66,6 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
private cn.ibizlab.businesscentral.core.base.service.ISlaKpiInstanceService slakpiinstanceService;
@Autowired
@Lazy
private cn.ibizlab.businesscentral.core.base.service.IContactService contactService;
@Autowired
@Lazy
private cn.ibizlab.businesscentral.core.service.service.IEquipmentService equipmentService;
@Autowired
@Lazy
......
......@@ -184,6 +184,16 @@ public class ContactServiceImpl extends ServiceImpl<ContactMapper, Contact> impl
}
@Override
public List<Contact> selectByCustomerid(String accountid) {
return baseMapper.selectByCustomerid(accountid);
}
@Override
public void removeByCustomerid(String accountid) {
this.remove(new QueryWrapper<Contact>().eq("customerid",accountid));
}
@Override
public List<Contact> selectByPreferredequipmentid(String equipmentid) {
return baseMapper.selectByPreferredequipmentid(equipmentid);
......@@ -261,6 +271,16 @@ public class ContactServiceImpl extends ServiceImpl<ContactMapper, Contact> impl
* @param et
*/
private void fillParentData(Contact et){
//实体关系[DER1N_CONTACT_ACCOUNT_CUSTOMERID]
if(!ObjectUtils.isEmpty(et.getCustomerid())){
cn.ibizlab.businesscentral.core.base.domain.Account customer=et.getCustomer();
if(ObjectUtils.isEmpty(customer)){
cn.ibizlab.businesscentral.core.base.domain.Account majorEntity=accountService.get(et.getCustomerid());
et.setCustomer(majorEntity);
customer=majorEntity;
}
et.setCusomername(customer.getAccountname());
}
//实体关系[DER1N_CONTACT__EQUIPMENT__PREFERREDEQUIPMENTID]
if(!ObjectUtils.isEmpty(et.getPreferredequipmentid())){
cn.ibizlab.businesscentral.core.service.domain.Equipment preferredequipment=et.getPreferredequipment();
......
......@@ -1630,6 +1630,22 @@ public class ContactDTO extends DTOBase implements Serializable {
@JsonProperty("preferredequipmentname")
private String preferredequipmentname;
/**
* 属性 [CUSTOMERID]
*
*/
@JSONField(name = "customerid")
@JsonProperty("customerid")
private String customerid;
/**
* 属性 [CUSTOMERNAME]
*
*/
@JSONField(name = "cusomername")
@JsonProperty("cusomername")
private String cusomername;
/**
* 设置 [ADDRESS1_FREIGHTTERMSCODE]
......@@ -3191,6 +3207,22 @@ public class ContactDTO extends DTOBase implements Serializable {
this.modify("preferredequipmentname",preferredequipmentname);
}
/**
* 设置 [CUSTOMERID]
*/
public void setCustomerid(String customerid){
this.customerid = customerid ;
this.modify("customerid",customerid);
}
/**
* 设置 [CUSTOMERNAME]
*/
public void setCusomername(String cusomername){
this.cusomername = cusomername ;
this.modify("customername",cusomername);
}
}
......@@ -158,5 +158,137 @@ public class ContactResource {
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(contactMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@ApiOperation(value = "根据客户检查联系人", tags = {"联系人" }, notes = "根据客户检查联系人")
@RequestMapping(method = RequestMethod.POST, value = "/accounts/{account_id}/contacts/checkkey")
public ResponseEntity<Boolean> checkKeyByAccount(@PathVariable("account_id") String account_id, @RequestBody ContactDTO contactdto) {
return ResponseEntity.status(HttpStatus.OK).body(contactService.checkKey(contactMapping.toDomain(contactdto)));
}
@PreAuthorize("hasPermission(this.contactService.get(#contact_id),'iBizBusinessCentral-Contact-Remove')")
@ApiOperation(value = "根据客户删除联系人", tags = {"联系人" }, notes = "根据客户删除联系人")
@RequestMapping(method = RequestMethod.DELETE, value = "/accounts/{account_id}/contacts/{contact_id}")
@Transactional
public ResponseEntity<Boolean> removeByAccount(@PathVariable("account_id") String account_id, @PathVariable("contact_id") String contact_id) {
return ResponseEntity.status(HttpStatus.OK).body(contactService.remove(contact_id));
}
@PreAuthorize("hasPermission(this.contactService.getContactByIds(#ids),'iBizBusinessCentral-Contact-Remove')")
@ApiOperation(value = "根据客户批量删除联系人", tags = {"联系人" }, notes = "根据客户批量删除联系人")
@RequestMapping(method = RequestMethod.DELETE, value = "/accounts/{account_id}/contacts/batch")
public ResponseEntity<Boolean> removeBatchByAccount(@RequestBody List<String> ids) {
contactService.removeBatch(ids);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PostAuthorize("hasPermission(this.contactMapping.toDomain(returnObject.body),'iBizBusinessCentral-Contact-Get')")
@ApiOperation(value = "根据客户获取联系人", tags = {"联系人" }, notes = "根据客户获取联系人")
@RequestMapping(method = RequestMethod.GET, value = "/accounts/{account_id}/contacts/{contact_id}")
public ResponseEntity<ContactDTO> getByAccount(@PathVariable("account_id") String account_id, @PathVariable("contact_id") String contact_id) {
Contact domain = contactService.get(contact_id);
ContactDTO dto = contactMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.contactMapping.toDomain(#contactdto),'iBizBusinessCentral-Contact-Save')")
@ApiOperation(value = "根据客户保存联系人", tags = {"联系人" }, notes = "根据客户保存联系人")
@RequestMapping(method = RequestMethod.POST, value = "/accounts/{account_id}/contacts/save")
public ResponseEntity<Boolean> saveByAccount(@PathVariable("account_id") String account_id, @RequestBody ContactDTO contactdto) {
Contact domain = contactMapping.toDomain(contactdto);
domain.setCustomerid(account_id);
return ResponseEntity.status(HttpStatus.OK).body(contactService.save(domain));
}
@PreAuthorize("hasPermission(this.contactMapping.toDomain(#contactdtos),'iBizBusinessCentral-Contact-Save')")
@ApiOperation(value = "根据客户批量保存联系人", tags = {"联系人" }, notes = "根据客户批量保存联系人")
@RequestMapping(method = RequestMethod.POST, value = "/accounts/{account_id}/contacts/savebatch")
public ResponseEntity<Boolean> saveBatchByAccount(@PathVariable("account_id") String account_id, @RequestBody List<ContactDTO> contactdtos) {
List<Contact> domainlist=contactMapping.toDomain(contactdtos);
for(Contact domain:domainlist){
domain.setCustomerid(account_id);
}
contactService.saveBatch(domainlist);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasPermission(this.contactService.get(#contact_id),'iBizBusinessCentral-Contact-Update')")
@ApiOperation(value = "根据客户更新联系人", tags = {"联系人" }, notes = "根据客户更新联系人")
@RequestMapping(method = RequestMethod.PUT, value = "/accounts/{account_id}/contacts/{contact_id}")
@Transactional
public ResponseEntity<ContactDTO> updateByAccount(@PathVariable("account_id") String account_id, @PathVariable("contact_id") String contact_id, @RequestBody ContactDTO contactdto) {
Contact domain = contactMapping.toDomain(contactdto);
domain.setCustomerid(account_id);
domain.setContactid(contact_id);
contactService.update(domain);
ContactDTO dto = contactMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.contactService.getContactByEntities(this.contactMapping.toDomain(#contactdtos)),'iBizBusinessCentral-Contact-Update')")
@ApiOperation(value = "根据客户批量更新联系人", tags = {"联系人" }, notes = "根据客户批量更新联系人")
@RequestMapping(method = RequestMethod.PUT, value = "/accounts/{account_id}/contacts/batch")
public ResponseEntity<Boolean> updateBatchByAccount(@PathVariable("account_id") String account_id, @RequestBody List<ContactDTO> contactdtos) {
List<Contact> domainlist=contactMapping.toDomain(contactdtos);
for(Contact domain:domainlist){
domain.setCustomerid(account_id);
}
contactService.updateBatch(domainlist);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@ApiOperation(value = "根据客户获取联系人草稿", tags = {"联系人" }, notes = "根据客户获取联系人草稿")
@RequestMapping(method = RequestMethod.GET, value = "/accounts/{account_id}/contacts/getdraft")
public ResponseEntity<ContactDTO> getDraftByAccount(@PathVariable("account_id") String account_id) {
Contact domain = new Contact();
domain.setCustomerid(account_id);
return ResponseEntity.status(HttpStatus.OK).body(contactMapping.toDto(contactService.getDraft(domain)));
}
@PreAuthorize("hasPermission(this.contactMapping.toDomain(#contactdto),'iBizBusinessCentral-Contact-Create')")
@ApiOperation(value = "根据客户建立联系人", tags = {"联系人" }, notes = "根据客户建立联系人")
@RequestMapping(method = RequestMethod.POST, value = "/accounts/{account_id}/contacts")
@Transactional
public ResponseEntity<ContactDTO> createByAccount(@PathVariable("account_id") String account_id, @RequestBody ContactDTO contactdto) {
Contact domain = contactMapping.toDomain(contactdto);
domain.setCustomerid(account_id);
contactService.create(domain);
ContactDTO dto = contactMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.contactMapping.toDomain(#contactdtos),'iBizBusinessCentral-Contact-Create')")
@ApiOperation(value = "根据客户批量建立联系人", tags = {"联系人" }, notes = "根据客户批量建立联系人")
@RequestMapping(method = RequestMethod.POST, value = "/accounts/{account_id}/contacts/batch")
public ResponseEntity<Boolean> createBatchByAccount(@PathVariable("account_id") String account_id, @RequestBody List<ContactDTO> contactdtos) {
List<Contact> domainlist=contactMapping.toDomain(contactdtos);
for(Contact domain:domainlist){
domain.setCustomerid(account_id);
}
contactService.createBatch(domainlist);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Contact-Default-all')")
@ApiOperation(value = "根据客户获取DEFAULT", tags = {"联系人" } ,notes = "根据客户获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/accounts/{account_id}/contacts/fetchdefault")
public ResponseEntity<List<ContactDTO>> fetchContactDefaultByAccount(@PathVariable("account_id") String account_id,ContactSearchContext context) {
context.setN_customerid_eq(account_id);
Page<Contact> domains = contactService.searchDefault(context) ;
List<ContactDTO> list = contactMapping.toDto(domains.getContent());
return ResponseEntity.status(HttpStatus.OK)
.header("x-page", String.valueOf(context.getPageable().getPageNumber()))
.header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
.header("x-total", String.valueOf(domains.getTotalElements()))
.body(list);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Contact-Default-all')")
@ApiOperation(value = "根据客户查询DEFAULT", tags = {"联系人" } ,notes = "根据客户查询DEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/accounts/{account_id}/contacts/searchdefault")
public ResponseEntity<Page<ContactDTO>> searchContactDefaultByAccount(@PathVariable("account_id") String account_id, @RequestBody ContactSearchContext context) {
context.setN_customerid_eq(account_id);
Page<Contact> domains = contactService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(contactMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册