Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
iBiz企业中心
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz企业套件
iBiz企业中心
提交
1c00c80e
提交
1c00c80e
编写于
7月 09, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
lab_gzf 发布系统代码
上级
5a41b2b6
变更
29
显示空白字符变更
内嵌
并排
正在显示
29 个修改的文件
包含
2042 行增加
和
0 行删除
+2042
-0
data-dictionary.json
app_CRM/public/assets/json/data-dictionary.json
+57
-0
view-config.json
app_CRM/public/assets/json/view-config.json
+10
-0
codelist_en_US.ts
app_CRM/src/locale/lanres/codelist/codelist_en_US.ts
+8
-0
codelist_zh_CN.ts
app_CRM/src/locale/lanres/codelist/codelist_zh_CN.ts
+8
-0
sales-order_en_US.ts
...c/locale/lanres/entities/sales-order/sales-order_en_US.ts
+47
-0
sales-order_zh_CN.ts
...c/locale/lanres/entities/sales-order/sales-order_zh_CN.ts
+47
-0
codelist.ts
app_CRM/src/mock/codelist/codelist.ts
+57
-0
viewconfig.ts
app_CRM/src/mock/viewconfig/viewconfig.ts
+8
-0
sales-order-edit-data-panel-view-base.tsx
...data-panel-view/sales-order-edit-data-panel-view-base.tsx
+155
-0
sales-order-edit-data-panel-view.html
...dit-data-panel-view/sales-order-edit-data-panel-view.html
+24
-0
sales-order-edit-data-panel-view.vue
...edit-data-panel-view/sales-order-edit-data-panel-view.vue
+22
-0
sales-order-info-view-base.tsx
...ales/sales-order-info-view/sales-order-info-view-base.tsx
+18
-0
sales-order-info-view.html
...es/sales/sales-order-info-view/sales-order-info-view.html
+21
-0
sales-order-info-view.vue
...ges/sales/sales-order-info-view/sales-order-info-view.vue
+2
-0
page-register.ts
app_CRM/src/pages/ungroup/central/page-register.ts
+1
-0
router.ts
app_CRM/src/pages/ungroup/central/router.ts
+97
-0
state.ts
app_CRM/src/store/modules/view-action/state.ts
+10
-0
sales-order-ui-service-base.ts
.../src/uiservice/sales-order/sales-order-ui-service-base.ts
+69
-0
data-panel-form-base.tsx
...gets/sales-order/data-panel-form/data-panel-form-base.tsx
+162
-0
data-panel-form-model.ts
...gets/sales-order/data-panel-form/data-panel-form-model.ts
+86
-0
data-panel-form-service.ts
...ts/sales-order/data-panel-form/data-panel-form-service.ts
+371
-0
data-panel-form.html
.../widgets/sales-order/data-panel-form/data-panel-form.html
+53
-0
data-panel-form.less
.../widgets/sales-order/data-panel-form/data-panel-form.less
+32
-0
data-panel-form.vue
...c/widgets/sales-order/data-panel-form/data-panel-form.vue
+25
-0
edit-date-panel-form-base.tsx
...-order/edit-date-panel-form/edit-date-panel-form-base.tsx
+127
-0
edit-date-panel-form-model.ts
...-order/edit-date-panel-form/edit-date-panel-form-model.ts
+86
-0
edit-date-panel-form-service.ts
...rder/edit-date-panel-form/edit-date-panel-form-service.ts
+371
-0
edit-date-panel-form.html
...ales-order/edit-date-panel-form/edit-date-panel-form.html
+46
-0
edit-date-panel-form.vue
...sales-order/edit-date-panel-form/edit-date-panel-form.vue
+22
-0
未找到文件。
app_CRM/public/assets/json/data-dictionary.json
浏览文件 @
1c00c80e
...
...
@@ -180,6 +180,63 @@
}
]
},
{
"srfkey"
:
"Salesorder__StateCode"
,
"emptytext"
:
"未定义"
,
"codelisttype"
:
"static"
,
"items"
:
[
{
"id"
:
"2"
,
"label"
:
"已取消"
,
"text"
:
"已取消"
,
"data"
:
""
,
"codename"
:
"Item_2"
,
"value"
:
"2"
,
"disabled"
:
false
}
,
{
"id"
:
"3"
,
"label"
:
"已完成"
,
"text"
:
"已完成"
,
"data"
:
""
,
"codename"
:
"Item_3"
,
"value"
:
"3"
,
"disabled"
:
false
}
,
{
"id"
:
"4"
,
"label"
:
"已开发票"
,
"text"
:
"已开发票"
,
"data"
:
""
,
"codename"
:
"Item_4"
,
"value"
:
"4"
,
"disabled"
:
false
}
,
{
"id"
:
"1"
,
"label"
:
"已提交"
,
"text"
:
"已提交"
,
"data"
:
""
,
"codename"
:
"Item_1"
,
"value"
:
"1"
,
"disabled"
:
false
}
,
{
"id"
:
"0"
,
"label"
:
"有效"
,
"text"
:
"有效"
,
"data"
:
""
,
"codename"
:
"Item_0"
,
"value"
:
"0"
,
"disabled"
:
false
}
]
},
{
"srfkey"
:
"List__MemberType"
,
"emptytext"
:
"未定义"
,
...
...
app_CRM/public/assets/json/view-config.json
浏览文件 @
1c00c80e
...
...
@@ -159,6 +159,16 @@
"viewtag"
:
"07c5035fbb847e889f3dbb9657723f30"
,
"memo"
:
""
},
"salesorderedit_datapanelview"
:
{
"title"
:
"头部信息编辑"
,
"caption"
:
"订单"
,
"viewtype"
:
"DEEDITVIEW"
,
"viewmodule"
:
"Sales"
,
"viewname"
:
"SalesOrderEdit_DataPanelView"
,
"viewfilename"
:
"sales-order-edit-data-panel-view"
,
"viewtag"
:
"07e302308381c2bc8f62fac18515f689"
,
"memo"
:
""
},
"accountbyparentkey"
:
{
"title"
:
"客户表格视图"
,
"caption"
:
"客户信息"
,
...
...
app_CRM/src/locale/lanres/codelist/codelist_en_US.ts
浏览文件 @
1c00c80e
...
...
@@ -24,6 +24,14 @@ export default {
"2"
:
"赢单"
,
"empty"
:
""
},
Salesorder__StateCode
:
{
"2"
:
"已取消"
,
"3"
:
"已完成"
,
"4"
:
"已开发票"
,
"1"
:
"已提交"
,
"0"
:
"有效"
,
"empty"
:
""
},
List__MemberType
:
{
"Account"
:
"客户"
,
"Lead"
:
"潜在客户"
,
...
...
app_CRM/src/locale/lanres/codelist/codelist_zh_CN.ts
浏览文件 @
1c00c80e
...
...
@@ -24,6 +24,14 @@ export default {
"2"
:
"赢单"
,
"empty"
:
""
,
},
Salesorder__StateCode
:
{
"2"
:
"已取消"
,
"3"
:
"已完成"
,
"4"
:
"已开发票"
,
"1"
:
"已提交"
,
"0"
:
"有效"
,
"empty"
:
""
,
},
List__MemberType
:
{
"Account"
:
"客户"
,
"Lead"
:
"潜在客户"
,
...
...
app_CRM/src/locale/lanres/entities/sales-order/sales-order_en_US.ts
浏览文件 @
1c00c80e
...
...
@@ -109,6 +109,10 @@ export default {
caption
:
"订单"
,
title
:
"订单状态分页视图"
,
},
edit_datapanelview
:
{
caption
:
"订单"
,
title
:
"头部信息编辑"
,
},
editview
:
{
caption
:
"订单"
,
title
:
"订单编辑视图"
,
...
...
@@ -225,6 +229,49 @@ export default {
uiactions
:
{
},
},
edit_datepanel_form
:
{
details
:
{
group1
:
"订单基本信息"
,
formpage1
:
"基本信息"
,
srfupdatedate
:
"更新时间"
,
srforikey
:
""
,
srfkey
:
"订单"
,
srfmajortext
:
"销售订单名称"
,
srftempmode
:
""
,
srfuf
:
""
,
srfdeid
:
""
,
srfsourcekey
:
""
,
totalamount
:
"总金额"
,
statecode
:
"状态"
,
ownername
:
"负责人"
,
salesorderid
:
"订单"
,
},
uiactions
:
{
},
},
datapanel_form
:
{
details
:
{
button1
:
"头信息编辑"
,
grouppanel1
:
"分组面板"
,
group1
:
"订单基本信息"
,
formpage1
:
"基本信息"
,
srfupdatedate
:
"更新时间"
,
srforikey
:
""
,
srfkey
:
"订单"
,
srfmajortext
:
"销售订单名称"
,
srftempmode
:
""
,
srfuf
:
""
,
srfdeid
:
""
,
srfsourcekey
:
""
,
totalamount
:
"总金额"
,
statecode
:
"状态"
,
ownername
:
"负责人"
,
salesorderid
:
"订单"
,
},
uiactions
:
{
salesorder_openedit_datapanelview
:
"头信息编辑"
,
},
},
main_form
:
{
details
:
{
group1
:
"salesorder基本信息"
,
...
...
app_CRM/src/locale/lanres/entities/sales-order/sales-order_zh_CN.ts
浏览文件 @
1c00c80e
...
...
@@ -108,6 +108,10 @@ export default {
caption
:
"订单"
,
title
:
"订单状态分页视图"
,
},
edit_datapanelview
:
{
caption
:
"订单"
,
title
:
"头部信息编辑"
,
},
editview
:
{
caption
:
"订单"
,
title
:
"订单编辑视图"
,
...
...
@@ -224,6 +228,49 @@ export default {
uiactions
:
{
},
},
edit_datepanel_form
:
{
details
:
{
group1
:
"订单基本信息"
,
formpage1
:
"基本信息"
,
srfupdatedate
:
"更新时间"
,
srforikey
:
""
,
srfkey
:
"订单"
,
srfmajortext
:
"销售订单名称"
,
srftempmode
:
""
,
srfuf
:
""
,
srfdeid
:
""
,
srfsourcekey
:
""
,
totalamount
:
"总金额"
,
statecode
:
"状态"
,
ownername
:
"负责人"
,
salesorderid
:
"订单"
,
},
uiactions
:
{
},
},
datapanel_form
:
{
details
:
{
button1
:
"头信息编辑"
,
grouppanel1
:
"分组面板"
,
group1
:
"订单基本信息"
,
formpage1
:
"基本信息"
,
srfupdatedate
:
"更新时间"
,
srforikey
:
""
,
srfkey
:
"订单"
,
srfmajortext
:
"销售订单名称"
,
srftempmode
:
""
,
srfuf
:
""
,
srfdeid
:
""
,
srfsourcekey
:
""
,
totalamount
:
"总金额"
,
statecode
:
"状态"
,
ownername
:
"负责人"
,
salesorderid
:
"订单"
,
},
uiactions
:
{
salesorder_openedit_datapanelview
:
"头信息编辑"
,
},
},
main_form
:
{
details
:
{
group1
:
"salesorder基本信息"
,
...
...
app_CRM/src/mock/codelist/codelist.ts
浏览文件 @
1c00c80e
...
...
@@ -188,6 +188,63 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => {
},
]
},
{
srfkey
:
"Salesorder__StateCode"
,
emptytext
:
"未定义"
,
"codelisttype"
:
"static"
,
items
:
[
{
id
:
"2"
,
label
:
"已取消"
,
text
:
"已取消"
,
"data"
:
""
,
"codename"
:
"Item_2"
,
value
:
"2"
,
disabled
:
false
,
},
{
id
:
"3"
,
label
:
"已完成"
,
text
:
"已完成"
,
"data"
:
""
,
"codename"
:
"Item_3"
,
value
:
"3"
,
disabled
:
false
,
},
{
id
:
"4"
,
label
:
"已开发票"
,
text
:
"已开发票"
,
"data"
:
""
,
"codename"
:
"Item_4"
,
value
:
"4"
,
disabled
:
false
,
},
{
id
:
"1"
,
label
:
"已提交"
,
text
:
"已提交"
,
"data"
:
""
,
"codename"
:
"Item_1"
,
value
:
"1"
,
disabled
:
false
,
},
{
id
:
"0"
,
label
:
"有效"
,
text
:
"有效"
,
"data"
:
""
,
"codename"
:
"Item_0"
,
value
:
"0"
,
disabled
:
false
,
},
]
},
{
srfkey
:
"List__MemberType"
,
emptytext
:
"未定义"
,
...
...
app_CRM/src/mock/viewconfig/viewconfig.ts
浏览文件 @
1c00c80e
...
...
@@ -135,6 +135,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname"
:
"CampaignGridView"
,
"viewtag"
:
"07c5035fbb847e889f3dbb9657723f30"
},
"salesorderedit_datapanelview"
:
{
"title"
:
"头部信息编辑"
,
"caption"
:
"订单"
,
"viewtype"
:
"DEEDITVIEW"
,
"viewmodule"
:
"Sales"
,
"viewname"
:
"SalesOrderEdit_DataPanelView"
,
"viewtag"
:
"07e302308381c2bc8f62fac18515f689"
},
"accountbyparentkey"
:
{
"title"
:
"客户表格视图"
,
"caption"
:
"客户信息"
,
...
...
app_CRM/src/pages/sales/sales-order-edit-data-panel-view/sales-order-edit-data-panel-view-base.tsx
0 → 100644
浏览文件 @
1c00c80e
import
{
Subject
}
from
'rxjs'
;
import
{
EditViewBase
}
from
'@/studio-core'
;
import
SalesOrderService
from
'@/service/sales-order/sales-order-service'
;
import
EditViewEngine
from
'@engine/view/edit-view-engine'
;
/**
* 头部信息编辑视图基类
*
* @export
* @class SalesOrderEdit_DataPanelViewBase
* @extends {EditViewBase}
*/
export
class
SalesOrderEdit_DataPanelViewBase
extends
EditViewBase
{
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof SalesOrderEdit_DataPanelViewBase
*/
protected
appDeName
:
string
=
'salesorder'
;
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof SalesOrderEdit_DataPanelViewBase
*/
protected
appDeKey
:
string
=
'salesorderid'
;
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof SalesOrderEdit_DataPanelViewBase
*/
protected
appDeMajor
:
string
=
'salesordername'
;
/**
* 实体服务对象
*
* @type {SalesOrderService}
* @memberof SalesOrderEdit_DataPanelViewBase
*/
protected
appEntityService
:
SalesOrderService
=
new
SalesOrderService
;
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof SalesOrderEdit_DataPanelViewBase
*/
protected
counterServiceArray
:
Array
<
any
>
=
[];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof SalesOrderEdit_DataPanelViewBase
*/
protected
model
:
any
=
{
srfCaption
:
'entities.salesorder.views.edit_datapanelview.caption'
,
srfTitle
:
'entities.salesorder.views.edit_datapanelview.title'
,
srfSubTitle
:
'entities.salesorder.views.edit_datapanelview.subtitle'
,
dataInfo
:
''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof SalesOrderEdit_DataPanelViewBase
*/
protected
containerModel
:
any
=
{
view_form
:
{
name
:
'form'
,
type
:
'FORM'
},
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected
viewtag
:
string
=
'07e302308381c2bc8f62fac18515f689'
;
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof SalesOrderEdit_DataPanelViewBase
*/
public
engine
:
EditViewEngine
=
new
EditViewEngine
();
/**
* 引擎初始化
*
* @public
* @memberof SalesOrderEdit_DataPanelViewBase
*/
public
engineInit
():
void
{
this
.
engine
.
init
({
view
:
this
,
form
:
this
.
$refs
.
form
,
p2k
:
'0'
,
keyPSDEField
:
'salesorder'
,
majorPSDEField
:
'salesordername'
,
isLoadDefault
:
true
,
});
}
/**
* form 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SalesOrderEdit_DataPanelViewBase
*/
public
form_save
(
$event
:
any
,
$event2
?:
any
):
void
{
this
.
engine
.
onCtrlEvent
(
'form'
,
'save'
,
$event
);
}
/**
* form 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SalesOrderEdit_DataPanelViewBase
*/
public
form_remove
(
$event
:
any
,
$event2
?:
any
):
void
{
this
.
engine
.
onCtrlEvent
(
'form'
,
'remove'
,
$event
);
}
/**
* form 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SalesOrderEdit_DataPanelViewBase
*/
public
form_load
(
$event
:
any
,
$event2
?:
any
):
void
{
this
.
engine
.
onCtrlEvent
(
'form'
,
'load'
,
$event
);
}
}
\ No newline at end of file
app_CRM/src/pages/sales/sales-order-edit-data-panel-view/sales-order-edit-data-panel-view.html
0 → 100644
浏览文件 @
1c00c80e
<studio-view-style2
viewName=
"salesorderedit_datapanelview"
viewTitle=
"头部信息编辑"
class=
'deeditview sales-order-edit-data-panel-view'
>
<view
_form
:viewState=
"viewState"
:viewparams=
"viewparams"
:context=
"context"
:autosave=
"true"
:viewtag=
"viewtag"
:showBusyIndicator=
"true"
updateAction=
"Update"
removeAction=
"Remove"
loaddraftAction=
"GetDraft"
loadAction=
"Get"
createAction=
"Create"
WFSubmitAction=
""
WFStartAction=
""
style=
''
name=
"form"
ref=
'form'
@
save=
"form_save($event)"
@
remove=
"form_remove($event)"
@
load=
"form_load($event)"
@
closeview=
"closeView($event)"
>
</view
_form
>
</studio-view-style2>
\ No newline at end of file
app_CRM/src/pages/sales/sales-order-edit-data-panel-view/sales-order-edit-data-panel-view.vue
0 → 100644
浏览文件 @
1c00c80e
<
template
src=
"./sales-order-edit-data-panel-view.html"
/>
<script
lang=
'tsx'
>
import
{ Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { SalesOrderEdit_DataPanelViewBase } from './sales-order-edit-data-panel-view-base';
import view_form from '@widgets/sales-order/edit-date-panel-form/edit-date-panel-form.vue';
/**
* 头部信息编辑视图
*
* @export
* @class SalesOrderEdit_DataPanelView
* @extends {SalesOrderEdit_DataPanelViewBase}
*/
@Component({
components: {
view_form,
}
})
@VueLifeCycleProcessing()
export default class SalesOrderEdit_DataPanelView extends SalesOrderEdit_DataPanelViewBase { }
</script>
app_CRM/src/pages/sales/sales-order-info-view/sales-order-info-view-base.tsx
浏览文件 @
1c00c80e
...
...
@@ -2,6 +2,7 @@ import { Subject } from 'rxjs';
import
{
TabExpViewBase
}
from
'@/studio-core'
;
import
SalesOrderService
from
'@/service/sales-order/sales-order-service'
;
import
TabExpViewEngine
from
'@engine/view/tab-exp-view-engine'
;
import
DataPanelEngine
from
'@engine/ctrl/data-panel-engine'
;
import
SalesOrderUIService
from
'@/uiservice/sales-order/sales-order-ui-service'
;
/**
...
...
@@ -79,6 +80,7 @@ export class SalesOrderInfoViewBase extends TabExpViewBase {
* @memberof SalesOrderInfoViewBase
*/
protected
containerModel
:
any
=
{
view_datapanel
:
{
name
:
'datapanel'
,
type
:
'FORM'
},
view_toolbar
:
{
name
:
'toolbar'
,
type
:
'TOOLBAR'
},
view_tabexppanel
:
{
name
:
'tabexppanel'
,
type
:
'TABEXPPANEL'
},
};
...
...
@@ -124,6 +126,15 @@ export class SalesOrderInfoViewBase extends TabExpViewBase {
*/
public
engine
:
TabExpViewEngine
=
new
TabExpViewEngine
();
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof SalesOrderInfoViewBase
*/
public
datapanel
:
DataPanelEngine
=
new
DataPanelEngine
();
/**
* 引擎初始化
*
...
...
@@ -137,6 +148,13 @@ export class SalesOrderInfoViewBase extends TabExpViewBase {
majorPSDEField
:
'salesordername'
,
isLoadDefault
:
true
,
});
this
.
datapanel
.
init
({
view
:
this
,
datapanel
:
this
.
$refs
.
datapanel
,
keyPSDEField
:
'salesorder'
,
majorPSDEField
:
'salesordername'
,
isLoadDefault
:
true
,
});
}
/**
...
...
app_CRM/src/pages/sales/sales-order-info-view/sales-order-info-view.html
浏览文件 @
1c00c80e
...
...
@@ -2,6 +2,27 @@
<template
slot=
'title'
>
<span
class=
'caption-info'
>
{{$t(model.srfTitle)}}
</span>
</template>
<template
slot=
"dataPanel"
>
<view
_datapanel
:viewState=
"viewState"
:viewparams=
"viewparams"
:context=
"context"
:autosave=
"false"
:viewtag=
"viewtag"
:showBusyIndicator=
"true"
updateAction=
"Update"
removeAction=
"Remove"
loaddraftAction=
"GetDraft"
loadAction=
"Get"
createAction=
"Create"
WFSubmitAction=
""
WFStartAction=
""
style=
''
name=
"datapanel"
ref=
'datapanel'
@
closeview=
"closeView($event)"
>
</view
_datapanel
>
</template>
<template
slot=
"toolbar"
>
<view-toolbar
mode=
"STYLE2"
:model=
"toolBarModels"
@
item-click=
"toolbar_click($event)"
/>
</template>
<view
_tabexppanel
...
...
app_CRM/src/pages/sales/sales-order-info-view/sales-order-info-view.vue
浏览文件 @
1c00c80e
...
...
@@ -3,6 +3,7 @@
import
{ Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { SalesOrderInfoViewBase } from './sales-order-info-view-base';
import view_datapanel from '@widgets/sales-order/data-panel-form/data-panel-form.vue';
import view_tabexppanel from '@widgets/sales-order/info-viewtabexppanel-tabexppanel/info-viewtabexppanel-tabexppanel.vue';
/**
...
...
@@ -14,6 +15,7 @@ import view_tabexppanel from '@widgets/sales-order/info-viewtabexppanel-tabexppa
*/
@Component({
components: {
view_datapanel,
view_tabexppanel,
}
})
...
...
app_CRM/src/pages/ungroup/central/page-register.ts
浏览文件 @
1c00c80e
...
...
@@ -15,6 +15,7 @@ export const PageComponents = {
Vue
.
component
(
'product-price-level-pro-prilv-edit-view'
,
()
=>
import
(
'@pages/product/product-price-level-pro-prilv-edit-view/product-price-level-pro-prilv-edit-view.vue'
));
Vue
.
component
(
'knowledge-article-incident-edit-view'
,
()
=>
import
(
'@pages/service/knowledge-article-incident-edit-view/knowledge-article-incident-edit-view.vue'
));
Vue
.
component
(
'sales-order-invoice-grid-view'
,
()
=>
import
(
'@pages/sales/sales-order-invoice-grid-view/sales-order-invoice-grid-view.vue'
));
Vue
.
component
(
'sales-order-edit-data-panel-view'
,
()
=>
import
(
'@pages/sales/sales-order-edit-data-panel-view/sales-order-edit-data-panel-view.vue'
));
Vue
.
component
(
'invoice-by-parent-key'
,
()
=>
import
(
'@pages/finance/invoice-by-parent-key/invoice-by-parent-key.vue'
));
Vue
.
component
(
'goal-info-goal-view'
,
()
=>
import
(
'@pages/sales/goal-info-goal-view/goal-info-goal-view.vue'
));
Vue
.
component
(
'goal-info-view'
,
()
=>
import
(
'@pages/sales/goal-info-view/goal-info-view.vue'
));
...
...
app_CRM/src/pages/ungroup/central/router.ts
浏览文件 @
1c00c80e
...
...
@@ -661,6 +661,103 @@ const router = new Router({
},
component
:
()
=>
import
(
'@pages/sales/sales-order-invoice-grid-view/sales-order-invoice-grid-view.vue'
),
},
{
path
:
'accounts/:account?/contacts/:contact?/opportunities/:opportunity?/quotes/:quote?/salesorders/:salesorder?/edit_datapanelview/:edit_datapanelview?'
,
meta
:
{
caption
:
'entities.salesorder.views.edit_datapanelview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'central'
,
parameterName
:
'central'
},
{
pathName
:
'accounts'
,
parameterName
:
'account'
},
{
pathName
:
'contacts'
,
parameterName
:
'contact'
},
{
pathName
:
'opportunities'
,
parameterName
:
'opportunity'
},
{
pathName
:
'quotes'
,
parameterName
:
'quote'
},
{
pathName
:
'salesorders'
,
parameterName
:
'salesorder'
},
{
pathName
:
'edit_datapanelview'
,
parameterName
:
'edit_datapanelview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/sales/sales-order-edit-data-panel-view/sales-order-edit-data-panel-view.vue'
),
},
{
path
:
'contacts/:contact?/opportunities/:opportunity?/quotes/:quote?/salesorders/:salesorder?/edit_datapanelview/:edit_datapanelview?'
,
meta
:
{
caption
:
'entities.salesorder.views.edit_datapanelview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'central'
,
parameterName
:
'central'
},
{
pathName
:
'contacts'
,
parameterName
:
'contact'
},
{
pathName
:
'opportunities'
,
parameterName
:
'opportunity'
},
{
pathName
:
'quotes'
,
parameterName
:
'quote'
},
{
pathName
:
'salesorders'
,
parameterName
:
'salesorder'
},
{
pathName
:
'edit_datapanelview'
,
parameterName
:
'edit_datapanelview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/sales/sales-order-edit-data-panel-view/sales-order-edit-data-panel-view.vue'
),
},
{
path
:
'accounts/:account?/opportunities/:opportunity?/quotes/:quote?/salesorders/:salesorder?/edit_datapanelview/:edit_datapanelview?'
,
meta
:
{
caption
:
'entities.salesorder.views.edit_datapanelview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'central'
,
parameterName
:
'central'
},
{
pathName
:
'accounts'
,
parameterName
:
'account'
},
{
pathName
:
'opportunities'
,
parameterName
:
'opportunity'
},
{
pathName
:
'quotes'
,
parameterName
:
'quote'
},
{
pathName
:
'salesorders'
,
parameterName
:
'salesorder'
},
{
pathName
:
'edit_datapanelview'
,
parameterName
:
'edit_datapanelview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/sales/sales-order-edit-data-panel-view/sales-order-edit-data-panel-view.vue'
),
},
{
path
:
'opportunities/:opportunity?/quotes/:quote?/salesorders/:salesorder?/edit_datapanelview/:edit_datapanelview?'
,
meta
:
{
caption
:
'entities.salesorder.views.edit_datapanelview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'central'
,
parameterName
:
'central'
},
{
pathName
:
'opportunities'
,
parameterName
:
'opportunity'
},
{
pathName
:
'quotes'
,
parameterName
:
'quote'
},
{
pathName
:
'salesorders'
,
parameterName
:
'salesorder'
},
{
pathName
:
'edit_datapanelview'
,
parameterName
:
'edit_datapanelview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/sales/sales-order-edit-data-panel-view/sales-order-edit-data-panel-view.vue'
),
},
{
path
:
'quotes/:quote?/salesorders/:salesorder?/edit_datapanelview/:edit_datapanelview?'
,
meta
:
{
caption
:
'entities.salesorder.views.edit_datapanelview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'central'
,
parameterName
:
'central'
},
{
pathName
:
'quotes'
,
parameterName
:
'quote'
},
{
pathName
:
'salesorders'
,
parameterName
:
'salesorder'
},
{
pathName
:
'edit_datapanelview'
,
parameterName
:
'edit_datapanelview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/sales/sales-order-edit-data-panel-view/sales-order-edit-data-panel-view.vue'
),
},
{
path
:
'salesorders/:salesorder?/edit_datapanelview/:edit_datapanelview?'
,
meta
:
{
caption
:
'entities.salesorder.views.edit_datapanelview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'central'
,
parameterName
:
'central'
},
{
pathName
:
'salesorders'
,
parameterName
:
'salesorder'
},
{
pathName
:
'edit_datapanelview'
,
parameterName
:
'edit_datapanelview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/sales/sales-order-edit-data-panel-view/sales-order-edit-data-panel-view.vue'
),
},
{
path
:
'accounts/:account?/contacts/:contact?/opportunities/:opportunity?/quotes/:quote?/salesorders/:salesorder?/invoices/:invoice?/byparentkey/:byparentkey?'
,
meta
:
{
...
...
app_CRM/src/store/modules/view-action/state.ts
浏览文件 @
1c00c80e
...
...
@@ -145,6 +145,15 @@ export const viewstate: any = {
'8206069d9567cbc0a06e441869343819'
,
],
},
{
viewtag
:
'07e302308381c2bc8f62fac18515f689'
,
viewmodule
:
'Sales'
,
viewname
:
'SalesOrderEdit_DataPanelView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
],
},
{
viewtag
:
'08e0772f0c42c435525ed40425ae4661'
,
viewmodule
:
'Base'
,
...
...
@@ -889,6 +898,7 @@ export const viewstate: any = {
'95a02c7480abd6ddb76e14dc079f7508'
,
'e0aef8c0d1f1ae28f628a0541b118961'
,
'fed62991d8068c42d2544ad0a9b4820b'
,
'07e302308381c2bc8f62fac18515f689'
,
],
},
{
...
...
app_CRM/src/uiservice/sales-order/sales-order-ui-service-base.ts
浏览文件 @
1c00c80e
...
...
@@ -80,6 +80,7 @@ export default class SalesOrderUIServiceBase extends UIService {
*/
public
initViewMap
(){
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'statetabview'
,
srfappde
:
'salesorders'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'edit_datapanelview'
,
srfappde
:
'salesorders'
});
this
.
allViewMap
.
set
(
'EDITVIEW:'
,{
viewname
:
'editview'
,
srfappde
:
'salesorders'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'finishgridview'
,
srfappde
:
'salesorders'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'infoview'
,
srfappde
:
'salesorders'
});
...
...
@@ -291,6 +292,74 @@ export default class SalesOrderUIServiceBase extends UIService {
backend
();
}
/**
* 头信息编辑
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
*/
public
async
SalesOrder_OpenEdit_DataPanelView
(
args
:
any
[],
context
:
any
=
{}
,
params
:
any
=
{},
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
let
data
:
any
=
{};
let
parentContext
:
any
=
{};
let
parentViewParam
:
any
=
{};
const
_this
:
any
=
actionContext
;
const
_args
:
any
[]
=
Util
.
deepCopy
(
args
);
const
actionTarget
:
string
|
null
=
'SINGLEKEY'
;
Object
.
assign
(
context
,
{
salesorder
:
'%salesorder%'
});
Object
.
assign
(
params
,
{
salesorderid
:
'%salesorder%'
});
Object
.
assign
(
params
,
{
salesordername
:
'%salesordername%'
});
if
(
_this
.
context
){
parentContext
=
_this
.
context
;
}
if
(
_this
.
viewparams
){
parentViewParam
=
_this
.
viewparams
;
}
context
=
UIActionTool
.
handleContextParam
(
actionTarget
,
_args
,
parentContext
,
parentViewParam
,
context
);
data
=
UIActionTool
.
handleActionParam
(
actionTarget
,
_args
,
parentContext
,
parentViewParam
,
params
);
context
=
Object
.
assign
({},
actionContext
.
context
,
context
);
let
parentObj
:
any
=
{
srfparentdename
:
srfParentDeName
?
srfParentDeName
:
null
,
srfparentkey
:
srfParentDeName
?
context
[
srfParentDeName
.
toLowerCase
()]:
null
};
Object
.
assign
(
data
,
parentObj
);
Object
.
assign
(
context
,
parentObj
);
let
deResParameters
:
any
[]
=
[];
if
(
context
.
quote
&&
true
){
deResParameters
=
[
{
pathName
:
'quotes'
,
parameterName
:
'quote'
},
]
}
const
parameters
:
any
[]
=
[
{
pathName
:
'salesorders'
,
parameterName
:
'salesorder'
},
];
const
openPopOver
=
(
view
:
any
,
data
:
any
)
=>
{
let
container
:
Subject
<
any
>
=
actionContext
.
$apppopover
.
openPop
(
$event
,
view
,
context
,
data
);
container
.
subscribe
((
result
:
any
)
=>
{
if
(
!
result
||
!
Object
.
is
(
result
.
ret
,
'OK'
))
{
return
;
}
const
_this
:
any
=
actionContext
;
if
(
window
.
opener
){
window
.
opener
.
postMessage
({
status
:
'OK'
,
identification
:
'WF'
},
Environment
.
uniteAddress
);
window
.
close
();
}
return
result
.
datas
;
});
}
const
view
:
any
=
{
viewname
:
'sales-order-edit-data-panel-view'
,
height
:
300
,
width
:
300
,
title
:
actionContext
.
$t
(
'entities.salesorder.views.edit_datapanelview.title'
),
placement
:
'POPOVER'
,
};
openPopOver
(
view
,
data
);
}
/**
* 完成订单
*
...
...
app_CRM/src/widgets/sales-order/data-panel-form/data-panel-form-base.tsx
0 → 100644
浏览文件 @
1c00c80e
import
{
Prop
,
Provide
,
Emit
,
Model
}
from
'vue-property-decorator'
;
import
{
Subject
,
Subscription
}
from
'rxjs'
;
import
{
Watch
,
EditFormControlBase
}
from
'@/studio-core'
;
import
SalesOrderService
from
'@/service/sales-order/sales-order-service'
;
import
DataPanelService
from
'./data-panel-form-service'
;
import
SalesOrderUIService
from
'@/uiservice/sales-order/sales-order-ui-service'
;
import
{
FormButtonModel
,
FormPageModel
,
FormItemModel
,
FormDRUIPartModel
,
FormPartModel
,
FormGroupPanelModel
,
FormIFrameModel
,
FormRowItemModel
,
FormTabPageModel
,
FormTabPanelModel
,
FormUserControlModel
}
from
'@/model/form-detail'
;
/**
* datapanel部件基类
*
* @export
* @class EditFormControlBase
* @extends {DataPanelEditFormBase}
*/
export
class
DataPanelEditFormBase
extends
EditFormControlBase
{
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof DataPanelEditFormBase
*/
protected
controlType
:
string
=
'FORM'
;
/**
* 建构部件服务对象
*
* @type {DataPanelService}
* @memberof DataPanelEditFormBase
*/
public
service
:
DataPanelService
=
new
DataPanelService
({
$store
:
this
.
$store
});
/**
* 实体服务对象
*
* @type {SalesOrderService}
* @memberof DataPanelEditFormBase
*/
public
appEntityService
:
SalesOrderService
=
new
SalesOrderService
({
$store
:
this
.
$store
});
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof DataPanelEditFormBase
*/
protected
appDeName
:
string
=
'salesorder'
;
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
datapanel_button1_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
;
if
(
_this
.
getDatas
&&
_this
.
getDatas
instanceof
Function
)
{
datas
=
[...
_this
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
const
curUIService
:
SalesOrderUIService
=
new
SalesOrderUIService
();
curUIService
.
SalesOrder_OpenEdit_DataPanelView
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"SalesOrder"
);
}
/**
* 表单数据对象
*
* @type {*}
* @memberof DataPanelEditFormBase
*/
public
data
:
any
=
{
srfupdatedate
:
null
,
srforikey
:
null
,
srfkey
:
null
,
srfmajortext
:
null
,
srftempmode
:
null
,
srfuf
:
null
,
srfdeid
:
null
,
srfsourcekey
:
null
,
totalamount
:
null
,
statecode
:
null
,
ownername
:
null
,
salesorderid
:
null
,
salesorder
:
null
,
};
/**
* 属性值规则
*
* @type {*}
* @memberof DataPanelEditFormBase
*/
public
rules
:
any
=
{
}
/**
* 详情模型集合
*
* @type {*}
* @memberof DataPanelEditFormBase
*/
public
detailsModel
:
any
=
{
button1
:
new
FormButtonModel
({
caption
:
'头信息编辑'
,
detailType
:
'BUTTON'
,
name
:
'button1'
,
visible
:
true
,
isShowCaption
:
false
,
form
:
this
,
showMoreMode
:
0
,
uiaction
:
{
type
:
'DEUIACTION'
,
tag
:
'OpenEdit_DataPanelView'
,
actiontarget
:
'SINGLEKEY'
}
}),
grouppanel1
:
new
FormGroupPanelModel
({
caption
:
'分组面板'
,
detailType
:
'GROUPPANEL'
,
name
:
'grouppanel1'
,
visible
:
true
,
isShowCaption
:
false
,
form
:
this
,
showMoreMode
:
0
,
uiActionGroup
:
{
caption
:
''
,
langbase
:
'entities.salesorder.datapanel_form'
,
extractMode
:
'ITEM'
,
details
:
[]
}
}),
group1
:
new
FormGroupPanelModel
({
caption
:
'订单基本信息'
,
detailType
:
'GROUPPANEL'
,
name
:
'group1'
,
visible
:
true
,
isShowCaption
:
false
,
form
:
this
,
showMoreMode
:
0
,
uiActionGroup
:
{
caption
:
''
,
langbase
:
'entities.salesorder.datapanel_form'
,
extractMode
:
'ITEM'
,
details
:
[]
}
}),
formpage1
:
new
FormPageModel
({
caption
:
'基本信息'
,
detailType
:
'FORMPAGE'
,
name
:
'formpage1'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
}),
srfupdatedate
:
new
FormItemModel
({
caption
:
'更新时间'
,
detailType
:
'FORMITEM'
,
name
:
'srfupdatedate'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
0
}),
srforikey
:
new
FormItemModel
({
caption
:
''
,
detailType
:
'FORMITEM'
,
name
:
'srforikey'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
srfkey
:
new
FormItemModel
({
caption
:
'订单'
,
detailType
:
'FORMITEM'
,
name
:
'srfkey'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
srfmajortext
:
new
FormItemModel
({
caption
:
'销售订单名称'
,
detailType
:
'FORMITEM'
,
name
:
'srfmajortext'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
srftempmode
:
new
FormItemModel
({
caption
:
''
,
detailType
:
'FORMITEM'
,
name
:
'srftempmode'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
srfuf
:
new
FormItemModel
({
caption
:
''
,
detailType
:
'FORMITEM'
,
name
:
'srfuf'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
srfdeid
:
new
FormItemModel
({
caption
:
''
,
detailType
:
'FORMITEM'
,
name
:
'srfdeid'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
srfsourcekey
:
new
FormItemModel
({
caption
:
''
,
detailType
:
'FORMITEM'
,
name
:
'srfsourcekey'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
totalamount
:
new
FormItemModel
({
caption
:
'总金额'
,
detailType
:
'FORMITEM'
,
name
:
'totalamount'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
statecode
:
new
FormItemModel
({
caption
:
'状态'
,
detailType
:
'FORMITEM'
,
name
:
'statecode'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
ownername
:
new
FormItemModel
({
caption
:
'负责人'
,
detailType
:
'FORMITEM'
,
name
:
'ownername'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
salesorderid
:
new
FormItemModel
({
caption
:
'订单'
,
detailType
:
'FORMITEM'
,
name
:
'salesorderid'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
};
/**
* 表单 头信息编辑 事件
*
* @memberof @memberof DataPanelEditFormBase
*/
public
button1_click
(
$event
:
any
):
void
{
this
.
datapanel_button1_click
(
null
,
null
,
$event
);
}
}
\ No newline at end of file
app_CRM/src/widgets/sales-order/data-panel-form/data-panel-form-model.ts
0 → 100644
浏览文件 @
1c00c80e
/**
* DataPanel 部件模型
*
* @export
* @class DataPanelModel
*/
export
default
class
DataPanelModel
{
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof DataPanelModel
*/
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
:
'salesorderid'
,
dataType
:
'GUID'
,
},
{
name
:
'srfmajortext'
,
prop
:
'salesordername'
,
dataType
:
'TEXT'
,
},
{
name
:
'srftempmode'
,
},
{
name
:
'srfuf'
,
},
{
name
:
'srfdeid'
,
},
{
name
:
'srfsourcekey'
,
},
{
name
:
'totalamount'
,
prop
:
'totalamount'
,
dataType
:
'BIGDECIMAL'
,
},
{
name
:
'statecode'
,
prop
:
'statecode'
,
dataType
:
'NSCODELIST'
,
},
{
name
:
'ownername'
,
prop
:
'ownername'
,
dataType
:
'TEXT'
,
},
{
name
:
'salesorderid'
,
prop
:
'salesorderid'
,
dataType
:
'GUID'
,
},
{
name
:
'salesorder'
,
prop
:
'salesorderid'
,
dataType
:
'FONTKEY'
,
},
]
}
}
\ No newline at end of file
app_CRM/src/widgets/sales-order/data-panel-form/data-panel-form-service.ts
0 → 100644
浏览文件 @
1c00c80e
import
{
Http
,
Util
,
Errorlog
}
from
'@/utils'
;
import
ControlService
from
'@/widgets/control-service'
;
import
SalesOrderService
from
'@/service/sales-order/sales-order-service'
;
import
DataPanelModel
from
'./data-panel-form-model'
;
/**
* DataPanel 部件服务对象
*
* @export
* @class DataPanelService
*/
export
default
class
DataPanelService
extends
ControlService
{
/**
* 订单服务对象
*
* @type {SalesOrderService}
* @memberof DataPanelService
*/
public
appEntityService
:
SalesOrderService
=
new
SalesOrderService
({
$store
:
this
.
getStore
()
});
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof DataPanelService
*/
public
setTempMode
(){
this
.
isTempMode
=
false
;
}
/**
* Creates an instance of DataPanelService.
*
* @param {*} [opts={}]
* @memberof DataPanelService
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
this
.
model
=
new
DataPanelModel
();
}
/**
* 处理数据
*
* @private
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof DataPanelService
*/
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 DataPanelService
*/
@
Errorlog
public
getItems
(
serviceName
:
string
,
interfaceName
:
string
,
context
:
any
=
{},
data
:
any
,
isloading
?:
boolean
):
Promise
<
any
[]
>
{
return
Promise
.
reject
([])
}
/**
* 启动工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof DataPanelService
*/
@
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 DataPanelService
*/
@
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 DataPanelService
*/
@
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 DataPanelService
*/
@
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 DataPanelService
*/
@
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 DataPanelService
*/
@
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 DataPanelService
*/
@
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
.
salesorderid
=
PrimaryKey
;
Data
.
salesorder
=
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
.
salesorderid
=
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 DataPanelService
*/
@
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 DataPanelService
*/
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/data-panel-form/data-panel-form.html
0 → 100644
浏览文件 @
1c00c80e
<i-form
:model=
"this.data"
class=
'app-form info-form-mode'
ref=
'datapanel'
id=
'salesorder_datapanel'
style=
""
>
<input
style=
"display:none;"
/>
<row
>
<i-col
v-show=
"detailsModel.group1.visible"
:style=
"{}"
:lg=
"{ span: 24, offset: 0 }"
>
<app-form-group
:model=
"detailsModel.group1"
layoutType=
"FLEX"
titleStyle=
""
class=
''
:uiActionGroup=
"detailsModel.group1.uiActionGroup"
@
groupuiactionclick=
"groupUIActionClick($event)"
:caption=
"$t('entities.salesorder.datapanel_form.details.group1')"
:isShowCaption=
"false"
uiStyle=
"DEFAULT"
:titleBarCloseMode=
"0"
:isInfoGroupMode=
"true"
>
<div
style=
"height: 100%;display: flex;"
>
<div
v-show=
"detailsModel.totalamount.visible"
:style=
"{}"
>
<app-form-item
name=
'totalamount'
:itemRules=
"this.rules.totalamount"
class=
'datapanel-style'
:caption=
"$t('entities.salesorder.datapanel_form.details.totalamount')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.totalamount.error"
:isEmptyCaption=
"false"
labelPos=
"BOTTOM"
>
<app-span
name=
'totalamount'
:value=
"data.totalamount"
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
:localContext =
'{ }'
:localParam =
'{ }'
style=
""
></app-span>
</app-form-item>
</div>
<div
v-show=
"detailsModel.statecode.visible"
:style=
"{}"
>
<app-form-item
name=
'statecode'
:itemRules=
"this.rules.statecode"
class=
'datapanel-style'
:caption=
"$t('entities.salesorder.datapanel_form.details.statecode')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.statecode.error"
:isEmptyCaption=
"false"
labelPos=
"BOTTOM"
>
<app-span
name=
'statecode'
:value=
"data.statecode"
tag=
'Salesorder__StateCode'
codelistType=
'STATIC'
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
:localContext =
'{ }'
:localParam =
'{ }'
style=
""
></app-span>
</app-form-item>
</div>
<div
v-show=
"detailsModel.ownername.visible"
:style=
"{}"
>
<app-form-item
name=
'ownername'
:itemRules=
"this.rules.ownername"
class=
'datapanel-style'
:caption=
"$t('entities.salesorder.datapanel_form.details.ownername')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.ownername.error"
:isEmptyCaption=
"false"
labelPos=
"BOTTOM"
>
<app-span
name=
'ownername'
:value=
"data.ownername"
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
:localContext =
'{ }'
:localParam =
'{ }'
style=
""
></app-span>
</app-form-item>
</div>
<div
v-show=
"detailsModel.grouppanel1.visible"
:style=
"{}"
>
<app-form-group
:model=
"detailsModel.grouppanel1"
layoutType=
"FLEX"
titleStyle=
""
class=
''
:uiActionGroup=
"detailsModel.grouppanel1.uiActionGroup"
@
groupuiactionclick=
"groupUIActionClick($event)"
:caption=
"$t('entities.salesorder.datapanel_form.details.grouppanel1')"
:isShowCaption=
"false"
uiStyle=
"DEFAULT"
:titleBarCloseMode=
"0"
:isInfoGroupMode=
"true"
>
<div
style=
"height: 100%;display: flex;"
>
<div
v-show=
"detailsModel.button1.visible"
:style=
"{}"
>
<i-button
type=
"primary"
@
click=
"button1_click($event)"
class=
"form-btn-noborder-transparent"
style=
""
>
<i
class=
"fa fa-angle-down"
style=
"margin-right: 2px;"
></i>
</i-button>
</div>
</div>
</app-form-group>
</div>
</div>
</app-form-group>
</i-col>
</row>
</i-form>
\ No newline at end of file
app_CRM/src/widgets/sales-order/data-panel-form/data-panel-form.less
0 → 100644
浏览文件 @
1c00c80e
.datapanel-style {
font-size:20px;font-weight:bold;text-align:left
}
.datapanel-style {
height: 48px;
margin-top: 2px;
margin-bottom: 0px!important;
margin-right: 5px;
padding-right: 5px;
border-right: 2px solid var(--app-dividing-line-color-bright) ;
}
.label-bottom {
.editor-wrapper {
height: 24px!important;
}
.app-form-item-label {
font-size: 12px;
font-weight: bold;
height: 24px!important;
line-height: 24px!important;
}
}
.form-btn-noborder-transparent {
background-color:rgba(255, 0, 0, 0);border-style:none;margin:0px 10px 0px 0px
}
.form-btn-noborder-transparent {
background-color:transparent!important;
border-style:none;
margin:0px 5px 0px 5px
}
app_CRM/src/widgets/sales-order/data-panel-form/data-panel-form.vue
0 → 100644
浏览文件 @
1c00c80e
<
template
src=
"./data-panel-form.html"
/>
<script
lang=
'tsx'
>
import
{ Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { DataPanelEditFormBase } from './data-panel-form-base';
/**
* datapanel部件
*
* @export
* @class DataPanelEditForm
* @extends {DataPanelEditFormBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class DataPanelEditForm extends DataPanelEditFormBase { }
</script>
<style
lang=
'less'
>
@import
'./data-panel-form.less'
;
</style>
app_CRM/src/widgets/sales-order/edit-date-panel-form/edit-date-panel-form-base.tsx
0 → 100644
浏览文件 @
1c00c80e
import
{
Prop
,
Provide
,
Emit
,
Model
}
from
'vue-property-decorator'
;
import
{
Subject
,
Subscription
}
from
'rxjs'
;
import
{
Watch
,
EditFormControlBase
}
from
'@/studio-core'
;
import
SalesOrderService
from
'@/service/sales-order/sales-order-service'
;
import
Edit_DatePanelService
from
'./edit-date-panel-form-service'
;
import
{
FormButtonModel
,
FormPageModel
,
FormItemModel
,
FormDRUIPartModel
,
FormPartModel
,
FormGroupPanelModel
,
FormIFrameModel
,
FormRowItemModel
,
FormTabPageModel
,
FormTabPanelModel
,
FormUserControlModel
}
from
'@/model/form-detail'
;
/**
* form部件基类
*
* @export
* @class EditFormControlBase
* @extends {Edit_DatePanelEditFormBase}
*/
export
class
Edit_DatePanelEditFormBase
extends
EditFormControlBase
{
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof Edit_DatePanelEditFormBase
*/
protected
controlType
:
string
=
'FORM'
;
/**
* 建构部件服务对象
*
* @type {Edit_DatePanelService}
* @memberof Edit_DatePanelEditFormBase
*/
public
service
:
Edit_DatePanelService
=
new
Edit_DatePanelService
({
$store
:
this
.
$store
});
/**
* 实体服务对象
*
* @type {SalesOrderService}
* @memberof Edit_DatePanelEditFormBase
*/
public
appEntityService
:
SalesOrderService
=
new
SalesOrderService
({
$store
:
this
.
$store
});
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof Edit_DatePanelEditFormBase
*/
protected
appDeName
:
string
=
'salesorder'
;
/**
* 表单数据对象
*
* @type {*}
* @memberof Edit_DatePanelEditFormBase
*/
public
data
:
any
=
{
srfupdatedate
:
null
,
srforikey
:
null
,
srfkey
:
null
,
srfmajortext
:
null
,
srftempmode
:
null
,
srfuf
:
null
,
srfdeid
:
null
,
srfsourcekey
:
null
,
totalamount
:
null
,
statecode
:
null
,
ownername
:
null
,
salesorderid
:
null
,
salesorder
:
null
,
};
/**
* 属性值规则
*
* @type {*}
* @memberof Edit_DatePanelEditFormBase
*/
public
rules
:
any
=
{
statecode
:
[
{
required
:
true
,
type
:
'number'
,
message
:
'状态 值不能为空'
,
trigger
:
'change'
},
{
required
:
true
,
type
:
'number'
,
message
:
'状态 值不能为空'
,
trigger
:
'blur'
},
],
ownername
:
[
{
required
:
true
,
type
:
'string'
,
message
:
'负责人 值不能为空'
,
trigger
:
'change'
},
{
required
:
true
,
type
:
'string'
,
message
:
'负责人 值不能为空'
,
trigger
:
'blur'
},
],
}
/**
* 详情模型集合
*
* @type {*}
* @memberof Edit_DatePanelEditFormBase
*/
public
detailsModel
:
any
=
{
group1
:
new
FormGroupPanelModel
({
caption
:
'订单基本信息'
,
detailType
:
'GROUPPANEL'
,
name
:
'group1'
,
visible
:
true
,
isShowCaption
:
false
,
form
:
this
,
showMoreMode
:
0
,
uiActionGroup
:
{
caption
:
''
,
langbase
:
'entities.salesorder.edit_datepanel_form'
,
extractMode
:
'ITEM'
,
details
:
[]
}
}),
formpage1
:
new
FormPageModel
({
caption
:
'基本信息'
,
detailType
:
'FORMPAGE'
,
name
:
'formpage1'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
}),
srfupdatedate
:
new
FormItemModel
({
caption
:
'更新时间'
,
detailType
:
'FORMITEM'
,
name
:
'srfupdatedate'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
0
}),
srforikey
:
new
FormItemModel
({
caption
:
''
,
detailType
:
'FORMITEM'
,
name
:
'srforikey'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
srfkey
:
new
FormItemModel
({
caption
:
'订单'
,
detailType
:
'FORMITEM'
,
name
:
'srfkey'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
srfmajortext
:
new
FormItemModel
({
caption
:
'销售订单名称'
,
detailType
:
'FORMITEM'
,
name
:
'srfmajortext'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
srftempmode
:
new
FormItemModel
({
caption
:
''
,
detailType
:
'FORMITEM'
,
name
:
'srftempmode'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
srfuf
:
new
FormItemModel
({
caption
:
''
,
detailType
:
'FORMITEM'
,
name
:
'srfuf'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
srfdeid
:
new
FormItemModel
({
caption
:
''
,
detailType
:
'FORMITEM'
,
name
:
'srfdeid'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
srfsourcekey
:
new
FormItemModel
({
caption
:
''
,
detailType
:
'FORMITEM'
,
name
:
'srfsourcekey'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
totalamount
:
new
FormItemModel
({
caption
:
'总金额'
,
detailType
:
'FORMITEM'
,
name
:
'totalamount'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
statecode
:
new
FormItemModel
({
caption
:
'状态'
,
detailType
:
'FORMITEM'
,
name
:
'statecode'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
ownername
:
new
FormItemModel
({
caption
:
'负责人'
,
detailType
:
'FORMITEM'
,
name
:
'ownername'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
salesorderid
:
new
FormItemModel
({
caption
:
'订单'
,
detailType
:
'FORMITEM'
,
name
:
'salesorderid'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
};
}
\ No newline at end of file
app_CRM/src/widgets/sales-order/edit-date-panel-form/edit-date-panel-form-model.ts
0 → 100644
浏览文件 @
1c00c80e
/**
* Edit_DatePanel 部件模型
*
* @export
* @class Edit_DatePanelModel
*/
export
default
class
Edit_DatePanelModel
{
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof Edit_DatePanelModel
*/
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
:
'salesorderid'
,
dataType
:
'GUID'
,
},
{
name
:
'srfmajortext'
,
prop
:
'salesordername'
,
dataType
:
'TEXT'
,
},
{
name
:
'srftempmode'
,
},
{
name
:
'srfuf'
,
},
{
name
:
'srfdeid'
,
},
{
name
:
'srfsourcekey'
,
},
{
name
:
'totalamount'
,
prop
:
'totalamount'
,
dataType
:
'BIGDECIMAL'
,
},
{
name
:
'statecode'
,
prop
:
'statecode'
,
dataType
:
'NSCODELIST'
,
},
{
name
:
'ownername'
,
prop
:
'ownername'
,
dataType
:
'TEXT'
,
},
{
name
:
'salesorderid'
,
prop
:
'salesorderid'
,
dataType
:
'GUID'
,
},
{
name
:
'salesorder'
,
prop
:
'salesorderid'
,
dataType
:
'FONTKEY'
,
},
]
}
}
\ No newline at end of file
app_CRM/src/widgets/sales-order/edit-date-panel-form/edit-date-panel-form-service.ts
0 → 100644
浏览文件 @
1c00c80e
import
{
Http
,
Util
,
Errorlog
}
from
'@/utils'
;
import
ControlService
from
'@/widgets/control-service'
;
import
SalesOrderService
from
'@/service/sales-order/sales-order-service'
;
import
Edit_DatePanelModel
from
'./edit-date-panel-form-model'
;
/**
* Edit_DatePanel 部件服务对象
*
* @export
* @class Edit_DatePanelService
*/
export
default
class
Edit_DatePanelService
extends
ControlService
{
/**
* 订单服务对象
*
* @type {SalesOrderService}
* @memberof Edit_DatePanelService
*/
public
appEntityService
:
SalesOrderService
=
new
SalesOrderService
({
$store
:
this
.
getStore
()
});
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof Edit_DatePanelService
*/
public
setTempMode
(){
this
.
isTempMode
=
false
;
}
/**
* Creates an instance of Edit_DatePanelService.
*
* @param {*} [opts={}]
* @memberof Edit_DatePanelService
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
this
.
model
=
new
Edit_DatePanelModel
();
}
/**
* 处理数据
*
* @private
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof Edit_DatePanelService
*/
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 Edit_DatePanelService
*/
@
Errorlog
public
getItems
(
serviceName
:
string
,
interfaceName
:
string
,
context
:
any
=
{},
data
:
any
,
isloading
?:
boolean
):
Promise
<
any
[]
>
{
return
Promise
.
reject
([])
}
/**
* 启动工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof Edit_DatePanelService
*/
@
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 Edit_DatePanelService
*/
@
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 Edit_DatePanelService
*/
@
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 Edit_DatePanelService
*/
@
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 Edit_DatePanelService
*/
@
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 Edit_DatePanelService
*/
@
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 Edit_DatePanelService
*/
@
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
.
salesorderid
=
PrimaryKey
;
Data
.
salesorder
=
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
.
salesorderid
=
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 Edit_DatePanelService
*/
@
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 Edit_DatePanelService
*/
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/edit-date-panel-form/edit-date-panel-form.html
0 → 100644
浏览文件 @
1c00c80e
<i-form
:model=
"this.data"
class=
'app-form'
ref=
'form'
id=
'salesorder_edit_datepanel'
style=
""
>
<input
style=
"display:none;"
/>
<row
>
<i-col
v-show=
"detailsModel.group1.visible"
:style=
"{}"
:lg=
"{ span: 24, offset: 0 }"
>
<app-form-group
:model=
"detailsModel.group1"
layoutType=
"TABLE_24COL"
titleStyle=
""
class=
''
:uiActionGroup=
"detailsModel.group1.uiActionGroup"
@
groupuiactionclick=
"groupUIActionClick($event)"
:caption=
"$t('entities.salesorder.edit_datepanel_form.details.group1')"
:isShowCaption=
"false"
uiStyle=
"DEFAULT"
:titleBarCloseMode=
"0"
:isInfoGroupMode=
"false"
>
<row>
<i-col
v-show=
"detailsModel.totalamount.visible"
:style=
"{}"
:lg=
"{ span: 24, offset: 0 }"
>
<app-form-item
name=
'totalamount'
:itemRules=
"this.rules.totalamount"
class=
''
:caption=
"$t('entities.salesorder.edit_datepanel_form.details.totalamount')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.totalamount.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.totalamount"
@
enter=
"onEnter($event)"
unit=
""
:disabled=
"detailsModel.totalamount.disabled"
type=
'number'
style=
""
></input-box>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.statecode.visible"
:style=
"{}"
:lg=
"{ span: 24, offset: 0 }"
>
<app-form-item
name=
'statecode'
:itemRules=
"this.rules.statecode"
class=
''
:caption=
"$t('entities.salesorder.edit_datepanel_form.details.statecode')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.statecode.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<dropdown-list
v-model=
"data.statecode"
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
:localContext =
'{ }'
:localParam =
'{ }'
:disabled=
"detailsModel.statecode.disabled"
tag=
'Salesorder__StateCode'
codelistType=
'STATIC'
placeholder=
'请选择...'
style=
""
>
</dropdown-list>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.ownername.visible"
:style=
"{}"
:lg=
"{ span: 24, offset: 0 }"
>
<app-form-item
name=
'ownername'
:itemRules=
"this.rules.ownername"
class=
''
:caption=
"$t('entities.salesorder.edit_datepanel_form.details.ownername')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.ownername.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.ownername"
@
enter=
"onEnter($event)"
unit=
""
:disabled=
"detailsModel.ownername.disabled"
type=
'text'
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/edit-date-panel-form/edit-date-panel-form.vue
0 → 100644
浏览文件 @
1c00c80e
<
template
src=
"./edit-date-panel-form.html"
/>
<script
lang=
'tsx'
>
import
{ Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { Edit_DatePanelEditFormBase } from './edit-date-panel-form-base';
/**
* form部件
*
* @export
* @class Edit_DatePanelEditForm
* @extends {Edit_DatePanelEditFormBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class Edit_DatePanelEditForm extends Edit_DatePanelEditFormBase { }
</script>
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录