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

xignzi006 发布系统代码

上级 406e6241
......@@ -705,13 +705,14 @@ export default {
tip: "关闭",
},
},
gradation_treeview: {
account_treeview: {
nodes: {
root: '全部客户',
},
uiactions: {
openmaineditview: "编辑",
remove: "Remove",
disable: "停用",
remove: "删除",
},
},
};
\ No newline at end of file
......@@ -704,12 +704,13 @@ export default {
tip: '关闭',
},
},
gradation_treeview: {
account_treeview: {
nodes: {
root: '全部客户',
},
uiactions: {
openmaineditview: '编辑',
disable: '停用',
remove: '删除',
},
},
......
......@@ -301,6 +301,84 @@ export default class AccountUIServiceBase 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 Account_Remove(args: any[],context:any = {}, params:any = {}, $event?: any, xData?: any,actionContext?: any,srfParentDeName?:string){
let confirmResult:boolean = await new Promise((resolve: any, reject: any) => {
actionContext.$Modal.confirm({
title: '警告',
content: '确认删除?',
onOk: () => {resolve(true);},
onCancel: () => {resolve(false);}
});
});
if(!confirmResult){
return;
}
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, { account: '%account%' });
Object.assign(params, { accountid: '%account%' });
Object.assign(params, { accountname: '%accountname%' });
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:AccountService = new AccountService();
curService.Remove(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;
if (xData && xData.refresh && xData.refresh instanceof Function) {
xData.refresh(args);
}
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();
}
/**
* 编辑
*
......@@ -367,6 +445,70 @@ export default class AccountUIServiceBase 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 Account_Disable(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, { account: '%account%' });
Object.assign(params, { accountid: '%account%' });
Object.assign(params, { accountname: '%accountname%' });
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:AccountService = new AccountService();
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();
}
/**
* 编辑
*
......
/**
* Account 部件模型
*
* @export
* @class AccountModel
*/
export default class AccountModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof AccountModel
*/
public getDataItems(): any[] {
return [
{
name: 'address1_primarycontactname',
},
{
name: 'openrevenue_date',
},
{
name: 'address2_utcoffset',
},
{
name: 'fax',
},
{
name: 'address1_composite',
},
{
name: 'entityimage',
},
{
name: 'emailaddress1',
},
{
name: 'overriddencreatedon',
},
{
name: 'address1_stateorprovince',
},
{
name: 'openrevenue',
},
{
name: 'address1_upszone',
},
{
name: 'followemail',
},
{
name: 'marketingonly',
},
{
name: 'numberofemployees',
},
{
name: 'telephone1',
},
{
name: 'aging60',
},
{
name: 'sharesoutstanding',
},
{
name: 'address2_freighttermscode',
},
{
name: 'entityimage_timestamp',
},
{
name: 'revenue_base',
},
{
name: 'accountratingcode',
},
{
name: 'donotbulkemail',
},
{
name: 'aging30',
},
{
name: 'donotbulkpostalmail',
},
{
name: 'creditlimit_base',
},
{
name: 'timezoneruleversionnumber',
},
{
name: 'customertypecode',
},
{
name: 'address2_longitude',
},
{
name: 'accountname',
},
{
name: 'participatesinworkflow',
},
{
name: 'preferredcontactmethodcode',
},
{
name: 'preferredappointmentdaycode',
},
{
name: 'marketcap',
},
{
name: 'address2_telephone1',
},
{
name: 'businesstypecode',
},
{
name: 'entityimageid',
},
{
name: 'address2_city',
},
{
name: 'ownershipcode',
},
{
name: 'utcconversiontimezonecode',
},
{
name: 'accountnumber',
},
{
name: 'address1_telephone2',
},
{
name: 'address1_line1',
},
{
name: 'donotphone',
},
{
name: 'address1_telephone3',
},
{
name: 'exchangerate',
},
{
name: 'address2_line2',
},
{
name: 'address2_telephone3',
},
{
name: 'address1_telephone1',
},
{
name: 'address1_fax',
},
{
name: 'address1_freighttermscode',
},
{
name: 'description',
},
{
name: 'merged',
},
{
name: 'address1_shippingmethodcode',
},
{
name: 'address1_name',
},
{
name: 'aging30_base',
},
{
name: 'address2_telephone2',
},
{
name: 'account',
prop: 'accountid',
},
{
name: 'primarytwitterid',
},
{
name: 'tickersymbol',
},
{
name: 'stockexchange',
},
{
name: 'address2_stateorprovince',
},
{
name: 'ftpsiteurl',
},
{
name: 'statuscode',
},
{
name: 'websiteurl',
},
{
name: 'donotpostalmail',
},
{
name: 'address1_city',
},
{
name: 'address2_fax',
},
{
name: 'aging90_base',
},
{
name: 'opendeals_date',
},
{
name: 'traversedpath',
},
{
name: 'shippingmethodcode',
},
{
name: 'address1_line2',
},
{
name: 'openrevenue_base',
},
{
name: 'updatedate',
},
{
name: 'preferredsystemuseridyominame',
},
{
name: 'address2_line3',
},
{
name: 'address1_postalcode',
},
{
name: 'address2_latitude',
},
{
name: 'ibizprivate',
},
{
name: 'territorycode',
},
{
name: 'teamsfollowed',
},
{
name: 'yominame',
},
{
name: 'address1_latitude',
},
{
name: 'telephone3',
},
{
name: 'ownerid',
},
{
name: 'address2_country',
},
{
name: 'masteraccountidyominame',
},
{
name: 'industrycode',
},
{
name: 'lastonholdtime',
},
{
name: 'address2_addressid',
},
{
name: 'onholdtime',
},
{
name: 'accountclassificationcode',
},
{
name: 'address1_country',
},
{
name: 'address1_addresstypecode',
},
{
name: 'statecode',
},
{
name: 'address2_addresstypecode',
},
{
name: 'accountcategorycode',
},
{
name: 'emailaddress2',
},
{
name: 'address2_shippingmethodcode',
},
{
name: 'importsequencenumber',
},
{
name: 'primarysatoriid',
},
{
name: 'customersizecode',
},
{
name: 'opendeals',
},
{
name: 'donotsendmm',
},
{
name: 'processid',
},
{
name: 'paymenttermscode',
},
{
name: 'sic',
},
{
name: 'address2_primarycontactname',
},
{
name: 'address1_utcoffset',
},
{
name: 'owneridyominame',
},
{
name: 'lastusedincampaign',
},
{
name: 'aging60_base',
},
{
name: 'donotfax',
},
{
name: 'updateman',
},
{
name: 'openrevenue_state',
},
{
name: 'opendeals_state',
},
{
name: 'versionnumber',
},
{
name: 'address1_longitude',
},
{
name: 'aging90',
},
{
name: 'entityimage_url',
},
{
name: 'creditlimit',
},
{
name: 'preferredsystemuserid',
},
{
name: 'revenue',
},
{
name: 'address1_county',
},
{
name: 'address1_line3',
},
{
name: 'stageid',
},
{
name: 'donotemail',
},
{
name: 'address2_postalcode',
},
{
name: 'preferredappointmenttimecode',
},
{
name: 'address2_upszone',
},
{
name: 'createdate',
},
{
name: 'address2_county',
},
{
name: 'owneridtype',
},
{
name: 'address2_composite',
},
{
name: 'address2_name',
},
{
name: 'address2_line1',
},
{
name: 'marketcap_base',
},
{
name: 'emailaddress3',
},
{
name: 'telephone2',
},
{
name: 'createman',
},
{
name: 'address1_postofficebox',
},
{
name: 'creditonhold',
},
{
name: 'address1_addressid',
},
{
name: 'address2_postofficebox',
},
{
name: 'slaname',
},
{
name: 'originatingleadid',
},
{
name: 'transactioncurrencyid',
},
{
name: 'defaultpricelevelid',
},
{
name: 'parentaccountid',
},
{
name: 'preferredequipmentid',
},
{
name: 'territoryid',
},
{
name: 'primarycontactid',
},
{
name: 'slaid',
},
{
name: 'preferredserviceid',
},
{
name: 'originatingleadname',
},
{
name: 'defaultpricelevelname',
},
{
name: 'territoryname',
},
{
name: 'parentaccountname',
},
{
name: 'preferredequipmentname',
},
{
name: 'preferredservicename',
},
{
name: 'primarycontactname',
},
{
name: 'transactioncurrencyname',
},
]
}
}
\ No newline at end of file
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import AccountBase from './account-treeview-base.vue';
@Component({
components: {
}
})
export default class Account extends AccountBase {
}
</script>
\ No newline at end of file
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import GradationtreeexpbarBase from './gradationtreeexpbar-treeexpbar-base.vue';
import view_treeexpbar_tree from '@widgets/account/gradation-treeview/gradation-treeview.vue';
import view_treeexpbar_tree from '@widgets/account/account-treeview/account-treeview.vue';
@Component({
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册