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

xignzi006 发布系统代码

上级 d2161306
......@@ -1209,6 +1209,16 @@
"viewtag": "7b7560b6d508b7bb0447d3204ed1c8be",
"memo": ""
},
"quotebyparentkey": {
"title": "报价单信息",
"caption": "报价单",
"viewtype": "DEGRIDVIEW",
"viewmodule": "Sales",
"viewname": "QuoteByParentKey",
"viewfilename": "quote-by-parent-key",
"viewtag": "7b8b062c86b8e62d907ccbd467bb7ac6",
"memo": "系统自动添加"
},
"opportunityeditview": {
"title": "商机编辑视图",
"caption": "商机",
......@@ -1729,6 +1739,16 @@
"viewtag": "a69ba7dd2f8bdac8a3c733dcc79c0ee5",
"memo": ""
},
"salesorderbyparentkey": {
"title": "订单信息",
"caption": "订单",
"viewtype": "DEGRIDVIEW",
"viewmodule": "Sales",
"viewname": "SalesOrderByParentKey",
"viewfilename": "sales-order-by-parent-key",
"viewtag": "a949aac338fd2543ae39e258573ab231",
"memo": "系统自动添加"
},
"phonecalleditview": {
"title": "电话联络编辑视图",
"caption": "电话联络",
......
......@@ -118,44 +118,6 @@ export default {
uiactions: {
},
},
editviewtoolbar_toolbar: {
tbitem3: {
caption: "Save",
tip: "Save",
},
tbitem4: {
caption: "Save And New",
tip: "Save And New",
},
tbitem5: {
caption: "Save And Close",
tip: "Save And Close Window",
},
tbitem6: {
caption: "-",
tip: "",
},
tbitem7: {
caption: "Remove And Close",
tip: "Remove And Close Window",
},
tbitem8: {
caption: "-",
tip: "",
},
tbitem12: {
caption: "New",
tip: "New",
},
tbitem13: {
caption: "-",
tip: "",
},
tbitem14: {
caption: "Copy",
tip: "Copy {0}",
},
},
quodetailgridviewtoolbar_toolbar: {
deuiaction1: {
caption: "New",
......@@ -194,4 +156,42 @@ export default {
tip: "Filter",
},
},
editviewtoolbar_toolbar: {
tbitem3: {
caption: "Save",
tip: "Save",
},
tbitem4: {
caption: "Save And New",
tip: "Save And New",
},
tbitem5: {
caption: "Save And Close",
tip: "Save And Close Window",
},
tbitem6: {
caption: "-",
tip: "",
},
tbitem7: {
caption: "Remove And Close",
tip: "Remove And Close Window",
},
tbitem8: {
caption: "-",
tip: "",
},
tbitem12: {
caption: "New",
tip: "New",
},
tbitem13: {
caption: "-",
tip: "",
},
tbitem14: {
caption: "Copy",
tip: "Copy {0}",
},
},
};
\ No newline at end of file
......@@ -117,44 +117,6 @@ export default {
uiactions: {
},
},
editviewtoolbar_toolbar: {
tbitem3: {
caption: "保存",
tip: "保存",
},
tbitem4: {
caption: "保存并新建",
tip: "保存并新建",
},
tbitem5: {
caption: "保存并关闭",
tip: "保存并关闭",
},
tbitem6: {
caption: "-",
tip: "",
},
tbitem7: {
caption: "删除并关闭",
tip: "删除并关闭",
},
tbitem8: {
caption: "-",
tip: "",
},
tbitem12: {
caption: "新建",
tip: "新建",
},
tbitem13: {
caption: "-",
tip: "",
},
tbitem14: {
caption: "拷贝",
tip: "拷贝",
},
},
quodetailgridviewtoolbar_toolbar: {
deuiaction1: {
caption: "新建",
......@@ -193,4 +155,42 @@ export default {
tip: "过滤",
},
},
editviewtoolbar_toolbar: {
tbitem3: {
caption: "保存",
tip: "保存",
},
tbitem4: {
caption: "保存并新建",
tip: "保存并新建",
},
tbitem5: {
caption: "保存并关闭",
tip: "保存并关闭",
},
tbitem6: {
caption: "-",
tip: "",
},
tbitem7: {
caption: "删除并关闭",
tip: "删除并关闭",
},
tbitem8: {
caption: "-",
tip: "",
},
tbitem12: {
caption: "新建",
tip: "新建",
},
tbitem13: {
caption: "-",
tip: "",
},
tbitem14: {
caption: "拷贝",
tip: "拷贝",
},
},
};
\ No newline at end of file
......@@ -114,6 +114,10 @@ export default {
caption: "报价单",
title: "报价单表格视图",
},
byparentkey: {
caption: "报价单",
title: "报价单信息",
},
optionview: {
caption: "报价单",
title: "报价单选项操作视图",
......@@ -361,6 +365,48 @@ export default {
tip: "关闭",
},
},
byparentkeytoolbar_toolbar: {
tbitem1_openquickcreateview: {
caption: "新建",
tip: "新建",
},
tbitem2: {
caption: "-",
tip: "",
},
tbitem4: {
caption: "Edit",
tip: "Edit {0}",
},
tbitem6: {
caption: "Copy",
tip: "Copy {0}",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "Remove",
tip: "Remove {0}",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "Export",
tip: "Export {0} Data To Excel",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "Filter",
tip: "Filter",
},
},
gridviewtoolbar_toolbar: {
tbitem1_openquickcreateview: {
caption: "新建",
......
......@@ -113,6 +113,10 @@ export default {
caption: "报价单",
title: "报价单表格视图",
},
byparentkey: {
caption: "报价单",
title: "报价单信息",
},
optionview: {
caption: "报价单",
title: "报价单选项操作视图",
......@@ -360,6 +364,48 @@ export default {
tip: "关闭",
},
},
byparentkeytoolbar_toolbar: {
tbitem1_openquickcreateview: {
caption: "新建",
tip: "新建",
},
tbitem2: {
caption: "-",
tip: "",
},
tbitem4: {
caption: "编辑",
tip: "编辑",
},
tbitem6: {
caption: "拷贝",
tip: "拷贝",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "删除",
tip: "删除",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "导出",
tip: "导出",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "过滤",
tip: "过滤",
},
},
gridviewtoolbar_toolbar: {
tbitem1_openquickcreateview: {
caption: "新建",
......
......@@ -117,6 +117,10 @@ export default {
caption: "订单",
title: "订单数据看板视图",
},
byparentkey: {
caption: "订单",
title: "订单信息",
},
pickupgridview: {
caption: "订单",
title: "订单选择表格视图",
......@@ -300,7 +304,7 @@ export default {
tip: "关闭",
},
},
gridviewtoolbar_toolbar: {
byparentkeytoolbar_toolbar: {
tbitem1_openquickcreateview: {
caption: "新建",
tip: "新建",
......@@ -380,4 +384,46 @@ export default {
tip: "Copy {0}",
},
},
gridviewtoolbar_toolbar: {
tbitem1_openquickcreateview: {
caption: "新建",
tip: "新建",
},
tbitem2: {
caption: "-",
tip: "",
},
tbitem4: {
caption: "Edit",
tip: "Edit {0}",
},
tbitem6: {
caption: "Copy",
tip: "Copy {0}",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "Remove",
tip: "Remove {0}",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "Export",
tip: "Export {0} Data To Excel",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "Filter",
tip: "Filter",
},
},
};
\ No newline at end of file
......@@ -116,6 +116,10 @@ export default {
caption: "订单",
title: "订单数据看板视图",
},
byparentkey: {
caption: "订单",
title: "订单信息",
},
pickupgridview: {
caption: "订单",
title: "订单选择表格视图",
......@@ -299,7 +303,7 @@ export default {
tip: "关闭",
},
},
gridviewtoolbar_toolbar: {
byparentkeytoolbar_toolbar: {
tbitem1_openquickcreateview: {
caption: "新建",
tip: "新建",
......@@ -379,4 +383,46 @@ export default {
tip: "拷贝",
},
},
gridviewtoolbar_toolbar: {
tbitem1_openquickcreateview: {
caption: "新建",
tip: "新建",
},
tbitem2: {
caption: "-",
tip: "",
},
tbitem4: {
caption: "编辑",
tip: "编辑",
},
tbitem6: {
caption: "拷贝",
tip: "拷贝",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "删除",
tip: "删除",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "导出",
tip: "导出",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "过滤",
tip: "过滤",
},
},
};
\ No newline at end of file
......@@ -1480,6 +1480,230 @@ mock.onPost(new RegExp(/^\/quotes\/?([a-zA-Z0-9\-\;]{0,35})\/win$/)).reply((conf
});
// FetchByParentKey
mock.onGet(new RegExp(/^\/accounts\/([a-zA-Z0-9\-\;]{1,35})\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/opportunities\/([a-zA-Z0-9\-\;]{1,35})\/quotes\/fetchbyparentkey$/)).reply((config: any) => {
console.groupCollapsed("实体:quote 方法: FetchByParentKey");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['accountid','contactid','opportunityid'];
let tempValue: any = {};
const matchArray:any = new RegExp(/^\/accounts\/([a-zA-Z0-9\-\;]{1,35})\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/opportunities\/([a-zA-Z0-9\-\;]{1,35})\/quotes\/fetchbyparentkey$/).exec(config.url);
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
if (items.length > 0 && paramArray.length > 0) {
paramArray.forEach((paramkey: any) => {
if (tempValue[paramkey] && tempValue[paramkey].indexOf(";") > 0) {
let keysGrounp: Array<any> = tempValue[paramkey].split(new RegExp(/[\;]/));
let tempArray: Array<any> = [];
keysGrounp.forEach((singlekey: any) => {
let _items = items.filter((item: any) => { return item[paramkey] == singlekey });
if(_items.length >0){
tempArray.push(..._items);
}
})
items = tempArray;
} else {
items = items.filter((item: any) => { return item[paramkey] == tempValue[paramkey] });
}
})
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(items);
console.groupEnd();
console.groupEnd();
return [status, items];
});
// FetchByParentKey
mock.onGet(new RegExp(/^\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/opportunities\/([a-zA-Z0-9\-\;]{1,35})\/quotes\/fetchbyparentkey$/)).reply((config: any) => {
console.groupCollapsed("实体:quote 方法: FetchByParentKey");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['contactid','opportunityid'];
let tempValue: any = {};
const matchArray:any = new RegExp(/^\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/opportunities\/([a-zA-Z0-9\-\;]{1,35})\/quotes\/fetchbyparentkey$/).exec(config.url);
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
if (items.length > 0 && paramArray.length > 0) {
paramArray.forEach((paramkey: any) => {
if (tempValue[paramkey] && tempValue[paramkey].indexOf(";") > 0) {
let keysGrounp: Array<any> = tempValue[paramkey].split(new RegExp(/[\;]/));
let tempArray: Array<any> = [];
keysGrounp.forEach((singlekey: any) => {
let _items = items.filter((item: any) => { return item[paramkey] == singlekey });
if(_items.length >0){
tempArray.push(..._items);
}
})
items = tempArray;
} else {
items = items.filter((item: any) => { return item[paramkey] == tempValue[paramkey] });
}
})
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(items);
console.groupEnd();
console.groupEnd();
return [status, items];
});
// FetchByParentKey
mock.onGet(new RegExp(/^\/accounts\/([a-zA-Z0-9\-\;]{1,35})\/opportunities\/([a-zA-Z0-9\-\;]{1,35})\/quotes\/fetchbyparentkey$/)).reply((config: any) => {
console.groupCollapsed("实体:quote 方法: FetchByParentKey");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['accountid','opportunityid'];
let tempValue: any = {};
const matchArray:any = new RegExp(/^\/accounts\/([a-zA-Z0-9\-\;]{1,35})\/opportunities\/([a-zA-Z0-9\-\;]{1,35})\/quotes\/fetchbyparentkey$/).exec(config.url);
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
if (items.length > 0 && paramArray.length > 0) {
paramArray.forEach((paramkey: any) => {
if (tempValue[paramkey] && tempValue[paramkey].indexOf(";") > 0) {
let keysGrounp: Array<any> = tempValue[paramkey].split(new RegExp(/[\;]/));
let tempArray: Array<any> = [];
keysGrounp.forEach((singlekey: any) => {
let _items = items.filter((item: any) => { return item[paramkey] == singlekey });
if(_items.length >0){
tempArray.push(..._items);
}
})
items = tempArray;
} else {
items = items.filter((item: any) => { return item[paramkey] == tempValue[paramkey] });
}
})
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(items);
console.groupEnd();
console.groupEnd();
return [status, items];
});
// FetchByParentKey
mock.onGet(new RegExp(/^\/opportunities\/([a-zA-Z0-9\-\;]{1,35})\/quotes\/fetchbyparentkey$/)).reply((config: any) => {
console.groupCollapsed("实体:quote 方法: FetchByParentKey");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['opportunityid'];
let tempValue: any = {};
const matchArray:any = new RegExp(/^\/opportunities\/([a-zA-Z0-9\-\;]{1,35})\/quotes\/fetchbyparentkey$/).exec(config.url);
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
if (items.length > 0 && paramArray.length > 0) {
paramArray.forEach((paramkey: any) => {
if (tempValue[paramkey] && tempValue[paramkey].indexOf(";") > 0) {
let keysGrounp: Array<any> = tempValue[paramkey].split(new RegExp(/[\;]/));
let tempArray: Array<any> = [];
keysGrounp.forEach((singlekey: any) => {
let _items = items.filter((item: any) => { return item[paramkey] == singlekey });
if(_items.length >0){
tempArray.push(..._items);
}
})
items = tempArray;
} else {
items = items.filter((item: any) => { return item[paramkey] == tempValue[paramkey] });
}
})
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(items);
console.groupEnd();
console.groupEnd();
return [status, items];
});
// FetchByParentKey
mock.onGet(new RegExp(/^\/quotes\/fetchbyparentkey$/)).reply((config: any) => {
console.groupCollapsed("实体:quote 方法: FetchByParentKey");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(mockDatas);
console.groupEnd();
console.groupEnd();
return [status, mockDatas ? mockDatas : []];
});
// FetchByParentKey
mock.onGet(new RegExp(/^\/quotes\/fetchbyparentkey(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:quote 方法: FetchByParentKey");
console.table({url:config.url, method: config.method, data:config.data});
if(config.url.includes('page')){
let url = config.url.split('?')[1];
let params = qs.parse(url);
Object.assign(config, params);
}
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
let total = mockDatas.length;
let records: Array<any> = [];
if(!config.page || !config.size){
records = mockDatas;
}else{
if((config.page-1)*config.size < total){
records = mockDatas.slice(config.page,config.size);
}
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(records ? records : []);
console.groupEnd();
console.groupEnd();
return [status, records ? records : []];
});
// FetchDefault
mock.onGet(new RegExp(/^\/accounts\/([a-zA-Z0-9\-\;]{1,35})\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/opportunities\/([a-zA-Z0-9\-\;]{1,35})\/quotes\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:quote 方法: FetchDefault");
......
......@@ -385,6 +385,50 @@ mock.onPost(new RegExp(/^\/salesorders\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply
return [status, data];
});
// FetchByParentKey
mock.onGet(new RegExp(/^\/salesorders\/fetchbyparentkey$/)).reply((config: any) => {
console.groupCollapsed("实体:salesorder 方法: FetchByParentKey");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(mockDatas);
console.groupEnd();
console.groupEnd();
return [status, mockDatas ? mockDatas : []];
});
// FetchByParentKey
mock.onGet(new RegExp(/^\/salesorders\/fetchbyparentkey(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:salesorder 方法: FetchByParentKey");
console.table({url:config.url, method: config.method, data:config.data});
if(config.url.includes('page')){
let url = config.url.split('?')[1];
let params = qs.parse(url);
Object.assign(config, params);
}
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
let total = mockDatas.length;
let records: Array<any> = [];
if(!config.page || !config.size){
records = mockDatas;
}else{
if((config.page-1)*config.size < total){
records = mockDatas.slice(config.page,config.size);
}
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(records ? records : []);
console.groupEnd();
console.groupEnd();
return [status, records ? records : []];
});
// FetchDefault
mock.onGet(new RegExp(/^\/salesorders\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:salesorder 方法: FetchDefault");
......
......@@ -975,6 +975,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "CampaignResponseQuickCreate",
"viewtag": "7b7560b6d508b7bb0447d3204ed1c8be"
},
"quotebyparentkey": {
"title": "报价单信息",
"caption": "报价单",
"viewtype": "DEGRIDVIEW",
"viewmodule": "Sales",
"viewname": "QuoteByParentKey",
"viewtag": "7b8b062c86b8e62d907ccbd467bb7ac6"
},
"opportunityeditview": {
"title": "商机编辑视图",
"caption": "商机",
......@@ -1391,6 +1399,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "AccountQuickCreate",
"viewtag": "a69ba7dd2f8bdac8a3c733dcc79c0ee5"
},
"salesorderbyparentkey": {
"title": "订单信息",
"caption": "订单",
"viewtype": "DEGRIDVIEW",
"viewmodule": "Sales",
"viewname": "SalesOrderByParentKey",
"viewtag": "a949aac338fd2543ae39e258573ab231"
},
"phonecalleditview": {
"title": "电话联络编辑视图",
"caption": "电话联络",
......
import { Subject } from 'rxjs';
import { GridViewBase } from '@/studio-core';
import QuoteService from '@/service/quote/quote-service';
import GridViewEngine from '@engine/view/grid-view-engine';
import QuoteUIService from '@/uiservice/quote/quote-ui-service';
import CodeListService from "@service/app/codelist-service";
/**
* 报价单信息视图基类
*
* @export
* @class QuoteByParentKeyBase
* @extends {GridViewBase}
*/
export class QuoteByParentKeyBase extends GridViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof QuoteByParentKeyBase
*/
protected appDeName: string = 'quote';
/**
* 实体服务对象
*
* @type {QuoteService}
* @memberof QuoteByParentKeyBase
*/
protected appEntityService: QuoteService = new QuoteService;
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof QuoteByParentKeyBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof QuoteByParentKeyBase
*/
protected model: any = {
srfCaption: 'entities.quote.views.byparentkey.caption',
srfTitle: 'entities.quote.views.byparentkey.title',
srfSubTitle: 'entities.quote.views.byparentkey.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof QuoteByParentKeyBase
*/
protected containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_grid: { name: 'grid', type: 'GRID' },
view_searchform: { name: 'searchform', type: 'SEARCHFORM' },
};
/**
* 工具栏模型
*
* @type {*}
* @memberof QuoteByParentKey
*/
public toolBarModels: any = {
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: '' },
tbitem6: { name: 'tbitem6', caption: '拷贝','isShowCaption':true,'isShowIcon':true, tooltip: '拷贝', iconcls: 'fa fa-copy', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Copy', target: 'SINGLEKEY' }, class: '' },
tbitem7: { name: 'tbitem7', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem8: { name: 'tbitem8', caption: '删除','isShowCaption':true,'isShowIcon':true, tooltip: '删除', iconcls: 'fa fa-remove', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Remove', target: 'MULTIKEY' }, class: '' },
tbitem9: { name: 'tbitem9', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem13: { name: 'tbitem13', caption: '导出','isShowCaption':true,'isShowIcon':true, tooltip: '导出', iconcls: 'fa fa-file-excel-o', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'ExportExcel', target: '' }, MaxRowCount: 1000, class: '' },
tbitem10: { name: 'tbitem10', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem19: { name: 'tbitem19', caption: '过滤','isShowCaption':true,'isShowIcon':true, tooltip: '过滤', iconcls: 'fa fa-filter', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'ToggleFilter', target: '' }, class: '' },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = '7b8b062c86b8e62d907ccbd467bb7ac6';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof QuoteByParentKeyBase
*/
public engine: GridViewEngine = new GridViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof QuoteByParentKeyBase
*/
public engineInit(): void {
this.engine.init({
view: this,
opendata: (args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) => {
this.opendata(args,fullargs, params, $event, xData);
},
newdata: (args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) => {
this.newdata(args,fullargs, params, $event, xData);
},
grid: this.$refs.grid,
searchform: this.$refs.searchform,
keyPSDEField: 'quote',
majorPSDEField: 'quotename',
isLoadDefault: true,
});
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof QuoteByParentKeyBase
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'tbitem1_openquickcreateview')) {
this.toolbar_tbitem1_openquickcreateview_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem4')) {
this.toolbar_tbitem4_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem6')) {
this.toolbar_tbitem6_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem8')) {
this.toolbar_tbitem8_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem13')) {
this.toolbar_tbitem13_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem11')) {
this.toolbar_tbitem11_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem19')) {
this.toolbar_tbitem19_click(null, '', $event2);
}
}
/**
* grid 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof QuoteByParentKeyBase
*/
public grid_selectionchange($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'selectionchange', $event);
}
/**
* grid 部件 beforeload 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof QuoteByParentKeyBase
*/
public grid_beforeload($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'beforeload', $event);
}
/**
* grid 部件 rowdblclick 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof QuoteByParentKeyBase
*/
public grid_rowdblclick($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'rowdblclick', $event);
}
/**
* grid 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof QuoteByParentKeyBase
*/
public grid_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'remove', $event);
}
/**
* grid 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof QuoteByParentKeyBase
*/
public grid_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'load', $event);
}
/**
* searchform 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof QuoteByParentKeyBase
*/
public searchform_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'save', $event);
}
/**
* searchform 部件 search 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof QuoteByParentKeyBase
*/
public searchform_search($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'search', $event);
}
/**
* searchform 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof QuoteByParentKeyBase
*/
public searchform_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'load', $event);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem1_openquickcreateview_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
const curUIService:QuoteUIService = new QuoteUIService();
curUIService.Quote_OpenQuickCreateView(datas,contextJO, paramJO, $event, xData,this,"Quote");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem4_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Edit(datas, contextJO,paramJO, $event, xData,this,"Quote");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem6_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Copy(datas, contextJO,paramJO, $event, xData,this,"Quote");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem8_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Remove(datas, contextJO,paramJO, $event, xData,this,"Quote");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem13_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ExportExcel(datas, contextJO,paramJO, $event, xData,this,"Quote");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem11_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Print(datas, contextJO,paramJO, $event, xData,this,"Quote");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem19_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ToggleFilter(datas, contextJO,paramJO, $event, xData,this,"Quote");
}
/**
* 打开新建数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof QuoteByParentKey
*/
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 tempContext = JSON.parse(JSON.stringify(this.context));
delete tempContext.quote;
if(args.length >0){
Object.assign(tempContext,args[0]);
}
let deResParameters: any[] = [];
if(tempContext.opportunity && true){
deResParameters = [
{ pathName: 'opportunities', parameterName: 'opportunity' },
]
}
const parameters: any[] = [
{ pathName: 'quotes', parameterName: 'quote' },
];
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')) {
return;
}
if (!xData || !(xData.refresh instanceof Function)) {
return;
}
xData.refresh(result.datas);
});
}
const view: any = {
viewname: 'quote-option-view',
height: 0,
width: 0,
title: this.$t('entities.quote.views.optionview.title'),
placement: 'DRAWER_RIGHT',
};
openDrawer(view, data);
}
/**
* 打开编辑数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof QuoteByParentKey
*/
public opendata(args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) {
let localContext:any = null;
let localViewParam:any =null;
const data: any = {};
let tempContext = JSON.parse(JSON.stringify(this.context));
if(args.length >0){
Object.assign(tempContext,args[0]);
}
let deResParameters: any[] = [];
if(tempContext.opportunity && true){
deResParameters = [
{ pathName: 'opportunities', parameterName: 'opportunity' },
]
}
const parameters: any[] = [
{ pathName: 'quotes', parameterName: 'quote' },
{ pathName: 'info', parameterName: 'info' },
];
const _this: any = this;
const openIndexViewTab = (data: any) => {
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, data);
this.$router.push(routePath);
}
openIndexViewTab(data);
}
/**
* 编辑
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof QuoteByParentKeyBase
*/
public Edit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
return;
}
const _this: any = this;
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
Object.assign(data, { quote: args[0].quote })
}
_this.opendata([{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
}
}
/**
* 拷贝
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof QuoteByParentKeyBase
*/
public Copy(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
return;
}
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
}
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) {
if (args.length > 0) {
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
}
xData.copy(args[0].srfkey);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
}
}
/**
* 删除
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof QuoteByParentKeyBase
*/
public Remove(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.remove instanceof Function)) {
return ;
}
xData.remove(args);
}
/**
* 导出
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof QuoteByParentKeyBase
*/
public ExportExcel(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.exportExcel instanceof Function) || !$event) {
return ;
}
xData.exportExcel($event.exportparms);
}
/**
* 打印
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof QuoteByParentKeyBase
*/
public Print(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let _this:any = this;
if (!xData || !(xData.print instanceof Function) || !$event) {
return ;
}
xData.print();
}
/**
* 过滤
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof QuoteByParentKeyBase
*/
public ToggleFilter(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (_this.hasOwnProperty('isExpandSearchForm')) {
_this.isExpandSearchForm = !_this.isExpandSearchForm;
}
}
}
\ No newline at end of file
<studio-view-style2 viewName="quotebyparentkey" viewTitle="报价单信息" class='degridview quote-by-parent-key'>
<i-input slot="quickSearch" v-show="!isExpandSearchForm" v-model="query" search @on-search="onSearch($event)"/>
<template slot="toolbar">
<view-toolbar mode="STYLE2" :model="toolBarModels" @item-click="toolbar_click($event)"/> </template>
<template slot="searchForm">
<view_searchform
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:showBusyIndicator="true"
v-show="isExpandSearchForm"
loaddraftAction="FilterGetDraft"
loadAction="FilterGet"
name="searchform"
ref='searchform'
@save="searchform_save($event)"
@search="searchform_search($event)"
@load="searchform_load($event)"
@closeview="closeView($event)">
</view_searchform>
</template>
<view_grid
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:isSingleSelect="isGridSingleSelect"
:showBusyIndicator="true"
:isOpenEdit="false"
:gridRowActiveMode="gridRowActiveMode"
@save="onSave"
updateAction=""
removeAction="Remove"
loaddraftAction=""
loadAction=""
createAction=""
fetchAction="FetchByParentKey"
:newdata="newdata"
:opendata="opendata"
name="grid"
ref='grid'
@selectionchange="grid_selectionchange($event)"
@beforeload="grid_beforeload($event)"
@rowdblclick="grid_rowdblclick($event)"
@remove="grid_remove($event)"
@load="grid_load($event)"
@closeview="closeView($event)">
</view_grid>
</studio-view-style2>
\ No newline at end of file
<template src="./quote-by-parent-key.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { QuoteByParentKeyBase } from './quote-by-parent-key-base';
import view_grid from '@widgets/quote/main-grid/main-grid.vue';
import view_searchform from '@widgets/quote/default-searchform/default-searchform.vue';
/**
* 报价单信息视图
*
* @export
* @class QuoteByParentKey
* @extends {QuoteByParentKeyBase}
*/
@Component({
components: {
view_grid,
view_searchform,
}
})
@VueLifeCycleProcessing()
export default class QuoteByParentKey extends QuoteByParentKeyBase { }
</script>
<studio-view-style2 viewName="quotegridview" viewTitle="报价单信息" class='degridview quote-grid-view'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template>
<i-input slot="quickSearch" v-show="!isExpandSearchForm" v-model="query" search @on-search="onSearch($event)"/>
<template slot="toolbar">
<view-toolbar mode="STYLE2" :model="toolBarModels" @item-click="toolbar_click($event)"/> </template>
......
import { Subject } from 'rxjs';
import { GridViewBase } from '@/studio-core';
import SalesOrderService from '@/service/sales-order/sales-order-service';
import GridViewEngine from '@engine/view/grid-view-engine';
import SalesOrderUIService from '@/uiservice/sales-order/sales-order-ui-service';
import CodeListService from "@service/app/codelist-service";
/**
* 订单信息视图基类
*
* @export
* @class SalesOrderByParentKeyBase
* @extends {GridViewBase}
*/
export class SalesOrderByParentKeyBase extends GridViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof SalesOrderByParentKeyBase
*/
protected appDeName: string = 'salesorder';
/**
* 实体服务对象
*
* @type {SalesOrderService}
* @memberof SalesOrderByParentKeyBase
*/
protected appEntityService: SalesOrderService = new SalesOrderService;
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof SalesOrderByParentKeyBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof SalesOrderByParentKeyBase
*/
protected model: any = {
srfCaption: 'entities.salesorder.views.byparentkey.caption',
srfTitle: 'entities.salesorder.views.byparentkey.title',
srfSubTitle: 'entities.salesorder.views.byparentkey.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof SalesOrderByParentKeyBase
*/
protected containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_grid: { name: 'grid', type: 'GRID' },
view_searchform: { name: 'searchform', type: 'SEARCHFORM' },
};
/**
* 工具栏模型
*
* @type {*}
* @memberof SalesOrderByParentKey
*/
public toolBarModels: any = {
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: '' },
tbitem6: { name: 'tbitem6', caption: '拷贝','isShowCaption':true,'isShowIcon':true, tooltip: '拷贝', iconcls: 'fa fa-copy', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Copy', target: 'SINGLEKEY' }, class: '' },
tbitem7: { name: 'tbitem7', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem8: { name: 'tbitem8', caption: '删除','isShowCaption':true,'isShowIcon':true, tooltip: '删除', iconcls: 'fa fa-remove', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Remove', target: 'MULTIKEY' }, class: '' },
tbitem9: { name: 'tbitem9', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem13: { name: 'tbitem13', caption: '导出','isShowCaption':true,'isShowIcon':true, tooltip: '导出', iconcls: 'fa fa-file-excel-o', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'ExportExcel', target: '' }, MaxRowCount: 1000, class: '' },
tbitem10: { name: 'tbitem10', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem19: { name: 'tbitem19', caption: '过滤','isShowCaption':true,'isShowIcon':true, tooltip: '过滤', iconcls: 'fa fa-filter', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'ToggleFilter', target: '' }, class: '' },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = 'a949aac338fd2543ae39e258573ab231';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof SalesOrderByParentKeyBase
*/
public engine: GridViewEngine = new GridViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof SalesOrderByParentKeyBase
*/
public engineInit(): void {
this.engine.init({
view: this,
opendata: (args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) => {
this.opendata(args,fullargs, params, $event, xData);
},
newdata: (args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) => {
this.newdata(args,fullargs, params, $event, xData);
},
grid: this.$refs.grid,
searchform: this.$refs.searchform,
keyPSDEField: 'salesorder',
majorPSDEField: 'salesordername',
isLoadDefault: true,
});
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SalesOrderByParentKeyBase
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'tbitem1_openquickcreateview')) {
this.toolbar_tbitem1_openquickcreateview_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem4')) {
this.toolbar_tbitem4_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem6')) {
this.toolbar_tbitem6_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem8')) {
this.toolbar_tbitem8_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem13')) {
this.toolbar_tbitem13_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem11')) {
this.toolbar_tbitem11_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem19')) {
this.toolbar_tbitem19_click(null, '', $event2);
}
}
/**
* grid 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SalesOrderByParentKeyBase
*/
public grid_selectionchange($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'selectionchange', $event);
}
/**
* grid 部件 beforeload 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SalesOrderByParentKeyBase
*/
public grid_beforeload($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'beforeload', $event);
}
/**
* grid 部件 rowdblclick 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SalesOrderByParentKeyBase
*/
public grid_rowdblclick($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'rowdblclick', $event);
}
/**
* grid 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SalesOrderByParentKeyBase
*/
public grid_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'remove', $event);
}
/**
* grid 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SalesOrderByParentKeyBase
*/
public grid_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'load', $event);
}
/**
* searchform 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SalesOrderByParentKeyBase
*/
public searchform_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'save', $event);
}
/**
* searchform 部件 search 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SalesOrderByParentKeyBase
*/
public searchform_search($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'search', $event);
}
/**
* searchform 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SalesOrderByParentKeyBase
*/
public searchform_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'load', $event);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem1_openquickcreateview_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
const curUIService:SalesOrderUIService = new SalesOrderUIService();
curUIService.SalesOrder_OpenQuickCreateView(datas,contextJO, paramJO, $event, xData,this,"SalesOrder");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem4_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Edit(datas, contextJO,paramJO, $event, xData,this,"SalesOrder");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem6_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Copy(datas, contextJO,paramJO, $event, xData,this,"SalesOrder");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem8_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Remove(datas, contextJO,paramJO, $event, xData,this,"SalesOrder");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem13_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ExportExcel(datas, contextJO,paramJO, $event, xData,this,"SalesOrder");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem11_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Print(datas, contextJO,paramJO, $event, xData,this,"SalesOrder");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem19_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ToggleFilter(datas, contextJO,paramJO, $event, xData,this,"SalesOrder");
}
/**
* 打开新建数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof SalesOrderByParentKey
*/
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 tempContext = JSON.parse(JSON.stringify(this.context));
delete tempContext.salesorder;
if(args.length >0){
Object.assign(tempContext,args[0]);
}
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'salesorders', parameterName: 'salesorder' },
];
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')) {
return;
}
if (!xData || !(xData.refresh instanceof Function)) {
return;
}
xData.refresh(result.datas);
});
}
const view: any = {
viewname: 'sales-order-quick-create-view',
height: 0,
width: 0,
title: this.$t('entities.salesorder.views.quickcreateview.title'),
placement: 'DRAWER_RIGHT',
};
openDrawer(view, data);
}
/**
* 打开编辑数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof SalesOrderByParentKey
*/
public opendata(args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) {
let localContext:any = null;
let localViewParam:any =null;
const data: any = {};
let tempContext = JSON.parse(JSON.stringify(this.context));
if(args.length >0){
Object.assign(tempContext,args[0]);
}
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'salesorders', parameterName: 'salesorder' },
{ pathName: 'infoview', parameterName: 'infoview' },
];
const _this: any = this;
const openIndexViewTab = (data: any) => {
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, data);
this.$router.push(routePath);
}
openIndexViewTab(data);
}
/**
* 编辑
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof SalesOrderByParentKeyBase
*/
public Edit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
return;
}
const _this: any = this;
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
Object.assign(data, { salesorder: args[0].salesorder })
}
_this.opendata([{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
}
}
/**
* 拷贝
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof SalesOrderByParentKeyBase
*/
public Copy(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
return;
}
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
}
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) {
if (args.length > 0) {
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
}
xData.copy(args[0].srfkey);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
}
}
/**
* 删除
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof SalesOrderByParentKeyBase
*/
public Remove(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.remove instanceof Function)) {
return ;
}
xData.remove(args);
}
/**
* 导出
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof SalesOrderByParentKeyBase
*/
public ExportExcel(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.exportExcel instanceof Function) || !$event) {
return ;
}
xData.exportExcel($event.exportparms);
}
/**
* 打印
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof SalesOrderByParentKeyBase
*/
public Print(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let _this:any = this;
if (!xData || !(xData.print instanceof Function) || !$event) {
return ;
}
xData.print();
}
/**
* 过滤
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof SalesOrderByParentKeyBase
*/
public ToggleFilter(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (_this.hasOwnProperty('isExpandSearchForm')) {
_this.isExpandSearchForm = !_this.isExpandSearchForm;
}
}
}
\ No newline at end of file
<studio-view-style2 viewName="salesorderbyparentkey" viewTitle="订单信息" class='degridview sales-order-by-parent-key'>
<i-input slot="quickSearch" v-show="!isExpandSearchForm" v-model="query" search @on-search="onSearch($event)"/>
<template slot="toolbar">
<view-toolbar mode="STYLE2" :model="toolBarModels" @item-click="toolbar_click($event)"/> </template>
<template slot="searchForm">
<view_searchform
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:showBusyIndicator="true"
v-show="isExpandSearchForm"
loaddraftAction="FilterGetDraft"
loadAction="FilterGet"
name="searchform"
ref='searchform'
@save="searchform_save($event)"
@search="searchform_search($event)"
@load="searchform_load($event)"
@closeview="closeView($event)">
</view_searchform>
</template>
<view_grid
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:isSingleSelect="isGridSingleSelect"
:showBusyIndicator="true"
:isOpenEdit="false"
:gridRowActiveMode="gridRowActiveMode"
@save="onSave"
updateAction=""
removeAction="Remove"
loaddraftAction=""
loadAction=""
createAction=""
fetchAction="FetchByParentKey"
:newdata="newdata"
:opendata="opendata"
name="grid"
ref='grid'
@selectionchange="grid_selectionchange($event)"
@beforeload="grid_beforeload($event)"
@rowdblclick="grid_rowdblclick($event)"
@remove="grid_remove($event)"
@load="grid_load($event)"
@closeview="closeView($event)">
</view_grid>
</studio-view-style2>
\ No newline at end of file
<template src="./sales-order-by-parent-key.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { SalesOrderByParentKeyBase } from './sales-order-by-parent-key-base';
import view_grid from '@widgets/sales-order/main-grid/main-grid.vue';
import view_searchform from '@widgets/sales-order/default-searchform/default-searchform.vue';
/**
* 订单信息视图
*
* @export
* @class SalesOrderByParentKey
* @extends {SalesOrderByParentKeyBase}
*/
@Component({
components: {
view_grid,
view_searchform,
}
})
@VueLifeCycleProcessing()
export default class SalesOrderByParentKey extends SalesOrderByParentKeyBase { }
</script>
......@@ -64,6 +64,7 @@ export const PageComponents = {
Vue.component('sales-order-grid-view', () => import('@pages/sales/sales-order-grid-view/sales-order-grid-view.vue'));
Vue.component('campaign-activity-edit-view', () => import('@pages/marketing/campaign-activity-edit-view/campaign-activity-edit-view.vue'));
Vue.component('contact-quick-create', () => import('@pages/base/contact-quick-create/contact-quick-create.vue'));
Vue.component('quote-by-parent-key', () => import('@pages/sales/quote-by-parent-key/quote-by-parent-key.vue'));
Vue.component('competitor-info-abstract', () => import('@pages/sales/competitor-info-abstract/competitor-info-abstract.vue'));
Vue.component('metric-pickup-view', () => import('@pages/base/metric-pickup-view/metric-pickup-view.vue'));
Vue.component('metric-edit-view', () => import('@pages/base/metric-edit-view/metric-edit-view.vue'));
......@@ -144,6 +145,7 @@ export const PageComponents = {
Vue.component('competitor-info', () => import('@pages/sales/competitor-info/competitor-info.vue'));
Vue.component('lead-excluded-grid-view', () => import('@pages/sales/lead-excluded-grid-view/lead-excluded-grid-view.vue'));
Vue.component('account-pickup-grid-view', () => import('@pages/base/account-pickup-grid-view/account-pickup-grid-view.vue'));
Vue.component('sales-order-by-parent-key', () => import('@pages/sales/sales-order-by-parent-key/sales-order-by-parent-key.vue'));
Vue.component('lead-on-grid-view', () => import('@pages/sales/lead-on-grid-view/lead-on-grid-view.vue'));
Vue.component('lead-info', () => import('@pages/sales/lead-info/lead-info.vue'));
Vue.component('product-pickup-grid-view', () => import('@pages/product/product-pickup-grid-view/product-pickup-grid-view.vue'));
......
......@@ -1886,6 +1886,84 @@ const router = new Router({
},
component: () => import('@pages/base/contact-quick-create/contact-quick-create.vue'),
},
{
path: 'accounts/:account?/contacts/:contact?/opportunities/:opportunity?/quotes/:quote?/byparentkey/:byparentkey?',
meta: {
caption: 'entities.quote.views.byparentkey.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'accounts', parameterName: 'account' },
{ pathName: 'contacts', parameterName: 'contact' },
{ pathName: 'opportunities', parameterName: 'opportunity' },
{ pathName: 'quotes', parameterName: 'quote' },
{ pathName: 'byparentkey', parameterName: 'byparentkey' },
],
requireAuth: true,
},
component: () => import('@pages/sales/quote-by-parent-key/quote-by-parent-key.vue'),
},
{
path: 'contacts/:contact?/opportunities/:opportunity?/quotes/:quote?/byparentkey/:byparentkey?',
meta: {
caption: 'entities.quote.views.byparentkey.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'contacts', parameterName: 'contact' },
{ pathName: 'opportunities', parameterName: 'opportunity' },
{ pathName: 'quotes', parameterName: 'quote' },
{ pathName: 'byparentkey', parameterName: 'byparentkey' },
],
requireAuth: true,
},
component: () => import('@pages/sales/quote-by-parent-key/quote-by-parent-key.vue'),
},
{
path: 'accounts/:account?/opportunities/:opportunity?/quotes/:quote?/byparentkey/:byparentkey?',
meta: {
caption: 'entities.quote.views.byparentkey.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'accounts', parameterName: 'account' },
{ pathName: 'opportunities', parameterName: 'opportunity' },
{ pathName: 'quotes', parameterName: 'quote' },
{ pathName: 'byparentkey', parameterName: 'byparentkey' },
],
requireAuth: true,
},
component: () => import('@pages/sales/quote-by-parent-key/quote-by-parent-key.vue'),
},
{
path: 'opportunities/:opportunity?/quotes/:quote?/byparentkey/:byparentkey?',
meta: {
caption: 'entities.quote.views.byparentkey.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'opportunities', parameterName: 'opportunity' },
{ pathName: 'quotes', parameterName: 'quote' },
{ pathName: 'byparentkey', parameterName: 'byparentkey' },
],
requireAuth: true,
},
component: () => import('@pages/sales/quote-by-parent-key/quote-by-parent-key.vue'),
},
{
path: 'quotes/:quote?/byparentkey/:byparentkey?',
meta: {
caption: 'entities.quote.views.byparentkey.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'quotes', parameterName: 'quote' },
{ pathName: 'byparentkey', parameterName: 'byparentkey' },
],
requireAuth: true,
},
component: () => import('@pages/sales/quote-by-parent-key/quote-by-parent-key.vue'),
},
{
path: 'competitors/:competitor?/info_abstract/:info_abstract?',
meta: {
......@@ -4482,6 +4560,20 @@ const router = new Router({
},
component: () => import('@pages/base/account-pickup-grid-view/account-pickup-grid-view.vue'),
},
{
path: 'salesorders/:salesorder?/byparentkey/:byparentkey?',
meta: {
caption: 'entities.salesorder.views.byparentkey.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'salesorders', parameterName: 'salesorder' },
{ pathName: 'byparentkey', parameterName: 'byparentkey' },
],
requireAuth: true,
},
component: () => import('@pages/sales/sales-order-by-parent-key/sales-order-by-parent-key.vue'),
},
{
path: 'accounts/:account?/contacts/:contact?/leads/:lead?/ongridview/:ongridview?',
meta: {
......
......@@ -1063,6 +1063,36 @@ export default class QuoteServiceBase extends EntityService {
return Http.getInstance().post(`/quotes/${context.quote}/win`,data,isloading);
}
/**
* FetchByParentKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof QuoteServiceBase
*/
public async FetchByParentKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.opportunity && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/accounts/${context.account}/contacts/${context.contact}/opportunities/${context.opportunity}/quotes/fetchbyparentkey`,tempData,isloading);
}
if(context.contact && context.opportunity && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/contacts/${context.contact}/opportunities/${context.opportunity}/quotes/fetchbyparentkey`,tempData,isloading);
}
if(context.account && context.opportunity && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/accounts/${context.account}/opportunities/${context.opportunity}/quotes/fetchbyparentkey`,tempData,isloading);
}
if(context.opportunity && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/opportunities/${context.opportunity}/quotes/fetchbyparentkey`,tempData,isloading);
}
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/quotes/fetchbyparentkey`,tempData,isloading);
}
/**
* FetchDefault接口方法
*
......
......@@ -250,6 +250,20 @@ export default class SalesOrderServiceBase extends EntityService {
return res;
}
/**
* FetchByParentKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SalesOrderServiceBase
*/
public async FetchByParentKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/salesorders/fetchbyparentkey`,tempData,isloading);
}
/**
* FetchDefault接口方法
*
......
......@@ -460,14 +460,14 @@ export const viewstate: any = {
viewaction: '',
viewdatachange: false,
refviews: [
'a949aac338fd2543ae39e258573ab231',
'15d12c1173fcb6e742b6a6d92cbc53ed',
'0326a502bb574cddc41da4323786dcb5',
'08e0772f0c42c435525ed40425ae4661',
'26e0707950d8676b9a9363c6bc46ee89',
'5f8f689d5dccc3db6d2b74a24a8b24ef',
'dfc0051ae4813115e03f3d095f8cd7d3',
'7b8b062c86b8e62d907ccbd467bb7ac6',
'bae77557d2f7a7852b634dc5d5a93435',
'78862ad65295f145e7520291f1183604',
'016e75bb460270519a0ee9dda57b2c90',
],
},
......@@ -1078,6 +1078,17 @@ export const viewstate: any = {
refviews: [
],
},
{
viewtag: '7b8b062c86b8e62d907ccbd467bb7ac6',
viewmodule: 'Sales',
viewname: 'QuoteByParentKey',
viewaction: '',
viewdatachange: false,
refviews: [
'bf670ca93d5a63c4feba5a3cc3de7a9c',
'9a8f1a5129b4191c2dfb20b23aeb4c7a',
],
},
{
viewtag: '7bf35293fd1d9db7816755a74c4d575e',
viewmodule: 'Sales',
......@@ -1504,6 +1515,17 @@ export const viewstate: any = {
'29bfcd628ab25e297248ff0524d12908',
],
},
{
viewtag: 'a949aac338fd2543ae39e258573ab231',
viewmodule: 'Sales',
viewname: 'SalesOrderByParentKey',
viewaction: '',
viewdatachange: false,
refviews: [
'4f45c8798db273fefeef7c02541fab6c',
'e9c822edbc51531e713b561101e783a6',
],
},
{
viewtag: 'a95d7d9111bc13a8b73a11ee1e4ff92a',
viewmodule: 'Base',
......
......@@ -83,6 +83,7 @@ export default class QuoteUIServiceBase extends UIService {
this.allViewMap.set(':',{viewname:'summary',srfappde:'quotes'});
this.allViewMap.set(':',{viewname:'infoabstract',srfappde:'quotes'});
this.allViewMap.set(':',{viewname:'oppquagridview',srfappde:'quotes'});
this.allViewMap.set(':',{viewname:'byparentkey',srfappde:'quotes'});
this.allViewMap.set(':',{viewname:'optionview',srfappde:'quotes'});
this.allViewMap.set('EDITVIEW:',{viewname:'editview',srfappde:'quotes'});
this.allViewMap.set(':',{viewname:'info',srfappde:'quotes'});
......
......@@ -82,6 +82,7 @@ export default class SalesOrderUIServiceBase extends UIService {
this.allViewMap.set('EDITVIEW:',{viewname:'editview',srfappde:'salesorders'});
this.allViewMap.set(':',{viewname:'infoview',srfappde:'salesorders'});
this.allViewMap.set(':',{viewname:'summaryview',srfappde:'salesorders'});
this.allViewMap.set(':',{viewname:'byparentkey',srfappde:'salesorders'});
this.allViewMap.set(':',{viewname:'pickupgridview',srfappde:'salesorders'});
this.allViewMap.set('MDATAVIEW:',{viewname:'gridview',srfappde:'salesorders'});
this.allViewMap.set(':',{viewname:'info_soview',srfappde:'salesorders'});
......
<div class='tabviewpanel' v-if='isActivied'>
<quote-opp-qua-grid-view
<quote-by-parent-key
class='viewcontainer2'
:viewdata="viewdata"
:viewparam="viewparam"
......
<div class='tabviewpanel' v-if='isActivied'>
<sales-order-grid-view
<sales-order-by-parent-key
class='viewcontainer2'
:viewdata="viewdata"
:viewparam="viewparam"
......
......@@ -19,6 +19,7 @@ import com.alibaba.fastjson.JSONObject;
public interface QuoteMapper extends BaseMapper<Quote>{
Page<Quote> searchByParentKey(IPage page, @Param("srf") QuoteSearchContext context, @Param("ew") Wrapper<Quote> wrapper) ;
Page<Quote> searchDefault(IPage page, @Param("srf") QuoteSearchContext context, @Param("ew") Wrapper<Quote> wrapper) ;
@Override
Quote selectById(Serializable id);
......
......@@ -19,6 +19,7 @@ import com.alibaba.fastjson.JSONObject;
public interface SalesOrderMapper extends BaseMapper<SalesOrder>{
Page<SalesOrder> searchByParentKey(IPage page, @Param("srf") SalesOrderSearchContext context, @Param("ew") Wrapper<SalesOrder> wrapper) ;
Page<SalesOrder> searchDefault(IPage page, @Param("srf") SalesOrderSearchContext context, @Param("ew") Wrapper<SalesOrder> wrapper) ;
@Override
SalesOrder selectById(Serializable id);
......
......@@ -40,6 +40,7 @@ public interface IQuoteService extends IService<Quote>{
boolean save(Quote et) ;
void saveBatch(List<Quote> list) ;
Quote win(Quote et) ;
Page<Quote> searchByParentKey(QuoteSearchContext context) ;
Page<Quote> searchDefault(QuoteSearchContext context) ;
List<Quote> selectByCampaignid(String campaignid) ;
void removeByCampaignid(String campaignid) ;
......
......@@ -39,6 +39,7 @@ public interface ISalesOrderService extends IService<SalesOrder>{
SalesOrder genInvoice(SalesOrder et) ;
boolean save(SalesOrder et) ;
void saveBatch(List<SalesOrder> list) ;
Page<SalesOrder> searchByParentKey(SalesOrderSearchContext context) ;
Page<SalesOrder> searchDefault(SalesOrderSearchContext context) ;
List<SalesOrder> selectByCampaignid(String campaignid) ;
void removeByCampaignid(String campaignid) ;
......
......@@ -251,6 +251,15 @@ public class QuoteServiceImpl extends ServiceImpl<QuoteMapper, Quote> implements
}
/**
* 查询集合 ByParentKey
*/
@Override
public Page<Quote> searchByParentKey(QuoteSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<Quote> pages=baseMapper.searchByParentKey(context.getPages(),context,context.getSelectCond());
return new PageImpl<Quote>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
* 查询集合 DEFAULT
*/
......
......@@ -257,6 +257,15 @@ public class SalesOrderServiceImpl extends ServiceImpl<SalesOrderMapper, SalesOr
}
/**
* 查询集合 ByParentKey
*/
@Override
public Page<SalesOrder> searchByParentKey(SalesOrderSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<SalesOrder> pages=baseMapper.searchByParentKey(context.getPages(),context,context.getSelectCond());
return new PageImpl<SalesOrder>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
* 查询集合 DEFAULT
*/
......
......@@ -4,7 +4,7 @@
<!--输出实体[ACCOUNT]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-account-508-1">
<changeSet author="a_LAB01_e85d8801c" id="tab-account-510-1">
<createTable tableName="ACCOUNT">
<column name="ADDRESS1_PRIMARYCONTACTNAME" remarks="" type="VARCHAR(100)">
</column>
......@@ -8488,7 +8488,7 @@
<!--输出实体[QUOTE]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-quote-62-96">
<changeSet author="a_LAB01_e85d8801c" id="tab-quote-69-96">
<createTable tableName="QUOTE">
<column name="BILLTO_COUNTRY" remarks="" type="VARCHAR(80)">
</column>
......@@ -9335,7 +9335,7 @@
<!--输出实体[SALESORDER]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-salesorder-72-107">
<changeSet author="a_LAB01_e85d8801c" id="tab-salesorder-78-107">
<createTable tableName="SALESORDER">
<column name="ENTITYIMAGE" remarks="" type="VARCHAR(100)">
</column>
......@@ -10978,31 +10978,31 @@
</changeSet>
<!--输出实体[ACCOUNT]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-account-508-132">
<changeSet author="a_LAB01_e85d8801c" id="fk-account-510-132">
<addForeignKeyConstraint baseColumnNames="PARENTACCOUNTID" baseTableName="ACCOUNT" constraintName="DER1N_ACCOUNT__ACCOUNT__PARENT" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ACCOUNTID" referencedTableName="ACCOUNT" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-account-508-133">
<changeSet author="a_LAB01_e85d8801c" id="fk-account-510-133">
<addForeignKeyConstraint baseColumnNames="PRIMARYCONTACTID" baseTableName="ACCOUNT" constraintName="DER1N_ACCOUNT__CONTACT__PRIMAR" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="CONTACTID" referencedTableName="CONTACT" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-account-508-134">
<changeSet author="a_LAB01_e85d8801c" id="fk-account-510-134">
<addForeignKeyConstraint baseColumnNames="PREFERREDEQUIPMENTID" baseTableName="ACCOUNT" constraintName="DER1N_ACCOUNT__EQUIPMENT__PREF" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EQUIPMENTID" referencedTableName="EQUIPMENT" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-account-508-135">
<changeSet author="a_LAB01_e85d8801c" id="fk-account-510-135">
<addForeignKeyConstraint baseColumnNames="ORIGINATINGLEADID" baseTableName="ACCOUNT" constraintName="DER1N_ACCOUNT__LEAD__ORIGINATI" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="LEADID" referencedTableName="LEAD" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-account-508-136">
<changeSet author="a_LAB01_e85d8801c" id="fk-account-510-136">
<addForeignKeyConstraint baseColumnNames="DEFAULTPRICELEVELID" baseTableName="ACCOUNT" constraintName="DER1N_ACCOUNT__PRICELEVEL__DEF" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="PRICELEVELID" referencedTableName="PRICELEVEL" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-account-508-137">
<changeSet author="a_LAB01_e85d8801c" id="fk-account-510-137">
<addForeignKeyConstraint baseColumnNames="PREFERREDSERVICEID" baseTableName="ACCOUNT" constraintName="DER1N_ACCOUNT__SERVICE__PREFER" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SERVICEID" referencedTableName="SERVICE" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-account-508-138">
<changeSet author="a_LAB01_e85d8801c" id="fk-account-510-138">
<addForeignKeyConstraint baseColumnNames="SLAID" baseTableName="ACCOUNT" constraintName="DER1N_ACCOUNT__SLA__SLAID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SLAID" referencedTableName="SLA" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-account-508-139">
<changeSet author="a_LAB01_e85d8801c" id="fk-account-510-139">
<addForeignKeyConstraint baseColumnNames="TERRITORYID" baseTableName="ACCOUNT" constraintName="DER1N_ACCOUNT__TERRITORY__TERR" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TERRITORYID" referencedTableName="TERRITORY" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-account-508-140">
<changeSet author="a_LAB01_e85d8801c" id="fk-account-510-140">
<addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="ACCOUNT" constraintName="DER1N_ACCOUNT__TRANSACTIONCURR" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/>
</changeSet>
<!--输出实体[ACTIVITYMIMEATTACHMENT]外键关系 -->
......@@ -11688,19 +11688,19 @@
<addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="QUEUEITEM" constraintName="DER1N_QUEUEITEM__TRANSACTIONCU" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/>
</changeSet>
<!--输出实体[QUOTE]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-quote-62-365">
<changeSet author="a_LAB01_e85d8801c" id="fk-quote-69-365">
<addForeignKeyConstraint baseColumnNames="CAMPAIGNID" baseTableName="QUOTE" constraintName="DER1N_QUOTE__CAMPAIGN__CAMPAIG" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="CAMPAIGNID" referencedTableName="CAMPAIGN" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-quote-62-366">
<changeSet author="a_LAB01_e85d8801c" id="fk-quote-69-366">
<addForeignKeyConstraint baseColumnNames="OPPORTUNITYID" baseTableName="QUOTE" constraintName="DER1N_QUOTE__OPPORTUNITY__OPPO" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="OPPORTUNITYID" referencedTableName="OPPORTUNITY" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-quote-62-367">
<changeSet author="a_LAB01_e85d8801c" id="fk-quote-69-367">
<addForeignKeyConstraint baseColumnNames="PRICELEVELID" baseTableName="QUOTE" constraintName="DER1N_QUOTE__PRICELEVEL__PRICE" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="PRICELEVELID" referencedTableName="PRICELEVEL" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-quote-62-368">
<changeSet author="a_LAB01_e85d8801c" id="fk-quote-69-368">
<addForeignKeyConstraint baseColumnNames="SLAID" baseTableName="QUOTE" constraintName="DER1N_QUOTE__SLA__SLAID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SLAID" referencedTableName="SLA" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-quote-62-369">
<changeSet author="a_LAB01_e85d8801c" id="fk-quote-69-369">
<addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="QUOTE" constraintName="DER1N_QUOTE__TRANSACTIONCURREN" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/>
</changeSet>
<!--输出实体[QUOTECLOSE]外键关系 -->
......@@ -11774,22 +11774,22 @@
<addForeignKeyConstraint baseColumnNames="SALESLITERATUREID" baseTableName="SALESLITERATUREITEM" constraintName="DER1N_SALESLITERATUREITEM__SAL" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SALESLITERATUREID" referencedTableName="SALESLITERATURE" validate="true"/>
</changeSet>
<!--输出实体[SALESORDER]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-salesorder-72-390">
<changeSet author="a_LAB01_e85d8801c" id="fk-salesorder-78-390">
<addForeignKeyConstraint baseColumnNames="CAMPAIGNID" baseTableName="SALESORDER" constraintName="DER1N_SALESORDER__CAMPAIGN__CA" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="CAMPAIGNID" referencedTableName="CAMPAIGN" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-salesorder-72-391">
<changeSet author="a_LAB01_e85d8801c" id="fk-salesorder-78-391">
<addForeignKeyConstraint baseColumnNames="OPPORTUNITYID" baseTableName="SALESORDER" constraintName="DER1N_SALESORDER__OPPORTUNITY_" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="OPPORTUNITYID" referencedTableName="OPPORTUNITY" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-salesorder-72-392">
<changeSet author="a_LAB01_e85d8801c" id="fk-salesorder-78-392">
<addForeignKeyConstraint baseColumnNames="PRICELEVELID" baseTableName="SALESORDER" constraintName="DER1N_SALESORDER__PRICELEVEL__" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="PRICELEVELID" referencedTableName="PRICELEVEL" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-salesorder-72-393">
<changeSet author="a_LAB01_e85d8801c" id="fk-salesorder-78-393">
<addForeignKeyConstraint baseColumnNames="QUOTEID" baseTableName="SALESORDER" constraintName="DER1N_SALESORDER__QUOTE__QUOTE" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="QUOTEID" referencedTableName="QUOTE" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-salesorder-72-394">
<changeSet author="a_LAB01_e85d8801c" id="fk-salesorder-78-394">
<addForeignKeyConstraint baseColumnNames="SLAID" baseTableName="SALESORDER" constraintName="DER1N_SALESORDER__SLA__SLAID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SLAID" referencedTableName="SLA" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-salesorder-72-395">
<changeSet author="a_LAB01_e85d8801c" id="fk-salesorder-78-395">
<addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="SALESORDER" constraintName="DER1N_SALESORDER__TRANSACTIONC" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/>
</changeSet>
<!--输出实体[SALESORDERDETAIL]外键关系 -->
......
......@@ -100,6 +100,15 @@
where transactioncurrencyid=#{transactioncurrencyid}
</select>
<!--数据集合[ByParentKey]-->
<select id="searchByParentKey" parameterType="cn.ibizlab.businesscentral.core.sales.filter.QuoteSearchContext" resultMap="QuoteResultMap">
select t1.* from (
<include refid="ByParentKey" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.businesscentral.core.sales.filter.QuoteSearchContext" resultMap="QuoteResultMap">
select t1.* from (
......@@ -109,6 +118,12 @@
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据查询[ByParentKey]-->
<sql id="ByParentKey" databaseId="mysql">
<![CDATA[ SELECT t1.`ACCOUNTIDYOMINAME`, t1.`BILLTO_ADDRESSID`, t1.`BILLTO_CITY`, t1.`BILLTO_COMPOSITE`, t1.`BILLTO_CONTACTNAME`, t1.`BILLTO_COUNTRY`, t1.`BILLTO_FAX`, t1.`BILLTO_LINE1`, t1.`BILLTO_LINE2`, t1.`BILLTO_LINE3`, t1.`BILLTO_NAME`, t1.`BILLTO_POSTALCODE`, t1.`BILLTO_STATEORPROVINCE`, t1.`BILLTO_TELEPHONE`, t1.`CAMPAIGNID`, t1.`CAMPAIGNNAME`, t1.`CLOSEDON`, t1.`CONTACTIDYOMINAME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`CUSTOMERID`, t1.`CUSTOMERIDTYPE`, t1.`CUSTOMERIDYOMINAME`, t1.`DESCRIPTION`, t1.`DISCOUNTAMOUNT`, t1.`DISCOUNTAMOUNT_BASE`, t1.`DISCOUNTPERCENTAGE`, t1.`EFFECTIVEFROM`, t1.`EFFECTIVETO`, t1.`EMAILADDRESS`, t1.`EXCHANGERATE`, t1.`EXPIRESON`, t1.`FREIGHTAMOUNT`, t1.`FREIGHTAMOUNT_BASE`, t1.`FREIGHTTERMSCODE`, t1.`IMPORTSEQUENCENUMBER`, t1.`LASTONHOLDTIME`, t1.`ONHOLDTIME`, t1.`OPPORTUNITYID`, t1.`OPPORTUNITYNAME`, t1.`OVERRIDDENCREATEDON`, t1.`OWNERID`, t1.`OWNERIDTYPE`, t1.`OWNERIDYOMINAME`, t1.`PAYMENTTERMSCODE`, t1.`PRICELEVELID`, t1.`PRICELEVELNAME`, t1.`PRICINGERRORCODE`, t1.`PROCESSID`, t1.`QUOTEID`, t1.`QUOTENAME`, t1.`QUOTENUMBER`, t1.`REQUESTDELIVERYBY`, t1.`REVISIONNUMBER`, t1.`SHIPPINGMETHODCODE`, t1.`SHIPTO_ADDRESSID`, t1.`SHIPTO_CITY`, t1.`SHIPTO_COMPOSITE`, t1.`SHIPTO_CONTACTNAME`, t1.`SHIPTO_COUNTRY`, t1.`SHIPTO_FAX`, t1.`SHIPTO_FREIGHTTERMSCODE`, t1.`SHIPTO_LINE1`, t1.`SHIPTO_LINE2`, t1.`SHIPTO_LINE3`, t1.`SHIPTO_NAME`, t1.`SHIPTO_POSTALCODE`, t1.`SHIPTO_STATEORPROVINCE`, t1.`SHIPTO_TELEPHONE`, t1.`SLAID`, t1.`SLANAME`, t1.`STAGEID`, t1.`STATECODE`, t1.`STATUSCODE`, t1.`TIMEZONERULEVERSIONNUMBER`, t1.`TOTALAMOUNT`, t1.`TOTALAMOUNTLESSFREIGHT`, t1.`TOTALAMOUNTLESSFREIGHT_BASE`, t1.`TOTALAMOUNT_BASE`, t1.`TOTALDISCOUNTAMOUNT`, t1.`TOTALDISCOUNTAMOUNT_BASE`, t1.`TOTALLINEITEMAMOUNT`, t1.`TOTALLINEITEMAMOUNT_BASE`, t1.`TOTALLINEITEMDISCOUNTAMOUNT`, t1.`TOTALTAX`, t1.`TOTALTAX_BASE`, t1.`TRANSACTIONCURRENCYID`, t1.`TRANSACTIONCURRENCYNAME`, t1.`TRAVERSEDPATH`, t1.`UNIQUEDSCID`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`UTCCONVERSIONTIMEZONECODE`, t1.`VERSIONNUMBER`, t1.`WILLCALL` FROM `QUOTE` t1
WHERE ( t1.`CUSTOMERID` = #{srf.datacontext.srfparentkey} )
]]>
</sql>
<!--数据查询[Default]-->
<sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`ACCOUNTIDYOMINAME`, t1.`BILLTO_ADDRESSID`, t1.`BILLTO_CITY`, t1.`BILLTO_COMPOSITE`, t1.`BILLTO_CONTACTNAME`, t1.`BILLTO_COUNTRY`, t1.`BILLTO_FAX`, t1.`BILLTO_LINE1`, t1.`BILLTO_LINE2`, t1.`BILLTO_LINE3`, t1.`BILLTO_NAME`, t1.`BILLTO_POSTALCODE`, t1.`BILLTO_STATEORPROVINCE`, t1.`BILLTO_TELEPHONE`, t1.`CAMPAIGNID`, t1.`CAMPAIGNNAME`, t1.`CLOSEDON`, t1.`CONTACTIDYOMINAME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`CUSTOMERID`, t1.`CUSTOMERIDTYPE`, t1.`CUSTOMERIDYOMINAME`, t1.`DESCRIPTION`, t1.`DISCOUNTAMOUNT`, t1.`DISCOUNTAMOUNT_BASE`, t1.`DISCOUNTPERCENTAGE`, t1.`EFFECTIVEFROM`, t1.`EFFECTIVETO`, t1.`EMAILADDRESS`, t1.`EXCHANGERATE`, t1.`EXPIRESON`, t1.`FREIGHTAMOUNT`, t1.`FREIGHTAMOUNT_BASE`, t1.`FREIGHTTERMSCODE`, t1.`IMPORTSEQUENCENUMBER`, t1.`LASTONHOLDTIME`, t1.`ONHOLDTIME`, t1.`OPPORTUNITYID`, t1.`OPPORTUNITYNAME`, t1.`OVERRIDDENCREATEDON`, t1.`OWNERID`, t1.`OWNERIDTYPE`, t1.`OWNERIDYOMINAME`, t1.`PAYMENTTERMSCODE`, t1.`PRICELEVELID`, t1.`PRICELEVELNAME`, t1.`PRICINGERRORCODE`, t1.`PROCESSID`, t1.`QUOTEID`, t1.`QUOTENAME`, t1.`QUOTENUMBER`, t1.`REQUESTDELIVERYBY`, t1.`REVISIONNUMBER`, t1.`SHIPPINGMETHODCODE`, t1.`SHIPTO_ADDRESSID`, t1.`SHIPTO_CITY`, t1.`SHIPTO_COMPOSITE`, t1.`SHIPTO_CONTACTNAME`, t1.`SHIPTO_COUNTRY`, t1.`SHIPTO_FAX`, t1.`SHIPTO_FREIGHTTERMSCODE`, t1.`SHIPTO_LINE1`, t1.`SHIPTO_LINE2`, t1.`SHIPTO_LINE3`, t1.`SHIPTO_NAME`, t1.`SHIPTO_POSTALCODE`, t1.`SHIPTO_STATEORPROVINCE`, t1.`SHIPTO_TELEPHONE`, t1.`SLAID`, t1.`SLANAME`, t1.`STAGEID`, t1.`STATECODE`, t1.`STATUSCODE`, t1.`TIMEZONERULEVERSIONNUMBER`, t1.`TOTALAMOUNT`, t1.`TOTALAMOUNTLESSFREIGHT`, t1.`TOTALAMOUNTLESSFREIGHT_BASE`, t1.`TOTALAMOUNT_BASE`, t1.`TOTALDISCOUNTAMOUNT`, t1.`TOTALDISCOUNTAMOUNT_BASE`, t1.`TOTALLINEITEMAMOUNT`, t1.`TOTALLINEITEMAMOUNT_BASE`, t1.`TOTALLINEITEMDISCOUNTAMOUNT`, t1.`TOTALTAX`, t1.`TOTALTAX_BASE`, t1.`TRANSACTIONCURRENCYID`, t1.`TRANSACTIONCURRENCYNAME`, t1.`TRAVERSEDPATH`, t1.`UNIQUEDSCID`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`UTCCONVERSIONTIMEZONECODE`, t1.`VERSIONNUMBER`, t1.`WILLCALL` FROM `QUOTE` t1
......
......@@ -112,6 +112,15 @@
where transactioncurrencyid=#{transactioncurrencyid}
</select>
<!--数据集合[ByParentKey]-->
<select id="searchByParentKey" parameterType="cn.ibizlab.businesscentral.core.sales.filter.SalesOrderSearchContext" resultMap="SalesOrderResultMap">
select t1.* from (
<include refid="ByParentKey" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.businesscentral.core.sales.filter.SalesOrderSearchContext" resultMap="SalesOrderResultMap">
select t1.* from (
......@@ -121,6 +130,12 @@
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据查询[ByParentKey]-->
<sql id="ByParentKey" databaseId="mysql">
<![CDATA[ SELECT t1.`ACCOUNTIDYOMINAME`, t1.`BILLTO_ADDRESSID`, t1.`BILLTO_CITY`, t1.`BILLTO_COMPOSITE`, t1.`BILLTO_CONTACTNAME`, t1.`BILLTO_COUNTRY`, t1.`BILLTO_FAX`, t1.`BILLTO_LINE1`, t1.`BILLTO_LINE2`, t1.`BILLTO_LINE3`, t1.`BILLTO_NAME`, t1.`BILLTO_POSTALCODE`, t1.`BILLTO_STATEORPROVINCE`, t1.`BILLTO_TELEPHONE`, t1.`CAMPAIGNID`, t1.`CAMPAIGNNAME`, t1.`CONTACTIDYOMINAME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`CUSTOMERID`, t1.`CUSTOMERIDTYPE`, t1.`CUSTOMERIDYOMINAME`, t1.`DATEFULFILLED`, t1.`DESCRIPTION`, t1.`DISCOUNTAMOUNT`, t1.`DISCOUNTAMOUNT_BASE`, t1.`DISCOUNTPERCENTAGE`, t1.`EMAILADDRESS`, t1.`ENTITYIMAGE`, t1.`ENTITYIMAGEID`, t1.`ENTITYIMAGE_TIMESTAMP`, t1.`ENTITYIMAGE_URL`, t1.`EXCHANGERATE`, t1.`FREIGHTAMOUNT`, t1.`FREIGHTAMOUNT_BASE`, t1.`FREIGHTTERMSCODE`, t1.`IMPORTSEQUENCENUMBER`, t1.`LASTBACKOFFICESUBMIT`, t1.`LASTONHOLDTIME`, t1.`ONHOLDTIME`, t1.`OPPORTUNITYID`, t1.`OPPORTUNITYNAME`, t1.`ORDERNUMBER`, t1.`OVERRIDDENCREATEDON`, t1.`OWNERID`, t1.`OWNERIDTYPE`, t1.`OWNERIDYOMINAME`, t1.`PAYMENTTERMSCODE`, t1.`PRICELEVELID`, t1.`PRICELEVELNAME`, t1.`PRICELOCKED`, t1.`PRICINGERRORCODE`, t1.`PRIORITYCODE`, t1.`PROCESSID`, t1.`QUOTEID`, t1.`QUOTENAME`, t1.`REQUESTDELIVERYBY`, t1.`SALESORDERID`, t1.`SALESORDERNAME`, t1.`SHIPPINGMETHODCODE`, t1.`SHIPTO_ADDRESSID`, t1.`SHIPTO_CITY`, t1.`SHIPTO_COMPOSITE`, t1.`SHIPTO_CONTACTNAME`, t1.`SHIPTO_COUNTRY`, t1.`SHIPTO_FAX`, t1.`SHIPTO_FREIGHTTERMSCODE`, t1.`SHIPTO_LINE1`, t1.`SHIPTO_LINE2`, t1.`SHIPTO_LINE3`, t1.`SHIPTO_NAME`, t1.`SHIPTO_POSTALCODE`, t1.`SHIPTO_STATEORPROVINCE`, t1.`SHIPTO_TELEPHONE`, t1.`SLAID`, t1.`SLANAME`, t1.`STAGEID`, t1.`STATECODE`, t1.`STATUSCODE`, t1.`SUBMITDATE`, t1.`SUBMITSTATUS`, t1.`SUBMITSTATUSDESCRIPTION`, t1.`TIMEZONERULEVERSIONNUMBER`, t1.`TOTALAMOUNT`, t1.`TOTALAMOUNTLESSFREIGHT`, t1.`TOTALAMOUNTLESSFREIGHT_BASE`, t1.`TOTALAMOUNT_BASE`, t1.`TOTALDISCOUNTAMOUNT`, t1.`TOTALDISCOUNTAMOUNT_BASE`, t1.`TOTALLINEITEMAMOUNT`, t1.`TOTALLINEITEMAMOUNT_BASE`, t1.`TOTALLINEITEMDISCOUNTAMOUNT`, t1.`TOTALTAX`, t1.`TOTALTAX_BASE`, t1.`TRANSACTIONCURRENCYID`, t1.`TRANSACTIONCURRENCYNAME`, t1.`TRAVERSEDPATH`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`UTCCONVERSIONTIMEZONECODE`, t1.`VERSIONNUMBER`, t1.`WILLCALL` FROM `SALESORDER` t1
WHERE ( t1.`CUSTOMERID` = #{srf.datacontext.srfparentkey} )
]]>
</sql>
<!--数据查询[Default]-->
<sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`ACCOUNTIDYOMINAME`, t1.`BILLTO_ADDRESSID`, t1.`BILLTO_CITY`, t1.`BILLTO_COMPOSITE`, t1.`BILLTO_CONTACTNAME`, t1.`BILLTO_COUNTRY`, t1.`BILLTO_FAX`, t1.`BILLTO_LINE1`, t1.`BILLTO_LINE2`, t1.`BILLTO_LINE3`, t1.`BILLTO_NAME`, t1.`BILLTO_POSTALCODE`, t1.`BILLTO_STATEORPROVINCE`, t1.`BILLTO_TELEPHONE`, t1.`CAMPAIGNID`, t1.`CAMPAIGNNAME`, t1.`CONTACTIDYOMINAME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`CUSTOMERID`, t1.`CUSTOMERIDTYPE`, t1.`CUSTOMERIDYOMINAME`, t1.`DATEFULFILLED`, t1.`DESCRIPTION`, t1.`DISCOUNTAMOUNT`, t1.`DISCOUNTAMOUNT_BASE`, t1.`DISCOUNTPERCENTAGE`, t1.`EMAILADDRESS`, t1.`ENTITYIMAGE`, t1.`ENTITYIMAGEID`, t1.`ENTITYIMAGE_TIMESTAMP`, t1.`ENTITYIMAGE_URL`, t1.`EXCHANGERATE`, t1.`FREIGHTAMOUNT`, t1.`FREIGHTAMOUNT_BASE`, t1.`FREIGHTTERMSCODE`, t1.`IMPORTSEQUENCENUMBER`, t1.`LASTBACKOFFICESUBMIT`, t1.`LASTONHOLDTIME`, t1.`ONHOLDTIME`, t1.`OPPORTUNITYID`, t1.`OPPORTUNITYNAME`, t1.`ORDERNUMBER`, t1.`OVERRIDDENCREATEDON`, t1.`OWNERID`, t1.`OWNERIDTYPE`, t1.`OWNERIDYOMINAME`, t1.`PAYMENTTERMSCODE`, t1.`PRICELEVELID`, t1.`PRICELEVELNAME`, t1.`PRICELOCKED`, t1.`PRICINGERRORCODE`, t1.`PRIORITYCODE`, t1.`PROCESSID`, t1.`QUOTEID`, t1.`QUOTENAME`, t1.`REQUESTDELIVERYBY`, t1.`SALESORDERID`, t1.`SALESORDERNAME`, t1.`SHIPPINGMETHODCODE`, t1.`SHIPTO_ADDRESSID`, t1.`SHIPTO_CITY`, t1.`SHIPTO_COMPOSITE`, t1.`SHIPTO_CONTACTNAME`, t1.`SHIPTO_COUNTRY`, t1.`SHIPTO_FAX`, t1.`SHIPTO_FREIGHTTERMSCODE`, t1.`SHIPTO_LINE1`, t1.`SHIPTO_LINE2`, t1.`SHIPTO_LINE3`, t1.`SHIPTO_NAME`, t1.`SHIPTO_POSTALCODE`, t1.`SHIPTO_STATEORPROVINCE`, t1.`SHIPTO_TELEPHONE`, t1.`SLAID`, t1.`SLANAME`, t1.`STAGEID`, t1.`STATECODE`, t1.`STATUSCODE`, t1.`SUBMITDATE`, t1.`SUBMITSTATUS`, t1.`SUBMITSTATUSDESCRIPTION`, t1.`TIMEZONERULEVERSIONNUMBER`, t1.`TOTALAMOUNT`, t1.`TOTALAMOUNTLESSFREIGHT`, t1.`TOTALAMOUNTLESSFREIGHT_BASE`, t1.`TOTALAMOUNT_BASE`, t1.`TOTALDISCOUNTAMOUNT`, t1.`TOTALDISCOUNTAMOUNT_BASE`, t1.`TOTALLINEITEMAMOUNT`, t1.`TOTALLINEITEMAMOUNT_BASE`, t1.`TOTALLINEITEMDISCOUNTAMOUNT`, t1.`TOTALTAX`, t1.`TOTALTAX_BASE`, t1.`TRANSACTIONCURRENCYID`, t1.`TRANSACTIONCURRENCYNAME`, t1.`TRAVERSEDPATH`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`UTCCONVERSIONTIMEZONECODE`, t1.`VERSIONNUMBER`, t1.`WILLCALL` FROM `SALESORDER` t1
......
......@@ -295,7 +295,7 @@
"dename":"Quote",
"delogicname":"报价单",
"sysmoudle":{"id":"SALES","name":"Sales"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"dedataset":[{"id":"ByParentKey" , "name":"ByParentKey"},{"id":"Default" , "name":"DEFAULT"}],
"deaction":[{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"Active" , "name":"激活报价单" , "type":"USERCUSTOM" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Close" , "name":"结束报价单" , "type":"USERCUSTOM" },{"id":"GenSalesOrder" , "name":"创建订单" , "type":"USERCUSTOM" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" },{"id":"Win" , "name":"赢单" , "type":"USERCUSTOM" }],
"datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}]
}
......@@ -383,7 +383,7 @@
"dename":"SalesOrder",
"delogicname":"订单",
"sysmoudle":{"id":"SALES","name":"Sales"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"dedataset":[{"id":"ByParentKey" , "name":"ByParentKey"},{"id":"Default" , "name":"DEFAULT"}],
"deaction":[{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"Cancel" , "name":"取消订单" , "type":"USERCUSTOM" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Finish" , "name":"完成订单" , "type":"USERCUSTOM" },{"id":"GenInvoice" , "name":"创建发票" , "type":"USERCUSTOM" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" }],
"datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}]
}
......
......@@ -187,6 +187,27 @@ public class QuoteResource {
return ResponseEntity.status(HttpStatus.OK).body(quotedto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Quote-searchByParentKey-all') and hasPermission(#context,'iBizBusinessCentral-Quote-Get')")
@ApiOperation(value = "获取ByParentKey", tags = {"报价单" } ,notes = "获取ByParentKey")
@RequestMapping(method= RequestMethod.GET , value="/quotes/fetchbyparentkey")
public ResponseEntity<List<QuoteDTO>> fetchByParentKey(QuoteSearchContext context) {
Page<Quote> domains = quoteService.searchByParentKey(context) ;
List<QuoteDTO> list = quoteMapping.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-Quote-searchByParentKey-all') and hasPermission(#context,'iBizBusinessCentral-Quote-Get')")
@ApiOperation(value = "查询ByParentKey", tags = {"报价单" } ,notes = "查询ByParentKey")
@RequestMapping(method= RequestMethod.POST , value="/quotes/searchbyparentkey")
public ResponseEntity<Page<QuoteDTO>> searchByParentKey(@RequestBody QuoteSearchContext context) {
Page<Quote> domains = quoteService.searchByParentKey(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(quoteMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Quote-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Quote-Get')")
@ApiOperation(value = "获取DEFAULT", tags = {"报价单" } ,notes = "获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/quotes/fetchdefault")
......@@ -366,6 +387,29 @@ public class QuoteResource {
return ResponseEntity.status(HttpStatus.OK).body(quotedto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Quote-searchByParentKey-all') and hasPermission(#context,'iBizBusinessCentral-Quote-Get')")
@ApiOperation(value = "根据商机获取ByParentKey", tags = {"报价单" } ,notes = "根据商机获取ByParentKey")
@RequestMapping(method= RequestMethod.GET , value="/opportunities/{opportunity_id}/quotes/fetchbyparentkey")
public ResponseEntity<List<QuoteDTO>> fetchQuoteByParentKeyByOpportunity(@PathVariable("opportunity_id") String opportunity_id,QuoteSearchContext context) {
context.setN_opportunityid_eq(opportunity_id);
Page<Quote> domains = quoteService.searchByParentKey(context) ;
List<QuoteDTO> list = quoteMapping.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-Quote-searchByParentKey-all') and hasPermission(#context,'iBizBusinessCentral-Quote-Get')")
@ApiOperation(value = "根据商机查询ByParentKey", tags = {"报价单" } ,notes = "根据商机查询ByParentKey")
@RequestMapping(method= RequestMethod.POST , value="/opportunities/{opportunity_id}/quotes/searchbyparentkey")
public ResponseEntity<Page<QuoteDTO>> searchQuoteByParentKeyByOpportunity(@PathVariable("opportunity_id") String opportunity_id, @RequestBody QuoteSearchContext context) {
context.setN_opportunityid_eq(opportunity_id);
Page<Quote> domains = quoteService.searchByParentKey(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(quoteMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Quote-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Quote-Get')")
@ApiOperation(value = "根据商机获取DEFAULT", tags = {"报价单" } ,notes = "根据商机获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/opportunities/{opportunity_id}/quotes/fetchdefault")
......@@ -547,6 +591,29 @@ public class QuoteResource {
return ResponseEntity.status(HttpStatus.OK).body(quotedto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Quote-searchByParentKey-all') and hasPermission(#context,'iBizBusinessCentral-Quote-Get')")
@ApiOperation(value = "根据客户商机获取ByParentKey", tags = {"报价单" } ,notes = "根据客户商机获取ByParentKey")
@RequestMapping(method= RequestMethod.GET , value="/accounts/{account_id}/opportunities/{opportunity_id}/quotes/fetchbyparentkey")
public ResponseEntity<List<QuoteDTO>> fetchQuoteByParentKeyByAccountOpportunity(@PathVariable("account_id") String account_id, @PathVariable("opportunity_id") String opportunity_id,QuoteSearchContext context) {
context.setN_opportunityid_eq(opportunity_id);
Page<Quote> domains = quoteService.searchByParentKey(context) ;
List<QuoteDTO> list = quoteMapping.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-Quote-searchByParentKey-all') and hasPermission(#context,'iBizBusinessCentral-Quote-Get')")
@ApiOperation(value = "根据客户商机查询ByParentKey", tags = {"报价单" } ,notes = "根据客户商机查询ByParentKey")
@RequestMapping(method= RequestMethod.POST , value="/accounts/{account_id}/opportunities/{opportunity_id}/quotes/searchbyparentkey")
public ResponseEntity<Page<QuoteDTO>> searchQuoteByParentKeyByAccountOpportunity(@PathVariable("account_id") String account_id, @PathVariable("opportunity_id") String opportunity_id, @RequestBody QuoteSearchContext context) {
context.setN_opportunityid_eq(opportunity_id);
Page<Quote> domains = quoteService.searchByParentKey(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(quoteMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Quote-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Quote-Get')")
@ApiOperation(value = "根据客户商机获取DEFAULT", tags = {"报价单" } ,notes = "根据客户商机获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/accounts/{account_id}/opportunities/{opportunity_id}/quotes/fetchdefault")
......@@ -728,6 +795,29 @@ public class QuoteResource {
return ResponseEntity.status(HttpStatus.OK).body(quotedto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Quote-searchByParentKey-all') and hasPermission(#context,'iBizBusinessCentral-Quote-Get')")
@ApiOperation(value = "根据联系人商机获取ByParentKey", tags = {"报价单" } ,notes = "根据联系人商机获取ByParentKey")
@RequestMapping(method= RequestMethod.GET , value="/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/fetchbyparentkey")
public ResponseEntity<List<QuoteDTO>> fetchQuoteByParentKeyByContactOpportunity(@PathVariable("contact_id") String contact_id, @PathVariable("opportunity_id") String opportunity_id,QuoteSearchContext context) {
context.setN_opportunityid_eq(opportunity_id);
Page<Quote> domains = quoteService.searchByParentKey(context) ;
List<QuoteDTO> list = quoteMapping.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-Quote-searchByParentKey-all') and hasPermission(#context,'iBizBusinessCentral-Quote-Get')")
@ApiOperation(value = "根据联系人商机查询ByParentKey", tags = {"报价单" } ,notes = "根据联系人商机查询ByParentKey")
@RequestMapping(method= RequestMethod.POST , value="/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/searchbyparentkey")
public ResponseEntity<Page<QuoteDTO>> searchQuoteByParentKeyByContactOpportunity(@PathVariable("contact_id") String contact_id, @PathVariable("opportunity_id") String opportunity_id, @RequestBody QuoteSearchContext context) {
context.setN_opportunityid_eq(opportunity_id);
Page<Quote> domains = quoteService.searchByParentKey(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(quoteMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Quote-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Quote-Get')")
@ApiOperation(value = "根据联系人商机获取DEFAULT", tags = {"报价单" } ,notes = "根据联系人商机获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/fetchdefault")
......@@ -909,6 +999,29 @@ public class QuoteResource {
return ResponseEntity.status(HttpStatus.OK).body(quotedto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Quote-searchByParentKey-all') and hasPermission(#context,'iBizBusinessCentral-Quote-Get')")
@ApiOperation(value = "根据客户联系人商机获取ByParentKey", tags = {"报价单" } ,notes = "根据客户联系人商机获取ByParentKey")
@RequestMapping(method= RequestMethod.GET , value="/accounts/{account_id}/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/fetchbyparentkey")
public ResponseEntity<List<QuoteDTO>> fetchQuoteByParentKeyByAccountContactOpportunity(@PathVariable("account_id") String account_id, @PathVariable("contact_id") String contact_id, @PathVariable("opportunity_id") String opportunity_id,QuoteSearchContext context) {
context.setN_opportunityid_eq(opportunity_id);
Page<Quote> domains = quoteService.searchByParentKey(context) ;
List<QuoteDTO> list = quoteMapping.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-Quote-searchByParentKey-all') and hasPermission(#context,'iBizBusinessCentral-Quote-Get')")
@ApiOperation(value = "根据客户联系人商机查询ByParentKey", tags = {"报价单" } ,notes = "根据客户联系人商机查询ByParentKey")
@RequestMapping(method= RequestMethod.POST , value="/accounts/{account_id}/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/searchbyparentkey")
public ResponseEntity<Page<QuoteDTO>> searchQuoteByParentKeyByAccountContactOpportunity(@PathVariable("account_id") String account_id, @PathVariable("contact_id") String contact_id, @PathVariable("opportunity_id") String opportunity_id, @RequestBody QuoteSearchContext context) {
context.setN_opportunityid_eq(opportunity_id);
Page<Quote> domains = quoteService.searchByParentKey(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(quoteMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Quote-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Quote-Get')")
@ApiOperation(value = "根据客户联系人商机获取DEFAULT", tags = {"报价单" } ,notes = "根据客户联系人商机获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/accounts/{account_id}/contacts/{contact_id}/opportunities/{opportunity_id}/quotes/fetchdefault")
......
......@@ -175,6 +175,27 @@ public class SalesOrderResource {
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-SalesOrder-searchByParentKey-all') and hasPermission(#context,'iBizBusinessCentral-SalesOrder-Get')")
@ApiOperation(value = "获取ByParentKey", tags = {"订单" } ,notes = "获取ByParentKey")
@RequestMapping(method= RequestMethod.GET , value="/salesorders/fetchbyparentkey")
public ResponseEntity<List<SalesOrderDTO>> fetchByParentKey(SalesOrderSearchContext context) {
Page<SalesOrder> domains = salesorderService.searchByParentKey(context) ;
List<SalesOrderDTO> list = salesorderMapping.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-SalesOrder-searchByParentKey-all') and hasPermission(#context,'iBizBusinessCentral-SalesOrder-Get')")
@ApiOperation(value = "查询ByParentKey", tags = {"订单" } ,notes = "查询ByParentKey")
@RequestMapping(method= RequestMethod.POST , value="/salesorders/searchbyparentkey")
public ResponseEntity<Page<SalesOrderDTO>> searchByParentKey(@RequestBody SalesOrderSearchContext context) {
Page<SalesOrder> domains = salesorderService.searchByParentKey(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(salesorderMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-SalesOrder-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-SalesOrder-Get')")
@ApiOperation(value = "获取DEFAULT", tags = {"订单" } ,notes = "获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/salesorders/fetchdefault")
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册