Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
iBiz企业中心
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz企业套件
iBiz企业中心
提交
6459f6b4
提交
6459f6b4
编写于
6月 29, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
xignzi006 发布系统代码
上级
3152952a
变更
48
隐藏空白字符变更
内嵌
并排
正在显示
48 个修改的文件
包含
2766 行增加
和
561 行删除
+2766
-561
view-config.json
app_CRM/public/assets/json/view-config.json
+40
-0
sales-order-detail.ts
app_CRM/src/interface/entity/sales-order-detail.ts
+8
-0
uom.ts
app_CRM/src/interface/entity/uom.ts
+144
-0
en-US.ts
app_CRM/src/locale/lang/en-US.ts
+2
-0
zh-CN.ts
app_CRM/src/locale/lang/zh-CN.ts
+2
-0
product_en_US.ts
app_CRM/src/locale/lanres/entities/product/product_en_US.ts
+8
-0
product_zh_CN.ts
app_CRM/src/locale/lanres/entities/product/product_zh_CN.ts
+8
-0
sales-order-detail_en_US.ts
...s/entities/sales-order-detail/sales-order-detail_en_US.ts
+15
-41
sales-order-detail_zh_CN.ts
...s/entities/sales-order-detail/sales-order-detail_zh_CN.ts
+15
-41
sales-order_en_US.ts
...c/locale/lanres/entities/sales-order/sales-order_en_US.ts
+7
-0
sales-order_zh_CN.ts
...c/locale/lanres/entities/sales-order/sales-order_zh_CN.ts
+7
-0
uom_en_US.ts
app_CRM/src/locale/lanres/entities/uom/uom_en_US.ts
+48
-0
uom_zh_CN.ts
app_CRM/src/locale/lanres/entities/uom/uom_zh_CN.ts
+47
-0
uoms.ts
app_CRM/src/mock/entity/uoms/uoms.ts
+380
-0
index.ts
app_CRM/src/mock/index.ts
+1
-0
viewconfig.ts
app_CRM/src/mock/viewconfig/viewconfig.ts
+32
-0
sales-order-detail-edit-view-base.tsx
...er-detail-edit-view/sales-order-detail-edit-view-base.tsx
+14
-442
sales-order-detail-edit-view.vue
...s-order-detail-edit-view/sales-order-detail-edit-view.vue
+1
-1
page-register.ts
app_CRM/src/pages/ungroup/central/page-register.ts
+4
-0
router.ts
app_CRM/src/pages/ungroup/central/router.ts
+56
-0
entity-service-register.ts
app_CRM/src/service/entity-service-register.ts
+1
-0
uom-service-base.ts
app_CRM/src/service/uom/uom-service-base.ts
+177
-0
uom-service.ts
app_CRM/src/service/uom/uom-service.ts
+25
-0
state.ts
app_CRM/src/store/modules/view-action/state.ts
+2
-0
product-ui-service-base.ts
app_CRM/src/uiservice/product/product-ui-service-base.ts
+2
-0
ui-service-register.ts
app_CRM/src/uiservice/ui-service-register.ts
+1
-0
uom-ui-service-base.ts
app_CRM/src/uiservice/uom/uom-ui-service-base.ts
+212
-0
uom-ui-service.ts
app_CRM/src/uiservice/uom/uom-ui-service.ts
+21
-0
soproduct-edit-form-base.tsx
...r-detail/soproduct-edit-form/soproduct-edit-form-base.tsx
+193
-0
soproduct-edit-form-model.ts
...r-detail/soproduct-edit-form/soproduct-edit-form-model.ts
+111
-0
soproduct-edit-form-service.ts
...detail/soproduct-edit-form/soproduct-edit-form-service.ts
+395
-0
soproduct-edit-form.html
...order-detail/soproduct-edit-form/soproduct-edit-form.html
+94
-0
soproduct-edit-form.vue
...-order-detail/soproduct-edit-form/soproduct-edit-form.vue
+22
-0
info-form-base.tsx
app_CRM/src/widgets/sales-order/info-form/info-form-base.tsx
+44
-0
info-form-model.ts
app_CRM/src/widgets/sales-order/info-form/info-form-model.ts
+30
-0
info-form.html
app_CRM/src/widgets/sales-order/info-form/info-form.html
+50
-0
quick-create-form-base.tsx
.../sales-order/quick-create-form/quick-create-form-base.tsx
+4
-4
application-crm-prod.yml
...ntral-app-crm/src/main/resources/application-crm-prod.yml
+4
-0
SalesOrderDetail.java
...b/businesscentral/core/sales/domain/SalesOrderDetail.java
+15
-0
SalesOrderDetailSearchContext.java
...tral/core/sales/filter/SalesOrderDetailSearchContext.java
+14
-0
SalesOrderDetailServiceImpl.java
.../core/sales/service/impl/SalesOrderDetailServiceImpl.java
+10
-0
h2_table.xml
...esscentral-core/src/main/resources/liquibase/h2_table.xml
+31
-29
SalesOrderDetailMapper.xml
.../mapper/sales/salesorderdetail/SalesOrderDetailMapper.xml
+3
-3
systemResource.json
...al-core/src/main/resources/permission/systemResource.json
+8
-0
SalesOrderDetailDTO.java
...b/businesscentral/centralapi/dto/SalesOrderDetailDTO.java
+16
-0
UomDTO.java
...ava/cn/ibizlab/businesscentral/centralapi/dto/UomDTO.java
+264
-0
UomMapping.java
...bizlab/businesscentral/centralapi/mapping/UomMapping.java
+16
-0
UomResource.java
.../ibizlab/businesscentral/centralapi/rest/UomResource.java
+162
-0
未找到文件。
app_CRM/public/assets/json/view-config.json
浏览文件 @
6459f6b4
...
...
@@ -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"
:
"市场活动"
,
...
...
app_CRM/src/interface/entity/sales-order-detail.ts
浏览文件 @
6459f6b4
...
...
@@ -565,4 +565,12 @@ export interface SalesOrderDetail {
* @memberof SalesOrderDetail
*/
productname
?:
any
;
/**
* 计价单位
*
* @returns {*}
* @memberof SalesOrderDetail
*/
uomname
?:
any
;
}
\ No newline at end of file
app_CRM/src/interface/entity/uom.ts
0 → 100644
浏览文件 @
6459f6b4
/**
* 计价单位
*
* @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
app_CRM/src/locale/lang/en-US.ts
浏览文件 @
6459f6b4
...
...
@@ -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
,
...
...
app_CRM/src/locale/lang/zh-CN.ts
浏览文件 @
6459f6b4
...
...
@@ -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
,
...
...
app_CRM/src/locale/lanres/entities/product/product_en_US.ts
浏览文件 @
6459f6b4
...
...
@@ -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
:
{
...
...
app_CRM/src/locale/lanres/entities/product/product_zh_CN.ts
浏览文件 @
6459f6b4
...
...
@@ -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
:
{
...
...
app_CRM/src/locale/lanres/entities/sales-order-detail/sales-order-detail_en_US.ts
浏览文件 @
6459f6b4
...
...
@@ -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
:
"关闭"
,
},
},
};
app_CRM/src/locale/lanres/entities/sales-order-detail/sales-order-detail_zh_CN.ts
浏览文件 @
6459f6b4
...
...
@@ -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
app_CRM/src/locale/lanres/entities/sales-order/sales-order_en_US.ts
浏览文件 @
6459f6b4
...
...
@@ -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
:
"客户"
,
...
...
app_CRM/src/locale/lanres/entities/sales-order/sales-order_zh_CN.ts
浏览文件 @
6459f6b4
...
...
@@ -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
:
"客户"
,
...
...
app_CRM/src/locale/lanres/entities/uom/uom_en_US.ts
0 → 100644
浏览文件 @
6459f6b4
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
:
{
},
},
};
app_CRM/src/locale/lanres/entities/uom/uom_zh_CN.ts
0 → 100644
浏览文件 @
6459f6b4
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
app_CRM/src/mock/entity/uoms/uoms.ts
0 → 100644
浏览文件 @
6459f6b4
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
:{}];
});
app_CRM/src/mock/index.ts
浏览文件 @
6459f6b4
...
...
@@ -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'
;
...
...
app_CRM/src/mock/viewconfig/viewconfig.ts
浏览文件 @
6459f6b4
...
...
@@ -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"
:
"市场活动"
,
...
...
app_CRM/src/pages/sales/sales-order-detail-edit-view/sales-order-detail-edit-view-base.tsx
浏览文件 @
6459f6b4
...
...
@@ -63,20 +63,9 @@ export class SalesOrderDetailEditViewBase extends EditViewBase {
* @memberof SalesOrderDetailEditView
*/
public
toolBarModels
:
any
=
{
tbitem
3
:
{
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
:
''
},
tbitem
1
:
{
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_tbitem
7
_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
public
toolbar_tbitem
2
_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
...
...
@@ -297,202 +209,9 @@ export class SalesOrderDetailEditViewBase extends EditViewBase {
datas
=
[
params
];
}
// 界面行为
this
.
RemoveAnd
Exit
(
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
SaveAndStar
t
(
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
Exi
t
(
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
app_CRM/src/pages/sales/sales-order-detail-edit-view/sales-order-detail-edit-view.vue
浏览文件 @
6459f6b4
...
...
@@ -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';
/**
* 订单产品编辑视图视图
...
...
app_CRM/src/pages/ungroup/central/page-register.ts
浏览文件 @
6459f6b4
...
...
@@ -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'
));
...
...
app_CRM/src/pages/ungroup/central/router.ts
浏览文件 @
6459f6b4
...
...
@@ -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
:
{
...
...
app_CRM/src/service/entity-service-register.ts
浏览文件 @
6459f6b4
...
...
@@ -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'
));
...
...
app_CRM/src/service/uom/uom-service-base.ts
0 → 100644
浏览文件 @
6459f6b4
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
app_CRM/src/service/uom/uom-service.ts
0 → 100644
浏览文件 @
6459f6b4
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
app_CRM/src/store/modules/view-action/state.ts
浏览文件 @
6459f6b4
...
...
@@ -1107,6 +1107,8 @@ export const viewstate: any = {
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'ba34ee36c1d0de288403607e17e7eb3e'
,
'd3692664b9e2e150526e1ce4b969f15b'
,
],
},
{
...
...
app_CRM/src/uiservice/product/product-ui-service-base.ts
浏览文件 @
6459f6b4
...
...
@@ -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'
});
}
/**
...
...
app_CRM/src/uiservice/ui-service-register.ts
浏览文件 @
6459f6b4
...
...
@@ -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'
));
...
...
app_CRM/src/uiservice/uom/uom-ui-service-base.ts
0 → 100644
浏览文件 @
6459f6b4
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
app_CRM/src/uiservice/uom/uom-ui-service.ts
0 → 100644
浏览文件 @
6459f6b4
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
app_CRM/src/widgets/sales-order-detail/soproduct-edit-form/soproduct-edit-form-base.tsx
0 → 100644
浏览文件 @
6459f6b4
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
app_CRM/src/widgets/sales-order-detail/soproduct-edit-form/soproduct-edit-form-model.ts
0 → 100644
浏览文件 @
6459f6b4
/**
* 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
app_CRM/src/widgets/sales-order-detail/soproduct-edit-form/soproduct-edit-form-service.ts
0 → 100644
浏览文件 @
6459f6b4
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
app_CRM/src/widgets/sales-order-detail/soproduct-edit-form/soproduct-edit-form.html
0 → 100644
浏览文件 @
6459f6b4
<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
app_CRM/src/widgets/sales-order-detail/soproduct-edit-form/soproduct-edit-form.vue
0 → 100644
浏览文件 @
6459f6b4
<
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>
app_CRM/src/widgets/sales-order/info-form/info-form-base.tsx
浏览文件 @
6459f6b4
...
...
@@ -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
}),
...
...
app_CRM/src/widgets/sales-order/info-form/info-form-model.ts
浏览文件 @
6459f6b4
...
...
@@ -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'
,
...
...
app_CRM/src/widgets/sales-order/info-form/info-form.html
浏览文件 @
6459f6b4
...
...
@@ -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"
>
...
...
app_CRM/src/widgets/sales-order/quick-create-form/quick-create-form-base.tsx
浏览文件 @
6459f6b4
...
...
@@ -113,12 +113,12 @@ export class QuickCreateEditFormBase extends EditFormControlBase {
{
required
:
true
,
type
:
'string'
,
message
:
'销售订单名称 值不能为空'
,
trigger
:
'blur'
},
],
transactioncurrencyname
:
[
{
required
:
fals
e
,
type
:
'string'
,
message
:
'货币 值不能为空'
,
trigger
:
'change'
},
{
required
:
fals
e
,
type
:
'string'
,
message
:
'货币 值不能为空'
,
trigger
:
'blur'
},
{
required
:
tru
e
,
type
:
'string'
,
message
:
'货币 值不能为空'
,
trigger
:
'change'
},
{
required
:
tru
e
,
type
:
'string'
,
message
:
'货币 值不能为空'
,
trigger
:
'blur'
},
],
pricelevelname
:
[
{
required
:
fals
e
,
type
:
'string'
,
message
:
'价目表 值不能为空'
,
trigger
:
'change'
},
{
required
:
fals
e
,
type
:
'string'
,
message
:
'价目表 值不能为空'
,
trigger
:
'blur'
},
{
required
:
tru
e
,
type
:
'string'
,
message
:
'价目表 值不能为空'
,
trigger
:
'change'
},
{
required
:
tru
e
,
type
:
'string'
,
message
:
'价目表 值不能为空'
,
trigger
:
'blur'
},
],
salesorderid
:
[
{
required
:
false
,
type
:
'string'
,
message
:
'订单 值不能为空'
,
trigger
:
'change'
},
...
...
businesscentral-app/businesscentral-app-crm/src/main/resources/application-crm-prod.yml
浏览文件 @
6459f6b4
...
...
@@ -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
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/sales/domain/SalesOrderDetail.java
浏览文件 @
6459f6b4
...
...
@@ -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
);
}
}
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/sales/filter/SalesOrderDetailSearchContext.java
浏览文件 @
6459f6b4
...
...
@@ -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
);
}
}
/**
* 启用快速搜索
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/sales/service/impl/SalesOrderDetailServiceImpl.java
浏览文件 @
6459f6b4
...
...
@@ -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
());
}
}
...
...
businesscentral-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
6459f6b4
...
...
@@ -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-3
4
-91"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-product-3
6
-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-3
3
-95"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-salesorder-3
9
-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-3
4
-349"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-product-3
6
-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-3
4
-350"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-product-3
6
-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-3
4
-351"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-product-3
6
-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-3
4
-352"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-product-3
6
-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-3
4
-353"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-product-3
6
-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-3
4
-354"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-product-3
6
-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-3
3
-360"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-salesorder-3
9
-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-3
3
-361"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-salesorder-3
9
-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-3
3
-362"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-salesorder-3
9
-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-3
3
-363"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-salesorder-3
9
-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-3
3
-364"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-salesorder-3
9
-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-3
3
-365"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-salesorder-3
9
-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]外键关系 -->
...
...
businesscentral-core/src/main/resources/mapper/sales/salesorderdetail/SalesOrderDetailMapper.xml
浏览文件 @
6459f6b4
...
...
@@ -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.`U
OMNAME`, t1.`U
PDATEDATE`, 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.`U
OMNAME`, t1.`U
PDATEDATE`, 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.`U
OMNAME`, t1.`U
PDATEDATE`, t1.`UPDATEMAN`, t1.`UTCCONVERSIONTIMEZONECODE`, t1.`VERSIONNUMBER`, t1.`VOLUMEDISCOUNTAMOUNT`, t1.`VOLUMEDISCOUNTAMOUNT_BASE`, t1.`WILLCALL` FROM `SALESORDERDETAIL` t1
]]>
</sql>
</mapper>
...
...
businesscentral-core/src/main/resources/permission/systemResource.json
浏览文件 @
6459f6b4
...
...
@@ -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"
},
...
...
businesscentral-provider/businesscentral-provider-centralapi/src/main/java/cn/ibizlab/businesscentral/centralapi/dto/SalesOrderDetailDTO.java
浏览文件 @
6459f6b4
...
...
@@ -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
);
}
}
businesscentral-provider/businesscentral-provider-centralapi/src/main/java/cn/ibizlab/businesscentral/centralapi/dto/UomDTO.java
0 → 100644
浏览文件 @
6459f6b4
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
);
}
}
businesscentral-provider/businesscentral-provider-centralapi/src/main/java/cn/ibizlab/businesscentral/centralapi/mapping/UomMapping.java
0 → 100644
浏览文件 @
6459f6b4
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
>
{
}
businesscentral-provider/businesscentral-provider-centralapi/src/main/java/cn/ibizlab/businesscentral/centralapi/rest/UomResource.java
0 → 100644
浏览文件 @
6459f6b4
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
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录