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

xignzi006 发布系统代码

上级 3152952a
......@@ -989,6 +989,16 @@
"viewtag": "9475c40920701fcc382676d73832de4f",
"memo": ""
},
"uompickupgridview": {
"title": "计价单位选择表格视图",
"caption": "计价单位",
"viewtype": "DEPICKUPGRIDVIEW",
"viewmodule": "Base",
"viewname": "UomPickupGridView",
"viewfilename": "uom-pickup-grid-view",
"viewtag": "94d961edd298073d53ca3239c092fac4",
"memo": "系统自动添加"
},
"salesordersummaryview": {
"title": "订单数据看板视图",
"caption": "订单",
......@@ -1079,6 +1089,16 @@
"viewtag": "a1b44c891ef0bbc073c82693d8489de6",
"memo": ""
},
"productpickupgridview": {
"title": "产品选择表格视图",
"caption": "产品",
"viewtype": "DEPICKUPGRIDVIEW",
"viewmodule": "Product",
"viewname": "ProductPickupGridView",
"viewfilename": "product-pickup-grid-view",
"viewtag": "a1c97c8a22bb4e7af8a0a4f28a2a6a9b",
"memo": "系统自动添加"
},
"opportunityquickcreate": {
"title": "快速新建",
"caption": "快速新建",
......@@ -1289,6 +1309,16 @@
"viewtag": "b6b6215e439e78cdf6959b6f45bd7927",
"memo": "系统自动添加"
},
"productpickupview": {
"title": "产品数据选择视图",
"caption": "产品",
"viewtype": "DEPICKUPVIEW",
"viewmodule": "Product",
"viewname": "ProductPickupView",
"viewfilename": "product-pickup-view",
"viewtag": "ba34ee36c1d0de288403607e17e7eb3e",
"memo": "系统自动添加"
},
"activitypointerbyparentkey": {
"title": "活动",
"caption": "活动",
......@@ -1369,6 +1399,16 @@
"viewtag": "d1c35f3c52010e1428d7dc1a6bc82f63",
"memo": ""
},
"uompickupview": {
"title": "计价单位数据选择视图",
"caption": "计价单位",
"viewtype": "DEPICKUPVIEW",
"viewmodule": "Base",
"viewname": "UomPickupView",
"viewfilename": "uom-pickup-view",
"viewtag": "d3692664b9e2e150526e1ce4b969f15b",
"memo": "系统自动添加"
},
"campaigninfo": {
"title": "市场活动",
"caption": "市场活动",
......
......@@ -565,4 +565,12 @@ export interface SalesOrderDetail {
* @memberof SalesOrderDetail
*/
productname?: any;
/**
* 计价单位
*
* @returns {*}
* @memberof SalesOrderDetail
*/
uomname?: any;
}
\ No newline at end of file
/**
* 计价单位
*
* @export
* @interface Uom
*/
export interface Uom {
/**
* Record Created On
*
* @returns {*}
* @memberof Uom
*/
overriddencreatedon?: any;
/**
* BaseUoMName
*
* @returns {*}
* @memberof Uom
*/
baseuomname?: any;
/**
* 更新人
*
* @returns {*}
* @memberof Uom
*/
updateman?: any;
/**
* 建立人
*
* @returns {*}
* @memberof Uom
*/
createman?: any;
/**
* Version Number
*
* @returns {*}
* @memberof Uom
*/
versionnumber?: any;
/**
* 数量
*
* @returns {*}
* @memberof Uom
*/
quantity?: any;
/**
* 计价单位
*
* @returns {*}
* @memberof Uom
*/
uomid?: any;
/**
* 为计划基础单位
*
* @returns {*}
* @memberof Uom
*/
schedulebaseuom?: any;
/**
* 组织
*
* @returns {*}
* @memberof Uom
*/
organizationid?: any;
/**
* 建立时间
*
* @returns {*}
* @memberof Uom
*/
createdate?: any;
/**
* 更新时间
*
* @returns {*}
* @memberof Uom
*/
updatedate?: any;
/**
* 计量单位名称
*
* @returns {*}
* @memberof Uom
*/
uomname?: any;
/**
* UTC Conversion Time Zone Code
*
* @returns {*}
* @memberof Uom
*/
utcconversiontimezonecode?: any;
/**
* Time Zone Rule Version Number
*
* @returns {*}
* @memberof Uom
*/
timezoneruleversionnumber?: any;
/**
* Import Sequence Number
*
* @returns {*}
* @memberof Uom
*/
importsequencenumber?: any;
/**
* 单位计划
*
* @returns {*}
* @memberof Uom
*/
uomscheduleid?: any;
/**
* 基础单位
*
* @returns {*}
* @memberof Uom
*/
baseuom?: any;
}
\ No newline at end of file
......@@ -5,6 +5,7 @@ import letter_en_US from '@locale/lanres/entities/letter/letter_en_US';
import pricelevel_en_US from '@locale/lanres/entities/price-level/price-level_en_US';
import email_en_US from '@locale/lanres/entities/email/email_en_US';
import serviceappointment_en_US from '@locale/lanres/entities/service-appointment/service-appointment_en_US';
import uom_en_US from '@locale/lanres/entities/uom/uom_en_US';
import transactioncurrency_en_US from '@locale/lanres/entities/transaction-currency/transaction-currency_en_US';
import opportunity_en_US from '@locale/lanres/entities/opportunity/opportunity_en_US';
import goal_en_US from '@locale/lanres/entities/goal/goal_en_US';
......@@ -146,6 +147,7 @@ export default {
pricelevel: pricelevel_en_US,
email: email_en_US,
serviceappointment: serviceappointment_en_US,
uom: uom_en_US,
transactioncurrency: transactioncurrency_en_US,
opportunity: opportunity_en_US,
goal: goal_en_US,
......
......@@ -5,6 +5,7 @@ import letter_zh_CN from '@locale/lanres/entities/letter/letter_zh_CN';
import pricelevel_zh_CN from '@locale/lanres/entities/price-level/price-level_zh_CN';
import email_zh_CN from '@locale/lanres/entities/email/email_zh_CN';
import serviceappointment_zh_CN from '@locale/lanres/entities/service-appointment/service-appointment_zh_CN';
import uom_zh_CN from '@locale/lanres/entities/uom/uom_zh_CN';
import transactioncurrency_zh_CN from '@locale/lanres/entities/transaction-currency/transaction-currency_zh_CN';
import opportunity_zh_CN from '@locale/lanres/entities/opportunity/opportunity_zh_CN';
import goal_zh_CN from '@locale/lanres/entities/goal/goal_zh_CN';
......@@ -146,6 +147,7 @@ export default {
pricelevel: pricelevel_zh_CN,
email: email_zh_CN,
serviceappointment: serviceappointment_zh_CN,
uom: uom_zh_CN,
transactioncurrency: transactioncurrency_zh_CN,
opportunity: opportunity_zh_CN,
goal: goal_zh_CN,
......
......@@ -75,6 +75,10 @@ export default {
caption: "产品",
title: "产品数据看板视图",
},
pickupgridview: {
caption: "产品",
title: "产品选择表格视图",
},
edit_quickcreate: {
caption: "产品",
title: "产品选项操作视图",
......@@ -83,6 +87,10 @@ export default {
caption: "产品",
title: "产品表格视图",
},
pickupview: {
caption: "产品",
title: "产品数据选择视图",
},
},
proinfo_form: {
details: {
......
......@@ -74,6 +74,10 @@ export default {
caption: "产品",
title: "产品数据看板视图",
},
pickupgridview: {
caption: "产品",
title: "产品选择表格视图",
},
edit_quickcreate: {
caption: "产品",
title: "产品选项操作视图",
......@@ -82,6 +86,10 @@ export default {
caption: "产品",
title: "产品表格视图",
},
pickupview: {
caption: "产品",
title: "产品数据选择视图",
},
},
proinfo_form: {
details: {
......
......@@ -71,6 +71,7 @@ export default {
parentbundleidref: "Parent bundle product",
uomid: "计价单位",
productname: "产品名称",
uomname: "计价单位",
},
views: {
editview: {
......@@ -82,12 +83,10 @@ export default {
title: "订单产品表格视图",
},
},
main_form: {
soproductedit_form: {
details: {
group1: "salesorderdetail基本信息",
group1: "订单产品基本信息",
formpage1: "基本信息",
group2: "操作信息",
formpage2: "其它",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "订单产品",
......@@ -96,11 +95,14 @@ export default {
srfuf: "",
srfdeid: "",
srfsourcekey: "",
salesorderdetailname: "名称",
createman: "建立人",
createdate: "建立时间",
updateman: "更新人",
updatedate: "更新时间",
productname: "产品名称",
priceperunit: "单价",
quantity: "数量",
uomname: "计价单位",
manualdiscountamount: "零售折扣",
tax: "税",
productid: "现有产品",
uomid: "计价单位",
salesorderdetailid: "订单产品",
},
uiactions: {
......@@ -156,41 +158,13 @@ export default {
},
},
editviewtoolbar_toolbar: {
tbitem3: {
caption: "Save",
tip: "Save",
},
tbitem4: {
caption: "Save And New",
tip: "Save And New",
},
tbitem5: {
tbitem1: {
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}",
tbitem2: {
caption: "关闭",
tip: "关闭",
},
},
};
......@@ -70,6 +70,7 @@ export default {
parentbundleidref: "Parent bundle product",
uomid: "计价单位",
productname: "产品名称",
uomname: "计价单位",
},
views: {
editview: {
......@@ -81,12 +82,10 @@ export default {
title: "订单产品表格视图",
},
},
main_form: {
soproductedit_form: {
details: {
group1: "salesorderdetail基本信息",
group1: "订单产品基本信息",
formpage1: "基本信息",
group2: "操作信息",
formpage2: "其它",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "订单产品",
......@@ -95,11 +94,14 @@ export default {
srfuf: "",
srfdeid: "",
srfsourcekey: "",
salesorderdetailname: "名称",
createman: "建立人",
createdate: "建立时间",
updateman: "更新人",
updatedate: "更新时间",
productname: "产品名称",
priceperunit: "单价",
quantity: "数量",
uomname: "计价单位",
manualdiscountamount: "零售折扣",
tax: "税",
productid: "现有产品",
uomid: "计价单位",
salesorderdetailid: "订单产品",
},
uiactions: {
......@@ -155,41 +157,13 @@ export default {
},
},
editviewtoolbar_toolbar: {
tbitem3: {
caption: "保存",
tip: "保存",
},
tbitem4: {
caption: "保存并新建",
tip: "保存并新建",
},
tbitem5: {
tbitem1: {
caption: "保存并关闭",
tip: "保存并关闭",
},
tbitem6: {
caption: "-",
tip: "",
},
tbitem7: {
caption: "删除并关闭",
tip: "删除并关闭",
},
tbitem8: {
caption: "-",
tip: "",
},
tbitem12: {
caption: "新建",
tip: "新建",
},
tbitem13: {
caption: "-",
tip: "",
},
tbitem14: {
caption: "拷贝",
tip: "拷贝",
tbitem2: {
caption: "关闭",
tip: "关闭",
},
},
};
\ No newline at end of file
......@@ -158,6 +158,7 @@ export default {
details: {
group1: "基本信息",
grouppanel1: "详细信息",
grouppanel4: "订单金额",
grouppanel3: "销售信息",
grouppanel2: "帐单地址",
formpage1: "基本信息",
......@@ -178,6 +179,12 @@ export default {
paymenttermscode: "付款条件",
freighttermscode: "货运条款",
description: "说明",
totallineitemamount: "明细金额总计",
discountpercentage: "订单折扣(%)",
discountamount: "订单折扣金额",
totalamountlessfreight: "折后金额总计",
freightamount: "运费金额",
totalamount: "总金额",
opportunityname: "商机",
quotename: "报价单",
customerid: "客户",
......
......@@ -157,6 +157,7 @@ export default {
details: {
group1: "基本信息",
grouppanel1: "详细信息",
grouppanel4: "订单金额",
grouppanel3: "销售信息",
grouppanel2: "帐单地址",
formpage1: "基本信息",
......@@ -177,6 +178,12 @@ export default {
paymenttermscode: "付款条件",
freighttermscode: "货运条款",
description: "说明",
totallineitemamount: "明细金额总计",
discountpercentage: "订单折扣(%)",
discountamount: "订单折扣金额",
totalamountlessfreight: "折后金额总计",
freightamount: "运费金额",
totalamount: "总金额",
opportunityname: "商机",
quotename: "报价单",
customerid: "客户",
......
export default {
fields: {
overriddencreatedon: "Record Created On",
baseuomname: "BaseUoMName",
updateman: "更新人",
createman: "建立人",
versionnumber: "Version Number",
quantity: "数量",
uomid: "计价单位",
schedulebaseuom: "为计划基础单位",
organizationid: "组织",
createdate: "建立时间",
updatedate: "更新时间",
uomname: "计量单位名称",
utcconversiontimezonecode: "UTC Conversion Time Zone Code",
timezoneruleversionnumber: "Time Zone Rule Version Number",
importsequencenumber: "Import Sequence Number",
uomscheduleid: "单位计划",
baseuom: "基础单位",
},
views: {
pickupgridview: {
caption: "计价单位",
title: "计价单位选择表格视图",
},
pickupview: {
caption: "计价单位",
title: "计价单位数据选择视图",
},
},
main_grid: {
columns: {
uomname: "计量单位名称",
updateman: "更新人",
updatedate: "更新时间",
},
uiactions: {
},
},
default_searchform: {
details: {
formpage1: "常规条件",
},
uiactions: {
},
},
};
export default {
fields: {
overriddencreatedon: "Record Created On",
baseuomname: "BaseUoMName",
updateman: "更新人",
createman: "建立人",
versionnumber: "Version Number",
quantity: "数量",
uomid: "计价单位",
schedulebaseuom: "为计划基础单位",
organizationid: "组织",
createdate: "建立时间",
updatedate: "更新时间",
uomname: "计量单位名称",
utcconversiontimezonecode: "UTC Conversion Time Zone Code",
timezoneruleversionnumber: "Time Zone Rule Version Number",
importsequencenumber: "Import Sequence Number",
uomscheduleid: "单位计划",
baseuom: "基础单位",
},
views: {
pickupgridview: {
caption: "计价单位",
title: "计价单位选择表格视图",
},
pickupview: {
caption: "计价单位",
title: "计价单位数据选择视图",
},
},
main_grid: {
columns: {
uomname: "计量单位名称",
updateman: "更新人",
updatedate: "更新时间",
},
uiactions: {
},
},
default_searchform: {
details: {
formpage1: "常规条件",
},
uiactions: {
},
},
};
\ No newline at end of file
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\/uoms\/[a-zA-Z0-9\-\;]+\/usertasks\/[a-zA-Z0-9\-\;]+\/ways$/)).reply((config: any) => {
console.groupCollapsed("实体:uom 方法: 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\/uoms\/process-definitions-nodes$/)).reply((config: any) => {
console.groupCollapsed("实体:uom 方法: 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(/^\/uoms\/batch$/)).reply((config: any) => {
console.groupCollapsed("实体:uom 方法: 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(/^\/uoms\/batch$/)).reply((config: any) => {
console.groupCollapsed("实体:uom 方法: 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(/^\/uoms\/batch$/)).reply((config: any) => {
console.groupCollapsed("实体:uom 方法: 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(/^\/uoms\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:uom 方法: 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> = ['uomid'];
const matchArray:any = new RegExp(/^\/uoms\/([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.uomid, tempValue.uomid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.groupEnd();
console.groupEnd();
return [status, _items];
});
// GetDraft
mock.onGet(new RegExp(/^\/uoms\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:uom 方法: 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, {}];
});
// Save
mock.onPost(new RegExp(/^\/uoms\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:uom 方法: 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> = ['uomid'];
const matchArray:any = new RegExp(/^\/uoms\/([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.uomid, tempValue.uomid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['uomid'] == tempValue['uomid'] ){
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];
});
// Create
mock.onPost(new RegExp(/^\/uoms\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:uom 方法: 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> = ['uomid'];
const matchArray:any = new RegExp(/^\/uoms\/([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]];
});
// CheckKey
mock.onPost(new RegExp(/^\/uoms\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:uom 方法: 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> = ['uomid'];
const matchArray:any = new RegExp(/^\/uoms\/([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.uomid, tempValue.uomid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['uomid'] == tempValue['uomid'] ){
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];
});
// Update
mock.onPut(new RegExp(/^\/uoms\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:uom 方法: 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> = ['uomid'];
const matchArray:any = new RegExp(/^\/uoms\/([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.uomid, tempValue.uomid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['uomid'] == tempValue['uomid'] ){
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(/^\/uoms\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:uom 方法: 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(/^\/uoms\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:uom 方法: 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参数传递情况未实现
// Get
mock.onGet(new RegExp(/^\/uoms\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:uom 方法: 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> = ['uomid'];
const matchArray:any = new RegExp(/^\/uoms\/([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.uomid, tempValue.uomid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Remove
mock.onDelete(new RegExp(/^\/uoms\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:uom 方法: 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> = ['uomid'];
const matchArray:any = new RegExp(/^\/uoms\/([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.uomid, tempValue.uomid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
......@@ -14,6 +14,7 @@ import './entity/letters/letters';
import './entity/price-levels/price-levels';
import './entity/emails/emails';
import './entity/service-appointments/service-appointments';
import './entity/uoms/uoms';
import './entity/transaction-currencys/transaction-currencys';
import './entity/opportunitys/opportunitys';
import './entity/goals/goals';
......
......@@ -799,6 +799,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "ContactInfo_Address",
"viewtag": "9475c40920701fcc382676d73832de4f"
},
"uompickupgridview": {
"title": "计价单位选择表格视图",
"caption": "计价单位",
"viewtype": "DEPICKUPGRIDVIEW",
"viewmodule": "Base",
"viewname": "UomPickupGridView",
"viewtag": "94d961edd298073d53ca3239c092fac4"
},
"salesordersummaryview": {
"title": "订单数据看板视图",
"caption": "订单",
......@@ -871,6 +879,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "ListAccountQuickCreateByList",
"viewtag": "a1b44c891ef0bbc073c82693d8489de6"
},
"productpickupgridview": {
"title": "产品选择表格视图",
"caption": "产品",
"viewtype": "DEPICKUPGRIDVIEW",
"viewmodule": "Product",
"viewname": "ProductPickupGridView",
"viewtag": "a1c97c8a22bb4e7af8a0a4f28a2a6a9b"
},
"opportunityquickcreate": {
"title": "快速新建",
"caption": "快速新建",
......@@ -1039,6 +1055,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "ContactPickupView",
"viewtag": "b6b6215e439e78cdf6959b6f45bd7927"
},
"productpickupview": {
"title": "产品数据选择视图",
"caption": "产品",
"viewtype": "DEPICKUPVIEW",
"viewmodule": "Product",
"viewname": "ProductPickupView",
"viewtag": "ba34ee36c1d0de288403607e17e7eb3e"
},
"activitypointerbyparentkey": {
"title": "活动",
"caption": "活动",
......@@ -1103,6 +1127,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "CompetitorGridView",
"viewtag": "d1c35f3c52010e1428d7dc1a6bc82f63"
},
"uompickupview": {
"title": "计价单位数据选择视图",
"caption": "计价单位",
"viewtype": "DEPICKUPVIEW",
"viewmodule": "Base",
"viewname": "UomPickupView",
"viewtag": "d3692664b9e2e150526e1ce4b969f15b"
},
"campaigninfo": {
"title": "市场活动",
"caption": "市场活动",
......
......@@ -63,20 +63,9 @@ export class SalesOrderDetailEditViewBase extends EditViewBase {
* @memberof SalesOrderDetailEditView
*/
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: '' },
tbitem1: { name: 'tbitem1', caption: '保存并关闭','isShowCaption':true,'isShowIcon':true, tooltip: '保存并关闭', iconcls: 'fa fa-power-off', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'SaveAndExit', target: '' }, class: '' },
tbitem4: { name: 'tbitem4', caption: '保存并新建','isShowCaption':true,'isShowIcon':true, tooltip: '保存并新建', iconcls: 'sx-tb-saveandnew', icon: '../sasrfex/images/default/icon_saveandnew.png', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'SaveAndNew', target: '' }, 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: '' },
tbitem6: { name: 'tbitem6', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem7: { name: 'tbitem7', caption: '删除并关闭','isShowCaption':true,'isShowIcon':true, tooltip: '删除并关闭', iconcls: 'fa fa-remove', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'RemoveAndExit', target: 'SINGLEKEY' }, class: '' },
tbitem8: { name: 'tbitem8', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem12: { name: 'tbitem12', caption: '新建','isShowCaption':true,'isShowIcon':true, tooltip: '新建', iconcls: 'fa fa-file-text-o', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'New', target: '' }, class: '' },
tbitem13: { name: 'tbitem13', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem14: { name: 'tbitem14', caption: '拷贝','isShowCaption':true,'isShowIcon':true, tooltip: '拷贝', iconcls: 'fa fa-copy', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Copy', target: 'SINGLEKEY' }, class: '' },
tbitem2: { name: 'tbitem2', caption: '关闭','isShowCaption':true,'isShowIcon':true, tooltip: '关闭', iconcls: 'fa fa-sign-out', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Exit', target: '' }, class: '' },
};
......@@ -126,32 +115,11 @@ export class SalesOrderDetailEditViewBase extends EditViewBase {
* @memberof SalesOrderDetailEditViewBase
*/
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, 'tbitem4')) {
this.toolbar_tbitem4_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem5')) {
this.toolbar_tbitem5_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem7')) {
this.toolbar_tbitem7_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem9')) {
this.toolbar_tbitem9_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem10')) {
this.toolbar_tbitem10_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem12')) {
this.toolbar_tbitem12_click(null, '', $event2);
if (Object.is($event.tag, 'tbitem1')) {
this.toolbar_tbitem1_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem14')) {
this.toolbar_tbitem14_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem15')) {
this.toolbar_tbitem15_click(null, '', $event2);
if (Object.is($event.tag, 'tbitem2')) {
this.toolbar_tbitem2_click(null, '', $event2);
}
}
......@@ -196,63 +164,7 @@ export class SalesOrderDetailEditViewBase extends EditViewBase {
* @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 = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Save(datas, contextJO,paramJO, $event, xData,this,"SalesOrderDetail");
}
/**
* 逻辑事件
*
* @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.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.SaveAndNew(datas, contextJO,paramJO, $event, xData,this,"SalesOrderDetail");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem5_click(params: any = {}, tag?: any, $event?: any) {
public toolbar_tbitem1_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
......@@ -280,7 +192,7 @@ export class SalesOrderDetailEditViewBase extends EditViewBase {
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem7_click(params: any = {}, tag?: any, $event?: any) {
public toolbar_tbitem2_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
......@@ -297,202 +209,9 @@ export class SalesOrderDetailEditViewBase extends EditViewBase {
datas = [params];
}
// 界面行为
this.RemoveAndExit(datas, contextJO,paramJO, $event, xData,this,"SalesOrderDetail");
this.Exit(datas, contextJO,paramJO, $event, xData,this,"SalesOrderDetail");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem9_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.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.SaveAndStart(datas, contextJO,paramJO, $event, xData,this,"SalesOrderDetail");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem10_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.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ViewWFStep(datas, contextJO,paramJO, $event, xData,this,"SalesOrderDetail");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem12_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.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.New(datas, contextJO,paramJO, $event, xData,this,"SalesOrderDetail");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem14_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.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Copy(datas, contextJO,paramJO, $event, xData,this,"SalesOrderDetail");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem15_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.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Print(datas, contextJO,paramJO, $event, xData,this,"SalesOrderDetail");
}
/**
* 保存
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof SalesOrderDetailEditViewBase
*/
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 {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof SalesOrderDetailEditViewBase
*/
public SaveAndNew(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.saveAndNew instanceof Function)) {
return;
}
xData.saveAndNew().then((response: any) => {
if (!response || response.status !== 200) {
_this.$emit('viewdataschange', JSON.stringify({status:'error',action:'saveAndNew'}));
return;
}
_this.$emit('viewdataschange', JSON.stringify({status:'success',action:'saveAndNew',data:response.data}));
if (xData.autoLoad instanceof Function) {
xData.autoLoad();
}
});
}
/**
* 保存并关闭
*
......@@ -527,40 +246,7 @@ export class SalesOrderDetailEditViewBase extends EditViewBase {
}
}
/**
* 删除并关闭
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof SalesOrderDetailEditViewBase
*/
public RemoveAndExit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (xData && xData.removeAndExit instanceof Function) {
xData.removeAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
} else if (_this.removeAndExit && _this.removeAndExit instanceof Function) {
_this.removeAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
}
}
/**
* 开始流程
* 关闭
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
......@@ -570,126 +256,12 @@ export class SalesOrderDetailEditViewBase extends EditViewBase {
* @param {*} [actionContext] 执行行为上下文
* @memberof SalesOrderDetailEditViewBase
*/
public SaveAndStart(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.wfstart instanceof Function)) {
return;
public Exit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
this.closeView(args);
if(window.parent){
window.parent.postMessage([{ ...args }],'*');
}
xData.wfstart(args).then((response: any) => {
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
if(window.parent){
window.parent.postMessage({ ..._data },'*');
}
if (_this.viewdata) {
_this.$emit('viewdataschange', [{ ..._data }]);
_this.$emit('close');
}else if (this.$tabPageExp) {
this.$tabPageExp.onClose(this.$route.fullPath);
}
});
}
/**
* 当前流程步骤
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof SalesOrderDetailEditViewBase
*/
public ViewWFStep(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let _this:any = this;
if (!xData || !(xData.wfsubmit instanceof Function)) {
return;
}
xData.wfsubmit(args).then((response: any) => {
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
if (_this.viewdata) {
_this.$emit('viewdataschange', [{ ..._data }]);
_this.$emit('close');
} else if (_this.$tabPageExp) {
_this.$tabPageExp.onClose(_this.$route.fullPath);
}
});
}
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof SalesOrderDetailEditViewBase
*/
public New(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
_this.newdata([{ ...data }],[{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' });
}
}
/**
* 拷贝
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof SalesOrderDetailEditViewBase
*/
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 SalesOrderDetailEditViewBase
*/
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();
}
}
\ No newline at end of file
......@@ -3,7 +3,7 @@
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { SalesOrderDetailEditViewBase } from './sales-order-detail-edit-view-base';
import view_form from '@widgets/sales-order-detail/main-form/main-form.vue';
import view_form from '@widgets/sales-order-detail/soproduct-edit-form/soproduct-edit-form.vue';
/**
* 订单产品编辑视图视图
......
......@@ -8,6 +8,7 @@ export const PageComponents = {
Vue.component('account-edit-view', () => import('@pages/base/account-edit-view/account-edit-view.vue'));
Vue.component('lead-pickup-view', () => import('@pages/sales/lead-pickup-view/lead-pickup-view.vue'));
Vue.component('incident-edit-view', () => import('@pages/service/incident-edit-view/incident-edit-view.vue'));
Vue.component('product-pickup-view', () => import('@pages/product/product-pickup-view/product-pickup-view.vue'));
Vue.component('quote-info-abstract', () => import('@pages/sales/quote-info-abstract/quote-info-abstract.vue'));
Vue.component('contact-info-book', () => import('@pages/base/contact-info-book/contact-info-book.vue'));
Vue.component('centeral-portal', () => import('@pages/ungroup/centeral-portal/centeral-portal.vue'));
......@@ -93,6 +94,7 @@ export const PageComponents = {
Vue.component('activity-pointer-grid-view', () => import('@pages/base/activity-pointer-grid-view/activity-pointer-grid-view.vue'));
Vue.component('campaign-activity-by-parent-key', () => import('@pages/marketing/campaign-activity-by-parent-key/campaign-activity-by-parent-key.vue'));
Vue.component('account-pickup-view', () => import('@pages/base/account-pickup-view/account-pickup-view.vue'));
Vue.component('uom-pickup-grid-view', () => import('@pages/base/uom-pickup-grid-view/uom-pickup-grid-view.vue'));
Vue.component('price-level-pickup-grid-view', () => import('@pages/product/price-level-pickup-grid-view/price-level-pickup-grid-view.vue'));
Vue.component('quote-opp-qua-grid-view', () => import('@pages/sales/quote-opp-qua-grid-view/quote-opp-qua-grid-view.vue'));
Vue.component('contact-by-account', () => import('@pages/base/contact-by-account/contact-by-account.vue'));
......@@ -106,6 +108,7 @@ export const PageComponents = {
Vue.component('competitor-info', () => import('@pages/sales/competitor-info/competitor-info.vue'));
Vue.component('account-pickup-grid-view', () => import('@pages/base/account-pickup-grid-view/account-pickup-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'));
Vue.component('list-lead-quick-create-by-list', () => import('@pages/marketing/list-lead-quick-create-by-list/list-lead-quick-create-by-list.vue'));
Vue.component('account-info', () => import('@pages/base/account-info/account-info.vue'));
Vue.component('lead-info-detail', () => import('@pages/sales/lead-info-detail/lead-info-detail.vue'));
......@@ -115,6 +118,7 @@ export const PageComponents = {
Vue.component('sales-order-info-soview', () => import('@pages/sales/sales-order-info-soview/sales-order-info-soview.vue'));
Vue.component('activity-pointer-by-parent-key', () => import('@pages/base/activity-pointer-by-parent-key/activity-pointer-by-parent-key.vue'));
Vue.component('contact-edit-abstract', () => import('@pages/base/contact-edit-abstract/contact-edit-abstract.vue'));
Vue.component('uom-pickup-view', () => import('@pages/base/uom-pickup-view/uom-pickup-view.vue'));
Vue.component('list-account-inner', () => import('@pages/marketing/list-account-inner/list-account-inner.vue'));
Vue.component('contact-summary', () => import('@pages/base/contact-summary/contact-summary.vue'));
Vue.component('task-edit-view', () => import('@pages/base/task-edit-view/task-edit-view.vue'));
......
......@@ -223,6 +223,20 @@ const router = new Router({
},
component: () => import('@pages/service/incident-edit-view/incident-edit-view.vue'),
},
{
path: 'products/:product?/pickupview/:pickupview?',
meta: {
caption: 'entities.product.views.pickupview.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'products', parameterName: 'product' },
{ pathName: 'pickupview', parameterName: 'pickupview' },
],
requireAuth: true,
},
component: () => import('@pages/product/product-pickup-view/product-pickup-view.vue'),
},
{
path: 'accounts/:account?/contacts/:contact?/opportunities/:opportunity?/quotes/:quote?/infoabstract/:infoabstract?',
meta: {
......@@ -2929,6 +2943,20 @@ const router = new Router({
},
component: () => import('@pages/base/account-pickup-view/account-pickup-view.vue'),
},
{
path: 'uoms/:uom?/pickupgridview/:pickupgridview?',
meta: {
caption: 'entities.uom.views.pickupgridview.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'uoms', parameterName: 'uom' },
{ pathName: 'pickupgridview', parameterName: 'pickupgridview' },
],
requireAuth: true,
},
component: () => import('@pages/base/uom-pickup-grid-view/uom-pickup-grid-view.vue'),
},
{
path: 'pricelevels/:pricelevel?/pickupgridview/:pickupgridview?',
meta: {
......@@ -3447,6 +3475,20 @@ const router = new Router({
},
component: () => import('@pages/sales/lead-info/lead-info.vue'),
},
{
path: 'products/:product?/pickupgridview/:pickupgridview?',
meta: {
caption: 'entities.product.views.pickupgridview.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'products', parameterName: 'product' },
{ pathName: 'pickupgridview', parameterName: 'pickupgridview' },
],
requireAuth: true,
},
component: () => import('@pages/product/product-pickup-grid-view/product-pickup-grid-view.vue'),
},
{
path: 'accounts/:account?/contacts/:contact?/leads/:lead?/listleads/:listlead?/quickcreatebylist/:quickcreatebylist?',
meta: {
......@@ -3864,6 +3906,20 @@ const router = new Router({
},
component: () => import('@pages/base/account-inner-pickup-grid-view/account-inner-pickup-grid-view.vue'),
},
{
path: 'uoms/:uom?/pickupview/:pickupview?',
meta: {
caption: 'entities.uom.views.pickupview.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'uoms', parameterName: 'uom' },
{ pathName: 'pickupview', parameterName: 'pickupview' },
],
requireAuth: true,
},
component: () => import('@pages/base/uom-pickup-view/uom-pickup-view.vue'),
},
{
path: 'accounts/:account?/edit_introduction/:edit_introduction?',
meta: {
......
......@@ -46,6 +46,7 @@ export class EntityServiceRegister {
this.allEntityService.set('pricelevel', () => import('@/service/price-level/price-level-service'));
this.allEntityService.set('email', () => import('@/service/email/email-service'));
this.allEntityService.set('serviceappointment', () => import('@/service/service-appointment/service-appointment-service'));
this.allEntityService.set('uom', () => import('@/service/uom/uom-service'));
this.allEntityService.set('transactioncurrency', () => import('@/service/transaction-currency/transaction-currency-service'));
this.allEntityService.set('opportunity', () => import('@/service/opportunity/opportunity-service'));
this.allEntityService.set('goal', () => import('@/service/goal/goal-service'));
......
import { Http,Util } from '@/utils';
import EntityService from '../entity-service';
/**
* 计价单位服务对象基类
*
* @export
* @class UomServiceBase
* @extends {EntityServie}
*/
export default class UomServiceBase extends EntityService {
/**
* Creates an instance of UomServiceBase.
*
* @param {*} [opts={}]
* @memberof UomServiceBase
*/
constructor(opts: any = {}) {
super(opts);
}
/**
* 初始化基础数据
*
* @memberof UomServiceBase
*/
public initBasicData(){
this.APPLYDEKEY ='uom';
this.APPDEKEY = 'uomid';
this.APPDENAME = 'uoms';
this.APPDETEXT = 'uomname';
this.APPNAME = 'crm';
this.SYSTEMNAME = 'ibizbusinesscentral';
}
// 实体接口
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof UomServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().get(`/uoms/${context.uom}/select`,isloading);
}
/**
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof UomServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/uoms/getdraft`,isloading);
res.data.uom = data.uom;
return res;
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof UomServiceBase
*/
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(`/uoms/${context.uom}/save`,data,isloading);
return res;
}
/**
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof UomServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/uoms/${context.uom}`,isloading);
return res;
}
/**
* Create接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof UomServiceBase
*/
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(`/uoms`,data,isloading);
return res;
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof UomServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().post(`/uoms/${context.uom}/checkkey`,data,isloading);
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof UomServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().delete(`/uoms/${context.uom}`,isloading);
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof UomServiceBase
*/
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(`/uoms/${context.uom}`,data,isloading);
return res;
}
/**
* FetchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof UomServiceBase
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/uoms/fetchdefault`,tempData,isloading);
}
}
\ No newline at end of file
import { Http,Util } from '@/utils';
import UomServiceBase from './uom-service-base';
/**
* 计价单位服务对象
*
* @export
* @class UomService
* @extends {UomServiceBase}
*/
export default class UomService extends UomServiceBase {
/**
* Creates an instance of UomService.
*
* @param {*} [opts={}]
* @memberof UomService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
......@@ -1107,6 +1107,8 @@ export const viewstate: any = {
viewaction: '',
viewdatachange: false,
refviews: [
'ba34ee36c1d0de288403607e17e7eb3e',
'd3692664b9e2e150526e1ce4b969f15b',
],
},
{
......
......@@ -82,8 +82,10 @@ export default class ProductUIServiceBase extends UIService {
this.allViewMap.set(':',{viewname:'info_proinfo',srfappde:'products'});
this.allViewMap.set('EDITVIEW:',{viewname:'editview',srfappde:'products'});
this.allViewMap.set(':',{viewname:'dashboard_proinfo',srfappde:'products'});
this.allViewMap.set(':',{viewname:'pickupgridview',srfappde:'products'});
this.allViewMap.set(':',{viewname:'edit_quickcreate',srfappde:'products'});
this.allViewMap.set('MDATAVIEW:',{viewname:'gridview',srfappde:'products'});
this.allViewMap.set('PICKUPVIEW:',{viewname:'pickupview',srfappde:'products'});
}
/**
......
......@@ -46,6 +46,7 @@ export class UIServiceRegister {
this.allUIService.set('pricelevel', () => import('@/uiservice/price-level/price-level-ui-service'));
this.allUIService.set('email', () => import('@/uiservice/email/email-ui-service'));
this.allUIService.set('serviceappointment', () => import('@/uiservice/service-appointment/service-appointment-ui-service'));
this.allUIService.set('uom', () => import('@/uiservice/uom/uom-ui-service'));
this.allUIService.set('transactioncurrency', () => import('@/uiservice/transaction-currency/transaction-currency-ui-service'));
this.allUIService.set('opportunity', () => import('@/uiservice/opportunity/opportunity-ui-service'));
this.allUIService.set('goal', () => import('@/uiservice/goal/goal-ui-service'));
......
import { Environment } from '@/environments/environment';
import { UIActionTool,Util } from '@/utils';
import UIService from '../ui-service';
import { Subject } from 'rxjs';
import UomService from '@/service/uom/uom-service';
/**
* 计价单位UI服务对象基类
*
* @export
* @class UomUIServiceBase
*/
export default class UomUIServiceBase extends UIService {
/**
* 是否支持工作流
*
* @memberof UomUIServiceBase
*/
public isEnableWorkflow:boolean = false;
/**
* 当前UI服务对应的数据服务对象
*
* @memberof UomUIServiceBase
*/
public dataService:UomService = new UomService();
/**
* 所有关联视图
*
* @memberof UomUIServiceBase
*/
public allViewMap: Map<string, Object> = new Map();
/**
* 状态值
*
* @memberof UomUIServiceBase
*/
public stateValue: number = 0;
/**
* 状态属性
*
* @memberof UomUIServiceBase
*/
public stateField: string = "";
/**
* 主状态属性集合
*
* @memberof UomUIServiceBase
*/
public mainStateFields:Array<any> = [];
/**
* 主状态集合Map
*
* @memberof UomUIServiceBase
*/
public allDeMainStateMap:Map<string,string> = new Map();
/**
* Creates an instance of UomUIServiceBase.
*
* @param {*} [opts={}]
* @memberof UomUIServiceBase
*/
constructor(opts: any = {}) {
super(opts);
this.initViewMap();
this.initDeMainStateMap();
}
/**
* 初始化视图Map
*
* @memberof UomUIServiceBase
*/
public initViewMap(){
this.allViewMap.set(':',{viewname:'pickupgridview',srfappde:'uoms'});
this.allViewMap.set('PICKUPVIEW:',{viewname:'pickupview',srfappde:'uoms'});
}
/**
* 初始化主状态集合
*
* @memberof UomUIServiceBase
*/
public initDeMainStateMap(){
}
/**
* 获取指定数据的重定向页面
*
* @param srfkey 数据主键
* @param isEnableWorkflow 重定向视图是否需要处理流程中的数据
* @memberof UomUIServiceBase
*/
public async getRDAppView(srfkey:string,isEnableWorkflow:boolean){
this.isEnableWorkflow = isEnableWorkflow;
// 进行数据查询
let result:any = await this.dataService.Get({uom: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 UomUIServiceBase
*/
public getRealDEType(entity:any){
}
/**
* 获取实体单数据实体视图预定义参数
*
* @param curData 当前数据
* @param bDataInWF 是否有数据在工作流中
* @param bWFMode 是否工作流模式
* @memberof UomUIServiceBase
*/
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 UomUIServiceBase
*/
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 UomUIServiceBase from './uom-ui-service-base';
/**
* 计价单位UI服务对象
*
* @export
* @class UomUIService
*/
export default class UomUIService extends UomUIServiceBase {
/**
* Creates an instance of UomUIService.
*
* @param {*} [opts={}]
* @memberof UomUIService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, EditFormControlBase } from '@/studio-core';
import SalesOrderDetailService from '@/service/sales-order-detail/sales-order-detail-service';
import SOProductEditService from './soproduct-edit-form-service';
import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail';
/**
* form部件基类
*
* @export
* @class EditFormControlBase
* @extends {SOProductEditEditFormBase}
*/
export class SOProductEditEditFormBase extends EditFormControlBase {
/**
* 建构部件服务对象
*
* @type {SOProductEditService}
* @memberof SOProductEditEditFormBase
*/
public service: SOProductEditService = new SOProductEditService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {SalesOrderDetailService}
* @memberof SOProductEditEditFormBase
*/
public appEntityService: SalesOrderDetailService = new SalesOrderDetailService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof SOProductEditEditFormBase
*/
protected appDeName: string = 'salesorderdetail';
/**
* 表单数据对象
*
* @type {*}
* @memberof SOProductEditEditFormBase
*/
public data: any = {
srfupdatedate: null,
srforikey: null,
srfkey: null,
srfmajortext: null,
srftempmode: null,
srfuf: null,
srfdeid: null,
srfsourcekey: null,
productname: null,
priceperunit: null,
quantity: null,
uomname: null,
manualdiscountamount: null,
tax: null,
productid: null,
uomid: null,
salesorderdetailid: null,
salesorderdetail:null,
};
/**
* 属性值规则
*
* @type {*}
* @memberof SOProductEditEditFormBase
*/
public rules: any = {
srfupdatedate: [
{ required: false, type: 'string', message: '更新时间 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '更新时间 值不能为空', trigger: 'blur' },
],
srforikey: [
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'blur' },
],
srfkey: [
{ required: false, type: 'string', message: '订单产品 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '订单产品 值不能为空', trigger: 'blur' },
],
srfmajortext: [
{ required: false, type: 'string', message: '名称 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '名称 值不能为空', trigger: 'blur' },
],
srftempmode: [
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'blur' },
],
srfuf: [
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'blur' },
],
srfdeid: [
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'blur' },
],
srfsourcekey: [
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'blur' },
],
productname: [
{ required: false, type: 'string', message: '产品名称 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '产品名称 值不能为空', trigger: 'blur' },
],
priceperunit: [
{ required: false, type: 'number', message: '单价 值不能为空', trigger: 'change' },
{ required: false, type: 'number', message: '单价 值不能为空', trigger: 'blur' },
],
quantity: [
{ required: true, type: 'number', message: '数量 值不能为空', trigger: 'change' },
{ required: true, type: 'number', message: '数量 值不能为空', trigger: 'blur' },
],
uomname: [
{ required: false, type: 'string', message: '计价单位 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '计价单位 值不能为空', trigger: 'blur' },
],
manualdiscountamount: [
{ required: false, type: 'number', message: '零售折扣 值不能为空', trigger: 'change' },
{ required: false, type: 'number', message: '零售折扣 值不能为空', trigger: 'blur' },
],
tax: [
{ required: false, type: 'number', message: '税 值不能为空', trigger: 'change' },
{ required: false, type: 'number', message: '税 值不能为空', trigger: 'blur' },
],
productid: [
{ required: false, type: 'string', message: '现有产品 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '现有产品 值不能为空', trigger: 'blur' },
],
uomid: [
{ required: false, type: 'string', message: '计价单位 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '计价单位 值不能为空', trigger: 'blur' },
],
salesorderdetailid: [
{ required: false, type: 'string', message: '订单产品 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '订单产品 值不能为空', trigger: 'blur' },
],
}
/**
* 详情模型集合
*
* @type {*}
* @memberof SOProductEditEditFormBase
*/
public detailsModel: any = {
group1: new FormGroupPanelModel({ caption: '订单产品基本信息', detailType: 'GROUPPANEL', name: 'group1', visible: true, isShowCaption: false, form: this, uiActionGroup: { caption: '', langbase: 'entities.salesorderdetail.soproductedit_form', extractMode: 'ITEM', details: [] } }),
formpage1: new FormPageModel({ caption: '基本信息', detailType: 'FORMPAGE', name: 'formpage1', visible: true, isShowCaption: true, form: this }),
srfupdatedate: new FormItemModel({ caption: '更新时间', detailType: 'FORMITEM', name: 'srfupdatedate', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 0 }),
srforikey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srforikey', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srfkey: new FormItemModel({ caption: '订单产品', detailType: 'FORMITEM', name: 'srfkey', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 1 }),
srfmajortext: new FormItemModel({ caption: '名称', detailType: 'FORMITEM', name: 'srfmajortext', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srftempmode: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srftempmode', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srfuf: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfuf', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srfdeid: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfdeid', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srfsourcekey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfsourcekey', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
productname: new FormItemModel({ caption: '产品名称', detailType: 'FORMITEM', name: 'productname', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
priceperunit: new FormItemModel({ caption: '单价', detailType: 'FORMITEM', name: 'priceperunit', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
quantity: new FormItemModel({ caption: '数量', detailType: 'FORMITEM', name: 'quantity', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
uomname: new FormItemModel({ caption: '计价单位', detailType: 'FORMITEM', name: 'uomname', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
manualdiscountamount: new FormItemModel({ caption: '零售折扣', detailType: 'FORMITEM', name: 'manualdiscountamount', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
tax: new FormItemModel({ caption: '税', detailType: 'FORMITEM', name: 'tax', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
productid: new FormItemModel({ caption: '现有产品', detailType: 'FORMITEM', name: 'productid', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
uomid: new FormItemModel({ caption: '计价单位', detailType: 'FORMITEM', name: 'uomid', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
salesorderdetailid: new FormItemModel({ caption: '订单产品', detailType: 'FORMITEM', name: 'salesorderdetailid', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 1 }),
};
}
\ No newline at end of file
/**
* SOProductEdit 部件模型
*
* @export
* @class SOProductEditModel
*/
export default class SOProductEditModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof SOProductEditModel
*/
public getDataItems(): any[] {
return [
{
name: 'srfwfmemo',
prop: 'srfwfmemo',
dataType: 'TEXT',
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name: 'srffrontuf',
prop: 'srffrontuf',
dataType: 'TEXT',
},
{
name: 'srfupdatedate',
prop: 'updatedate',
dataType: 'DATETIME',
},
{
name: 'srforikey',
},
{
name: 'srfkey',
prop: 'salesorderdetailid',
dataType: 'GUID',
},
{
name: 'srfmajortext',
prop: 'salesorderdetailname',
dataType: 'TEXT',
},
{
name: 'srftempmode',
},
{
name: 'srfuf',
},
{
name: 'srfdeid',
},
{
name: 'srfsourcekey',
},
{
name: 'productname',
prop: 'productname',
dataType: 'PICKUPTEXT',
},
{
name: 'priceperunit',
prop: 'priceperunit',
dataType: 'BIGDECIMAL',
},
{
name: 'quantity',
prop: 'quantity',
dataType: 'BIGDECIMAL',
},
{
name: 'uomname',
prop: 'uomname',
dataType: 'PICKUPTEXT',
},
{
name: 'manualdiscountamount',
prop: 'manualdiscountamount',
dataType: 'BIGDECIMAL',
},
{
name: 'tax',
prop: 'tax',
dataType: 'BIGDECIMAL',
},
{
name: 'productid',
prop: 'productid',
dataType: 'PICKUP',
},
{
name: 'uomid',
prop: 'uomid',
dataType: 'PICKUP',
},
{
name: 'salesorderdetailid',
prop: 'salesorderdetailid',
dataType: 'GUID',
},
{
name: 'salesorderdetail',
prop: 'salesorderdetailid',
dataType: 'FONTKEY',
},
]
}
}
\ No newline at end of file
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import SalesOrderDetailService from '@/service/sales-order-detail/sales-order-detail-service';
import SOProductEditModel from './soproduct-edit-form-model';
import ProductService from '@/service/product/product-service';
import UomService from '@/service/uom/uom-service';
/**
* SOProductEdit 部件服务对象
*
* @export
* @class SOProductEditService
*/
export default class SOProductEditService extends ControlService {
/**
* 订单产品服务对象
*
* @type {SalesOrderDetailService}
* @memberof SOProductEditService
*/
public appEntityService: SalesOrderDetailService = new SalesOrderDetailService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof SOProductEditService
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of SOProductEditService.
*
* @param {*} [opts={}]
* @memberof SOProductEditService
*/
constructor(opts: any = {}) {
super(opts);
this.model = new SOProductEditModel();
}
/**
* product服务对象
*
* @type {ProductService}
* @memberof SOProductEditService
*/
public productService: ProductService = new ProductService();
/**
* 计价单位服务对象
*
* @type {UomService}
* @memberof SOProductEditService
*/
public uomService: UomService = new UomService();
/**
* 处理数据
*
* @private
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof SOProductEditService
*/
private doItems(promise: Promise<any>, deKeyField: string, deName: string): Promise<any> {
return new Promise((resolve, reject) => {
promise.then((response: any) => {
if (response && response.status === 200) {
const data = response.data;
data.forEach((item:any,index:number) =>{
item[deName] = item[deKeyField];
data[index] = item;
});
resolve(data);
} else {
reject([])
}
}).catch((response: any) => {
reject([])
});
});
}
/**
* 获取跨实体数据集合
*
* @param {string} serviceName 服务名称
* @param {string} interfaceName 接口名称
* @param {*} data
* @param {boolean} [isloading]
* @returns {Promise<any[]>}
* @memberof SOProductEditService
*/
@Errorlog
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
if (Object.is(serviceName, 'ProductService') && Object.is(interfaceName, 'FetchDefault')) {
return this.doItems(this.productService.FetchDefault(JSON.parse(JSON.stringify(context)),data, isloading), 'productid', 'product');
}
if (Object.is(serviceName, 'UomService') && Object.is(interfaceName, 'FetchDefault')) {
return this.doItems(this.uomService.FetchDefault(JSON.parse(JSON.stringify(context)),data, isloading), 'uomid', 'uom');
}
return Promise.reject([])
}
/**
* 启动工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof SOProductEditService
*/
@Errorlog
public wfstart(action: string,context: any = {},data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data);
context = this.handleRequestData(action,context,data).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.WFStart(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 提交工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof SOProductEditService
*/
@Errorlog
public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data,true);
context = this.handleRequestData(action,context,data,true).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.WFSubmit(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SOProductEditService
*/
@Errorlog
public add(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Create(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 删除数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SOProductEditService
*/
@Errorlog
public delete(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Remove(Context,Data, isloading);
}
result.then((response) => {
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 修改数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SOProductEditService
*/
@Errorlog
public update(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Update(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SOProductEditService
*/
@Errorlog
public get(action: string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Get(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 加载草稿
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SOProductEditService
*/
@Errorlog
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据
const PrimaryKey = Util.createUUID();
Data.salesorderdetailid = PrimaryKey;
Data.salesorderdetail = PrimaryKey;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.GetDraft(Context,Data, isloading);
}
result.then((response) => {
response.data.salesorderdetailid = PrimaryKey;
this.handleResponse(action, response, true);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 前台逻辑
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SOProductEditService
*/
@Errorlog
public frontLogic(action:string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any)=>{
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
return Promise.reject({ status: 500, data: { title: '失败', message: '系统异常' } });
}
result.then((response) => {
this.handleResponse(action, response,true);
resolve(response);
}).catch(response => {
reject(response);
});
})
}
/**
* 处理请求数据
*
* @param action 行为
* @param data 数据
* @memberof SOProductEditService
*/
public handleRequestData(action: string,context:any, data: any = {},isMerge:boolean = false){
let mode: any = this.getMode();
if (!mode && mode.getDataItems instanceof Function) {
return data;
}
let formItemItems: any[] = mode.getDataItems();
let requestData:any = {};
if(isMerge && (data && data.viewparams)){
Object.assign(requestData,data.viewparams);
}
formItemItems.forEach((item:any) =>{
if(item && item.dataType && Object.is(item.dataType,'FONTKEY')){
if(item && item.prop){
requestData[item.prop] = context[item.name];
}
}else{
if(item && item.prop){
requestData[item.prop] = data[item.name];
}
}
});
let tempContext:any = JSON.parse(JSON.stringify(context));
if(tempContext && tempContext.srfsessionid){
tempContext.srfsessionkey = tempContext.srfsessionid;
delete tempContext.srfsessionid;
}
return {context:tempContext,data:requestData};
}
}
\ No newline at end of file
<i-form :model="this.data" class='app-form' ref='form' id='salesorderdetail_soproductedit' style="">
<input style="display:none;" />
<row >
<i-col v-show="detailsModel.group1.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.group1.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.salesorderdetail.soproductedit_form.details.group1')" :isShowCaption="false" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" >
<row>
<i-col v-show="detailsModel.productname.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='productname' :itemRules="this.rules.productname" class='' :caption="$t('entities.salesorderdetail.soproductedit_form.details.productname')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.productname.error" :isEmptyCaption="false" labelPos="LEFT">
<app-picker
:formState="formState"
:data="data"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
:disabled="detailsModel.productname.disabled"
name='productname'
deMajorField='productname'
deKeyField='product'
:service="service"
:acParams="{ serviceName: 'ProductService', interfaceName: 'FetchDefault'}"
valueitem='productid'
:value="data.productname"
editortype=""
:pickupView="{ viewname: 'product-pickup-view', title: $t('entities.product.views.pickupview.title'), deResParameters: [], parameters: [{ pathName: 'products', parameterName: 'product' }, { pathName: 'pickupview', parameterName: 'pickupview' } ], placement:'' }"
style=""
@formitemvaluechange="onFormItemValueChange($event)">
</app-picker>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.priceperunit.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='priceperunit' :itemRules="this.rules.priceperunit" class='' :caption="$t('entities.salesorderdetail.soproductedit_form.details.priceperunit')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.priceperunit.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.priceperunit" @enter="onEnter($event)" unit="" :disabled="detailsModel.priceperunit.disabled" type='number' style=""></input-box>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.quantity.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='quantity' :itemRules="this.rules.quantity" class='' :caption="$t('entities.salesorderdetail.soproductedit_form.details.quantity')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.quantity.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.quantity" @enter="onEnter($event)" unit="" :disabled="detailsModel.quantity.disabled" type='number' style=""></input-box>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.uomname.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='uomname' :itemRules="this.rules.uomname" class='' :caption="$t('entities.salesorderdetail.soproductedit_form.details.uomname')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.uomname.error" :isEmptyCaption="false" labelPos="LEFT">
<app-picker
:formState="formState"
:data="data"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
:disabled="detailsModel.uomname.disabled"
name='uomname'
deMajorField='uomname'
deKeyField='uom'
:service="service"
:acParams="{ serviceName: 'UomService', interfaceName: 'FetchDefault'}"
valueitem='uomid'
:value="data.uomname"
editortype=""
:pickupView="{ viewname: 'uom-pickup-view', title: $t('entities.uom.views.pickupview.title'), deResParameters: [], parameters: [{ pathName: 'uoms', parameterName: 'uom' }, { pathName: 'pickupview', parameterName: 'pickupview' } ], placement:'' }"
style=""
@formitemvaluechange="onFormItemValueChange($event)">
</app-picker>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.manualdiscountamount.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='manualdiscountamount' :itemRules="this.rules.manualdiscountamount" class='' :caption="$t('entities.salesorderdetail.soproductedit_form.details.manualdiscountamount')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.manualdiscountamount.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.manualdiscountamount" @enter="onEnter($event)" unit="" :disabled="detailsModel.manualdiscountamount.disabled" type='number' style=""></input-box>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.tax.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='tax' :itemRules="this.rules.tax" class='' :caption="$t('entities.salesorderdetail.soproductedit_form.details.tax')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.tax.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.tax" @enter="onEnter($event)" unit="" :disabled="detailsModel.tax.disabled" type='number' style=""></input-box>
</app-form-item>
</i-col>
</row>
</app-form-group>
</i-col>
</row>
</i-form>
\ No newline at end of file
<template src="./soproduct-edit-form.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { SOProductEditEditFormBase } from './soproduct-edit-form-base';
/**
* form部件
*
* @export
* @class SOProductEditEditForm
* @extends {SOProductEditEditFormBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class SOProductEditEditForm extends SOProductEditEditFormBase { }
</script>
......@@ -64,6 +64,12 @@ export class InfoEditFormBase extends EditFormControlBase {
paymenttermscode: null,
freighttermscode: null,
description: null,
totallineitemamount: null,
discountpercentage: null,
discountamount: null,
totalamountlessfreight: null,
freightamount: null,
totalamount: null,
opportunityname: null,
quotename: null,
customerid: null,
......@@ -151,6 +157,30 @@ export class InfoEditFormBase extends EditFormControlBase {
{ required: false, type: 'string', message: '说明 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '说明 值不能为空', trigger: 'blur' },
],
totallineitemamount: [
{ required: false, type: 'number', message: '明细金额总计 值不能为空', trigger: 'change' },
{ required: false, type: 'number', message: '明细金额总计 值不能为空', trigger: 'blur' },
],
discountpercentage: [
{ required: false, type: 'number', message: '订单折扣(%) 值不能为空', trigger: 'change' },
{ required: false, type: 'number', message: '订单折扣(%) 值不能为空', trigger: 'blur' },
],
discountamount: [
{ required: false, type: 'number', message: '订单折扣金额 值不能为空', trigger: 'change' },
{ required: false, type: 'number', message: '订单折扣金额 值不能为空', trigger: 'blur' },
],
totalamountlessfreight: [
{ required: false, type: 'number', message: '折后金额总计 值不能为空', trigger: 'change' },
{ required: false, type: 'number', message: '折后金额总计 值不能为空', trigger: 'blur' },
],
freightamount: [
{ required: false, type: 'number', message: '运费金额 值不能为空', trigger: 'change' },
{ required: false, type: 'number', message: '运费金额 值不能为空', trigger: 'blur' },
],
totalamount: [
{ required: false, type: 'number', message: '总金额 值不能为空', trigger: 'change' },
{ required: false, type: 'number', message: '总金额 值不能为空', trigger: 'blur' },
],
opportunityname: [
{ required: false, type: 'string', message: '商机 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '商机 值不能为空', trigger: 'blur' },
......@@ -200,6 +230,8 @@ export class InfoEditFormBase extends EditFormControlBase {
grouppanel1: new FormGroupPanelModel({ caption: '详细信息', detailType: 'GROUPPANEL', name: 'grouppanel1', visible: true, isShowCaption: true, form: this, uiActionGroup: { caption: '', langbase: 'entities.salesorder.info_form', extractMode: 'ITEM', details: [] } }),
grouppanel4: new FormGroupPanelModel({ caption: '订单金额', detailType: 'GROUPPANEL', name: 'grouppanel4', visible: true, isShowCaption: true, form: this, uiActionGroup: { caption: '', langbase: 'entities.salesorder.info_form', extractMode: 'ITEM', details: [] } }),
grouppanel3: new FormGroupPanelModel({ caption: '销售信息', detailType: 'GROUPPANEL', name: 'grouppanel3', visible: true, isShowCaption: true, form: this, uiActionGroup: { caption: '', langbase: 'entities.salesorder.info_form', extractMode: 'ITEM', details: [] } }),
grouppanel2: new FormGroupPanelModel({ caption: '帐单地址', detailType: 'GROUPPANEL', name: 'grouppanel2', visible: true, isShowCaption: true, form: this, uiActionGroup: { caption: '', langbase: 'entities.salesorder.info_form', extractMode: 'ITEM', details: [] } }),
......@@ -240,6 +272,18 @@ export class InfoEditFormBase extends EditFormControlBase {
description: new FormItemModel({ caption: '说明', detailType: 'FORMITEM', name: 'description', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
totallineitemamount: new FormItemModel({ caption: '明细金额总计', detailType: 'FORMITEM', name: 'totallineitemamount', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 2 }),
discountpercentage: new FormItemModel({ caption: '订单折扣(%)', detailType: 'FORMITEM', name: 'discountpercentage', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
discountamount: new FormItemModel({ caption: '订单折扣金额', detailType: 'FORMITEM', name: 'discountamount', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
totalamountlessfreight: new FormItemModel({ caption: '折后金额总计', detailType: 'FORMITEM', name: 'totalamountlessfreight', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 2 }),
freightamount: new FormItemModel({ caption: '运费金额', detailType: 'FORMITEM', name: 'freightamount', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
totalamount: new FormItemModel({ caption: '总金额', detailType: 'FORMITEM', name: 'totalamount', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 2 }),
opportunityname: new FormItemModel({ caption: '商机', detailType: 'FORMITEM', name: 'opportunityname', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
quotename: new FormItemModel({ caption: '报价单', detailType: 'FORMITEM', name: 'quotename', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
......
......@@ -100,6 +100,36 @@ export default class InfoModel {
prop: 'description',
dataType: 'TEXT',
},
{
name: 'totallineitemamount',
prop: 'totallineitemamount',
dataType: 'BIGDECIMAL',
},
{
name: 'discountpercentage',
prop: 'discountpercentage',
dataType: 'BIGDECIMAL',
},
{
name: 'discountamount',
prop: 'discountamount',
dataType: 'BIGDECIMAL',
},
{
name: 'totalamountlessfreight',
prop: 'totalamountlessfreight',
dataType: 'BIGDECIMAL',
},
{
name: 'freightamount',
prop: 'freightamount',
dataType: 'BIGDECIMAL',
},
{
name: 'totalamount',
prop: 'totalamount',
dataType: 'BIGDECIMAL',
},
{
name: 'opportunityname',
prop: 'opportunityname',
......
......@@ -80,6 +80,56 @@
</row>
</app-form-group>
</i-col>
<i-col v-show="detailsModel.grouppanel4.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.grouppanel4.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.salesorder.info_form.details.grouppanel4')" :isShowCaption="true" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="true" >
<row>
<i-col v-show="detailsModel.totallineitemamount.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='totallineitemamount' :itemRules="this.rules.totallineitemamount" class='' :caption="$t('entities.salesorder.info_form.details.totallineitemamount')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.totallineitemamount.error" :isEmptyCaption="false" labelPos="LEFT">
<app-span name='totallineitemamount' :value="data.totallineitemamount" :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style=""></app-span>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.discountpercentage.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='discountpercentage' :itemRules="this.rules.discountpercentage" class='' :caption="$t('entities.salesorder.info_form.details.discountpercentage')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.discountpercentage.error" :isEmptyCaption="false" labelPos="LEFT">
<app-span name='discountpercentage' :value="data.discountpercentage" :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style=""></app-span>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.discountamount.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='discountamount' :itemRules="this.rules.discountamount" class='' :caption="$t('entities.salesorder.info_form.details.discountamount')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.discountamount.error" :isEmptyCaption="false" labelPos="LEFT">
<app-span name='discountamount' :value="data.discountamount" :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style=""></app-span>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.totalamountlessfreight.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='totalamountlessfreight' :itemRules="this.rules.totalamountlessfreight" class='' :caption="$t('entities.salesorder.info_form.details.totalamountlessfreight')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.totalamountlessfreight.error" :isEmptyCaption="false" labelPos="LEFT">
<app-span name='totalamountlessfreight' :value="data.totalamountlessfreight" :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style=""></app-span>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.freightamount.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='freightamount' :itemRules="this.rules.freightamount" class='' :caption="$t('entities.salesorder.info_form.details.freightamount')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.freightamount.error" :isEmptyCaption="false" labelPos="LEFT">
<app-span name='freightamount' :value="data.freightamount" :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style=""></app-span>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.totalamount.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='totalamount' :itemRules="this.rules.totalamount" class='' :caption="$t('entities.salesorder.info_form.details.totalamount')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.totalamount.error" :isEmptyCaption="false" labelPos="LEFT">
<app-span name='totalamount' :value="data.totalamount" :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style=""></app-span>
</app-form-item>
</i-col>
</row>
</app-form-group>
</i-col>
<i-col v-show="detailsModel.grouppanel3.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.grouppanel3.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.salesorder.info_form.details.grouppanel3')" :isShowCaption="true" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="true" >
......
......@@ -113,12 +113,12 @@ export class QuickCreateEditFormBase extends EditFormControlBase {
{ required: true, type: 'string', message: '销售订单名称 值不能为空', trigger: 'blur' },
],
transactioncurrencyname: [
{ required: false, type: 'string', message: '货币 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '货币 值不能为空', trigger: 'blur' },
{ required: true, type: 'string', message: '货币 值不能为空', trigger: 'change' },
{ required: true, type: 'string', message: '货币 值不能为空', trigger: 'blur' },
],
pricelevelname: [
{ required: false, type: 'string', message: '价目表 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '价目表 值不能为空', trigger: 'blur' },
{ required: true, type: 'string', message: '价目表 值不能为空', trigger: 'change' },
{ required: true, type: 'string', message: '价目表 值不能为空', trigger: 'blur' },
],
salesorderid: [
{ required: false, type: 'string', message: '订单 值不能为空', trigger: 'change' },
......
......@@ -35,6 +35,10 @@ zuul:
path: /serviceappointments/**
serviceId: ibizbusinesscentral-centralapi
stripPrefix: false
uom:
path: /uoms/**
serviceId: ibizbusinesscentral-centralapi
stripPrefix: false
transactioncurrency:
path: /transactioncurrencies/**
serviceId: ibizbusinesscentral-centralapi
......
......@@ -562,6 +562,13 @@ public class SalesOrderDetail extends EntityMP implements Serializable {
@JSONField(name = "productname")
@JsonProperty("productname")
private String productname;
/**
* 计价单位
*/
@TableField(value = "uomname")
@JSONField(name = "uomname")
@JsonProperty("uomname")
private String uomname;
/**
*
......@@ -1153,6 +1160,14 @@ public class SalesOrderDetail extends EntityMP implements Serializable {
this.modify("productname",productname);
}
/**
* 设置 [计价单位]
*/
public void setUomname(String uomname){
this.uomname = uomname ;
this.modify("uomname",uomname);
}
}
......
......@@ -132,6 +132,20 @@ public class SalesOrderDetailSearchContext extends QueryWrapperContext<SalesOrde
this.getSearchCond().like("productname", n_productname_like);
}
}
private String n_uomname_eq;//[计价单位]
public void setN_uomname_eq(String n_uomname_eq) {
this.n_uomname_eq = n_uomname_eq;
if(!ObjectUtils.isEmpty(this.n_uomname_eq)){
this.getSearchCond().eq("uomname", n_uomname_eq);
}
}
private String n_uomname_like;//[计价单位]
public void setN_uomname_like(String n_uomname_like) {
this.n_uomname_like = n_uomname_like;
if(!ObjectUtils.isEmpty(this.n_uomname_like)){
this.getSearchCond().like("uomname", n_uomname_like);
}
}
/**
* 启用快速搜索
......
......@@ -255,6 +255,16 @@ public class SalesOrderDetailServiceImpl extends ServiceImpl<SalesOrderDetailMap
}
et.setProductname(product.getProductname());
}
//实体关系[DER1N_SALESORDERDETAIL__UOM__UOMID]
if(!ObjectUtils.isEmpty(et.getUomid())){
cn.ibizlab.businesscentral.core.base.domain.Uom uom=et.getUom();
if(ObjectUtils.isEmpty(uom)){
cn.ibizlab.businesscentral.core.base.domain.Uom majorEntity=uomService.get(et.getUomid());
et.setUom(majorEntity);
uom=majorEntity;
}
et.setUomname(uom.getUomname());
}
}
......
......@@ -2418,7 +2418,7 @@
<!--输出实体[INVOICE]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-invoice-9-33">
<changeSet author="a_LAB01_e85d8801c" id="tab-invoice-12-33">
<createTable tableName="INVOICE">
<column name="BILLTO_LINE1" remarks="" type="VARCHAR(250)">
</column>
......@@ -2714,7 +2714,7 @@
<!--输出实体[UOM]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-uom-1-35">
<changeSet author="a_LAB01_e85d8801c" id="tab-uom-4-35">
<createTable tableName="UOM">
<column name="OVERRIDDENCREATEDON" remarks="" type="DATETIME">
</column>
......@@ -7563,7 +7563,7 @@
<!--输出实体[SALESORDERDETAIL]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-salesorderdetail-14-80">
<changeSet author="a_LAB01_e85d8801c" id="tab-salesorderdetail-20-80">
<createTable tableName="SALESORDERDETAIL">
<column name="SHIPTO_NAME" remarks="" type="VARCHAR(200)">
</column>
......@@ -7706,6 +7706,8 @@
</column>
<column name="PRODUCTNAME" remarks="" type="VARCHAR(100)">
</column>
<column name="UOMNAME" remarks="" type="VARCHAR(100)">
</column>
</createTable>
</changeSet>
......@@ -8279,7 +8281,7 @@
<!--输出实体[PRODUCT]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-product-34-91">
<changeSet author="a_LAB01_e85d8801c" id="tab-product-36-91">
<createTable tableName="PRODUCT">
<column name="VENDORID" remarks="" type="VARCHAR(100)">
</column>
......@@ -8555,7 +8557,7 @@
<!--输出实体[SALESORDER]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-salesorder-33-95">
<changeSet author="a_LAB01_e85d8801c" id="tab-salesorder-39-95">
<createTable tableName="SALESORDER">
<column name="ENTITYIMAGE" remarks="" type="VARCHAR(100)">
</column>
......@@ -10973,19 +10975,19 @@
<addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="SLAKPIINSTANCE" constraintName="DER1N_SLAKPIINSTANCE__TRANSACT" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/>
</changeSet>
<!--输出实体[INVOICE]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-invoice-9-190">
<changeSet author="a_LAB01_e85d8801c" id="fk-invoice-12-190">
<addForeignKeyConstraint baseColumnNames="OPPORTUNITYID" baseTableName="INVOICE" constraintName="DER1N_INVOICE__OPPORTUNITY__OP" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="OPPORTUNITYID" referencedTableName="OPPORTUNITY" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-invoice-9-191">
<changeSet author="a_LAB01_e85d8801c" id="fk-invoice-12-191">
<addForeignKeyConstraint baseColumnNames="PRICELEVELID" baseTableName="INVOICE" constraintName="DER1N_INVOICE__PRICELEVEL__PRI" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="PRICELEVELID" referencedTableName="PRICELEVEL" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-invoice-9-192">
<changeSet author="a_LAB01_e85d8801c" id="fk-invoice-12-192">
<addForeignKeyConstraint baseColumnNames="SALESORDERID" baseTableName="INVOICE" constraintName="DER1N_INVOICE__SALESORDER__SAL" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SALESORDERID" referencedTableName="SALESORDER" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-invoice-9-193">
<changeSet author="a_LAB01_e85d8801c" id="fk-invoice-12-193">
<addForeignKeyConstraint baseColumnNames="SLAID" baseTableName="INVOICE" constraintName="DER1N_INVOICE__SLA__SLAID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SLAID" referencedTableName="SLA" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-invoice-9-194">
<changeSet author="a_LAB01_e85d8801c" id="fk-invoice-12-194">
<addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="INVOICE" constraintName="DER1N_INVOICE__TRANSACTIONCURR" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/>
</changeSet>
<!--输出实体[TASK]外键关系 -->
......@@ -10999,10 +11001,10 @@
<addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="TASK" constraintName="DER1N_TASK__TRANSACTIONCURRENC" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/>
</changeSet>
<!--输出实体[UOM]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-uom-1-198">
<changeSet author="a_LAB01_e85d8801c" id="fk-uom-4-198">
<addForeignKeyConstraint baseColumnNames="UOMSCHEDULEID" baseTableName="UOM" constraintName="DER1N_UOM__UOMSCHEDULE__UOMSCH" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="UOMSCHEDULEID" referencedTableName="UOMSCHEDULE" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-uom-1-199">
<changeSet author="a_LAB01_e85d8801c" id="fk-uom-4-199">
<addForeignKeyConstraint baseColumnNames="BASEUOM" baseTableName="UOM" constraintName="DER1N_UOM__UOM__BASEUOM" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="UOMID" referencedTableName="UOM" validate="true"/>
</changeSet>
<!--输出实体[TEAMTEMPLATE]外键关系 -->
......@@ -11380,19 +11382,19 @@
<addForeignKeyConstraint baseColumnNames="RESOURCE" baseTableName="BOOKABLERESCHARACTERISTIC" constraintName="DER1N_BOOKABLERESCHARACTERISTI" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="BOOKABLERESID" referencedTableName="BOOKABLERES" validate="true"/>
</changeSet>
<!--输出实体[SALESORDERDETAIL]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-salesorderdetail-14-328">
<changeSet author="a_LAB01_e85d8801c" id="fk-salesorderdetail-20-328">
<addForeignKeyConstraint baseColumnNames="PRODUCTID" baseTableName="SALESORDERDETAIL" constraintName="DER1N_SALESORDERDETAIL__PRODUC" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="PRODUCTID" referencedTableName="PRODUCT" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-salesorderdetail-14-329">
<changeSet author="a_LAB01_e85d8801c" id="fk-salesorderdetail-20-329">
<addForeignKeyConstraint baseColumnNames="QUOTEDETAILID" baseTableName="SALESORDERDETAIL" constraintName="DER1N_SALESORDERDETAIL__QUOTED" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="QUOTEDETAILID" referencedTableName="QUOTEDETAIL" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-salesorderdetail-14-330">
<changeSet author="a_LAB01_e85d8801c" id="fk-salesorderdetail-20-330">
<addForeignKeyConstraint baseColumnNames="PARENTBUNDLEIDREF" baseTableName="SALESORDERDETAIL" constraintName="DER1N_SALESORDERDETAIL__SALESO" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SALESORDERDETAILID" referencedTableName="SALESORDERDETAIL" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-salesorderdetail-14-332">
<changeSet author="a_LAB01_e85d8801c" id="fk-salesorderdetail-20-332">
<addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="SALESORDERDETAIL" constraintName="DER1N_SALESORDERDETAIL__TRANSA" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-salesorderdetail-14-333">
<changeSet author="a_LAB01_e85d8801c" id="fk-salesorderdetail-20-333">
<addForeignKeyConstraint baseColumnNames="UOMID" baseTableName="SALESORDERDETAIL" constraintName="DER1N_SALESORDERDETAIL__UOM__U" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="UOMID" referencedTableName="UOM" validate="true"/>
</changeSet>
<!--输出实体[BOOKABLERESBOOKINGHEADER]外键关系 -->
......@@ -11451,22 +11453,22 @@
<addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="COMPETITOR" constraintName="DER1N_COMPETITOR__TRANSACTIONC" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/>
</changeSet>
<!--输出实体[PRODUCT]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-product-34-349">
<changeSet author="a_LAB01_e85d8801c" id="fk-product-36-349">
<addForeignKeyConstraint baseColumnNames="PRICELEVELID" baseTableName="PRODUCT" constraintName="DER1N_PRODUCT__PRICELEVEL__PRI" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="PRICELEVELID" referencedTableName="PRICELEVEL" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-product-34-350">
<changeSet author="a_LAB01_e85d8801c" id="fk-product-36-350">
<addForeignKeyConstraint baseColumnNames="PARENTPRODUCTID" baseTableName="PRODUCT" constraintName="DER1N_PRODUCT__PRODUCT__PARENT" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="PRODUCTID" referencedTableName="PRODUCT" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-product-34-351">
<changeSet author="a_LAB01_e85d8801c" id="fk-product-36-351">
<addForeignKeyConstraint baseColumnNames="SUBJECTID" baseTableName="PRODUCT" constraintName="DER1N_PRODUCT__SUBJECT__SUBJEC" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SUBJECTID" referencedTableName="SUBJECT" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-product-34-352">
<changeSet author="a_LAB01_e85d8801c" id="fk-product-36-352">
<addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="PRODUCT" constraintName="DER1N_PRODUCT__TRANSACTIONCURR" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-product-34-353">
<changeSet author="a_LAB01_e85d8801c" id="fk-product-36-353">
<addForeignKeyConstraint baseColumnNames="DEFAULTUOMSCHEDULEID" baseTableName="PRODUCT" constraintName="DER1N_PRODUCT__UOMSCHEDULE__DE" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="UOMSCHEDULEID" referencedTableName="UOMSCHEDULE" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-product-34-354">
<changeSet author="a_LAB01_e85d8801c" id="fk-product-36-354">
<addForeignKeyConstraint baseColumnNames="DEFAULTUOMID" baseTableName="PRODUCT" constraintName="DER1N_PRODUCT__UOM__DEFAULTUOM" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="UOMID" referencedTableName="UOM" validate="true"/>
</changeSet>
<!--输出实体[CHARACTERISTIC]外键关系 -->
......@@ -11482,22 +11484,22 @@
<addForeignKeyConstraint baseColumnNames="RESOURCECATEGORY" baseTableName="BOOKABLERESCATEGORYASSN" constraintName="DER1N_BOOKABLERESCATEGORYASSN_" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="BOOKABLERESCATEGORYID" referencedTableName="BOOKABLERESCATEGORY" validate="true"/>
</changeSet>
<!--输出实体[SALESORDER]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-salesorder-33-360">
<changeSet author="a_LAB01_e85d8801c" id="fk-salesorder-39-360">
<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-33-361">
<changeSet author="a_LAB01_e85d8801c" id="fk-salesorder-39-361">
<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-33-362">
<changeSet author="a_LAB01_e85d8801c" id="fk-salesorder-39-362">
<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-33-363">
<changeSet author="a_LAB01_e85d8801c" id="fk-salesorder-39-363">
<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-33-364">
<changeSet author="a_LAB01_e85d8801c" id="fk-salesorder-39-364">
<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-33-365">
<changeSet author="a_LAB01_e85d8801c" id="fk-salesorder-39-365">
<addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="SALESORDER" constraintName="DER1N_SALESORDER__TRANSACTIONC" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/>
</changeSet>
<!--输出实体[LEADADDRESS]外键关系 -->
......
......@@ -5,7 +5,7 @@
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="SalesOrderDetailResultMap" databaseId="mysql">
<![CDATA[select t1.* from (SELECT t1.`BASEAMOUNT`, t1.`BASEAMOUNT_BASE`, t1.`COPIED`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`DESCRIPTION`, t1.`EXCHANGERATE`, t1.`EXTENDEDAMOUNT`, t1.`EXTENDEDAMOUNT_BASE`, t1.`IMPORTSEQUENCENUMBER`, t1.`LINEITEMNUMBER`, t1.`MANUALDISCOUNTAMOUNT`, t1.`MANUALDISCOUNTAMOUNT_BASE`, t1.`OVERRIDDENCREATEDON`, t1.`OWNERID`, t1.`OWNERIDTYPE`, t1.`OWNERIDYOMINAME`, t1.`PARENTBUNDLEID`, t1.`PARENTBUNDLEIDREF`, t1.`PRICEOVERRIDDEN`, t1.`PRICEPERUNIT`, t1.`PRICEPERUNIT_BASE`, t1.`PRICINGERRORCODE`, t1.`PRODUCTASSOCIATIONID`, t1.`PRODUCTDESCRIPTION`, t1.`PRODUCTID`, t1.`PRODUCTNAME`, t1.`PRODUCTOVERRIDDEN`, t1.`PRODUCTTYPECODE`, t1.`PROPERTYCONFIGURATIONSTATUS`, t1.`QUANTITY`, t1.`QUANTITYBACKORDERED`, t1.`QUANTITYCANCELLED`, t1.`QUANTITYSHIPPED`, t1.`QUOTEDETAILID`, t1.`REQUESTDELIVERYBY`, t1.`SALESORDERDETAILID`, t1.`SALESORDERDETAILNAME`, t1.`SALESORDERID`, t1.`SALESORDERISPRICELOCKED`, t1.`SALESORDERSTATECODE`, t1.`SALESREPID`, t1.`SALESREPIDYOMINAME`, t1.`SEQUENCENUMBER`, t1.`SHIPTO_ADDRESSID`, t1.`SHIPTO_CITY`, 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.`SKIPPRICECALCULATION`, t1.`TAX`, t1.`TAX_BASE`, t1.`TIMEZONERULEVERSIONNUMBER`, t1.`TRANSACTIONCURRENCYID`, t1.`UOMID`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`UTCCONVERSIONTIMEZONECODE`, t1.`VERSIONNUMBER`, t1.`VOLUMEDISCOUNTAMOUNT`, t1.`VOLUMEDISCOUNTAMOUNT_BASE`, t1.`WILLCALL` FROM `SALESORDERDETAIL` t1 ) t1 where salesorderdetailid=#{id}]]>
<![CDATA[select t1.* from (SELECT t1.`BASEAMOUNT`, t1.`BASEAMOUNT_BASE`, t1.`COPIED`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`DESCRIPTION`, t1.`EXCHANGERATE`, t1.`EXTENDEDAMOUNT`, t1.`EXTENDEDAMOUNT_BASE`, t1.`IMPORTSEQUENCENUMBER`, t1.`LINEITEMNUMBER`, t1.`MANUALDISCOUNTAMOUNT`, t1.`MANUALDISCOUNTAMOUNT_BASE`, t1.`OVERRIDDENCREATEDON`, t1.`OWNERID`, t1.`OWNERIDTYPE`, t1.`OWNERIDYOMINAME`, t1.`PARENTBUNDLEID`, t1.`PARENTBUNDLEIDREF`, t1.`PRICEOVERRIDDEN`, t1.`PRICEPERUNIT`, t1.`PRICEPERUNIT_BASE`, t1.`PRICINGERRORCODE`, t1.`PRODUCTASSOCIATIONID`, t1.`PRODUCTDESCRIPTION`, t1.`PRODUCTID`, t1.`PRODUCTNAME`, t1.`PRODUCTOVERRIDDEN`, t1.`PRODUCTTYPECODE`, t1.`PROPERTYCONFIGURATIONSTATUS`, t1.`QUANTITY`, t1.`QUANTITYBACKORDERED`, t1.`QUANTITYCANCELLED`, t1.`QUANTITYSHIPPED`, t1.`QUOTEDETAILID`, t1.`REQUESTDELIVERYBY`, t1.`SALESORDERDETAILID`, t1.`SALESORDERDETAILNAME`, t1.`SALESORDERID`, t1.`SALESORDERISPRICELOCKED`, t1.`SALESORDERSTATECODE`, t1.`SALESREPID`, t1.`SALESREPIDYOMINAME`, t1.`SEQUENCENUMBER`, t1.`SHIPTO_ADDRESSID`, t1.`SHIPTO_CITY`, 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.`SKIPPRICECALCULATION`, t1.`TAX`, t1.`TAX_BASE`, t1.`TIMEZONERULEVERSIONNUMBER`, t1.`TRANSACTIONCURRENCYID`, t1.`UOMID`, t1.`UOMNAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`UTCCONVERSIONTIMEZONECODE`, t1.`VERSIONNUMBER`, t1.`VOLUMEDISCOUNTAMOUNT`, t1.`VOLUMEDISCOUNTAMOUNT_BASE`, t1.`WILLCALL` FROM `SALESORDERDETAIL` t1 ) t1 where salesorderdetailid=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
......@@ -106,12 +106,12 @@
<!--数据查询[Default]-->
<sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`BASEAMOUNT`, t1.`BASEAMOUNT_BASE`, t1.`COPIED`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`DESCRIPTION`, t1.`EXCHANGERATE`, t1.`EXTENDEDAMOUNT`, t1.`EXTENDEDAMOUNT_BASE`, t1.`IMPORTSEQUENCENUMBER`, t1.`LINEITEMNUMBER`, t1.`MANUALDISCOUNTAMOUNT`, t1.`MANUALDISCOUNTAMOUNT_BASE`, t1.`OVERRIDDENCREATEDON`, t1.`OWNERID`, t1.`OWNERIDTYPE`, t1.`OWNERIDYOMINAME`, t1.`PARENTBUNDLEID`, t1.`PARENTBUNDLEIDREF`, t1.`PRICEOVERRIDDEN`, t1.`PRICEPERUNIT`, t1.`PRICEPERUNIT_BASE`, t1.`PRICINGERRORCODE`, t1.`PRODUCTASSOCIATIONID`, t1.`PRODUCTDESCRIPTION`, t1.`PRODUCTID`, t1.`PRODUCTNAME`, t1.`PRODUCTOVERRIDDEN`, t1.`PRODUCTTYPECODE`, t1.`PROPERTYCONFIGURATIONSTATUS`, t1.`QUANTITY`, t1.`QUANTITYBACKORDERED`, t1.`QUANTITYCANCELLED`, t1.`QUANTITYSHIPPED`, t1.`QUOTEDETAILID`, t1.`REQUESTDELIVERYBY`, t1.`SALESORDERDETAILID`, t1.`SALESORDERDETAILNAME`, t1.`SALESORDERID`, t1.`SALESORDERISPRICELOCKED`, t1.`SALESORDERSTATECODE`, t1.`SALESREPID`, t1.`SALESREPIDYOMINAME`, t1.`SEQUENCENUMBER`, t1.`SHIPTO_ADDRESSID`, t1.`SHIPTO_CITY`, 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.`SKIPPRICECALCULATION`, t1.`TAX`, t1.`TAX_BASE`, t1.`TIMEZONERULEVERSIONNUMBER`, t1.`TRANSACTIONCURRENCYID`, t1.`UOMID`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`UTCCONVERSIONTIMEZONECODE`, t1.`VERSIONNUMBER`, t1.`VOLUMEDISCOUNTAMOUNT`, t1.`VOLUMEDISCOUNTAMOUNT_BASE`, t1.`WILLCALL` FROM `SALESORDERDETAIL` t1
<![CDATA[ SELECT t1.`BASEAMOUNT`, t1.`BASEAMOUNT_BASE`, t1.`COPIED`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`DESCRIPTION`, t1.`EXCHANGERATE`, t1.`EXTENDEDAMOUNT`, t1.`EXTENDEDAMOUNT_BASE`, t1.`IMPORTSEQUENCENUMBER`, t1.`LINEITEMNUMBER`, t1.`MANUALDISCOUNTAMOUNT`, t1.`MANUALDISCOUNTAMOUNT_BASE`, t1.`OVERRIDDENCREATEDON`, t1.`OWNERID`, t1.`OWNERIDTYPE`, t1.`OWNERIDYOMINAME`, t1.`PARENTBUNDLEID`, t1.`PARENTBUNDLEIDREF`, t1.`PRICEOVERRIDDEN`, t1.`PRICEPERUNIT`, t1.`PRICEPERUNIT_BASE`, t1.`PRICINGERRORCODE`, t1.`PRODUCTASSOCIATIONID`, t1.`PRODUCTDESCRIPTION`, t1.`PRODUCTID`, t1.`PRODUCTNAME`, t1.`PRODUCTOVERRIDDEN`, t1.`PRODUCTTYPECODE`, t1.`PROPERTYCONFIGURATIONSTATUS`, t1.`QUANTITY`, t1.`QUANTITYBACKORDERED`, t1.`QUANTITYCANCELLED`, t1.`QUANTITYSHIPPED`, t1.`QUOTEDETAILID`, t1.`REQUESTDELIVERYBY`, t1.`SALESORDERDETAILID`, t1.`SALESORDERDETAILNAME`, t1.`SALESORDERID`, t1.`SALESORDERISPRICELOCKED`, t1.`SALESORDERSTATECODE`, t1.`SALESREPID`, t1.`SALESREPIDYOMINAME`, t1.`SEQUENCENUMBER`, t1.`SHIPTO_ADDRESSID`, t1.`SHIPTO_CITY`, 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.`SKIPPRICECALCULATION`, t1.`TAX`, t1.`TAX_BASE`, t1.`TIMEZONERULEVERSIONNUMBER`, t1.`TRANSACTIONCURRENCYID`, t1.`UOMID`, t1.`UOMNAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`UTCCONVERSIONTIMEZONECODE`, t1.`VERSIONNUMBER`, t1.`VOLUMEDISCOUNTAMOUNT`, t1.`VOLUMEDISCOUNTAMOUNT_BASE`, t1.`WILLCALL` FROM `SALESORDERDETAIL` t1
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="mysql">
<![CDATA[ SELECT t1.`BASEAMOUNT`, t1.`BASEAMOUNT_BASE`, t1.`COPIED`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`DESCRIPTION`, t1.`EXCHANGERATE`, t1.`EXTENDEDAMOUNT`, t1.`EXTENDEDAMOUNT_BASE`, t1.`IMPORTSEQUENCENUMBER`, t1.`LINEITEMNUMBER`, t1.`MANUALDISCOUNTAMOUNT`, t1.`MANUALDISCOUNTAMOUNT_BASE`, t1.`OVERRIDDENCREATEDON`, t1.`OWNERID`, t1.`OWNERIDTYPE`, t1.`OWNERIDYOMINAME`, t1.`PARENTBUNDLEID`, t1.`PARENTBUNDLEIDREF`, t1.`PRICEOVERRIDDEN`, t1.`PRICEPERUNIT`, t1.`PRICEPERUNIT_BASE`, t1.`PRICINGERRORCODE`, t1.`PRODUCTASSOCIATIONID`, t1.`PRODUCTDESCRIPTION`, t1.`PRODUCTID`, t1.`PRODUCTNAME`, t1.`PRODUCTOVERRIDDEN`, t1.`PRODUCTTYPECODE`, t1.`PROPERTYCONFIGURATIONSTATUS`, t1.`QUANTITY`, t1.`QUANTITYBACKORDERED`, t1.`QUANTITYCANCELLED`, t1.`QUANTITYSHIPPED`, t1.`QUOTEDETAILID`, t1.`REQUESTDELIVERYBY`, t1.`SALESORDERDETAILID`, t1.`SALESORDERDETAILNAME`, t1.`SALESORDERID`, t1.`SALESORDERISPRICELOCKED`, t1.`SALESORDERSTATECODE`, t1.`SALESREPID`, t1.`SALESREPIDYOMINAME`, t1.`SEQUENCENUMBER`, t1.`SHIPTO_ADDRESSID`, t1.`SHIPTO_CITY`, 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.`SKIPPRICECALCULATION`, t1.`TAX`, t1.`TAX_BASE`, t1.`TIMEZONERULEVERSIONNUMBER`, t1.`TRANSACTIONCURRENCYID`, t1.`UOMID`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`UTCCONVERSIONTIMEZONECODE`, t1.`VERSIONNUMBER`, t1.`VOLUMEDISCOUNTAMOUNT`, t1.`VOLUMEDISCOUNTAMOUNT_BASE`, t1.`WILLCALL` FROM `SALESORDERDETAIL` t1
<![CDATA[ SELECT t1.`BASEAMOUNT`, t1.`BASEAMOUNT_BASE`, t1.`COPIED`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`DESCRIPTION`, t1.`EXCHANGERATE`, t1.`EXTENDEDAMOUNT`, t1.`EXTENDEDAMOUNT_BASE`, t1.`IMPORTSEQUENCENUMBER`, t1.`LINEITEMNUMBER`, t1.`MANUALDISCOUNTAMOUNT`, t1.`MANUALDISCOUNTAMOUNT_BASE`, t1.`OVERRIDDENCREATEDON`, t1.`OWNERID`, t1.`OWNERIDTYPE`, t1.`OWNERIDYOMINAME`, t1.`PARENTBUNDLEID`, t1.`PARENTBUNDLEIDREF`, t1.`PRICEOVERRIDDEN`, t1.`PRICEPERUNIT`, t1.`PRICEPERUNIT_BASE`, t1.`PRICINGERRORCODE`, t1.`PRODUCTASSOCIATIONID`, t1.`PRODUCTDESCRIPTION`, t1.`PRODUCTID`, t1.`PRODUCTNAME`, t1.`PRODUCTOVERRIDDEN`, t1.`PRODUCTTYPECODE`, t1.`PROPERTYCONFIGURATIONSTATUS`, t1.`QUANTITY`, t1.`QUANTITYBACKORDERED`, t1.`QUANTITYCANCELLED`, t1.`QUANTITYSHIPPED`, t1.`QUOTEDETAILID`, t1.`REQUESTDELIVERYBY`, t1.`SALESORDERDETAILID`, t1.`SALESORDERDETAILNAME`, t1.`SALESORDERID`, t1.`SALESORDERISPRICELOCKED`, t1.`SALESORDERSTATECODE`, t1.`SALESREPID`, t1.`SALESREPIDYOMINAME`, t1.`SEQUENCENUMBER`, t1.`SHIPTO_ADDRESSID`, t1.`SHIPTO_CITY`, 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.`SKIPPRICECALCULATION`, t1.`TAX`, t1.`TAX_BASE`, t1.`TIMEZONERULEVERSIONNUMBER`, t1.`TRANSACTIONCURRENCYID`, t1.`UOMID`, t1.`UOMNAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`UTCCONVERSIONTIMEZONECODE`, t1.`VERSIONNUMBER`, t1.`VOLUMEDISCOUNTAMOUNT`, t1.`VOLUMEDISCOUNTAMOUNT_BASE`, t1.`WILLCALL` FROM `SALESORDERDETAIL` t1
]]>
</sql>
</mapper>
......
......@@ -60,6 +60,14 @@
"datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}]
}
, {
"dename":"Uom",
"delogicname":"计价单位",
"sysmoudle":{"id":"BASE","name":"Base"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"deaction":[{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" }],
"datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}]
}
, {
"dename":"TransactionCurrency",
"delogicname":"货币",
"sysmoudle":{"id":"BASE","name":"Base"},
......
......@@ -587,6 +587,14 @@ public class SalesOrderDetailDTO extends DTOBase implements Serializable {
@JsonProperty("productname")
private String productname;
/**
* 属性 [UOMNAME]
*
*/
@JSONField(name = "uomname")
@JsonProperty("uomname")
private String uomname;
/**
* 设置 [SHIPTO_NAME]
......@@ -1108,6 +1116,14 @@ public class SalesOrderDetailDTO extends DTOBase implements Serializable {
this.modify("productname",productname);
}
/**
* 设置 [UOMNAME]
*/
public void setUomname(String uomname){
this.uomname = uomname ;
this.modify("uomname",uomname);
}
}
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对象[UomDTO]
*/
@Data
public class UomDTO extends DTOBase implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 属性 [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;
/**
* 属性 [BASEUOMNAME]
*
*/
@JSONField(name = "baseuomname")
@JsonProperty("baseuomname")
private String baseuomname;
/**
* 属性 [UPDATEMAN]
*
*/
@JSONField(name = "updateman")
@JsonProperty("updateman")
private String updateman;
/**
* 属性 [CREATEMAN]
*
*/
@JSONField(name = "createman")
@JsonProperty("createman")
private String createman;
/**
* 属性 [VERSIONNUMBER]
*
*/
@JSONField(name = "versionnumber")
@JsonProperty("versionnumber")
private BigInteger versionnumber;
/**
* 属性 [QUANTITY]
*
*/
@JSONField(name = "quantity")
@JsonProperty("quantity")
private BigDecimal quantity;
/**
* 属性 [UOMID]
*
*/
@JSONField(name = "uomid")
@JsonProperty("uomid")
private String uomid;
/**
* 属性 [SCHEDULEBASEUOM]
*
*/
@JSONField(name = "schedulebaseuom")
@JsonProperty("schedulebaseuom")
private Integer schedulebaseuom;
/**
* 属性 [ORGANIZATIONID]
*
*/
@JSONField(name = "organizationid")
@JsonProperty("organizationid")
private String organizationid;
/**
* 属性 [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;
/**
* 属性 [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;
/**
* 属性 [UOMNAME]
*
*/
@JSONField(name = "uomname")
@JsonProperty("uomname")
private String uomname;
/**
* 属性 [UTCCONVERSIONTIMEZONECODE]
*
*/
@JSONField(name = "utcconversiontimezonecode")
@JsonProperty("utcconversiontimezonecode")
private Integer utcconversiontimezonecode;
/**
* 属性 [TIMEZONERULEVERSIONNUMBER]
*
*/
@JSONField(name = "timezoneruleversionnumber")
@JsonProperty("timezoneruleversionnumber")
private Integer timezoneruleversionnumber;
/**
* 属性 [IMPORTSEQUENCENUMBER]
*
*/
@JSONField(name = "importsequencenumber")
@JsonProperty("importsequencenumber")
private Integer importsequencenumber;
/**
* 属性 [UOMSCHEDULEID]
*
*/
@JSONField(name = "uomscheduleid")
@JsonProperty("uomscheduleid")
private String uomscheduleid;
/**
* 属性 [BASEUOM]
*
*/
@JSONField(name = "baseuom")
@JsonProperty("baseuom")
private String baseuom;
/**
* 设置 [OVERRIDDENCREATEDON]
*/
public void setOverriddencreatedon(Timestamp overriddencreatedon){
this.overriddencreatedon = overriddencreatedon ;
this.modify("overriddencreatedon",overriddencreatedon);
}
/**
* 设置 [BASEUOMNAME]
*/
public void setBaseuomname(String baseuomname){
this.baseuomname = baseuomname ;
this.modify("baseuomname",baseuomname);
}
/**
* 设置 [VERSIONNUMBER]
*/
public void setVersionnumber(BigInteger versionnumber){
this.versionnumber = versionnumber ;
this.modify("versionnumber",versionnumber);
}
/**
* 设置 [QUANTITY]
*/
public void setQuantity(BigDecimal quantity){
this.quantity = quantity ;
this.modify("quantity",quantity);
}
/**
* 设置 [SCHEDULEBASEUOM]
*/
public void setSchedulebaseuom(Integer schedulebaseuom){
this.schedulebaseuom = schedulebaseuom ;
this.modify("schedulebaseuom",schedulebaseuom);
}
/**
* 设置 [ORGANIZATIONID]
*/
public void setOrganizationid(String organizationid){
this.organizationid = organizationid ;
this.modify("organizationid",organizationid);
}
/**
* 设置 [UOMNAME]
*/
public void setUomname(String uomname){
this.uomname = uomname ;
this.modify("uomname",uomname);
}
/**
* 设置 [UTCCONVERSIONTIMEZONECODE]
*/
public void setUtcconversiontimezonecode(Integer utcconversiontimezonecode){
this.utcconversiontimezonecode = utcconversiontimezonecode ;
this.modify("utcconversiontimezonecode",utcconversiontimezonecode);
}
/**
* 设置 [TIMEZONERULEVERSIONNUMBER]
*/
public void setTimezoneruleversionnumber(Integer timezoneruleversionnumber){
this.timezoneruleversionnumber = timezoneruleversionnumber ;
this.modify("timezoneruleversionnumber",timezoneruleversionnumber);
}
/**
* 设置 [IMPORTSEQUENCENUMBER]
*/
public void setImportsequencenumber(Integer importsequencenumber){
this.importsequencenumber = importsequencenumber ;
this.modify("importsequencenumber",importsequencenumber);
}
/**
* 设置 [UOMSCHEDULEID]
*/
public void setUomscheduleid(String uomscheduleid){
this.uomscheduleid = uomscheduleid ;
this.modify("uomscheduleid",uomscheduleid);
}
/**
* 设置 [BASEUOM]
*/
public void setBaseuom(String baseuom){
this.baseuom = baseuom ;
this.modify("baseuom",baseuom);
}
}
package cn.ibizlab.businesscentral.centralapi.mapping;
import org.mapstruct.*;
import cn.ibizlab.businesscentral.core.base.domain.Uom;
import cn.ibizlab.businesscentral.centralapi.dto.UomDTO;
import cn.ibizlab.businesscentral.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {},
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface UomMapping extends MappingBase<UomDTO, Uom> {
}
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.base.domain.Uom;
import cn.ibizlab.businesscentral.core.base.service.IUomService;
import cn.ibizlab.businesscentral.core.base.filter.UomSearchContext;
@Slf4j
@Api(tags = {"计价单位" })
@RestController("CentralApi-uom")
@RequestMapping("")
public class UomResource {
@Autowired
public IUomService uomService;
@Autowired
@Lazy
public UomMapping uomMapping;
@ApiOperation(value = "获取计价单位草稿", tags = {"计价单位" }, notes = "获取计价单位草稿")
@RequestMapping(method = RequestMethod.GET, value = "/uoms/getdraft")
public ResponseEntity<UomDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(uomMapping.toDto(uomService.getDraft(new Uom())));
}
@PreAuthorize("hasPermission(this.uomMapping.toDomain(#uomdto),'iBizBusinessCentral-Uom-Save')")
@ApiOperation(value = "保存计价单位", tags = {"计价单位" }, notes = "保存计价单位")
@RequestMapping(method = RequestMethod.POST, value = "/uoms/save")
public ResponseEntity<Boolean> save(@RequestBody UomDTO uomdto) {
return ResponseEntity.status(HttpStatus.OK).body(uomService.save(uomMapping.toDomain(uomdto)));
}
@PreAuthorize("hasPermission(this.uomMapping.toDomain(#uomdtos),'iBizBusinessCentral-Uom-Save')")
@ApiOperation(value = "批量保存计价单位", tags = {"计价单位" }, notes = "批量保存计价单位")
@RequestMapping(method = RequestMethod.POST, value = "/uoms/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<UomDTO> uomdtos) {
uomService.saveBatch(uomMapping.toDomain(uomdtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PostAuthorize("hasPermission(this.uomMapping.toDomain(returnObject.body),'iBizBusinessCentral-Uom-Get')")
@ApiOperation(value = "获取计价单位", tags = {"计价单位" }, notes = "获取计价单位")
@RequestMapping(method = RequestMethod.GET, value = "/uoms/{uom_id}")
public ResponseEntity<UomDTO> get(@PathVariable("uom_id") String uom_id) {
Uom domain = uomService.get(uom_id);
UomDTO dto = uomMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.uomMapping.toDomain(#uomdto),'iBizBusinessCentral-Uom-Create')")
@ApiOperation(value = "新建计价单位", tags = {"计价单位" }, notes = "新建计价单位")
@RequestMapping(method = RequestMethod.POST, value = "/uoms")
@Transactional
public ResponseEntity<UomDTO> create(@RequestBody UomDTO uomdto) {
Uom domain = uomMapping.toDomain(uomdto);
uomService.create(domain);
UomDTO dto = uomMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.uomMapping.toDomain(#uomdtos),'iBizBusinessCentral-Uom-Create')")
@ApiOperation(value = "批量新建计价单位", tags = {"计价单位" }, notes = "批量新建计价单位")
@RequestMapping(method = RequestMethod.POST, value = "/uoms/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<UomDTO> uomdtos) {
uomService.createBatch(uomMapping.toDomain(uomdtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@ApiOperation(value = "检查计价单位", tags = {"计价单位" }, notes = "检查计价单位")
@RequestMapping(method = RequestMethod.POST, value = "/uoms/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody UomDTO uomdto) {
return ResponseEntity.status(HttpStatus.OK).body(uomService.checkKey(uomMapping.toDomain(uomdto)));
}
@PreAuthorize("hasPermission(this.uomService.get(#uom_id),'iBizBusinessCentral-Uom-Remove')")
@ApiOperation(value = "删除计价单位", tags = {"计价单位" }, notes = "删除计价单位")
@RequestMapping(method = RequestMethod.DELETE, value = "/uoms/{uom_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("uom_id") String uom_id) {
return ResponseEntity.status(HttpStatus.OK).body(uomService.remove(uom_id));
}
@PreAuthorize("hasPermission(this.uomService.getUomByIds(#ids),'iBizBusinessCentral-Uom-Remove')")
@ApiOperation(value = "批量删除计价单位", tags = {"计价单位" }, notes = "批量删除计价单位")
@RequestMapping(method = RequestMethod.DELETE, value = "/uoms/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) {
uomService.removeBatch(ids);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasPermission(this.uomService.get(#uom_id),'iBizBusinessCentral-Uom-Update')")
@ApiOperation(value = "更新计价单位", tags = {"计价单位" }, notes = "更新计价单位")
@RequestMapping(method = RequestMethod.PUT, value = "/uoms/{uom_id}")
@Transactional
public ResponseEntity<UomDTO> update(@PathVariable("uom_id") String uom_id, @RequestBody UomDTO uomdto) {
Uom domain = uomMapping.toDomain(uomdto);
domain .setUomid(uom_id);
uomService.update(domain );
UomDTO dto = uomMapping.toDto(domain );
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.uomService.getUomByEntities(this.uomMapping.toDomain(#uomdtos)),'iBizBusinessCentral-Uom-Update')")
@ApiOperation(value = "批量更新计价单位", tags = {"计价单位" }, notes = "批量更新计价单位")
@RequestMapping(method = RequestMethod.PUT, value = "/uoms/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<UomDTO> uomdtos) {
uomService.updateBatch(uomMapping.toDomain(uomdtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Uom-searchDefault-all')")
@ApiOperation(value = "获取DEFAULT", tags = {"计价单位" } ,notes = "获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/uoms/fetchdefault")
public ResponseEntity<List<UomDTO>> fetchDefault(UomSearchContext context) {
Page<Uom> domains = uomService.searchDefault(context) ;
List<UomDTO> list = uomMapping.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-Uom-searchDefault-all')")
@ApiOperation(value = "查询DEFAULT", tags = {"计价单位" } ,notes = "查询DEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/uoms/searchdefault")
public ResponseEntity<Page<UomDTO>> searchDefault(@RequestBody UomSearchContext context) {
Page<Uom> domains = uomService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(uomMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册