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

xignzi006 发布系统代码

上级 03b3636e
/**
* 价目表项
*
* @export
* @interface ProductPriceLevel
*/
export interface ProductPriceLevel {
/**
* Import Sequence Number
*
* @returns {*}
* @memberof ProductPriceLevel
*/
importsequencenumber?: any;
/**
* 舍入金额
*
* @returns {*}
* @memberof ProductPriceLevel
*/
roundingoptionamount?: any;
/**
* Version Number
*
* @returns {*}
* @memberof ProductPriceLevel
*/
versionnumber?: any;
/**
* 金额 (Base)
*
* @returns {*}
* @memberof ProductPriceLevel
*/
amount_base?: any;
/**
* Process Id
*
* @returns {*}
* @memberof ProductPriceLevel
*/
processid?: any;
/**
* 金额
*
* @returns {*}
* @memberof ProductPriceLevel
*/
amount?: any;
/**
* 建立时间
*
* @returns {*}
* @memberof ProductPriceLevel
*/
createdate?: any;
/**
* 舍入金额 (Base)
*
* @returns {*}
* @memberof ProductPriceLevel
*/
roundingoptionamount_base?: any;
/**
* 更新人
*
* @returns {*}
* @memberof ProductPriceLevel
*/
updateman?: any;
/**
* Record Created On
*
* @returns {*}
* @memberof ProductPriceLevel
*/
overriddencreatedon?: any;
/**
* 汇率
*
* @returns {*}
* @memberof ProductPriceLevel
*/
exchangerate?: any;
/**
* 组织
*
* @returns {*}
* @memberof ProductPriceLevel
*/
organizationid?: any;
/**
* 百分比
*
* @returns {*}
* @memberof ProductPriceLevel
*/
percentage?: any;
/**
* Traversed Path
*
* @returns {*}
* @memberof ProductPriceLevel
*/
traversedpath?: any;
/**
* 产品 ID
*
* @returns {*}
* @memberof ProductPriceLevel
*/
productnumber?: any;
/**
* 定价方式
*
* @returns {*}
* @memberof ProductPriceLevel
*/
pricingmethodcode?: any;
/**
* 舍入选项
*
* @returns {*}
* @memberof ProductPriceLevel
*/
roundingoptioncode?: any;
/**
* Time Zone Rule Version Number
*
* @returns {*}
* @memberof ProductPriceLevel
*/
timezoneruleversionnumber?: any;
/**
* UTC Conversion Time Zone Code
*
* @returns {*}
* @memberof ProductPriceLevel
*/
utcconversiontimezonecode?: any;
/**
* 产品价目表
*
* @returns {*}
* @memberof ProductPriceLevel
*/
productpricelevelid?: any;
/**
* 销售数量控制
*
* @returns {*}
* @memberof ProductPriceLevel
*/
quantitysellingcode?: any;
/**
* 更新时间
*
* @returns {*}
* @memberof ProductPriceLevel
*/
updatedate?: any;
/**
* 舍入原则
*
* @returns {*}
* @memberof ProductPriceLevel
*/
roundingpolicycode?: any;
/**
* 建立人
*
* @returns {*}
* @memberof ProductPriceLevel
*/
createman?: any;
/**
* Stage Id
*
* @returns {*}
* @memberof ProductPriceLevel
*/
stageid?: any;
/**
* 产品
*
* @returns {*}
* @memberof ProductPriceLevel
*/
productid?: any;
/**
* 单位计划 ID
*
* @returns {*}
* @memberof ProductPriceLevel
*/
uomscheduleid?: any;
/**
* 货币
*
* @returns {*}
* @memberof ProductPriceLevel
*/
transactioncurrencyid?: any;
/**
* 计价单位
*
* @returns {*}
* @memberof ProductPriceLevel
*/
uomid?: any;
/**
* 折扣表
*
* @returns {*}
* @memberof ProductPriceLevel
*/
discounttypeid?: any;
/**
* 价目表
*
* @returns {*}
* @memberof ProductPriceLevel
*/
pricelevelid?: any;
}
\ No newline at end of file
......@@ -26,6 +26,7 @@ import campaigncampaign_en_US from '@locale/lanres/entities/campaign-campaign/ca
import salesliterature_en_US from '@locale/lanres/entities/sales-literature/sales-literature_en_US';
import activitypointer_en_US from '@locale/lanres/entities/activity-pointer/activity-pointer_en_US';
import listaccount_en_US from '@locale/lanres/entities/list-account/list-account_en_US';
import productpricelevel_en_US from '@locale/lanres/entities/product-price-level/product-price-level_en_US';
import fax_en_US from '@locale/lanres/entities/fax/fax_en_US';
import quote_en_US from '@locale/lanres/entities/quote/quote_en_US';
import campaignactivity_en_US from '@locale/lanres/entities/campaign-activity/campaign-activity_en_US';
......@@ -174,6 +175,7 @@ export default {
salesliterature: salesliterature_en_US,
activitypointer: activitypointer_en_US,
listaccount: listaccount_en_US,
productpricelevel: productpricelevel_en_US,
fax: fax_en_US,
quote: quote_en_US,
campaignactivity: campaignactivity_en_US,
......
......@@ -26,6 +26,7 @@ import campaigncampaign_zh_CN from '@locale/lanres/entities/campaign-campaign/ca
import salesliterature_zh_CN from '@locale/lanres/entities/sales-literature/sales-literature_zh_CN';
import activitypointer_zh_CN from '@locale/lanres/entities/activity-pointer/activity-pointer_zh_CN';
import listaccount_zh_CN from '@locale/lanres/entities/list-account/list-account_zh_CN';
import productpricelevel_zh_CN from '@locale/lanres/entities/product-price-level/product-price-level_zh_CN';
import fax_zh_CN from '@locale/lanres/entities/fax/fax_zh_CN';
import quote_zh_CN from '@locale/lanres/entities/quote/quote_zh_CN';
import campaignactivity_zh_CN from '@locale/lanres/entities/campaign-activity/campaign-activity_zh_CN';
......@@ -174,6 +175,7 @@ export default {
salesliterature: salesliterature_zh_CN,
activitypointer: activitypointer_zh_CN,
listaccount: listaccount_zh_CN,
productpricelevel: productpricelevel_zh_CN,
fax: fax_zh_CN,
quote: quote_zh_CN,
campaignactivity: campaignactivity_zh_CN,
......
......@@ -679,8 +679,8 @@ export default {
caption: "编辑",
tip: "编辑",
},
tbitem2: {
caption: "-",
seperator4: {
caption: "",
tip: "",
},
deuiaction1: {
......
......@@ -678,8 +678,8 @@ export default {
caption: "编辑",
tip: "编辑",
},
tbitem2: {
caption: "-",
seperator4: {
caption: "",
tip: "",
},
deuiaction1: {
......
......@@ -98,8 +98,8 @@ export default {
caption: "编辑",
tip: "编辑",
},
tbitem2: {
caption: "-",
seperator4: {
caption: "",
tip: "",
},
deuiaction1: {
......
......@@ -97,8 +97,8 @@ export default {
caption: "编辑",
tip: "编辑",
},
tbitem2: {
caption: "-",
seperator4: {
caption: "",
tip: "",
},
deuiaction1: {
......
......@@ -344,8 +344,8 @@ export default {
caption: "编辑",
tip: "编辑",
},
tbitem2: {
caption: "-",
seperator4: {
caption: "",
tip: "",
},
deuiaction1: {
......@@ -374,8 +374,8 @@ export default {
caption: "编辑",
tip: "编辑",
},
tbitem2: {
caption: "-",
seperator4: {
caption: "",
tip: "",
},
deuiaction1: {
......
......@@ -343,8 +343,8 @@ export default {
caption: "编辑",
tip: "编辑",
},
tbitem2: {
caption: "-",
seperator4: {
caption: "",
tip: "",
},
deuiaction1: {
......@@ -373,8 +373,8 @@ export default {
caption: "编辑",
tip: "编辑",
},
tbitem2: {
caption: "-",
seperator4: {
caption: "",
tip: "",
},
deuiaction1: {
......
......@@ -589,8 +589,8 @@ export default {
caption: "编辑",
tip: "编辑",
},
tbitem2: {
caption: "-",
seperator4: {
caption: "",
tip: "",
},
deuiaction1: {
......
......@@ -588,8 +588,8 @@ export default {
caption: "编辑",
tip: "编辑",
},
tbitem2: {
caption: "-",
seperator4: {
caption: "",
tip: "",
},
deuiaction1: {
......
......@@ -410,60 +410,48 @@ export default {
},
},
infotoolbar_toolbar: {
tbitem3: {
caption: "Save",
tip: "Save",
},
tbitem5: {
caption: "Save And Close",
tip: "Save And Close Window",
deuiaction4: {
caption: "编辑",
tip: "编辑",
},
tbitem6: {
caption: "-",
seperator4: {
caption: "",
tip: "",
},
deuiaction1: {
caption: "Remove And Close",
tip: "Remove And Close Window",
},
deuiaction2: {
caption: "刷新",
tip: "刷新",
},
seperator1: {
tbitem17_qualification_sep: {
caption: "",
tip: "",
},
deuiaction4: {
tbitem17_qualification: {
caption: "授予资格",
tip: "授予资格",
},
deuiaction9: {
caption: "取消资格",
tip: "取消资格",
tbitem17_disqualification_sep: {
caption: "",
tip: "",
},
items1: {
tbitem17_disqualification: {
caption: "取消资格",
tip: "取消资格",
},
deuiaction5: {
caption: "丢单",
tip: "丢单",
tbitem2: {
caption: "-",
tip: "",
},
deuiaction6: {
caption: "无法联系",
tip: "无法联系",
deuiaction1: {
caption: "Remove And Close",
tip: "Remove And Close Window",
},
deuiaction7: {
caption: "不再感兴趣",
tip: "不再感兴趣",
seperator2: {
caption: "",
tip: "",
},
deuiaction8: {
caption: "已取消",
tip: "已取消",
deuiaction2: {
caption: "刷新",
tip: "刷新",
},
tbitem13: {
caption: "-",
seperator1: {
caption: "",
tip: "",
},
tbitem12: {
......
......@@ -409,60 +409,48 @@ export default {
},
},
infotoolbar_toolbar: {
tbitem3: {
caption: "保存",
tip: "保存",
},
tbitem5: {
caption: "保存并关闭",
tip: "保存并关闭",
deuiaction4: {
caption: "编辑",
tip: "编辑",
},
tbitem6: {
caption: "-",
seperator4: {
caption: "",
tip: "",
},
deuiaction1: {
caption: "删除并关闭",
tip: "删除并关闭",
},
deuiaction2: {
caption: "刷新",
tip: "刷新",
},
seperator1: {
tbitem17_qualification_sep: {
caption: "",
tip: "",
},
deuiaction4: {
tbitem17_qualification: {
caption: "授予资格",
tip: "授予资格",
},
deuiaction9: {
caption: "取消资格",
tip: "取消资格",
tbitem17_disqualification_sep: {
caption: "",
tip: "",
},
items1: {
tbitem17_disqualification: {
caption: "取消资格",
tip: "取消资格",
},
deuiaction5: {
caption: "丢单",
tip: "丢单",
tbitem2: {
caption: "-",
tip: "",
},
deuiaction6: {
caption: "无法联系",
tip: "无法联系",
deuiaction1: {
caption: "删除并关闭",
tip: "删除并关闭",
},
deuiaction7: {
caption: "不再感兴趣",
tip: "不再感兴趣",
seperator2: {
caption: "",
tip: "",
},
deuiaction8: {
caption: "已取消",
tip: "已取消",
deuiaction2: {
caption: "刷新",
tip: "刷新",
},
tbitem13: {
caption: "-",
seperator1: {
caption: "",
tip: "",
},
tbitem12: {
......
......@@ -95,8 +95,8 @@ export default {
caption: "编辑",
tip: "编辑",
},
tbitem2: {
caption: "-",
seperator4: {
caption: "",
tip: "",
},
deuiaction1: {
......
......@@ -94,8 +94,8 @@ export default {
caption: "编辑",
tip: "编辑",
},
tbitem2: {
caption: "-",
seperator4: {
caption: "",
tip: "",
},
deuiaction1: {
......
......@@ -86,8 +86,8 @@ export default {
caption: "编辑",
tip: "编辑",
},
tbitem2: {
caption: "-",
seperator4: {
caption: "",
tip: "",
},
deuiaction1: {
......
......@@ -85,8 +85,8 @@ export default {
caption: "编辑",
tip: "编辑",
},
tbitem2: {
caption: "-",
seperator4: {
caption: "",
tip: "",
},
deuiaction1: {
......
......@@ -106,8 +106,8 @@ export default {
caption: "编辑",
tip: "编辑",
},
tbitem2: {
caption: "-",
seperator4: {
caption: "",
tip: "",
},
deuiaction1: {
......
......@@ -105,8 +105,8 @@ export default {
caption: "编辑",
tip: "编辑",
},
tbitem2: {
caption: "-",
seperator4: {
caption: "",
tip: "",
},
deuiaction1: {
......
export default {
fields: {
importsequencenumber: "Import Sequence Number",
roundingoptionamount: "舍入金额",
versionnumber: "Version Number",
amount_base: "金额 (Base)",
processid: "Process Id",
amount: "金额",
createdate: "建立时间",
roundingoptionamount_base: "舍入金额 (Base)",
updateman: "更新人",
overriddencreatedon: "Record Created On",
exchangerate: "汇率",
organizationid: "组织",
percentage: "百分比",
traversedpath: "Traversed Path",
productnumber: "产品 ID",
pricingmethodcode: "定价方式",
roundingoptioncode: "舍入选项",
timezoneruleversionnumber: "Time Zone Rule Version Number",
utcconversiontimezonecode: "UTC Conversion Time Zone Code",
productpricelevelid: "产品价目表",
quantitysellingcode: "销售数量控制",
updatedate: "更新时间",
roundingpolicycode: "舍入原则",
createman: "建立人",
stageid: "Stage Id",
productid: "产品",
uomscheduleid: "单位计划 ID",
transactioncurrencyid: "货币",
uomid: "计价单位",
discounttypeid: "折扣表",
pricelevelid: "价目表",
},
};
\ No newline at end of file
export default {
fields: {
importsequencenumber: "Import Sequence Number",
roundingoptionamount: "舍入金额",
versionnumber: "Version Number",
amount_base: "金额 (Base)",
processid: "Process Id",
amount: "金额",
createdate: "建立时间",
roundingoptionamount_base: "舍入金额 (Base)",
updateman: "更新人",
overriddencreatedon: "Record Created On",
exchangerate: "汇率",
organizationid: "组织",
percentage: "百分比",
traversedpath: "Traversed Path",
productnumber: "产品 ID",
pricingmethodcode: "定价方式",
roundingoptioncode: "舍入选项",
timezoneruleversionnumber: "Time Zone Rule Version Number",
utcconversiontimezonecode: "UTC Conversion Time Zone Code",
productpricelevelid: "产品价目表",
quantitysellingcode: "销售数量控制",
updatedate: "更新时间",
roundingpolicycode: "舍入原则",
createman: "建立人",
stageid: "Stage Id",
productid: "产品",
uomscheduleid: "单位计划 ID",
transactioncurrencyid: "货币",
uomid: "计价单位",
discounttypeid: "折扣表",
pricelevelid: "价目表",
},
};
\ No newline at end of file
......@@ -109,12 +109,12 @@ export default {
productnumber: "产品 ID",
validfromdate: "有效期的开始日期",
validtodate: "有效期的结束日期",
description: "说明",
defaultuomschedulename: "计价单位组",
defaultuomname: "默认计价单位",
pricelevelname: "默认价目表",
quantitydecimal: "支持小数",
subjectname: "主题",
description: "说明",
defaultuomid: "默认计价单位",
productid: "产品",
defaultuomscheduleid: "计价单位组",
......
......@@ -108,12 +108,12 @@ export default {
productnumber: "产品 ID",
validfromdate: "有效期的开始日期",
validtodate: "有效期的结束日期",
description: "说明",
defaultuomschedulename: "计价单位组",
defaultuomname: "默认计价单位",
pricelevelname: "默认价目表",
quantitydecimal: "支持小数",
subjectname: "主题",
description: "说明",
defaultuomid: "默认计价单位",
productid: "产品",
defaultuomscheduleid: "计价单位组",
......
import qs from 'qs';
import { MockAdapter } from '@/mock/mock-adapter';
const mock = MockAdapter.getInstance();
// 模拟数据
const mockDatas: Array<any> = [
];
//getwflink
mock.onGet(new RegExp(/^\/wfcore\/ibizbusinesscentral-app-crm\/productpricelevels\/[a-zA-Z0-9\-\;]+\/usertasks\/[a-zA-Z0-9\-\;]+\/ways$/)).reply((config: any) => {
console.groupCollapsed("实体:productpricelevel 方法: getwflink");
console.table({url:config.url, method: config.method, data:config.data});
console.groupEnd();
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, {}];
}
return [status,[
{"sequenceFlowId":"dfdsfdsfdsfdsfds","sequenceFlowName":"同意",
"taskId":"aaaaddddccccddddd","processDefinitionKey":"support-workorders-approve-v1",
"processInstanceId":"ddlfldldfldsfds","refViewKey":""},
{"sequenceFlowId":"ddssdfdfdfdfsfdf","sequenceFlowName":"不同意",
"taskId":"aaaaddddccccddddd","processDefinitionKey":"support-workorders-approve-v1",
"processInstanceId":"ddfdsldlfdlldsf","refViewKey":"workorder_ltform_editview"}
]];
});
// getwfstep
mock.onGet(new RegExp(/^\/wfcore\/ibizbusinesscentral-app-crm\/productpricelevels\/process-definitions-nodes$/)).reply((config: any) => {
console.groupCollapsed("实体:productpricelevel 方法: getwfstep");
console.table({url:config.url, method: config.method, data:config.data});
console.groupEnd();
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, {}];
}
return [status, [
{"userTaskId":"sddfddfd-dfdf-fdfd-fdf-dfdfd",
"userTaskName":"待审",
"cnt":0,
"processDefinitionKey":"support-workorders-approve-v1",
"processDefinitionName":"工单审批流程v1"
},
{"userTaskId":"sddfddfd-dfdf-fdfd-fdf-87927",
"userTaskName":"待分配",
"cnt":3,
"processDefinitionKey":"support-workorders-approve-v1",
"processDefinitionName":"工单审批流程v1"}
]];
});
// createBatch
mock.onPost(new RegExp(/^\/productpricelevels\/batch$/)).reply((config: any) => {
console.groupCollapsed("实体:productpricelevel 方法: createBatch");
console.table({url:config.url, method: config.method, data:config.data});
console.groupEnd();
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, {}];
}
return [status, {}];
});
// updateBatch
mock.onPut(new RegExp(/^\/productpricelevels\/batch$/)).reply((config: any) => {
console.groupCollapsed("实体:productpricelevel 方法: updateBatch");
console.table({url:config.url, method: config.method, data:config.data});
console.groupEnd();
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, {}];
}
return [status, {}];
});
// removeBatch
mock.onDelete(new RegExp(/^\/productpricelevels\/batch$/)).reply((config: any) => {
console.groupCollapsed("实体:productpricelevel 方法: removeBatch");
console.table({url:config.url, method: config.method, data:config.data});
console.groupEnd();
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, {}];
}
return [status, {}];
});
// Select
mock.onGet(new RegExp(/^\/productpricelevels\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:productpricelevel 方法: Select");
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> = ['productpricelevelid'];
const matchArray:any = new RegExp(/^\/productpricelevels\/([a-zA-Z0-9\-\;]{1,35})\/select$/).exec(config.url);
let tempValue: any = {};
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 : [];
let _items = items.find((item: any) => Object.is(item.productpricelevelid, tempValue.productpricelevelid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.groupEnd();
console.groupEnd();
return [status, _items];
});
// Create
mock.onPost(new RegExp(/^\/productpricelevels\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:productpricelevel 方法: Create");
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> = ['productpricelevelid'];
const matchArray:any = new RegExp(/^\/productpricelevels\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
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]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(mockDatas[0]);
console.groupEnd();
console.groupEnd();
return [status, mockDatas[0]];
});
// Update
mock.onPut(new RegExp(/^\/productpricelevels\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:productpricelevel 方法: Update");
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> = ['productpricelevelid'];
const matchArray:any = new RegExp(/^\/productpricelevels\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
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 : [];
//let _items = items.find((item: any) => Object.is(item.productpricelevelid, tempValue.productpricelevelid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['productpricelevelid'] == tempValue['productpricelevelid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// GetDraft
mock.onGet(new RegExp(/^\/productpricelevels\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:productpricelevel 方法: GetDraft");
console.table({url:config.url, method: config.method, data:config.data});
// GetDraft
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/productpricelevels\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:productpricelevel 方法: CheckKey");
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> = ['productpricelevelid'];
const matchArray:any = new RegExp(/^\/productpricelevels\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
let tempValue: any = {};
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 : [];
//let _items = items.find((item: any) => Object.is(item.productpricelevelid, tempValue.productpricelevelid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['productpricelevelid'] == tempValue['productpricelevelid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// Save
mock.onPost(new RegExp(/^\/productpricelevels\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:productpricelevel 方法: Save");
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> = ['productpricelevelid'];
const matchArray:any = new RegExp(/^\/productpricelevels\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
let tempValue: any = {};
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 : [];
//let _items = items.find((item: any) => Object.is(item.productpricelevelid, tempValue.productpricelevelid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['productpricelevelid'] == tempValue['productpricelevelid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// FetchDefault
mock.onGet(new RegExp(/^\/productpricelevels\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:productpricelevel 方法: FetchDefault");
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 : []];
});
// FetchDefault
mock.onGet(new RegExp(/^\/productpricelevels\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:productpricelevel 方法: FetchDefault");
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 : []];
});
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// Remove
mock.onDelete(new RegExp(/^\/productpricelevels\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:productpricelevel 方法: Remove");
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> = ['productpricelevelid'];
const matchArray:any = new RegExp(/^\/productpricelevels\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
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 : [];
let _items = items.find((item: any) => Object.is(item.productpricelevelid, tempValue.productpricelevelid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/productpricelevels\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:productpricelevel 方法: Get");
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> = ['productpricelevelid'];
const matchArray:any = new RegExp(/^\/productpricelevels\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
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 : [];
let _items = items.find((item: any) => Object.is(item.productpricelevelid, tempValue.productpricelevelid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
......@@ -35,6 +35,7 @@ import './entity/campaign-campaigns/campaign-campaigns';
import './entity/sales-literatures/sales-literatures';
import './entity/activity-pointers/activity-pointers';
import './entity/list-accounts/list-accounts';
import './entity/product-price-levels/product-price-levels';
import './entity/faxs/faxs';
import './entity/quotes/quotes';
import './entity/campaign-activitys/campaign-activitys';
......
......@@ -69,7 +69,7 @@ export class AccountInfoBase extends TabExpViewBase {
seperator3: { name: 'seperator3', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
deuiaction4: { name: 'deuiaction4', caption: '编辑','isShowCaption':true,'isShowIcon':true, tooltip: '编辑', iconcls: 'fa fa-edit', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'OpenEditMode', target: 'SINGLEKEY' }, class: '' },
tbitem2: { name: 'tbitem2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
seperator4: { name: 'seperator4', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
deuiaction1: { name: 'deuiaction1', caption: '删除并关闭','isShowCaption':true,'isShowIcon':true, tooltip: '删除并关闭', iconcls: 'fa fa-remove', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'RemoveAndExit', target: 'SINGLEKEY' }, class: '' },
seperator2: { name: 'seperator2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
......
......@@ -65,7 +65,7 @@ export class ContactInfoBase extends TabExpViewBase {
public toolBarModels: any = {
deuiaction4: { name: 'deuiaction4', caption: '编辑','isShowCaption':true,'isShowIcon':true, tooltip: '编辑', iconcls: 'fa fa-edit', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'OpenEditMode', target: 'SINGLEKEY' }, class: '' },
tbitem2: { name: 'tbitem2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
seperator4: { name: 'seperator4', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
deuiaction1: { name: 'deuiaction1', caption: '删除并关闭','isShowCaption':true,'isShowIcon':true, tooltip: '删除并关闭', iconcls: 'fa fa-remove', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'RemoveAndExit', target: 'SINGLEKEY' }, class: '' },
seperator2: { name: 'seperator2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
......
......@@ -65,7 +65,7 @@ export class CampaignInfoBase extends TabExpViewBase {
public toolBarModels: any = {
deuiaction4: { name: 'deuiaction4', caption: '编辑','isShowCaption':true,'isShowIcon':true, tooltip: '编辑', iconcls: 'fa fa-edit', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'OpenEditMode', target: 'SINGLEKEY' }, class: '' },
tbitem2: { name: 'tbitem2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
seperator4: { name: 'seperator4', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
deuiaction1: { name: 'deuiaction1', caption: '删除并关闭','isShowCaption':true,'isShowIcon':true, tooltip: '删除并关闭', iconcls: 'fa fa-remove', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'RemoveAndExit', target: 'SINGLEKEY' }, class: '' },
seperator2: { name: 'seperator2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
......
......@@ -65,7 +65,7 @@ export class CampaignListEditViewBase extends EditViewBase {
public toolBarModels: any = {
deuiaction4: { name: 'deuiaction4', caption: '编辑','isShowCaption':true,'isShowIcon':true, tooltip: '编辑', iconcls: 'fa fa-edit', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'OpenEditMode', target: 'SINGLEKEY' }, class: '' },
tbitem2: { name: 'tbitem2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
seperator4: { name: 'seperator4', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
deuiaction1: { name: 'deuiaction1', caption: '删除并关闭','isShowCaption':true,'isShowIcon':true, tooltip: '删除并关闭', iconcls: 'fa fa-remove', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'RemoveAndExit', target: 'SINGLEKEY' }, class: '' },
seperator2: { name: 'seperator2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
......
......@@ -65,7 +65,7 @@ export class CampaignSummary_HeadBase extends DashboardViewBase {
public toolBarModels: any = {
deuiaction4: { name: 'deuiaction4', caption: '编辑','isShowCaption':true,'isShowIcon':true, tooltip: '编辑', iconcls: 'fa fa-edit', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'OpenEditMode', target: 'SINGLEKEY' }, class: '' },
tbitem2: { name: 'tbitem2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
seperator4: { name: 'seperator4', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
deuiaction1: { name: 'deuiaction1', caption: '删除并关闭','isShowCaption':true,'isShowIcon':true, tooltip: '删除并关闭', iconcls: 'fa fa-remove', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'RemoveAndExit', target: 'SINGLEKEY' }, class: '' },
seperator2: { name: 'seperator2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
......
......@@ -65,7 +65,7 @@ export class ListAccountEditViewBase extends EditViewBase {
public toolBarModels: any = {
deuiaction4: { name: 'deuiaction4', caption: '编辑','isShowCaption':true,'isShowIcon':true, tooltip: '编辑', iconcls: 'fa fa-edit', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'OpenEditMode', target: 'SINGLEKEY' }, class: '' },
tbitem2: { name: 'tbitem2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
seperator4: { name: 'seperator4', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
deuiaction1: { name: 'deuiaction1', caption: '删除并关闭','isShowCaption':true,'isShowIcon':true, tooltip: '删除并关闭', iconcls: 'fa fa-remove', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'RemoveAndExit', target: 'SINGLEKEY' }, class: '' },
seperator2: { name: 'seperator2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
......
......@@ -65,7 +65,7 @@ export class ListContactEditViewBase extends EditViewBase {
public toolBarModels: any = {
deuiaction4: { name: 'deuiaction4', caption: '编辑','isShowCaption':true,'isShowIcon':true, tooltip: '编辑', iconcls: 'fa fa-edit', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'OpenEditMode', target: 'SINGLEKEY' }, class: '' },
tbitem2: { name: 'tbitem2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
seperator4: { name: 'seperator4', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
deuiaction1: { name: 'deuiaction1', caption: '删除并关闭','isShowCaption':true,'isShowIcon':true, tooltip: '删除并关闭', iconcls: 'fa fa-remove', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'RemoveAndExit', target: 'SINGLEKEY' }, class: '' },
seperator2: { name: 'seperator2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
......
......@@ -64,33 +64,22 @@ export class LeadInfoBase extends TabExpViewBase {
* @memberof LeadInfo
*/
public toolBarModels: any = {
tbitem3: { name: 'tbitem3', caption: '保存','isShowCaption':true,'isShowIcon':true, tooltip: '保存', iconcls: 'fa fa-save', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Save', target: '' }, class: '' },
deuiaction4: { name: 'deuiaction4', caption: '编辑','isShowCaption':true,'isShowIcon':true, tooltip: '编辑', iconcls: 'fa fa-edit', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'OpenEditMode', target: 'SINGLEKEY' }, class: '' },
tbitem5: { name: 'tbitem5', caption: '保存并关闭','isShowCaption':true,'isShowIcon':true, tooltip: '保存并关闭', iconcls: 'fa fa-power-off', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'SaveAndExit', target: '' }, class: '' },
seperator4: { name: 'seperator4', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem17_qualification_sep: { name: 'tbitem17_qualification_sep', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem17_qualification: { name: 'tbitem17_qualification', caption: '授予资格','isShowCaption':true,'isShowIcon':true, tooltip: '授予资格', iconcls: 'fa fa-check', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Qualification', target: 'SINGLEKEY' }, class: '' },
tbitem6: { name: 'tbitem6', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem17_disqualification_sep: { name: 'tbitem17_disqualification_sep', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem17_disqualification: { name: 'tbitem17_disqualification', caption: '取消资格','isShowCaption':true,'isShowIcon':true, tooltip: '取消资格', iconcls: 'fa fa-close', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'DisQualification', target: 'SINGLEKEY' }, class: '' },
tbitem2: { name: 'tbitem2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
deuiaction1: { name: 'deuiaction1', caption: '删除并关闭','isShowCaption':true,'isShowIcon':true, tooltip: '删除并关闭', iconcls: 'fa fa-remove', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'RemoveAndExit', target: 'SINGLEKEY' }, class: '' },
seperator2: { name: 'seperator2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
deuiaction2: { name: 'deuiaction2', caption: '刷新','isShowCaption':true,'isShowIcon':true, tooltip: '刷新', iconcls: 'fa fa-refresh', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Refresh', target: 'SINGLEKEY' }, class: '' },
seperator1: { name: 'seperator1', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
deuiaction4: { name: 'deuiaction4', caption: '授予资格','isShowCaption':true,'isShowIcon':true, tooltip: '授予资格', iconcls: 'fa fa-check', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Qualification', target: 'SINGLEKEY' }, class: '' },
deuiaction9: { name: 'deuiaction9', caption: '取消资格','isShowCaption':true,'isShowIcon':true, tooltip: '取消资格', iconcls: 'fa fa-close', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'DisQualification', target: 'SINGLEKEY' }, class: '' },
items1: { name: 'items1', caption: '取消资格', disabled: false, type: 'ITEMS', visabled: true, dataaccaction: '',
model: {
deuiaction5: { name: 'deuiaction5', caption: '丢单','isShowCaption':true,'isShowIcon':true, tooltip: '丢单', iconcls: 'fa fa-close', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'DisQualification', target: 'SINGLEKEY' }, class: '' },
deuiaction6: { name: 'deuiaction6', caption: '无法联系','isShowCaption':true,'isShowIcon':true, tooltip: '无法联系', iconcls: 'fa fa-close', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'DisQualification', target: 'SINGLEKEY' }, class: '' },
deuiaction7: { name: 'deuiaction7', caption: '不再感兴趣','isShowCaption':true,'isShowIcon':true, tooltip: '不再感兴趣', iconcls: 'fa fa-close', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'DisQualification', target: 'SINGLEKEY' }, class: '' },
deuiaction8: { name: 'deuiaction8', caption: '已取消','isShowCaption':true,'isShowIcon':true, tooltip: '已取消', iconcls: 'fa fa-close', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'DisQualification', target: 'SINGLEKEY' }, class: '' },
}
},
tbitem13: { name: 'tbitem13', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem12: { name: 'tbitem12', caption: '关闭','isShowCaption':true,'isShowIcon':true, tooltip: '关闭', iconcls: 'fa fa-sign-out', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Exit', target: '' }, class: '' },
};
......@@ -139,11 +128,14 @@ export class LeadInfoBase extends TabExpViewBase {
* @memberof LeadInfoBase
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'tbitem3')) {
this.toolbar_tbitem3_click(null, '', $event2);
if (Object.is($event.tag, 'deuiaction4')) {
this.toolbar_deuiaction4_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem5')) {
this.toolbar_tbitem5_click(null, '', $event2);
if (Object.is($event.tag, 'tbitem17_qualification')) {
this.toolbar_tbitem17_qualification_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem17_disqualification')) {
this.toolbar_tbitem17_disqualification_click(null, '', $event2);
}
if (Object.is($event.tag, 'deuiaction1')) {
this.toolbar_deuiaction1_click(null, '', $event2);
......@@ -151,137 +143,11 @@ export class LeadInfoBase extends TabExpViewBase {
if (Object.is($event.tag, 'deuiaction2')) {
this.toolbar_deuiaction2_click(null, '', $event2);
}
if (Object.is($event.tag, 'deuiaction4')) {
this.toolbar_deuiaction4_click(null, '', $event2);
}
if (Object.is($event.tag, 'deuiaction9')) {
this.toolbar_deuiaction9_click(null, '', $event2);
}
if (Object.is($event.tag, 'deuiaction5')) {
this.toolbar_deuiaction5_click(null, '', $event2);
}
if (Object.is($event.tag, 'deuiaction6')) {
this.toolbar_deuiaction6_click(null, '', $event2);
}
if (Object.is($event.tag, 'deuiaction7')) {
this.toolbar_deuiaction7_click(null, '', $event2);
}
if (Object.is($event.tag, 'deuiaction8')) {
this.toolbar_deuiaction8_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem12')) {
this.toolbar_tbitem12_click(null, '', $event2);
}
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem3_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 = {};
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Save(datas, contextJO,paramJO, $event, xData,this,"Lead");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem5_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 = {};
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.SaveAndExit(datas, contextJO,paramJO, $event, xData,this,"Lead");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction1_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 = {};
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.RemoveAndExit(datas, contextJO,paramJO, $event, xData,this,"Lead");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction2_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 = {};
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Refresh(datas, contextJO,paramJO, $event, xData,this,"Lead");
}
/**
* 逻辑事件
*
......@@ -306,8 +172,7 @@ export class LeadInfoBase extends TabExpViewBase {
datas = [params];
}
// 界面行为
const curUIService:LeadUIService = new LeadUIService();
curUIService.Lead_Qualification(datas,contextJO, paramJO, $event, xData,this,"Lead");
this.OpenEditMode(datas, contextJO,paramJO, $event, xData,this,"Lead");
}
/**
......@@ -318,7 +183,7 @@ export class LeadInfoBase extends TabExpViewBase {
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction9_click(params: any = {}, tag?: any, $event?: any) {
public toolbar_tbitem17_qualification_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
......@@ -335,35 +200,7 @@ export class LeadInfoBase extends TabExpViewBase {
}
// 界面行为
const curUIService:LeadUIService = new LeadUIService();
curUIService.Lead_DisQualification(datas,contextJO, paramJO, $event, xData,this,"Lead");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction5_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 = {};
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
const curUIService:LeadUIService = new LeadUIService();
curUIService.Lead_DisQualification(datas,contextJO, paramJO, $event, xData,this,"Lead");
curUIService.Lead_Qualification(datas,contextJO, paramJO, $event, xData,this,"Lead");
}
/**
......@@ -374,7 +211,7 @@ export class LeadInfoBase extends TabExpViewBase {
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction6_click(params: any = {}, tag?: any, $event?: any) {
public toolbar_tbitem17_disqualification_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
......@@ -402,7 +239,7 @@ export class LeadInfoBase extends TabExpViewBase {
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction7_click(params: any = {}, tag?: any, $event?: any) {
public toolbar_deuiaction1_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
......@@ -418,8 +255,7 @@ export class LeadInfoBase extends TabExpViewBase {
datas = [params];
}
// 界面行为
const curUIService:LeadUIService = new LeadUIService();
curUIService.Lead_DisQualification(datas,contextJO, paramJO, $event, xData,this,"Lead");
this.RemoveAndExit(datas, contextJO,paramJO, $event, xData,this,"Lead");
}
/**
......@@ -430,7 +266,7 @@ export class LeadInfoBase extends TabExpViewBase {
* @param {*} [$event]
* @memberof
*/
public toolbar_deuiaction8_click(params: any = {}, tag?: any, $event?: any) {
public toolbar_deuiaction2_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
......@@ -446,8 +282,7 @@ export class LeadInfoBase extends TabExpViewBase {
datas = [params];
}
// 界面行为
const curUIService:LeadUIService = new LeadUIService();
curUIService.Lead_DisQualification(datas,contextJO, paramJO, $event, xData,this,"Lead");
this.Refresh(datas, contextJO,paramJO, $event, xData,this,"Lead");
}
/**
......@@ -478,64 +313,72 @@ export class LeadInfoBase extends TabExpViewBase {
}
/**
* 保存
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof LeadInfoBase
*/
public Save(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
// 界面行为容器对象 _this
const _this: any = this;
if (xData && xData.save instanceof Function) {
xData.save().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
_this.$emit('viewdataschange', [{ ...response.data }]);
});
} else if (_this.save && _this.save instanceof Function) {
_this.save();
}
}
/**
* 保存并关闭
* 编辑
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof LeadInfoBase
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
*/
public SaveAndExit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
public async OpenEditMode(args: any[], context:any = {} ,params: any={}, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
xData = $event;
$event = params;
params = context;
let context2: any = {};
let data: any = {};
let parentContext:any = {};
let parentViewParam:any = {};
const _args: any[] = this.$util.deepCopy(args);
const _this: any = this;
if (xData && xData.saveAndExit instanceof Function) {
xData.saveAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
} else if (_this.saveAndExit && _this.saveAndExit instanceof Function) {
_this.saveAndExit().then((response: any) => {
if (!response || response.status !== 200) {
const actionTarget: string | null = 'SINGLEKEY';
Object.assign(context2, { res_partner: '%id%' });
Object.assign(params, { id: '%id%' });
Object.assign(params, { name: '%name%' })
if(actionContext.context){
parentContext = actionContext.context;
}
if(actionContext.viewparams){
parentViewParam = actionContext.viewparams;
}
context = UIActionTool.handleContextParam(actionTarget,_args,parentContext,parentViewParam,context);
data = UIActionTool.handleActionParam(actionTarget,_args,parentContext,parentViewParam,params);
Object.assign(context,this.context,context);
if(context && context.srfsessionid){
context.srfsessionkey = context.srfsessionid;
delete context.srfsessionid;
}
const parameters: any[] = [
{ pathName: 'res_partners', parameterName: 'res_partner' },
];
const openDrawer = (view: any, data: any) => {
let container: Subject<any> = this.$appdrawer.openDrawer(view, context,data);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
const _this: any = this;
if (xData && xData.refresh && xData.refresh instanceof Function) {
xData.refresh(args);
}
return result.datas;
});
}
const view: any = {
viewname: 'lead-info-edit-mode',
height: 0,
width: 0,
title: '潜在顾客',
placement: 'DRAWER_TOP',
};
openDrawer(view, data);
}
/**
* 删除并关闭
*
......
......@@ -65,7 +65,7 @@ export class OpportunityCompetitorEditViewBase extends EditViewBase {
public toolBarModels: any = {
deuiaction4: { name: 'deuiaction4', caption: '编辑','isShowCaption':true,'isShowIcon':true, tooltip: '编辑', iconcls: 'fa fa-edit', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'OpenEditMode', target: 'SINGLEKEY' }, class: '' },
tbitem2: { name: 'tbitem2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
seperator4: { name: 'seperator4', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
deuiaction1: { name: 'deuiaction1', caption: '删除并关闭','isShowCaption':true,'isShowIcon':true, tooltip: '删除并关闭', iconcls: 'fa fa-remove', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'RemoveAndExit', target: 'SINGLEKEY' }, class: '' },
seperator2: { name: 'seperator2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
......
......@@ -67,6 +67,7 @@ export class EntityServiceRegister {
this.allEntityService.set('salesliterature', () => import('@/service/sales-literature/sales-literature-service'));
this.allEntityService.set('activitypointer', () => import('@/service/activity-pointer/activity-pointer-service'));
this.allEntityService.set('listaccount', () => import('@/service/list-account/list-account-service'));
this.allEntityService.set('productpricelevel', () => import('@/service/product-price-level/product-price-level-service'));
this.allEntityService.set('fax', () => import('@/service/fax/fax-service'));
this.allEntityService.set('quote', () => import('@/service/quote/quote-service'));
this.allEntityService.set('campaignactivity', () => import('@/service/campaign-activity/campaign-activity-service'));
......
import { Http,Util } from '@/utils';
import EntityService from '../entity-service';
/**
* 价目表项服务对象基类
*
* @export
* @class ProductPriceLevelServiceBase
* @extends {EntityServie}
*/
export default class ProductPriceLevelServiceBase extends EntityService {
/**
* Creates an instance of ProductPriceLevelServiceBase.
*
* @param {*} [opts={}]
* @memberof ProductPriceLevelServiceBase
*/
constructor(opts: any = {}) {
super(opts);
}
/**
* 初始化基础数据
*
* @memberof ProductPriceLevelServiceBase
*/
public initBasicData(){
this.APPLYDEKEY ='productpricelevel';
this.APPDEKEY = 'productpricelevelid';
this.APPDENAME = 'productpricelevels';
this.APPDETEXT = '';
this.APPNAME = 'crm';
this.SYSTEMNAME = 'ibizbusinesscentral';
}
// 实体接口
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ProductPriceLevelServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().get(`/productpricelevels/${context.productpricelevel}/select`,isloading);
}
/**
* Create接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ProductPriceLevelServiceBase
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
}
if(data.srffrontuf){
delete data.srffrontuf;
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/productpricelevels`,data,isloading);
return res;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ProductPriceLevelServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/productpricelevels/${context.productpricelevel}`,data,isloading);
return res;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ProductPriceLevelServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().delete(`/productpricelevels/${context.productpricelevel}`,isloading);
}
/**
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ProductPriceLevelServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/productpricelevels/${context.productpricelevel}`,isloading);
return res;
}
/**
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ProductPriceLevelServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/productpricelevels/getdraft`,isloading);
res.data.productpricelevel = data.productpricelevel;
return res;
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ProductPriceLevelServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().post(`/productpricelevels/${context.productpricelevel}/checkkey`,data,isloading);
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ProductPriceLevelServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/productpricelevels/${context.productpricelevel}/save`,data,isloading);
return res;
}
/**
* FetchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ProductPriceLevelServiceBase
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/productpricelevels/fetchdefault`,tempData,isloading);
}
}
\ No newline at end of file
import { Http,Util } from '@/utils';
import ProductPriceLevelServiceBase from './product-price-level-service-base';
/**
* 价目表项服务对象
*
* @export
* @class ProductPriceLevelService
* @extends {ProductPriceLevelServiceBase}
*/
export default class ProductPriceLevelService extends ProductPriceLevelServiceBase {
/**
* Creates an instance of ProductPriceLevelService.
*
* @param {*} [opts={}]
* @memberof ProductPriceLevelService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
import { Environment } from '@/environments/environment';
import { UIActionTool,Util } from '@/utils';
import UIService from '../ui-service';
import { Subject } from 'rxjs';
import ProductPriceLevelService from '@/service/product-price-level/product-price-level-service';
/**
* 价目表项UI服务对象基类
*
* @export
* @class ProductPriceLevelUIServiceBase
*/
export default class ProductPriceLevelUIServiceBase extends UIService {
/**
* 是否支持工作流
*
* @memberof ProductPriceLevelUIServiceBase
*/
public isEnableWorkflow:boolean = false;
/**
* 当前UI服务对应的数据服务对象
*
* @memberof ProductPriceLevelUIServiceBase
*/
public dataService:ProductPriceLevelService = new ProductPriceLevelService();
/**
* 所有关联视图
*
* @memberof ProductPriceLevelUIServiceBase
*/
public allViewMap: Map<string, Object> = new Map();
/**
* 状态值
*
* @memberof ProductPriceLevelUIServiceBase
*/
public stateValue: number = 0;
/**
* 状态属性
*
* @memberof ProductPriceLevelUIServiceBase
*/
public stateField: string = "";
/**
* 主状态属性集合
*
* @memberof ProductPriceLevelUIServiceBase
*/
public mainStateFields:Array<any> = [];
/**
* 主状态集合Map
*
* @memberof ProductPriceLevelUIServiceBase
*/
public allDeMainStateMap:Map<string,string> = new Map();
/**
* Creates an instance of ProductPriceLevelUIServiceBase.
*
* @param {*} [opts={}]
* @memberof ProductPriceLevelUIServiceBase
*/
constructor(opts: any = {}) {
super(opts);
this.initViewMap();
this.initDeMainStateMap();
}
/**
* 初始化视图Map
*
* @memberof ProductPriceLevelUIServiceBase
*/
public initViewMap(){
}
/**
* 初始化主状态集合
*
* @memberof ProductPriceLevelUIServiceBase
*/
public initDeMainStateMap(){
}
/**
* 获取指定数据的重定向页面
*
* @param srfkey 数据主键
* @param isEnableWorkflow 重定向视图是否需要处理流程中的数据
* @memberof ProductPriceLevelUIServiceBase
*/
public async getRDAppView(srfkey:string,isEnableWorkflow:boolean){
this.isEnableWorkflow = isEnableWorkflow;
// 进行数据查询
let result:any = await this.dataService.Get({productpricelevel:srfkey});
const curData:any = result.data;
//判断当前数据模式,默认为true,todo
const iRealDEModel:boolean = true;
let bDataInWF:boolean = false;
let bWFMode:any = false;
// 计算数据模式
if (this.isEnableWorkflow) {
bDataInWF = await this.dataService.testDataInWF({stateValue:this.stateValue,stateField:this.stateField},curData);
if (bDataInWF) {
bDataInWF = true;
bWFMode = await this.dataService.testUserExistWorklist(null,curData);
}
}
let strPDTViewParam:string = await this.getDESDDEViewPDTParam(curData, bDataInWF, bWFMode);
//若不是当前数据模式,处理strPDTViewParam,todo
//查找视图
//返回视图
return this.allViewMap.get(strPDTViewParam);
}
/**
* 获取实际的数据类型
*
* @memberof ProductPriceLevelUIServiceBase
*/
public getRealDEType(entity:any){
}
/**
* 获取实体单数据实体视图预定义参数
*
* @param curData 当前数据
* @param bDataInWF 是否有数据在工作流中
* @param bWFMode 是否工作流模式
* @memberof ProductPriceLevelUIServiceBase
*/
public async getDESDDEViewPDTParam(curData:any, bDataInWF:boolean, bWFMode:boolean){
let strPDTParam:string = '';
if (bDataInWF) {
// 判断数据是否在流程中
}
//多表单,todo
const isEnableMultiForm:boolean = false;
const multiFormDEField:string|null =null;
if (isEnableMultiForm && multiFormDEField) {
const objFormValue:string = curData[multiFormDEField];
if(!Environment.isAppMode){
return 'MOBEDITVIEW'+objFormValue;
}
return 'EDITVIEW'+objFormValue;
}
if(!Environment.isAppMode){
if(this.getDEMainStateTag(curData)){
return `MOBEDITVIEW:MSTAG:${ await this.getDEMainStateTag(curData)}`;
}
return 'MOBEDITVIEW:';
}
if(this.getDEMainStateTag(curData)){
return `EDITVIEW:MSTAG:${ await this.getDEMainStateTag(curData)}`;
}
return 'EDITVIEW:';
}
/**
* 获取数据对象的主状态标识
*
* @param curData 当前数据
* @memberof ProductPriceLevelUIServiceBase
*/
public async getDEMainStateTag(curData:any){
if(this.mainStateFields.length === 0) return null;
this.mainStateFields.forEach((singleMainField:any) =>{
if(!(singleMainField in curData)){
console.error(`当前数据对象不包含属性singleMainField,可能会发生错误`);
}
})
let strTag:String = "";
for (let i = 0; i <= 1; i++) {
let strTag:string = (curData[this.mainStateFields[0]])?(i == 0) ? curData[this.mainStateFields[0]] : "":"";
if (this.mainStateFields.length >= 2) {
for (let j = 0; j <= 1; j++) {
let strTag2:string = (curData[this.mainStateFields[1]])?`${strTag}__${(j == 0) ? curData[this.mainStateFields[1]] : ""}`:strTag;
if (this.mainStateFields.length >= 3) {
for (let k = 0; k <= 1; k++) {
let strTag3:string = (curData[this.mainStateFields[2]])?`${strTag2}__${(k == 0) ? curData[this.mainStateFields[2]] : ""}`:strTag2;
// 判断是否存在
return this.allDeMainStateMap.get(strTag3);
}
}else{
return this.allDeMainStateMap.get(strTag2);
}
}
}else{
return this.allDeMainStateMap.get(strTag);
}
}
return null;
}
}
\ No newline at end of file
import ProductPriceLevelUIServiceBase from './product-price-level-ui-service-base';
/**
* 价目表项UI服务对象
*
* @export
* @class ProductPriceLevelUIService
*/
export default class ProductPriceLevelUIService extends ProductPriceLevelUIServiceBase {
/**
* Creates an instance of ProductPriceLevelUIService.
*
* @param {*} [opts={}]
* @memberof ProductPriceLevelUIService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
......@@ -67,6 +67,7 @@ export class UIServiceRegister {
this.allUIService.set('salesliterature', () => import('@/uiservice/sales-literature/sales-literature-ui-service'));
this.allUIService.set('activitypointer', () => import('@/uiservice/activity-pointer/activity-pointer-ui-service'));
this.allUIService.set('listaccount', () => import('@/uiservice/list-account/list-account-ui-service'));
this.allUIService.set('productpricelevel', () => import('@/uiservice/product-price-level/product-price-level-ui-service'));
this.allUIService.set('fax', () => import('@/uiservice/fax/fax-ui-service'));
this.allUIService.set('quote', () => import('@/uiservice/quote/quote-ui-service'));
this.allUIService.set('campaignactivity', () => import('@/uiservice/campaign-activity/campaign-activity-ui-service'));
......
......@@ -119,6 +119,10 @@ zuul:
path: /listaccounts/**
serviceId: ibizbusinesscentral-centralapi
stripPrefix: false
productpricelevel:
path: /productpricelevels/**
serviceId: ibizbusinesscentral-centralapi
stripPrefix: false
fax:
path: /faxes/**
serviceId: ibizbusinesscentral-centralapi
......
......@@ -228,6 +228,14 @@
"datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}]
}
, {
"dename":"ProductPriceLevel",
"delogicname":"价目表项",
"sysmoudle":{"id":"PRODUCT","name":"Product"},
"dedataset":[{"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":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" }],
"datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}]
}
, {
"dename":"Fax",
"delogicname":"传真",
"sysmoudle":{"id":"BASE","name":"Base"},
......
package cn.ibizlab.businesscentral.centralapi.dto;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.math.BigInteger;
import java.util.Map;
import java.util.HashMap;
import java.io.Serializable;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import cn.ibizlab.businesscentral.util.domain.DTOBase;
import lombok.Data;
/**
* 服务DTO对象[ProductPriceLevelDTO]
*/
@Data
public class ProductPriceLevelDTO extends DTOBase implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 属性 [IMPORTSEQUENCENUMBER]
*
*/
@JSONField(name = "importsequencenumber")
@JsonProperty("importsequencenumber")
private Integer importsequencenumber;
/**
* 属性 [ROUNDINGOPTIONAMOUNT]
*
*/
@JSONField(name = "roundingoptionamount")
@JsonProperty("roundingoptionamount")
private BigDecimal roundingoptionamount;
/**
* 属性 [VERSIONNUMBER]
*
*/
@JSONField(name = "versionnumber")
@JsonProperty("versionnumber")
private BigInteger versionnumber;
/**
* 属性 [AMOUNT_BASE]
*
*/
@JSONField(name = "amount_base")
@JsonProperty("amount_base")
private BigDecimal amountBase;
/**
* 属性 [PROCESSID]
*
*/
@JSONField(name = "processid")
@JsonProperty("processid")
private String processid;
/**
* 属性 [AMOUNT]
*
*/
@JSONField(name = "amount")
@JsonProperty("amount")
private BigDecimal amount;
/**
* 属性 [CREATEDATE]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate")
private Timestamp createdate;
/**
* 属性 [ROUNDINGOPTIONAMOUNT_BASE]
*
*/
@JSONField(name = "roundingoptionamount_base")
@JsonProperty("roundingoptionamount_base")
private BigDecimal roundingoptionamountBase;
/**
* 属性 [UPDATEMAN]
*
*/
@JSONField(name = "updateman")
@JsonProperty("updateman")
private String updateman;
/**
* 属性 [OVERRIDDENCREATEDON]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "overriddencreatedon" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("overriddencreatedon")
private Timestamp overriddencreatedon;
/**
* 属性 [EXCHANGERATE]
*
*/
@JSONField(name = "exchangerate")
@JsonProperty("exchangerate")
private BigDecimal exchangerate;
/**
* 属性 [ORGANIZATIONID]
*
*/
@JSONField(name = "organizationid")
@JsonProperty("organizationid")
private String organizationid;
/**
* 属性 [PERCENTAGE]
*
*/
@JSONField(name = "percentage")
@JsonProperty("percentage")
private BigDecimal percentage;
/**
* 属性 [TRAVERSEDPATH]
*
*/
@JSONField(name = "traversedpath")
@JsonProperty("traversedpath")
private String traversedpath;
/**
* 属性 [PRODUCTNUMBER]
*
*/
@JSONField(name = "productnumber")
@JsonProperty("productnumber")
private String productnumber;
/**
* 属性 [PRICINGMETHODCODE]
*
*/
@JSONField(name = "pricingmethodcode")
@JsonProperty("pricingmethodcode")
private String pricingmethodcode;
/**
* 属性 [ROUNDINGOPTIONCODE]
*
*/
@JSONField(name = "roundingoptioncode")
@JsonProperty("roundingoptioncode")
private String roundingoptioncode;
/**
* 属性 [TIMEZONERULEVERSIONNUMBER]
*
*/
@JSONField(name = "timezoneruleversionnumber")
@JsonProperty("timezoneruleversionnumber")
private Integer timezoneruleversionnumber;
/**
* 属性 [UTCCONVERSIONTIMEZONECODE]
*
*/
@JSONField(name = "utcconversiontimezonecode")
@JsonProperty("utcconversiontimezonecode")
private Integer utcconversiontimezonecode;
/**
* 属性 [PRODUCTPRICELEVELID]
*
*/
@JSONField(name = "productpricelevelid")
@JsonProperty("productpricelevelid")
private String productpricelevelid;
/**
* 属性 [QUANTITYSELLINGCODE]
*
*/
@JSONField(name = "quantitysellingcode")
@JsonProperty("quantitysellingcode")
private String quantitysellingcode;
/**
* 属性 [UPDATEDATE]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate")
private Timestamp updatedate;
/**
* 属性 [ROUNDINGPOLICYCODE]
*
*/
@JSONField(name = "roundingpolicycode")
@JsonProperty("roundingpolicycode")
private String roundingpolicycode;
/**
* 属性 [CREATEMAN]
*
*/
@JSONField(name = "createman")
@JsonProperty("createman")
private String createman;
/**
* 属性 [STAGEID]
*
*/
@JSONField(name = "stageid")
@JsonProperty("stageid")
private String stageid;
/**
* 属性 [PRODUCTID]
*
*/
@JSONField(name = "productid")
@JsonProperty("productid")
private String productid;
/**
* 属性 [UOMSCHEDULEID]
*
*/
@JSONField(name = "uomscheduleid")
@JsonProperty("uomscheduleid")
private String uomscheduleid;
/**
* 属性 [TRANSACTIONCURRENCYID]
*
*/
@JSONField(name = "transactioncurrencyid")
@JsonProperty("transactioncurrencyid")
private String transactioncurrencyid;
/**
* 属性 [UOMID]
*
*/
@JSONField(name = "uomid")
@JsonProperty("uomid")
private String uomid;
/**
* 属性 [DISCOUNTTYPEID]
*
*/
@JSONField(name = "discounttypeid")
@JsonProperty("discounttypeid")
private String discounttypeid;
/**
* 属性 [PRICELEVELID]
*
*/
@JSONField(name = "pricelevelid")
@JsonProperty("pricelevelid")
private String pricelevelid;
/**
* 设置 [IMPORTSEQUENCENUMBER]
*/
public void setImportsequencenumber(Integer importsequencenumber){
this.importsequencenumber = importsequencenumber ;
this.modify("importsequencenumber",importsequencenumber);
}
/**
* 设置 [ROUNDINGOPTIONAMOUNT]
*/
public void setRoundingoptionamount(BigDecimal roundingoptionamount){
this.roundingoptionamount = roundingoptionamount ;
this.modify("roundingoptionamount",roundingoptionamount);
}
/**
* 设置 [VERSIONNUMBER]
*/
public void setVersionnumber(BigInteger versionnumber){
this.versionnumber = versionnumber ;
this.modify("versionnumber",versionnumber);
}
/**
* 设置 [AMOUNT_BASE]
*/
public void setAmountBase(BigDecimal amountBase){
this.amountBase = amountBase ;
this.modify("amount_base",amountBase);
}
/**
* 设置 [PROCESSID]
*/
public void setProcessid(String processid){
this.processid = processid ;
this.modify("processid",processid);
}
/**
* 设置 [AMOUNT]
*/
public void setAmount(BigDecimal amount){
this.amount = amount ;
this.modify("amount",amount);
}
/**
* 设置 [ROUNDINGOPTIONAMOUNT_BASE]
*/
public void setRoundingoptionamountBase(BigDecimal roundingoptionamountBase){
this.roundingoptionamountBase = roundingoptionamountBase ;
this.modify("roundingoptionamount_base",roundingoptionamountBase);
}
/**
* 设置 [OVERRIDDENCREATEDON]
*/
public void setOverriddencreatedon(Timestamp overriddencreatedon){
this.overriddencreatedon = overriddencreatedon ;
this.modify("overriddencreatedon",overriddencreatedon);
}
/**
* 设置 [EXCHANGERATE]
*/
public void setExchangerate(BigDecimal exchangerate){
this.exchangerate = exchangerate ;
this.modify("exchangerate",exchangerate);
}
/**
* 设置 [ORGANIZATIONID]
*/
public void setOrganizationid(String organizationid){
this.organizationid = organizationid ;
this.modify("organizationid",organizationid);
}
/**
* 设置 [PERCENTAGE]
*/
public void setPercentage(BigDecimal percentage){
this.percentage = percentage ;
this.modify("percentage",percentage);
}
/**
* 设置 [TRAVERSEDPATH]
*/
public void setTraversedpath(String traversedpath){
this.traversedpath = traversedpath ;
this.modify("traversedpath",traversedpath);
}
/**
* 设置 [PRODUCTNUMBER]
*/
public void setProductnumber(String productnumber){
this.productnumber = productnumber ;
this.modify("productnumber",productnumber);
}
/**
* 设置 [PRICINGMETHODCODE]
*/
public void setPricingmethodcode(String pricingmethodcode){
this.pricingmethodcode = pricingmethodcode ;
this.modify("pricingmethodcode",pricingmethodcode);
}
/**
* 设置 [ROUNDINGOPTIONCODE]
*/
public void setRoundingoptioncode(String roundingoptioncode){
this.roundingoptioncode = roundingoptioncode ;
this.modify("roundingoptioncode",roundingoptioncode);
}
/**
* 设置 [TIMEZONERULEVERSIONNUMBER]
*/
public void setTimezoneruleversionnumber(Integer timezoneruleversionnumber){
this.timezoneruleversionnumber = timezoneruleversionnumber ;
this.modify("timezoneruleversionnumber",timezoneruleversionnumber);
}
/**
* 设置 [UTCCONVERSIONTIMEZONECODE]
*/
public void setUtcconversiontimezonecode(Integer utcconversiontimezonecode){
this.utcconversiontimezonecode = utcconversiontimezonecode ;
this.modify("utcconversiontimezonecode",utcconversiontimezonecode);
}
/**
* 设置 [QUANTITYSELLINGCODE]
*/
public void setQuantitysellingcode(String quantitysellingcode){
this.quantitysellingcode = quantitysellingcode ;
this.modify("quantitysellingcode",quantitysellingcode);
}
/**
* 设置 [ROUNDINGPOLICYCODE]
*/
public void setRoundingpolicycode(String roundingpolicycode){
this.roundingpolicycode = roundingpolicycode ;
this.modify("roundingpolicycode",roundingpolicycode);
}
/**
* 设置 [STAGEID]
*/
public void setStageid(String stageid){
this.stageid = stageid ;
this.modify("stageid",stageid);
}
/**
* 设置 [PRODUCTID]
*/
public void setProductid(String productid){
this.productid = productid ;
this.modify("productid",productid);
}
/**
* 设置 [UOMSCHEDULEID]
*/
public void setUomscheduleid(String uomscheduleid){
this.uomscheduleid = uomscheduleid ;
this.modify("uomscheduleid",uomscheduleid);
}
/**
* 设置 [TRANSACTIONCURRENCYID]
*/
public void setTransactioncurrencyid(String transactioncurrencyid){
this.transactioncurrencyid = transactioncurrencyid ;
this.modify("transactioncurrencyid",transactioncurrencyid);
}
/**
* 设置 [UOMID]
*/
public void setUomid(String uomid){
this.uomid = uomid ;
this.modify("uomid",uomid);
}
/**
* 设置 [DISCOUNTTYPEID]
*/
public void setDiscounttypeid(String discounttypeid){
this.discounttypeid = discounttypeid ;
this.modify("discounttypeid",discounttypeid);
}
/**
* 设置 [PRICELEVELID]
*/
public void setPricelevelid(String pricelevelid){
this.pricelevelid = pricelevelid ;
this.modify("pricelevelid",pricelevelid);
}
}
package cn.ibizlab.businesscentral.centralapi.mapping;
import org.mapstruct.*;
import cn.ibizlab.businesscentral.core.product.domain.ProductPriceLevel;
import cn.ibizlab.businesscentral.centralapi.dto.ProductPriceLevelDTO;
import cn.ibizlab.businesscentral.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {},
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface ProductPriceLevelMapping extends MappingBase<ProductPriceLevelDTO, ProductPriceLevel> {
}
package cn.ibizlab.businesscentral.centralapi.rest;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import lombok.extern.slf4j.Slf4j;
import com.alibaba.fastjson.JSONObject;
import javax.servlet.ServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.http.HttpStatus;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.StringUtils;
import org.springframework.context.annotation.Lazy;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.security.access.prepost.PostAuthorize;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import cn.ibizlab.businesscentral.centralapi.dto.*;
import cn.ibizlab.businesscentral.centralapi.mapping.*;
import cn.ibizlab.businesscentral.core.product.domain.ProductPriceLevel;
import cn.ibizlab.businesscentral.core.product.service.IProductPriceLevelService;
import cn.ibizlab.businesscentral.core.product.filter.ProductPriceLevelSearchContext;
import cn.ibizlab.businesscentral.util.annotation.VersionCheck;
@Slf4j
@Api(tags = {"价目表项" })
@RestController("CentralApi-productpricelevel")
@RequestMapping("")
public class ProductPriceLevelResource {
@Autowired
public IProductPriceLevelService productpricelevelService;
@Autowired
@Lazy
public ProductPriceLevelMapping productpricelevelMapping;
@PreAuthorize("hasPermission(this.productpricelevelMapping.toDomain(#productpriceleveldto),'iBizBusinessCentral-ProductPriceLevel-Create')")
@ApiOperation(value = "新建价目表项", tags = {"价目表项" }, notes = "新建价目表项")
@RequestMapping(method = RequestMethod.POST, value = "/productpricelevels")
@Transactional
public ResponseEntity<ProductPriceLevelDTO> create(@RequestBody ProductPriceLevelDTO productpriceleveldto) {
ProductPriceLevel domain = productpricelevelMapping.toDomain(productpriceleveldto);
productpricelevelService.create(domain);
ProductPriceLevelDTO dto = productpricelevelMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.productpricelevelMapping.toDomain(#productpriceleveldtos),'iBizBusinessCentral-ProductPriceLevel-Create')")
@ApiOperation(value = "批量新建价目表项", tags = {"价目表项" }, notes = "批量新建价目表项")
@RequestMapping(method = RequestMethod.POST, value = "/productpricelevels/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<ProductPriceLevelDTO> productpriceleveldtos) {
productpricelevelService.createBatch(productpricelevelMapping.toDomain(productpriceleveldtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@VersionCheck(entity = "productpricelevel" , versionfield = "updatedate")
@PreAuthorize("hasPermission(this.productpricelevelService.get(#productpricelevel_id),'iBizBusinessCentral-ProductPriceLevel-Update')")
@ApiOperation(value = "更新价目表项", tags = {"价目表项" }, notes = "更新价目表项")
@RequestMapping(method = RequestMethod.PUT, value = "/productpricelevels/{productpricelevel_id}")
@Transactional
public ResponseEntity<ProductPriceLevelDTO> update(@PathVariable("productpricelevel_id") String productpricelevel_id, @RequestBody ProductPriceLevelDTO productpriceleveldto) {
ProductPriceLevel domain = productpricelevelMapping.toDomain(productpriceleveldto);
domain .setProductpricelevelid(productpricelevel_id);
productpricelevelService.update(domain );
ProductPriceLevelDTO dto = productpricelevelMapping.toDto(domain );
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.productpricelevelService.getProductpricelevelByEntities(this.productpricelevelMapping.toDomain(#productpriceleveldtos)),'iBizBusinessCentral-ProductPriceLevel-Update')")
@ApiOperation(value = "批量更新价目表项", tags = {"价目表项" }, notes = "批量更新价目表项")
@RequestMapping(method = RequestMethod.PUT, value = "/productpricelevels/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<ProductPriceLevelDTO> productpriceleveldtos) {
productpricelevelService.updateBatch(productpricelevelMapping.toDomain(productpriceleveldtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasPermission(this.productpricelevelService.get(#productpricelevel_id),'iBizBusinessCentral-ProductPriceLevel-Remove')")
@ApiOperation(value = "删除价目表项", tags = {"价目表项" }, notes = "删除价目表项")
@RequestMapping(method = RequestMethod.DELETE, value = "/productpricelevels/{productpricelevel_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("productpricelevel_id") String productpricelevel_id) {
return ResponseEntity.status(HttpStatus.OK).body(productpricelevelService.remove(productpricelevel_id));
}
@PreAuthorize("hasPermission(this.productpricelevelService.getProductpricelevelByIds(#ids),'iBizBusinessCentral-ProductPriceLevel-Remove')")
@ApiOperation(value = "批量删除价目表项", tags = {"价目表项" }, notes = "批量删除价目表项")
@RequestMapping(method = RequestMethod.DELETE, value = "/productpricelevels/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) {
productpricelevelService.removeBatch(ids);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PostAuthorize("hasPermission(this.productpricelevelMapping.toDomain(returnObject.body),'iBizBusinessCentral-ProductPriceLevel-Get')")
@ApiOperation(value = "获取价目表项", tags = {"价目表项" }, notes = "获取价目表项")
@RequestMapping(method = RequestMethod.GET, value = "/productpricelevels/{productpricelevel_id}")
public ResponseEntity<ProductPriceLevelDTO> get(@PathVariable("productpricelevel_id") String productpricelevel_id) {
ProductPriceLevel domain = productpricelevelService.get(productpricelevel_id);
ProductPriceLevelDTO dto = productpricelevelMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@ApiOperation(value = "获取价目表项草稿", tags = {"价目表项" }, notes = "获取价目表项草稿")
@RequestMapping(method = RequestMethod.GET, value = "/productpricelevels/getdraft")
public ResponseEntity<ProductPriceLevelDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(productpricelevelMapping.toDto(productpricelevelService.getDraft(new ProductPriceLevel())));
}
@ApiOperation(value = "检查价目表项", tags = {"价目表项" }, notes = "检查价目表项")
@RequestMapping(method = RequestMethod.POST, value = "/productpricelevels/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody ProductPriceLevelDTO productpriceleveldto) {
return ResponseEntity.status(HttpStatus.OK).body(productpricelevelService.checkKey(productpricelevelMapping.toDomain(productpriceleveldto)));
}
@PreAuthorize("hasPermission(this.productpricelevelMapping.toDomain(#productpriceleveldto),'iBizBusinessCentral-ProductPriceLevel-Save')")
@ApiOperation(value = "保存价目表项", tags = {"价目表项" }, notes = "保存价目表项")
@RequestMapping(method = RequestMethod.POST, value = "/productpricelevels/save")
public ResponseEntity<Boolean> save(@RequestBody ProductPriceLevelDTO productpriceleveldto) {
return ResponseEntity.status(HttpStatus.OK).body(productpricelevelService.save(productpricelevelMapping.toDomain(productpriceleveldto)));
}
@PreAuthorize("hasPermission(this.productpricelevelMapping.toDomain(#productpriceleveldtos),'iBizBusinessCentral-ProductPriceLevel-Save')")
@ApiOperation(value = "批量保存价目表项", tags = {"价目表项" }, notes = "批量保存价目表项")
@RequestMapping(method = RequestMethod.POST, value = "/productpricelevels/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<ProductPriceLevelDTO> productpriceleveldtos) {
productpricelevelService.saveBatch(productpricelevelMapping.toDomain(productpriceleveldtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-ProductPriceLevel-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-ProductPriceLevel-Get')")
@ApiOperation(value = "获取DEFAULT", tags = {"价目表项" } ,notes = "获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/productpricelevels/fetchdefault")
public ResponseEntity<List<ProductPriceLevelDTO>> fetchDefault(ProductPriceLevelSearchContext context) {
Page<ProductPriceLevel> domains = productpricelevelService.searchDefault(context) ;
List<ProductPriceLevelDTO> list = productpricelevelMapping.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-ProductPriceLevel-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-ProductPriceLevel-Get')")
@ApiOperation(value = "查询DEFAULT", tags = {"价目表项" } ,notes = "查询DEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/productpricelevels/searchdefault")
public ResponseEntity<Page<ProductPriceLevelDTO>> searchDefault(@RequestBody ProductPriceLevelSearchContext context) {
Page<ProductPriceLevel> domains = productpricelevelService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(productpricelevelMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册