提交 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
此差异已折叠。
......@@ -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": "市场活动",
......
......@@ -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
/**
* 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
<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());
}
}
......
......@@ -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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册