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

lab_gzf 发布系统代码

上级 dc3f8f8e
import { Subject } from 'rxjs';
import { EditViewBase } from '@/studio-core';
import InvoiceDetailService from '@/service/invoice-detail/invoice-detail-service';
import EditViewEngine from '@engine/view/edit-view-engine';
/**
* 发票产品编辑视图视图基类
*
* @export
* @class InvoiceDetailEditViewBase
* @extends {EditViewBase}
*/
export class InvoiceDetailEditViewBase extends EditViewBase {
/**
* 实体服务对象
*
* @type {InvoiceDetailService}
* @memberof InvoiceDetailEditViewBase
*/
protected appEntityService: InvoiceDetailService = new InvoiceDetailService;
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof InvoiceDetailEditViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof InvoiceDetailEditViewBase
*/
protected model: any = {
srfCaption: 'entities.invoicedetail.views.editview.caption',
srfTitle: 'entities.invoicedetail.views.editview.title',
srfSubTitle: 'entities.invoicedetail.views.editview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof InvoiceDetailEditViewBase
*/
protected containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_form: { name: 'form', type: 'FORM' },
};
/**
* 工具栏模型
*
* @type {*}
* @memberof InvoiceDetailEditView
*/
public toolBarModels: any = {
tbitem3: { name: 'tbitem3', caption: '保存','isShowCaption':true,'isShowIcon':true, tooltip: '保存', iconcls: 'fa fa-save', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Save', target: '' }, class: '' },
tbitem4: { name: 'tbitem4', caption: '保存并新建','isShowCaption':true,'isShowIcon':true, tooltip: '保存并新建', iconcls: 'sx-tb-saveandnew', icon: '../sasrfex/images/default/icon_saveandnew.png', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'SaveAndNew', target: '' }, class: '' },
tbitem5: { name: 'tbitem5', caption: '保存并关闭','isShowCaption':true,'isShowIcon':true, tooltip: '保存并关闭', iconcls: 'fa fa-power-off', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'SaveAndExit', target: '' }, class: '' },
tbitem6: { name: 'tbitem6', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem7: { name: 'tbitem7', caption: '删除并关闭','isShowCaption':true,'isShowIcon':true, tooltip: '删除并关闭', iconcls: 'fa fa-remove', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'RemoveAndExit', target: 'SINGLEKEY' }, class: '' },
tbitem8: { name: 'tbitem8', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem12: { name: 'tbitem12', 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: '' },
tbitem13: { name: 'tbitem13', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem14: { name: 'tbitem14', caption: '拷贝','isShowCaption':true,'isShowIcon':true, tooltip: '拷贝', iconcls: 'fa fa-copy', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Copy', target: 'SINGLEKEY' }, class: '' },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = '485d1a17354fe57fd79dde512adb715b';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof InvoiceDetailEditViewBase
*/
public engine: EditViewEngine = new EditViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof InvoiceDetailEditViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
form: this.$refs.form,
p2k: '0',
keyPSDEField: 'invoicedetail',
majorPSDEField: 'invoicedetailname',
isLoadDefault: true,
});
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof InvoiceDetailEditViewBase
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'tbitem3')) {
this.toolbar_tbitem3_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem4')) {
this.toolbar_tbitem4_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem5')) {
this.toolbar_tbitem5_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem7')) {
this.toolbar_tbitem7_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem9')) {
this.toolbar_tbitem9_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem10')) {
this.toolbar_tbitem10_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem12')) {
this.toolbar_tbitem12_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem14')) {
this.toolbar_tbitem14_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem15')) {
this.toolbar_tbitem15_click(null, '', $event2);
}
}
/**
* form 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof InvoiceDetailEditViewBase
*/
public form_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'save', $event);
}
/**
* form 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof InvoiceDetailEditViewBase
*/
public form_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'remove', $event);
}
/**
* form 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof InvoiceDetailEditViewBase
*/
public form_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'load', $event);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem3_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.Save(datas, contextJO,paramJO, $event, xData,this,"InvoiceDetail");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem4_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.SaveAndNew(datas, contextJO,paramJO, $event, xData,this,"InvoiceDetail");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem5_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,"InvoiceDetail");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem7_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.RemoveAndExit(datas, contextJO,paramJO, $event, xData,this,"InvoiceDetail");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem9_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.SaveAndStart(datas, contextJO,paramJO, $event, xData,this,"InvoiceDetail");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem10_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.ViewWFStep(datas, contextJO,paramJO, $event, xData,this,"InvoiceDetail");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem12_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.New(datas, contextJO,paramJO, $event, xData,this,"InvoiceDetail");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem14_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.Copy(datas, contextJO,paramJO, $event, xData,this,"InvoiceDetail");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem15_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.Print(datas, contextJO,paramJO, $event, xData,this,"InvoiceDetail");
}
/**
* 保存
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof InvoiceDetailEditViewBase
*/
public Save(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
// 界面行为容器对象 _this
const _this: any = this;
if (xData && xData.save instanceof Function) {
xData.save().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
_this.$emit('viewdataschange', [{ ...response.data }]);
});
} else if (_this.save && _this.save instanceof Function) {
_this.save();
}
}
/**
* 保存并新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof InvoiceDetailEditViewBase
*/
public SaveAndNew(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.saveAndNew instanceof Function)) {
return;
}
xData.saveAndNew().then((response: any) => {
if (!response || response.status !== 200) {
_this.$emit('viewdataschange', JSON.stringify({status:'error',action:'saveAndNew'}));
return;
}
_this.$emit('viewdataschange', JSON.stringify({status:'success',action:'saveAndNew',data:response.data}));
if (xData.autoLoad instanceof Function) {
xData.autoLoad();
}
});
}
/**
* 保存并关闭
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof InvoiceDetailEditViewBase
*/
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 InvoiceDetailEditViewBase
*/
public RemoveAndExit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (xData && xData.removeAndExit instanceof Function) {
xData.removeAndExit().then((response: any) => {
if (!response || response.status !== 200) {
return;
}
if(window.parent){
window.parent.postMessage([{ ...response.data }],'*');
}
});
} else if (_this.removeAndExit && _this.removeAndExit instanceof Function) {
_this.removeAndExit().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 InvoiceDetailEditViewBase
*/
public SaveAndStart(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.wfstart instanceof Function)) {
return;
}
xData.wfstart(args).then((response: any) => {
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
if(window.parent){
window.parent.postMessage({ ..._data },'*');
}
if (_this.viewdata) {
_this.$emit('viewdataschange', [{ ..._data }]);
_this.$emit('close');
}else if (this.$tabPageExp) {
this.$tabPageExp.onClose(this.$route.fullPath);
}
});
}
/**
* 当前流程步骤
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof InvoiceDetailEditViewBase
*/
public ViewWFStep(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let _this:any = this;
if (!xData || !(xData.wfsubmit instanceof Function)) {
return;
}
xData.wfsubmit(args).then((response: any) => {
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
if (_this.viewdata) {
_this.$emit('viewdataschange', [{ ..._data }]);
_this.$emit('close');
} else if (_this.$tabPageExp) {
_this.$tabPageExp.onClose(_this.$route.fullPath);
}
});
}
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof InvoiceDetailEditViewBase
*/
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 视图处理逻辑不存在,请添加!' });
}
}
/**
* 拷贝
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof InvoiceDetailEditViewBase
*/
public Copy(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
return;
}
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
}
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) {
if (args.length > 0) {
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
}
xData.copy(args[0].srfkey);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
}
}
/**
* 打印
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof InvoiceDetailEditViewBase
*/
public Print(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let _this:any = this;
if (!xData || !(xData.print instanceof Function) || !$event) {
return ;
}
xData.print();
}
}
\ No newline at end of file
<studio-view-style2 viewName="invoicedetaileditview" viewTitle="发票产品编辑视图" class='deeditview invoice-detail-edit-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="./invoice-detail-edit-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { InvoiceDetailEditViewBase } from './invoice-detail-edit-view-base';
import view_form from '@widgets/invoice-detail/main-form/main-form.vue';
/**
* 发票产品编辑视图视图
*
* @export
* @class InvoiceDetailEditView
* @extends {InvoiceDetailEditViewBase}
*/
@Component({
components: {
view_form,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$store.commit('addCurPageViewtag', { route: to, viewtag: vm.viewtag });
});
}
})
@VueLifeCycleProcessing()
export default class InvoiceDetailEditView extends InvoiceDetailEditViewBase { }
</script>
import { Subject } from 'rxjs';
import { GridViewBase } from '@/studio-core';
import InvoiceDetailService from '@/service/invoice-detail/invoice-detail-service';
import GridViewEngine from '@engine/view/grid-view-engine';
import CodeListService from "@service/app/codelist-service";
/**
* 发票产品表格视图视图基类
*
* @export
* @class InvoiceDetailInvoiceProGridViewBase
* @extends {GridViewBase}
*/
export class InvoiceDetailInvoiceProGridViewBase extends GridViewBase {
/**
* 实体服务对象
*
* @type {InvoiceDetailService}
* @memberof InvoiceDetailInvoiceProGridViewBase
*/
protected appEntityService: InvoiceDetailService = new InvoiceDetailService;
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof InvoiceDetailInvoiceProGridViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof InvoiceDetailInvoiceProGridViewBase
*/
protected model: any = {
srfCaption: 'entities.invoicedetail.views.invoiceprogridview.caption',
srfTitle: 'entities.invoicedetail.views.invoiceprogridview.title',
srfSubTitle: 'entities.invoicedetail.views.invoiceprogridview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof InvoiceDetailInvoiceProGridViewBase
*/
protected containerModel: any = {
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_grid: { name: 'grid', type: 'GRID' },
view_searchform: { name: 'searchform', type: 'SEARCHFORM' },
};
/**
* 工具栏模型
*
* @type {*}
* @memberof InvoiceDetailInvoiceProGridView
*/
public toolBarModels: any = {
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: '' },
tbitem7: { name: 'tbitem7', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem8: { name: 'tbitem8', caption: '删除','isShowCaption':true,'isShowIcon':true, tooltip: '删除', iconcls: 'fa fa-remove', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'Remove', target: 'MULTIKEY' }, class: '' },
tbitem9: { name: 'tbitem9', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem13: { name: 'tbitem13', caption: '导出','isShowCaption':true,'isShowIcon':true, tooltip: '导出', iconcls: 'fa fa-file-excel-o', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'ExportExcel', target: '' }, MaxRowCount: 1000, class: '' },
tbitem10: { name: 'tbitem10', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem19: { name: 'tbitem19', caption: '过滤','isShowCaption':true,'isShowIcon':true, tooltip: '过滤', iconcls: 'fa fa-filter', icon: '', disabled: false, type: 'DEUIACTION', visabled: true, dataaccaction: '', uiaction: { tag: 'ToggleFilter', target: '' }, class: '' },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = '2bb0e34c7ae753e03404e4d96b17e90c';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof InvoiceDetailInvoiceProGridViewBase
*/
public engine: GridViewEngine = new GridViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof InvoiceDetailInvoiceProGridViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
opendata: (args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) => {
this.opendata(args,fullargs, params, $event, xData);
},
newdata: (args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) => {
this.newdata(args,fullargs, params, $event, xData);
},
grid: this.$refs.grid,
searchform: this.$refs.searchform,
keyPSDEField: 'invoicedetail',
majorPSDEField: 'invoicedetailname',
isLoadDefault: true,
});
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof InvoiceDetailInvoiceProGridViewBase
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'tbitem4')) {
this.toolbar_tbitem4_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem8')) {
this.toolbar_tbitem8_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem13')) {
this.toolbar_tbitem13_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem11')) {
this.toolbar_tbitem11_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem19')) {
this.toolbar_tbitem19_click(null, '', $event2);
}
}
/**
* grid 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof InvoiceDetailInvoiceProGridViewBase
*/
public grid_selectionchange($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'selectionchange', $event);
}
/**
* grid 部件 beforeload 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof InvoiceDetailInvoiceProGridViewBase
*/
public grid_beforeload($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'beforeload', $event);
}
/**
* grid 部件 rowdblclick 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof InvoiceDetailInvoiceProGridViewBase
*/
public grid_rowdblclick($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'rowdblclick', $event);
}
/**
* grid 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof InvoiceDetailInvoiceProGridViewBase
*/
public grid_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'remove', $event);
}
/**
* grid 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof InvoiceDetailInvoiceProGridViewBase
*/
public grid_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'load', $event);
}
/**
* searchform 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof InvoiceDetailInvoiceProGridViewBase
*/
public searchform_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'save', $event);
}
/**
* searchform 部件 search 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof InvoiceDetailInvoiceProGridViewBase
*/
public searchform_search($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'search', $event);
}
/**
* searchform 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof InvoiceDetailInvoiceProGridViewBase
*/
public searchform_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'load', $event);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem4_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.Edit(datas, contextJO,paramJO, $event, xData,this,"InvoiceDetail");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem8_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.Remove(datas, contextJO,paramJO, $event, xData,this,"InvoiceDetail");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem13_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.ExportExcel(datas, contextJO,paramJO, $event, xData,this,"InvoiceDetail");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem11_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.Print(datas, contextJO,paramJO, $event, xData,this,"InvoiceDetail");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem19_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.ToggleFilter(datas, contextJO,paramJO, $event, xData,this,"InvoiceDetail");
}
/**
* 打开新建数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof InvoiceDetailInvoiceProGridView
*/
public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) {
let localContext:any = null;
let localViewParam:any =null;
const data: any = {};
if(args[0].srfsourcekey){
data.srfsourcekey = args[0].srfsourcekey;
}
let tempContext = JSON.parse(JSON.stringify(this.context));
delete tempContext.invoicedetail;
if(args.length >0){
Object.assign(tempContext,args[0]);
}
let deResParameters: any[] = [];
if(tempContext.invoice && true){
deResParameters = [
{ pathName: 'invoices', parameterName: 'invoice' },
]
}
const parameters: any[] = [
{ pathName: 'invoicedetails', parameterName: 'invoicedetail' },
{ pathName: 'editview', parameterName: 'editview' },
];
const _this: any = this;
const openIndexViewTab = (data: any) => {
const _data: any = { w: (new Date().getTime()) };
Object.assign(_data, data);
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, _data);
this.$router.push(routePath);
}
openIndexViewTab(data);
}
/**
* 打开编辑数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof InvoiceDetailInvoiceProGridView
*/
public opendata(args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) {
let localContext:any = null;
let localViewParam:any =null;
const data: any = {};
let tempContext = JSON.parse(JSON.stringify(this.context));
if(args.length >0){
Object.assign(tempContext,args[0]);
}
let deResParameters: any[] = [];
if(tempContext.invoice && true){
deResParameters = [
{ pathName: 'invoices', parameterName: 'invoice' },
]
}
const parameters: any[] = [
{ pathName: 'invoicedetails', parameterName: 'invoicedetail' },
{ pathName: 'editview', parameterName: 'editview' },
];
const _this: any = this;
const openIndexViewTab = (data: any) => {
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, data);
this.$router.push(routePath);
}
openIndexViewTab(data);
}
/**
* 编辑
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof InvoiceDetailInvoiceProGridViewBase
*/
public Edit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
return;
}
const _this: any = this;
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
Object.assign(data, { invoicedetail: args[0].invoicedetail })
}
_this.opendata([{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
}
}
/**
* 删除
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof InvoiceDetailInvoiceProGridViewBase
*/
public Remove(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.remove instanceof Function)) {
return ;
}
xData.remove(args);
}
/**
* 导出
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof InvoiceDetailInvoiceProGridViewBase
*/
public ExportExcel(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.exportExcel instanceof Function) || !$event) {
return ;
}
xData.exportExcel($event.exportparms);
}
/**
* 打印
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof InvoiceDetailInvoiceProGridViewBase
*/
public Print(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let _this:any = this;
if (!xData || !(xData.print instanceof Function) || !$event) {
return ;
}
xData.print();
}
/**
* 过滤
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof InvoiceDetailInvoiceProGridViewBase
*/
public ToggleFilter(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (_this.hasOwnProperty('isExpandSearchForm')) {
_this.isExpandSearchForm = !_this.isExpandSearchForm;
}
}
}
\ No newline at end of file
<studio-view-style2 viewName="invoicedetailinvoiceprogridview" viewTitle="发票产品表格视图" class='degridview invoice-detail-invoice-pro-grid-view'>
<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="isSingleSelect"
: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="./invoice-detail-invoice-pro-grid-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { InvoiceDetailInvoiceProGridViewBase } from './invoice-detail-invoice-pro-grid-view-base';
import view_grid from '@widgets/invoice-detail/invoice-product-grid-grid/invoice-product-grid-grid.vue';
import view_searchform from '@widgets/invoice-detail/default-searchform/default-searchform.vue';
/**
* 发票产品表格视图视图
*
* @export
* @class InvoiceDetailInvoiceProGridView
* @extends {InvoiceDetailInvoiceProGridViewBase}
*/
@Component({
components: {
view_grid,
view_searchform,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$store.commit('addCurPageViewtag', { route: to, viewtag: vm.viewtag });
});
}
})
@VueLifeCycleProcessing()
export default class InvoiceDetailInvoiceProGridView extends InvoiceDetailInvoiceProGridViewBase { }
</script>
......@@ -471,16 +471,28 @@ export class InvoiceGridViewBase extends GridViewBase {
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'invoices', parameterName: 'invoice' },
{ pathName: 'editview', parameterName: 'editview' },
];
const _this: any = this;
const openIndexViewTab = (data: any) => {
const _data: any = { w: (new Date().getTime()) };
Object.assign(_data, data);
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, _data);
this.$router.push(routePath);
const openDrawer = (view: any, data: any) => {
let container: Subject<any> = this.$appdrawer.openDrawer(view, tempContext, data);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
if (!xData || !(xData.refresh instanceof Function)) {
return;
}
xData.refresh(result.datas);
});
}
openIndexViewTab(data);
const view: any = {
viewname: 'invoice-quick-create-view',
height: 0,
width: 0,
title: this.$t('entities.invoice.views.quickcreateview.title'),
placement: 'DRAWER_RIGHT',
};
openDrawer(view, data);
}
......@@ -505,7 +517,7 @@ export class InvoiceGridViewBase extends GridViewBase {
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'invoices', parameterName: 'invoice' },
{ pathName: 'editview', parameterName: 'editview' },
{ pathName: 'infoview', parameterName: 'infoview' },
];
const _this: any = this;
const openIndexViewTab = (data: any) => {
......
import { Subject } from 'rxjs';
import { EditViewBase } from '@/studio-core';
import InvoiceService from '@/service/invoice/invoice-service';
import EditViewEngine from '@engine/view/edit-view-engine';
/**
* 发票编辑视图视图基类
*
* @export
* @class InvoiceInfo_InvoiceViewBase
* @extends {EditViewBase}
*/
export class InvoiceInfo_InvoiceViewBase extends EditViewBase {
/**
* 实体服务对象
*
* @type {InvoiceService}
* @memberof InvoiceInfo_InvoiceViewBase
*/
protected appEntityService: InvoiceService = new InvoiceService;
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof InvoiceInfo_InvoiceViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof InvoiceInfo_InvoiceViewBase
*/
protected model: any = {
srfCaption: 'entities.invoice.views.info_invoiceview.caption',
srfTitle: 'entities.invoice.views.info_invoiceview.title',
srfSubTitle: 'entities.invoice.views.info_invoiceview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof InvoiceInfo_InvoiceViewBase
*/
protected containerModel: any = {
view_form: { name: 'form', type: 'FORM' },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = 'e167550b61bf1bd019a8e522b8fccc21';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof InvoiceInfo_InvoiceViewBase
*/
public engine: EditViewEngine = new EditViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof InvoiceInfo_InvoiceViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
form: this.$refs.form,
p2k: '0',
keyPSDEField: 'invoice',
majorPSDEField: 'invoicename',
isLoadDefault: true,
});
}
/**
* form 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof InvoiceInfo_InvoiceViewBase
*/
public form_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'save', $event);
}
/**
* form 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof InvoiceInfo_InvoiceViewBase
*/
public form_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'remove', $event);
}
/**
* form 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof InvoiceInfo_InvoiceViewBase
*/
public form_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'load', $event);
}
}
\ No newline at end of file
<studio-view-style2 viewName="invoiceinfo_invoiceview" viewTitle="发票编辑视图" class='deeditview invoice-info-invoice-view'>
<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="./invoice-info-invoice-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { InvoiceInfo_InvoiceViewBase } from './invoice-info-invoice-view-base';
import view_form from '@widgets/invoice/info-form/info-form.vue';
/**
* 发票编辑视图视图
*
* @export
* @class InvoiceInfo_InvoiceView
* @extends {InvoiceInfo_InvoiceViewBase}
*/
@Component({
components: {
view_form,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$store.commit('addCurPageViewtag', { route: to, viewtag: vm.viewtag });
});
}
})
@VueLifeCycleProcessing()
export default class InvoiceInfo_InvoiceView extends InvoiceInfo_InvoiceViewBase { }
</script>
import { Subject } from 'rxjs';
import { TabExpViewBase } from '@/studio-core';
import InvoiceService from '@/service/invoice/invoice-service';
import TabExpViewEngine from '@engine/view/tab-exp-view-engine';
/**
* 发票信息视图基类
*
* @export
* @class InvoiceInfoViewBase
* @extends {TabExpViewBase}
*/
export class InvoiceInfoViewBase extends TabExpViewBase {
/**
* 实体服务对象
*
* @type {InvoiceService}
* @memberof InvoiceInfoViewBase
*/
protected appEntityService: InvoiceService = new InvoiceService;
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof InvoiceInfoViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof InvoiceInfoViewBase
*/
protected model: any = {
srfCaption: 'entities.invoice.views.infoview.caption',
srfTitle: 'entities.invoice.views.infoview.title',
srfSubTitle: 'entities.invoice.views.infoview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof InvoiceInfoViewBase
*/
protected containerModel: any = {
view_tabexppanel: { name: 'tabexppanel', type: 'TABEXPPANEL' },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = 'ab653866ca40a1cefde21241ac5ba44c';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof InvoiceInfoViewBase
*/
public engine: TabExpViewEngine = new TabExpViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof InvoiceInfoViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
keyPSDEField: 'invoice',
majorPSDEField: 'invoicename',
isLoadDefault: true,
});
}
/**
* 加载模型
*
* @memberof InvoiceInfoViewBase
*/
public async loadModel(): Promise<void> {
if(this.context.invoice){
this.appEntityService.getDataInfo(JSON.parse(JSON.stringify(this.context)),{},false).then((response:any) =>{
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
if (_data.invoicename) {
Object.assign(this.model, { dataInfo: _data.invoicename });
if(this.$tabPageExp){
let _this:any = this;
this.$tabPageExp.setCurPageCaption(_this.$t(this.model.srfTitle), _this.$t(this.model.srfTitle), _this.model.dataInfo);
}
if(this.$route){
this.$route.meta.info = this.model.dataInfo;
}
Object.assign(this.model, { srfTitle: `${this.$t(this.model.srfTitle)} - ${this.model.dataInfo}` });
}
})
}
}
}
\ No newline at end of file
<studio-view-style2 viewName="invoiceinfoview" viewTitle="发票信息" class='detabexpview invoice-info-view'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template>
<view_tabexppanel
:viewState="viewState"
:viewparams="viewparams"
:context="context"
name="tabexppanel"
ref='tabexppanel'
@closeview="closeView($event)">
</view_tabexppanel>
</studio-view-style2>
\ No newline at end of file
<template src="./invoice-info-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { InvoiceInfoViewBase } from './invoice-info-view-base';
import view_tabexppanel from '@widgets/invoice/info-viewtabexppanel-tabexppanel/info-viewtabexppanel-tabexppanel.vue';
/**
* 发票信息视图
*
* @export
* @class InvoiceInfoView
* @extends {InvoiceInfoViewBase}
*/
@Component({
components: {
view_tabexppanel,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$store.commit('addCurPageViewtag', { route: to, viewtag: vm.viewtag });
});
}
})
@VueLifeCycleProcessing()
export default class InvoiceInfoView extends InvoiceInfoViewBase { }
</script>
import { Subject } from 'rxjs';
import { OptionViewBase } from '@/studio-core';
import InvoiceService from '@/service/invoice/invoice-service';
import OptionViewEngine from '@engine/view/option-view-engine';
/**
* 快速新建视图基类
*
* @export
* @class InvoiceQuickCreateViewBase
* @extends {OptionViewBase}
*/
export class InvoiceQuickCreateViewBase extends OptionViewBase {
/**
* 实体服务对象
*
* @type {InvoiceService}
* @memberof InvoiceQuickCreateViewBase
*/
protected appEntityService: InvoiceService = new InvoiceService;
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof InvoiceQuickCreateViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof InvoiceQuickCreateViewBase
*/
protected model: any = {
srfCaption: 'entities.invoice.views.quickcreateview.caption',
srfTitle: 'entities.invoice.views.quickcreateview.title',
srfSubTitle: 'entities.invoice.views.quickcreateview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof InvoiceQuickCreateViewBase
*/
protected containerModel: any = {
view_form: { name: 'form', type: 'FORM' },
view_okbtn: { name: 'okbtn', type: 'button', text: '确定', disabled: true },
view_cancelbtn: { name: 'cancelbtn', type: 'button', text: '取消', disabled: false },
view_leftbtn: { name: 'leftbtn', type: 'button', text: '左移', disabled: true },
view_rightbtn: { name: 'rightbtn', type: 'button', text: '右移', disabled: true },
view_allleftbtn: { name: 'allleftbtn', type: 'button', text: '全部左移', disabled: true },
view_allrightbtn: { name: 'allrightbtn', type: 'button', text: '全部右移', disabled: true },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = '0fc09bf520af62b4d89aef845fc72636';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof InvoiceQuickCreateViewBase
*/
public engine: OptionViewEngine = new OptionViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof InvoiceQuickCreateViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
form: this.$refs.form,
p2k: '0',
keyPSDEField: 'invoice',
majorPSDEField: 'invoicename',
isLoadDefault: true,
});
}
/**
* form 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof InvoiceQuickCreateViewBase
*/
public form_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'save', $event);
}
/**
* form 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof InvoiceQuickCreateViewBase
*/
public form_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'remove', $event);
}
/**
* form 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof InvoiceQuickCreateViewBase
*/
public form_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'load', $event);
}
}
\ No newline at end of file
<studio-view-style2 viewName="invoicequickcreateview" viewTitle="快速新建" class='deoptview invoice-quick-create-view'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</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>
<template slot="footer">
<div class="option-view-footer-actions">
<i-button type='primary' @click="onClickOk.apply(_self, arguments)">{{ containerModel.view_okbtn.text }}</i-button>
&nbsp;&nbsp;
<i-button @click="onClickCancel.apply(_self, arguments)">{{ containerModel.view_cancelbtn.text }}</i-button>
</div>
</template>
</studio-view-style2>
\ No newline at end of file
<template src="./invoice-quick-create-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { InvoiceQuickCreateViewBase } from './invoice-quick-create-view-base';
import view_form from '@widgets/invoice/quick-create-form/quick-create-form.vue';
/**
* 快速新建视图
*
* @export
* @class InvoiceQuickCreateView
* @extends {InvoiceQuickCreateViewBase}
*/
@Component({
components: {
view_form,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$store.commit('addCurPageViewtag', { route: to, viewtag: vm.viewtag });
});
}
})
@VueLifeCycleProcessing()
export default class InvoiceQuickCreateView extends InvoiceQuickCreateViewBase { }
</script>
import { Subject } from 'rxjs';
import { DashboardViewBase } from '@/studio-core';
import InvoiceService from '@/service/invoice/invoice-service';
import PortalViewEngine from '@engine/view/portal-view-engine';
/**
* 发票数据看板视图视图基类
*
* @export
* @class InvoiceSummaryViewBase
* @extends {DashboardViewBase}
*/
export class InvoiceSummaryViewBase extends DashboardViewBase {
/**
* 实体服务对象
*
* @type {InvoiceService}
* @memberof InvoiceSummaryViewBase
*/
protected appEntityService: InvoiceService = new InvoiceService;
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof InvoiceSummaryViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof InvoiceSummaryViewBase
*/
protected model: any = {
srfCaption: 'entities.invoice.views.summaryview.caption',
srfTitle: 'entities.invoice.views.summaryview.title',
srfSubTitle: 'entities.invoice.views.summaryview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof InvoiceSummaryViewBase
*/
protected containerModel: any = {
view_dashboard: { name: 'dashboard', type: 'DASHBOARD' },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = '77ef5d53fe0cadbe03c9d2f9d25c804b';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof InvoiceSummaryViewBase
*/
public engine: PortalViewEngine = new PortalViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof InvoiceSummaryViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
dashboard: this.$refs.dashboard,
keyPSDEField: 'invoice',
majorPSDEField: 'invoicename',
isLoadDefault: true,
});
}
/**
* dashboard 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof InvoiceSummaryViewBase
*/
public dashboard_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('dashboard', 'load', $event);
}
}
\ No newline at end of file
<studio-view-style2 viewName="invoicesummaryview" viewTitle="发票数据看板视图" class='deportalview invoice-summary-view'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template>
<view_dashboard
:viewState="viewState"
:viewparams="viewparams"
:context="JSON.parse(JSON.stringify(context))"
:isEnableCustomized = "false"
name="dashboard"
ref='dashboard'
@load="dashboard_load($event)"
@closeview="closeView($event)">
</view_dashboard>
</studio-view-style2>
\ No newline at end of file
<template src="./invoice-summary-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { InvoiceSummaryViewBase } from './invoice-summary-view-base';
import view_dashboard from '@widgets/invoice/board-dashboard/board-dashboard.vue';
/**
* 发票数据看板视图视图
*
* @export
* @class InvoiceSummaryView
* @extends {InvoiceSummaryViewBase}
*/
@Component({
components: {
view_dashboard,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$store.commit('addCurPageViewtag', { route: to, viewtag: vm.viewtag });
});
}
})
@VueLifeCycleProcessing()
export default class InvoiceSummaryView extends InvoiceSummaryViewBase { }
</script>
import { Subject } from 'rxjs';
import { PickupGridViewBase } from '@/studio-core';
import SalesOrderService from '@/service/sales-order/sales-order-service';
import PickupGridViewEngine from '@engine/view/pickup-grid-view-engine';
/**
* 订单选择表格视图视图基类
*
* @export
* @class SalesOrderPickupGridViewBase
* @extends {PickupGridViewBase}
*/
export class SalesOrderPickupGridViewBase extends PickupGridViewBase {
/**
* 实体服务对象
*
* @type {SalesOrderService}
* @memberof SalesOrderPickupGridViewBase
*/
protected appEntityService: SalesOrderService = new SalesOrderService;
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof SalesOrderPickupGridViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof SalesOrderPickupGridViewBase
*/
protected model: any = {
srfCaption: 'entities.salesorder.views.pickupgridview.caption',
srfTitle: 'entities.salesorder.views.pickupgridview.title',
srfSubTitle: 'entities.salesorder.views.pickupgridview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof SalesOrderPickupGridViewBase
*/
protected containerModel: any = {
view_grid: { name: 'grid', type: 'GRID' },
view_searchform: { name: 'searchform', type: 'SEARCHFORM' },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = 'c78a9fa4a75c9a957de0bacd4c0c911c';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof SalesOrderPickupGridViewBase
*/
public engine: PickupGridViewEngine = new PickupGridViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof SalesOrderPickupGridViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
grid: this.$refs.grid,
searchform: this.$refs.searchform,
keyPSDEField: 'salesorder',
majorPSDEField: 'salesordername',
isLoadDefault: true,
});
}
/**
* grid 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SalesOrderPickupGridViewBase
*/
public grid_selectionchange($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'selectionchange', $event);
}
/**
* grid 部件 beforeload 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SalesOrderPickupGridViewBase
*/
public grid_beforeload($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'beforeload', $event);
}
/**
* grid 部件 rowdblclick 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SalesOrderPickupGridViewBase
*/
public grid_rowdblclick($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'rowdblclick', $event);
}
/**
* grid 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SalesOrderPickupGridViewBase
*/
public grid_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('grid', 'load', $event);
}
/**
* searchform 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SalesOrderPickupGridViewBase
*/
public searchform_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'save', $event);
}
/**
* searchform 部件 search 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SalesOrderPickupGridViewBase
*/
public searchform_search($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'search', $event);
}
/**
* searchform 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SalesOrderPickupGridViewBase
*/
public searchform_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('searchform', 'load', $event);
}
/**
* 是否展开搜索表单
*
* @protected
* @type {boolean}
* @memberof SalesOrderPickupGridViewBase
*/
protected isExpandSearchForm: boolean = true;
}
\ No newline at end of file
<studio-view-style2 viewName="salesorderpickupgridview" viewTitle="订单选择表格视图" class='depickupgridview sales-order-pickup-grid-view'>
<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="isSingleSelect"
:selectedData="selectedData"
:showBusyIndicator="true"
updateAction=""
removeAction="Remove"
loaddraftAction=""
loadAction=""
createAction=""
fetchAction="FetchDefault"
name="grid"
ref='grid'
@selectionchange="grid_selectionchange($event)"
@beforeload="grid_beforeload($event)"
@rowdblclick="grid_rowdblclick($event)"
@load="grid_load($event)"
@closeview="closeView($event)">
</view_grid>
</studio-view-style2>
\ No newline at end of file
<template src="./sales-order-pickup-grid-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { SalesOrderPickupGridViewBase } from './sales-order-pickup-grid-view-base';
import view_grid from '@widgets/sales-order/main-grid/main-grid.vue';
import view_searchform from '@widgets/sales-order/default-searchform/default-searchform.vue';
/**
* 订单选择表格视图视图
*
* @export
* @class SalesOrderPickupGridView
* @extends {SalesOrderPickupGridViewBase}
*/
@Component({
components: {
view_grid,
view_searchform,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$store.commit('addCurPageViewtag', { route: to, viewtag: vm.viewtag });
});
}
})
@VueLifeCycleProcessing()
export default class SalesOrderPickupGridView extends SalesOrderPickupGridViewBase { }
</script>
import { Subject } from 'rxjs';
import { PickupViewBase } from '@/studio-core';
import SalesOrderService from '@/service/sales-order/sales-order-service';
import PickupViewEngine from '@engine/view/pickup-view-engine';
/**
* 订单数据选择视图视图基类
*
* @export
* @class SalesOrderPickupViewBase
* @extends {PickupViewBase}
*/
export class SalesOrderPickupViewBase extends PickupViewBase {
/**
* 实体服务对象
*
* @type {SalesOrderService}
* @memberof SalesOrderPickupViewBase
*/
protected appEntityService: SalesOrderService = new SalesOrderService;
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof SalesOrderPickupViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof SalesOrderPickupViewBase
*/
protected model: any = {
srfCaption: 'entities.salesorder.views.pickupview.caption',
srfTitle: 'entities.salesorder.views.pickupview.title',
srfSubTitle: 'entities.salesorder.views.pickupview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof SalesOrderPickupViewBase
*/
protected containerModel: any = {
view_pickupviewpanel: { name: 'pickupviewpanel', type: 'PICKUPVIEWPANEL' },
view_okbtn: { name: 'okbtn', type: 'button', text: '确定', disabled: true },
view_cancelbtn: { name: 'cancelbtn', type: 'button', text: '取消', disabled: false },
view_leftbtn: { name: 'leftbtn', type: 'button', text: '左移', disabled: true },
view_rightbtn: { name: 'rightbtn', type: 'button', text: '右移', disabled: true },
view_allleftbtn: { name: 'allleftbtn', type: 'button', text: '全部左移', disabled: true },
view_allrightbtn: { name: 'allrightbtn', type: 'button', text: '全部右移', disabled: true },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = 'f6f91153f3caa976cf7f552636f7e012';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof SalesOrderPickupViewBase
*/
public engine: PickupViewEngine = new PickupViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof SalesOrderPickupViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
pickupviewpanel: this.$refs.pickupviewpanel,
keyPSDEField: 'salesorder',
majorPSDEField: 'salesordername',
isLoadDefault: true,
});
}
/**
* pickupviewpanel 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SalesOrderPickupViewBase
*/
public pickupviewpanel_selectionchange($event: any, $event2?: any): void {
this.engine.onCtrlEvent('pickupviewpanel', 'selectionchange', $event);
}
/**
* pickupviewpanel 部件 activated 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SalesOrderPickupViewBase
*/
public pickupviewpanel_activated($event: any, $event2?: any): void {
this.engine.onCtrlEvent('pickupviewpanel', 'activated', $event);
}
/**
* pickupviewpanel 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SalesOrderPickupViewBase
*/
public pickupviewpanel_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('pickupviewpanel', 'load', $event);
}
}
\ No newline at end of file
<studio-view-style2 viewName="salesorderpickupview" viewTitle="订单数据选择视图" class='depickupview sales-order-pickup-view'>
<div class="content-container pickup-view">
<view_pickupviewpanel
:viewState="viewState"
:viewparams="JSON.parse(JSON.stringify(viewparams))"
:context="JSON.parse(JSON.stringify(context))"
:isSingleSelect="isSingleSelect"
:selectedData="selectedData"
:isShowButton="isShowButton"
name="pickupviewpanel"
ref='pickupviewpanel'
@selectionchange="pickupviewpanel_selectionchange($event)"
@activated="pickupviewpanel_activated($event)"
@load="pickupviewpanel_load($event)"
@closeview="closeView($event)">
</view_pickupviewpanel>
</div>
<template slot="footer">
<div v-if="isShowButton" :style="{ textAlign: 'right' }">
<i-button type="primary" :disabled="this.viewSelections.length > 0 ? false : true" @click="onClickOk.apply(_self, arguments)">{{this.containerModel.view_okbtn.text}}</i-button>
&nbsp;&nbsp;
<i-button @click="onClickCancel.apply(_self, arguments)">{{this.containerModel.view_cancelbtn.text}}</i-button>
</div>
</template>
</studio-view-style2>
\ No newline at end of file
<template src="./sales-order-pickup-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { SalesOrderPickupViewBase } from './sales-order-pickup-view-base';
import view_pickupviewpanel from '@widgets/sales-order/pickup-viewpickupviewpanel-pickupviewpanel/pickup-viewpickupviewpanel-pickupviewpanel.vue';
/**
* 订单数据选择视图视图
*
* @export
* @class SalesOrderPickupView
* @extends {SalesOrderPickupViewBase}
*/
@Component({
components: {
view_pickupviewpanel,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$store.commit('addCurPageViewtag', { route: to, viewtag: vm.viewtag });
});
}
})
@VueLifeCycleProcessing()
export default class SalesOrderPickupView extends SalesOrderPickupViewBase { }
</script>
......@@ -2,6 +2,7 @@ export const PageComponents = {
install(Vue: any, opt: any) {
Vue.component('account-gradation', () => import('@pages/base/account-gradation/account-gradation.vue'));
Vue.component('account-quick-create', () => import('@pages/base/account-quick-create/account-quick-create.vue'));
Vue.component('invoice-info-invoice-view', () => import('@pages/finance/invoice-info-invoice-view/invoice-info-invoice-view.vue'));
Vue.component('list-account-by-list', () => import('@pages/marketing/list-account-by-list/list-account-by-list.vue'));
Vue.component('competitor-option-view', () => import('@pages/sales/competitor-option-view/competitor-option-view.vue'));
Vue.component('campaign-response-by-parent-key', () => import('@pages/marketing/campaign-response-by-parent-key/campaign-response-by-parent-key.vue'));
......@@ -44,6 +45,7 @@ export const PageComponents = {
Vue.component('contact-info-abstract', () => import('@pages/base/contact-info-abstract/contact-info-abstract.vue'));
Vue.component('opportunity-info-abstract', () => import('@pages/sales/opportunity-info-abstract/opportunity-info-abstract.vue'));
Vue.component('list-contact-edit-view', () => import('@pages/marketing/list-contact-edit-view/list-contact-edit-view.vue'));
Vue.component('invoice-detail-edit-view', () => import('@pages/finance/invoice-detail-edit-view/invoice-detail-edit-view.vue'));
Vue.component('campaign-grid-view', () => import('@pages/marketing/campaign-grid-view/campaign-grid-view.vue'));
Vue.component('list-lead-by-list', () => import('@pages/marketing/list-lead-by-list/list-lead-by-list.vue'));
Vue.component('lead-info-company', () => import('@pages/sales/lead-info-company/lead-info-company.vue'));
......@@ -58,6 +60,7 @@ export const PageComponents = {
Vue.component('sales-order-quick-create-view', () => import('@pages/sales/sales-order-quick-create-view/sales-order-quick-create-view.vue'));
Vue.component('lead-quick-create', () => import('@pages/sales/lead-quick-create/lead-quick-create.vue'));
Vue.component('price-level-pickup-view', () => import('@pages/product/price-level-pickup-view/price-level-pickup-view.vue'));
Vue.component('invoice-summary-view', () => import('@pages/finance/invoice-summary-view/invoice-summary-view.vue'));
Vue.component('opportunity-edit-view', () => import('@pages/sales/opportunity-edit-view/opportunity-edit-view.vue'));
Vue.component('lead-info-contact', () => import('@pages/sales/lead-info-contact/lead-info-contact.vue'));
Vue.component('competitor-grid-view', () => import('@pages/sales/competitor-grid-view/competitor-grid-view.vue'));
......@@ -77,7 +80,6 @@ export const PageComponents = {
Vue.component('sales-literature-grid-view', () => import('@pages/sales/sales-literature-grid-view/sales-literature-grid-view.vue'));
Vue.component('product-edit-view', () => import('@pages/product/product-edit-view/product-edit-view.vue'));
Vue.component('quote-grid-view', () => import('@pages/sales/quote-grid-view/quote-grid-view.vue'));
Vue.component('invoice-edit-view', () => import('@pages/finance/invoice-edit-view/invoice-edit-view.vue'));
Vue.component('quote-option-view', () => import('@pages/sales/quote-option-view/quote-option-view.vue'));
Vue.component('campaign-edit-view', () => import('@pages/marketing/campaign-edit-view/campaign-edit-view.vue'));
Vue.component('opportunity-summary', () => import('@pages/sales/opportunity-summary/opportunity-summary.vue'));
......@@ -88,6 +90,7 @@ export const PageComponents = {
Vue.component('quote-summary', () => import('@pages/sales/quote-summary/quote-summary.vue'));
Vue.component('contact-pickup-grid-view', () => import('@pages/base/contact-pickup-grid-view/contact-pickup-grid-view.vue'));
Vue.component('list-account-edit-view', () => import('@pages/marketing/list-account-edit-view/list-account-edit-view.vue'));
Vue.component('invoice-detail-invoice-pro-grid-view', () => import('@pages/finance/invoice-detail-invoice-pro-grid-view/invoice-detail-invoice-pro-grid-view.vue'));
Vue.component('opportunity-info', () => import('@pages/sales/opportunity-info/opportunity-info.vue'));
Vue.component('transaction-currency-pickup-grid-view', () => import('@pages/base/transaction-currency-pickup-grid-view/transaction-currency-pickup-grid-view.vue'));
Vue.component('service-appointment-edit-view', () => import('@pages/service/service-appointment-edit-view/service-appointment-edit-view.vue'));
......@@ -98,18 +101,21 @@ export const PageComponents = {
Vue.component('uom-pickup-grid-view', () => import('@pages/base/uom-pickup-grid-view/uom-pickup-grid-view.vue'));
Vue.component('price-level-pickup-grid-view', () => import('@pages/product/price-level-pickup-grid-view/price-level-pickup-grid-view.vue'));
Vue.component('quote-opp-qua-grid-view', () => import('@pages/sales/quote-opp-qua-grid-view/quote-opp-qua-grid-view.vue'));
Vue.component('invoice-info-view', () => import('@pages/finance/invoice-info-view/invoice-info-view.vue'));
Vue.component('contact-by-account', () => import('@pages/base/contact-by-account/contact-by-account.vue'));
Vue.component('opportunity-list-exp-view', () => import('@pages/sales/opportunity-list-exp-view/opportunity-list-exp-view.vue'));
Vue.component('opportunity-opp-pro-dashboard-view', () => import('@pages/sales/opportunity-opp-pro-dashboard-view/opportunity-opp-pro-dashboard-view.vue'));
Vue.component('sales-literature-edit-view', () => import('@pages/sales/sales-literature-edit-view/sales-literature-edit-view.vue'));
Vue.component('ibiz-list-summary', () => import('@pages/marketing/ibiz-list-summary/ibiz-list-summary.vue'));
Vue.component('lead-dashboard-view', () => import('@pages/sales/lead-dashboard-view/lead-dashboard-view.vue'));
Vue.component('sales-order-pickup-grid-view', () => import('@pages/sales/sales-order-pickup-grid-view/sales-order-pickup-grid-view.vue'));
Vue.component('list-account-quick-create-by-list', () => import('@pages/marketing/list-account-quick-create-by-list/list-account-quick-create-by-list.vue'));
Vue.component('campaign-list-edit-view', () => import('@pages/marketing/campaign-list-edit-view/campaign-list-edit-view.vue'));
Vue.component('competitor-info', () => import('@pages/sales/competitor-info/competitor-info.vue'));
Vue.component('account-pickup-grid-view', () => import('@pages/base/account-pickup-grid-view/account-pickup-grid-view.vue'));
Vue.component('lead-info', () => import('@pages/sales/lead-info/lead-info.vue'));
Vue.component('product-pickup-grid-view', () => import('@pages/product/product-pickup-grid-view/product-pickup-grid-view.vue'));
Vue.component('sales-order-pickup-view', () => import('@pages/sales/sales-order-pickup-view/sales-order-pickup-view.vue'));
Vue.component('list-lead-quick-create-by-list', () => import('@pages/marketing/list-lead-quick-create-by-list/list-lead-quick-create-by-list.vue'));
Vue.component('account-info', () => import('@pages/base/account-info/account-info.vue'));
Vue.component('lead-info-detail', () => import('@pages/sales/lead-info-detail/lead-info-detail.vue'));
......
......@@ -63,6 +63,20 @@ const router = new Router({
},
component: () => import('@pages/base/account-quick-create/account-quick-create.vue'),
},
{
path: 'invoices/:invoice?/info_invoiceview/:info_invoiceview?',
meta: {
caption: 'entities.invoice.views.info_invoiceview.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'invoices', parameterName: 'invoice' },
{ pathName: 'info_invoiceview', parameterName: 'info_invoiceview' },
],
requireAuth: true,
},
component: () => import('@pages/finance/invoice-info-invoice-view/invoice-info-invoice-view.vue'),
},
{
path: 'ibizlists/:ibizlist?/listaccounts/:listaccount?/bylist/:bylist?',
meta: {
......@@ -1255,6 +1269,35 @@ const router = new Router({
},
component: () => import('@pages/marketing/list-contact-edit-view/list-contact-edit-view.vue'),
},
{
path: 'invoices/:invoice?/invoicedetails/:invoicedetail?/editview/:editview?',
meta: {
caption: 'entities.invoicedetail.views.editview.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'invoices', parameterName: 'invoice' },
{ pathName: 'invoicedetails', parameterName: 'invoicedetail' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/finance/invoice-detail-edit-view/invoice-detail-edit-view.vue'),
},
{
path: 'invoicedetails/:invoicedetail?/editview/:editview?',
meta: {
caption: 'entities.invoicedetail.views.editview.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'invoicedetails', parameterName: 'invoicedetail' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/finance/invoice-detail-edit-view/invoice-detail-edit-view.vue'),
},
{
path: 'campaigns/:campaign?/gridview/:gridview?',
meta: {
......@@ -1727,6 +1770,20 @@ const router = new Router({
},
component: () => import('@pages/product/price-level-pickup-view/price-level-pickup-view.vue'),
},
{
path: 'invoices/:invoice?/summaryview/:summaryview?',
meta: {
caption: 'entities.invoice.views.summaryview.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'invoices', parameterName: 'invoice' },
{ pathName: 'summaryview', parameterName: 'summaryview' },
],
requireAuth: true,
},
component: () => import('@pages/finance/invoice-summary-view/invoice-summary-view.vue'),
},
{
path: 'accounts/:account?/contacts/:contact?/opportunities/:opportunity?/editview/:editview?',
meta: {
......@@ -2397,20 +2454,6 @@ const router = new Router({
},
component: () => import('@pages/sales/quote-grid-view/quote-grid-view.vue'),
},
{
path: 'invoices/:invoice?/editview/:editview?',
meta: {
caption: 'entities.invoice.views.editview.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'invoices', parameterName: 'invoice' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/finance/invoice-edit-view/invoice-edit-view.vue'),
},
{
path: 'accounts/:account?/contacts/:contact?/opportunities/:opportunity?/quotes/:quote?/optionview/:optionview?',
meta: {
......@@ -2813,6 +2856,35 @@ const router = new Router({
},
component: () => import('@pages/marketing/list-account-edit-view/list-account-edit-view.vue'),
},
{
path: 'invoices/:invoice?/invoicedetails/:invoicedetail?/invoiceprogridview/:invoiceprogridview?',
meta: {
caption: 'entities.invoicedetail.views.invoiceprogridview.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'invoices', parameterName: 'invoice' },
{ pathName: 'invoicedetails', parameterName: 'invoicedetail' },
{ pathName: 'invoiceprogridview', parameterName: 'invoiceprogridview' },
],
requireAuth: true,
},
component: () => import('@pages/finance/invoice-detail-invoice-pro-grid-view/invoice-detail-invoice-pro-grid-view.vue'),
},
{
path: 'invoicedetails/:invoicedetail?/invoiceprogridview/:invoiceprogridview?',
meta: {
caption: 'entities.invoicedetail.views.invoiceprogridview.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'invoicedetails', parameterName: 'invoicedetail' },
{ pathName: 'invoiceprogridview', parameterName: 'invoiceprogridview' },
],
requireAuth: true,
},
component: () => import('@pages/finance/invoice-detail-invoice-pro-grid-view/invoice-detail-invoice-pro-grid-view.vue'),
},
{
path: 'accounts/:account?/contacts/:contact?/opportunities/:opportunity?/info/:info?',
meta: {
......@@ -3047,6 +3119,20 @@ const router = new Router({
},
component: () => import('@pages/sales/quote-opp-qua-grid-view/quote-opp-qua-grid-view.vue'),
},
{
path: 'invoices/:invoice?/infoview/:infoview?',
meta: {
caption: 'entities.invoice.views.infoview.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'invoices', parameterName: 'invoice' },
{ pathName: 'infoview', parameterName: 'infoview' },
],
requireAuth: true,
},
component: () => import('@pages/finance/invoice-info-view/invoice-info-view.vue'),
},
{
path: 'accounts/:account?/contacts/:contact?/byaccount/:byaccount?',
meta: {
......@@ -3299,6 +3385,20 @@ const router = new Router({
},
component: () => import('@pages/sales/opportunity-con-opp-grid-view/opportunity-con-opp-grid-view.vue'),
},
{
path: 'salesorders/:salesorder?/pickupgridview/:pickupgridview?',
meta: {
caption: 'entities.salesorder.views.pickupgridview.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'salesorders', parameterName: 'salesorder' },
{ pathName: 'pickupgridview', parameterName: 'pickupgridview' },
],
requireAuth: true,
},
component: () => import('@pages/sales/sales-order-pickup-grid-view/sales-order-pickup-grid-view.vue'),
},
{
path: 'campaignresponses/:campaignresponse?/quickcreate/:quickcreate?',
meta: {
......@@ -3503,6 +3603,20 @@ const router = new Router({
},
component: () => import('@pages/product/product-pickup-grid-view/product-pickup-grid-view.vue'),
},
{
path: 'salesorders/:salesorder?/pickupview/:pickupview?',
meta: {
caption: 'entities.salesorder.views.pickupview.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'salesorders', parameterName: 'salesorder' },
{ pathName: 'pickupview', parameterName: 'pickupview' },
],
requireAuth: true,
},
component: () => import('@pages/sales/sales-order-pickup-view/sales-order-pickup-view.vue'),
},
{
path: 'accounts/:account?/contacts/:contact?/leads/:lead?/listleads/:listlead?/quickcreatebylist/:quickcreatebylist?',
meta: {
......
......@@ -27,15 +27,6 @@ export const viewstate: any = {
'a5213905238dbc5d8e1a505029105cc9',
],
},
{
viewtag: '01c28e25ad9d42977cb91ee890731b64',
viewmodule: 'Finance',
viewname: 'InvoiceEditView',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{
viewtag: '0326a502bb574cddc41da4323786dcb5',
viewmodule: 'Base',
......@@ -116,6 +107,17 @@ export const viewstate: any = {
refviews: [
],
},
{
viewtag: '0fc09bf520af62b4d89aef845fc72636',
viewmodule: 'Finance',
viewname: 'InvoiceQuickCreateView',
viewaction: '',
viewdatachange: false,
refviews: [
'8b806fb12589b2fc17d1bb90f4b5422e',
'da3f8c1f20f440f3df54d6c13a8de586',
],
},
{
viewtag: '10c5d33db64f3a1bda18c7571a679438',
viewmodule: 'Marketing',
......@@ -262,6 +264,16 @@ export const viewstate: any = {
refviews: [
],
},
{
viewtag: '2bb0e34c7ae753e03404e4d96b17e90c',
viewmodule: 'Finance',
viewname: 'InvoiceDetailInvoiceProGridView',
viewaction: '',
viewdatachange: false,
refviews: [
'485d1a17354fe57fd79dde512adb715b',
],
},
{
viewtag: '2c6be792e84450585986e22f75dffa52',
viewmodule: 'Marketing',
......@@ -467,6 +479,17 @@ export const viewstate: any = {
'a1b44c891ef0bbc073c82693d8489de6',
],
},
{
viewtag: '485d1a17354fe57fd79dde512adb715b',
viewmodule: 'Finance',
viewname: 'InvoiceDetailEditView',
viewaction: '',
viewdatachange: false,
refviews: [
'ba34ee36c1d0de288403607e17e7eb3e',
'd3692664b9e2e150526e1ce4b969f15b',
],
},
{
viewtag: '49dc1a714631338858cd0441f6c720ca',
viewmodule: 'Marketing',
......@@ -747,6 +770,20 @@ export const viewstate: any = {
refviews: [
],
},
{
viewtag: '77ef5d53fe0cadbe03c9d2f9d25c804b',
viewmodule: 'Finance',
viewname: 'InvoiceSummaryView',
viewaction: '',
viewdatachange: false,
refviews: [
'aa79d35850f36fbc1a5085353ecd5af5',
'e167550b61bf1bd019a8e522b8fccc21',
'a95d7d9111bc13a8b73a11ee1e4ff92a',
'893e62d6fbdc4580de7e3e802aec9108',
'a5213905238dbc5d8e1a505029105cc9',
],
},
{
viewtag: '7877d7e7e55fe21f48e8382e07579f33',
viewmodule: 'Sales',
......@@ -1161,6 +1198,17 @@ export const viewstate: any = {
'c7d0ca0f6fa1b27bbd1b5c422d1a108d',
],
},
{
viewtag: 'ab653866ca40a1cefde21241ac5ba44c',
viewmodule: 'Finance',
viewname: 'InvoiceInfoView',
viewaction: '',
viewdatachange: false,
refviews: [
'2bb0e34c7ae753e03404e4d96b17e90c',
'77ef5d53fe0cadbe03c9d2f9d25c804b',
],
},
{
viewtag: 'ad5b5579442b2a90900b62803059a029',
viewmodule: 'Sales',
......@@ -1347,6 +1395,15 @@ export const viewstate: any = {
'6c67094479c2f8af7ea1575eee584056',
],
},
{
viewtag: 'c78a9fa4a75c9a957de0bacd4c0c911c',
viewmodule: 'Sales',
viewname: 'SalesOrderPickupGridView',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{
viewtag: 'c7d0ca0f6fa1b27bbd1b5c422d1a108d',
viewmodule: 'Marketing',
......@@ -1429,7 +1486,20 @@ export const viewstate: any = {
viewdatachange: false,
refviews: [
'0fc09bf520af62b4d89aef845fc72636',
'01c28e25ad9d42977cb91ee890731b64',
'ab653866ca40a1cefde21241ac5ba44c',
],
},
{
viewtag: 'e167550b61bf1bd019a8e522b8fccc21',
viewmodule: 'Finance',
viewname: 'InvoiceInfo_InvoiceView',
viewaction: '',
viewdatachange: false,
refviews: [
'8b806fb12589b2fc17d1bb90f4b5422e',
'f6f91153f3caa976cf7f552636f7e012',
'da3f8c1f20f440f3df54d6c13a8de586',
'6debde861c6e6f91eeb442cb869e9737',
],
},
{
......@@ -1498,6 +1568,16 @@ export const viewstate: any = {
refviews: [
],
},
{
viewtag: 'f6f91153f3caa976cf7f552636f7e012',
viewmodule: 'Sales',
viewname: 'SalesOrderPickupView',
viewaction: '',
viewdatachange: false,
refviews: [
'c78a9fa4a75c9a957de0bacd4c0c911c',
],
},
{
viewtag: 'f84a705f33385d5999fcfb69124932d4',
viewmodule: 'Base',
......
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, SearchFormControlBase } from '@/studio-core';
import InvoiceDetailService from '@/service/invoice-detail/invoice-detail-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 {
/**
* 建构部件服务对象
*
* @type {DefaultService}
* @memberof DefaultSearchFormBase
*/
public service: DefaultService = new DefaultService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {InvoiceDetailService}
* @memberof DefaultSearchFormBase
*/
public appEntityService: InvoiceDetailService = new InvoiceDetailService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof DefaultSearchFormBase
*/
protected appDeName: string = 'invoicedetail';
/**
* 表单数据对象
*
* @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
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import InvoiceDetailService from '@/service/invoice-detail/invoice-detail-service';
import DefaultModel from './default-searchform-model';
/**
* Default 部件服务对象
*
* @export
* @class DefaultService
*/
export default class DefaultService extends ControlService {
/**
* 发票产品服务对象
*
* @type {InvoiceDetailService}
* @memberof DefaultService
*/
public appEntityService: InvoiceDetailService = new InvoiceDetailService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof DefaultService
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of DefaultService.
*
* @param {*} [opts={}]
* @memberof DefaultService
*/
constructor(opts: any = {}) {
super(opts);
this.model = new DefaultModel();
}
/**
* 处理数据
*
* @private
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof DefaultService
*/
private doItems(promise: Promise<any>, deKeyField: string, deName: string): Promise<any> {
return new Promise((resolve, reject) => {
promise.then((response: any) => {
if (response && response.status === 200) {
const data = response.data;
data.forEach((item:any,index:number) =>{
item[deName] = item[deKeyField];
data[index] = item;
});
resolve(data);
} else {
reject([])
}
}).catch((response: any) => {
reject([])
});
});
}
/**
* 获取跨实体数据集合
*
* @param {string} serviceName 服务名称
* @param {string} interfaceName 接口名称
* @param {*} data
* @param {boolean} [isloading]
* @returns {Promise<any[]>}
* @memberof DefaultService
*/
@Errorlog
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
return Promise.reject([])
}
/**
* 启动工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public wfstart(action: string,context: any = {},data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data);
context = this.handleRequestData(action,context,data).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.WFStart(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 提交工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data,true);
context = this.handleRequestData(action,context,data,true).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.WFSubmit(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public add(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Create(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 删除数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public delete(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Remove(Context,Data, isloading);
}
result.then((response) => {
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 修改数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public update(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Update(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public get(action: string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Get(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 加载草稿
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.GetDraft(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response, true);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 前台逻辑
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public frontLogic(action:string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any)=>{
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
return Promise.reject({ status: 500, data: { title: '失败', message: '系统异常' } });
}
result.then((response) => {
this.handleResponse(action, response,true);
resolve(response);
}).catch(response => {
reject(response);
});
})
}
/**
* 处理请求数据
*
* @param action 行为
* @param data 数据
* @memberof DefaultService
*/
public handleRequestData(action: string,context:any, data: any = {},isMerge:boolean = false){
let mode: any = this.getMode();
if (!mode && mode.getDataItems instanceof Function) {
return data;
}
let formItemItems: any[] = mode.getDataItems();
let requestData:any = {};
if(isMerge && (data && data.viewparams)){
Object.assign(requestData,data.viewparams);
}
formItemItems.forEach((item:any) =>{
if(item && item.dataType && Object.is(item.dataType,'FONTKEY')){
if(item && item.prop){
requestData[item.prop] = context[item.name];
}
}else{
if(item && item.prop){
requestData[item.prop] = data[item.name];
}
}
});
let tempContext:any = JSON.parse(JSON.stringify(context));
if(tempContext && tempContext.srfsessionid){
tempContext.srfsessionkey = tempContext.srfsessionid;
delete tempContext.srfsessionid;
}
return {context:tempContext,data:requestData};
}
}
\ 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>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, GridControllerBase } from '@/studio-core';
import InvoiceDetailService from '@/service/invoice-detail/invoice-detail-service';
import InvoiceProductGridService from './invoice-product-grid-grid-service';
import { FormItemModel } from '@/model/form-detail';
/**
* grid部件基类
*
* @export
* @class GridControllerBase
* @extends {InvoiceProductGridGridBase}
*/
export class InvoiceProductGridGridBase extends GridControllerBase {
/**
* 建构部件服务对象
*
* @type {InvoiceProductGridService}
* @memberof InvoiceProductGridGridBase
*/
public service: InvoiceProductGridService = new InvoiceProductGridService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {InvoiceDetailService}
* @memberof InvoiceProductGridGridBase
*/
public appEntityService: InvoiceDetailService = new InvoiceDetailService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof InvoiceProductGridGridBase
*/
protected appDeName: string = 'invoicedetail';
/**
* 本地缓存标识
*
* @protected
* @type {string}
* @memberof GridControllerBase
*/
protected localStorageTag: string = 'invoicedetail_invoiceproductgrid_grid';
/**
* 所有列成员
*
* @type {any[]}
* @memberof InvoiceProductGridGridBase
*/
public allColumns: any[] = [
{
name: 'productname',
label: '产品名称',
langtag: 'entities.invoicedetail.invoiceproductgrid_grid.columns.productname',
show: true,
util: 'PX'
},
{
name: 'priceperunit',
label: '单价',
langtag: 'entities.invoicedetail.invoiceproductgrid_grid.columns.priceperunit',
show: true,
util: 'PX'
},
{
name: 'quantity',
label: '数量',
langtag: 'entities.invoicedetail.invoiceproductgrid_grid.columns.quantity',
show: true,
util: 'PX'
},
{
name: 'manualdiscountamount',
label: '零售折扣',
langtag: 'entities.invoicedetail.invoiceproductgrid_grid.columns.manualdiscountamount',
show: true,
util: 'PX'
},
{
name: 'extendedamount',
label: '应收净额',
langtag: 'entities.invoicedetail.invoiceproductgrid_grid.columns.extendedamount',
show: true,
util: 'PX'
},
]
/**
* 获取表格行模型
*
* @type {*}
* @memberof InvoiceProductGridGridBase
*/
public getGridRowModel(){
return {
srfkey: new FormItemModel(),
}
}
/**
* 属性值规则
*
* @type {*}
* @memberof InvoiceProductGridGridBase
*/
public rules: any = {
srfkey: [
{ required: false, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: '发票产品 值不能为空', trigger: 'change' },
{ required: false, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: '发票产品 值不能为空', trigger: 'blur' },
],
}
/**
* 获取对应列class
*
* @type {*}
* @memberof InvoiceProductGridBase
*/
public hasRowEdit: any = {
'productname':false,
'priceperunit':false,
'quantity':false,
'manualdiscountamount':false,
'extendedamount':false,
};
/**
* 获取对应列class
*
* @param {*} $args row 行数据,column 列数据,rowIndex 行索引,列索引
* @returns {void}
* @memberof InvoiceProductGridBase
*/
public getCellClassName(args: {row: any, column: any, rowIndex: number, columnIndex: number}): any {
return ( this.hasRowEdit[args.column.property] && this.actualIsOpenEdit ) ? "edit-cell" : "info-cell";
}
}
\ No newline at end of file
/**
* InvoiceProductGrid 部件模型
*
* @export
* @class InvoiceProductGridModel
*/
export default class InvoiceProductGridModel {
/**
* 是否是实体数据导出
*
* @returns {any[]}
* @memberof InvoiceProductGridGridMode
*/
public isDEExport: boolean = false;
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof InvoiceProductGridGridMode
*/
public getDataItems(): any[] {
if(this.isDEExport){
return [
]
}else{
return [
{
name: 'extendedamount',
prop: 'extendedamount',
dataType: 'BIGDECIMAL',
},
{
name: 'parentbundleidref',
prop: 'parentbundleidref',
dataType: 'PICKUP',
},
{
name: 'transactioncurrencyid',
prop: 'transactioncurrencyid',
dataType: 'PICKUP',
},
{
name: 'manualdiscountamount',
prop: 'manualdiscountamount',
dataType: 'BIGDECIMAL',
},
{
name: 'salesorderdetailid',
prop: 'salesorderdetailid',
dataType: 'PICKUP',
},
{
name: 'srfmajortext',
prop: 'invoicedetailname',
dataType: 'TEXT',
},
{
name: 'srfkey',
prop: 'invoicedetailid',
dataType: 'GUID',
},
{
name: 'srfdataaccaction',
prop: 'invoicedetailid',
dataType: 'GUID',
},
{
name: 'productid',
prop: 'productid',
dataType: 'PICKUP',
},
{
name: 'priceperunit',
prop: 'priceperunit',
dataType: 'BIGDECIMAL',
},
{
name: 'quantity',
prop: 'quantity',
dataType: 'BIGDECIMAL',
},
{
name: 'uomid',
prop: 'uomid',
dataType: 'PICKUP',
},
{
name: 'productname',
prop: 'productname',
dataType: 'PICKUPTEXT',
},
{
name: 'invoiceid',
prop: 'invoiceid',
dataType: 'PICKUP',
},
{
name: 'invoicedetail',
prop: 'invoicedetailid',
},
{
name:'size',
prop:'size'
},
{
name:'query',
prop:'query'
},
{
name:'page',
prop:'page'
},
{
name:'sort',
prop:'sort'
},
{
name:'srfparentdata',
prop:'srfparentdata'
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name: 'srffrontuf',
prop: 'srffrontuf',
dataType: 'TEXT',
},
]
}
}
}
\ No newline at end of file
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import InvoiceDetailService from '@/service/invoice-detail/invoice-detail-service';
import InvoiceProductGridModel from './invoice-product-grid-grid-model';
/**
* InvoiceProductGrid 部件服务对象
*
* @export
* @class InvoiceProductGridService
*/
export default class InvoiceProductGridService extends ControlService {
/**
* 发票产品服务对象
*
* @type {InvoiceDetailService}
* @memberof InvoiceProductGridService
*/
public appEntityService: InvoiceDetailService = new InvoiceDetailService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof InvoiceProductGridService
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of InvoiceProductGridService.
*
* @param {*} [opts={}]
* @memberof InvoiceProductGridService
*/
constructor(opts: any = {}) {
super(opts);
this.model = new InvoiceProductGridModel();
}
/**
* 处理数据
*
* @public
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof InvoiceProductGridService
*/
public doItems(promise: Promise<any>, deKeyField: string, deName: string): Promise<any> {
return new Promise((resolve, reject) => {
promise.then((response: any) => {
if (response && response.status === 200) {
const data = response.data;
data.forEach((item:any,index:number) =>{
item[deName] = item[deKeyField];
data[index] = item;
});
resolve(data);
} else {
reject([])
}
}).catch((response: any) => {
reject([])
});
});
}
/**
* 获取跨实体数据集合
*
* @param {string} serviceName 服务名称
* @param {string} interfaceName 接口名称
* @param {*} data
* @param {boolean} [isloading]
* @returns {Promise<any[]>}
* @memberof InvoiceProductGridService
*/
@Errorlog
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
return Promise.reject([])
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof InvoiceProductGridService
*/
@Errorlog
public add(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
}else{
result =_appEntityService.Create(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 删除数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof InvoiceProductGridService
*/
@Errorlog
public delete(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
}else{
result =_appEntityService.Remove(Context,Data, isloading);
}
result.then((response) => {
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 修改数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof InvoiceProductGridService
*/
@Errorlog
public update(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Data,Context,isloading);
}else{
result =_appEntityService.Update(Data,Context,isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 获取数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof InvoiceProductGridService
*/
@Errorlog
public get(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Get(Context,Data, isloading);
}
result.then((response) => {
//处理返回数据,补充判断标识
if(response.data){
Object.assign(response.data,{srfuf:0});
}
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof InvoiceProductGridService
*/
@Errorlog
public search(action: string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
}else{
result =_appEntityService.FetchDefault(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 加载草稿
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof InvoiceProductGridService
*/
@Errorlog
public loadDraft(action: string, context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.GetDraft(Context,Data, isloading);
}
result.then((response) => {
//处理返回数据,补充判断标识
if(response.data){
Object.assign(response.data,{srfuf:'0'});
//仿真主键数据
response.data.invoicedetailid = Util.createUUID();
}
this.handleResponse(action, response, true);
this.mergeDefaults(response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 合并配置的默认值
* @param {*}
* @memberof InvoiceProductGridService
*/
public mergeDefaults(response:any = {}){
if(response.data){
}
}
/**
* 前台逻辑
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public frontLogic(action:string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any)=>{
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
return Promise.reject({ status: 500, data: { title: '失败', message: '系统异常' } });
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
})
}
}
\ No newline at end of file
<div :class="{ 'grid': true, 'show-paging-bar': isEnablePagingBar, 'hidden-paging-bar': !isEnablePagingBar }">
<i-form>
<el-table v-if="isDisplay === true"
:default-sort="{ prop: minorSortPSDEF, order: Object.is(minorSortDir, 'ASC') ? 'ascending' : Object.is(minorSortDir, 'DESC') ? 'descending' : '' }"
@sort-change="onSortChange($event)"
:border="isDragendCol"
:highlight-current-row ="isSingleSelect"
:row-class-name="getRowClassName.bind(_self)"
:cell-class-name="getCellClassName.bind(_self)"
size="mini"
stripe
@row-click="rowClick($event)"
@select-all="selectAll($event)"
@select="select($event)"
@row-class-name="onRowClassName($event)"
@row-dblclick="rowDBLClick($event)"
ref='multipleTable' :data="items" :show-header="!isHideHeader">
<template slot="empty">
无数据
<span class="quick-toolbar">
</span>
</template>
<template v-if="!isSingleSelect">
<el-table-column align="center" type='selection' :width="checkboxColWidth"></el-table-column>
</template>
<template v-if="getColumnState('productname')">
<el-table-column show-overflow-tooltip :prop="'productname'" :label="$t('entities.invoicedetail.invoiceproductgrid_grid.columns.productname')" :width="100" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.invoicedetail.invoiceproductgrid_grid.columns.productname')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.productname}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('priceperunit')">
<el-table-column show-overflow-tooltip :prop="'priceperunit'" :label="$t('entities.invoicedetail.invoiceproductgrid_grid.columns.priceperunit')" :width="100" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.invoicedetail.invoiceproductgrid_grid.columns.priceperunit')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.priceperunit}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('quantity')">
<el-table-column show-overflow-tooltip :prop="'quantity'" :label="$t('entities.invoicedetail.invoiceproductgrid_grid.columns.quantity')" :width="100" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.invoicedetail.invoiceproductgrid_grid.columns.quantity')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.quantity}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('manualdiscountamount')">
<el-table-column show-overflow-tooltip :prop="'manualdiscountamount'" :label="$t('entities.invoicedetail.invoiceproductgrid_grid.columns.manualdiscountamount')" :width="100" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.invoicedetail.invoiceproductgrid_grid.columns.manualdiscountamount')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.manualdiscountamount}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('extendedamount')">
<el-table-column show-overflow-tooltip :prop="'extendedamount'" :label="$t('entities.invoicedetail.invoiceproductgrid_grid.columns.extendedamount')" :width="100" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.invoicedetail.invoiceproductgrid_grid.columns.extendedamount')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.extendedamount}}</span>
</template>
</el-table-column>
</template>
<template v-if="adaptiveState">
<el-table-column></el-table-column>
</template>
</el-table>
<row class='grid-pagination' v-show="items.length > 0">
<page class='pull-right' @on-change="pageOnChange($event)"
@on-page-size-change="onPageSizeChange($event)"
:transfer="true" :total="totalRecord"
show-sizer :current="curPage" :page-size="limit"
:page-size-opts="[10, 20, 30, 40, 50, 60, 70, 80, 90, 100]" show-elevator show-total>
<span>
<span class="page-column">
<poptip transfer placement="top-start">
<i-button icon="md-menu">{{$t('app.gridpage.choicecolumns')}}</i-button>
<div slot="content">
<template v-for="col in allColumns">
<div :key="col.name"><el-checkbox v-model="col.show" @change="onColChange()">{{$t(col.langtag)}}</el-checkbox></div>
</template>
</div>
</poptip>
</span>
<span v-if="selections.length > 0" class="batch-toolbar">
</span>
<span class="page-button"><i-button icon="md-refresh" :title="$t('app.gridpage.refresh')" @click="pageRefresh()"></i-button></span>&nbsp;
<span>
{{$t('app.gridpage.show')}}&nbsp;
<span>
<template v-if="items.length === 1">
1
</template>
<template v-else>
<span>{{(curPage - 1) * limit + 1}}&nbsp;-&nbsp;{{totalRecord > curPage * limit ? curPage * limit : totalRecord}}</span>
</template>
</span>&nbsp;
{{$t('app.gridpage.records')}},{{$t('app.gridpage.totle')}}&nbsp;{{totalRecord}}&nbsp;{{$t('app.gridpage.records')}}
</span>
</span>
</page>
</row>
</i-form>
</div>
\ No newline at end of file
<template src="./invoice-product-grid-grid.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { InvoiceProductGridGridBase } from './invoice-product-grid-grid-base';
/**
* grid部件
*
* @export
* @class InvoiceProductGridGrid
* @extends {InvoiceProductGridGridBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class InvoiceProductGridGrid extends InvoiceProductGridGridBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, EditFormControlBase } from '@/studio-core';
import InvoiceDetailService from '@/service/invoice-detail/invoice-detail-service';
import MainService from './main-form-service';
import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail';
/**
* form部件基类
*
* @export
* @class EditFormControlBase
* @extends {MainEditFormBase}
*/
export class MainEditFormBase extends EditFormControlBase {
/**
* 建构部件服务对象
*
* @type {MainService}
* @memberof MainEditFormBase
*/
public service: MainService = new MainService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {InvoiceDetailService}
* @memberof MainEditFormBase
*/
public appEntityService: InvoiceDetailService = new InvoiceDetailService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof MainEditFormBase
*/
protected appDeName: string = 'invoicedetail';
/**
* 表单数据对象
*
* @type {*}
* @memberof MainEditFormBase
*/
public data: any = {
srfupdatedate: null,
srforikey: null,
srfkey: null,
srfmajortext: null,
srftempmode: null,
srfuf: null,
srfdeid: null,
srfsourcekey: null,
productname: null,
priceperunit: null,
quantity: null,
uomname: null,
manualdiscountamount: null,
tax: null,
productid: null,
invoicedetailid: null,
uomid: null,
invoicedetail:null,
};
/**
* 属性值规则
*
* @type {*}
* @memberof MainEditFormBase
*/
public rules: any = {
srfupdatedate: [
{ required: false, type: 'string', message: '更新时间 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '更新时间 值不能为空', trigger: 'blur' },
],
srforikey: [
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'blur' },
],
srfkey: [
{ required: false, type: 'string', message: '发票产品 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '发票产品 值不能为空', trigger: 'blur' },
],
srfmajortext: [
{ required: false, type: 'string', message: '名称 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '名称 值不能为空', trigger: 'blur' },
],
srftempmode: [
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'blur' },
],
srfuf: [
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'blur' },
],
srfdeid: [
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'blur' },
],
srfsourcekey: [
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'blur' },
],
productname: [
{ required: false, type: 'string', message: '产品名称 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '产品名称 值不能为空', trigger: 'blur' },
],
priceperunit: [
{ required: false, type: 'number', message: '单价 值不能为空', trigger: 'change' },
{ required: false, type: 'number', message: '单价 值不能为空', trigger: 'blur' },
],
quantity: [
{ required: true, type: 'number', message: '数量 值不能为空', trigger: 'change' },
{ required: true, type: 'number', message: '数量 值不能为空', trigger: 'blur' },
],
uomname: [
{ required: false, type: 'string', message: '计价单位 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '计价单位 值不能为空', trigger: 'blur' },
],
manualdiscountamount: [
{ required: false, type: 'number', message: '零售折扣 值不能为空', trigger: 'change' },
{ required: false, type: 'number', message: '零售折扣 值不能为空', trigger: 'blur' },
],
tax: [
{ required: false, type: 'number', message: '税 值不能为空', trigger: 'change' },
{ required: false, type: 'number', message: '税 值不能为空', trigger: 'blur' },
],
productid: [
{ required: false, type: 'string', message: '现有产品 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '现有产品 值不能为空', trigger: 'blur' },
],
invoicedetailid: [
{ required: false, type: 'string', message: '发票产品 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '发票产品 值不能为空', trigger: 'blur' },
],
uomid: [
{ required: false, type: 'string', message: '计价单位 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '计价单位 值不能为空', trigger: 'blur' },
],
}
/**
* 详情模型集合
*
* @type {*}
* @memberof MainEditFormBase
*/
public detailsModel: any = {
group1: new FormGroupPanelModel({ caption: 'invoicedetail基本信息', detailType: 'GROUPPANEL', name: 'group1', visible: true, isShowCaption: false, form: this, uiActionGroup: { caption: '', langbase: 'entities.invoicedetail.main_form', extractMode: 'ITEM', details: [] } }),
formpage1: new FormPageModel({ caption: '基本信息', detailType: 'FORMPAGE', name: 'formpage1', visible: true, isShowCaption: true, form: this }),
srfupdatedate: new FormItemModel({ caption: '更新时间', detailType: 'FORMITEM', name: 'srfupdatedate', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 0 }),
srforikey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srforikey', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srfkey: new FormItemModel({ caption: '发票产品', detailType: 'FORMITEM', name: 'srfkey', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 1 }),
srfmajortext: new FormItemModel({ caption: '名称', detailType: 'FORMITEM', name: 'srfmajortext', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srftempmode: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srftempmode', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srfuf: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfuf', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srfdeid: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfdeid', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srfsourcekey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfsourcekey', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
productname: new FormItemModel({ caption: '产品名称', detailType: 'FORMITEM', name: 'productname', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
priceperunit: new FormItemModel({ caption: '单价', detailType: 'FORMITEM', name: 'priceperunit', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
quantity: new FormItemModel({ caption: '数量', detailType: 'FORMITEM', name: 'quantity', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
uomname: new FormItemModel({ caption: '计价单位', detailType: 'FORMITEM', name: 'uomname', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
manualdiscountamount: new FormItemModel({ caption: '零售折扣', detailType: 'FORMITEM', name: 'manualdiscountamount', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
tax: new FormItemModel({ caption: '税', detailType: 'FORMITEM', name: 'tax', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
productid: new FormItemModel({ caption: '现有产品', detailType: 'FORMITEM', name: 'productid', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
invoicedetailid: new FormItemModel({ caption: '发票产品', detailType: 'FORMITEM', name: 'invoicedetailid', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 1 }),
uomid: new FormItemModel({ caption: '计价单位', detailType: 'FORMITEM', name: 'uomid', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
};
}
\ No newline at end of file
/**
* Main 部件模型
*
* @export
* @class MainModel
*/
export default class MainModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof MainModel
*/
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: 'invoicedetailid',
dataType: 'GUID',
},
{
name: 'srfmajortext',
prop: 'invoicedetailname',
dataType: 'TEXT',
},
{
name: 'srftempmode',
},
{
name: 'srfuf',
},
{
name: 'srfdeid',
},
{
name: 'srfsourcekey',
},
{
name: 'productname',
prop: 'productname',
dataType: 'PICKUPTEXT',
},
{
name: 'priceperunit',
prop: 'priceperunit',
dataType: 'BIGDECIMAL',
},
{
name: 'quantity',
prop: 'quantity',
dataType: 'BIGDECIMAL',
},
{
name: 'uomname',
prop: 'uomname',
dataType: 'PICKUPTEXT',
},
{
name: 'manualdiscountamount',
prop: 'manualdiscountamount',
dataType: 'BIGDECIMAL',
},
{
name: 'tax',
prop: 'tax',
dataType: 'BIGDECIMAL',
},
{
name: 'productid',
prop: 'productid',
dataType: 'PICKUP',
},
{
name: 'invoicedetailid',
prop: 'invoicedetailid',
dataType: 'GUID',
},
{
name: 'uomid',
prop: 'uomid',
dataType: 'PICKUP',
},
{
name: 'invoicedetail',
prop: 'invoicedetailid',
dataType: 'FONTKEY',
},
]
}
}
\ No newline at end of file
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import InvoiceDetailService from '@/service/invoice-detail/invoice-detail-service';
import MainModel from './main-form-model';
import ProductService from '@/service/product/product-service';
import UomService from '@/service/uom/uom-service';
/**
* Main 部件服务对象
*
* @export
* @class MainService
*/
export default class MainService extends ControlService {
/**
* 发票产品服务对象
*
* @type {InvoiceDetailService}
* @memberof MainService
*/
public appEntityService: InvoiceDetailService = new InvoiceDetailService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof MainService
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of MainService.
*
* @param {*} [opts={}]
* @memberof MainService
*/
constructor(opts: any = {}) {
super(opts);
this.model = new MainModel();
}
/**
* product服务对象
*
* @type {ProductService}
* @memberof MainService
*/
public productService: ProductService = new ProductService();
/**
* 计价单位服务对象
*
* @type {UomService}
* @memberof MainService
*/
public uomService: UomService = new UomService();
/**
* 处理数据
*
* @private
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof MainService
*/
private doItems(promise: Promise<any>, deKeyField: string, deName: string): Promise<any> {
return new Promise((resolve, reject) => {
promise.then((response: any) => {
if (response && response.status === 200) {
const data = response.data;
data.forEach((item:any,index:number) =>{
item[deName] = item[deKeyField];
data[index] = item;
});
resolve(data);
} else {
reject([])
}
}).catch((response: any) => {
reject([])
});
});
}
/**
* 获取跨实体数据集合
*
* @param {string} serviceName 服务名称
* @param {string} interfaceName 接口名称
* @param {*} data
* @param {boolean} [isloading]
* @returns {Promise<any[]>}
* @memberof MainService
*/
@Errorlog
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
if (Object.is(serviceName, 'ProductService') && Object.is(interfaceName, 'FetchDefault')) {
return this.doItems(this.productService.FetchDefault(JSON.parse(JSON.stringify(context)),data, isloading), 'productid', 'product');
}
if (Object.is(serviceName, 'UomService') && Object.is(interfaceName, 'FetchDefault')) {
return this.doItems(this.uomService.FetchDefault(JSON.parse(JSON.stringify(context)),data, isloading), 'uomid', 'uom');
}
return Promise.reject([])
}
/**
* 启动工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public wfstart(action: string,context: any = {},data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data);
context = this.handleRequestData(action,context,data).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.WFStart(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 提交工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data,true);
context = this.handleRequestData(action,context,data,true).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.WFSubmit(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public add(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Create(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 删除数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public delete(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Remove(Context,Data, isloading);
}
result.then((response) => {
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 修改数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public update(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Update(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public get(action: string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Get(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 加载草稿
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据
const PrimaryKey = Util.createUUID();
Data.invoicedetailid = PrimaryKey;
Data.invoicedetail = PrimaryKey;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.GetDraft(Context,Data, isloading);
}
result.then((response) => {
response.data.invoicedetailid = PrimaryKey;
this.handleResponse(action, response, true);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 前台逻辑
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@Errorlog
public frontLogic(action:string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any)=>{
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
return Promise.reject({ status: 500, data: { title: '失败', message: '系统异常' } });
}
result.then((response) => {
this.handleResponse(action, response,true);
resolve(response);
}).catch(response => {
reject(response);
});
})
}
/**
* 处理请求数据
*
* @param action 行为
* @param data 数据
* @memberof MainService
*/
public handleRequestData(action: string,context:any, data: any = {},isMerge:boolean = false){
let mode: any = this.getMode();
if (!mode && mode.getDataItems instanceof Function) {
return data;
}
let formItemItems: any[] = mode.getDataItems();
let requestData:any = {};
if(isMerge && (data && data.viewparams)){
Object.assign(requestData,data.viewparams);
}
formItemItems.forEach((item:any) =>{
if(item && item.dataType && Object.is(item.dataType,'FONTKEY')){
if(item && item.prop){
requestData[item.prop] = context[item.name];
}
}else{
if(item && item.prop){
requestData[item.prop] = data[item.name];
}
}
});
let tempContext:any = JSON.parse(JSON.stringify(context));
if(tempContext && tempContext.srfsessionid){
tempContext.srfsessionkey = tempContext.srfsessionid;
delete tempContext.srfsessionid;
}
return {context:tempContext,data:requestData};
}
}
\ No newline at end of file
<i-form :model="this.data" class='app-form' ref='form' id='invoicedetail_main' style="">
<input style="display:none;" />
<row >
<i-col v-show="detailsModel.group1.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.group1.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.invoicedetail.main_form.details.group1')" :isShowCaption="false" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" >
<row>
<i-col v-show="detailsModel.productname.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='productname' :itemRules="this.rules.productname" class='' :caption="$t('entities.invoicedetail.main_form.details.productname')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.productname.error" :isEmptyCaption="false" labelPos="LEFT">
<app-picker
:formState="formState"
:data="data"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
:disabled="detailsModel.productname.disabled"
name='productname'
deMajorField='productname'
deKeyField='product'
:service="service"
:acParams="{ serviceName: 'ProductService', interfaceName: 'FetchDefault'}"
valueitem='productid'
:value="data.productname"
editortype=""
:pickupView="{ viewname: 'product-pickup-view', title: $t('entities.product.views.pickupview.title'), deResParameters: [], parameters: [{ pathName: 'products', parameterName: 'product' }, { pathName: 'pickupview', parameterName: 'pickupview' } ], placement:'' }"
style=""
@formitemvaluechange="onFormItemValueChange($event)">
</app-picker>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.priceperunit.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='priceperunit' :itemRules="this.rules.priceperunit" class='' :caption="$t('entities.invoicedetail.main_form.details.priceperunit')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.priceperunit.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.priceperunit" @enter="onEnter($event)" unit="" :disabled="detailsModel.priceperunit.disabled" type='number' style=""></input-box>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.quantity.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='quantity' :itemRules="this.rules.quantity" class='' :caption="$t('entities.invoicedetail.main_form.details.quantity')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.quantity.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.quantity" @enter="onEnter($event)" unit="" :disabled="detailsModel.quantity.disabled" type='number' style=""></input-box>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.uomname.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='uomname' :itemRules="this.rules.uomname" class='' :caption="$t('entities.invoicedetail.main_form.details.uomname')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.uomname.error" :isEmptyCaption="false" labelPos="LEFT">
<app-picker
:formState="formState"
:data="data"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
:disabled="detailsModel.uomname.disabled"
name='uomname'
deMajorField='uomname'
deKeyField='uom'
:service="service"
:acParams="{ serviceName: 'UomService', interfaceName: 'FetchDefault'}"
valueitem='uomid'
:value="data.uomname"
editortype=""
:pickupView="{ viewname: 'uom-pickup-view', title: $t('entities.uom.views.pickupview.title'), deResParameters: [], parameters: [{ pathName: 'uoms', parameterName: 'uom' }, { pathName: 'pickupview', parameterName: 'pickupview' } ], placement:'' }"
style=""
@formitemvaluechange="onFormItemValueChange($event)">
</app-picker>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.manualdiscountamount.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='manualdiscountamount' :itemRules="this.rules.manualdiscountamount" class='' :caption="$t('entities.invoicedetail.main_form.details.manualdiscountamount')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.manualdiscountamount.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.manualdiscountamount" @enter="onEnter($event)" unit="" :disabled="detailsModel.manualdiscountamount.disabled" type='number' style=""></input-box>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.tax.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='tax' :itemRules="this.rules.tax" class='' :caption="$t('entities.invoicedetail.main_form.details.tax')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.tax.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.tax" @enter="onEnter($event)" unit="" :disabled="detailsModel.tax.disabled" type='number' style=""></input-box>
</app-form-item>
</i-col>
</row>
</app-form-group>
</i-col>
</row>
</i-form>
\ No newline at end of file
<template src="./main-form.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { MainEditFormBase } from './main-form-base';
/**
* form部件
*
* @export
* @class MainEditForm
* @extends {MainEditFormBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class MainEditForm extends MainEditFormBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, MainControlBase } from '@/studio-core';
import InvoiceService from '@/service/invoice/invoice-service';
import BOARDService from './board-dashboard-service';
import UtilService from '@/utilservice/util-service';
/**
* dashboard部件基类
*
* @export
* @class MainControlBase
* @extends {BOARDDashboardBase}
*/
export class BOARDDashboardBase extends MainControlBase {
/**
* 建构部件服务对象
*
* @type {BOARDService}
* @memberof BOARDDashboardBase
*/
public service: BOARDService = new BOARDService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {InvoiceService}
* @memberof BOARDDashboardBase
*/
public appEntityService: InvoiceService = new InvoiceService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof BOARDDashboardBase
*/
protected appDeName: string = 'invoice';
/**
* 是否支持看板定制
*
* @public
* @type {(boolean)}
* @memberof BOARD
*/
@Prop() public isEnableCustomized!:boolean;
/**
* 是否已有看板定制
*
* @public
* @type {(boolean)}
* @memberof BOARD
*/
public isHasCustomized:boolean = false;
/**
* 模型数据
*
* @public
* @type {(*)}
* @memberof BOARD
*/
public modelDta:any;
/**
* modleId
*
* @type {string}
* @memberof BOARD
*/
public modelId:string = "dashboard_invoice_board";
/**
* 建构功能服务对象
*
* @type {UtilService}
* @memberof BOARD
*/
public utilService:UtilService = new UtilService();
/**
* 功能服务名称
*
* @type {string}
* @memberof BOARD
*/
public utilServiceName:string = "";
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof BOARD
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof BOARD
*/
public getData(): any {
return {};
}
/**
* vue 生命周期
*
* @memberof BOARD
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof BOARD
*/
public afterCreated(){
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
if (Object.is('load', action)) {
this.loadModel();
}
});
}
}
/**
* 动态设计水平列数
*
* @memberof BOARD
*/
public layoutColNum:number = 12;
/**
* 动态设计单元格高度,80px
*
* @memberof BOARD
*/
public layoutRowH:number = 80;
/**
* 通知状态
*
* @memberof BOARD
*/
public notifyState(){
this.$nextTick(() =>{
if (this.isHasCustomized) {
if (this.modelDta && this.modelDta.length > 0) {
this.modelDta.forEach((item: any) => {
this.viewState.next({
tag: item.portletCodeName,
action: "load",
data: JSON.parse(JSON.stringify(this.viewparams))
});
});
}
} else {
if (this.viewState) {
const refs: any = this.$refs;
Object.keys(refs).forEach((name: string) => {
this.viewState.next({
tag: name,
action: "load",
data: JSON.parse(JSON.stringify(this.viewparams))
});
});
}
}
})
}
/**
* 加载布局与数据模型
*
* @memberof BOARD
*/
public loadModel(){
if(this.isEnableCustomized){
this.utilService.getService(this.utilServiceName).then((service:any) =>{
service.loadModelData(JSON.parse(JSON.stringify(this.context)),{modelid:this.modelId,utilServiceName:this.utilServiceName}).then((res:any) =>{
if(res && res.status == 200){
const data:any = res.data;
if(data && data.length >0){
this.isHasCustomized = true;
this.modelDta = data;
this.$forceUpdate();
}else{
this.isHasCustomized = false;
}
this.notifyState();
}else{
console.error("加载面板模型异常");
this.isHasCustomized = false;
this.notifyState();
}
}).catch((error:any)=>{
console.error("加载面板模型异常");
console.error(error);
this.isHasCustomized = false;
this.notifyState();
});
})
}else{
this.notifyState();
}
}
/**
* 处理私人定制按钮
*
* @memberof BOARD
*/
public handleClick(){
const view:any ={
viewname: 'app-portal-design',
title: '面板设计',
width: 1600,
placement: 'DRAWER_RIGHT'
}
const viewparam:any ={
modelid:this.modelId,
utilServiceName:this.utilServiceName,
appdeName:'Invoice'
}
const appdrawer = this.$appdrawer.openDrawer(view, JSON.parse(JSON.stringify(this.context)), viewparam);
appdrawer.subscribe((result: any) => {
if(Object.is(result.ret,'OK')){
this.loadModel();
}
});
}
/**
* vue 生命周期
*
* @memberof BOARD
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof BOARD
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
}
\ No newline at end of file
/**
* BOARD 部件模型
*
* @export
* @class BOARDModel
*/
export default class BOARDModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof BOARDModel
*/
public getDataItems(): any[] {
return [
{
name: 'billto_line1',
},
{
name: 'billto_telephone',
},
{
name: 'owneridtype',
},
{
name: 'accountidyominame',
},
{
name: 'lastonholdtime',
},
{
name: 'billto_stateorprovince',
},
{
name: 'duedate',
},
{
name: 'pricingerrorcode',
},
{
name: 'traversedpath',
},
{
name: 'totaldiscountamount_base',
},
{
name: 'totalamountlessfreight_base',
},
{
name: 'contactidyominame',
},
{
name: 'customeridyominame',
},
{
name: 'lastbackofficesubmit',
},
{
name: 'shipto_telephone',
},
{
name: 'billto_city',
},
{
name: 'createman',
},
{
name: 'shipto_composite',
},
{
name: 'overriddencreatedon',
},
{
name: 'billto_postalcode',
},
{
name: 'freightamount_base',
},
{
name: 'invoicename',
},
{
name: 'updatedate',
},
{
name: 'shipto_city',
},
{
name: 'totalamount',
},
{
name: 'customerid',
},
{
name: 'totalamount_base',
},
{
name: 'billto_name',
},
{
name: 'timezoneruleversionnumber',
},
{
name: 'description',
},
{
name: 'utcconversiontimezonecode',
},
{
name: 'freightamount',
},
{
name: 'prioritycode',
},
{
name: 'discountamount_base',
},
{
name: 'onholdtime',
},
{
name: 'shipto_country',
},
{
name: 'paymenttermscode',
},
{
name: 'shipto_freighttermscode',
},
{
name: 'updateman',
},
{
name: 'shipto_line3',
},
{
name: 'totaltax',
},
{
name: 'billto_line2',
},
{
name: 'createdate',
},
{
name: 'exchangerate',
},
{
name: 'shipto_line1',
},
{
name: 'invoice',
prop: 'invoiceid',
},
{
name: 'discountpercentage',
},
{
name: 'totallineitemamount_base',
},
{
name: 'stageid',
},
{
name: 'entityimage_url',
},
{
name: 'statecode',
},
{
name: 'totalamountlessfreight',
},
{
name: 'totaltax_base',
},
{
name: 'shipto_line2',
},
{
name: 'billto_country',
},
{
name: 'entityimage',
},
{
name: 'importsequencenumber',
},
{
name: 'customeridtype',
},
{
name: 'shipto_fax',
},
{
name: 'ownerid',
},
{
name: 'datedelivered',
},
{
name: 'owneridyominame',
},
{
name: 'entityimage_timestamp',
},
{
name: 'processid',
},
{
name: 'totaldiscountamount',
},
{
name: 'pricelocked',
},
{
name: 'willcall',
},
{
name: 'billto_line3',
},
{
name: 'shipto_name',
},
{
name: 'statuscode',
},
{
name: 'totallineitemamount',
},
{
name: 'discountamount',
},
{
name: 'shipto_stateorprovince',
},
{
name: 'entityimageid',
},
{
name: 'versionnumber',
},
{
name: 'shipto_postalcode',
},
{
name: 'invoicenumber',
},
{
name: 'billto_composite',
},
{
name: 'emailaddress',
},
{
name: 'shippingmethodcode',
},
{
name: 'totallineitemdiscountamount',
},
{
name: 'billto_fax',
},
{
name: 'slaname',
},
{
name: 'transactioncurrencyid',
},
{
name: 'pricelevelid',
},
{
name: 'salesorderid',
},
{
name: 'opportunityid',
},
{
name: 'slaid',
},
{
name: 'transactioncurrencyname',
},
{
name: 'pricelevelname',
},
{
name: 'salesordername',
},
{
name: 'opportunityname',
},
]
}
}
\ No newline at end of file
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* BOARD 部件服务对象
*
* @export
* @class BOARDService
*/
export default class BOARDService extends ControlService {
}
\ No newline at end of file
<div class='dashboard'>
<row v-if="isEnableCustomized">
<app-build @handleClick="handleClick.apply(_self, arguments)"></app-build>
</row>
<row v-if="!isHasCustomized">
<i-col :md="{ span: 18, offset: 0 }" :lg="{ span: 18, offset: 0 }">
<card class="portlet-card" :bordered="false" dis-hover :padding="0">
<span>
<div class='portlet-container summary-viewdashboard-container1 ' :style="{}">
<row>
<i-col :md="{ span: 24, offset: 0 }">
<div class="portlet-without-title">
<card class="portlet-card" :bordered="false" dis-hover :padding="0">
<span>
<view_dashboard_sysportlet1
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:height="300"
name="dashboard_sysportlet1"
ref='dashboard_sysportlet1'
@closeview="closeView($event)">
</view_dashboard_sysportlet1>
</span>
</card>
</div>
</i-col>
</row>
</div>
</span>
</card>
</i-col>
<i-col :md="{ span: 6, offset: 0 }" :lg="{ span: 6, offset: 0 }">
<card class="portlet-card" :bordered="false" dis-hover :padding="0">
<span>
<div class='portlet-container summary-viewdashboard-container2 ' :style="{}">
<row>
<i-col :md="{ span: 24, offset: 0 }">
<div class="portlet-without-title">
<card class="portlet-card" :bordered="false" dis-hover :padding="0">
<span>
<view_dashboard_sysportlet2
:viewState="viewState"
:viewparams="viewparams"
:context="context"
name="dashboard_sysportlet2"
ref='dashboard_sysportlet2'
@closeview="closeView($event)">
</view_dashboard_sysportlet2>
</span>
</card>
</div>
</i-col>
</row>
</div>
</span>
</card>
</i-col>
</row>
<row v-if="isHasCustomized" style="width: 100%;min-height: calc(100% - 40px);">
<div class="portlet-container" style="position: relative;width:100%;">
<template v-for="(item, index) of modelDta">
<div :key="index" :style="{zIndex: 10, position: 'absolute', height: item.h*layoutRowH + 'px', width: `calc(100% / ${layoutColNum} * ${item.w})`,top: item.y*layoutRowH + 'px', left: `calc(100% / ${layoutColNum} * ${item.x})`}">
<component :key="$util.createUUID()" :is="item.componentName" :name="item.portletCodeName" :context="JSON.parse(JSON.stringify(context))" :viewDefaultUsage="false" :isAdaptiveSize="true" :viewState="viewState"></component>
</div>
</template>
</div>
</row>
</div>
\ No newline at end of file
<template src="./board-dashboard.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { BOARDDashboardBase } from './board-dashboard-base';
import view_dashboard_sysportlet2 from '@widgets/activity-pointer/list-by-parent-key-portlet/list-by-parent-key-portlet.vue';
import view_dashboard_sysportlet1 from '@widgets/invoice/view-inv-info-portlet/view-inv-info-portlet.vue';
/**
* dashboard部件
*
* @export
* @class BOARDDashboard
* @extends {BOARDDashboardBase}
*/
@Component({
components: {
view_dashboard_sysportlet2,
view_dashboard_sysportlet1,
}
})
@VueLifeCycleProcessing()
export default class BOARDDashboard extends BOARDDashboardBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, EditFormControlBase } from '@/studio-core';
import InvoiceService from '@/service/invoice/invoice-service';
import InfoService from './info-form-service';
import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail';
/**
* form部件基类
*
* @export
* @class EditFormControlBase
* @extends {InfoEditFormBase}
*/
export class InfoEditFormBase extends EditFormControlBase {
/**
* 建构部件服务对象
*
* @type {InfoService}
* @memberof InfoEditFormBase
*/
public service: InfoService = new InfoService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {InvoiceService}
* @memberof InfoEditFormBase
*/
public appEntityService: InvoiceService = new InvoiceService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof InfoEditFormBase
*/
protected appDeName: string = 'invoice';
/**
* 表单数据对象
*
* @type {*}
* @memberof InfoEditFormBase
*/
public data: any = {
srfupdatedate: null,
srforikey: null,
srfkey: null,
srfmajortext: null,
srftempmode: null,
srfuf: null,
srfdeid: null,
srfsourcekey: null,
invoicenumber: null,
invoicename: null,
transactioncurrencyname: null,
pricelevelname: null,
datedelivered: null,
duedate: null,
shippingmethodcode: null,
paymenttermscode: null,
description: null,
totallineitemamount: null,
discountpercentage: null,
discountamount: null,
totalamountlessfreight: null,
freightamount: null,
totalamount: null,
opportunityname: null,
salesordername: null,
customerid: null,
billto_country: null,
billto_stateorprovince: null,
billto_city: null,
billto_line1: null,
salesorderid: null,
transactioncurrencyid: null,
opportunityid: null,
pricelevelid: null,
invoiceid: null,
invoice:null,
};
/**
* 属性值规则
*
* @type {*}
* @memberof InfoEditFormBase
*/
public rules: any = {
srfupdatedate: [
{ required: false, type: 'string', message: '更新时间 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '更新时间 值不能为空', trigger: 'blur' },
],
srforikey: [
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'blur' },
],
srfkey: [
{ required: false, type: 'string', message: '发票 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '发票 值不能为空', trigger: 'blur' },
],
srfmajortext: [
{ required: false, type: 'string', message: '发票名称 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '发票名称 值不能为空', trigger: 'blur' },
],
srftempmode: [
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'blur' },
],
srfuf: [
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'blur' },
],
srfdeid: [
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'blur' },
],
srfsourcekey: [
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'blur' },
],
invoicenumber: [
{ required: true, type: 'string', message: '发票编码 值不能为空', trigger: 'change' },
{ required: true, type: 'string', message: '发票编码 值不能为空', trigger: 'blur' },
],
invoicename: [
{ required: true, type: 'string', message: '发票名称 值不能为空', trigger: 'change' },
{ required: true, type: 'string', message: '发票名称 值不能为空', trigger: 'blur' },
],
transactioncurrencyname: [
{ required: true, type: 'string', message: '货币 值不能为空', trigger: 'change' },
{ required: true, type: 'string', message: '货币 值不能为空', trigger: 'blur' },
],
pricelevelname: [
{ required: true, type: 'string', message: '价目表 值不能为空', trigger: 'change' },
{ required: true, type: 'string', message: '价目表 值不能为空', trigger: 'blur' },
],
datedelivered: [
{ required: false, type: 'string', message: '交付日期 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '交付日期 值不能为空', trigger: 'blur' },
],
duedate: [
{ required: false, type: 'string', message: '截止日期 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '截止日期 值不能为空', trigger: 'blur' },
],
shippingmethodcode: [
{ required: false, type: 'string', message: '送货方式 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '送货方式 值不能为空', trigger: 'blur' },
],
paymenttermscode: [
{ required: false, type: 'string', message: '付款条件 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '付款条件 值不能为空', trigger: 'blur' },
],
description: [
{ required: false, type: 'string', message: '说明 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '说明 值不能为空', trigger: 'blur' },
],
totallineitemamount: [
{ required: false, type: 'number', message: '明细金额总计 值不能为空', trigger: 'change' },
{ required: false, type: 'number', message: '明细金额总计 值不能为空', trigger: 'blur' },
],
discountpercentage: [
{ required: false, type: 'number', message: '发票折扣(%) 值不能为空', trigger: 'change' },
{ required: false, type: 'number', message: '发票折扣(%) 值不能为空', trigger: 'blur' },
],
discountamount: [
{ required: false, type: 'number', message: '发票折扣金额 值不能为空', trigger: 'change' },
{ required: false, type: 'number', message: '发票折扣金额 值不能为空', trigger: 'blur' },
],
totalamountlessfreight: [
{ required: false, type: 'number', message: '折后金额总计 值不能为空', trigger: 'change' },
{ required: false, type: 'number', message: '折后金额总计 值不能为空', trigger: 'blur' },
],
freightamount: [
{ required: false, type: 'number', message: '运费金额 值不能为空', trigger: 'change' },
{ required: false, type: 'number', message: '运费金额 值不能为空', trigger: 'blur' },
],
totalamount: [
{ required: false, type: 'number', message: '总金额 值不能为空', trigger: 'change' },
{ required: false, type: 'number', message: '总金额 值不能为空', trigger: 'blur' },
],
opportunityname: [
{ required: false, type: 'string', message: '商机 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '商机 值不能为空', trigger: 'blur' },
],
salesordername: [
{ required: false, type: 'string', message: '订单 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '订单 值不能为空', trigger: 'blur' },
],
customerid: [
{ required: true, type: 'string', message: '客户 值不能为空', trigger: 'change' },
{ required: true, type: 'string', message: '客户 值不能为空', trigger: 'blur' },
],
billto_country: [
{ required: false, type: 'string', message: '国家/地区 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '国家/地区 值不能为空', trigger: 'blur' },
],
billto_stateorprovince: [
{ required: false, type: 'string', message: '省/市/自治区 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '省/市/自治区 值不能为空', trigger: 'blur' },
],
billto_city: [
{ required: false, type: 'string', message: '市/县 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '市/县 值不能为空', trigger: 'blur' },
],
billto_line1: [
{ required: false, type: 'string', message: '街道 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '街道 值不能为空', trigger: 'blur' },
],
salesorderid: [
{ required: false, type: 'string', message: '订单 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '订单 值不能为空', trigger: 'blur' },
],
transactioncurrencyid: [
{ required: false, type: 'string', message: '货币 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '货币 值不能为空', trigger: 'blur' },
],
opportunityid: [
{ required: false, type: 'string', message: '商机 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '商机 值不能为空', trigger: 'blur' },
],
pricelevelid: [
{ required: false, type: 'string', message: '价目表 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '价目表 值不能为空', trigger: 'blur' },
],
invoiceid: [
{ required: false, type: 'string', message: '发票 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '发票 值不能为空', trigger: 'blur' },
],
}
/**
* 详情模型集合
*
* @type {*}
* @memberof InfoEditFormBase
*/
public detailsModel: any = {
group1: new FormGroupPanelModel({ caption: '发票基本信息', detailType: 'GROUPPANEL', name: 'group1', visible: true, isShowCaption: true, form: this, uiActionGroup: { caption: '', langbase: 'entities.invoice.info_form', extractMode: 'ITEM', details: [] } }),
grouppanel1: new FormGroupPanelModel({ caption: '详细信息', detailType: 'GROUPPANEL', name: 'grouppanel1', visible: true, isShowCaption: true, form: this, uiActionGroup: { caption: '', langbase: 'entities.invoice.info_form', extractMode: 'ITEM', details: [] } }),
grouppanel3: new FormGroupPanelModel({ caption: '发票金额', detailType: 'GROUPPANEL', name: 'grouppanel3', visible: true, isShowCaption: true, form: this, uiActionGroup: { caption: '', langbase: 'entities.invoice.info_form', extractMode: 'ITEM', details: [] } }),
grouppanel2: new FormGroupPanelModel({ caption: '销售信息', detailType: 'GROUPPANEL', name: 'grouppanel2', visible: true, isShowCaption: true, form: this, uiActionGroup: { caption: '', langbase: 'entities.invoice.info_form', extractMode: 'ITEM', details: [] } }),
grouppanel4: new FormGroupPanelModel({ caption: '帐单地址', detailType: 'GROUPPANEL', name: 'grouppanel4', visible: true, isShowCaption: true, form: this, uiActionGroup: { caption: '', langbase: 'entities.invoice.info_form', extractMode: 'ITEM', details: [] } }),
formpage1: new FormPageModel({ caption: '基本信息', detailType: 'FORMPAGE', name: 'formpage1', visible: true, isShowCaption: true, form: this }),
srfupdatedate: new FormItemModel({ caption: '更新时间', detailType: 'FORMITEM', name: 'srfupdatedate', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 0 }),
srforikey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srforikey', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srfkey: new FormItemModel({ caption: '发票', detailType: 'FORMITEM', name: 'srfkey', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 1 }),
srfmajortext: new FormItemModel({ caption: '发票名称', detailType: 'FORMITEM', name: 'srfmajortext', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srftempmode: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srftempmode', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srfuf: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfuf', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srfdeid: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfdeid', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srfsourcekey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfsourcekey', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
invoicenumber: new FormItemModel({ caption: '发票编码', detailType: 'FORMITEM', name: 'invoicenumber', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 1 }),
invoicename: new FormItemModel({ caption: '发票名称', detailType: 'FORMITEM', name: 'invoicename', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
transactioncurrencyname: new FormItemModel({ caption: '货币', detailType: 'FORMITEM', name: 'transactioncurrencyname', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
pricelevelname: new FormItemModel({ caption: '价目表', detailType: 'FORMITEM', name: 'pricelevelname', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
datedelivered: new FormItemModel({ caption: '交付日期', detailType: 'FORMITEM', name: 'datedelivered', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
duedate: new FormItemModel({ caption: '截止日期', detailType: 'FORMITEM', name: 'duedate', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
shippingmethodcode: new FormItemModel({ caption: '送货方式', detailType: 'FORMITEM', name: 'shippingmethodcode', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
paymenttermscode: new FormItemModel({ caption: '付款条件', detailType: 'FORMITEM', name: 'paymenttermscode', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
description: new FormItemModel({ caption: '说明', detailType: 'FORMITEM', name: 'description', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
totallineitemamount: new FormItemModel({ caption: '明细金额总计', detailType: 'FORMITEM', name: 'totallineitemamount', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 2 }),
discountpercentage: new FormItemModel({ caption: '发票折扣(%)', detailType: 'FORMITEM', name: 'discountpercentage', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
discountamount: new FormItemModel({ caption: '发票折扣金额', detailType: 'FORMITEM', name: 'discountamount', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
totalamountlessfreight: new FormItemModel({ caption: '折后金额总计', detailType: 'FORMITEM', name: 'totalamountlessfreight', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 2 }),
freightamount: new FormItemModel({ caption: '运费金额', detailType: 'FORMITEM', name: 'freightamount', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
totalamount: new FormItemModel({ caption: '总金额', detailType: 'FORMITEM', name: 'totalamount', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 2 }),
opportunityname: new FormItemModel({ caption: '商机', detailType: 'FORMITEM', name: 'opportunityname', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
salesordername: new FormItemModel({ caption: '订单', detailType: 'FORMITEM', name: 'salesordername', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
customerid: new FormItemModel({ caption: '客户', detailType: 'FORMITEM', name: 'customerid', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
billto_country: new FormItemModel({ caption: '国家/地区', detailType: 'FORMITEM', name: 'billto_country', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
billto_stateorprovince: new FormItemModel({ caption: '省/市/自治区', detailType: 'FORMITEM', name: 'billto_stateorprovince', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
billto_city: new FormItemModel({ caption: '市/县', detailType: 'FORMITEM', name: 'billto_city', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
billto_line1: new FormItemModel({ caption: '街道', detailType: 'FORMITEM', name: 'billto_line1', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
salesorderid: new FormItemModel({ caption: '订单', detailType: 'FORMITEM', name: 'salesorderid', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
transactioncurrencyid: new FormItemModel({ caption: '货币', detailType: 'FORMITEM', name: 'transactioncurrencyid', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 1 }),
opportunityid: new FormItemModel({ caption: '商机', detailType: 'FORMITEM', name: 'opportunityid', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
pricelevelid: new FormItemModel({ caption: '价目表', detailType: 'FORMITEM', name: 'pricelevelid', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
invoiceid: new FormItemModel({ caption: '发票', detailType: 'FORMITEM', name: 'invoiceid', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 1 }),
};
}
\ No newline at end of file
/**
* Info 部件模型
*
* @export
* @class InfoModel
*/
export default class InfoModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof InfoModel
*/
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: 'invoiceid',
dataType: 'GUID',
},
{
name: 'srfmajortext',
prop: 'invoicename',
dataType: 'TEXT',
},
{
name: 'srftempmode',
},
{
name: 'srfuf',
},
{
name: 'srfdeid',
},
{
name: 'srfsourcekey',
},
{
name: 'invoicenumber',
prop: 'invoicenumber',
dataType: 'TEXT',
},
{
name: 'invoicename',
prop: 'invoicename',
dataType: 'TEXT',
},
{
name: 'transactioncurrencyname',
prop: 'transactioncurrencyname',
dataType: 'PICKUPTEXT',
},
{
name: 'pricelevelname',
prop: 'pricelevelname',
dataType: 'PICKUPTEXT',
},
{
name: 'datedelivered',
prop: 'datedelivered',
dataType: 'DATETIME',
},
{
name: 'duedate',
prop: 'duedate',
dataType: 'DATETIME',
},
{
name: 'shippingmethodcode',
prop: 'shippingmethodcode',
dataType: 'SSCODELIST',
},
{
name: 'paymenttermscode',
prop: 'paymenttermscode',
dataType: 'SSCODELIST',
},
{
name: 'description',
prop: 'description',
dataType: 'TEXT',
},
{
name: 'totallineitemamount',
prop: 'totallineitemamount',
dataType: 'BIGDECIMAL',
},
{
name: 'discountpercentage',
prop: 'discountpercentage',
dataType: 'BIGDECIMAL',
},
{
name: 'discountamount',
prop: 'discountamount',
dataType: 'BIGDECIMAL',
},
{
name: 'totalamountlessfreight',
prop: 'totalamountlessfreight',
dataType: 'BIGDECIMAL',
},
{
name: 'freightamount',
prop: 'freightamount',
dataType: 'BIGDECIMAL',
},
{
name: 'totalamount',
prop: 'totalamount',
dataType: 'BIGDECIMAL',
},
{
name: 'opportunityname',
prop: 'opportunityname',
dataType: 'PICKUPTEXT',
},
{
name: 'salesordername',
prop: 'salesordername',
dataType: 'PICKUPTEXT',
},
{
name: 'customerid',
prop: 'customerid',
dataType: 'TEXT',
},
{
name: 'billto_country',
prop: 'billto_country',
dataType: 'TEXT',
},
{
name: 'billto_stateorprovince',
prop: 'billto_stateorprovince',
dataType: 'TEXT',
},
{
name: 'billto_city',
prop: 'billto_city',
dataType: 'TEXT',
},
{
name: 'billto_line1',
prop: 'billto_line1',
dataType: 'TEXT',
},
{
name: 'salesorderid',
prop: 'salesorderid',
dataType: 'PICKUP',
},
{
name: 'transactioncurrencyid',
prop: 'transactioncurrencyid',
dataType: 'PICKUP',
},
{
name: 'opportunityid',
prop: 'opportunityid',
dataType: 'PICKUP',
},
{
name: 'pricelevelid',
prop: 'pricelevelid',
dataType: 'PICKUP',
},
{
name: 'invoiceid',
prop: 'invoiceid',
dataType: 'GUID',
},
{
name: 'invoice',
prop: 'invoiceid',
dataType: 'FONTKEY',
},
]
}
}
\ No newline at end of file
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import InvoiceService from '@/service/invoice/invoice-service';
import InfoModel from './info-form-model';
import TransactionCurrencyService from '@/service/transaction-currency/transaction-currency-service';
import PriceLevelService from '@/service/price-level/price-level-service';
import OpportunityService from '@/service/opportunity/opportunity-service';
import SalesOrderService from '@/service/sales-order/sales-order-service';
/**
* Info 部件服务对象
*
* @export
* @class InfoService
*/
export default class InfoService extends ControlService {
/**
* 发票服务对象
*
* @type {InvoiceService}
* @memberof InfoService
*/
public appEntityService: InvoiceService = new InvoiceService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof InfoService
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of InfoService.
*
* @param {*} [opts={}]
* @memberof InfoService
*/
constructor(opts: any = {}) {
super(opts);
this.model = new InfoModel();
}
/**
* 货币服务对象
*
* @type {TransactionCurrencyService}
* @memberof InfoService
*/
public transactioncurrencyService: TransactionCurrencyService = new TransactionCurrencyService();
/**
* 价目表服务对象
*
* @type {PriceLevelService}
* @memberof InfoService
*/
public pricelevelService: PriceLevelService = new PriceLevelService();
/**
* 商机服务对象
*
* @type {OpportunityService}
* @memberof InfoService
*/
public opportunityService: OpportunityService = new OpportunityService();
/**
* 订单服务对象
*
* @type {SalesOrderService}
* @memberof InfoService
*/
public salesorderService: SalesOrderService = new SalesOrderService();
/**
* 处理数据
*
* @private
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof InfoService
*/
private doItems(promise: Promise<any>, deKeyField: string, deName: string): Promise<any> {
return new Promise((resolve, reject) => {
promise.then((response: any) => {
if (response && response.status === 200) {
const data = response.data;
data.forEach((item:any,index:number) =>{
item[deName] = item[deKeyField];
data[index] = item;
});
resolve(data);
} else {
reject([])
}
}).catch((response: any) => {
reject([])
});
});
}
/**
* 获取跨实体数据集合
*
* @param {string} serviceName 服务名称
* @param {string} interfaceName 接口名称
* @param {*} data
* @param {boolean} [isloading]
* @returns {Promise<any[]>}
* @memberof InfoService
*/
@Errorlog
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
if (Object.is(serviceName, 'TransactionCurrencyService') && Object.is(interfaceName, 'FetchDefault')) {
return this.doItems(this.transactioncurrencyService.FetchDefault(JSON.parse(JSON.stringify(context)),data, isloading), 'transactioncurrencyid', 'transactioncurrency');
}
if (Object.is(serviceName, 'PriceLevelService') && Object.is(interfaceName, 'FetchDefault')) {
return this.doItems(this.pricelevelService.FetchDefault(JSON.parse(JSON.stringify(context)),data, isloading), 'pricelevelid', 'pricelevel');
}
if (Object.is(serviceName, 'OpportunityService') && Object.is(interfaceName, 'FetchDefault')) {
return this.doItems(this.opportunityService.FetchDefault(JSON.parse(JSON.stringify(context)),data, isloading), 'opportunityid', 'opportunity');
}
if (Object.is(serviceName, 'SalesOrderService') && Object.is(interfaceName, 'FetchDefault')) {
return this.doItems(this.salesorderService.FetchDefault(JSON.parse(JSON.stringify(context)),data, isloading), 'salesorderid', 'salesorder');
}
return Promise.reject([])
}
/**
* 启动工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof InfoService
*/
@Errorlog
public wfstart(action: string,context: any = {},data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data);
context = this.handleRequestData(action,context,data).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.WFStart(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 提交工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof InfoService
*/
@Errorlog
public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data,true);
context = this.handleRequestData(action,context,data,true).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.WFSubmit(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof InfoService
*/
@Errorlog
public add(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Create(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 删除数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof InfoService
*/
@Errorlog
public delete(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Remove(Context,Data, isloading);
}
result.then((response) => {
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 修改数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof InfoService
*/
@Errorlog
public update(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Update(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof InfoService
*/
@Errorlog
public get(action: string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Get(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 加载草稿
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof InfoService
*/
@Errorlog
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据
const PrimaryKey = Util.createUUID();
Data.invoiceid = PrimaryKey;
Data.invoice = PrimaryKey;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.GetDraft(Context,Data, isloading);
}
result.then((response) => {
response.data.invoiceid = PrimaryKey;
this.handleResponse(action, response, true);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 前台逻辑
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof InfoService
*/
@Errorlog
public frontLogic(action:string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any)=>{
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
return Promise.reject({ status: 500, data: { title: '失败', message: '系统异常' } });
}
result.then((response) => {
this.handleResponse(action, response,true);
resolve(response);
}).catch(response => {
reject(response);
});
})
}
/**
* 处理请求数据
*
* @param action 行为
* @param data 数据
* @memberof InfoService
*/
public handleRequestData(action: string,context:any, data: any = {},isMerge:boolean = false){
let mode: any = this.getMode();
if (!mode && mode.getDataItems instanceof Function) {
return data;
}
let formItemItems: any[] = mode.getDataItems();
let requestData:any = {};
if(isMerge && (data && data.viewparams)){
Object.assign(requestData,data.viewparams);
}
formItemItems.forEach((item:any) =>{
if(item && item.dataType && Object.is(item.dataType,'FONTKEY')){
if(item && item.prop){
requestData[item.prop] = context[item.name];
}
}else{
if(item && item.prop){
requestData[item.prop] = data[item.name];
}
}
});
let tempContext:any = JSON.parse(JSON.stringify(context));
if(tempContext && tempContext.srfsessionid){
tempContext.srfsessionkey = tempContext.srfsessionid;
delete tempContext.srfsessionid;
}
return {context:tempContext,data:requestData};
}
}
\ No newline at end of file
<i-form :model="this.data" class='app-form' ref='form' id='invoice_info' style="">
<input style="display:none;" />
<row >
<i-col v-show="detailsModel.group1.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.group1.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.invoice.info_form.details.group1')" :isShowCaption="true" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" >
<row>
<i-col v-show="detailsModel.invoicenumber.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='invoicenumber' :itemRules="this.rules.invoicenumber" class='' :caption="$t('entities.invoice.info_form.details.invoicenumber')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.invoicenumber.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.invoicenumber" @enter="onEnter($event)" unit="" :disabled="detailsModel.invoicenumber.disabled" type='text' style=""></input-box>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.invoicename.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='invoicename' :itemRules="this.rules.invoicename" class='' :caption="$t('entities.invoice.info_form.details.invoicename')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.invoicename.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.invoicename" @enter="onEnter($event)" unit="" :disabled="detailsModel.invoicename.disabled" type='text' style=""></input-box>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.transactioncurrencyname.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='transactioncurrencyname' :itemRules="this.rules.transactioncurrencyname" class='' :caption="$t('entities.invoice.info_form.details.transactioncurrencyname')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.transactioncurrencyname.error" :isEmptyCaption="false" labelPos="LEFT">
<app-picker
:formState="formState"
:data="data"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
:disabled="detailsModel.transactioncurrencyname.disabled"
name='transactioncurrencyname'
deMajorField='currencyname'
deKeyField='transactioncurrency'
:service="service"
:acParams="{ serviceName: 'TransactionCurrencyService', interfaceName: 'FetchDefault'}"
valueitem='transactioncurrencyid'
:value="data.transactioncurrencyname"
editortype=""
:pickupView="{ viewname: 'transaction-currency-pickup-view', title: $t('entities.transactioncurrency.views.pickupview.title'), deResParameters: [], parameters: [{ pathName: 'transactioncurrencies', parameterName: 'transactioncurrency' }, { pathName: 'pickupview', parameterName: 'pickupview' } ], placement:'' }"
style=""
@formitemvaluechange="onFormItemValueChange($event)">
</app-picker>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.pricelevelname.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='pricelevelname' :itemRules="this.rules.pricelevelname" class='' :caption="$t('entities.invoice.info_form.details.pricelevelname')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.pricelevelname.error" :isEmptyCaption="false" labelPos="LEFT">
<app-picker
:formState="formState"
:data="data"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
:disabled="detailsModel.pricelevelname.disabled"
name='pricelevelname'
deMajorField='pricelevelname'
deKeyField='pricelevel'
:service="service"
:acParams="{ serviceName: 'PriceLevelService', interfaceName: 'FetchDefault'}"
valueitem='pricelevelid'
:value="data.pricelevelname"
editortype=""
:pickupView="{ viewname: 'price-level-pickup-view', title: $t('entities.pricelevel.views.pickupview.title'), deResParameters: [], parameters: [{ pathName: 'pricelevels', parameterName: 'pricelevel' }, { pathName: 'pickupview', parameterName: 'pickupview' } ], placement:'' }"
style=""
@formitemvaluechange="onFormItemValueChange($event)">
</app-picker>
</app-form-item>
</i-col>
</row>
</app-form-group>
</i-col>
<i-col v-show="detailsModel.grouppanel1.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.grouppanel1.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.invoice.info_form.details.grouppanel1')" :isShowCaption="true" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" >
<row>
<i-col v-show="detailsModel.datedelivered.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='datedelivered' :itemRules="this.rules.datedelivered" class='' :caption="$t('entities.invoice.info_form.details.datedelivered')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.datedelivered.error" :isEmptyCaption="false" labelPos="LEFT">
<date-picker type="datetime" :transfer="true" format="yyyy-MM-dd HH:mm:ss" placeholder="请选择时间..." :value="data.datedelivered" :disabled="detailsModel.datedelivered.disabled" style="min-width: 150px; width:160px;" @on-change="(val1, val2) => { this.data.datedelivered = val1 }"></date-picker>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.duedate.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='duedate' :itemRules="this.rules.duedate" class='' :caption="$t('entities.invoice.info_form.details.duedate')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.duedate.error" :isEmptyCaption="false" labelPos="LEFT">
<date-picker type="datetime" :transfer="true" format="yyyy-MM-dd HH:mm:ss" placeholder="请选择时间..." :value="data.duedate" :disabled="detailsModel.duedate.disabled" style="min-width: 150px; width:160px;" @on-change="(val1, val2) => { this.data.duedate = val1 }"></date-picker>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.shippingmethodcode.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='shippingmethodcode' :itemRules="this.rules.shippingmethodcode" class='' :caption="$t('entities.invoice.info_form.details.shippingmethodcode')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.shippingmethodcode.error" :isEmptyCaption="false" labelPos="LEFT">
<dropdown-list
v-model="data.shippingmethodcode"
:data="data"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
:disabled="detailsModel.shippingmethodcode.disabled"
tag='Invoice__ShippingMethodCode'
codelistType='STATIC'
placeholder='请选择...' style="">
</dropdown-list>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.paymenttermscode.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='paymenttermscode' :itemRules="this.rules.paymenttermscode" class='' :caption="$t('entities.invoice.info_form.details.paymenttermscode')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.paymenttermscode.error" :isEmptyCaption="false" labelPos="LEFT">
<dropdown-list
v-model="data.paymenttermscode"
:data="data"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
:disabled="detailsModel.paymenttermscode.disabled"
tag='Invoice__PaymentTermsCode'
codelistType='STATIC'
placeholder='请选择...' style="">
</dropdown-list>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.description.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 24, offset: 0 }" :xl="{ span: 24, offset: 0 }">
<app-form-item name='description' :itemRules="this.rules.description" class='' :caption="$t('entities.invoice.info_form.details.description')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.description.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.description" @enter="onEnter($event)" unit="" :disabled="detailsModel.description.disabled" type='text' style=""></input-box>
</app-form-item>
</i-col>
</row>
</app-form-group>
</i-col>
<i-col v-show="detailsModel.grouppanel3.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.grouppanel3.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.invoice.info_form.details.grouppanel3')" :isShowCaption="true" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" >
<row>
<i-col v-show="detailsModel.totallineitemamount.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='totallineitemamount' :itemRules="this.rules.totallineitemamount" class='' :caption="$t('entities.invoice.info_form.details.totallineitemamount')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.totallineitemamount.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.totallineitemamount" @enter="onEnter($event)" unit="" :disabled="detailsModel.totallineitemamount.disabled" type='number' style=""></input-box>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.discountpercentage.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='discountpercentage' :itemRules="this.rules.discountpercentage" class='' :caption="$t('entities.invoice.info_form.details.discountpercentage')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.discountpercentage.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.discountpercentage" @enter="onEnter($event)" unit="" :disabled="detailsModel.discountpercentage.disabled" type='number' style=""></input-box>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.discountamount.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='discountamount' :itemRules="this.rules.discountamount" class='' :caption="$t('entities.invoice.info_form.details.discountamount')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.discountamount.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.discountamount" @enter="onEnter($event)" unit="" :disabled="detailsModel.discountamount.disabled" type='number' style=""></input-box>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.totalamountlessfreight.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='totalamountlessfreight' :itemRules="this.rules.totalamountlessfreight" class='' :caption="$t('entities.invoice.info_form.details.totalamountlessfreight')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.totalamountlessfreight.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.totalamountlessfreight" @enter="onEnter($event)" unit="" :disabled="detailsModel.totalamountlessfreight.disabled" type='number' style=""></input-box>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.freightamount.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='freightamount' :itemRules="this.rules.freightamount" class='' :caption="$t('entities.invoice.info_form.details.freightamount')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.freightamount.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.freightamount" @enter="onEnter($event)" unit="" :disabled="detailsModel.freightamount.disabled" type='number' style=""></input-box>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.totalamount.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='totalamount' :itemRules="this.rules.totalamount" class='' :caption="$t('entities.invoice.info_form.details.totalamount')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.totalamount.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.totalamount" @enter="onEnter($event)" unit="" :disabled="detailsModel.totalamount.disabled" type='number' style=""></input-box>
</app-form-item>
</i-col>
</row>
</app-form-group>
</i-col>
<i-col v-show="detailsModel.grouppanel2.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.grouppanel2.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.invoice.info_form.details.grouppanel2')" :isShowCaption="true" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" >
<row>
<i-col v-show="detailsModel.opportunityname.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='opportunityname' :itemRules="this.rules.opportunityname" class='' :caption="$t('entities.invoice.info_form.details.opportunityname')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.opportunityname.error" :isEmptyCaption="false" labelPos="LEFT">
<app-picker
:formState="formState"
:data="data"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
:disabled="detailsModel.opportunityname.disabled"
name='opportunityname'
deMajorField='opportunityname'
deKeyField='opportunity'
:service="service"
:acParams="{ serviceName: 'OpportunityService', interfaceName: 'FetchDefault'}"
valueitem='opportunityid'
:value="data.opportunityname"
editortype=""
:pickupView="{ viewname: 'opportunity-pickup-view', title: $t('entities.opportunity.views.pickupview.title'), deResParameters: [{ pathName: 'contacts', parameterName: 'contact' }, ], parameters: [{ pathName: 'opportunities', parameterName: 'opportunity' }, { pathName: 'pickupview', parameterName: 'pickupview' } ], placement:'' }"
style=""
@formitemvaluechange="onFormItemValueChange($event)">
</app-picker>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.salesordername.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='salesordername' :itemRules="this.rules.salesordername" class='' :caption="$t('entities.invoice.info_form.details.salesordername')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.salesordername.error" :isEmptyCaption="false" labelPos="LEFT">
<app-picker
:formState="formState"
:data="data"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
:disabled="detailsModel.salesordername.disabled"
name='salesordername'
deMajorField='salesordername'
deKeyField='salesorder'
:service="service"
:acParams="{ serviceName: 'SalesOrderService', interfaceName: 'FetchDefault'}"
valueitem='salesorderid'
:value="data.salesordername"
editortype=""
:pickupView="{ viewname: 'sales-order-pickup-view', title: $t('entities.salesorder.views.pickupview.title'), deResParameters: [], parameters: [{ pathName: 'salesorders', parameterName: 'salesorder' }, { pathName: 'pickupview', parameterName: 'pickupview' } ], placement:'' }"
style=""
@formitemvaluechange="onFormItemValueChange($event)">
</app-picker>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.customerid.visible" :style="{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='customerid' :itemRules="this.rules.customerid" class='' :caption="$t('entities.invoice.info_form.details.customerid')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.customerid.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.customerid" @enter="onEnter($event)" unit="" :disabled="detailsModel.customerid.disabled" type='text' style=""></input-box>
</app-form-item>
</i-col>
</row>
</app-form-group>
</i-col>
<i-col v-show="detailsModel.grouppanel4.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.grouppanel4.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.invoice.info_form.details.grouppanel4')" :isShowCaption="true" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" >
<row>
<i-col v-show="detailsModel.billto_country.visible" :style="{}" :md="{ span: 121, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='billto_country' :itemRules="this.rules.billto_country" class='' :caption="$t('entities.invoice.info_form.details.billto_country')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.billto_country.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.billto_country" @enter="onEnter($event)" unit="" :disabled="detailsModel.billto_country.disabled" type='text' style=""></input-box>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.billto_stateorprovince.visible" :style="{}" :md="{ span: 121, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='billto_stateorprovince' :itemRules="this.rules.billto_stateorprovince" class='' :caption="$t('entities.invoice.info_form.details.billto_stateorprovince')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.billto_stateorprovince.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.billto_stateorprovince" @enter="onEnter($event)" unit="" :disabled="detailsModel.billto_stateorprovince.disabled" type='text' style=""></input-box>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.billto_city.visible" :style="{}" :md="{ span: 121, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='billto_city' :itemRules="this.rules.billto_city" class='' :caption="$t('entities.invoice.info_form.details.billto_city')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.billto_city.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.billto_city" @enter="onEnter($event)" unit="" :disabled="detailsModel.billto_city.disabled" type='text' style=""></input-box>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.billto_line1.visible" :style="{}" :md="{ span: 121, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item name='billto_line1' :itemRules="this.rules.billto_line1" class='' :caption="$t('entities.invoice.info_form.details.billto_line1')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.billto_line1.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.billto_line1" @enter="onEnter($event)" unit="" :disabled="detailsModel.billto_line1.disabled" type='text' style=""></input-box>
</app-form-item>
</i-col>
</row>
</app-form-group>
</i-col>
</row>
</i-form>
\ No newline at end of file
<template src="./info-form.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { InfoEditFormBase } from './info-form-base';
/**
* form部件
*
* @export
* @class InfoEditForm
* @extends {InfoEditFormBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class InfoEditForm extends InfoEditFormBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, TabExpPanelControlBase } from '@/studio-core';
import InvoiceService from '@/service/invoice/invoice-service';
import InfoViewtabexppanelService from './info-viewtabexppanel-tabexppanel-service';
/**
* tabexppanel部件基类
*
* @export
* @class TabExpPanelControlBase
* @extends {InfoViewtabexppanelTabexppanelBase}
*/
export class InfoViewtabexppanelTabexppanelBase extends TabExpPanelControlBase {
/**
* 建构部件服务对象
*
* @type {InfoViewtabexppanelService}
* @memberof InfoViewtabexppanelTabexppanelBase
*/
public service: InfoViewtabexppanelService = new InfoViewtabexppanelService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {InvoiceService}
* @memberof InfoViewtabexppanelTabexppanelBase
*/
public appEntityService: InvoiceService = new InvoiceService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof InfoViewtabexppanelTabexppanelBase
*/
protected appDeName: string = 'invoice';
/**
* 是否初始化
*
* @protected
* @returns {any}
* @memberof InfoViewtabexppanel
*/
protected isInit: any = {
tabviewpanel: true ,
tabviewpanel2: false ,
}
/**
* 被激活的分页面板
*
* @protected
* @type {string}
* @memberof InfoViewtabexppanel
*/
protected activatedTabViewPanel: string = 'tabviewpanel';
/**
* 组件创建完毕
*
* @protected
* @memberof InfoViewtabexppanel
*/
protected ctrlCreated(): void {
//设置分页导航srfparentdename和srfparentkey
if (this.context.invoice) {
Object.assign(this.context, { srfparentdename: 'Invoice', srfparentkey: this.context.invoice });
}
super.ctrlCreated();
}
}
\ No newline at end of file
/**
* InfoViewtabexppanel 部件模型
*
* @export
* @class InfoViewtabexppanelModel
*/
export default class InfoViewtabexppanelModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof InfoViewtabexppanelModel
*/
public getDataItems(): any[] {
return [
{
name: 'billto_line1',
},
{
name: 'billto_telephone',
},
{
name: 'owneridtype',
},
{
name: 'accountidyominame',
},
{
name: 'lastonholdtime',
},
{
name: 'billto_stateorprovince',
},
{
name: 'duedate',
},
{
name: 'pricingerrorcode',
},
{
name: 'traversedpath',
},
{
name: 'totaldiscountamount_base',
},
{
name: 'totalamountlessfreight_base',
},
{
name: 'contactidyominame',
},
{
name: 'customeridyominame',
},
{
name: 'lastbackofficesubmit',
},
{
name: 'shipto_telephone',
},
{
name: 'billto_city',
},
{
name: 'createman',
},
{
name: 'shipto_composite',
},
{
name: 'overriddencreatedon',
},
{
name: 'billto_postalcode',
},
{
name: 'freightamount_base',
},
{
name: 'invoicename',
},
{
name: 'updatedate',
},
{
name: 'shipto_city',
},
{
name: 'totalamount',
},
{
name: 'customerid',
},
{
name: 'totalamount_base',
},
{
name: 'billto_name',
},
{
name: 'timezoneruleversionnumber',
},
{
name: 'description',
},
{
name: 'utcconversiontimezonecode',
},
{
name: 'freightamount',
},
{
name: 'prioritycode',
},
{
name: 'discountamount_base',
},
{
name: 'onholdtime',
},
{
name: 'shipto_country',
},
{
name: 'paymenttermscode',
},
{
name: 'shipto_freighttermscode',
},
{
name: 'updateman',
},
{
name: 'shipto_line3',
},
{
name: 'totaltax',
},
{
name: 'billto_line2',
},
{
name: 'createdate',
},
{
name: 'exchangerate',
},
{
name: 'shipto_line1',
},
{
name: 'invoice',
prop: 'invoiceid',
},
{
name: 'discountpercentage',
},
{
name: 'totallineitemamount_base',
},
{
name: 'stageid',
},
{
name: 'entityimage_url',
},
{
name: 'statecode',
},
{
name: 'totalamountlessfreight',
},
{
name: 'totaltax_base',
},
{
name: 'shipto_line2',
},
{
name: 'billto_country',
},
{
name: 'entityimage',
},
{
name: 'importsequencenumber',
},
{
name: 'customeridtype',
},
{
name: 'shipto_fax',
},
{
name: 'ownerid',
},
{
name: 'datedelivered',
},
{
name: 'owneridyominame',
},
{
name: 'entityimage_timestamp',
},
{
name: 'processid',
},
{
name: 'totaldiscountamount',
},
{
name: 'pricelocked',
},
{
name: 'willcall',
},
{
name: 'billto_line3',
},
{
name: 'shipto_name',
},
{
name: 'statuscode',
},
{
name: 'totallineitemamount',
},
{
name: 'discountamount',
},
{
name: 'shipto_stateorprovince',
},
{
name: 'entityimageid',
},
{
name: 'versionnumber',
},
{
name: 'shipto_postalcode',
},
{
name: 'invoicenumber',
},
{
name: 'billto_composite',
},
{
name: 'emailaddress',
},
{
name: 'shippingmethodcode',
},
{
name: 'totallineitemdiscountamount',
},
{
name: 'billto_fax',
},
{
name: 'slaname',
},
{
name: 'transactioncurrencyid',
},
{
name: 'pricelevelid',
},
{
name: 'salesorderid',
},
{
name: 'opportunityid',
},
{
name: 'slaid',
},
{
name: 'transactioncurrencyname',
},
{
name: 'pricelevelname',
},
{
name: 'salesordername',
},
{
name: 'opportunityname',
},
]
}
}
\ No newline at end of file
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import InvoiceService from '@/service/invoice/invoice-service';
import InfoViewtabexppanelModel from './info-viewtabexppanel-tabexppanel-model';
/**
* InfoViewtabexppanel 部件服务对象
*
* @export
* @class InfoViewtabexppanelService
*/
export default class InfoViewtabexppanelService extends ControlService {
/**
* 发票服务对象
*
* @type {InvoiceService}
* @memberof InfoViewtabexppanelService
*/
public appEntityService: InvoiceService = new InvoiceService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof InfoViewtabexppanelService
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of InfoViewtabexppanelService.
*
* @param {*} [opts={}]
* @memberof InfoViewtabexppanelService
*/
constructor(opts: any = {}) {
super(opts);
this.model = new InfoViewtabexppanelModel();
}
}
\ No newline at end of file
<div class='tabviewpanel'>
<tabs :value="activatedTabViewPanel" :animated="false" class='tabexppanel' name='infoviewtabexppanel' @on-click="tabPanelClick($event)">
<tab-pane :index="0" name='tabviewpanel' tab='infoviewtabexppanel' class=''
:label="(h) =>{
return h('div', [
h('span', '概览'),
h('Badge', {
props: {
count: undefined,
type: 'primary'
}
})
])
}" >
<view_tabviewpanel
:viewState="viewState"
:viewparams="JSON.parse(JSON.stringify(viewparams))"
:context="JSON.parse(JSON.stringify(context))"
v-if="isInit.tabviewpanel"
name="tabviewpanel"
ref='tabviewpanel'
@viewpanelDatasChange = "tabViewPanelDatasChange"
@closeview="closeView($event)">
</view_tabviewpanel>
</tab-pane>
<tab-pane :index="1" name='tabviewpanel2' tab='infoviewtabexppanel' class=''
:label="(h) =>{
return h('div', [
h('span', '产品'),
h('Badge', {
props: {
count: undefined,
type: 'primary'
}
})
])
}" >
<view_tabviewpanel2
:viewState="viewState"
:viewparams="JSON.parse(JSON.stringify(viewparams))"
:context="JSON.parse(JSON.stringify(context))"
v-if="isInit.tabviewpanel2"
name="tabviewpanel2"
ref='tabviewpanel2'
@viewpanelDatasChange = "tabViewPanelDatasChange"
@closeview="closeView($event)">
</view_tabviewpanel2>
</tab-pane>
</tabs>
</div>
\ No newline at end of file
<template src="./info-viewtabexppanel-tabexppanel.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { InfoViewtabexppanelTabexppanelBase } from './info-viewtabexppanel-tabexppanel-base';
import view_tabviewpanel from '@widgets/invoice/info-viewtabviewpanel-tabviewpanel/info-viewtabviewpanel-tabviewpanel.vue';
import view_tabviewpanel2 from '@widgets/invoice/info-viewtabviewpanel2-tabviewpanel/info-viewtabviewpanel2-tabviewpanel.vue';
/**
* tabexppanel部件
*
* @export
* @class InfoViewtabexppanelTabexppanel
* @extends {InfoViewtabexppanelTabexppanelBase}
*/
@Component({
components: {
view_tabviewpanel,
view_tabviewpanel2,
}
})
@VueLifeCycleProcessing()
export default class InfoViewtabexppanelTabexppanel extends InfoViewtabexppanelTabexppanelBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, MainControlBase } from '@/studio-core';
import InvoiceService from '@/service/invoice/invoice-service';
import InfoViewtabviewpanelService from './info-viewtabviewpanel-tabviewpanel-service';
/**
* tabviewpanel部件基类
*
* @export
* @class MainControlBase
* @extends {InfoViewtabviewpanelTabviewpanelBase}
*/
export class InfoViewtabviewpanelTabviewpanelBase extends MainControlBase {
/**
* 建构部件服务对象
*
* @type {InfoViewtabviewpanelService}
* @memberof InfoViewtabviewpanelTabviewpanelBase
*/
public service: InfoViewtabviewpanelService = new InfoViewtabviewpanelService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {InvoiceService}
* @memberof InfoViewtabviewpanelTabviewpanelBase
*/
public appEntityService: InvoiceService = new InvoiceService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof InfoViewtabviewpanelTabviewpanelBase
*/
protected appDeName: string = 'invoice';
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof InfoViewtabviewpanel
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof InfoViewtabviewpanel
*/
public getData(): any {
return null;
}
/**
* 是否被激活
*
* @type {boolean}
* @memberof InfoViewtabviewpanel
*/
public isActivied: boolean = true;
/**
* 局部上下文
*
* @type {*}
* @memberof InfoViewtabviewpanel
*/
public localContext: any = null;
/**
* 局部视图参数
*
* @type {*}
* @memberof InfoViewtabviewpanel
*/
public localViewParam: any = null;
/**
* 传入上下文
*
* @type {string}
* @memberof TabExpViewtabviewpanel
*/
public viewdata: string = JSON.stringify(this.context);
/**
* 传入视图参数
*
* @type {string}
* @memberof PickupViewpickupviewpanel
*/
public viewparam: string = JSON.stringify(this.viewparams);
/**
* 视图面板过滤项
*
* @type {string}
* @memberof InfoViewtabviewpanel
*/
public navfilter: string = "";
/**
* vue 生命周期
*
* @returns
* @memberof InfoViewtabviewpanel
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof InfoViewtabviewpanel
*/
public afterCreated(){
this.initNavParam();
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
this.$forceUpdate();
this.initNavParam();
});
}
}
/**
* 初始化导航参数
*
* @memberof InfoViewtabviewpanel
*/
public initNavParam(){
if(!Object.is(this.navfilter,"")){
Object.assign(this.viewparams,{[this.navfilter]:this.context['majorentity']})
}
if(this.localContext && Object.keys(this.localContext).length >0){
let _context:any = this.$util.computedNavData({},this.context,this.viewparams,this.localContext);
Object.assign(this.context,_context);
}
if(this.localViewParam && Object.keys(this.localViewParam).length >0){
let _param:any = this.$util.computedNavData({},this.context,this.viewparams,this.localViewParam);
Object.assign(this.viewparams,_param);
}
this.viewdata =JSON.stringify(this.context);
this.viewparam = JSON.stringify(this.viewparams);
}
/**
* 视图数据变化
*
* @memberof InfoViewtabviewpanel
*/
public viewDatasChange($event:any){
this.$emit('viewpanelDatasChange',$event);
}
/**
* vue 生命周期
*
* @memberof InfoViewtabviewpanel
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof InfoViewtabviewpanel
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
}
\ No newline at end of file
/**
* InfoViewtabviewpanel 部件模型
*
* @export
* @class InfoViewtabviewpanelModel
*/
export default class InfoViewtabviewpanelModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof InfoViewtabviewpanelModel
*/
public getDataItems(): any[] {
return [
{
name: 'billto_line1',
},
{
name: 'billto_telephone',
},
{
name: 'owneridtype',
},
{
name: 'accountidyominame',
},
{
name: 'lastonholdtime',
},
{
name: 'billto_stateorprovince',
},
{
name: 'duedate',
},
{
name: 'pricingerrorcode',
},
{
name: 'traversedpath',
},
{
name: 'totaldiscountamount_base',
},
{
name: 'totalamountlessfreight_base',
},
{
name: 'contactidyominame',
},
{
name: 'customeridyominame',
},
{
name: 'lastbackofficesubmit',
},
{
name: 'shipto_telephone',
},
{
name: 'billto_city',
},
{
name: 'createman',
},
{
name: 'shipto_composite',
},
{
name: 'overriddencreatedon',
},
{
name: 'billto_postalcode',
},
{
name: 'freightamount_base',
},
{
name: 'invoicename',
},
{
name: 'updatedate',
},
{
name: 'shipto_city',
},
{
name: 'totalamount',
},
{
name: 'customerid',
},
{
name: 'totalamount_base',
},
{
name: 'billto_name',
},
{
name: 'timezoneruleversionnumber',
},
{
name: 'description',
},
{
name: 'utcconversiontimezonecode',
},
{
name: 'freightamount',
},
{
name: 'prioritycode',
},
{
name: 'discountamount_base',
},
{
name: 'onholdtime',
},
{
name: 'shipto_country',
},
{
name: 'paymenttermscode',
},
{
name: 'shipto_freighttermscode',
},
{
name: 'updateman',
},
{
name: 'shipto_line3',
},
{
name: 'totaltax',
},
{
name: 'billto_line2',
},
{
name: 'createdate',
},
{
name: 'exchangerate',
},
{
name: 'shipto_line1',
},
{
name: 'invoice',
prop: 'invoiceid',
},
{
name: 'discountpercentage',
},
{
name: 'totallineitemamount_base',
},
{
name: 'stageid',
},
{
name: 'entityimage_url',
},
{
name: 'statecode',
},
{
name: 'totalamountlessfreight',
},
{
name: 'totaltax_base',
},
{
name: 'shipto_line2',
},
{
name: 'billto_country',
},
{
name: 'entityimage',
},
{
name: 'importsequencenumber',
},
{
name: 'customeridtype',
},
{
name: 'shipto_fax',
},
{
name: 'ownerid',
},
{
name: 'datedelivered',
},
{
name: 'owneridyominame',
},
{
name: 'entityimage_timestamp',
},
{
name: 'processid',
},
{
name: 'totaldiscountamount',
},
{
name: 'pricelocked',
},
{
name: 'willcall',
},
{
name: 'billto_line3',
},
{
name: 'shipto_name',
},
{
name: 'statuscode',
},
{
name: 'totallineitemamount',
},
{
name: 'discountamount',
},
{
name: 'shipto_stateorprovince',
},
{
name: 'entityimageid',
},
{
name: 'versionnumber',
},
{
name: 'shipto_postalcode',
},
{
name: 'invoicenumber',
},
{
name: 'billto_composite',
},
{
name: 'emailaddress',
},
{
name: 'shippingmethodcode',
},
{
name: 'totallineitemdiscountamount',
},
{
name: 'billto_fax',
},
{
name: 'slaname',
},
{
name: 'transactioncurrencyid',
},
{
name: 'pricelevelid',
},
{
name: 'salesorderid',
},
{
name: 'opportunityid',
},
{
name: 'slaid',
},
{
name: 'transactioncurrencyname',
},
{
name: 'pricelevelname',
},
{
name: 'salesordername',
},
{
name: 'opportunityname',
},
]
}
}
\ No newline at end of file
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* InfoViewtabviewpanel 部件服务对象
*
* @export
* @class InfoViewtabviewpanelService
*/
export default class InfoViewtabviewpanelService extends ControlService {
}
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'>
<invoice-summary-view
class='viewcontainer2'
:viewdata="viewdata"
:viewparam="viewparam"
@viewload="viewDatasChange($event)"
:viewDefaultUsage="false" >
</invoice-summary-view>
</div>
\ No newline at end of file
<template src="./info-viewtabviewpanel-tabviewpanel.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { InfoViewtabviewpanelTabviewpanelBase } from './info-viewtabviewpanel-tabviewpanel-base';
/**
* tabviewpanel部件
*
* @export
* @class InfoViewtabviewpanelTabviewpanel
* @extends {InfoViewtabviewpanelTabviewpanelBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class InfoViewtabviewpanelTabviewpanel extends InfoViewtabviewpanelTabviewpanelBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, MainControlBase } from '@/studio-core';
import InvoiceService from '@/service/invoice/invoice-service';
import InfoViewtabviewpanel2Service from './info-viewtabviewpanel2-tabviewpanel-service';
/**
* tabviewpanel2部件基类
*
* @export
* @class MainControlBase
* @extends {InfoViewtabviewpanel2TabviewpanelBase}
*/
export class InfoViewtabviewpanel2TabviewpanelBase extends MainControlBase {
/**
* 建构部件服务对象
*
* @type {InfoViewtabviewpanel2Service}
* @memberof InfoViewtabviewpanel2TabviewpanelBase
*/
public service: InfoViewtabviewpanel2Service = new InfoViewtabviewpanel2Service({ $store: this.$store });
/**
* 实体服务对象
*
* @type {InvoiceService}
* @memberof InfoViewtabviewpanel2TabviewpanelBase
*/
public appEntityService: InvoiceService = new InvoiceService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof InfoViewtabviewpanel2TabviewpanelBase
*/
protected appDeName: string = 'invoice';
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof InfoViewtabviewpanel2
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof InfoViewtabviewpanel2
*/
public getData(): any {
return null;
}
/**
* 是否被激活
*
* @type {boolean}
* @memberof InfoViewtabviewpanel2
*/
public isActivied: boolean = true;
/**
* 局部上下文
*
* @type {*}
* @memberof InfoViewtabviewpanel2
*/
public localContext: any = null;
/**
* 局部视图参数
*
* @type {*}
* @memberof InfoViewtabviewpanel2
*/
public localViewParam: any = null;
/**
* 传入上下文
*
* @type {string}
* @memberof TabExpViewtabviewpanel
*/
public viewdata: string = JSON.stringify(this.context);
/**
* 传入视图参数
*
* @type {string}
* @memberof PickupViewpickupviewpanel
*/
public viewparam: string = JSON.stringify(this.viewparams);
/**
* 视图面板过滤项
*
* @type {string}
* @memberof InfoViewtabviewpanel2
*/
public navfilter: string = "";
/**
* vue 生命周期
*
* @returns
* @memberof InfoViewtabviewpanel2
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof InfoViewtabviewpanel2
*/
public afterCreated(){
this.initNavParam();
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
this.$forceUpdate();
this.initNavParam();
});
}
}
/**
* 初始化导航参数
*
* @memberof InfoViewtabviewpanel2
*/
public initNavParam(){
if(!Object.is(this.navfilter,"")){
Object.assign(this.viewparams,{[this.navfilter]:this.context['majorentity']})
}
if(this.localContext && Object.keys(this.localContext).length >0){
let _context:any = this.$util.computedNavData({},this.context,this.viewparams,this.localContext);
Object.assign(this.context,_context);
}
if(this.localViewParam && Object.keys(this.localViewParam).length >0){
let _param:any = this.$util.computedNavData({},this.context,this.viewparams,this.localViewParam);
Object.assign(this.viewparams,_param);
}
this.viewdata =JSON.stringify(this.context);
this.viewparam = JSON.stringify(this.viewparams);
}
/**
* 视图数据变化
*
* @memberof InfoViewtabviewpanel2
*/
public viewDatasChange($event:any){
this.$emit('viewpanelDatasChange',$event);
}
/**
* vue 生命周期
*
* @memberof InfoViewtabviewpanel2
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof InfoViewtabviewpanel2
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
}
\ No newline at end of file
/**
* InfoViewtabviewpanel2 部件模型
*
* @export
* @class InfoViewtabviewpanel2Model
*/
export default class InfoViewtabviewpanel2Model {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof InfoViewtabviewpanel2Model
*/
public getDataItems(): any[] {
return [
{
name: 'billto_line1',
},
{
name: 'billto_telephone',
},
{
name: 'owneridtype',
},
{
name: 'accountidyominame',
},
{
name: 'lastonholdtime',
},
{
name: 'billto_stateorprovince',
},
{
name: 'duedate',
},
{
name: 'pricingerrorcode',
},
{
name: 'traversedpath',
},
{
name: 'totaldiscountamount_base',
},
{
name: 'totalamountlessfreight_base',
},
{
name: 'contactidyominame',
},
{
name: 'customeridyominame',
},
{
name: 'lastbackofficesubmit',
},
{
name: 'shipto_telephone',
},
{
name: 'billto_city',
},
{
name: 'createman',
},
{
name: 'shipto_composite',
},
{
name: 'overriddencreatedon',
},
{
name: 'billto_postalcode',
},
{
name: 'freightamount_base',
},
{
name: 'invoicename',
},
{
name: 'updatedate',
},
{
name: 'shipto_city',
},
{
name: 'totalamount',
},
{
name: 'customerid',
},
{
name: 'totalamount_base',
},
{
name: 'billto_name',
},
{
name: 'timezoneruleversionnumber',
},
{
name: 'description',
},
{
name: 'utcconversiontimezonecode',
},
{
name: 'freightamount',
},
{
name: 'prioritycode',
},
{
name: 'discountamount_base',
},
{
name: 'onholdtime',
},
{
name: 'shipto_country',
},
{
name: 'paymenttermscode',
},
{
name: 'shipto_freighttermscode',
},
{
name: 'updateman',
},
{
name: 'shipto_line3',
},
{
name: 'totaltax',
},
{
name: 'billto_line2',
},
{
name: 'createdate',
},
{
name: 'exchangerate',
},
{
name: 'shipto_line1',
},
{
name: 'invoice',
prop: 'invoiceid',
},
{
name: 'discountpercentage',
},
{
name: 'totallineitemamount_base',
},
{
name: 'stageid',
},
{
name: 'entityimage_url',
},
{
name: 'statecode',
},
{
name: 'totalamountlessfreight',
},
{
name: 'totaltax_base',
},
{
name: 'shipto_line2',
},
{
name: 'billto_country',
},
{
name: 'entityimage',
},
{
name: 'importsequencenumber',
},
{
name: 'customeridtype',
},
{
name: 'shipto_fax',
},
{
name: 'ownerid',
},
{
name: 'datedelivered',
},
{
name: 'owneridyominame',
},
{
name: 'entityimage_timestamp',
},
{
name: 'processid',
},
{
name: 'totaldiscountamount',
},
{
name: 'pricelocked',
},
{
name: 'willcall',
},
{
name: 'billto_line3',
},
{
name: 'shipto_name',
},
{
name: 'statuscode',
},
{
name: 'totallineitemamount',
},
{
name: 'discountamount',
},
{
name: 'shipto_stateorprovince',
},
{
name: 'entityimageid',
},
{
name: 'versionnumber',
},
{
name: 'shipto_postalcode',
},
{
name: 'invoicenumber',
},
{
name: 'billto_composite',
},
{
name: 'emailaddress',
},
{
name: 'shippingmethodcode',
},
{
name: 'totallineitemdiscountamount',
},
{
name: 'billto_fax',
},
{
name: 'slaname',
},
{
name: 'transactioncurrencyid',
},
{
name: 'pricelevelid',
},
{
name: 'salesorderid',
},
{
name: 'opportunityid',
},
{
name: 'slaid',
},
{
name: 'transactioncurrencyname',
},
{
name: 'pricelevelname',
},
{
name: 'salesordername',
},
{
name: 'opportunityname',
},
]
}
}
\ No newline at end of file
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* InfoViewtabviewpanel2 部件服务对象
*
* @export
* @class InfoViewtabviewpanel2Service
*/
export default class InfoViewtabviewpanel2Service extends ControlService {
}
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'>
<invoice-detail-invoice-pro-grid-view
class='viewcontainer2'
:viewdata="viewdata"
:viewparam="viewparam"
@viewload="viewDatasChange($event)"
:viewDefaultUsage="false" >
</invoice-detail-invoice-pro-grid-view>
</div>
\ No newline at end of file
<template src="./info-viewtabviewpanel2-tabviewpanel.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { InfoViewtabviewpanel2TabviewpanelBase } from './info-viewtabviewpanel2-tabviewpanel-base';
/**
* tabviewpanel2部件
*
* @export
* @class InfoViewtabviewpanel2Tabviewpanel
* @extends {InfoViewtabviewpanel2TabviewpanelBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class InfoViewtabviewpanel2Tabviewpanel extends InfoViewtabviewpanel2TabviewpanelBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, EditFormControlBase } from '@/studio-core';
import InvoiceService from '@/service/invoice/invoice-service';
import QuickCreateService from './quick-create-form-service';
import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail';
/**
* form部件基类
*
* @export
* @class EditFormControlBase
* @extends {QuickCreateEditFormBase}
*/
export class QuickCreateEditFormBase extends EditFormControlBase {
/**
* 建构部件服务对象
*
* @type {QuickCreateService}
* @memberof QuickCreateEditFormBase
*/
public service: QuickCreateService = new QuickCreateService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {InvoiceService}
* @memberof QuickCreateEditFormBase
*/
public appEntityService: InvoiceService = new InvoiceService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof QuickCreateEditFormBase
*/
protected appDeName: string = 'invoice';
/**
* 表单数据对象
*
* @type {*}
* @memberof QuickCreateEditFormBase
*/
public data: any = {
srfupdatedate: null,
srforikey: null,
srfkey: null,
srfmajortext: null,
srftempmode: null,
srfuf: null,
srfdeid: null,
srfsourcekey: null,
invoicenumber: null,
invoicename: null,
transactioncurrencyname: null,
pricelevelname: null,
transactioncurrencyid: null,
pricelevelid: null,
invoiceid: null,
invoice:null,
};
/**
* 属性值规则
*
* @type {*}
* @memberof QuickCreateEditFormBase
*/
public rules: any = {
srfupdatedate: [
{ required: false, type: 'string', message: '更新时间 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '更新时间 值不能为空', trigger: 'blur' },
],
srforikey: [
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'blur' },
],
srfkey: [
{ required: false, type: 'string', message: '发票 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '发票 值不能为空', trigger: 'blur' },
],
srfmajortext: [
{ required: false, type: 'string', message: '发票名称 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '发票名称 值不能为空', trigger: 'blur' },
],
srftempmode: [
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'blur' },
],
srfuf: [
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'blur' },
],
srfdeid: [
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'blur' },
],
srfsourcekey: [
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'blur' },
],
invoicenumber: [
{ required: true, type: 'string', message: '发票编码 值不能为空', trigger: 'change' },
{ required: true, type: 'string', message: '发票编码 值不能为空', trigger: 'blur' },
],
invoicename: [
{ required: true, type: 'string', message: '发票名称 值不能为空', trigger: 'change' },
{ required: true, type: 'string', message: '发票名称 值不能为空', trigger: 'blur' },
],
transactioncurrencyname: [
{ required: true, type: 'string', message: '货币 值不能为空', trigger: 'change' },
{ required: true, type: 'string', message: '货币 值不能为空', trigger: 'blur' },
],
pricelevelname: [
{ required: true, type: 'string', message: '价目表 值不能为空', trigger: 'change' },
{ required: true, type: 'string', message: '价目表 值不能为空', trigger: 'blur' },
],
transactioncurrencyid: [
{ required: false, type: 'string', message: '货币 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '货币 值不能为空', trigger: 'blur' },
],
pricelevelid: [
{ required: false, type: 'string', message: '价目表 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '价目表 值不能为空', trigger: 'blur' },
],
invoiceid: [
{ required: false, type: 'string', message: '发票 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '发票 值不能为空', trigger: 'blur' },
],
}
/**
* 详情模型集合
*
* @type {*}
* @memberof QuickCreateEditFormBase
*/
public detailsModel: any = {
group1: new FormGroupPanelModel({ caption: '发票基本信息', detailType: 'GROUPPANEL', name: 'group1', visible: true, isShowCaption: true, form: this, uiActionGroup: { caption: '', langbase: 'entities.invoice.quickcreate_form', extractMode: 'ITEM', details: [] } }),
formpage1: new FormPageModel({ caption: '基本信息', detailType: 'FORMPAGE', name: 'formpage1', visible: true, isShowCaption: true, form: this }),
srfupdatedate: new FormItemModel({ caption: '更新时间', detailType: 'FORMITEM', name: 'srfupdatedate', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 0 }),
srforikey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srforikey', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srfkey: new FormItemModel({ caption: '发票', detailType: 'FORMITEM', name: 'srfkey', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 1 }),
srfmajortext: new FormItemModel({ caption: '发票名称', detailType: 'FORMITEM', name: 'srfmajortext', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srftempmode: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srftempmode', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srfuf: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfuf', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srfdeid: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfdeid', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srfsourcekey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfsourcekey', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
invoicenumber: new FormItemModel({ caption: '发票编码', detailType: 'FORMITEM', name: 'invoicenumber', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 1 }),
invoicename: new FormItemModel({ caption: '发票名称', detailType: 'FORMITEM', name: 'invoicename', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
transactioncurrencyname: new FormItemModel({ caption: '货币', detailType: 'FORMITEM', name: 'transactioncurrencyname', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
pricelevelname: new FormItemModel({ caption: '价目表', detailType: 'FORMITEM', name: 'pricelevelname', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
transactioncurrencyid: new FormItemModel({ caption: '货币', detailType: 'FORMITEM', name: 'transactioncurrencyid', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 1 }),
pricelevelid: new FormItemModel({ caption: '价目表', detailType: 'FORMITEM', name: 'pricelevelid', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
invoiceid: new FormItemModel({ caption: '发票', detailType: 'FORMITEM', name: 'invoiceid', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 1 }),
};
}
\ No newline at end of file
/**
* QuickCreate 部件模型
*
* @export
* @class QuickCreateModel
*/
export default class QuickCreateModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof QuickCreateModel
*/
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: 'invoiceid',
dataType: 'GUID',
},
{
name: 'srfmajortext',
prop: 'invoicename',
dataType: 'TEXT',
},
{
name: 'srftempmode',
},
{
name: 'srfuf',
},
{
name: 'srfdeid',
},
{
name: 'srfsourcekey',
},
{
name: 'invoicenumber',
prop: 'invoicenumber',
dataType: 'TEXT',
},
{
name: 'invoicename',
prop: 'invoicename',
dataType: 'TEXT',
},
{
name: 'transactioncurrencyname',
prop: 'transactioncurrencyname',
dataType: 'PICKUPTEXT',
},
{
name: 'pricelevelname',
prop: 'pricelevelname',
dataType: 'PICKUPTEXT',
},
{
name: 'transactioncurrencyid',
prop: 'transactioncurrencyid',
dataType: 'PICKUP',
},
{
name: 'pricelevelid',
prop: 'pricelevelid',
dataType: 'PICKUP',
},
{
name: 'invoiceid',
prop: 'invoiceid',
dataType: 'GUID',
},
{
name: 'invoice',
prop: 'invoiceid',
dataType: 'FONTKEY',
},
]
}
}
\ No newline at end of file
import { Http,Util,Errorlog } from '@/utils';
import ControlService from '@/widgets/control-service';
import InvoiceService from '@/service/invoice/invoice-service';
import QuickCreateModel from './quick-create-form-model';
import TransactionCurrencyService from '@/service/transaction-currency/transaction-currency-service';
import PriceLevelService from '@/service/price-level/price-level-service';
/**
* QuickCreate 部件服务对象
*
* @export
* @class QuickCreateService
*/
export default class QuickCreateService extends ControlService {
/**
* 发票服务对象
*
* @type {InvoiceService}
* @memberof QuickCreateService
*/
public appEntityService: InvoiceService = new InvoiceService({ $store: this.getStore() });
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof QuickCreateService
*/
public setTempMode(){
this.isTempMode = false;
}
/**
* Creates an instance of QuickCreateService.
*
* @param {*} [opts={}]
* @memberof QuickCreateService
*/
constructor(opts: any = {}) {
super(opts);
this.model = new QuickCreateModel();
}
/**
* 货币服务对象
*
* @type {TransactionCurrencyService}
* @memberof QuickCreateService
*/
public transactioncurrencyService: TransactionCurrencyService = new TransactionCurrencyService();
/**
* 价目表服务对象
*
* @type {PriceLevelService}
* @memberof QuickCreateService
*/
public pricelevelService: PriceLevelService = new PriceLevelService();
/**
* 处理数据
*
* @private
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof QuickCreateService
*/
private doItems(promise: Promise<any>, deKeyField: string, deName: string): Promise<any> {
return new Promise((resolve, reject) => {
promise.then((response: any) => {
if (response && response.status === 200) {
const data = response.data;
data.forEach((item:any,index:number) =>{
item[deName] = item[deKeyField];
data[index] = item;
});
resolve(data);
} else {
reject([])
}
}).catch((response: any) => {
reject([])
});
});
}
/**
* 获取跨实体数据集合
*
* @param {string} serviceName 服务名称
* @param {string} interfaceName 接口名称
* @param {*} data
* @param {boolean} [isloading]
* @returns {Promise<any[]>}
* @memberof QuickCreateService
*/
@Errorlog
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
if (Object.is(serviceName, 'TransactionCurrencyService') && Object.is(interfaceName, 'FetchDefault')) {
return this.doItems(this.transactioncurrencyService.FetchDefault(JSON.parse(JSON.stringify(context)),data, isloading), 'transactioncurrencyid', 'transactioncurrency');
}
if (Object.is(serviceName, 'PriceLevelService') && Object.is(interfaceName, 'FetchDefault')) {
return this.doItems(this.pricelevelService.FetchDefault(JSON.parse(JSON.stringify(context)),data, isloading), 'pricelevelid', 'pricelevel');
}
return Promise.reject([])
}
/**
* 启动工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof QuickCreateService
*/
@Errorlog
public wfstart(action: string,context: any = {},data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data);
context = this.handleRequestData(action,context,data).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.WFStart(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 提交工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof QuickCreateService
*/
@Errorlog
public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data,true);
context = this.handleRequestData(action,context,data,true).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.WFSubmit(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof QuickCreateService
*/
@Errorlog
public add(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Create(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 删除数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof QuickCreateService
*/
@Errorlog
public delete(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Remove(Context,Data, isloading);
}
result.then((response) => {
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 修改数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof QuickCreateService
*/
@Errorlog
public update(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Update(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof QuickCreateService
*/
@Errorlog
public get(action: string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Get(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 加载草稿
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof QuickCreateService
*/
@Errorlog
public loadDraft(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
//仿真主键数据
const PrimaryKey = Util.createUUID();
Data.invoiceid = PrimaryKey;
Data.invoice = PrimaryKey;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.GetDraft(Context,Data, isloading);
}
result.then((response) => {
response.data.invoiceid = PrimaryKey;
this.handleResponse(action, response, true);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 前台逻辑
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof QuickCreateService
*/
@Errorlog
public frontLogic(action:string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any)=>{
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
return Promise.reject({ status: 500, data: { title: '失败', message: '系统异常' } });
}
result.then((response) => {
this.handleResponse(action, response,true);
resolve(response);
}).catch(response => {
reject(response);
});
})
}
/**
* 处理请求数据
*
* @param action 行为
* @param data 数据
* @memberof QuickCreateService
*/
public handleRequestData(action: string,context:any, data: any = {},isMerge:boolean = false){
let mode: any = this.getMode();
if (!mode && mode.getDataItems instanceof Function) {
return data;
}
let formItemItems: any[] = mode.getDataItems();
let requestData:any = {};
if(isMerge && (data && data.viewparams)){
Object.assign(requestData,data.viewparams);
}
formItemItems.forEach((item:any) =>{
if(item && item.dataType && Object.is(item.dataType,'FONTKEY')){
if(item && item.prop){
requestData[item.prop] = context[item.name];
}
}else{
if(item && item.prop){
requestData[item.prop] = data[item.name];
}
}
});
let tempContext:any = JSON.parse(JSON.stringify(context));
if(tempContext && tempContext.srfsessionid){
tempContext.srfsessionkey = tempContext.srfsessionid;
delete tempContext.srfsessionid;
}
return {context:tempContext,data:requestData};
}
}
\ No newline at end of file
<i-form :model="this.data" class='app-form' ref='form' id='invoice_quickcreate' style="">
<input style="display:none;" />
<row >
<i-col v-show="detailsModel.group1.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.group1.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.invoice.quickcreate_form.details.group1')" :isShowCaption="true" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" >
<row>
<i-col v-show="detailsModel.invoicenumber.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='invoicenumber' :itemRules="this.rules.invoicenumber" class='' :caption="$t('entities.invoice.quickcreate_form.details.invoicenumber')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.invoicenumber.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.invoicenumber" @enter="onEnter($event)" unit="" :disabled="detailsModel.invoicenumber.disabled" type='text' style=""></input-box>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.invoicename.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='invoicename' :itemRules="this.rules.invoicename" class='' :caption="$t('entities.invoice.quickcreate_form.details.invoicename')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.invoicename.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.invoicename" @enter="onEnter($event)" unit="" :disabled="detailsModel.invoicename.disabled" type='text' style=""></input-box>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.transactioncurrencyname.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='transactioncurrencyname' :itemRules="this.rules.transactioncurrencyname" class='' :caption="$t('entities.invoice.quickcreate_form.details.transactioncurrencyname')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.transactioncurrencyname.error" :isEmptyCaption="false" labelPos="LEFT">
<app-picker
:formState="formState"
:data="data"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
:disabled="detailsModel.transactioncurrencyname.disabled"
name='transactioncurrencyname'
deMajorField='currencyname'
deKeyField='transactioncurrency'
:service="service"
:acParams="{ serviceName: 'TransactionCurrencyService', interfaceName: 'FetchDefault'}"
valueitem='transactioncurrencyid'
:value="data.transactioncurrencyname"
editortype=""
:pickupView="{ viewname: 'transaction-currency-pickup-view', title: $t('entities.transactioncurrency.views.pickupview.title'), deResParameters: [], parameters: [{ pathName: 'transactioncurrencies', parameterName: 'transactioncurrency' }, { pathName: 'pickupview', parameterName: 'pickupview' } ], placement:'' }"
style=""
@formitemvaluechange="onFormItemValueChange($event)">
</app-picker>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.pricelevelname.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='pricelevelname' :itemRules="this.rules.pricelevelname" class='' :caption="$t('entities.invoice.quickcreate_form.details.pricelevelname')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.pricelevelname.error" :isEmptyCaption="false" labelPos="LEFT">
<app-picker
:formState="formState"
:data="data"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
:disabled="detailsModel.pricelevelname.disabled"
name='pricelevelname'
deMajorField='pricelevelname'
deKeyField='pricelevel'
:service="service"
:acParams="{ serviceName: 'PriceLevelService', interfaceName: 'FetchDefault'}"
valueitem='pricelevelid'
:value="data.pricelevelname"
editortype=""
:pickupView="{ viewname: 'price-level-pickup-view', title: $t('entities.pricelevel.views.pickupview.title'), deResParameters: [], parameters: [{ pathName: 'pricelevels', parameterName: 'pricelevel' }, { pathName: 'pickupview', parameterName: 'pickupview' } ], placement:'' }"
style=""
@formitemvaluechange="onFormItemValueChange($event)">
</app-picker>
</app-form-item>
</i-col>
</row>
</app-form-group>
</i-col>
</row>
</i-form>
\ No newline at end of file
<template src="./quick-create-form.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { QuickCreateEditFormBase } from './quick-create-form-base';
/**
* form部件
*
* @export
* @class QuickCreateEditForm
* @extends {QuickCreateEditFormBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class QuickCreateEditForm extends QuickCreateEditFormBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, MainControlBase } from '@/studio-core';
import InvoiceService from '@/service/invoice/invoice-service';
import View_InvInfoService from './view-inv-info-portlet-service';
import { Environment } from '@/environments/environment';
/**
* dashboard_sysportlet1部件基类
*
* @export
* @class MainControlBase
* @extends {View_InvInfoPortletBase}
*/
export class View_InvInfoPortletBase extends MainControlBase {
/**
* 建构部件服务对象
*
* @type {View_InvInfoService}
* @memberof View_InvInfoPortletBase
*/
public service: View_InvInfoService = new View_InvInfoService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {InvoiceService}
* @memberof View_InvInfoPortletBase
*/
public appEntityService: InvoiceService = new InvoiceService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof View_InvInfoPortletBase
*/
protected appDeName: string = 'invoice';
/**
* 长度
*
* @type {number}
* @memberof View_InvInfo
*/
@Prop() public height?: number;
/**
* 宽度
*
* @type {number}
* @memberof View_InvInfo
*/
@Prop() public width?: number;
/**
* 是否自适应大小
*
* @returns {boolean}
* @memberof View_InvInfoBase
*/
@Prop({default: false})public isAdaptiveSize!: boolean;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof View_InvInfoBase
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof View_InvInfoBase
*/
public getData(): any {
return {};
}
/**
* 获取高度
*
* @returns {any[]}
* @memberof View_InvInfoBase
*/
get getHeight(): any{
if(!this.$util.isEmpty(this.height) && !this.$util.isNumberNaN(this.height)){
if(this.height == 0){
return 'auto';
} else {
return this.height+'px';
}
} else {
return '300px';
}
}
/**
* vue 生命周期
*
* @memberof View_InvInfoBase
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof View_InvInfoBase
*/
public afterCreated(){
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
const refs: any = this.$refs;
Object.keys(refs).forEach((_name: string) => {
this.viewState.next({ tag: _name, action: action, data: data });
});
});
}
}
/**
* vue 生命周期
*
* @memberof View_InvInfoBase
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof View_InvInfoBase
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
}
/**
* View_InvInfo 部件模型
*
* @export
* @class View_InvInfoModel
*/
export default class View_InvInfoModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof View_InvInfoModel
*/
public getDataItems(): any[] {
return [
{
name: 'billto_line1',
},
{
name: 'billto_telephone',
},
{
name: 'owneridtype',
},
{
name: 'accountidyominame',
},
{
name: 'lastonholdtime',
},
{
name: 'billto_stateorprovince',
},
{
name: 'duedate',
},
{
name: 'pricingerrorcode',
},
{
name: 'traversedpath',
},
{
name: 'totaldiscountamount_base',
},
{
name: 'totalamountlessfreight_base',
},
{
name: 'contactidyominame',
},
{
name: 'customeridyominame',
},
{
name: 'lastbackofficesubmit',
},
{
name: 'shipto_telephone',
},
{
name: 'billto_city',
},
{
name: 'createman',
},
{
name: 'shipto_composite',
},
{
name: 'overriddencreatedon',
},
{
name: 'billto_postalcode',
},
{
name: 'freightamount_base',
},
{
name: 'invoicename',
},
{
name: 'updatedate',
},
{
name: 'shipto_city',
},
{
name: 'totalamount',
},
{
name: 'customerid',
},
{
name: 'totalamount_base',
},
{
name: 'billto_name',
},
{
name: 'timezoneruleversionnumber',
},
{
name: 'description',
},
{
name: 'utcconversiontimezonecode',
},
{
name: 'freightamount',
},
{
name: 'prioritycode',
},
{
name: 'discountamount_base',
},
{
name: 'onholdtime',
},
{
name: 'shipto_country',
},
{
name: 'paymenttermscode',
},
{
name: 'shipto_freighttermscode',
},
{
name: 'updateman',
},
{
name: 'shipto_line3',
},
{
name: 'totaltax',
},
{
name: 'billto_line2',
},
{
name: 'createdate',
},
{
name: 'exchangerate',
},
{
name: 'shipto_line1',
},
{
name: 'invoice',
prop: 'invoiceid',
},
{
name: 'discountpercentage',
},
{
name: 'totallineitemamount_base',
},
{
name: 'stageid',
},
{
name: 'entityimage_url',
},
{
name: 'statecode',
},
{
name: 'totalamountlessfreight',
},
{
name: 'totaltax_base',
},
{
name: 'shipto_line2',
},
{
name: 'billto_country',
},
{
name: 'entityimage',
},
{
name: 'importsequencenumber',
},
{
name: 'customeridtype',
},
{
name: 'shipto_fax',
},
{
name: 'ownerid',
},
{
name: 'datedelivered',
},
{
name: 'owneridyominame',
},
{
name: 'entityimage_timestamp',
},
{
name: 'processid',
},
{
name: 'totaldiscountamount',
},
{
name: 'pricelocked',
},
{
name: 'willcall',
},
{
name: 'billto_line3',
},
{
name: 'shipto_name',
},
{
name: 'statuscode',
},
{
name: 'totallineitemamount',
},
{
name: 'discountamount',
},
{
name: 'shipto_stateorprovince',
},
{
name: 'entityimageid',
},
{
name: 'versionnumber',
},
{
name: 'shipto_postalcode',
},
{
name: 'invoicenumber',
},
{
name: 'billto_composite',
},
{
name: 'emailaddress',
},
{
name: 'shippingmethodcode',
},
{
name: 'totallineitemdiscountamount',
},
{
name: 'billto_fax',
},
{
name: 'slaname',
},
{
name: 'transactioncurrencyid',
},
{
name: 'pricelevelid',
},
{
name: 'salesorderid',
},
{
name: 'opportunityid',
},
{
name: 'slaid',
},
{
name: 'transactioncurrencyname',
},
{
name: 'pricelevelname',
},
{
name: 'salesordername',
},
{
name: 'opportunityname',
},
]
}
}
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* View_InvInfo 部件服务对象
*
* @export
* @class View_InvInfoService
*/
export default class View_InvInfoService extends ControlService {
}
<div class='portlet view-inv-info ' :style="{'height': isAdaptiveSize ? 'calc(100% - 16px)' : getHeight,}">
<p class='portlet-title'>
<span>
发票信息
</span>
</p>
<div class="portlet-with-title">
<invoice-info-invoice-view :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></invoice-info-invoice-view>
</div>
</div>
<template src="./view-inv-info-portlet.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { View_InvInfoPortletBase } from './view-inv-info-portlet-base';
/**
* dashboard_sysportlet1部件
*
* @export
* @class View_InvInfoPortlet
* @extends {View_InvInfoPortletBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class View_InvInfoPortlet extends View_InvInfoPortletBase { }
</script>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, MainControlBase } from '@/studio-core';
import SalesOrderService from '@/service/sales-order/sales-order-service';
import PickupViewpickupviewpanelService from './pickup-viewpickupviewpanel-pickupviewpanel-service';
import PickupViewpickupviewpanelModel from './pickup-viewpickupviewpanel-pickupviewpanel-model';
/**
* pickupviewpanel部件基类
*
* @export
* @class MainControlBase
* @extends {PickupViewpickupviewpanelPickupviewpanelBase}
*/
export class PickupViewpickupviewpanelPickupviewpanelBase extends MainControlBase {
/**
* 建构部件服务对象
*
* @type {PickupViewpickupviewpanelService}
* @memberof PickupViewpickupviewpanelPickupviewpanelBase
*/
public service: PickupViewpickupviewpanelService = new PickupViewpickupviewpanelService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {SalesOrderService}
* @memberof PickupViewpickupviewpanelPickupviewpanelBase
*/
public appEntityService: SalesOrderService = new SalesOrderService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof PickupViewpickupviewpanelPickupviewpanelBase
*/
protected appDeName: string = 'salesorder';
/**
* 选中数据字符串
*
* @type {string}
* @memberof PickupViewpickupviewpanel
*/
@Prop() public selectedData?: string;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof PickupViewpickupviewpanel
*/
public getDatas(): any[] {
return [];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof PickupViewpickupviewpanel
*/
public getData(): any {
return {};
}
/**
* 视图名称
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public view: any = {
viewname: 'sales-order-pickup-grid-view',
data: {},
}
/**
* 局部上下文
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public localContext: any = null;
/**
* 局部视图参数
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public localViewParam: any = null;
/**
* 视图数据
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public viewdata: string = JSON.stringify(this.context);
/**
* 视图参数
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public viewparam: string = JSON.stringify(this.viewparams);
/**
* 是否显示按钮
*
* @type {boolean}
* @memberof PickupViewpickupviewpanel
*/
@Prop({default: true}) public isShowButton!: boolean;
/**
* 是否单选
*
* @type {boolean}
* @memberof PickupViewpickupviewpanel
*/
@Prop() public isSingleSelect?: boolean;
/**
* 初始化完成
*
* @type {boolean}
* @memberof PickupViewpickupviewpanel
*/
public inited: boolean = false;
/**
* 视图数据变化
*
* @param {*} $event
* @memberof PickupViewpickupviewpanel
*/
public onViewDatasChange($event: any): void {
if($event.length>0){
$event.forEach((item:any,index:any) => {
let srfmajortext = item['salesordername'];
if(srfmajortext){
Object.assign($event[index],{srfmajortext: srfmajortext});
}
});
}
this.$emit('selectionchange', $event);
}
/**
* 视图数据被激活
*
* @param {*} $event
* @memberof PickupViewpickupviewpanel
*/
public viewDatasActivated($event: any): void {
this.$emit('activated', $event);
}
/**
* 视图加载完成
*
* @param {*} $event
* @memberof PickupViewpickupviewpanel
*/
public onViewLoad($event: any): void {
this.$emit('load', $event);
}
/**
* vue 生命周期
*
* @memberof PickupViewpickupviewpanel
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof PickupViewpickupviewpanel
*/
public afterCreated(){
this.initNavParam();
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
if (Object.is('load', action)) {
this.viewdata = JSON.stringify(this.context);
this.viewparam = JSON.stringify(Object.assign(data, this.viewparams));
this.inited = true;
}
});
}
}
/**
* 初始化导航参数
*
* @memberof PickupViewpickupviewpanel
*/
public initNavParam(){
if(this.localContext && Object.keys(this.localContext).length >0){
let _context:any = this.$util.computedNavData({},this.context,this.viewparams,this.localContext);
Object.assign(this.context,_context);
}
if(this.localViewParam && Object.keys(this.localViewParam).length >0){
let _param:any = this.$util.computedNavData({},this.context,this.viewparams,this.localViewParam);
Object.assign(this.viewparams,_param);
}
this.viewdata = JSON.stringify(this.context);
this.viewparam = JSON.stringify(this.viewparams);
}
/**
* vue 生命周期
*
* @memberof PickupViewpickupviewpanel
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof PickupViewpickupviewpanel
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
}
}
\ No newline at end of file
/**
* PickupViewpickupviewpanel 部件模型
*
* @export
* @class PickupViewpickupviewpanelModel
*/
export default class PickupViewpickupviewpanelModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof PickupViewpickupviewpanelModel
*/
public getDataItems(): any[] {
return [
{
name: 'entityimage',
},
{
name: 'pricingerrorcode',
},
{
name: 'shipto_country',
},
{
name: 'shipto_fax',
},
{
name: 'totallineitemamount_base',
},
{
name: 'billto_country',
},
{
name: 'totalamountlessfreight',
},
{
name: 'willcall',
},
{
name: 'discountamount_base',
},
{
name: 'datefulfilled',
},
{
name: 'billto_line3',
},
{
name: 'billto_line1',
},
{
name: 'utcconversiontimezonecode',
},
{
name: 'ownerid',
},
{
name: 'accountidyominame',
},
{
name: 'exchangerate',
},
{
name: 'entityimageid',
},
{
name: 'shipto_line3',
},
{
name: 'contactidyominame',
},
{
name: 'createman',
},
{
name: 'shipto_telephone',
},
{
name: 'stageid',
},
{
name: 'traversedpath',
},
{
name: 'updateman',
},
{
name: 'ordernumber',
},
{
name: 'timezoneruleversionnumber',
},
{
name: 'owneridyominame',
},
{
name: 'totaldiscountamount_base',
},
{
name: 'shipto_contactname',
},
{
name: 'requestdeliveryby',
},
{
name: 'statecode',
},
{
name: 'totallineitemdiscountamount',
},
{
name: 'shipto_freighttermscode',
},
{
name: 'totaltax',
},
{
name: 'shipto_line1',
},
{
name: 'discountpercentage',
},
{
name: 'prioritycode',
},
{
name: 'billto_composite',
},
{
name: 'customeridyominame',
},
{
name: 'statuscode',
},
{
name: 'shipto_addressid',
},
{
name: 'paymenttermscode',
},
{
name: 'billto_postalcode',
},
{
name: 'billto_addressid',
},
{
name: 'billto_telephone',
},
{
name: 'shipto_composite',
},
{
name: 'submitstatus',
},
{
name: 'submitstatusdescription',
},
{
name: 'emailaddress',
},
{
name: 'billto_city',
},
{
name: 'freightamount_base',
},
{
name: 'createdate',
},
{
name: 'salesorder',
prop: 'salesorderid',
},
{
name: 'freightamount',
},
{
name: 'shipto_stateorprovince',
},
{
name: 'discountamount',
},
{
name: 'totalamount',
},
{
name: 'totaldiscountamount',
},
{
name: 'totalamount_base',
},
{
name: 'importsequencenumber',
},
{
name: 'totalamountlessfreight_base',
},
{
name: 'updatedate',
},
{
name: 'versionnumber',
},
{
name: 'shipto_city',
},
{
name: 'billto_line2',
},
{
name: 'shipto_line2',
},
{
name: 'processid',
},
{
name: 'billto_name',
},
{
name: 'totallineitemamount',
},
{
name: 'lastonholdtime',
},
{
name: 'lastbackofficesubmit',
},
{
name: 'customeridtype',
},
{
name: 'submitdate',
},
{
name: 'billto_fax',
},
{
name: 'shipto_postalcode',
},
{
name: 'entityimage_url',
},
{
name: 'overriddencreatedon',
},
{
name: 'customerid',
},
{
name: 'billto_contactname',
},
{
name: 'onholdtime',
},
{
name: 'totaltax_base',
},
{
name: 'entityimage_timestamp',
},
{
name: 'freighttermscode',
},
{
name: 'billto_stateorprovince',
},
{
name: 'shipto_name',
},
{
name: 'salesordername',
},
{
name: 'owneridtype',
},
{
name: 'shippingmethodcode',
},
{
name: 'pricelocked',
},
{
name: 'description',
},
{
name: 'slaname',
},
{
name: 'quoteid',
},
{
name: 'slaid',
},
{
name: 'transactioncurrencyid',
},
{
name: 'opportunityid',
},
{
name: 'pricelevelid',
},
{
name: 'campaignid',
},
{
name: 'quotename',
},
{
name: 'transactioncurrencyname',
},
{
name: 'opportunityname',
},
{
name: 'pricelevelname',
},
{
name: 'campaignname',
},
]
}
}
\ No newline at end of file
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* PickupViewpickupviewpanel 部件服务对象
*
* @export
* @class PickupViewpickupviewpanelService
*/
export default class PickupViewpickupviewpanelService extends ControlService {
}
\ No newline at end of file
<div class='pickupviewpanel'>
<component
v-if="inited && view.viewname && !Object.is(view.viewname, '')"
:is="view.viewname"
class="viewcontainer3"
:viewdata="viewdata"
:viewparam="viewparam"
:viewDefaultUsage="false"
:isSingleSelect="isSingleSelect"
:selectedData="selectedData"
:isShowButton="isShowButton"
@viewdataschange="onViewDatasChange.apply(_self, arguments)"
@viewdatasactivated="viewDatasActivated.apply(_self, arguments)"
@viewload="onViewLoad.apply(_self, arguments)">
</component>
</div>
\ No newline at end of file
<template src="./pickup-viewpickupviewpanel-pickupviewpanel.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { PickupViewpickupviewpanelPickupviewpanelBase } from './pickup-viewpickupviewpanel-pickupviewpanel-base';
/**
* pickupviewpanel部件
*
* @export
* @class PickupViewpickupviewpanelPickupviewpanel
* @extends {PickupViewpickupviewpanelPickupviewpanelBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class PickupViewpickupviewpanelPickupviewpanel extends PickupViewpickupviewpanelPickupviewpanelBase { }
</script>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册