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

xignzi006 发布系统代码

上级 d21d09a5
......@@ -141,7 +141,7 @@
},
"leadgridview": {
"title": "潜在顾客表格视图",
"caption": "潜在顾客",
"caption": "潜在顾客信息",
"viewtype": "DEGRIDVIEW",
"viewmodule": "Sales",
"viewname": "LeadGridView",
......@@ -839,16 +839,6 @@
"viewtag": "a69ba7dd2f8bdac8a3c733dcc79c0ee5",
"memo": ""
},
"leadquickcreateview": {
"title": "潜在顾客选项操作视图",
"caption": "潜在顾客",
"viewtype": "DEOPTVIEW",
"viewmodule": "Sales",
"viewname": "LeadQuickCreateView",
"viewfilename": "lead-quick-create-view",
"viewtag": "a942d813792298be53badd6f5bf8b105",
"memo": ""
},
"phonecalleditview": {
"title": "电话联络编辑视图",
"caption": "电话联络",
......
......@@ -562,6 +562,15 @@ export default {
uagridcolumn1: "主联系人",
},
uiactions: {
new: "New",
edit: "Edit",
copy: "Copy",
togglerowedit: "行编辑",
newrow: "新建行",
remove: "Remove",
exportexcel: "Export",
print: "Print",
togglefilter: "Filter",
setprimary: "设置为主要联系人",
},
},
......@@ -585,6 +594,66 @@ export default {
uiactions: {
},
},
byaccountgrid_quicktoolbar_toolbar: {
tbitem3: {
caption: "New",
tip: "New",
},
tbitem4: {
caption: "Edit",
tip: "Edit {0}",
},
tbitem6: {
caption: "Copy",
tip: "Copy {0}",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "Remove",
tip: "Remove {0}",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "Export",
tip: "Export {0} Data To Excel",
},
},
byaccountgrid_batchtoolbar_toolbar: {
tbitem3: {
caption: "New",
tip: "New",
},
tbitem4: {
caption: "Edit",
tip: "Edit {0}",
},
tbitem6: {
caption: "Copy",
tip: "Copy {0}",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "Remove",
tip: "Remove {0}",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "Export",
tip: "Export {0} Data To Excel",
},
},
gridviewtoolbar_toolbar: {
tbitem1_openquickcreateview: {
caption: "新建",
......
......@@ -561,6 +561,15 @@ export default {
uagridcolumn1: '主联系人',
},
uiactions: {
new: '新建',
edit: '编辑',
copy: '拷贝',
togglerowedit: '行编辑',
newrow: '新建行',
remove: '删除',
exportexcel: '导出',
print: '打印',
togglefilter: '过滤',
setprimary: '设置为主要联系人',
},
},
......@@ -584,6 +593,66 @@ export default {
uiactions: {
},
},
byaccountgrid_quicktoolbar_toolbar: {
tbitem3: {
caption: '新建',
tip: '新建',
},
tbitem4: {
caption: '编辑',
tip: '编辑',
},
tbitem6: {
caption: '拷贝',
tip: '拷贝',
},
tbitem7: {
caption: '-',
tip: '',
},
tbitem8: {
caption: '删除',
tip: '删除',
},
tbitem9: {
caption: '-',
tip: '',
},
tbitem13: {
caption: '导出',
tip: '导出',
},
},
byaccountgrid_batchtoolbar_toolbar: {
tbitem3: {
caption: '新建',
tip: '新建',
},
tbitem4: {
caption: '编辑',
tip: '编辑',
},
tbitem6: {
caption: '拷贝',
tip: '拷贝',
},
tbitem7: {
caption: '-',
tip: '',
},
tbitem8: {
caption: '删除',
tip: '删除',
},
tbitem9: {
caption: '-',
tip: '',
},
tbitem13: {
caption: '导出',
tip: '导出',
},
},
gridviewtoolbar_toolbar: {
tbitem1_openquickcreateview: {
caption: '新建',
......
......@@ -159,7 +159,7 @@ export default {
},
views: {
gridview: {
caption: "潜在顾客",
caption: "潜在顾客信息",
title: '潜在顾客表格视图',
},
pickupview: {
......@@ -178,10 +178,6 @@ export default {
caption: "潜在顾客",
title: '潜在顾客选择表格视图',
},
quickcreateview: {
caption: "潜在顾客",
title: '潜在顾客选项操作视图',
},
},
quickcreate_form: {
details: {
......@@ -250,9 +246,13 @@ export default {
},
},
gridviewtoolbar_toolbar: {
tbitem3: {
caption: "New",
tip: "New",
tbitem1_openquickcreateview: {
caption: "新建",
tip: "新建",
},
tbitem2: {
caption: "-",
tip: "",
},
tbitem4: {
caption: "Edit",
......
......@@ -158,7 +158,7 @@ export default {
},
views: {
gridview: {
caption: '潜在顾客',
caption: '潜在顾客信息',
title: '潜在顾客表格视图',
},
pickupview: {
......@@ -177,10 +177,6 @@ export default {
caption: '潜在顾客',
title: '潜在顾客选择表格视图',
},
quickcreateview: {
caption: '潜在顾客',
title: '潜在顾客选项操作视图',
},
},
quickcreate_form: {
details: {
......@@ -249,10 +245,14 @@ export default {
},
},
gridviewtoolbar_toolbar: {
tbitem3: {
tbitem1_openquickcreateview: {
caption: '新建',
tip: '新建',
},
tbitem2: {
caption: '-',
tip: '',
},
tbitem4: {
caption: '编辑',
tip: '编辑',
......
......@@ -121,7 +121,7 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
},
"leadgridview": {
"title": "潜在顾客表格视图",
"caption": "潜在顾客",
"caption": "潜在顾客信息",
"viewtype": "DEGRIDVIEW",
"viewmodule": "Sales",
"viewname": "LeadGridView",
......@@ -679,14 +679,6 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "AccountQuickCreate",
"viewtag": "a69ba7dd2f8bdac8a3c733dcc79c0ee5"
},
"leadquickcreateview": {
"title": "潜在顾客选项操作视图",
"caption": "潜在顾客",
"viewtype": "DEOPTVIEW",
"viewmodule": "Sales",
"viewname": "LeadQuickCreateView",
"viewtag": "a942d813792298be53badd6f5bf8b105"
},
"phonecalleditview": {
"title": "电话联络编辑视图",
"caption": "电话联络",
......
......@@ -653,7 +653,7 @@ export default class ContactByAccountBase extends Vue {
* @type {boolean}
* @memberof ContactByAccountBase
*/
public isSingleSelect: boolean = false;
public isSingleSelect: boolean = true;
/**
......
<template>
<studio-view-style2 viewName="leadgridview" viewTitle="潜在顾客表格视图" class='degridview lead-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"/> </template>
......@@ -60,6 +63,7 @@ import LeadService from '@/service/lead/lead-service';
import GridViewEngine from '@engine/view/grid-view-engine';
import LeadUIService from '@/uiservice/lead/lead-ui-service';
import CodeListService from "@service/app/codelist-service";
......@@ -241,8 +245,9 @@ export default class LeadGridViewBase extends Vue {
* @memberof LeadGridView
*/
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: '' },
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: '' },
......@@ -506,8 +511,8 @@ export default class LeadGridViewBase extends Vue {
* @memberof LeadGridViewBase
*/
public toolbar_click($event: any, $event2?: any) {
if (Object.is($event.tag, 'tbitem3')) {
this.toolbar_tbitem3_click(null, '', $event2);
if (Object.is($event.tag, 'tbitem1_openquickcreateview')) {
this.toolbar_tbitem1_openquickcreateview_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem4')) {
this.toolbar_tbitem4_click(null, '', $event2);
......@@ -515,12 +520,6 @@ export default class LeadGridViewBase extends Vue {
if (Object.is($event.tag, 'tbitem6')) {
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')) {
this.toolbar_tbitem8_click(null, '', $event2);
}
......@@ -641,7 +640,7 @@ export default class LeadGridViewBase extends Vue {
* @param {*} [$event]
* @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[] = [];
......@@ -658,7 +657,8 @@ export default class LeadGridViewBase extends Vue {
datas = [params];
}
// 界面行为
this.New(datas, contextJO,paramJO, $event, xData,this,"Lead");
const curUIService:LeadUIService = new LeadUIService();
curUIService.Lead_OpenQuickCreateView(datas,contextJO, paramJO, $event, xData,this,"Lead");
}
/**
......@@ -717,62 +717,6 @@ export default class LeadGridViewBase extends Vue {
this.Copy(datas, contextJO,paramJO, $event, xData,this,"Lead");
}
/**
* 逻辑事件
*
* @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,"Lead");
}
/**
* 逻辑事件
*
* @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,"Lead");
}
/**
* 逻辑事件
*
......@@ -932,7 +876,7 @@ export default class LeadGridViewBase extends Vue {
const view: any = {
viewname: 'lead-quick-create',
height: 0,
width: 450,
width: 0,
title: this.$t('entities.lead.views.quickcreate.title'),
placement: 'DRAWER_RIGHT',
};
......@@ -977,26 +921,6 @@ export default class LeadGridViewBase extends Vue {
}
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof LeadGridViewBase
*/
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 视图处理逻辑不存在,请添加!' });
}
}
/**
* 编辑
*
......@@ -1055,42 +979,6 @@ export default class LeadGridViewBase extends Vue {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
}
}
/**
* 行编辑
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof LeadGridViewBase
*/
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 LeadGridViewBase
*/
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 视图处理逻辑不存在,请添加!' });
}
}
/**
* 删除
*
......
......@@ -84,7 +84,6 @@ export default class LeadUIServiceBase extends UIService {
this.allViewMap.set('EDITVIEW:',{viewname:'editview',srfappde:'leads'});
this.allViewMap.set(':',{viewname:'quickcreate',srfappde:'leads'});
this.allViewMap.set(':',{viewname:'pickupgridview',srfappde:'leads'});
this.allViewMap.set(':',{viewname:'quickcreateview',srfappde:'leads'});
}
/**
......@@ -95,6 +94,71 @@ export default class LeadUIServiceBase extends UIService {
public initDeMainStateMap(){
}
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
*/
public async Lead_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[] = [];
if(context.campaign && true){
deResParameters = [
{ pathName: 'campaigns', parameterName: 'campaign' },
]
}
const parameters: any[] = [
{ pathName: 'leads', parameterName: 'lead' },
];
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: 'lead-quick-create',
height: 0,
width: 0,
title: actionContext.$t('entities.lead.views.quickcreate.title'),
placement: 'DRAWER_RIGHT',
};
openDrawer(view, data);
}
/**
* 获取指定数据的重定向页面
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册