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

xignzi006 发布系统代码

上级 354a4665
......@@ -839,6 +839,16 @@
"viewtag": "a69ba7dd2f8bdac8a3c733dcc79c0ee5",
"memo": ""
},
"leadquickcreateview": {
"title": "潜在顾客选项操作视图",
"caption": "潜在顾客",
"viewtype": "DEOPTVIEW",
"viewmodule": "Sales",
"viewname": "LeadQuickCreateView",
"viewfilename": "lead-quick-create-view",
"viewtag": "a942d813792298be53badd6f5bf8b105",
"memo": ""
},
"phonecalleditview": {
"title": "电话联络编辑视图",
"caption": "电话联络",
......
......@@ -559,8 +559,10 @@ export default {
emailaddress1: "电子邮件",
parentcustomerid: "公司名称",
telephone1: "商务电话",
uagridcolumn1: "主联系人",
},
uiactions: {
setprimary: "设置为主要联系人",
},
},
main_grid: {
......
......@@ -558,8 +558,10 @@ export default {
emailaddress1: '电子邮件',
parentcustomerid: '公司名称',
telephone1: '商务电话',
uagridcolumn1: '主联系人',
},
uiactions: {
setprimary: '设置为主要联系人',
},
},
main_grid: {
......
......@@ -178,13 +178,15 @@ export default {
caption: "潜在顾客",
title: '潜在顾客选择表格视图',
},
quickcreateview: {
caption: "潜在顾客",
title: '潜在顾客选项操作视图',
},
},
quickcreate_form: {
details: {
group1: "lead基本信息",
group1: "联系人信息",
formpage1: "基本信息",
group2: "操作信息",
formpage2: "其它",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "潜在顾客",
......@@ -193,11 +195,12 @@ export default {
srfuf: "",
srfdeid: "",
srfsourcekey: "",
subject: "主题",
fullname: "姓名",
createman: "建立人",
createdate: "建立时间",
updateman: "更新人",
updatedate: "更新时间",
jobtitle: "职务",
telephone1: "商务电话",
mobilephone: "移动电话",
emailaddress1: "电子邮件",
leadid: "潜在顾客",
},
uiactions: {
......
......@@ -177,13 +177,15 @@ export default {
caption: '潜在顾客',
title: '潜在顾客选择表格视图',
},
quickcreateview: {
caption: '潜在顾客',
title: '潜在顾客选项操作视图',
},
},
quickcreate_form: {
details: {
group1: 'lead基本信息',
group1: '联系人信息',
formpage1: '基本信息',
group2: '操作信息',
formpage2: '其它',
srfupdatedate: '更新时间',
srforikey: '',
srfkey: '潜在顾客',
......@@ -192,11 +194,12 @@ export default {
srfuf: '',
srfdeid: '',
srfsourcekey: '',
subject: '主题',
fullname: '姓名',
createman: '建立人',
createdate: '建立时间',
updateman: '更新人',
updatedate: '更新时间',
jobtitle: '职务',
telephone1: '商务电话',
mobilephone: '移动电话',
emailaddress1: '电子邮件',
leadid: '潜在顾客',
},
uiactions: {
......
......@@ -679,6 +679,14 @@ 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": "电话联络",
......
......@@ -444,6 +444,70 @@ export default class ContactUIServiceBase extends UIService {
openDrawer(view, data);
}
/**
* 设置为主要联系人
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
*/
public async Contact_SetPrimary(args: any[],context:any = {}, params:any = {}, $event?: any, xData?: any,actionContext?: any,srfParentDeName?:string){
let data: any = {};
let parentContext:any = {};
let parentViewParam:any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'SINGLEKEY';
Object.assign(context, { contact: '%contact%' });
Object.assign(params, { contactid: '%contact%' });
Object.assign(params, { fullname: '%fullname%' });
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);
// 直接调实体服务需要转换的数据
if(context && context.srfsessionid){
context.srfsessionkey = context.srfsessionid;
delete context.srfsessionid;
}
const backend = () => {
const curService:ContactService = new ContactService();
curService.Get(context,data, true).then((response: any) => {
if (!response || response.status !== 200) {
actionContext.$Notice.error({ title: '错误', desc: response.message });
return;
}
actionContext.$Notice.success({ title: '成功', desc: '设置为主要联系人成功!' });
const _this: any = actionContext;
return response;
}).catch((response: any) => {
if (!response || !response.status || !response.data) {
actionContext.$Notice.error({ title: '错误', desc: '系统异常!' });
return;
}
if (response.status === 401) {
return;
}
return response;
});
};
backend();
}
/**
* 编辑
*
......
......@@ -84,6 +84,7 @@ 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'});
}
/**
......
......@@ -71,6 +71,24 @@
</template>
</el-table-column>
</template>
<template v-if="getColumnState('uagridcolumn1')">
<el-table-column :column-key="'uagridcolumn1'" :label="$t('entities.contact.byaccount_grid.columns.uagridcolumn1')" :width="100" :align="'right'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.contact.byaccount_grid.columns.uagridcolumn1')}}
</span>
</template>
<template slot-scope="scope">
<span>
<a @click="uiAction(scope.row, 'SetPrimary', $event)">
<i class='fa fa-check'></i>
</a>
</span>
</template>
</el-table-column>
</template>
<template v-if="adaptiveState">
<el-table-column></el-table-column>
</template>
......@@ -87,6 +105,7 @@ import { UIActionTool,Util } from '@/utils';
import ContactService from '@/service/contact/contact-service';
import ByAccountService from './by-account-grid-service';
import ContactUIService from '@/uiservice/contact/contact-ui-service';
import CodeListService from "@service/app/codelist-service";
import { FormItemModel } from '@/model/form-detail';
......@@ -176,6 +195,34 @@ export default class ByAccountBase extends Vue implements ControlInterface {
public appEntityService: ContactService = new ContactService({ $store: this.$store });
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public grid_uagridcolumn1_u0a2fe00_click(params: any = {}, tag?: any, $event?: any) {
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this;
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
const curUIService:ContactUIService = new ContactUIService();
curUIService.Contact_SetPrimary(datas,contextJO, paramJO, $event, xData,this,"Contact");
}
/**
* 关闭视图
......@@ -541,6 +588,13 @@ export default class ByAccountBase extends Vue implements ControlInterface {
show: true,
util: 'PX'
},
{
name: 'uagridcolumn1',
label: '主联系人',
langtag: 'entities.contact.byaccount_grid.columns.uagridcolumn1',
show: true,
util: 'PX'
},
]
/**
......@@ -1275,6 +1329,9 @@ export default class ByAccountBase extends Vue implements ControlInterface {
*/
public uiAction(row: any, tag: any, $event: any) {
$event.stopPropagation();
if(Object.is('SetPrimary', tag)) {
this.grid_uagridcolumn1_u0a2fe00_click(row, tag, $event);
}
}
/**
......
......@@ -55,30 +55,35 @@ export default class QuickCreateModel {
{
name: 'srfsourcekey',
},
{
name: 'subject',
prop: 'subject',
dataType: 'TEXT',
},
{
name: 'fullname',
prop: 'fullname',
dataType: 'TEXT',
},
{
name: 'createman',
prop: 'createman',
name: 'jobtitle',
prop: 'jobtitle',
dataType: 'TEXT',
},
{
name: 'createdate',
prop: 'createdate',
dataType: 'DATETIME',
name: 'telephone1',
prop: 'telephone1',
dataType: 'TEXT',
},
{
name: 'updateman',
prop: 'updateman',
name: 'mobilephone',
prop: 'mobilephone',
dataType: 'TEXT',
},
{
name: 'updatedate',
prop: 'updatedate',
dataType: 'DATETIME',
name: 'emailaddress1',
prop: 'emailaddress1',
dataType: 'TEXT',
},
{
name: 'leadid',
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册