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

xignzi006 发布系统代码

上级 fbcda33c
......@@ -4862,7 +4862,7 @@
"id": "ACCOUNT",
"label": "客户",
"text": "客户",
"data":"",
"data":{"n_pickdatatype_eq":"ACCOUNT"},
"codename":"Account",
"value": "ACCOUNT",
......@@ -4872,7 +4872,7 @@
"id": "CONTACT",
"label": "联系人",
"text": "联系人",
"data":"",
"data":{"n_pickdatatype_eq":"CONTACT"},
"codename":"Contact",
"value": "CONTACT",
......
......@@ -360,8 +360,8 @@
"memo": "系统自动添加"
},
"multipickdataac": {
"title": "客户、联系人",
"caption": "客户、联系人",
"title": "负责人",
"caption": "负责人",
"viewtype": "DEPICKUPVIEW",
"viewmodule": "Base",
"viewname": "MultiPickDataAC",
......@@ -610,8 +610,8 @@
"memo": "系统自动添加"
},
"multipickdataacgrid": {
"title": "客户、联系人",
"caption": "客户、联系人",
"title": "负责人(客户、联系人)表格",
"caption": "多类选择实体",
"viewtype": "DEPICKUPGRIDVIEW",
"viewmodule": "Base",
"viewname": "MultiPickDataACGrid",
......@@ -649,6 +649,16 @@
"viewtag": "3202f3f503424c7a2c549b2c5186dc36",
"memo": ""
},
"competitorproductedit_compproview": {
"title": "竞争对手产品信息",
"caption": "竞争对手产品",
"viewtype": "DEEDITVIEW",
"viewmodule": "Sales",
"viewname": "CompetitorProductEdit_CompProView",
"viewfilename": "competitor-product-edit-comp-pro-view",
"viewtag": "321c9f14181d1afaf18a8ffacea2a29f",
"memo": ""
},
"leadinfo": {
"title": "潜在顾客",
"caption": "潜在顾客",
......@@ -2549,6 +2559,16 @@
"viewtag": "f6f91153f3caa976cf7f552636f7e012",
"memo": "系统自动添加"
},
"competitorproductcompprogridview": {
"title": "竞争对手产品信息",
"caption": "竞争对手产品",
"viewtype": "DEGRIDVIEW",
"viewmodule": "Sales",
"viewname": "CompetitorProductCompProGridView",
"viewfilename": "competitor-product-comp-pro-grid-view",
"viewtag": "f83783341c365d6eb1d7385c9d1ddb95",
"memo": ""
},
"taskeditview": {
"title": "任务编辑视图",
"caption": "任务",
......
/**
* 竞争对手产品
*
* @export
* @interface CompetitorProduct
*/
export interface CompetitorProduct {
/**
* 建立时间
*
* @returns {*}
* @memberof CompetitorProduct
*/
createdate?: any;
/**
* 建立人
*
* @returns {*}
* @memberof CompetitorProduct
*/
createman?: any;
/**
* 关系标识
*
* @returns {*}
* @memberof CompetitorProduct
*/
relationshipsid?: any;
/**
* 关系名称
*
* @returns {*}
* @memberof CompetitorProduct
*/
relationshipsname?: any;
/**
* 关系类型
*
* @returns {*}
* @memberof CompetitorProduct
*/
relationshipstype?: any;
/**
* 更新时间
*
* @returns {*}
* @memberof CompetitorProduct
*/
updatedate?: any;
/**
* 更新人
*
* @returns {*}
* @memberof CompetitorProduct
*/
updateman?: any;
/**
* 竞争对手
*
* @returns {*}
* @memberof CompetitorProduct
*/
entityid?: any;
/**
* 产品
*
* @returns {*}
* @memberof CompetitorProduct
*/
entity2id?: any;
/**
* 竞争对手
*
* @returns {*}
* @memberof CompetitorProduct
*/
entityname?: any;
/**
* 产品
*
* @returns {*}
* @memberof CompetitorProduct
*/
entity2name?: any;
/**
* 产品ID
*
* @returns {*}
* @memberof CompetitorProduct
*/
productnumber?: any;
}
\ No newline at end of file
......@@ -48,6 +48,7 @@ import multipickdata_en_US from '@locale/lanres/entities/multi-pick-data/multi-p
import contact_en_US from '@locale/lanres/entities/contact/contact_en_US';
import product_en_US from '@locale/lanres/entities/product/product_en_US';
import competitor_en_US from '@locale/lanres/entities/competitor/competitor_en_US';
import competitorproduct_en_US from '@locale/lanres/entities/competitor-product/competitor-product_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 quotedetail_en_US from '@locale/lanres/entities/quote-detail/quote-detail_en_US';
......@@ -219,6 +220,7 @@ export default {
contact: contact_en_US,
product: product_en_US,
competitor: competitor_en_US,
competitorproduct: competitorproduct_en_US,
account: account_en_US,
salesorder: salesorder_en_US,
quotedetail: quotedetail_en_US,
......
......@@ -48,6 +48,7 @@ import multipickdata_zh_CN from '@locale/lanres/entities/multi-pick-data/multi-p
import contact_zh_CN from '@locale/lanres/entities/contact/contact_zh_CN';
import product_zh_CN from '@locale/lanres/entities/product/product_zh_CN';
import competitor_zh_CN from '@locale/lanres/entities/competitor/competitor_zh_CN';
import competitorproduct_zh_CN from '@locale/lanres/entities/competitor-product/competitor-product_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 quotedetail_zh_CN from '@locale/lanres/entities/quote-detail/quote-detail_zh_CN';
......@@ -219,6 +220,7 @@ export default {
contact: contact_zh_CN,
product: product_zh_CN,
competitor: competitor_zh_CN,
competitorproduct: competitorproduct_zh_CN,
account: account_zh_CN,
salesorder: salesorder_zh_CN,
quotedetail: quotedetail_zh_CN,
......
export default {
fields: {
createdate: "建立时间",
createman: "建立人",
relationshipsid: "关系标识",
relationshipsname: "关系名称",
relationshipstype: "关系类型",
updatedate: "更新时间",
updateman: "更新人",
entityid: "竞争对手",
entity2id: "产品",
entityname: "竞争对手",
entity2name: "产品",
productnumber: "产品ID",
},
views: {
edit_compproview: {
caption: "竞争对手产品",
title: "竞争对手产品信息",
},
compprogridview: {
caption: "竞争对手产品",
title: "竞争对手产品信息",
},
},
edit_comppro_form: {
details: {
group1: "竞争对手产品基本信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "关系标识",
srfmajortext: "关系名称",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
entityid: "竞争对手",
entity2name: "产品",
productnumber: "产品ID",
entity2id: "产品",
relationshipsid: "关系标识",
},
uiactions: {
},
},
main_grid: {
columns: {
entityname: "竞争对手",
entity2name: "产品",
productnumber: "产品ID",
},
uiactions: {
},
},
default_searchform: {
details: {
formpage1: "常规条件",
},
uiactions: {
},
},
edit_compproviewtoolbar_toolbar: {
tbitem1: {
caption: "Save And Close",
tip: "Save And Close Window",
},
tbitem2: {
caption: "关闭",
tip: "关闭",
},
},
compprogridviewtoolbar_toolbar: {
deuiaction1: {
caption: "New",
tip: "New",
},
tbitem2: {
caption: "-",
tip: "",
},
tbitem4: {
caption: "Edit",
tip: "Edit {0}",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "Remove",
tip: "Remove {0}",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "Export",
tip: "Export {0} Data To Excel",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "Filter",
tip: "Filter",
},
},
};
\ No newline at end of file
export default {
fields: {
createdate: "建立时间",
createman: "建立人",
relationshipsid: "关系标识",
relationshipsname: "关系名称",
relationshipstype: "关系类型",
updatedate: "更新时间",
updateman: "更新人",
entityid: "竞争对手",
entity2id: "产品",
entityname: "竞争对手",
entity2name: "产品",
productnumber: "产品ID",
},
views: {
edit_compproview: {
caption: "竞争对手产品",
title: "竞争对手产品信息",
},
compprogridview: {
caption: "竞争对手产品",
title: "竞争对手产品信息",
},
},
edit_comppro_form: {
details: {
group1: "竞争对手产品基本信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "关系标识",
srfmajortext: "关系名称",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
entityid: "竞争对手",
entity2name: "产品",
productnumber: "产品ID",
entity2id: "产品",
relationshipsid: "关系标识",
},
uiactions: {
},
},
main_grid: {
columns: {
entityname: "竞争对手",
entity2name: "产品",
productnumber: "产品ID",
},
uiactions: {
},
},
default_searchform: {
details: {
formpage1: "常规条件",
},
uiactions: {
},
},
edit_compproviewtoolbar_toolbar: {
tbitem1: {
caption: "保存并关闭",
tip: "保存并关闭",
},
tbitem2: {
caption: "关闭",
tip: "关闭",
},
},
compprogridviewtoolbar_toolbar: {
deuiaction1: {
caption: "新建",
tip: "新建",
},
tbitem2: {
caption: "-",
tip: "",
},
tbitem4: {
caption: "编辑",
tip: "编辑",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "删除",
tip: "删除",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "导出",
tip: "导出",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "过滤",
tip: "过滤",
},
},
};
\ No newline at end of file
......@@ -171,6 +171,25 @@ export default {
uiactions: {
},
},
datapanel_form: {
details: {
group1: "竞争对手基本信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "竞争对手",
srfmajortext: "竞争对手名称",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
reportedrevenue: "报告收入",
websiteurl: "网站",
competitorid: "竞争对手",
},
uiactions: {
},
},
main_form: {
details: {
group1: "competitor基本信息",
......
......@@ -170,6 +170,25 @@ export default {
uiactions: {
},
},
datapanel_form: {
details: {
group1: "竞争对手基本信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "竞争对手",
srfmajortext: "竞争对手名称",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
reportedrevenue: "报告收入",
websiteurl: "网站",
competitorid: "竞争对手",
},
uiactions: {
},
},
main_form: {
details: {
group1: "competitor基本信息",
......
......@@ -14,12 +14,12 @@ export default {
},
views: {
ac: {
caption: "客户、联系人",
title: "客户、联系人",
caption: "负责人",
title: "负责人",
},
acgrid: {
caption: "客户、联系人",
title: "客户、联系人",
caption: "多类选择实体",
title: "负责人(客户、联系人)表格",
},
},
main_grid: {
......
......@@ -13,12 +13,12 @@ export default {
},
views: {
ac: {
caption: "客户、联系人",
title: "客户、联系人",
caption: "负责人",
title: "负责人",
},
acgrid: {
caption: "客户、联系人",
title: "客户、联系人",
caption: "多类选择实体",
title: "负责人(客户、联系人)表格",
},
},
main_grid: {
......
......@@ -33,8 +33,6 @@ export default {
details: {
group1: "商机对手基本信息",
formpage1: "基本信息",
group2: "操作信息",
formpage2: "其它",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "关系标识",
......@@ -43,6 +41,12 @@ export default {
srfuf: "",
srfdeid: "",
srfsourcekey: "",
entityid: "商机",
entity2name: "竞争对手",
estimatedvalue: "预计收入",
estimatedclosedate: "预计结束日期",
statecode: "状态",
entity2id: "竞争对手",
relationshipsid: "关系标识",
},
uiactions: {
......
......@@ -32,8 +32,6 @@ export default {
details: {
group1: "商机对手基本信息",
formpage1: "基本信息",
group2: "操作信息",
formpage2: "其它",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "关系标识",
......@@ -42,6 +40,12 @@ export default {
srfuf: "",
srfdeid: "",
srfsourcekey: "",
entityid: "商机",
entity2name: "竞争对手",
estimatedvalue: "预计收入",
estimatedclosedate: "预计结束日期",
statecode: "状态",
entity2id: "竞争对手",
relationshipsid: "关系标识",
},
uiactions: {
......
......@@ -4870,7 +4870,7 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => {
id: "ACCOUNT",
label: "客户",
text: "客户",
"data":"",
"data":{"n_pickdatatype_eq":"ACCOUNT"},
"codename":"Account",
value: "ACCOUNT",
......@@ -4880,7 +4880,7 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => {
id: "CONTACT",
label: "联系人",
text: "联系人",
"data":"",
"data":{"n_pickdatatype_eq":"CONTACT"},
"codename":"Contact",
value: "CONTACT",
......
......@@ -57,6 +57,7 @@ import './entity/multi-pick-datas/multi-pick-datas';
import './entity/contacts/contacts';
import './entity/products/products';
import './entity/competitors/competitors';
import './entity/competitor-products/competitor-products';
import './entity/accounts/accounts';
import './entity/sales-orders/sales-orders';
import './entity/quote-details/quote-details';
......
......@@ -296,8 +296,8 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewtag": "1d3b94223a5d3f8ab1d2fe334c8c4afd"
},
"multipickdataac": {
"title": "客户、联系人",
"caption": "客户、联系人",
"title": "负责人",
"caption": "负责人",
"viewtype": "DEPICKUPVIEW",
"viewmodule": "Base",
"viewname": "MultiPickDataAC",
......@@ -496,8 +496,8 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewtag": "30458f00562fda145be535e56948b067"
},
"multipickdataacgrid": {
"title": "客户、联系人",
"caption": "客户、联系人",
"title": "负责人(客户、联系人)表格",
"caption": "多类选择实体",
"viewtype": "DEPICKUPGRIDVIEW",
"viewmodule": "Base",
"viewname": "MultiPickDataACGrid",
......@@ -527,6 +527,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "LeadStatusTabView",
"viewtag": "3202f3f503424c7a2c549b2c5186dc36"
},
"competitorproductedit_compproview": {
"title": "竞争对手产品信息",
"caption": "竞争对手产品",
"viewtype": "DEEDITVIEW",
"viewmodule": "Sales",
"viewname": "CompetitorProductEdit_CompProView",
"viewtag": "321c9f14181d1afaf18a8ffacea2a29f"
},
"leadinfo": {
"title": "潜在顾客",
"caption": "潜在顾客",
......@@ -2047,6 +2055,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "SalesOrderPickupView",
"viewtag": "f6f91153f3caa976cf7f552636f7e012"
},
"competitorproductcompprogridview": {
"title": "竞争对手产品信息",
"caption": "竞争对手产品",
"viewtype": "DEGRIDVIEW",
"viewmodule": "Sales",
"viewname": "CompetitorProductCompProGridView",
"viewtag": "f83783341c365d6eb1d7385c9d1ddb95"
},
"taskeditview": {
"title": "任务编辑视图",
"caption": "任务",
......
......@@ -4,7 +4,7 @@ import MultiPickDataService from '@/service/multi-pick-data/multi-pick-data-serv
import PickupViewEngine from '@engine/view/pickup-view-engine';
/**
* 客户、联系人视图基类
* 负责人视图基类
*
* @export
* @class MultiPickDataACBase
......
<studio-view-style2 viewName="multipickdataac" viewTitle="客户、联系人" class='depickupview multi-pick-data-ac'>
<studio-view-style2 viewName="multipickdataac" viewTitle="负责人" class='depickupview multi-pick-data-ac'>
<div class="content-container pickup-view">
<view_pickupviewpanel
:viewState="viewState"
......
......@@ -6,7 +6,7 @@ import { MultiPickDataACBase } from './multi-pick-data-ac-base';
import view_pickupviewpanel from '@widgets/multi-pick-data/acpickupviewpanel-pickupviewpanel/acpickupviewpanel-pickupviewpanel.vue';
/**
* 客户、联系人视图
* 负责人视图
*
* @export
* @class MultiPickDataAC
......
......@@ -4,7 +4,7 @@ import MultiPickDataService from '@/service/multi-pick-data/multi-pick-data-serv
import PickupGridViewEngine from '@engine/view/pickup-grid-view-engine';
/**
* 客户、联系人视图基类
* 负责人(客户、联系人)表格视图基类
*
* @export
* @class MultiPickDataACGridBase
......
<studio-view-style2 viewName="multipickdataacgrid" viewTitle="客户、联系人" class='depickupgridview multi-pick-data-acgrid'>
<studio-view-style2 viewName="multipickdataacgrid" viewTitle="负责人(客户、联系人)表格" class='depickupgridview multi-pick-data-acgrid'>
<template slot="quickGroupSearch">
<app-quick-group :items="quickGroupModel" @valuechange="quickGroupValueChange($event)"></app-quick-group>
</template>
......@@ -8,10 +8,10 @@
:viewparams="viewparams"
:context="context"
:showBusyIndicator="true"
v-show="isExpandSearchForm"
v-show="true"
loaddraftAction="FilterGetDraft"
loadAction="FilterGet"
@valuechange="quickFormValueChange"
name="searchform"
ref='searchform'
@save="searchform_save($event)"
......
......@@ -7,7 +7,7 @@ import view_grid from '@widgets/multi-pick-data/main-grid/main-grid.vue';
import view_searchform from '@widgets/multi-pick-data/default-searchform/default-searchform.vue';
/**
* 客户、联系人视图
* 负责人(客户、联系人)表格视图
*
* @export
* @class MultiPickDataACGrid
......
......@@ -2,6 +2,7 @@ import { Subject } from 'rxjs';
import { TabExpViewBase } from '@/studio-core';
import CompetitorService from '@/service/competitor/competitor-service';
import TabExpViewEngine from '@engine/view/tab-exp-view-engine';
import DataPanelEngine from '@engine/ctrl/data-panel-engine';
/**
* 竞争对手视图基类
......@@ -78,6 +79,7 @@ export class CompetitorInfoBase extends TabExpViewBase {
* @memberof CompetitorInfoBase
*/
protected containerModel: any = {
view_datapanel: { name: 'datapanel', type: 'FORM' },
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_tabexppanel: { name: 'tabexppanel', type: 'TABEXPPANEL' },
};
......@@ -123,6 +125,15 @@ export class CompetitorInfoBase extends TabExpViewBase {
*/
public engine: TabExpViewEngine = new TabExpViewEngine();
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof CompetitorInfoBase
*/
public datapanel: DataPanelEngine = new DataPanelEngine();
/**
* 引擎初始化
*
......@@ -136,6 +147,13 @@ export class CompetitorInfoBase extends TabExpViewBase {
majorPSDEField: 'competitorname',
isLoadDefault: true,
});
this.datapanel.init({
view: this,
datapanel: this.$refs.datapanel,
keyPSDEField: 'competitor',
majorPSDEField: 'competitorname',
isLoadDefault: true,
});
}
/**
......
......@@ -2,6 +2,27 @@
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template>
<template slot="dataPanel">
<view_datapanel
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:autosave="false"
:viewtag="viewtag"
:showBusyIndicator="true"
updateAction="Update"
removeAction="Remove"
loaddraftAction="GetDraft"
loadAction="Get"
createAction="Create"
WFSubmitAction=""
WFStartAction=""
style=''
name="datapanel"
ref='datapanel'
@closeview="closeView($event)">
</view_datapanel>
</template>
<template slot="toolbar">
<view-toolbar mode="STYLE2" :model="toolBarModels" @item-click="toolbar_click($event)"/> </template>
<view_tabexppanel
......
......@@ -3,6 +3,7 @@
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { CompetitorInfoBase } from './competitor-info-base';
import view_datapanel from '@widgets/competitor/data-panel-form/data-panel-form.vue';
import view_tabexppanel from '@widgets/competitor/infotabexppanel-tabexppanel/infotabexppanel-tabexppanel.vue';
/**
......@@ -14,6 +15,7 @@ import view_tabexppanel from '@widgets/competitor/infotabexppanel-tabexppanel/in
*/
@Component({
components: {
view_datapanel,
view_tabexppanel,
}
})
......
<studio-view-style2 viewName="competitorproductcompprogridview" viewTitle="竞争对手产品信息" class='degridview competitor-product-comp-pro-grid-view'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template>
<i-input slot="quickSearch" v-show="!isExpandSearchForm" v-model="query" search @on-search="onSearch($event)"/>
<template slot="toolbar">
<view-toolbar mode="STYLE2" :model="toolBarModels" @item-click="toolbar_click($event)"/> </template>
<template slot="searchForm">
<view_searchform
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:showBusyIndicator="true"
v-show="isExpandSearchForm"
loaddraftAction="FilterGetDraft"
loadAction="FilterGet"
name="searchform"
ref='searchform'
@save="searchform_save($event)"
@search="searchform_search($event)"
@load="searchform_load($event)"
@closeview="closeView($event)">
</view_searchform>
</template>
<view_grid
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:isSingleSelect="isGridSingleSelect"
:showBusyIndicator="true"
:isOpenEdit="false"
:gridRowActiveMode="gridRowActiveMode"
@save="onSave"
updateAction=""
removeAction="Remove"
loaddraftAction=""
loadAction=""
createAction=""
fetchAction="FetchDefault"
:newdata="newdata"
:opendata="opendata"
name="grid"
ref='grid'
@selectionchange="grid_selectionchange($event)"
@beforeload="grid_beforeload($event)"
@rowdblclick="grid_rowdblclick($event)"
@remove="grid_remove($event)"
@load="grid_load($event)"
@closeview="closeView($event)">
</view_grid>
</studio-view-style2>
\ No newline at end of file
<template src="./competitor-product-comp-pro-grid-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { CompetitorProductCompProGridViewBase } from './competitor-product-comp-pro-grid-view-base';
import view_grid from '@widgets/competitor-product/main-grid/main-grid.vue';
import view_searchform from '@widgets/competitor-product/default-searchform/default-searchform.vue';
/**
* 竞争对手产品信息视图
*
* @export
* @class CompetitorProductCompProGridView
* @extends {CompetitorProductCompProGridViewBase}
*/
@Component({
components: {
view_grid,
view_searchform,
}
})
@VueLifeCycleProcessing()
export default class CompetitorProductCompProGridView extends CompetitorProductCompProGridViewBase { }
</script>
import { Subject } from 'rxjs';
import { EditViewBase } from '@/studio-core';
import CompetitorProductService from '@/service/competitor-product/competitor-product-service';
import EditViewEngine from '@engine/view/edit-view-engine';
/**
* 竞争对手产品信息视图基类
*
* @export
* @class CompetitorProductEdit_CompProViewBase
* @extends {EditViewBase}
*/
export class CompetitorProductEdit_CompProViewBase extends EditViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof CompetitorProductEdit_CompProViewBase
*/
protected appDeName: string = 'competitorproduct';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof CompetitorProductEdit_CompProViewBase
*/
protected appDeKey: string = 'relationshipsid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof CompetitorProductEdit_CompProViewBase
*/
protected appDeMajor: string = 'relationshipsname';
/**
* 实体服务对象
*
* @type {CompetitorProductService}
* @memberof CompetitorProductEdit_CompProViewBase
*/
protected appEntityService: CompetitorProductService = new CompetitorProductService;
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof CompetitorProductEdit_CompProViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof CompetitorProductEdit_CompProViewBase
*/
protected model: any = {
srfCaption: 'entities.competitorproduct.views.edit_compproview.caption',
srfTitle: 'entities.competitorproduct.views.edit_compproview.title',
srfSubTitle: 'entities.competitorproduct.views.edit_compproview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof CompetitorProductEdit_CompProViewBase
*/
protected containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_form: { name: 'form', type: 'FORM' },
};
/**
* 工具栏模型
*
* @type {*}
* @memberof CompetitorProductEdit_CompProView
*/
public toolBarModels: any = {
tbitem1: { name: 'tbitem1', caption: '保存并关闭','isShowCaption':true,'isShowIcon':true, tooltip: '保存并关闭', iconcls: 'fa fa-power-off', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'SaveAndExit', target: '' }, class: '' },
tbitem2: { name: 'tbitem2', caption: '关闭','isShowCaption':true,'isShowIcon':true, tooltip: '关闭', iconcls: 'fa fa-sign-out', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Exit', target: '' }, class: '' },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = '321c9f14181d1afaf18a8ffacea2a29f';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof CompetitorProductEdit_CompProViewBase
*/
public engine: EditViewEngine = new EditViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof CompetitorProductEdit_CompProViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
form: this.$refs.form,
p2k: '0',
keyPSDEField: 'competitorproduct',
majorPSDEField: 'relationshipsname',
isLoadDefault: true,
});
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof CompetitorProductEdit_CompProViewBase
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'tbitem1')) {
this.toolbar_tbitem1_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem2')) {
this.toolbar_tbitem2_click(null, '', $event2);
}
}
/**
* form 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof CompetitorProductEdit_CompProViewBase
*/
public form_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'save', $event);
}
/**
* form 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof CompetitorProductEdit_CompProViewBase
*/
public form_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'remove', $event);
}
/**
* form 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof CompetitorProductEdit_CompProViewBase
*/
public form_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'load', $event);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem1_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.SaveAndExit(datas, contextJO,paramJO, $event, xData,this,"CompetitorProduct");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem2_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Exit(datas, contextJO,paramJO, $event, xData,this,"CompetitorProduct");
}
/**
* 保存并关闭
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof CompetitorProductEdit_CompProViewBase
*/
public SaveAndExit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (xData && xData.saveAndExit instanceof Function) {
xData.saveAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
} else if (_this.saveAndExit && _this.saveAndExit instanceof Function) {
_this.saveAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
}
}
/**
* 关闭
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof CompetitorProductEdit_CompProViewBase
*/
public Exit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
this.closeView(args);
if(window.parent){
window.parent.postMessage([{ ...args }],'*');
}
}
}
\ No newline at end of file
<studio-view-style2 viewName="competitorproductedit_compproview" viewTitle="竞争对手产品信息" class='deeditview competitor-product-edit-comp-pro-view'>
<template slot="toolbar">
<view-toolbar mode="STYLE2" :model="toolBarModels" @item-click="toolbar_click($event)"/> </template>
<view_form
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:autosave="false"
:viewtag="viewtag"
:showBusyIndicator="true"
updateAction="Update"
removeAction="Remove"
loaddraftAction="GetDraft"
loadAction="Get"
createAction="Create"
WFSubmitAction=""
WFStartAction=""
style=''
name="form"
ref='form'
@save="form_save($event)"
@remove="form_remove($event)"
@load="form_load($event)"
@closeview="closeView($event)">
</view_form>
</studio-view-style2>
\ No newline at end of file
<template src="./competitor-product-edit-comp-pro-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { CompetitorProductEdit_CompProViewBase } from './competitor-product-edit-comp-pro-view-base';
import view_form from '@widgets/competitor-product/edit-comp-pro-form/edit-comp-pro-form.vue';
/**
* 竞争对手产品信息视图
*
* @export
* @class CompetitorProductEdit_CompProView
* @extends {CompetitorProductEdit_CompProViewBase}
*/
@Component({
components: {
view_form,
}
})
@VueLifeCycleProcessing()
export default class CompetitorProductEdit_CompProView extends CompetitorProductEdit_CompProViewBase { }
</script>
......@@ -554,9 +554,9 @@ export class LeadCompetitorGridViewBase extends GridViewBase {
Object.assign(tempContext,args[0]);
}
let deResParameters: any[] = [];
if(tempContext.lead && true){
if(tempContext.competitor && true){
deResParameters = [
{ pathName: 'leads', parameterName: 'lead' },
{ pathName: 'competitors', parameterName: 'competitor' },
]
}
const parameters: any[] = [
......@@ -593,9 +593,9 @@ export class LeadCompetitorGridViewBase extends GridViewBase {
Object.assign(tempContext,args[0]);
}
let deResParameters: any[] = [];
if(tempContext.lead && true){
if(tempContext.competitor && true){
deResParameters = [
{ pathName: 'leads', parameterName: 'lead' },
{ pathName: 'competitors', parameterName: 'competitor' },
]
}
const parameters: any[] = [
......
......@@ -57,9 +57,9 @@ export const PageComponents = {
Vue.component('fax-edit-view', () => import('@pages/base/fax-edit-view/fax-edit-view.vue'));
Vue.component('incident-quick-create-view', () => import('@pages/service/incident-quick-create-view/incident-quick-create-view.vue'));
Vue.component('campaign-list-grid-view', () => import('@pages/marketing/campaign-list-grid-view/campaign-list-grid-view.vue'));
Vue.component('subject-pickup-view', () => import('@pages/base/subject-pickup-view/subject-pickup-view.vue'));
Vue.component('activity-pointer-edit-view', () => import('@pages/base/activity-pointer-edit-view/activity-pointer-edit-view.vue'));
Vue.component('lead-grid-view', () => import('@pages/sales/lead-grid-view/lead-grid-view.vue'));
Vue.component('subject-pickup-view', () => import('@pages/base/subject-pickup-view/subject-pickup-view.vue'));
Vue.component('goal-quick-create-view', () => import('@pages/sales/goal-quick-create-view/goal-quick-create-view.vue'));
Vue.component('sales-literature-grid-view', () => import('@pages/sales/sales-literature-grid-view/sales-literature-grid-view.vue'));
Vue.component('incident-info-view', () => import('@pages/service/incident-info-view/incident-info-view.vue'));
......@@ -90,6 +90,7 @@ export const PageComponents = {
Vue.component('competitor-info', () => import('@pages/sales/competitor-info/competitor-info.vue'));
Vue.component('lead-excluded-grid-view', () => import('@pages/sales/lead-excluded-grid-view/lead-excluded-grid-view.vue'));
Vue.component('campaign-list-edit-view', () => import('@pages/marketing/campaign-list-edit-view/campaign-list-edit-view.vue'));
Vue.component('competitor-product-edit-comp-pro-view', () => import('@pages/sales/competitor-product-edit-comp-pro-view/competitor-product-edit-comp-pro-view.vue'));
Vue.component('lead-info', () => import('@pages/sales/lead-info/lead-info.vue'));
Vue.component('lead-on-grid-view', () => import('@pages/sales/lead-on-grid-view/lead-on-grid-view.vue'));
Vue.component('sales-order-detail-soproduct-grid-view', () => import('@pages/sales/sales-order-detail-soproduct-grid-view/sales-order-detail-soproduct-grid-view.vue'));
......@@ -112,6 +113,7 @@ export const PageComponents = {
Vue.component('lead-edit-data-panel-view', () => import('@pages/sales/lead-edit-data-panel-view/lead-edit-data-panel-view.vue'));
Vue.component('setting', () => import('@pages/ungroup/setting/setting.vue'));
Vue.component('invoice-quick-create-view', () => import('@pages/finance/invoice-quick-create-view/invoice-quick-create-view.vue'));
Vue.component('competitor-product-comp-pro-grid-view', () => import('@pages/sales/competitor-product-comp-pro-grid-view/competitor-product-comp-pro-grid-view.vue'));
Vue.component('campaign-info-schedule', () => import('@pages/marketing/campaign-info-schedule/campaign-info-schedule.vue'));
Vue.component('lead-con-lead-grid-view', () => import('@pages/sales/lead-con-lead-grid-view/lead-con-lead-grid-view.vue'));
Vue.component('sales-order-info-view', () => import('@pages/sales/sales-order-info-view/sales-order-info-view.vue'));
......
......@@ -1891,20 +1891,6 @@ const router = new Router({
},
component: () => import('@pages/marketing/campaign-list-grid-view/campaign-list-grid-view.vue'),
},
{
path: 'subjects/:subject?/pickupview/:pickupview?',
meta: {
caption: 'entities.subject.views.pickupview.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'subjects', parameterName: 'subject' },
{ pathName: 'pickupview', parameterName: 'pickupview' },
],
requireAuth: true,
},
component: () => import('@pages/base/subject-pickup-view/subject-pickup-view.vue'),
},
{
path: 'activitypointers/:activitypointer?/editview/:editview?',
meta: {
......@@ -1994,6 +1980,20 @@ const router = new Router({
},
component: () => import('@pages/sales/lead-grid-view/lead-grid-view.vue'),
},
{
path: 'subjects/:subject?/pickupview/:pickupview?',
meta: {
caption: 'entities.subject.views.pickupview.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'subjects', parameterName: 'subject' },
{ pathName: 'pickupview', parameterName: 'pickupview' },
],
requireAuth: true,
},
component: () => import('@pages/base/subject-pickup-view/subject-pickup-view.vue'),
},
{
path: 'goals/:goal?/quickcreateview/:quickcreateview?',
meta: {
......@@ -2656,6 +2656,21 @@ const router = new Router({
},
component: () => import('@pages/sales/lead-competitor-grid-view/lead-competitor-grid-view.vue'),
},
{
path: 'competitors/:competitor?/leadcompetitors/:leadcompetitor?/gridview/:gridview?',
meta: {
caption: 'entities.leadcompetitor.views.gridview.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'competitors', parameterName: 'competitor' },
{ pathName: 'leadcompetitors', parameterName: 'leadcompetitor' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/sales/lead-competitor-grid-view/lead-competitor-grid-view.vue'),
},
{
path: 'leadcompetitors/:leadcompetitor?/gridview/:gridview?',
meta: {
......@@ -2905,6 +2920,35 @@ const router = new Router({
},
component: () => import('@pages/marketing/campaign-list-edit-view/campaign-list-edit-view.vue'),
},
{
path: 'competitors/:competitor?/competitorproducts/:competitorproduct?/edit_compproview/:edit_compproview?',
meta: {
caption: 'entities.competitorproduct.views.edit_compproview.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'competitors', parameterName: 'competitor' },
{ pathName: 'competitorproducts', parameterName: 'competitorproduct' },
{ pathName: 'edit_compproview', parameterName: 'edit_compproview' },
],
requireAuth: true,
},
component: () => import('@pages/sales/competitor-product-edit-comp-pro-view/competitor-product-edit-comp-pro-view.vue'),
},
{
path: 'competitorproducts/:competitorproduct?/edit_compproview/:edit_compproview?',
meta: {
caption: 'entities.competitorproduct.views.edit_compproview.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'competitorproducts', parameterName: 'competitorproduct' },
{ pathName: 'edit_compproview', parameterName: 'edit_compproview' },
],
requireAuth: true,
},
component: () => import('@pages/sales/competitor-product-edit-comp-pro-view/competitor-product-edit-comp-pro-view.vue'),
},
{
path: 'accounts/:account?/contacts/:contact?/leads/:lead?/info/:info?',
meta: {
......@@ -3784,6 +3828,35 @@ const router = new Router({
},
component: () => import('@pages/finance/invoice-quick-create-view/invoice-quick-create-view.vue'),
},
{
path: 'competitors/:competitor?/competitorproducts/:competitorproduct?/compprogridview/:compprogridview?',
meta: {
caption: 'entities.competitorproduct.views.compprogridview.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'competitors', parameterName: 'competitor' },
{ pathName: 'competitorproducts', parameterName: 'competitorproduct' },
{ pathName: 'compprogridview', parameterName: 'compprogridview' },
],
requireAuth: true,
},
component: () => import('@pages/sales/competitor-product-comp-pro-grid-view/competitor-product-comp-pro-grid-view.vue'),
},
{
path: 'competitorproducts/:competitorproduct?/compprogridview/:compprogridview?',
meta: {
caption: 'entities.competitorproduct.views.compprogridview.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'competitorproducts', parameterName: 'competitorproduct' },
{ pathName: 'compprogridview', parameterName: 'compprogridview' },
],
requireAuth: true,
},
component: () => import('@pages/sales/competitor-product-comp-pro-grid-view/competitor-product-comp-pro-grid-view.vue'),
},
{
path: 'campaigns/:campaign?/info_schedule/:info_schedule?',
meta: {
......@@ -5017,6 +5090,21 @@ const router = new Router({
},
component: () => import('@pages/sales/lead-competitor-edit-view/lead-competitor-edit-view.vue'),
},
{
path: 'competitors/:competitor?/leadcompetitors/:leadcompetitor?/editview/:editview?',
meta: {
caption: 'entities.leadcompetitor.views.editview.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'competitors', parameterName: 'competitor' },
{ pathName: 'leadcompetitors', parameterName: 'leadcompetitor' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/sales/lead-competitor-edit-view/lead-competitor-edit-view.vue'),
},
{
path: 'leadcompetitors/:leadcompetitor?/editview/:editview?',
meta: {
......
import { Http,Util } from '@/utils';
import EntityService from '../entity-service';
/**
* 竞争对手产品服务对象基类
*
* @export
* @class CompetitorProductServiceBase
* @extends {EntityServie}
*/
export default class CompetitorProductServiceBase extends EntityService {
/**
* Creates an instance of CompetitorProductServiceBase.
*
* @param {*} [opts={}]
* @memberof CompetitorProductServiceBase
*/
constructor(opts: any = {}) {
super(opts);
}
/**
* 初始化基础数据
*
* @memberof CompetitorProductServiceBase
*/
public initBasicData(){
this.APPLYDEKEY ='competitorproduct';
this.APPDEKEY = 'relationshipsid';
this.APPDENAME = 'competitorproducts';
this.APPDETEXT = 'relationshipsname';
this.APPNAME = 'crm';
this.SYSTEMNAME = 'ibizbusinesscentral';
}
// 实体接口
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof CompetitorProductServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.competitor && context.competitorproduct){
return Http.getInstance().get(`/competitors/${context.competitor}/competitorproducts/${context.competitorproduct}/select`,isloading);
}
return Http.getInstance().get(`/competitorproducts/${context.competitorproduct}/select`,isloading);
}
/**
* Create接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof CompetitorProductServiceBase
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.competitor && true){
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(`/competitors/${context.competitor}/competitorproducts`,data,isloading);
return res;
}
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(`/competitorproducts`,data,isloading);
return res;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof CompetitorProductServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.competitor && context.competitorproduct){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/competitors/${context.competitor}/competitorproducts/${context.competitorproduct}`,data,isloading);
return res;
}
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/competitorproducts/${context.competitorproduct}`,data,isloading);
return res;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof CompetitorProductServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.competitor && context.competitorproduct){
return Http.getInstance().delete(`/competitors/${context.competitor}/competitorproducts/${context.competitorproduct}`,isloading);
}
return Http.getInstance().delete(`/competitorproducts/${context.competitorproduct}`,isloading);
}
/**
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof CompetitorProductServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.competitor && context.competitorproduct){
let res:any = await Http.getInstance().get(`/competitors/${context.competitor}/competitorproducts/${context.competitorproduct}`,isloading);
return res;
}
let res:any = await Http.getInstance().get(`/competitorproducts/${context.competitorproduct}`,isloading);
return res;
}
/**
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof CompetitorProductServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.competitor && true){
let res:any = await Http.getInstance().get(`/competitors/${context.competitor}/competitorproducts/getdraft`,isloading);
res.data.competitorproduct = data.competitorproduct;
return res;
}
let res:any = await Http.getInstance().get(`/competitorproducts/getdraft`,isloading);
res.data.competitorproduct = data.competitorproduct;
return res;
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof CompetitorProductServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.competitor && context.competitorproduct){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/competitors/${context.competitor}/competitorproducts/${context.competitorproduct}/checkkey`,data,isloading);
return res;
}
return Http.getInstance().post(`/competitorproducts/${context.competitorproduct}/checkkey`,data,isloading);
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof CompetitorProductServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.competitor && context.competitorproduct){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/competitors/${context.competitor}/competitorproducts/${context.competitorproduct}/save`,data,isloading);
return res;
}
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/competitorproducts/${context.competitorproduct}/save`,data,isloading);
return res;
}
/**
* FetchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof CompetitorProductServiceBase
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.competitor && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/competitors/${context.competitor}/competitorproducts/fetchdefault`,tempData,isloading);
}
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/competitorproducts/fetchdefault`,tempData,isloading);
}
}
\ No newline at end of file
import { Http,Util } from '@/utils';
import CompetitorProductServiceBase from './competitor-product-service-base';
/**
* 竞争对手产品服务对象
*
* @export
* @class CompetitorProductService
* @extends {CompetitorProductServiceBase}
*/
export default class CompetitorProductService extends CompetitorProductServiceBase {
/**
* Creates an instance of CompetitorProductService.
*
* @param {*} [opts={}]
* @memberof CompetitorProductService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
......@@ -62,6 +62,36 @@ export default class CompetitorServiceBase extends EntityService {
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
let competitorproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_competitorproducts'),'undefined')){
competitorproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_competitorproducts') as any);
if(competitorproductsData && competitorproductsData.length && competitorproductsData.length > 0){
competitorproductsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.competitorproducts = competitorproductsData;
let leadcompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leadcompetitors'),'undefined')){
leadcompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leadcompetitors') as any);
if(leadcompetitorsData && leadcompetitorsData.length && leadcompetitorsData.length > 0){
leadcompetitorsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.leadcompetitors = leadcompetitorsData;
let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
......@@ -86,6 +116,8 @@ export default class CompetitorServiceBase extends EntityService {
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/competitors`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_competitorproducts',JSON.stringify(res.data.competitorproducts));
this.tempStorage.setItem(tempContext.srfsessionkey+'_leadcompetitors',JSON.stringify(res.data.leadcompetitors));
this.tempStorage.setItem(tempContext.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
return res;
}
......@@ -101,6 +133,36 @@ export default class CompetitorServiceBase extends EntityService {
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
let competitorproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_competitorproducts'),'undefined')){
competitorproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_competitorproducts') as any);
if(competitorproductsData && competitorproductsData.length && competitorproductsData.length > 0){
competitorproductsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.competitorproducts = competitorproductsData;
let leadcompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leadcompetitors'),'undefined')){
leadcompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leadcompetitors') as any);
if(leadcompetitorsData && leadcompetitorsData.length && leadcompetitorsData.length > 0){
leadcompetitorsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.leadcompetitors = leadcompetitorsData;
let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
......@@ -118,6 +180,8 @@ export default class CompetitorServiceBase extends EntityService {
masterData.opportunitycompetitors = opportunitycompetitorsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/competitors/${context.competitor}`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_competitorproducts',JSON.stringify(res.data.competitorproducts));
this.tempStorage.setItem(context.srfsessionkey+'_leadcompetitors',JSON.stringify(res.data.leadcompetitors));
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
return res;
}
......@@ -146,6 +210,8 @@ export default class CompetitorServiceBase extends EntityService {
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/competitors/${context.competitor}`,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_competitorproducts',JSON.stringify(res.data.competitorproducts));
this.tempStorage.setItem(context.srfsessionkey+'_leadcompetitors',JSON.stringify(res.data.leadcompetitors));
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
return res;
}
......@@ -162,6 +228,8 @@ export default class CompetitorServiceBase extends EntityService {
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/competitors/getdraft`,isloading);
res.data.competitor = data.competitor;
this.tempStorage.setItem(context.srfsessionkey+'_competitorproducts',JSON.stringify(res.data.competitorproducts));
this.tempStorage.setItem(context.srfsessionkey+'_leadcompetitors',JSON.stringify(res.data.leadcompetitors));
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
return res;
}
......@@ -190,6 +258,36 @@ export default class CompetitorServiceBase extends EntityService {
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
let competitorproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_competitorproducts'),'undefined')){
competitorproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_competitorproducts') as any);
if(competitorproductsData && competitorproductsData.length && competitorproductsData.length > 0){
competitorproductsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.competitorproducts = competitorproductsData;
let leadcompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leadcompetitors'),'undefined')){
leadcompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leadcompetitors') as any);
if(leadcompetitorsData && leadcompetitorsData.length && leadcompetitorsData.length > 0){
leadcompetitorsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.leadcompetitors = leadcompetitorsData;
let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
......@@ -207,6 +305,8 @@ export default class CompetitorServiceBase extends EntityService {
masterData.opportunitycompetitors = opportunitycompetitorsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/competitors/${context.competitor}/save`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_competitorproducts',JSON.stringify(res.data.competitorproducts));
this.tempStorage.setItem(context.srfsessionkey+'_leadcompetitors',JSON.stringify(res.data.leadcompetitors));
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
return res;
}
......
......@@ -89,6 +89,7 @@ export class EntityServiceRegister {
this.allEntityService.set('contact', () => import('@/service/contact/contact-service'));
this.allEntityService.set('product', () => import('@/service/product/product-service'));
this.allEntityService.set('competitor', () => import('@/service/competitor/competitor-service'));
this.allEntityService.set('competitorproduct', () => import('@/service/competitor-product/competitor-product-service'));
this.allEntityService.set('account', () => import('@/service/account/account-service'));
this.allEntityService.set('salesorder', () => import('@/service/sales-order/sales-order-service'));
this.allEntityService.set('quotedetail', () => import('@/service/quote-detail/quote-detail-service'));
......
......@@ -62,6 +62,9 @@ export default class LeadCompetitorServiceBase extends EntityService {
}
if(context.lead && context.leadcompetitor){
return Http.getInstance().get(`/leads/${context.lead}/leadcompetitors/${context.leadcompetitor}/select`,isloading);
}
if(context.competitor && context.leadcompetitor){
return Http.getInstance().get(`/competitors/${context.competitor}/leadcompetitors/${context.leadcompetitor}/select`,isloading);
}
return Http.getInstance().get(`/leadcompetitors/${context.leadcompetitor}/select`,isloading);
}
......@@ -141,6 +144,19 @@ export default class LeadCompetitorServiceBase extends EntityService {
let res:any = await Http.getInstance().post(`/leads/${context.lead}/leadcompetitors`,data,isloading);
return res;
}
if(context.competitor && true){
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(`/competitors/${context.competitor}/leadcompetitors`,data,isloading);
return res;
}
let masterData:any = {};
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
......@@ -194,6 +210,12 @@ export default class LeadCompetitorServiceBase extends EntityService {
let res:any = await Http.getInstance().put(`/leads/${context.lead}/leadcompetitors/${context.leadcompetitor}`,data,isloading);
return res;
}
if(context.competitor && context.leadcompetitor){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/competitors/${context.competitor}/leadcompetitors/${context.leadcompetitor}`,data,isloading);
return res;
}
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/leadcompetitors/${context.leadcompetitor}`,data,isloading);
......@@ -224,6 +246,9 @@ export default class LeadCompetitorServiceBase extends EntityService {
}
if(context.lead && context.leadcompetitor){
return Http.getInstance().delete(`/leads/${context.lead}/leadcompetitors/${context.leadcompetitor}`,isloading);
}
if(context.competitor && context.leadcompetitor){
return Http.getInstance().delete(`/competitors/${context.competitor}/leadcompetitors/${context.leadcompetitor}`,isloading);
}
return Http.getInstance().delete(`/leadcompetitors/${context.leadcompetitor}`,isloading);
}
......@@ -257,6 +282,10 @@ export default class LeadCompetitorServiceBase extends EntityService {
if(context.lead && context.leadcompetitor){
let res:any = await Http.getInstance().get(`/leads/${context.lead}/leadcompetitors/${context.leadcompetitor}`,isloading);
return res;
}
if(context.competitor && context.leadcompetitor){
let res:any = await Http.getInstance().get(`/competitors/${context.competitor}/leadcompetitors/${context.leadcompetitor}`,isloading);
return res;
}
let res:any = await Http.getInstance().get(`/leadcompetitors/${context.leadcompetitor}`,isloading);
return res;
......@@ -297,6 +326,11 @@ export default class LeadCompetitorServiceBase extends EntityService {
res.data.leadcompetitor = data.leadcompetitor;
return res;
}
if(context.competitor && true){
let res:any = await Http.getInstance().get(`/competitors/${context.competitor}/leadcompetitors/getdraft`,isloading);
res.data.leadcompetitor = data.leadcompetitor;
return res;
}
let res:any = await Http.getInstance().get(`/leadcompetitors/getdraft`,isloading);
res.data.leadcompetitor = data.leadcompetitor;
return res;
......@@ -341,6 +375,12 @@ export default class LeadCompetitorServiceBase extends EntityService {
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/leads/${context.lead}/leadcompetitors/${context.leadcompetitor}/checkkey`,data,isloading);
return res;
}
if(context.competitor && context.leadcompetitor){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/competitors/${context.competitor}/leadcompetitors/${context.leadcompetitor}/checkkey`,data,isloading);
return res;
}
return Http.getInstance().post(`/leadcompetitors/${context.leadcompetitor}/checkkey`,data,isloading);
}
......@@ -385,6 +425,12 @@ export default class LeadCompetitorServiceBase extends EntityService {
let res:any = await Http.getInstance().post(`/leads/${context.lead}/leadcompetitors/${context.leadcompetitor}/save`,data,isloading);
return res;
}
if(context.competitor && context.leadcompetitor){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/competitors/${context.competitor}/leadcompetitors/${context.leadcompetitor}/save`,data,isloading);
return res;
}
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/leadcompetitors/${context.leadcompetitor}/save`,data,isloading);
......@@ -421,6 +467,10 @@ export default class LeadCompetitorServiceBase extends EntityService {
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/leads/${context.lead}/leadcompetitors/fetchdefault`,tempData,isloading);
}
if(context.competitor && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/competitors/${context.competitor}/leadcompetitors/fetchdefault`,tempData,isloading);
}
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/leadcompetitors/fetchdefault`,tempData,isloading);
}
......
......@@ -581,6 +581,16 @@ export const viewstate: any = {
'976e7a90095f22af96879a4f46b79b7c',
],
},
{
viewtag: '321c9f14181d1afaf18a8ffacea2a29f',
viewmodule: 'Sales',
viewname: 'CompetitorProductEdit_CompProView',
viewaction: '',
viewdatachange: false,
refviews: [
'ba34ee36c1d0de288403607e17e7eb3e',
],
},
{
viewtag: '35728a12ceecb647982051842853547c',
viewmodule: 'Sales',
......@@ -1790,6 +1800,7 @@ export const viewstate: any = {
viewdatachange: false,
refviews: [
'5de2a290b5d079445ad825f6d6418dd6',
'f83783341c365d6eb1d7385c9d1ddb95',
'9bf80730e83a74615919a0f0907505d4',
],
},
......@@ -2007,6 +2018,7 @@ export const viewstate: any = {
viewaction: '',
viewdatachange: false,
refviews: [
'b153b539b40b2ff7a9d81b6c0329cf25',
],
},
{
......@@ -2322,6 +2334,16 @@ export const viewstate: any = {
refviews: [
],
},
{
viewtag: 'f83783341c365d6eb1d7385c9d1ddb95',
viewmodule: 'Sales',
viewname: 'CompetitorProductCompProGridView',
viewaction: '',
viewdatachange: false,
refviews: [
'321c9f14181d1afaf18a8ffacea2a29f',
],
},
{
viewtag: 'f84a705f33385d5999fcfb69124932d4',
viewmodule: 'Base',
......
import { Environment } from '@/environments/environment';
import { UIActionTool,Util } from '@/utils';
import UIService from '../ui-service';
import { Subject } from 'rxjs';
import CompetitorProductService from '@/service/competitor-product/competitor-product-service';
/**
* 竞争对手产品UI服务对象基类
*
* @export
* @class CompetitorProductUIServiceBase
*/
export default class CompetitorProductUIServiceBase extends UIService {
/**
* 是否支持工作流
*
* @memberof CompetitorProductUIServiceBase
*/
public isEnableWorkflow:boolean = false;
/**
* 当前UI服务对应的数据服务对象
*
* @memberof CompetitorProductUIServiceBase
*/
public dataService:CompetitorProductService = new CompetitorProductService();
/**
* 所有关联视图
*
* @memberof CompetitorProductUIServiceBase
*/
public allViewMap: Map<string, Object> = new Map();
/**
* 状态值
*
* @memberof CompetitorProductUIServiceBase
*/
public stateValue: number = 0;
/**
* 状态属性
*
* @memberof CompetitorProductUIServiceBase
*/
public stateField: string = "";
/**
* 主状态属性集合
*
* @memberof CompetitorProductUIServiceBase
*/
public mainStateFields:Array<any> = [];
/**
* 主状态集合Map
*
* @memberof CompetitorProductUIServiceBase
*/
public allDeMainStateMap:Map<string,string> = new Map();
/**
* Creates an instance of CompetitorProductUIServiceBase.
*
* @param {*} [opts={}]
* @memberof CompetitorProductUIServiceBase
*/
constructor(opts: any = {}) {
super(opts);
this.initViewMap();
this.initDeMainStateMap();
}
/**
* 初始化视图Map
*
* @memberof CompetitorProductUIServiceBase
*/
public initViewMap(){
this.allViewMap.set(':',{viewname:'edit_compproview',srfappde:'competitorproducts'});
this.allViewMap.set(':',{viewname:'compprogridview',srfappde:'competitorproducts'});
}
/**
* 初始化主状态集合
*
* @memberof CompetitorProductUIServiceBase
*/
public initDeMainStateMap(){
}
/**
* 获取指定数据的重定向页面
*
* @param srfkey 数据主键
* @param isEnableWorkflow 重定向视图是否需要处理流程中的数据
* @memberof CompetitorProductUIServiceBase
*/
public async getRDAppView(srfkey:string,isEnableWorkflow:boolean){
this.isEnableWorkflow = isEnableWorkflow;
// 进行数据查询
let result:any = await this.dataService.Get({competitorproduct: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 CompetitorProductUIServiceBase
*/
public getRealDEType(entity:any){
}
/**
* 获取实体单数据实体视图预定义参数
*
* @param curData 当前数据
* @param bDataInWF 是否有数据在工作流中
* @param bWFMode 是否工作流模式
* @memberof CompetitorProductUIServiceBase
*/
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 CompetitorProductUIServiceBase
*/
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 CompetitorProductUIServiceBase from './competitor-product-ui-service-base';
/**
* 竞争对手产品UI服务对象
*
* @export
* @class CompetitorProductUIService
*/
export default class CompetitorProductUIService extends CompetitorProductUIServiceBase {
/**
* Creates an instance of CompetitorProductUIService.
*
* @param {*} [opts={}]
* @memberof CompetitorProductUIService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
......@@ -89,6 +89,7 @@ export class UIServiceRegister {
this.allUIService.set('contact', () => import('@/uiservice/contact/contact-ui-service'));
this.allUIService.set('product', () => import('@/uiservice/product/product-ui-service'));
this.allUIService.set('competitor', () => import('@/uiservice/competitor/competitor-ui-service'));
this.allUIService.set('competitorproduct', () => import('@/uiservice/competitor-product/competitor-product-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('quotedetail', () => import('@/uiservice/quote-detail/quote-detail-ui-service'));
......
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, SearchFormControlBase } from '@/studio-core';
import CompetitorProductService from '@/service/competitor-product/competitor-product-service';
import DefaultService from './default-searchform-service';
import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail';
import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
/**
* searchform部件基类
*
* @export
* @class SearchFormControlBase
* @extends {DefaultSearchFormBase}
*/
export class DefaultSearchFormBase extends SearchFormControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof DefaultSearchFormBase
*/
protected controlType: string = 'SEARCHFORM';
/**
* 建构部件服务对象
*
* @type {DefaultService}
* @memberof DefaultSearchFormBase
*/
public service: DefaultService = new DefaultService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {CompetitorProductService}
* @memberof DefaultSearchFormBase
*/
public appEntityService: CompetitorProductService = new CompetitorProductService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof DefaultSearchFormBase
*/
protected appDeName: string = 'competitorproduct';
/**
* 表单数据对象
*
* @type {*}
* @memberof DefaultSearchFormBase
*/
public data: any = {
};
/**
* 详情模型集合
*
* @type {*}
* @memberof DefaultSearchFormBase
*/
public detailsModel: any = {
formpage1: new FormPageModel({ caption: '常规条件', detailType: 'FORMPAGE', name: 'formpage1', visible: true, isShowCaption: true, form: this })
,
};
}
\ No newline at end of file
/**
* Default 部件模型
*
* @export
* @class DefaultModel
*/
export default class DefaultModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof DefaultModel
*/
public getDataItems(): any[] {
return [
{
name: 'srfwfmemo',
prop: 'srfwfmemo',
dataType: 'TEXT',
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name: 'srffrontuf',
prop: 'srffrontuf',
dataType: 'TEXT',
},
]
}
}
\ No newline at end of file
<i-form :model="this.data" class='app-search-form' ref='searchform' style="">
<input style="display:none;"/>
<div class="search-button">
<i-button size="small" type="primary" ghost @click="onSearch.apply(_self, arguments)">{{$t('app.searchButton.search')}}</i-button>
<i-button size="small" type="default" ghost @click="onReset.apply(_self, arguments)">{{this.$t('app.searchButton.reset')}}</i-button>
</div>
<div class="form-content">
</div>
</i-form>
\ No newline at end of file
<template src="./default-searchform.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { DefaultSearchFormBase } from './default-searchform-base';
/**
* searchform部件
*
* @export
* @class DefaultSearchForm
* @extends {DefaultSearchFormBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class DefaultSearchForm extends DefaultSearchFormBase { }
</script>
/**
* Edit_CompPro 部件模型
*
* @export
* @class Edit_CompProModel
*/
export default class Edit_CompProModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof Edit_CompProModel
*/
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: 'relationshipsid',
dataType: 'GUID',
},
{
name: 'srfmajortext',
prop: 'relationshipsname',
dataType: 'TEXT',
},
{
name: 'srftempmode',
},
{
name: 'srfuf',
},
{
name: 'srfdeid',
},
{
name: 'srfsourcekey',
},
{
name: 'entityid',
prop: 'entityid',
dataType: 'PICKUP',
},
{
name: 'entity2name',
prop: 'entity2name',
dataType: 'PICKUPTEXT',
},
{
name: 'productnumber',
prop: 'productnumber',
dataType: 'PICKUPDATA',
},
{
name: 'entity2id',
prop: 'entity2id',
dataType: 'PICKUP',
},
{
name: 'relationshipsid',
prop: 'relationshipsid',
dataType: 'GUID',
},
{
name: 'competitorproduct',
prop: 'relationshipsid',
dataType: 'FONTKEY',
},
]
}
}
\ No newline at end of file
<template src="./edit-comp-pro-form.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { Edit_CompProEditFormBase } from './edit-comp-pro-form-base';
/**
* form部件
*
* @export
* @class Edit_CompProEditForm
* @extends {Edit_CompProEditFormBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class Edit_CompProEditForm extends Edit_CompProEditFormBase { }
</script>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册