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

xignzi006 发布系统代码

上级 72ed431c
......@@ -300,7 +300,11 @@ export default {
revenue: "年收入",
numberofemployees: "员工数",
statuscode: "状态",
parentaccountname: "识别客户",
parentcontactname: "识别联系人",
ownername: "负责人",
parentcontactid: "潜在顾客的上司",
parentaccountid: "潜在顾客的上级单位",
leadid: "潜在顾客",
},
uiactions: {
......
......@@ -299,7 +299,11 @@ export default {
revenue: "年收入",
numberofemployees: "员工数",
statuscode: "状态",
parentaccountname: "识别客户",
parentcontactname: "识别联系人",
ownername: "负责人",
parentcontactid: "潜在顾客的上司",
parentaccountid: "潜在顾客的上级单位",
leadid: "潜在顾客",
},
uiactions: {
......
......@@ -657,10 +657,12 @@ export const viewstate: any = {
refviews: [
'50fa6dc3108b1959155c8092331dd8a7',
'e0705f7fd9afd10e3f38b1ff03edba8b',
'2e9c7792c3a728896ca8902634f71983',
'bae77557d2f7a7852b634dc5d5a93435',
'd5bc3dd94496dbc1549773a1647ca64d',
'b5ff54b0672efd3222a44d81f4e7362e',
'44f1244c0a9e78981a151dc7f247e867',
'fcdb236b65d78c4a8ae64e74f9483a63',
],
},
{
......
......@@ -96,7 +96,11 @@ export class DataPanelEditFormBase extends EditFormControlBase {
revenue: null,
numberofemployees: null,
statuscode: null,
parentaccountname: null,
parentcontactname: null,
ownername: null,
parentcontactid: null,
parentaccountid: null,
leadid: null,
lead:null,
};
......@@ -147,12 +151,69 @@ export class DataPanelEditFormBase extends EditFormControlBase {
statuscode: new FormItemModel({ caption: '状态', detailType: 'FORMITEM', name: 'statuscode', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
parentaccountname: new FormItemModel({ caption: '识别客户', detailType: 'FORMITEM', name: 'parentaccountname', visible: false, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
parentcontactname: new FormItemModel({ caption: '识别联系人', detailType: 'FORMITEM', name: 'parentcontactname', visible: false, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
ownername: new FormItemModel({ caption: '负责人', detailType: 'FORMITEM', name: 'ownername', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
parentcontactid: new FormItemModel({ caption: '潜在顾客的上司', detailType: 'FORMITEM', name: 'parentcontactid', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
parentaccountid: new FormItemModel({ caption: '潜在顾客的上级单位', detailType: 'FORMITEM', name: 'parentaccountid', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
leadid: new FormItemModel({ caption: '潜在顾客', detailType: 'FORMITEM', name: 'leadid', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
};
/**
* 表单逻辑
*
* @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal }
* @memberof DataPanelEditFormBase
*/
public formLogic({ name, newVal, oldVal }: { name: string, newVal: any, oldVal: any }): void {
if (Object.is(name, '') || Object.is(name, 'parentaccountname') || Object.is(name, 'statuscode')) {
let ret = false;
const _parentaccountname = this.data.parentaccountname;
const _statuscode = this.data.statuscode;
if (this.$verify.testCond(_statuscode, 'EQ', '') && this.$verify.testCond(_parentaccountname, 'ISNOTNULL', '')) {
ret = true;
}
this.detailsModel.parentaccountname.setVisible(ret);
}
if (Object.is(name, '') || Object.is(name, 'parentcontactname') || Object.is(name, 'statuscode')) {
let ret = false;
const _parentcontactname = this.data.parentcontactname;
const _statuscode = this.data.statuscode;
if (this.$verify.testCond(_statuscode, 'EQ', '3') && this.$verify.testCond(_parentcontactname, 'ISNOTNULL', '')) {
ret = true;
}
this.detailsModel.parentcontactname.setVisible(ret);
}
}
/**
* 表单 编辑头部信息 事件
*
......
......@@ -70,11 +70,31 @@ export default class DataPanelModel {
prop: 'statuscode',
dataType: 'NSCODELIST',
},
{
name: 'parentaccountname',
prop: 'parentaccountname',
dataType: 'PICKUPTEXT',
},
{
name: 'parentcontactname',
prop: 'parentcontactname',
dataType: 'PICKUPTEXT',
},
{
name: 'ownername',
prop: 'ownername',
dataType: 'TEXT',
},
{
name: 'parentcontactid',
prop: 'parentcontactid',
dataType: 'PICKUP',
},
{
name: 'parentaccountid',
prop: 'parentaccountid',
dataType: 'PICKUP',
},
{
name: 'leadid',
prop: 'leadid',
......
......@@ -2,6 +2,8 @@ import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import LeadService from '@/service/lead/lead-service';
import DataPanelModel from './data-panel-form-model';
import AccountService from '@/service/account/account-service';
import ContactService from '@/service/contact/contact-service';
/**
......@@ -41,6 +43,22 @@ export default class DataPanelService extends ControlService {
this.model = new DataPanelModel();
}
/**
* 客户服务对象
*
* @type {AccountService}
* @memberof DataPanelService
*/
public accountService: AccountService = new AccountService();
/**
* 联系人服务对象
*
* @type {ContactService}
* @memberof DataPanelService
*/
public contactService: ContactService = new ContactService();
/**
* 处理数据
*
......@@ -80,6 +98,12 @@ export default class DataPanelService extends ControlService {
*/
@Errorlog
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
if (Object.is(serviceName, 'AccountService') && Object.is(interfaceName, 'FetchDefault')) {
return this.doItems(this.accountService.FetchDefault(JSON.parse(JSON.stringify(context)),data, isloading), 'accountid', 'account');
}
if (Object.is(serviceName, 'ContactService') && Object.is(interfaceName, 'FetchDefault')) {
return this.doItems(this.contactService.FetchDefault(JSON.parse(JSON.stringify(context)),data, isloading), 'contactid', 'contact');
}
return Promise.reject([])
}
......
......@@ -25,6 +25,54 @@
<app-span name='statuscode' :value="data.statuscode" tag='Lead__StatusCode' codelistType='STATIC' :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style=""></app-span>
</app-form-item>
</div>
<div v-show="detailsModel.parentaccountname.visible" :style="{}">
<app-form-item name='parentaccountname' :itemRules="this.rules.parentaccountname" class='' :caption="$t('entities.lead.datapanel_form.details.parentaccountname')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.parentaccountname.error" :isEmptyCaption="false" labelPos="BOTTOM">
<app-picker
:formState="formState"
:data="data"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
:disabled="detailsModel.parentaccountname.disabled"
name='parentaccountname'
deMajorField='accountname'
deKeyField='account'
valueitem='parentaccountid'
:value="data.parentaccountname"
editortype="linkonly"
:linkview="{ viewname: 'AccountInfo', title: $t('entities.account.views.info.title'), deResParameters: [], parameters: [{ pathName: 'accounts', parameterName: 'account' }, { pathName: 'info', parameterName: 'info' } ], width: 0, height: 0, placement: '', isRedirectView: false }"
style=""
@formitemvaluechange="onFormItemValueChange">
</app-picker>
</app-form-item>
</div>
<div v-show="detailsModel.parentcontactname.visible" :style="{}">
<app-form-item name='parentcontactname' :itemRules="this.rules.parentcontactname" class='' :caption="$t('entities.lead.datapanel_form.details.parentcontactname')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.parentcontactname.error" :isEmptyCaption="false" labelPos="BOTTOM">
<app-picker
:formState="formState"
:data="data"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
:disabled="detailsModel.parentcontactname.disabled"
name='parentcontactname'
deMajorField='fullname'
deKeyField='contact'
valueitem='parentcontactid'
:value="data.parentcontactname"
editortype="linkonly"
:linkview="{ viewname: 'ContactInfo', title: $t('entities.contact.views.info.title'), deResParameters: [{ pathName: 'accounts', parameterName: 'account' }, ], parameters: [{ pathName: 'contacts', parameterName: 'contact' }, { pathName: 'info', parameterName: 'info' } ], width: 0, height: 0, placement: '', isRedirectView: false }"
style=""
@formitemvaluechange="onFormItemValueChange">
</app-picker>
</app-form-item>
</div>
<div v-show="detailsModel.ownername.visible" :style="{}">
<app-form-item name='ownername' :itemRules="this.rules.ownername" class='datapanel-style' :caption="$t('entities.lead.datapanel_form.details.ownername')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.ownername.error" :isEmptyCaption="false" labelPos="BOTTOM">
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册