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

lab_gzf 发布系统代码

上级 4a96b2a1
...@@ -1736,6 +1736,123 @@ ...@@ -1736,6 +1736,123 @@
} }
] ]
}, },
{
"srfkey": "Salesliterature__LiteratureTypeCode",
"emptytext": "未定义",
"codelisttype":"static",
"items": [
{
"id": "1",
"label": "产品表单",
"text": "产品表单",
"data":"",
"codename":"Item_1",
"value": "1",
"disabled": false
}
, {
"id": "7",
"label": "价格表单",
"text": "价格表单",
"data":"",
"codename":"Item_7",
"value": "7",
"disabled": false
}
, {
"id": "9",
"label": "公司背景",
"text": "公司背景",
"data":"",
"codename":"Item_9",
"value": "9",
"disabled": false
}
, {
"id": "6",
"label": "公告",
"text": "公告",
"data":"",
"codename":"Item_6",
"value": "6",
"disabled": false
}
, {
"id": "100001",
"label": "市场营销宣传材料",
"text": "市场营销宣传材料",
"data":"",
"codename":"Item_100001",
"value": "100001",
"disabled": false
}
, {
"id": "8",
"label": "手册",
"text": "手册",
"data":"",
"codename":"Item_8",
"value": "8",
"disabled": false
}
, {
"id": "5",
"label": "新闻",
"text": "新闻",
"data":"",
"codename":"Item_5",
"value": "5",
"disabled": false
}
, {
"id": "0",
"label": "演示文稿",
"text": "演示文稿",
"data":"",
"codename":"Item_0",
"value": "0",
"disabled": false
}
, {
"id": "4",
"label": "电子表格",
"text": "电子表格",
"data":"",
"codename":"Item_4",
"value": "4",
"disabled": false
}
, {
"id": "2",
"label": "策略和步骤",
"text": "策略和步骤",
"data":"",
"codename":"Item_2",
"value": "2",
"disabled": false
}
, {
"id": "3",
"label": "销售宣传资料",
"text": "销售宣传资料",
"data":"",
"codename":"Item_3",
"value": "3",
"disabled": false
}
]
},
{ {
"srfkey": "SysOperator", "srfkey": "SysOperator",
"emptytext": "未定义", "emptytext": "未定义",
...@@ -2473,53 +2590,6 @@ ...@@ -2473,53 +2590,6 @@
} }
] ]
}, },
{
"srfkey": "Product__ProductTypeCode",
"emptytext": "未定义",
"codelisttype":"static",
"items": [
{
"id": "4",
"label": "固定费用",
"text": "固定费用",
"data":"",
"codename":"Item_4",
"value": "4",
"disabled": false
}
, {
"id": "3",
"label": "服务",
"text": "服务",
"data":"",
"codename":"Item_3",
"value": "3",
"disabled": false
}
, {
"id": "2",
"label": "杂项费用",
"text": "杂项费用",
"data":"",
"codename":"Item_2",
"value": "2",
"disabled": false
}
, {
"id": "1",
"label": "销售存货",
"text": "销售存货",
"data":"",
"codename":"Item_1",
"value": "1",
"disabled": false
}
]
},
{ {
"srfkey": "Contact__GenderCode", "srfkey": "Contact__GenderCode",
"emptytext": "未定义", "emptytext": "未定义",
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
"memo": "系统自动添加" "memo": "系统自动添加"
}, },
"contactgridview": { "contactgridview": {
"title": "联系人表格视图", "title": "联系人信息",
"caption": "联系人信息", "caption": "联系人信息",
"viewtype": "DEGRIDVIEW", "viewtype": "DEGRIDVIEW",
"viewmodule": "Base", "viewmodule": "Base",
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
"memo": "系统自动添加" "memo": "系统自动添加"
}, },
"quotegridview": { "quotegridview": {
"title": "报价单表格视图", "title": "报价单信息",
"caption": "报价单", "caption": "报价单",
"viewtype": "DEGRIDVIEW", "viewtype": "DEGRIDVIEW",
"viewmodule": "Sales", "viewmodule": "Sales",
...@@ -189,6 +189,16 @@ ...@@ -189,6 +189,16 @@
"viewtag": "177c00d1674621e8933efe6db68bce0e", "viewtag": "177c00d1674621e8933efe6db68bce0e",
"memo": "" "memo": ""
}, },
"subjectpickupgridview": {
"title": "主题选择表格视图",
"caption": "主题",
"viewtype": "DEPICKUPGRIDVIEW",
"viewmodule": "Base",
"viewname": "SubjectPickupGridView",
"viewfilename": "subject-pickup-grid-view",
"viewtag": "19e1193c4075ae18f2f29095bb8841fa",
"memo": "系统自动添加"
},
"leadpickupview": { "leadpickupview": {
"title": "潜在顾客数据选择视图", "title": "潜在顾客数据选择视图",
"caption": "潜在顾客", "caption": "潜在顾客",
...@@ -1280,7 +1290,7 @@ ...@@ -1280,7 +1290,7 @@
"memo": "系统自动添加" "memo": "系统自动添加"
}, },
"productedit_quickcreate": { "productedit_quickcreate": {
"title": "产品选项操作视图", "title": "快速新建",
"caption": "产品", "caption": "产品",
"viewtype": "DEOPTVIEW", "viewtype": "DEOPTVIEW",
"viewmodule": "Product", "viewmodule": "Product",
...@@ -1450,7 +1460,7 @@ ...@@ -1450,7 +1460,7 @@
"memo": "系统自动添加" "memo": "系统自动添加"
}, },
"competitorgridview": { "competitorgridview": {
"title": "竞争对手表格视图", "title": "竞争对手信息",
"caption": "竞争对手", "caption": "竞争对手",
"viewtype": "DEGRIDVIEW", "viewtype": "DEGRIDVIEW",
"viewmodule": "Sales", "viewmodule": "Sales",
...@@ -1559,6 +1569,26 @@ ...@@ -1559,6 +1569,26 @@
"viewtag": "e4335da0a7c14a65376eecaabb771fd7", "viewtag": "e4335da0a7c14a65376eecaabb771fd7",
"memo": "" "memo": ""
}, },
"salesliteraturequickcreateview": {
"title": "快速新建",
"caption": "销售宣传资料",
"viewtype": "DEOPTVIEW",
"viewmodule": "Sales",
"viewname": "SalesLiteratureQuickCreateView",
"viewfilename": "sales-literature-quick-create-view",
"viewtag": "e45cd3d0a9959e1979243837b5dcfd2d",
"memo": ""
},
"subjectpickupview": {
"title": "主题数据选择视图",
"caption": "主题",
"viewtype": "DEPICKUPVIEW",
"viewmodule": "Base",
"viewname": "SubjectPickupView",
"viewfilename": "subject-pickup-view",
"viewtag": "e52af970c14fd89546ac8ccaecab460c",
"memo": "系统自动添加"
},
"salesorderinfo_soview": { "salesorderinfo_soview": {
"title": "订单编辑视图", "title": "订单编辑视图",
"caption": "订单", "caption": "订单",
......
/**
* 主题
*
* @export
* @interface Subject
*/
export interface Subject {
/**
* 创建记录的时间
*
* @returns {*}
* @memberof Subject
*/
overriddencreatedon?: any;
/**
* 更新时间
*
* @returns {*}
* @memberof Subject
*/
updatedate?: any;
/**
* 版本号
*
* @returns {*}
* @memberof Subject
*/
versionnumber?: any;
/**
* 说明
*
* @returns {*}
* @memberof Subject
*/
description?: any;
/**
* 导入序列号
*
* @returns {*}
* @memberof Subject
*/
importsequencenumber?: any;
/**
* 更新人
*
* @returns {*}
* @memberof Subject
*/
updateman?: any;
/**
* 建立时间
*
* @returns {*}
* @memberof Subject
*/
createdate?: any;
/**
* 父主题的名称。
*
* @returns {*}
* @memberof Subject
*/
parentsubjectname?: any;
/**
* 功能掩码
*
* @returns {*}
* @memberof Subject
*/
featuremask?: any;
/**
* 建立人
*
* @returns {*}
* @memberof Subject
*/
createman?: any;
/**
* 标题
*
* @returns {*}
* @memberof Subject
*/
title?: any;
/**
* 主题
*
* @returns {*}
* @memberof Subject
*/
subjectid?: any;
/**
* 父主题
*
* @returns {*}
* @memberof Subject
*/
parentsubject?: any;
}
\ No newline at end of file
...@@ -36,6 +36,7 @@ import competitor_en_US from '@locale/lanres/entities/competitor/competitor_en_U ...@@ -36,6 +36,7 @@ import competitor_en_US from '@locale/lanres/entities/competitor/competitor_en_U
import account_en_US from '@locale/lanres/entities/account/account_en_US'; import account_en_US from '@locale/lanres/entities/account/account_en_US';
import salesorder_en_US from '@locale/lanres/entities/sales-order/sales-order_en_US'; import salesorder_en_US from '@locale/lanres/entities/sales-order/sales-order_en_US';
import quotedetail_en_US from '@locale/lanres/entities/quote-detail/quote-detail_en_US'; import quotedetail_en_US from '@locale/lanres/entities/quote-detail/quote-detail_en_US';
import subject_en_US from '@locale/lanres/entities/subject/subject_en_US';
import components_en_US from '@locale/lanres/components/components_en_US'; import components_en_US from '@locale/lanres/components/components_en_US';
import codelist_en_US from '@locale/lanres/codelist/codelist_en_US'; import codelist_en_US from '@locale/lanres/codelist/codelist_en_US';
import userCustom_en_US from '@locale/lanres/userCustom/userCustom_en_US'; import userCustom_en_US from '@locale/lanres/userCustom/userCustom_en_US';
...@@ -179,6 +180,7 @@ export default { ...@@ -179,6 +180,7 @@ export default {
account: account_en_US, account: account_en_US,
salesorder: salesorder_en_US, salesorder: salesorder_en_US,
quotedetail: quotedetail_en_US, quotedetail: quotedetail_en_US,
subject: subject_en_US,
}, },
components: components_en_US, components: components_en_US,
codelist: codelist_en_US, codelist: codelist_en_US,
......
...@@ -36,6 +36,7 @@ import competitor_zh_CN from '@locale/lanres/entities/competitor/competitor_zh_C ...@@ -36,6 +36,7 @@ import competitor_zh_CN from '@locale/lanres/entities/competitor/competitor_zh_C
import account_zh_CN from '@locale/lanres/entities/account/account_zh_CN'; import account_zh_CN from '@locale/lanres/entities/account/account_zh_CN';
import salesorder_zh_CN from '@locale/lanres/entities/sales-order/sales-order_zh_CN'; import salesorder_zh_CN from '@locale/lanres/entities/sales-order/sales-order_zh_CN';
import quotedetail_zh_CN from '@locale/lanres/entities/quote-detail/quote-detail_zh_CN'; import quotedetail_zh_CN from '@locale/lanres/entities/quote-detail/quote-detail_zh_CN';
import subject_zh_CN from '@locale/lanres/entities/subject/subject_zh_CN';
import components_zh_CN from '@locale/lanres/components/components_zh_CN'; import components_zh_CN from '@locale/lanres/components/components_zh_CN';
import codelist_zh_CN from '@locale/lanres/codelist/codelist_zh_CN'; import codelist_zh_CN from '@locale/lanres/codelist/codelist_zh_CN';
import userCustom_zh_CN from '@locale/lanres/userCustom/userCustom_zh_CN'; import userCustom_zh_CN from '@locale/lanres/userCustom/userCustom_zh_CN';
...@@ -179,6 +180,7 @@ export default { ...@@ -179,6 +180,7 @@ export default {
account: account_zh_CN, account: account_zh_CN,
salesorder: salesorder_zh_CN, salesorder: salesorder_zh_CN,
quotedetail: quotedetail_zh_CN, quotedetail: quotedetail_zh_CN,
subject: subject_zh_CN,
}, },
components: components_zh_CN, components: components_zh_CN,
codelist: codelist_zh_CN, codelist: codelist_zh_CN,
......
...@@ -221,6 +221,20 @@ export default { ...@@ -221,6 +221,20 @@ export default {
'2': "高", '2': "高",
empty: "", empty: "",
}, },
Salesliterature__LiteratureTypeCode: {
'1': "产品表单",
'7': "价格表单",
'9': "公司背景",
'6': "公告",
'100001': "市场营销宣传材料",
'8': "手册",
'5': "新闻",
'0': "演示文稿",
'4': "电子表格",
'2': "策略和步骤",
'3': "销售宣传资料",
empty: "",
},
SysOperator: { SysOperator: {
empty: "", empty: "",
}, },
...@@ -336,13 +350,6 @@ export default { ...@@ -336,13 +350,6 @@ export default {
'1': "首选客户", '1': "首选客户",
empty: "", empty: "",
}, },
Product__ProductTypeCode: {
'4': "固定费用",
'3': "服务",
'2': "杂项费用",
'1': "销售存货",
empty: "",
},
Contact__GenderCode: { Contact__GenderCode: {
'2': "女", '2': "女",
'1': "男", '1': "男",
......
...@@ -221,6 +221,20 @@ export default { ...@@ -221,6 +221,20 @@ export default {
'2': "高", '2': "高",
empty: "", empty: "",
}, },
Salesliterature__LiteratureTypeCode: {
'1': "产品表单",
'7': "价格表单",
'9': "公司背景",
'6': "公告",
'100001': "市场营销宣传材料",
'8': "手册",
'5': "新闻",
'0': "演示文稿",
'4': "电子表格",
'2': "策略和步骤",
'3': "销售宣传资料",
empty: "",
},
SysOperator: { SysOperator: {
empty: "", empty: "",
}, },
...@@ -336,13 +350,6 @@ export default { ...@@ -336,13 +350,6 @@ export default {
'1': "首选客户", '1': "首选客户",
empty: "", empty: "",
}, },
Product__ProductTypeCode: {
'4': "固定费用",
'3': "服务",
'2': "杂项费用",
'1': "销售存货",
empty: "",
},
Contact__GenderCode: { Contact__GenderCode: {
'2': "女", '2': "女",
'1': "男", '1': "男",
......
...@@ -102,7 +102,7 @@ export default { ...@@ -102,7 +102,7 @@ export default {
}, },
gridview: { gridview: {
caption: "竞争对手", caption: "竞争对手",
title: "竞争对手表格视图", title: "竞争对手信息",
}, },
editview: { editview: {
caption: "竞争对手", caption: "竞争对手",
......
...@@ -101,7 +101,7 @@ export default { ...@@ -101,7 +101,7 @@ export default {
}, },
gridview: { gridview: {
caption: "竞争对手", caption: "竞争对手",
title: "竞争对手表格视图", title: "竞争对手信息",
}, },
editview: { editview: {
caption: "竞争对手", caption: "竞争对手",
......
...@@ -211,7 +211,7 @@ export default { ...@@ -211,7 +211,7 @@ export default {
}, },
gridview: { gridview: {
caption: "联系人信息", caption: "联系人信息",
title: "联系人表格视图", title: "联系人信息",
}, },
editmarket: { editmarket: {
caption: "市场营销信息", caption: "市场营销信息",
......
...@@ -210,7 +210,7 @@ export default { ...@@ -210,7 +210,7 @@ export default {
}, },
gridview: { gridview: {
caption: "联系人信息", caption: "联系人信息",
title: "联系人表格视图", title: "联系人信息",
}, },
editmarket: { editmarket: {
caption: "市场营销信息", caption: "市场营销信息",
......
...@@ -269,9 +269,13 @@ export default { ...@@ -269,9 +269,13 @@ export default {
}, },
}, },
gridviewtoolbar_toolbar: { gridviewtoolbar_toolbar: {
tbitem3: { tbitem1_openquickcreateview: {
caption: "New", caption: "新建",
tip: "New", tip: "新建",
},
tbitem2: {
caption: "-",
tip: "",
}, },
tbitem4: { tbitem4: {
caption: "Edit", caption: "Edit",
......
...@@ -268,10 +268,14 @@ export default { ...@@ -268,10 +268,14 @@ export default {
}, },
}, },
gridviewtoolbar_toolbar: { gridviewtoolbar_toolbar: {
tbitem3: { tbitem1_openquickcreateview: {
caption: "新建", caption: "新建",
tip: "新建", tip: "新建",
}, },
tbitem2: {
caption: "-",
tip: "",
},
tbitem4: { tbitem4: {
caption: "编辑", caption: "编辑",
tip: "编辑", tip: "编辑",
......
...@@ -81,7 +81,7 @@ export default { ...@@ -81,7 +81,7 @@ export default {
}, },
edit_quickcreate: { edit_quickcreate: {
caption: "产品", caption: "产品",
title: "产品选项操作视图", title: "快速新建",
}, },
gridview: { gridview: {
caption: "产品", caption: "产品",
...@@ -138,7 +138,7 @@ export default { ...@@ -138,7 +138,7 @@ export default {
uiactions: { uiactions: {
}, },
}, },
ef_001_form: { quickcreate_form: {
details: { details: {
group1: "产品基本信息", group1: "产品基本信息",
formpage1: "基本信息", formpage1: "基本信息",
...@@ -150,11 +150,10 @@ export default { ...@@ -150,11 +150,10 @@ export default {
srfuf: "", srfuf: "",
srfdeid: "", srfdeid: "",
srfsourcekey: "", srfsourcekey: "",
productname: "产品名称",
productnumber: "产品 ID", productnumber: "产品 ID",
productname: "产品名称",
validfromdate: "有效期的开始日期", validfromdate: "有效期的开始日期",
validtodate: "有效期的结束日期", validtodate: "有效期的结束日期",
description: "说明",
productid: "产品", productid: "产品",
}, },
uiactions: { uiactions: {
...@@ -164,7 +163,8 @@ export default { ...@@ -164,7 +163,8 @@ export default {
columns: { columns: {
productname: "产品名称", productname: "产品名称",
productnumber: "产品 ID", productnumber: "产品 ID",
producttypecode: "产品类型", validfromdate: "有效期的开始日期",
validtodate: "有效期的结束日期",
}, },
uiactions: { uiactions: {
}, },
......
...@@ -80,7 +80,7 @@ export default { ...@@ -80,7 +80,7 @@ export default {
}, },
edit_quickcreate: { edit_quickcreate: {
caption: "产品", caption: "产品",
title: "产品选项操作视图", title: "快速新建",
}, },
gridview: { gridview: {
caption: "产品", caption: "产品",
...@@ -137,7 +137,7 @@ export default { ...@@ -137,7 +137,7 @@ export default {
uiactions: { uiactions: {
}, },
}, },
ef_001_form: { quickcreate_form: {
details: { details: {
group1: "产品基本信息", group1: "产品基本信息",
formpage1: "基本信息", formpage1: "基本信息",
...@@ -149,11 +149,10 @@ export default { ...@@ -149,11 +149,10 @@ export default {
srfuf: "", srfuf: "",
srfdeid: "", srfdeid: "",
srfsourcekey: "", srfsourcekey: "",
productname: "产品名称",
productnumber: "产品 ID", productnumber: "产品 ID",
productname: "产品名称",
validfromdate: "有效期的开始日期", validfromdate: "有效期的开始日期",
validtodate: "有效期的结束日期", validtodate: "有效期的结束日期",
description: "说明",
productid: "产品", productid: "产品",
}, },
uiactions: { uiactions: {
...@@ -163,7 +162,8 @@ export default { ...@@ -163,7 +162,8 @@ export default {
columns: { columns: {
productname: "产品名称", productname: "产品名称",
productnumber: "产品 ID", productnumber: "产品 ID",
producttypecode: "产品类型", validfromdate: "有效期的开始日期",
validtodate: "有效期的结束日期",
}, },
uiactions: { uiactions: {
}, },
......
...@@ -100,7 +100,7 @@ export default { ...@@ -100,7 +100,7 @@ export default {
views: { views: {
gridview: { gridview: {
caption: "报价单", caption: "报价单",
title: "报价单表格视图", title: "报价单信息",
}, },
summary: { summary: {
caption: "报价单", caption: "报价单",
......
...@@ -99,7 +99,7 @@ export default { ...@@ -99,7 +99,7 @@ export default {
views: { views: {
gridview: { gridview: {
caption: "报价单", caption: "报价单",
title: "报价单表格视图", title: "报价单信息",
}, },
summary: { summary: {
caption: "报价单", caption: "报价单",
......
...@@ -42,6 +42,10 @@ export default { ...@@ -42,6 +42,10 @@ export default {
caption: "销售宣传资料", caption: "销售宣传资料",
title: "销售宣传资料表格视图", title: "销售宣传资料表格视图",
}, },
quickcreateview: {
caption: "销售宣传资料",
title: "快速新建",
},
}, },
main_form: { main_form: {
details: { details: {
...@@ -67,11 +71,32 @@ export default { ...@@ -67,11 +71,32 @@ export default {
uiactions: { uiactions: {
}, },
}, },
quickcreate_form: {
details: {
group1: "销售宣传资料基本信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "销售宣传资料",
srfmajortext: "销售资料名称",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
salesliteraturename: "标题",
subjectname: "主题",
literaturetypecode: "类型",
subjectid: "主题",
salesliteratureid: "销售宣传资料",
},
uiactions: {
},
},
main_grid: { main_grid: {
columns: { columns: {
salesliteraturename: "销售资料名称", salesliteraturename: "销售资料名称",
updateman: "更新人", subjectname: "主题",
updatedate: "更新时间", literaturetypecode: "类型",
}, },
uiactions: { uiactions: {
}, },
......
...@@ -41,6 +41,10 @@ export default { ...@@ -41,6 +41,10 @@ export default {
caption: "销售宣传资料", caption: "销售宣传资料",
title: "销售宣传资料表格视图", title: "销售宣传资料表格视图",
}, },
quickcreateview: {
caption: "销售宣传资料",
title: "快速新建",
},
}, },
main_form: { main_form: {
details: { details: {
...@@ -66,11 +70,32 @@ export default { ...@@ -66,11 +70,32 @@ export default {
uiactions: { uiactions: {
}, },
}, },
quickcreate_form: {
details: {
group1: "销售宣传资料基本信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "销售宣传资料",
srfmajortext: "销售资料名称",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
salesliteraturename: "标题",
subjectname: "主题",
literaturetypecode: "类型",
subjectid: "主题",
salesliteratureid: "销售宣传资料",
},
uiactions: {
},
},
main_grid: { main_grid: {
columns: { columns: {
salesliteraturename: "销售资料名称", salesliteraturename: "销售资料名称",
updateman: "更新人", subjectname: "主题",
updatedate: "更新时间", literaturetypecode: "类型",
}, },
uiactions: { uiactions: {
}, },
......
export default {
fields: {
overriddencreatedon: "创建记录的时间",
updatedate: "更新时间",
versionnumber: "版本号",
description: "说明",
importsequencenumber: "导入序列号",
updateman: "更新人",
createdate: "建立时间",
parentsubjectname: "父主题的名称。",
featuremask: "功能掩码",
createman: "建立人",
title: "标题",
subjectid: "主题",
parentsubject: "父主题",
},
views: {
pickupgridview: {
caption: "主题",
title: "主题选择表格视图",
},
pickupview: {
caption: "主题",
title: "主题数据选择视图",
},
},
main_grid: {
columns: {
title: "标题",
updateman: "更新人",
updatedate: "更新时间",
},
uiactions: {
},
},
default_searchform: {
details: {
formpage1: "常规条件",
},
uiactions: {
},
},
};
export default {
fields: {
overriddencreatedon: "创建记录的时间",
updatedate: "更新时间",
versionnumber: "版本号",
description: "说明",
importsequencenumber: "导入序列号",
updateman: "更新人",
createdate: "建立时间",
parentsubjectname: "父主题的名称。",
featuremask: "功能掩码",
createman: "建立人",
title: "标题",
subjectid: "主题",
parentsubject: "父主题",
},
views: {
pickupgridview: {
caption: "主题",
title: "主题选择表格视图",
},
pickupview: {
caption: "主题",
title: "主题数据选择视图",
},
},
main_grid: {
columns: {
title: "标题",
updateman: "更新人",
updatedate: "更新时间",
},
uiactions: {
},
},
default_searchform: {
details: {
formpage1: "常规条件",
},
uiactions: {
},
},
};
\ No newline at end of file
...@@ -1744,6 +1744,123 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => { ...@@ -1744,6 +1744,123 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => {
}, },
] ]
}, },
{
srfkey: 'Salesliterature__LiteratureTypeCode',
emptytext: '未定义',
"codelisttype":"static",
items: [
{
id: '1',
label: "产品表单",
text: "产品表单",
"data":"",
"codename":"Item_1",
value: '1',
disabled: false,
},
{
id: '7',
label: "价格表单",
text: "价格表单",
"data":"",
"codename":"Item_7",
value: '7',
disabled: false,
},
{
id: '9',
label: "公司背景",
text: "公司背景",
"data":"",
"codename":"Item_9",
value: '9',
disabled: false,
},
{
id: '6',
label: "公告",
text: "公告",
"data":"",
"codename":"Item_6",
value: '6',
disabled: false,
},
{
id: '100001',
label: "市场营销宣传材料",
text: "市场营销宣传材料",
"data":"",
"codename":"Item_100001",
value: '100001',
disabled: false,
},
{
id: '8',
label: "手册",
text: "手册",
"data":"",
"codename":"Item_8",
value: '8',
disabled: false,
},
{
id: '5',
label: "新闻",
text: "新闻",
"data":"",
"codename":"Item_5",
value: '5',
disabled: false,
},
{
id: '0',
label: "演示文稿",
text: "演示文稿",
"data":"",
"codename":"Item_0",
value: '0',
disabled: false,
},
{
id: '4',
label: "电子表格",
text: "电子表格",
"data":"",
"codename":"Item_4",
value: '4',
disabled: false,
},
{
id: '2',
label: "策略和步骤",
text: "策略和步骤",
"data":"",
"codename":"Item_2",
value: '2',
disabled: false,
},
{
id: '3',
label: "销售宣传资料",
text: "销售宣传资料",
"data":"",
"codename":"Item_3",
value: '3',
disabled: false,
},
]
},
{ {
"srfkey": "SysOperator", "srfkey": "SysOperator",
"emptytext": "未定义", "emptytext": "未定义",
...@@ -2481,53 +2598,6 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => { ...@@ -2481,53 +2598,6 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => {
}, },
] ]
}, },
{
srfkey: 'Product__ProductTypeCode',
emptytext: '未定义',
"codelisttype":"static",
items: [
{
id: '4',
label: "固定费用",
text: "固定费用",
"data":"",
"codename":"Item_4",
value: '4',
disabled: false,
},
{
id: '3',
label: "服务",
text: "服务",
"data":"",
"codename":"Item_3",
value: '3',
disabled: false,
},
{
id: '2',
label: "杂项费用",
text: "杂项费用",
"data":"",
"codename":"Item_2",
value: '2',
disabled: false,
},
{
id: '1',
label: "销售存货",
text: "销售存货",
"data":"",
"codename":"Item_1",
value: '1',
disabled: false,
},
]
},
{ {
srfkey: 'Contact__GenderCode', srfkey: 'Contact__GenderCode',
emptytext: '未定义', emptytext: '未定义',
......
此差异已折叠。
...@@ -45,3 +45,4 @@ import './entity/competitors/competitors'; ...@@ -45,3 +45,4 @@ import './entity/competitors/competitors';
import './entity/accounts/accounts'; import './entity/accounts/accounts';
import './entity/sales-orders/sales-orders'; import './entity/sales-orders/sales-orders';
import './entity/quote-details/quote-details'; import './entity/quote-details/quote-details';
import './entity/subjects/subjects';
...@@ -32,7 +32,7 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => { ...@@ -32,7 +32,7 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewtag": "01c28e25ad9d42977cb91ee890731b64" "viewtag": "01c28e25ad9d42977cb91ee890731b64"
}, },
"contactgridview": { "contactgridview": {
"title": "联系人表格视图", "title": "联系人信息",
"caption": "联系人信息", "caption": "联系人信息",
"viewtype": "DEGRIDVIEW", "viewtype": "DEGRIDVIEW",
"viewmodule": "Base", "viewmodule": "Base",
...@@ -120,7 +120,7 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => { ...@@ -120,7 +120,7 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewtag": "10c5d33db64f3a1bda18c7571a679438" "viewtag": "10c5d33db64f3a1bda18c7571a679438"
}, },
"quotegridview": { "quotegridview": {
"title": "报价单表格视图", "title": "报价单信息",
"caption": "报价单", "caption": "报价单",
"viewtype": "DEGRIDVIEW", "viewtype": "DEGRIDVIEW",
"viewmodule": "Sales", "viewmodule": "Sales",
...@@ -159,6 +159,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => { ...@@ -159,6 +159,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "OpportunitySummary", "viewname": "OpportunitySummary",
"viewtag": "177c00d1674621e8933efe6db68bce0e" "viewtag": "177c00d1674621e8933efe6db68bce0e"
}, },
"subjectpickupgridview": {
"title": "主题选择表格视图",
"caption": "主题",
"viewtype": "DEPICKUPGRIDVIEW",
"viewmodule": "Base",
"viewname": "SubjectPickupGridView",
"viewtag": "19e1193c4075ae18f2f29095bb8841fa"
},
"leadpickupview": { "leadpickupview": {
"title": "潜在顾客数据选择视图", "title": "潜在顾客数据选择视图",
"caption": "潜在顾客", "caption": "潜在顾客",
...@@ -1032,7 +1040,7 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => { ...@@ -1032,7 +1040,7 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewtag": "ad6abf83dc1bc466b988194cd868d98a" "viewtag": "ad6abf83dc1bc466b988194cd868d98a"
}, },
"productedit_quickcreate": { "productedit_quickcreate": {
"title": "产品选项操作视图", "title": "快速新建",
"caption": "产品", "caption": "产品",
"viewtype": "DEOPTVIEW", "viewtype": "DEOPTVIEW",
"viewmodule": "Product", "viewmodule": "Product",
...@@ -1168,7 +1176,7 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => { ...@@ -1168,7 +1176,7 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewtag": "c7d0ca0f6fa1b27bbd1b5c422d1a108d" "viewtag": "c7d0ca0f6fa1b27bbd1b5c422d1a108d"
}, },
"competitorgridview": { "competitorgridview": {
"title": "竞争对手表格视图", "title": "竞争对手信息",
"caption": "竞争对手", "caption": "竞争对手",
"viewtype": "DEGRIDVIEW", "viewtype": "DEGRIDVIEW",
"viewmodule": "Sales", "viewmodule": "Sales",
...@@ -1255,6 +1263,22 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => { ...@@ -1255,6 +1263,22 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "AccountEdit_Address", "viewname": "AccountEdit_Address",
"viewtag": "e4335da0a7c14a65376eecaabb771fd7" "viewtag": "e4335da0a7c14a65376eecaabb771fd7"
}, },
"salesliteraturequickcreateview": {
"title": "快速新建",
"caption": "销售宣传资料",
"viewtype": "DEOPTVIEW",
"viewmodule": "Sales",
"viewname": "SalesLiteratureQuickCreateView",
"viewtag": "e45cd3d0a9959e1979243837b5dcfd2d"
},
"subjectpickupview": {
"title": "主题数据选择视图",
"caption": "主题",
"viewtype": "DEPICKUPVIEW",
"viewmodule": "Base",
"viewname": "SubjectPickupView",
"viewtag": "e52af970c14fd89546ac8ccaecab460c"
},
"salesorderinfo_soview": { "salesorderinfo_soview": {
"title": "订单编辑视图", "title": "订单编辑视图",
"caption": "订单", "caption": "订单",
......
...@@ -8,7 +8,7 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -8,7 +8,7 @@ import CodeListService from "@service/app/codelist-service";
/** /**
* 联系人表格视图视图基类 * 联系人信息视图基类
* *
* @export * @export
* @class ContactGridViewBase * @class ContactGridViewBase
......
<studio-view-style2 viewName="contactgridview" viewTitle="联系人表格视图" class='degridview contact-grid-view'> <studio-view-style2 viewName="contactgridview" viewTitle="联系人信息" class='degridview contact-grid-view'>
<template slot='title'> <template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span> <span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template> </template>
......
...@@ -7,7 +7,7 @@ import view_grid from '@widgets/contact/main-grid/main-grid.vue'; ...@@ -7,7 +7,7 @@ import view_grid from '@widgets/contact/main-grid/main-grid.vue';
import view_searchform from '@widgets/contact/default-searchform/default-searchform.vue'; import view_searchform from '@widgets/contact/default-searchform/default-searchform.vue';
/** /**
* 联系人表格视图视图 * 联系人信息视图
* *
* @export * @export
* @class ContactGridView * @class ContactGridView
......
...@@ -3,6 +3,7 @@ import { Subject } from 'rxjs'; ...@@ -3,6 +3,7 @@ import { Subject } from 'rxjs';
import { GridViewBase } from '@/studio-core'; import { GridViewBase } from '@/studio-core';
import InvoiceService from '@/service/invoice/invoice-service'; import InvoiceService from '@/service/invoice/invoice-service';
import GridViewEngine from '@engine/view/grid-view-engine'; import GridViewEngine from '@engine/view/grid-view-engine';
import InvoiceUIService from '@/uiservice/invoice/invoice-ui-service';
import CodeListService from "@service/app/codelist-service"; import CodeListService from "@service/app/codelist-service";
...@@ -67,8 +68,9 @@ export class InvoiceGridViewBase extends GridViewBase { ...@@ -67,8 +68,9 @@ export class InvoiceGridViewBase extends GridViewBase {
* @memberof InvoiceGridView * @memberof InvoiceGridView
*/ */
public toolBarModels: any = { public toolBarModels: any = {
tbitem3: { name: 'tbitem3', 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: '' }, tbitem1_openquickcreateview: { name: 'tbitem1_openquickcreateview', caption: '新建','isShowCaption':true,'isShowIcon':true, tooltip: '新建', iconcls: 'fa fa-user-plus', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'OpenQuickCreateView', target: 'NONE' }, class: '' },
tbitem2: { name: 'tbitem2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem4: { name: 'tbitem4', caption: '编辑','isShowCaption':true,'isShowIcon':true, tooltip: '编辑', iconcls: 'fa fa-edit', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Edit', target: 'SINGLEKEY' }, class: '' }, tbitem4: { name: 'tbitem4', caption: '编辑','isShowCaption':true,'isShowIcon':true, tooltip: '编辑', iconcls: 'fa fa-edit', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Edit', target: 'SINGLEKEY' }, class: '' },
tbitem6: { name: 'tbitem6', caption: '拷贝','isShowCaption':true,'isShowIcon':true, tooltip: '拷贝', iconcls: 'fa fa-copy', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Copy', target: 'SINGLEKEY' }, class: '' }, tbitem6: { name: 'tbitem6', caption: '拷贝','isShowCaption':true,'isShowIcon':true, tooltip: '拷贝', iconcls: 'fa fa-copy', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Copy', target: 'SINGLEKEY' }, class: '' },
...@@ -136,8 +138,8 @@ export class InvoiceGridViewBase extends GridViewBase { ...@@ -136,8 +138,8 @@ export class InvoiceGridViewBase extends GridViewBase {
* @memberof InvoiceGridViewBase * @memberof InvoiceGridViewBase
*/ */
public toolbar_click($event: any, $event2?: any): void { public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'tbitem3')) { if (Object.is($event.tag, 'tbitem1_openquickcreateview')) {
this.toolbar_tbitem3_click(null, '', $event2); this.toolbar_tbitem1_openquickcreateview_click(null, '', $event2);
} }
if (Object.is($event.tag, 'tbitem4')) { if (Object.is($event.tag, 'tbitem4')) {
this.toolbar_tbitem4_click(null, '', $event2); this.toolbar_tbitem4_click(null, '', $event2);
...@@ -145,12 +147,6 @@ export class InvoiceGridViewBase extends GridViewBase { ...@@ -145,12 +147,6 @@ export class InvoiceGridViewBase extends GridViewBase {
if (Object.is($event.tag, 'tbitem6')) { if (Object.is($event.tag, 'tbitem6')) {
this.toolbar_tbitem6_click(null, '', $event2); this.toolbar_tbitem6_click(null, '', $event2);
} }
if (Object.is($event.tag, 'tbitem24')) {
this.toolbar_tbitem24_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem25')) {
this.toolbar_tbitem25_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem8')) { if (Object.is($event.tag, 'tbitem8')) {
this.toolbar_tbitem8_click(null, '', $event2); this.toolbar_tbitem8_click(null, '', $event2);
} }
...@@ -261,7 +257,7 @@ export class InvoiceGridViewBase extends GridViewBase { ...@@ -261,7 +257,7 @@ export class InvoiceGridViewBase extends GridViewBase {
* @param {*} [$event] * @param {*} [$event]
* @memberof * @memberof
*/ */
public toolbar_tbitem3_click(params: any = {}, tag?: any, $event?: any) { public toolbar_tbitem1_openquickcreateview_click(params: any = {}, tag?: any, $event?: any) {
// 参数 // 参数
// 取数 // 取数
let datas: any[] = []; let datas: any[] = [];
...@@ -278,7 +274,8 @@ export class InvoiceGridViewBase extends GridViewBase { ...@@ -278,7 +274,8 @@ export class InvoiceGridViewBase extends GridViewBase {
datas = [params]; datas = [params];
} }
// 界面行为 // 界面行为
this.New(datas, contextJO,paramJO, $event, xData,this,"Invoice"); const curUIService:InvoiceUIService = new InvoiceUIService();
curUIService.Invoice_OpenQuickCreateView(datas,contextJO, paramJO, $event, xData,this,"Invoice");
} }
/** /**
...@@ -337,62 +334,6 @@ export class InvoiceGridViewBase extends GridViewBase { ...@@ -337,62 +334,6 @@ export class InvoiceGridViewBase extends GridViewBase {
this.Copy(datas, contextJO,paramJO, $event, xData,this,"Invoice"); this.Copy(datas, contextJO,paramJO, $event, xData,this,"Invoice");
} }
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem24_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.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ToggleRowEdit(datas, contextJO,paramJO, $event, xData,this,"Invoice");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem25_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.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.NewRow(datas, contextJO,paramJO, $event, xData,this,"Invoice");
}
/** /**
* 逻辑事件 * 逻辑事件
* *
...@@ -575,26 +516,6 @@ export class InvoiceGridViewBase extends GridViewBase { ...@@ -575,26 +516,6 @@ export class InvoiceGridViewBase extends GridViewBase {
} }
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof InvoiceGridViewBase
*/
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 视图处理逻辑不存在,请添加!' });
}
}
/** /**
* 编辑 * 编辑
* *
...@@ -653,42 +574,6 @@ export class InvoiceGridViewBase extends GridViewBase { ...@@ -653,42 +574,6 @@ export class InvoiceGridViewBase extends GridViewBase {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' }); _this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
} }
} }
/**
* 行编辑
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof InvoiceGridViewBase
*/
public ToggleRowEdit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
xData.actualIsOpenEdit = !xData.actualIsOpenEdit;
}
/**
* 新建行
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof InvoiceGridViewBase
*/
public NewRow(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
const data: any = {};
if (_this.newRow && _this.newRow instanceof Function) {
_this.newRow([{ ...data }], params, $event, xData);
} else if(xData.newRow && xData.newRow instanceof Function) {
xData.newRow([{ ...data }], params, $event, xData);
}else{
_this.$Notice.error({ title: '错误', desc: 'newRow 视图处理逻辑不存在,请添加!' });
}
}
/** /**
* 删除 * 删除
* *
......
...@@ -4,7 +4,7 @@ import ProductService from '@/service/product/product-service'; ...@@ -4,7 +4,7 @@ import ProductService from '@/service/product/product-service';
import OptionViewEngine from '@engine/view/option-view-engine'; import OptionViewEngine from '@engine/view/option-view-engine';
/** /**
* 产品选项操作视图视图基类 * 快速新建视图基类
* *
* @export * @export
* @class ProductEdit_QuickCreateBase * @class ProductEdit_QuickCreateBase
......
<studio-view-style2 viewName="productedit_quickcreate" viewTitle="产品选项操作视图" class='deoptview product-edit-quick-create'> <studio-view-style2 viewName="productedit_quickcreate" viewTitle="快速新建" class='deoptview product-edit-quick-create'>
<template slot='title'> <template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span> <span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template> </template>
......
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
import { Component } from 'vue-property-decorator'; import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core'; import { VueLifeCycleProcessing } from '@/studio-core';
import { ProductEdit_QuickCreateBase } from './product-edit-quick-create-base'; import { ProductEdit_QuickCreateBase } from './product-edit-quick-create-base';
import view_form from '@widgets/product/ef-001-form/ef-001-form.vue'; import view_form from '@widgets/product/quick-create-form/quick-create-form.vue';
/** /**
* 产品选项操作视图视图 * 快速新建视图
* *
* @export * @export
* @class ProductEdit_QuickCreate * @class ProductEdit_QuickCreate
......
...@@ -68,7 +68,7 @@ export class ProductGridViewBase extends GridViewBase { ...@@ -68,7 +68,7 @@ export class ProductGridViewBase extends GridViewBase {
* @memberof ProductGridView * @memberof ProductGridView
*/ */
public toolBarModels: any = { public toolBarModels: any = {
tbitem1_openquickcreateview: { name: 'tbitem1_openquickcreateview', caption: '新建','isShowCaption':true,'isShowIcon':true, tooltip: '新建', iconcls: 'fa fa-file-text-o', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'OpenQuickCreateView', target: 'NONE' }, class: '' }, tbitem1_openquickcreateview: { name: 'tbitem1_openquickcreateview', caption: '新建','isShowCaption':true,'isShowIcon':true, tooltip: '新建', iconcls: 'fa fa-user-plus', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'OpenQuickCreateView', target: 'NONE' }, class: '' },
tbitem2: { name: 'tbitem2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } }, tbitem2: { name: 'tbitem2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem4: { name: 'tbitem4', caption: '编辑','isShowCaption':true,'isShowIcon':true, tooltip: '编辑', iconcls: 'fa fa-edit', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Edit', target: 'SINGLEKEY' }, class: '' }, tbitem4: { name: 'tbitem4', caption: '编辑','isShowCaption':true,'isShowIcon':true, tooltip: '编辑', iconcls: 'fa fa-edit', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Edit', target: 'SINGLEKEY' }, class: '' },
...@@ -471,16 +471,28 @@ export class ProductGridViewBase extends GridViewBase { ...@@ -471,16 +471,28 @@ export class ProductGridViewBase extends GridViewBase {
const deResParameters: any[] = []; const deResParameters: any[] = [];
const parameters: any[] = [ const parameters: any[] = [
{ pathName: 'products', parameterName: 'product' }, { pathName: 'products', parameterName: 'product' },
{ pathName: 'edit_quickcreate', parameterName: 'edit_quickcreate' },
]; ];
const _this: any = this; const _this: any = this;
const openIndexViewTab = (data: any) => { const openDrawer = (view: any, data: any) => {
const _data: any = { w: (new Date().getTime()) }; let container: Subject<any> = this.$appdrawer.openDrawer(view, tempContext, data);
Object.assign(_data, data); container.subscribe((result: any) => {
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, _data); if (!result || !Object.is(result.ret, 'OK')) {
this.$router.push(routePath); return;
}
if (!xData || !(xData.refresh instanceof Function)) {
return;
}
xData.refresh(result.datas);
});
} }
openIndexViewTab(data); const view: any = {
viewname: 'product-edit-quick-create',
height: 0,
width: 0,
title: this.$t('entities.product.views.edit_quickcreate.title'),
placement: 'DRAWER_RIGHT',
};
openDrawer(view, data);
} }
......
...@@ -8,7 +8,7 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -8,7 +8,7 @@ import CodeListService from "@service/app/codelist-service";
/** /**
* 竞争对手表格视图视图基类 * 竞争对手信息视图基类
* *
* @export * @export
* @class CompetitorGridViewBase * @class CompetitorGridViewBase
......
<studio-view-style2 viewName="competitorgridview" viewTitle="竞争对手表格视图" class='degridview competitor-grid-view'> <studio-view-style2 viewName="competitorgridview" viewTitle="竞争对手信息" class='degridview competitor-grid-view'>
<template slot='title'> <template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span> <span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template> </template>
......
...@@ -7,7 +7,7 @@ import view_grid from '@widgets/competitor/main-grid/main-grid.vue'; ...@@ -7,7 +7,7 @@ import view_grid from '@widgets/competitor/main-grid/main-grid.vue';
import view_searchform from '@widgets/competitor/default-searchform/default-searchform.vue'; import view_searchform from '@widgets/competitor/default-searchform/default-searchform.vue';
/** /**
* 竞争对手表格视图视图 * 竞争对手信息视图
* *
* @export * @export
* @class CompetitorGridView * @class CompetitorGridView
......
...@@ -8,7 +8,7 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -8,7 +8,7 @@ import CodeListService from "@service/app/codelist-service";
/** /**
* 报价单表格视图视图基类 * 报价单信息视图基类
* *
* @export * @export
* @class QuoteGridViewBase * @class QuoteGridViewBase
......
<studio-view-style2 viewName="quotegridview" viewTitle="报价单表格视图" class='degridview quote-grid-view'> <studio-view-style2 viewName="quotegridview" viewTitle="报价单信息" class='degridview quote-grid-view'>
<template slot='title'> <template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span> <span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template> </template>
......
...@@ -7,7 +7,7 @@ import view_grid from '@widgets/quote/main-grid/main-grid.vue'; ...@@ -7,7 +7,7 @@ import view_grid from '@widgets/quote/main-grid/main-grid.vue';
import view_searchform from '@widgets/quote/default-searchform/default-searchform.vue'; import view_searchform from '@widgets/quote/default-searchform/default-searchform.vue';
/** /**
* 报价单表格视图视图 * 报价单信息视图
* *
* @export * @export
* @class QuoteGridView * @class QuoteGridView
......
...@@ -15,6 +15,7 @@ export const PageComponents = { ...@@ -15,6 +15,7 @@ export const PageComponents = {
Vue.component('task-quick-create', () => import('@pages/base/task-quick-create/task-quick-create.vue')); Vue.component('task-quick-create', () => import('@pages/base/task-quick-create/task-quick-create.vue'));
Vue.component('opportunity-quick-create', () => import('@pages/sales/opportunity-quick-create/opportunity-quick-create.vue')); Vue.component('opportunity-quick-create', () => import('@pages/sales/opportunity-quick-create/opportunity-quick-create.vue'));
Vue.component('opportunity-info-product', () => import('@pages/sales/opportunity-info-product/opportunity-info-product.vue')); Vue.component('opportunity-info-product', () => import('@pages/sales/opportunity-info-product/opportunity-info-product.vue'));
Vue.component('invoice-quick-create-view', () => import('@pages/finance/invoice-quick-create-view/invoice-quick-create-view.vue'));
Vue.component('opportunity-competitor-opp-comp-grid-view', () => import('@pages/sales/opportunity-competitor-opp-comp-grid-view/opportunity-competitor-opp-comp-grid-view.vue')); Vue.component('opportunity-competitor-opp-comp-grid-view', () => import('@pages/sales/opportunity-competitor-opp-comp-grid-view/opportunity-competitor-opp-comp-grid-view.vue'));
Vue.component('contact-info-person', () => import('@pages/base/contact-info-person/contact-info-person.vue')); Vue.component('contact-info-person', () => import('@pages/base/contact-info-person/contact-info-person.vue'));
Vue.component('campaign-info-schedule', () => import('@pages/marketing/campaign-info-schedule/campaign-info-schedule.vue')); Vue.component('campaign-info-schedule', () => import('@pages/marketing/campaign-info-schedule/campaign-info-schedule.vue'));
......
...@@ -445,6 +445,20 @@ const router = new Router({ ...@@ -445,6 +445,20 @@ const router = new Router({
}, },
component: () => import('@pages/sales/opportunity-info-product/opportunity-info-product.vue'), component: () => import('@pages/sales/opportunity-info-product/opportunity-info-product.vue'),
}, },
{
path: 'invoices/:invoice?/quickcreateview/:quickcreateview?',
meta: {
caption: 'entities.invoice.views.quickcreateview.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'invoices', parameterName: 'invoice' },
{ pathName: 'quickcreateview', parameterName: 'quickcreateview' },
],
requireAuth: true,
},
component: () => import('@pages/finance/invoice-quick-create-view/invoice-quick-create-view.vue'),
},
{ {
path: 'accounts/:account?/contacts/:contact?/opportunities/:opportunity?/opportunitycompetitors/:opportunitycompetitor?/oppcompgridview/:oppcompgridview?', path: 'accounts/:account?/contacts/:contact?/opportunities/:opportunity?/opportunitycompetitors/:opportunitycompetitor?/oppcompgridview/:oppcompgridview?',
meta: { meta: {
......
...@@ -77,6 +77,7 @@ export class EntityServiceRegister { ...@@ -77,6 +77,7 @@ export class EntityServiceRegister {
this.allEntityService.set('account', () => import('@/service/account/account-service')); this.allEntityService.set('account', () => import('@/service/account/account-service'));
this.allEntityService.set('salesorder', () => import('@/service/sales-order/sales-order-service')); this.allEntityService.set('salesorder', () => import('@/service/sales-order/sales-order-service'));
this.allEntityService.set('quotedetail', () => import('@/service/quote-detail/quote-detail-service')); this.allEntityService.set('quotedetail', () => import('@/service/quote-detail/quote-detail-service'));
this.allEntityService.set('subject', () => import('@/service/subject/subject-service'));
} }
/** /**
......
import { Http,Util } from '@/utils';
import EntityService from '../entity-service';
/**
* 主题服务对象基类
*
* @export
* @class SubjectServiceBase
* @extends {EntityServie}
*/
export default class SubjectServiceBase extends EntityService {
/**
* Creates an instance of SubjectServiceBase.
*
* @param {*} [opts={}]
* @memberof SubjectServiceBase
*/
constructor(opts: any = {}) {
super(opts);
}
/**
* 初始化基础数据
*
* @memberof SubjectServiceBase
*/
public initBasicData(){
this.APPLYDEKEY ='subject';
this.APPDEKEY = 'subjectid';
this.APPDENAME = 'subjects';
this.APPDETEXT = 'title';
this.APPNAME = 'crm';
this.SYSTEMNAME = 'ibizbusinesscentral';
}
// 实体接口
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SubjectServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().get(`/subjects/${context.subject}/select`,isloading);
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SubjectServiceBase
*/
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(`/subjects/${context.subject}/save`,data,isloading);
return res;
}
/**
* Create接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SubjectServiceBase
*/
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(`/subjects`,data,isloading);
return res;
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SubjectServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().post(`/subjects/${context.subject}/checkkey`,data,isloading);
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SubjectServiceBase
*/
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(`/subjects/${context.subject}`,data,isloading);
return res;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SubjectServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().delete(`/subjects/${context.subject}`,isloading);
}
/**
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SubjectServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/subjects/getdraft`,isloading);
res.data.subject = data.subject;
return res;
}
/**
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SubjectServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/subjects/${context.subject}`,isloading);
return res;
}
/**
* FetchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SubjectServiceBase
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/subjects/fetchdefault`,tempData,isloading);
}
}
\ No newline at end of file
import { Http,Util } from '@/utils';
import SubjectServiceBase from './subject-service-base';
/**
* 主题服务对象
*
* @export
* @class SubjectService
* @extends {SubjectServiceBase}
*/
export default class SubjectService extends SubjectServiceBase {
/**
* Creates an instance of SubjectService.
*
* @param {*} [opts={}]
* @memberof SubjectService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
...@@ -1428,6 +1428,7 @@ export const viewstate: any = { ...@@ -1428,6 +1428,7 @@ export const viewstate: any = {
viewaction: '', viewaction: '',
viewdatachange: false, viewdatachange: false,
refviews: [ refviews: [
'0fc09bf520af62b4d89aef845fc72636',
'01c28e25ad9d42977cb91ee890731b64', '01c28e25ad9d42977cb91ee890731b64',
], ],
}, },
......
...@@ -95,6 +95,66 @@ export default class InvoiceUIServiceBase extends UIService { ...@@ -95,6 +95,66 @@ export default class InvoiceUIServiceBase extends UIService {
public initDeMainStateMap(){ public initDeMainStateMap(){
} }
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
*/
public async Invoice_OpenQuickCreateView(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 = 'NONE';
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[] = [];
const parameters: any[] = [
{ pathName: 'invoices', parameterName: 'invoice' },
];
const openDrawer = (view: any, data: any) => {
let container: Subject<any> = actionContext.$appdrawer.openDrawer(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: 'invoice-quick-create-view',
height: 0,
width: 0,
title: actionContext.$t('entities.invoice.views.quickcreateview.title'),
placement: 'DRAWER_RIGHT',
};
openDrawer(view, data);
}
/** /**
* 获取指定数据的重定向页面 * 获取指定数据的重定向页面
......
...@@ -131,14 +131,29 @@ export default class ProductUIServiceBase extends UIService { ...@@ -131,14 +131,29 @@ export default class ProductUIServiceBase extends UIService {
let deResParameters: any[] = []; let deResParameters: any[] = [];
const parameters: any[] = [ const parameters: any[] = [
{ pathName: 'products', parameterName: 'product' }, { pathName: 'products', parameterName: 'product' },
{ pathName: 'edit_quickcreate', parameterName: 'edit_quickcreate' },
]; ];
const openIndexViewTab = (data: any) => { const openDrawer = (view: any, data: any) => {
const routePath = actionContext.$viewTool.buildUpRoutePath(actionContext.$route, context, deResParameters, parameters, _args, data); let container: Subject<any> = actionContext.$appdrawer.openDrawer(view, context,data);
actionContext.$router.push(routePath); container.subscribe((result: any) => {
return null; if (!result || !Object.is(result.ret, 'OK')) {
} return;
openIndexViewTab(data); }
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: 'product-edit-quick-create',
height: 0,
width: 0,
title: actionContext.$t('entities.product.views.edit_quickcreate.title'),
placement: 'DRAWER_RIGHT',
};
openDrawer(view, data);
} }
......
...@@ -81,6 +81,7 @@ export default class SalesLiteratureUIServiceBase extends UIService { ...@@ -81,6 +81,7 @@ export default class SalesLiteratureUIServiceBase extends UIService {
public initViewMap(){ public initViewMap(){
this.allViewMap.set('EDITVIEW:',{viewname:'editview',srfappde:'salesliteratures'}); this.allViewMap.set('EDITVIEW:',{viewname:'editview',srfappde:'salesliteratures'});
this.allViewMap.set('MDATAVIEW:',{viewname:'gridview',srfappde:'salesliteratures'}); this.allViewMap.set('MDATAVIEW:',{viewname:'gridview',srfappde:'salesliteratures'});
this.allViewMap.set(':',{viewname:'quickcreateview',srfappde:'salesliteratures'});
} }
/** /**
......
import { Environment } from '@/environments/environment';
import { UIActionTool,Util } from '@/utils';
import UIService from '../ui-service';
import { Subject } from 'rxjs';
import SubjectService from '@/service/subject/subject-service';
/**
* 主题UI服务对象基类
*
* @export
* @class SubjectUIServiceBase
*/
export default class SubjectUIServiceBase extends UIService {
/**
* 是否支持工作流
*
* @memberof SubjectUIServiceBase
*/
public isEnableWorkflow:boolean = false;
/**
* 当前UI服务对应的数据服务对象
*
* @memberof SubjectUIServiceBase
*/
public dataService:SubjectService = new SubjectService();
/**
* 所有关联视图
*
* @memberof SubjectUIServiceBase
*/
public allViewMap: Map<string, Object> = new Map();
/**
* 状态值
*
* @memberof SubjectUIServiceBase
*/
public stateValue: number = 0;
/**
* 状态属性
*
* @memberof SubjectUIServiceBase
*/
public stateField: string = "";
/**
* 主状态属性集合
*
* @memberof SubjectUIServiceBase
*/
public mainStateFields:Array<any> = [];
/**
* 主状态集合Map
*
* @memberof SubjectUIServiceBase
*/
public allDeMainStateMap:Map<string,string> = new Map();
/**
* Creates an instance of SubjectUIServiceBase.
*
* @param {*} [opts={}]
* @memberof SubjectUIServiceBase
*/
constructor(opts: any = {}) {
super(opts);
this.initViewMap();
this.initDeMainStateMap();
}
/**
* 初始化视图Map
*
* @memberof SubjectUIServiceBase
*/
public initViewMap(){
this.allViewMap.set(':',{viewname:'pickupgridview',srfappde:'subjects'});
this.allViewMap.set('PICKUPVIEW:',{viewname:'pickupview',srfappde:'subjects'});
}
/**
* 初始化主状态集合
*
* @memberof SubjectUIServiceBase
*/
public initDeMainStateMap(){
}
/**
* 获取指定数据的重定向页面
*
* @param srfkey 数据主键
* @param isEnableWorkflow 重定向视图是否需要处理流程中的数据
* @memberof SubjectUIServiceBase
*/
public async getRDAppView(srfkey:string,isEnableWorkflow:boolean){
this.isEnableWorkflow = isEnableWorkflow;
// 进行数据查询
let result:any = await this.dataService.Get({subject: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 SubjectUIServiceBase
*/
public getRealDEType(entity:any){
}
/**
* 获取实体单数据实体视图预定义参数
*
* @param curData 当前数据
* @param bDataInWF 是否有数据在工作流中
* @param bWFMode 是否工作流模式
* @memberof SubjectUIServiceBase
*/
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 SubjectUIServiceBase
*/
public async getDEMainStateTag(curData:any){
if(this.mainStateFields.length === 0) return null;
this.mainStateFields.forEach((singleMainField:any) =>{
if(!(singleMainField in curData)){
console.error(`当前数据对象不包含属性singleMainField,可能会发生错误`);
}
})
let strTag:String = "";
for (let i = 0; i <= 1; i++) {
let strTag:string = (curData[this.mainStateFields[0]])?(i == 0) ? curData[this.mainStateFields[0]] : "":"";
if (this.mainStateFields.length >= 2) {
for (let j = 0; j <= 1; j++) {
let strTag2:string = (curData[this.mainStateFields[1]])?`${strTag}__${(j == 0) ? curData[this.mainStateFields[1]] : ""}`:strTag;
if (this.mainStateFields.length >= 3) {
for (let k = 0; k <= 1; k++) {
let strTag3:string = (curData[this.mainStateFields[2]])?`${strTag2}__${(k == 0) ? curData[this.mainStateFields[2]] : ""}`:strTag2;
// 判断是否存在
return this.allDeMainStateMap.get(strTag3);
}
}else{
return this.allDeMainStateMap.get(strTag2);
}
}
}else{
return this.allDeMainStateMap.get(strTag);
}
}
return null;
}
}
\ No newline at end of file
import SubjectUIServiceBase from './subject-ui-service-base';
/**
* 主题UI服务对象
*
* @export
* @class SubjectUIService
*/
export default class SubjectUIService extends SubjectUIServiceBase {
/**
* Creates an instance of SubjectUIService.
*
* @param {*} [opts={}]
* @memberof SubjectUIService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
...@@ -77,6 +77,7 @@ export class UIServiceRegister { ...@@ -77,6 +77,7 @@ export class UIServiceRegister {
this.allUIService.set('account', () => import('@/uiservice/account/account-ui-service')); this.allUIService.set('account', () => import('@/uiservice/account/account-ui-service'));
this.allUIService.set('salesorder', () => import('@/uiservice/sales-order/sales-order-ui-service')); this.allUIService.set('salesorder', () => import('@/uiservice/sales-order/sales-order-ui-service'));
this.allUIService.set('quotedetail', () => import('@/uiservice/quote-detail/quote-detail-ui-service')); this.allUIService.set('quotedetail', () => import('@/uiservice/quote-detail/quote-detail-ui-service'));
this.allUIService.set('subject', () => import('@/uiservice/subject/subject-ui-service'));
} }
/** /**
......
...@@ -71,9 +71,16 @@ export class MainGridBase extends GridControllerBase { ...@@ -71,9 +71,16 @@ export class MainGridBase extends GridControllerBase {
util: 'PX' util: 'PX'
}, },
{ {
name: 'producttypecode', name: 'validfromdate',
label: '产品类型', label: '有效期的开始日期',
langtag: 'entities.product.main_grid.columns.producttypecode', langtag: 'entities.product.main_grid.columns.validfromdate',
show: true,
util: 'PX'
},
{
name: 'validtodate',
label: '有效期的结束日期',
langtag: 'entities.product.main_grid.columns.validtodate',
show: true, show: true,
util: 'PX' util: 'PX'
}, },
...@@ -113,7 +120,8 @@ export class MainGridBase extends GridControllerBase { ...@@ -113,7 +120,8 @@ export class MainGridBase extends GridControllerBase {
public hasRowEdit: any = { public hasRowEdit: any = {
'productname':false, 'productname':false,
'productnumber':false, 'productnumber':false,
'producttypecode':false, 'validfromdate':false,
'validtodate':false,
}; };
/** /**
......
...@@ -26,16 +26,6 @@ export default class MainModel { ...@@ -26,16 +26,6 @@ export default class MainModel {
] ]
}else{ }else{
return [ return [
{
name: 'defaultuomid',
prop: 'defaultuomid',
dataType: 'PICKUP',
},
{
name: 'parentproductid',
prop: 'parentproductid',
dataType: 'PICKUP',
},
{ {
name: 'defaultuomscheduleid', name: 'defaultuomscheduleid',
prop: 'defaultuomscheduleid', prop: 'defaultuomscheduleid',
...@@ -51,36 +41,51 @@ export default class MainModel { ...@@ -51,36 +41,51 @@ export default class MainModel {
prop: 'productnumber', prop: 'productnumber',
dataType: 'TEXT', dataType: 'TEXT',
}, },
{
name: 'subjectid',
prop: 'subjectid',
dataType: 'PICKUP',
},
{
name: 'pricelevelid',
prop: 'pricelevelid',
dataType: 'PICKUP',
},
{
name: 'producttypecode',
prop: 'producttypecode',
dataType: 'SSCODELIST',
},
{ {
name: 'srfmajortext', name: 'srfmajortext',
prop: 'productname', prop: 'productname',
dataType: 'TEXT', dataType: 'TEXT',
}, },
{ {
name: 'srfdataaccaction', name: 'srfkey',
prop: 'productid', prop: 'productid',
dataType: 'GUID', dataType: 'GUID',
}, },
{ {
name: 'srfkey', name: 'srfdataaccaction',
prop: 'productid', prop: 'productid',
dataType: 'GUID', dataType: 'GUID',
}, },
{
name: 'validfromdate',
prop: 'validfromdate',
dataType: 'DATETIME',
},
{
name: 'defaultuomid',
prop: 'defaultuomid',
dataType: 'PICKUP',
},
{
name: 'parentproductid',
prop: 'parentproductid',
dataType: 'PICKUP',
},
{
name: 'validtodate',
prop: 'validtodate',
dataType: 'DATETIME',
},
{
name: 'pricelevelid',
prop: 'pricelevelid',
dataType: 'PICKUP',
},
{
name: 'subjectid',
prop: 'subjectid',
dataType: 'PICKUP',
},
{ {
name: 'productname', name: 'productname',
prop: 'productname', prop: 'productname',
......
...@@ -47,17 +47,27 @@ ...@@ -47,17 +47,27 @@
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
<template v-if="getColumnState('producttypecode')"> <template v-if="getColumnState('validfromdate')">
<el-table-column show-overflow-tooltip :prop="'producttypecode'" :label="$t('entities.product.main_grid.columns.producttypecode')" :width="150" :align="'left'" :sortable="'custom'"> <el-table-column show-overflow-tooltip :prop="'validfromdate'" :label="$t('entities.product.main_grid.columns.validfromdate')" :width="180" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}"> <template v-slot:header="{column}">
<span class="column-header "> <span class="column-header ">
{{$t('entities.product.main_grid.columns.producttypecode')}} {{$t('entities.product.main_grid.columns.validfromdate')}}
</span> </span>
</template> </template>
<template v-slot="{row,column,$index}"> <template v-slot="{row,column,$index}">
<template > <app-format-data format="YYYY-MM-DD hh:mm:ss" :data="row.validfromdate"></app-format-data>
<codelist :value="row.producttypecode" tag='Product__ProductTypeCode' codelistType='STATIC' ></codelist> </template>
</template> </el-table-column>
</template>
<template v-if="getColumnState('validtodate')">
<el-table-column show-overflow-tooltip :prop="'validtodate'" :label="$t('entities.product.main_grid.columns.validtodate')" :width="180" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.product.main_grid.columns.validtodate')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<app-format-data format="YYYY-MM-DD hh:mm:ss" :data="row.validtodate"></app-format-data>
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
......
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, EditFormControlBase } from '@/studio-core';
import ProductService from '@/service/product/product-service';
import QuickCreateService from './quick-create-form-service';
import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail';
/**
* form部件基类
*
* @export
* @class EditFormControlBase
* @extends {QuickCreateEditFormBase}
*/
export class QuickCreateEditFormBase extends EditFormControlBase {
/**
* 建构部件服务对象
*
* @type {QuickCreateService}
* @memberof QuickCreateEditFormBase
*/
public service: QuickCreateService = new QuickCreateService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {ProductService}
* @memberof QuickCreateEditFormBase
*/
public appEntityService: ProductService = new ProductService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof QuickCreateEditFormBase
*/
protected appDeName: string = 'product';
/**
* 表单数据对象
*
* @type {*}
* @memberof QuickCreateEditFormBase
*/
public data: any = {
srfupdatedate: null,
srforikey: null,
srfkey: null,
srfmajortext: null,
srftempmode: null,
srfuf: null,
srfdeid: null,
srfsourcekey: null,
productnumber: null,
productname: null,
validfromdate: null,
validtodate: null,
productid: null,
product:null,
};
/**
* 属性值规则
*
* @type {*}
* @memberof QuickCreateEditFormBase
*/
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' },
],
productnumber: [
{ required: true, type: 'string', message: '产品 ID 值不能为空', trigger: 'change' },
{ required: true, type: 'string', message: '产品 ID 值不能为空', trigger: 'blur' },
],
productname: [
{ required: true, type: 'string', message: '产品名称 值不能为空', trigger: 'change' },
{ required: true, type: 'string', message: '产品名称 值不能为空', trigger: 'blur' },
],
validfromdate: [
{ required: false, type: 'string', message: '有效期的开始日期 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '有效期的开始日期 值不能为空', trigger: 'blur' },
],
validtodate: [
{ required: false, type: 'string', message: '有效期的结束日期 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '有效期的结束日期 值不能为空', trigger: 'blur' },
],
productid: [
{ required: false, type: 'string', message: '产品 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '产品 值不能为空', trigger: 'blur' },
],
}
/**
* 详情模型集合
*
* @type {*}
* @memberof QuickCreateEditFormBase
*/
public detailsModel: any = {
group1: new FormGroupPanelModel({ caption: '产品基本信息', detailType: 'GROUPPANEL', name: 'group1', visible: true, isShowCaption: false, form: this, uiActionGroup: { caption: '', langbase: 'entities.product.quickcreate_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 }),
productnumber: new FormItemModel({ caption: '产品 ID', detailType: 'FORMITEM', name: 'productnumber', 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 }),
validfromdate: new FormItemModel({ caption: '有效期的开始日期', detailType: 'FORMITEM', name: 'validfromdate', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
validtodate: new FormItemModel({ caption: '有效期的结束日期', detailType: 'FORMITEM', name: 'validtodate', 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: 1 }),
};
}
\ No newline at end of file
/**
* QuickCreate 部件模型
*
* @export
* @class QuickCreateModel
*/
export default class QuickCreateModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof QuickCreateModel
*/
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: 'productid',
dataType: 'GUID',
},
{
name: 'srfmajortext',
prop: 'productname',
dataType: 'TEXT',
},
{
name: 'srftempmode',
},
{
name: 'srfuf',
},
{
name: 'srfdeid',
},
{
name: 'srfsourcekey',
},
{
name: 'productnumber',
prop: 'productnumber',
dataType: 'TEXT',
},
{
name: 'productname',
prop: 'productname',
dataType: 'TEXT',
},
{
name: 'validfromdate',
prop: 'validfromdate',
dataType: 'DATETIME',
},
{
name: 'validtodate',
prop: 'validtodate',
dataType: 'DATETIME',
},
{
name: 'productid',
prop: 'productid',
dataType: 'GUID',
},
{
name: 'product',
prop: 'productid',
dataType: 'FONTKEY',
},
]
}
}
\ No newline at end of file
<i-form :model="this.data" class='app-form' ref='form' id='product_quickcreate' 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.product.quickcreate_form.details.group1')" :isShowCaption="false" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" >
<row>
<i-col v-show="detailsModel.productnumber.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='productnumber' :itemRules="this.rules.productnumber" class='' :caption="$t('entities.product.quickcreate_form.details.productnumber')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.productnumber.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.productnumber" @enter="onEnter($event)" unit="" :disabled="detailsModel.productnumber.disabled" type='text' style=""></input-box>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.productname.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='productname' :itemRules="this.rules.productname" class='' :caption="$t('entities.product.quickcreate_form.details.productname')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.productname.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.productname" @enter="onEnter($event)" unit="" :disabled="detailsModel.productname.disabled" type='text' style=""></input-box>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.validfromdate.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='validfromdate' :itemRules="this.rules.validfromdate" class='' :caption="$t('entities.product.quickcreate_form.details.validfromdate')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.validfromdate.error" :isEmptyCaption="false" labelPos="LEFT">
<date-picker type="datetime" :transfer="true" format="yyyy-MM-dd HH:mm:ss" placeholder="请选择时间..." :value="data.validfromdate" :disabled="detailsModel.validfromdate.disabled" style="min-width: 150px; width:160px;" @on-change="(val1, val2) => { this.data.validfromdate = val1 }"></date-picker>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.validtodate.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='validtodate' :itemRules="this.rules.validtodate" class='' :caption="$t('entities.product.quickcreate_form.details.validtodate')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.validtodate.error" :isEmptyCaption="false" labelPos="LEFT">
<date-picker type="datetime" :transfer="true" format="yyyy-MM-dd HH:mm:ss" placeholder="请选择时间..." :value="data.validtodate" :disabled="detailsModel.validtodate.disabled" style="min-width: 150px; width:160px;" @on-change="(val1, val2) => { this.data.validtodate = val1 }"></date-picker>
</app-form-item>
</i-col>
</row>
</app-form-group>
</i-col>
</row>
</i-form>
\ No newline at end of file
<template src="./quick-create-form.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { QuickCreateEditFormBase } from './quick-create-form-base';
/**
* form部件
*
* @export
* @class QuickCreateEditForm
* @extends {QuickCreateEditFormBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class QuickCreateEditForm extends QuickCreateEditFormBase { }
</script>
...@@ -64,16 +64,16 @@ export class MainGridBase extends GridControllerBase { ...@@ -64,16 +64,16 @@ export class MainGridBase extends GridControllerBase {
util: 'PX' util: 'PX'
}, },
{ {
name: 'updateman', name: 'subjectname',
label: '更新人', label: '主题',
langtag: 'entities.salesliterature.main_grid.columns.updateman', langtag: 'entities.salesliterature.main_grid.columns.subjectname',
show: true, show: true,
util: 'PX' util: 'PX'
}, },
{ {
name: 'updatedate', name: 'literaturetypecode',
label: '更新时间', label: '类型',
langtag: 'entities.salesliterature.main_grid.columns.updatedate', langtag: 'entities.salesliterature.main_grid.columns.literaturetypecode',
show: true, show: true,
util: 'PX' util: 'PX'
}, },
...@@ -112,8 +112,8 @@ export class MainGridBase extends GridControllerBase { ...@@ -112,8 +112,8 @@ export class MainGridBase extends GridControllerBase {
*/ */
public hasRowEdit: any = { public hasRowEdit: any = {
'salesliteraturename':false, 'salesliteraturename':false,
'updateman':false, 'subjectname':false,
'updatedate':false, 'literaturetypecode':false,
}; };
/** /**
......
...@@ -26,26 +26,26 @@ export default class MainModel { ...@@ -26,26 +26,26 @@ export default class MainModel {
] ]
}else{ }else{
return [ return [
{
name: 'literaturetypecode',
prop: 'literaturetypecode',
dataType: 'SSCODELIST',
},
{ {
name: 'salesliteraturename', name: 'salesliteraturename',
prop: 'salesliteraturename', prop: 'salesliteraturename',
dataType: 'TEXT', dataType: 'TEXT',
}, },
{ {
name: 'updateman', name: 'subjectname',
prop: 'updateman', prop: 'subjectname',
dataType: 'TEXT', dataType: 'PICKUPTEXT',
}, },
{ {
name: 'transactioncurrencyid', name: 'transactioncurrencyid',
prop: 'transactioncurrencyid', prop: 'transactioncurrencyid',
dataType: 'PICKUP', dataType: 'PICKUP',
}, },
{
name: 'updatedate',
prop: 'updatedate',
dataType: 'DATETIME',
},
{ {
name: 'subjectid', name: 'subjectid',
prop: 'subjectid', prop: 'subjectid',
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<el-table-column align="center" type='selection' :width="checkboxColWidth"></el-table-column> <el-table-column align="center" type='selection' :width="checkboxColWidth"></el-table-column>
</template> </template>
<template v-if="getColumnState('salesliteraturename')"> <template v-if="getColumnState('salesliteraturename')">
<el-table-column show-overflow-tooltip :prop="'salesliteraturename'" :label="$t('entities.salesliterature.main_grid.columns.salesliteraturename')" :width="150" :align="'left'" :sortable="'custom'"> <el-table-column show-overflow-tooltip :prop="'salesliteraturename'" :label="$t('entities.salesliterature.main_grid.columns.salesliteraturename')" :width="180" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}"> <template v-slot:header="{column}">
<span class="column-header "> <span class="column-header ">
{{$t('entities.salesliterature.main_grid.columns.salesliteraturename')}} {{$t('entities.salesliterature.main_grid.columns.salesliteraturename')}}
...@@ -35,29 +35,29 @@ ...@@ -35,29 +35,29 @@
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
<template v-if="getColumnState('updateman')"> <template v-if="getColumnState('subjectname')">
<el-table-column show-overflow-tooltip :prop="'updateman'" :label="$t('entities.salesliterature.main_grid.columns.updateman')" :width="150" :align="'left'" :sortable="'custom'"> <el-table-column show-overflow-tooltip :prop="'subjectname'" :label="$t('entities.salesliterature.main_grid.columns.subjectname')" :width="150" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}"> <template v-slot:header="{column}">
<span class="column-header "> <span class="column-header ">
{{$t('entities.salesliterature.main_grid.columns.updateman')}} {{$t('entities.salesliterature.main_grid.columns.subjectname')}}
</span> </span>
</template> </template>
<template v-slot="{row,column,$index}"> <template v-slot="{row,column,$index}">
<template > <span>{{row.subjectname}}</span>
<codelist :value="row.updateman" tag='SysOperator' codelistType='DYNAMIC' ></codelist>
</template>
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
<template v-if="getColumnState('updatedate')"> <template v-if="getColumnState('literaturetypecode')">
<el-table-column show-overflow-tooltip :prop="'updatedate'" :label="$t('entities.salesliterature.main_grid.columns.updatedate')" :width="150" :align="'left'" :sortable="'custom'"> <el-table-column show-overflow-tooltip :prop="'literaturetypecode'" :label="$t('entities.salesliterature.main_grid.columns.literaturetypecode')" :width="150" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}"> <template v-slot:header="{column}">
<span class="column-header "> <span class="column-header ">
{{$t('entities.salesliterature.main_grid.columns.updatedate')}} {{$t('entities.salesliterature.main_grid.columns.literaturetypecode')}}
</span> </span>
</template> </template>
<template v-slot="{row,column,$index}"> <template v-slot="{row,column,$index}">
<app-format-data format="YYYY-MM-DD hh:mm:ss" :data="row.updatedate"></app-format-data> <template >
<codelist :value="row.literaturetypecode" tag='Salesliterature__LiteratureTypeCode' codelistType='STATIC' ></codelist>
</template>
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
......
...@@ -159,5 +159,9 @@ zuul: ...@@ -159,5 +159,9 @@ zuul:
path: /quotedetails/** path: /quotedetails/**
serviceId: ibizbusinesscentral-centralapi serviceId: ibizbusinesscentral-centralapi
stripPrefix: false stripPrefix: false
subject:
path: /subjects/**
serviceId: ibizbusinesscentral-centralapi
stripPrefix: false
sensitive-headers: sensitive-headers:
- Cookie,Set-Cookie,Authorization - Cookie,Set-Cookie,Authorization
...@@ -305,6 +305,14 @@ ...@@ -305,6 +305,14 @@
"sysmoudle":{"id":"SALES","name":"Sales"}, "sysmoudle":{"id":"SALES","name":"Sales"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"}], "dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"deaction":[{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"Create" , "name":"Create" , "type":"BUILTIN" }], "deaction":[{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"Create" , "name":"Create" , "type":"BUILTIN" }],
"datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}]
}
, {
"dename":"Subject",
"delogicname":"主题",
"sysmoudle":{"id":"BASE","name":"Base"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"deaction":[{"id":"Save" , "name":"Save" , "type":"BUILTIN" },{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" }],
"datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}] "datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}]
} }
], ],
......
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对象[SubjectDTO]
*/
@Data
public class SubjectDTO 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;
/**
* 属性 [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;
/**
* 属性 [VERSIONNUMBER]
*
*/
@JSONField(name = "versionnumber")
@JsonProperty("versionnumber")
private BigInteger versionnumber;
/**
* 属性 [DESCRIPTION]
*
*/
@JSONField(name = "description")
@JsonProperty("description")
private String description;
/**
* 属性 [IMPORTSEQUENCENUMBER]
*
*/
@JSONField(name = "importsequencenumber")
@JsonProperty("importsequencenumber")
private Integer importsequencenumber;
/**
* 属性 [UPDATEMAN]
*
*/
@JSONField(name = "updateman")
@JsonProperty("updateman")
private String updateman;
/**
* 属性 [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;
/**
* 属性 [PARENTSUBJECTNAME]
*
*/
@JSONField(name = "parentsubjectname")
@JsonProperty("parentsubjectname")
private String parentsubjectname;
/**
* 属性 [FEATUREMASK]
*
*/
@JSONField(name = "featuremask")
@JsonProperty("featuremask")
private Integer featuremask;
/**
* 属性 [CREATEMAN]
*
*/
@JSONField(name = "createman")
@JsonProperty("createman")
private String createman;
/**
* 属性 [TITLE]
*
*/
@JSONField(name = "title")
@JsonProperty("title")
private String title;
/**
* 属性 [SUBJECTID]
*
*/
@JSONField(name = "subjectid")
@JsonProperty("subjectid")
private String subjectid;
/**
* 属性 [PARENTSUBJECT]
*
*/
@JSONField(name = "parentsubject")
@JsonProperty("parentsubject")
private String parentsubject;
/**
* 设置 [OVERRIDDENCREATEDON]
*/
public void setOverriddencreatedon(Timestamp overriddencreatedon){
this.overriddencreatedon = overriddencreatedon ;
this.modify("overriddencreatedon",overriddencreatedon);
}
/**
* 设置 [VERSIONNUMBER]
*/
public void setVersionnumber(BigInteger versionnumber){
this.versionnumber = versionnumber ;
this.modify("versionnumber",versionnumber);
}
/**
* 设置 [DESCRIPTION]
*/
public void setDescription(String description){
this.description = description ;
this.modify("description",description);
}
/**
* 设置 [IMPORTSEQUENCENUMBER]
*/
public void setImportsequencenumber(Integer importsequencenumber){
this.importsequencenumber = importsequencenumber ;
this.modify("importsequencenumber",importsequencenumber);
}
/**
* 设置 [PARENTSUBJECTNAME]
*/
public void setParentsubjectname(String parentsubjectname){
this.parentsubjectname = parentsubjectname ;
this.modify("parentsubjectname",parentsubjectname);
}
/**
* 设置 [FEATUREMASK]
*/
public void setFeaturemask(Integer featuremask){
this.featuremask = featuremask ;
this.modify("featuremask",featuremask);
}
/**
* 设置 [TITLE]
*/
public void setTitle(String title){
this.title = title ;
this.modify("title",title);
}
/**
* 设置 [PARENTSUBJECT]
*/
public void setParentsubject(String parentsubject){
this.parentsubject = parentsubject ;
this.modify("parentsubject",parentsubject);
}
}
package cn.ibizlab.businesscentral.centralapi.mapping;
import org.mapstruct.*;
import cn.ibizlab.businesscentral.core.base.domain.Subject;
import cn.ibizlab.businesscentral.centralapi.dto.SubjectDTO;
import cn.ibizlab.businesscentral.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {},
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface SubjectMapping extends MappingBase<SubjectDTO, Subject> {
}
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.Subject;
import cn.ibizlab.businesscentral.core.base.service.ISubjectService;
import cn.ibizlab.businesscentral.core.base.filter.SubjectSearchContext;
import cn.ibizlab.businesscentral.util.annotation.VersionCheck;
@Slf4j
@Api(tags = {"主题" })
@RestController("CentralApi-subject")
@RequestMapping("")
public class SubjectResource {
@Autowired
public ISubjectService subjectService;
@Autowired
@Lazy
public SubjectMapping subjectMapping;
@PreAuthorize("hasPermission(this.subjectMapping.toDomain(#subjectdto),'iBizBusinessCentral-Subject-Save')")
@ApiOperation(value = "保存主题", tags = {"主题" }, notes = "保存主题")
@RequestMapping(method = RequestMethod.POST, value = "/subjects/save")
public ResponseEntity<Boolean> save(@RequestBody SubjectDTO subjectdto) {
return ResponseEntity.status(HttpStatus.OK).body(subjectService.save(subjectMapping.toDomain(subjectdto)));
}
@PreAuthorize("hasPermission(this.subjectMapping.toDomain(#subjectdtos),'iBizBusinessCentral-Subject-Save')")
@ApiOperation(value = "批量保存主题", tags = {"主题" }, notes = "批量保存主题")
@RequestMapping(method = RequestMethod.POST, value = "/subjects/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<SubjectDTO> subjectdtos) {
subjectService.saveBatch(subjectMapping.toDomain(subjectdtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasPermission(this.subjectMapping.toDomain(#subjectdto),'iBizBusinessCentral-Subject-Create')")
@ApiOperation(value = "新建主题", tags = {"主题" }, notes = "新建主题")
@RequestMapping(method = RequestMethod.POST, value = "/subjects")
@Transactional
public ResponseEntity<SubjectDTO> create(@RequestBody SubjectDTO subjectdto) {
Subject domain = subjectMapping.toDomain(subjectdto);
subjectService.create(domain);
SubjectDTO dto = subjectMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.subjectMapping.toDomain(#subjectdtos),'iBizBusinessCentral-Subject-Create')")
@ApiOperation(value = "批量新建主题", tags = {"主题" }, notes = "批量新建主题")
@RequestMapping(method = RequestMethod.POST, value = "/subjects/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<SubjectDTO> subjectdtos) {
subjectService.createBatch(subjectMapping.toDomain(subjectdtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@ApiOperation(value = "检查主题", tags = {"主题" }, notes = "检查主题")
@RequestMapping(method = RequestMethod.POST, value = "/subjects/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody SubjectDTO subjectdto) {
return ResponseEntity.status(HttpStatus.OK).body(subjectService.checkKey(subjectMapping.toDomain(subjectdto)));
}
@VersionCheck(entity = "subject" , versionfield = "updatedate")
@PreAuthorize("hasPermission(this.subjectService.get(#subject_id),'iBizBusinessCentral-Subject-Update')")
@ApiOperation(value = "更新主题", tags = {"主题" }, notes = "更新主题")
@RequestMapping(method = RequestMethod.PUT, value = "/subjects/{subject_id}")
@Transactional
public ResponseEntity<SubjectDTO> update(@PathVariable("subject_id") String subject_id, @RequestBody SubjectDTO subjectdto) {
Subject domain = subjectMapping.toDomain(subjectdto);
domain .setSubjectid(subject_id);
subjectService.update(domain );
SubjectDTO dto = subjectMapping.toDto(domain );
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.subjectService.getSubjectByEntities(this.subjectMapping.toDomain(#subjectdtos)),'iBizBusinessCentral-Subject-Update')")
@ApiOperation(value = "批量更新主题", tags = {"主题" }, notes = "批量更新主题")
@RequestMapping(method = RequestMethod.PUT, value = "/subjects/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<SubjectDTO> subjectdtos) {
subjectService.updateBatch(subjectMapping.toDomain(subjectdtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasPermission(this.subjectService.get(#subject_id),'iBizBusinessCentral-Subject-Remove')")
@ApiOperation(value = "删除主题", tags = {"主题" }, notes = "删除主题")
@RequestMapping(method = RequestMethod.DELETE, value = "/subjects/{subject_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("subject_id") String subject_id) {
return ResponseEntity.status(HttpStatus.OK).body(subjectService.remove(subject_id));
}
@PreAuthorize("hasPermission(this.subjectService.getSubjectByIds(#ids),'iBizBusinessCentral-Subject-Remove')")
@ApiOperation(value = "批量删除主题", tags = {"主题" }, notes = "批量删除主题")
@RequestMapping(method = RequestMethod.DELETE, value = "/subjects/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) {
subjectService.removeBatch(ids);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@ApiOperation(value = "获取主题草稿", tags = {"主题" }, notes = "获取主题草稿")
@RequestMapping(method = RequestMethod.GET, value = "/subjects/getdraft")
public ResponseEntity<SubjectDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(subjectMapping.toDto(subjectService.getDraft(new Subject())));
}
@PostAuthorize("hasPermission(this.subjectMapping.toDomain(returnObject.body),'iBizBusinessCentral-Subject-Get')")
@ApiOperation(value = "获取主题", tags = {"主题" }, notes = "获取主题")
@RequestMapping(method = RequestMethod.GET, value = "/subjects/{subject_id}")
public ResponseEntity<SubjectDTO> get(@PathVariable("subject_id") String subject_id) {
Subject domain = subjectService.get(subject_id);
SubjectDTO dto = subjectMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Subject-searchDefault-all')")
@ApiOperation(value = "获取DEFAULT", tags = {"主题" } ,notes = "获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/subjects/fetchdefault")
public ResponseEntity<List<SubjectDTO>> fetchDefault(SubjectSearchContext context) {
Page<Subject> domains = subjectService.searchDefault(context) ;
List<SubjectDTO> list = subjectMapping.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-Subject-searchDefault-all')")
@ApiOperation(value = "查询DEFAULT", tags = {"主题" } ,notes = "查询DEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/subjects/searchdefault")
public ResponseEntity<Page<SubjectDTO>> searchDefault(@RequestBody SubjectSearchContext context) {
Page<Subject> domains = subjectService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(subjectMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册