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

lab_gzf 发布系统代码

上级 5a41b2b6
......@@ -180,6 +180,63 @@
}
]
},
{
"srfkey": "Salesorder__StateCode",
"emptytext": "未定义",
"codelisttype":"static",
"items": [
{
"id": "2",
"label": "已取消",
"text": "已取消",
"data":"",
"codename":"Item_2",
"value": "2",
"disabled": false
}
, {
"id": "3",
"label": "已完成",
"text": "已完成",
"data":"",
"codename":"Item_3",
"value": "3",
"disabled": false
}
, {
"id": "4",
"label": "已开发票",
"text": "已开发票",
"data":"",
"codename":"Item_4",
"value": "4",
"disabled": false
}
, {
"id": "1",
"label": "已提交",
"text": "已提交",
"data":"",
"codename":"Item_1",
"value": "1",
"disabled": false
}
, {
"id": "0",
"label": "有效",
"text": "有效",
"data":"",
"codename":"Item_0",
"value": "0",
"disabled": false
}
]
},
{
"srfkey": "List__MemberType",
"emptytext": "未定义",
......
......@@ -159,6 +159,16 @@
"viewtag": "07c5035fbb847e889f3dbb9657723f30",
"memo": ""
},
"salesorderedit_datapanelview": {
"title": "头部信息编辑",
"caption": "订单",
"viewtype": "DEEDITVIEW",
"viewmodule": "Sales",
"viewname": "SalesOrderEdit_DataPanelView",
"viewfilename": "sales-order-edit-data-panel-view",
"viewtag": "07e302308381c2bc8f62fac18515f689",
"memo": ""
},
"accountbyparentkey": {
"title": "客户表格视图",
"caption": "客户信息",
......
......@@ -24,6 +24,14 @@ export default {
"2": "赢单",
"empty": ""
},
Salesorder__StateCode: {
"2": "已取消",
"3": "已完成",
"4": "已开发票",
"1": "已提交",
"0": "有效",
"empty": ""
},
List__MemberType: {
"Account": "客户",
"Lead": "潜在客户",
......
......@@ -24,6 +24,14 @@ export default {
"2": "赢单",
"empty": "",
},
Salesorder__StateCode: {
"2": "已取消",
"3": "已完成",
"4": "已开发票",
"1": "已提交",
"0": "有效",
"empty": "",
},
List__MemberType: {
"Account": "客户",
"Lead": "潜在客户",
......
......@@ -109,6 +109,10 @@ export default {
caption: "订单",
title: "订单状态分页视图",
},
edit_datapanelview: {
caption: "订单",
title: "头部信息编辑",
},
editview: {
caption: "订单",
title: "订单编辑视图",
......@@ -225,6 +229,49 @@ export default {
uiactions: {
},
},
edit_datepanel_form: {
details: {
group1: "订单基本信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "订单",
srfmajortext: "销售订单名称",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
totalamount: "总金额",
statecode: "状态",
ownername: "负责人",
salesorderid: "订单",
},
uiactions: {
},
},
datapanel_form: {
details: {
button1: "头信息编辑",
grouppanel1: "分组面板",
group1: "订单基本信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "订单",
srfmajortext: "销售订单名称",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
totalamount: "总金额",
statecode: "状态",
ownername: "负责人",
salesorderid: "订单",
},
uiactions: {
salesorder_openedit_datapanelview: "头信息编辑",
},
},
main_form: {
details: {
group1: "salesorder基本信息",
......
......@@ -108,6 +108,10 @@ export default {
caption: "订单",
title: "订单状态分页视图",
},
edit_datapanelview: {
caption: "订单",
title: "头部信息编辑",
},
editview: {
caption: "订单",
title: "订单编辑视图",
......@@ -224,6 +228,49 @@ export default {
uiactions: {
},
},
edit_datepanel_form: {
details: {
group1: "订单基本信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "订单",
srfmajortext: "销售订单名称",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
totalamount: "总金额",
statecode: "状态",
ownername: "负责人",
salesorderid: "订单",
},
uiactions: {
},
},
datapanel_form: {
details: {
button1: "头信息编辑",
grouppanel1: "分组面板",
group1: "订单基本信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "订单",
srfmajortext: "销售订单名称",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
totalamount: "总金额",
statecode: "状态",
ownername: "负责人",
salesorderid: "订单",
},
uiactions: {
salesorder_openedit_datapanelview: "头信息编辑",
},
},
main_form: {
details: {
group1: "salesorder基本信息",
......
......@@ -188,6 +188,63 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => {
},
]
},
{
srfkey: "Salesorder__StateCode",
emptytext: "未定义",
"codelisttype":"static",
items: [
{
id: "2",
label: "已取消",
text: "已取消",
"data":"",
"codename":"Item_2",
value: "2",
disabled: false,
},
{
id: "3",
label: "已完成",
text: "已完成",
"data":"",
"codename":"Item_3",
value: "3",
disabled: false,
},
{
id: "4",
label: "已开发票",
text: "已开发票",
"data":"",
"codename":"Item_4",
value: "4",
disabled: false,
},
{
id: "1",
label: "已提交",
text: "已提交",
"data":"",
"codename":"Item_1",
value: "1",
disabled: false,
},
{
id: "0",
label: "有效",
text: "有效",
"data":"",
"codename":"Item_0",
value: "0",
disabled: false,
},
]
},
{
srfkey: "List__MemberType",
emptytext: "未定义",
......
......@@ -135,6 +135,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "CampaignGridView",
"viewtag": "07c5035fbb847e889f3dbb9657723f30"
},
"salesorderedit_datapanelview": {
"title": "头部信息编辑",
"caption": "订单",
"viewtype": "DEEDITVIEW",
"viewmodule": "Sales",
"viewname": "SalesOrderEdit_DataPanelView",
"viewtag": "07e302308381c2bc8f62fac18515f689"
},
"accountbyparentkey": {
"title": "客户表格视图",
"caption": "客户信息",
......
import { Subject } from 'rxjs';
import { EditViewBase } from '@/studio-core';
import SalesOrderService from '@/service/sales-order/sales-order-service';
import EditViewEngine from '@engine/view/edit-view-engine';
/**
* 头部信息编辑视图基类
*
* @export
* @class SalesOrderEdit_DataPanelViewBase
* @extends {EditViewBase}
*/
export class SalesOrderEdit_DataPanelViewBase extends EditViewBase {
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof SalesOrderEdit_DataPanelViewBase
*/
protected appDeName: string = 'salesorder';
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof SalesOrderEdit_DataPanelViewBase
*/
protected appDeKey: string = 'salesorderid';
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof SalesOrderEdit_DataPanelViewBase
*/
protected appDeMajor: string = 'salesordername';
/**
* 实体服务对象
*
* @type {SalesOrderService}
* @memberof SalesOrderEdit_DataPanelViewBase
*/
protected appEntityService: SalesOrderService = new SalesOrderService;
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof SalesOrderEdit_DataPanelViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof SalesOrderEdit_DataPanelViewBase
*/
protected model: any = {
srfCaption: 'entities.salesorder.views.edit_datapanelview.caption',
srfTitle: 'entities.salesorder.views.edit_datapanelview.title',
srfSubTitle: 'entities.salesorder.views.edit_datapanelview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof SalesOrderEdit_DataPanelViewBase
*/
protected containerModel: any = {
view_form: { name: 'form', type: 'FORM' },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = '07e302308381c2bc8f62fac18515f689';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof SalesOrderEdit_DataPanelViewBase
*/
public engine: EditViewEngine = new EditViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof SalesOrderEdit_DataPanelViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
form: this.$refs.form,
p2k: '0',
keyPSDEField: 'salesorder',
majorPSDEField: 'salesordername',
isLoadDefault: true,
});
}
/**
* form 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SalesOrderEdit_DataPanelViewBase
*/
public form_save($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'save', $event);
}
/**
* form 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SalesOrderEdit_DataPanelViewBase
*/
public form_remove($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'remove', $event);
}
/**
* form 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SalesOrderEdit_DataPanelViewBase
*/
public form_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('form', 'load', $event);
}
}
\ No newline at end of file
<studio-view-style2 viewName="salesorderedit_datapanelview" viewTitle="头部信息编辑" class='deeditview sales-order-edit-data-panel-view'>
<view_form
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:autosave="true"
: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="./sales-order-edit-data-panel-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { SalesOrderEdit_DataPanelViewBase } from './sales-order-edit-data-panel-view-base';
import view_form from '@widgets/sales-order/edit-date-panel-form/edit-date-panel-form.vue';
/**
* 头部信息编辑视图
*
* @export
* @class SalesOrderEdit_DataPanelView
* @extends {SalesOrderEdit_DataPanelViewBase}
*/
@Component({
components: {
view_form,
}
})
@VueLifeCycleProcessing()
export default class SalesOrderEdit_DataPanelView extends SalesOrderEdit_DataPanelViewBase { }
</script>
......@@ -2,6 +2,7 @@ import { Subject } from 'rxjs';
import { TabExpViewBase } from '@/studio-core';
import SalesOrderService from '@/service/sales-order/sales-order-service';
import TabExpViewEngine from '@engine/view/tab-exp-view-engine';
import DataPanelEngine from '@engine/ctrl/data-panel-engine';
import SalesOrderUIService from '@/uiservice/sales-order/sales-order-ui-service';
/**
......@@ -79,6 +80,7 @@ export class SalesOrderInfoViewBase extends TabExpViewBase {
* @memberof SalesOrderInfoViewBase
*/
protected containerModel: any = {
view_datapanel: { name: 'datapanel', type: 'FORM' },
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
view_tabexppanel: { name: 'tabexppanel', type: 'TABEXPPANEL' },
};
......@@ -124,6 +126,15 @@ export class SalesOrderInfoViewBase extends TabExpViewBase {
*/
public engine: TabExpViewEngine = new TabExpViewEngine();
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof SalesOrderInfoViewBase
*/
public datapanel: DataPanelEngine = new DataPanelEngine();
/**
* 引擎初始化
*
......@@ -137,6 +148,13 @@ export class SalesOrderInfoViewBase extends TabExpViewBase {
majorPSDEField: 'salesordername',
isLoadDefault: true,
});
this.datapanel.init({
view: this,
datapanel: this.$refs.datapanel,
keyPSDEField: 'salesorder',
majorPSDEField: 'salesordername',
isLoadDefault: true,
});
}
/**
......
......@@ -2,6 +2,27 @@
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template>
<template slot="dataPanel">
<view_datapanel
: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="datapanel"
ref='datapanel'
@closeview="closeView($event)">
</view_datapanel>
</template>
<template slot="toolbar">
<view-toolbar mode="STYLE2" :model="toolBarModels" @item-click="toolbar_click($event)"/> </template>
<view_tabexppanel
......
......@@ -3,6 +3,7 @@
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { SalesOrderInfoViewBase } from './sales-order-info-view-base';
import view_datapanel from '@widgets/sales-order/data-panel-form/data-panel-form.vue';
import view_tabexppanel from '@widgets/sales-order/info-viewtabexppanel-tabexppanel/info-viewtabexppanel-tabexppanel.vue';
/**
......@@ -14,6 +15,7 @@ import view_tabexppanel from '@widgets/sales-order/info-viewtabexppanel-tabexppa
*/
@Component({
components: {
view_datapanel,
view_tabexppanel,
}
})
......
......@@ -15,6 +15,7 @@ export const PageComponents = {
Vue.component('product-price-level-pro-prilv-edit-view', () => import('@pages/product/product-price-level-pro-prilv-edit-view/product-price-level-pro-prilv-edit-view.vue'));
Vue.component('knowledge-article-incident-edit-view', () => import('@pages/service/knowledge-article-incident-edit-view/knowledge-article-incident-edit-view.vue'));
Vue.component('sales-order-invoice-grid-view', () => import('@pages/sales/sales-order-invoice-grid-view/sales-order-invoice-grid-view.vue'));
Vue.component('sales-order-edit-data-panel-view', () => import('@pages/sales/sales-order-edit-data-panel-view/sales-order-edit-data-panel-view.vue'));
Vue.component('invoice-by-parent-key', () => import('@pages/finance/invoice-by-parent-key/invoice-by-parent-key.vue'));
Vue.component('goal-info-goal-view', () => import('@pages/sales/goal-info-goal-view/goal-info-goal-view.vue'));
Vue.component('goal-info-view', () => import('@pages/sales/goal-info-view/goal-info-view.vue'));
......
......@@ -661,6 +661,103 @@ const router = new Router({
},
component: () => import('@pages/sales/sales-order-invoice-grid-view/sales-order-invoice-grid-view.vue'),
},
{
path: 'accounts/:account?/contacts/:contact?/opportunities/:opportunity?/quotes/:quote?/salesorders/:salesorder?/edit_datapanelview/:edit_datapanelview?',
meta: {
caption: 'entities.salesorder.views.edit_datapanelview.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'accounts', parameterName: 'account' },
{ pathName: 'contacts', parameterName: 'contact' },
{ pathName: 'opportunities', parameterName: 'opportunity' },
{ pathName: 'quotes', parameterName: 'quote' },
{ pathName: 'salesorders', parameterName: 'salesorder' },
{ pathName: 'edit_datapanelview', parameterName: 'edit_datapanelview' },
],
requireAuth: true,
},
component: () => import('@pages/sales/sales-order-edit-data-panel-view/sales-order-edit-data-panel-view.vue'),
},
{
path: 'contacts/:contact?/opportunities/:opportunity?/quotes/:quote?/salesorders/:salesorder?/edit_datapanelview/:edit_datapanelview?',
meta: {
caption: 'entities.salesorder.views.edit_datapanelview.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'contacts', parameterName: 'contact' },
{ pathName: 'opportunities', parameterName: 'opportunity' },
{ pathName: 'quotes', parameterName: 'quote' },
{ pathName: 'salesorders', parameterName: 'salesorder' },
{ pathName: 'edit_datapanelview', parameterName: 'edit_datapanelview' },
],
requireAuth: true,
},
component: () => import('@pages/sales/sales-order-edit-data-panel-view/sales-order-edit-data-panel-view.vue'),
},
{
path: 'accounts/:account?/opportunities/:opportunity?/quotes/:quote?/salesorders/:salesorder?/edit_datapanelview/:edit_datapanelview?',
meta: {
caption: 'entities.salesorder.views.edit_datapanelview.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'accounts', parameterName: 'account' },
{ pathName: 'opportunities', parameterName: 'opportunity' },
{ pathName: 'quotes', parameterName: 'quote' },
{ pathName: 'salesorders', parameterName: 'salesorder' },
{ pathName: 'edit_datapanelview', parameterName: 'edit_datapanelview' },
],
requireAuth: true,
},
component: () => import('@pages/sales/sales-order-edit-data-panel-view/sales-order-edit-data-panel-view.vue'),
},
{
path: 'opportunities/:opportunity?/quotes/:quote?/salesorders/:salesorder?/edit_datapanelview/:edit_datapanelview?',
meta: {
caption: 'entities.salesorder.views.edit_datapanelview.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'opportunities', parameterName: 'opportunity' },
{ pathName: 'quotes', parameterName: 'quote' },
{ pathName: 'salesorders', parameterName: 'salesorder' },
{ pathName: 'edit_datapanelview', parameterName: 'edit_datapanelview' },
],
requireAuth: true,
},
component: () => import('@pages/sales/sales-order-edit-data-panel-view/sales-order-edit-data-panel-view.vue'),
},
{
path: 'quotes/:quote?/salesorders/:salesorder?/edit_datapanelview/:edit_datapanelview?',
meta: {
caption: 'entities.salesorder.views.edit_datapanelview.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'quotes', parameterName: 'quote' },
{ pathName: 'salesorders', parameterName: 'salesorder' },
{ pathName: 'edit_datapanelview', parameterName: 'edit_datapanelview' },
],
requireAuth: true,
},
component: () => import('@pages/sales/sales-order-edit-data-panel-view/sales-order-edit-data-panel-view.vue'),
},
{
path: 'salesorders/:salesorder?/edit_datapanelview/:edit_datapanelview?',
meta: {
caption: 'entities.salesorder.views.edit_datapanelview.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'salesorders', parameterName: 'salesorder' },
{ pathName: 'edit_datapanelview', parameterName: 'edit_datapanelview' },
],
requireAuth: true,
},
component: () => import('@pages/sales/sales-order-edit-data-panel-view/sales-order-edit-data-panel-view.vue'),
},
{
path: 'accounts/:account?/contacts/:contact?/opportunities/:opportunity?/quotes/:quote?/salesorders/:salesorder?/invoices/:invoice?/byparentkey/:byparentkey?',
meta: {
......
......@@ -145,6 +145,15 @@ export const viewstate: any = {
'8206069d9567cbc0a06e441869343819',
],
},
{
viewtag: '07e302308381c2bc8f62fac18515f689',
viewmodule: 'Sales',
viewname: 'SalesOrderEdit_DataPanelView',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{
viewtag: '08e0772f0c42c435525ed40425ae4661',
viewmodule: 'Base',
......@@ -889,6 +898,7 @@ export const viewstate: any = {
'95a02c7480abd6ddb76e14dc079f7508',
'e0aef8c0d1f1ae28f628a0541b118961',
'fed62991d8068c42d2544ad0a9b4820b',
'07e302308381c2bc8f62fac18515f689',
],
},
{
......
......@@ -80,6 +80,7 @@ export default class SalesOrderUIServiceBase extends UIService {
*/
public initViewMap(){
this.allViewMap.set(':',{viewname:'statetabview',srfappde:'salesorders'});
this.allViewMap.set(':',{viewname:'edit_datapanelview',srfappde:'salesorders'});
this.allViewMap.set('EDITVIEW:',{viewname:'editview',srfappde:'salesorders'});
this.allViewMap.set(':',{viewname:'finishgridview',srfappde:'salesorders'});
this.allViewMap.set(':',{viewname:'infoview',srfappde:'salesorders'});
......@@ -291,6 +292,74 @@ export default class SalesOrderUIServiceBase extends UIService {
backend();
}
/**
* 头信息编辑
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
*/
public async SalesOrder_OpenEdit_DataPanelView(args: any[], context:any = {} ,params: any={}, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let data: any = {};
let parentContext:any = {};
let parentViewParam:any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'SINGLEKEY';
Object.assign(context, { salesorder: '%salesorder%' });
Object.assign(params, { salesorderid: '%salesorder%' });
Object.assign(params, { salesordername: '%salesordername%' });
if(_this.context){
parentContext = _this.context;
}
if(_this.viewparams){
parentViewParam = _this.viewparams;
}
context = UIActionTool.handleContextParam(actionTarget,_args,parentContext,parentViewParam,context);
data = UIActionTool.handleActionParam(actionTarget,_args,parentContext,parentViewParam,params);
context = Object.assign({},actionContext.context,context);
let parentObj:any = {srfparentdename:srfParentDeName?srfParentDeName:null,srfparentkey:srfParentDeName?context[srfParentDeName.toLowerCase()]:null};
Object.assign(data,parentObj);
Object.assign(context,parentObj);
let deResParameters: any[] = [];
if(context.quote && true){
deResParameters = [
{ pathName: 'quotes', parameterName: 'quote' },
]
}
const parameters: any[] = [
{ pathName: 'salesorders', parameterName: 'salesorder' },
];
const openPopOver = (view: any, data: any) => {
let container: Subject<any> = actionContext.$apppopover.openPop($event, view, context,data);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
const _this: any = actionContext;
if(window.opener){
window.opener.postMessage({status:'OK',identification:'WF'},Environment.uniteAddress);
window.close();
}
return result.datas;
});
}
const view: any = {
viewname: 'sales-order-edit-data-panel-view',
height: 300,
width: 300,
title: actionContext.$t('entities.salesorder.views.edit_datapanelview.title'),
placement: 'POPOVER',
};
openPopOver(view, data);
}
/**
* 完成订单
*
......
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, EditFormControlBase } from '@/studio-core';
import SalesOrderService from '@/service/sales-order/sales-order-service';
import DataPanelService from './data-panel-form-service';
import SalesOrderUIService from '@/uiservice/sales-order/sales-order-ui-service';
import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail';
/**
* datapanel部件基类
*
* @export
* @class EditFormControlBase
* @extends {DataPanelEditFormBase}
*/
export class DataPanelEditFormBase extends EditFormControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof DataPanelEditFormBase
*/
protected controlType: string = 'FORM';
/**
* 建构部件服务对象
*
* @type {DataPanelService}
* @memberof DataPanelEditFormBase
*/
public service: DataPanelService = new DataPanelService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {SalesOrderService}
* @memberof DataPanelEditFormBase
*/
public appEntityService: SalesOrderService = new SalesOrderService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof DataPanelEditFormBase
*/
protected appDeName: string = 'salesorder';
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public datapanel_button1_click(params: any = {}, tag?: any, $event?: any) {
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this;
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
const curUIService:SalesOrderUIService = new SalesOrderUIService();
curUIService.SalesOrder_OpenEdit_DataPanelView(datas,contextJO, paramJO, $event, xData,this,"SalesOrder");
}
/**
* 表单数据对象
*
* @type {*}
* @memberof DataPanelEditFormBase
*/
public data: any = {
srfupdatedate: null,
srforikey: null,
srfkey: null,
srfmajortext: null,
srftempmode: null,
srfuf: null,
srfdeid: null,
srfsourcekey: null,
totalamount: null,
statecode: null,
ownername: null,
salesorderid: null,
salesorder:null,
};
/**
* 属性值规则
*
* @type {*}
* @memberof DataPanelEditFormBase
*/
public rules: any = {
}
/**
* 详情模型集合
*
* @type {*}
* @memberof DataPanelEditFormBase
*/
public detailsModel: any = {
button1: new FormButtonModel({ caption: '头信息编辑', detailType: 'BUTTON', name: 'button1', visible: true, isShowCaption: false, form: this, showMoreMode: 0, uiaction: { type: 'DEUIACTION', tag: 'OpenEdit_DataPanelView', actiontarget: 'SINGLEKEY' } }),
grouppanel1: new FormGroupPanelModel({ caption: '分组面板', detailType: 'GROUPPANEL', name: 'grouppanel1', visible: true, isShowCaption: false, form: this, showMoreMode: 0, uiActionGroup: { caption: '', langbase: 'entities.salesorder.datapanel_form', extractMode: 'ITEM', details: [] } }),
group1: new FormGroupPanelModel({ caption: '订单基本信息', detailType: 'GROUPPANEL', name: 'group1', visible: true, isShowCaption: false, form: this, showMoreMode: 0, uiActionGroup: { caption: '', langbase: 'entities.salesorder.datapanel_form', extractMode: 'ITEM', details: [] } }),
formpage1: new FormPageModel({ caption: '基本信息', detailType: 'FORMPAGE', name: 'formpage1', visible: true, isShowCaption: true, form: this, showMoreMode: 0 }),
srfupdatedate: new FormItemModel({ caption: '更新时间', detailType: 'FORMITEM', name: 'srfupdatedate', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 0 }),
srforikey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srforikey', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srfkey: new FormItemModel({ caption: '订单', detailType: 'FORMITEM', name: 'srfkey', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srfmajortext: new FormItemModel({ caption: '销售订单名称', detailType: 'FORMITEM', name: 'srfmajortext', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srftempmode: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srftempmode', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srfuf: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfuf', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srfdeid: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfdeid', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srfsourcekey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfsourcekey', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
totalamount: new FormItemModel({ caption: '总金额', detailType: 'FORMITEM', name: 'totalamount', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
statecode: new FormItemModel({ caption: '状态', detailType: 'FORMITEM', name: 'statecode', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
ownername: new FormItemModel({ caption: '负责人', detailType: 'FORMITEM', name: 'ownername', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
salesorderid: new FormItemModel({ caption: '订单', detailType: 'FORMITEM', name: 'salesorderid', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
};
/**
* 表单 头信息编辑 事件
*
* @memberof @memberof DataPanelEditFormBase
*/
public button1_click($event: any): void {
this.datapanel_button1_click(null, null, $event);
}
}
\ No newline at end of file
/**
* DataPanel 部件模型
*
* @export
* @class DataPanelModel
*/
export default class DataPanelModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof DataPanelModel
*/
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: 'salesorderid',
dataType: 'GUID',
},
{
name: 'srfmajortext',
prop: 'salesordername',
dataType: 'TEXT',
},
{
name: 'srftempmode',
},
{
name: 'srfuf',
},
{
name: 'srfdeid',
},
{
name: 'srfsourcekey',
},
{
name: 'totalamount',
prop: 'totalamount',
dataType: 'BIGDECIMAL',
},
{
name: 'statecode',
prop: 'statecode',
dataType: 'NSCODELIST',
},
{
name: 'ownername',
prop: 'ownername',
dataType: 'TEXT',
},
{
name: 'salesorderid',
prop: 'salesorderid',
dataType: 'GUID',
},
{
name: 'salesorder',
prop: 'salesorderid',
dataType: 'FONTKEY',
},
]
}
}
\ No newline at end of file
<i-form :model="this.data" class='app-form info-form-mode' ref='datapanel' id='salesorder_datapanel' style="">
<input style="display:none;" />
<row >
<i-col v-show="detailsModel.group1.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group :model="detailsModel.group1" layoutType="FLEX" titleStyle="" class='' :uiActionGroup="detailsModel.group1.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.salesorder.datapanel_form.details.group1')" :isShowCaption="false" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="true" >
<div style="height: 100%;display: flex;">
<div v-show="detailsModel.totalamount.visible" :style="{}">
<app-form-item name='totalamount' :itemRules="this.rules.totalamount" class='datapanel-style' :caption="$t('entities.salesorder.datapanel_form.details.totalamount')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.totalamount.error" :isEmptyCaption="false" labelPos="BOTTOM">
<app-span name='totalamount' :value="data.totalamount" :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style=""></app-span>
</app-form-item>
</div>
<div v-show="detailsModel.statecode.visible" :style="{}">
<app-form-item name='statecode' :itemRules="this.rules.statecode" class='datapanel-style' :caption="$t('entities.salesorder.datapanel_form.details.statecode')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.statecode.error" :isEmptyCaption="false" labelPos="BOTTOM">
<app-span name='statecode' :value="data.statecode" tag='Salesorder__StateCode' codelistType='STATIC' :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style=""></app-span>
</app-form-item>
</div>
<div v-show="detailsModel.ownername.visible" :style="{}">
<app-form-item name='ownername' :itemRules="this.rules.ownername" class='datapanel-style' :caption="$t('entities.salesorder.datapanel_form.details.ownername')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.ownername.error" :isEmptyCaption="false" labelPos="BOTTOM">
<app-span name='ownername' :value="data.ownername" :data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style=""></app-span>
</app-form-item>
</div>
<div v-show="detailsModel.grouppanel1.visible" :style="{}">
<app-form-group :model="detailsModel.grouppanel1" layoutType="FLEX" titleStyle="" class='' :uiActionGroup="detailsModel.grouppanel1.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.salesorder.datapanel_form.details.grouppanel1')" :isShowCaption="false" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="true" >
<div style="height: 100%;display: flex;">
<div v-show="detailsModel.button1.visible" :style="{}">
<i-button type="primary" @click="button1_click($event)" class="form-btn-noborder-transparent"
style="">
<i class="fa fa-angle-down" style="margin-right: 2px;"></i>
</i-button>
</div>
</div>
</app-form-group>
</div>
</div>
</app-form-group>
</i-col>
</row>
</i-form>
\ No newline at end of file
.datapanel-style {
font-size:20px;font-weight:bold;text-align:left
}
.datapanel-style {
height: 48px;
margin-top: 2px;
margin-bottom: 0px!important;
margin-right: 5px;
padding-right: 5px;
border-right: 2px solid var(--app-dividing-line-color-bright) ;
}
.label-bottom {
.editor-wrapper {
height: 24px!important;
}
.app-form-item-label {
font-size: 12px;
font-weight: bold;
height: 24px!important;
line-height: 24px!important;
}
}
.form-btn-noborder-transparent {
background-color:rgba(255, 0, 0, 0);border-style:none;margin:0px 10px 0px 0px
}
.form-btn-noborder-transparent {
background-color:transparent!important;
border-style:none;
margin:0px 5px 0px 5px
}
<template src="./data-panel-form.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { DataPanelEditFormBase } from './data-panel-form-base';
/**
* datapanel部件
*
* @export
* @class DataPanelEditForm
* @extends {DataPanelEditFormBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class DataPanelEditForm extends DataPanelEditFormBase { }
</script>
<style lang='less'>
@import './data-panel-form.less';
</style>
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, EditFormControlBase } from '@/studio-core';
import SalesOrderService from '@/service/sales-order/sales-order-service';
import Edit_DatePanelService from './edit-date-panel-form-service';
import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail';
/**
* form部件基类
*
* @export
* @class EditFormControlBase
* @extends {Edit_DatePanelEditFormBase}
*/
export class Edit_DatePanelEditFormBase extends EditFormControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof Edit_DatePanelEditFormBase
*/
protected controlType: string = 'FORM';
/**
* 建构部件服务对象
*
* @type {Edit_DatePanelService}
* @memberof Edit_DatePanelEditFormBase
*/
public service: Edit_DatePanelService = new Edit_DatePanelService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {SalesOrderService}
* @memberof Edit_DatePanelEditFormBase
*/
public appEntityService: SalesOrderService = new SalesOrderService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof Edit_DatePanelEditFormBase
*/
protected appDeName: string = 'salesorder';
/**
* 表单数据对象
*
* @type {*}
* @memberof Edit_DatePanelEditFormBase
*/
public data: any = {
srfupdatedate: null,
srforikey: null,
srfkey: null,
srfmajortext: null,
srftempmode: null,
srfuf: null,
srfdeid: null,
srfsourcekey: null,
totalamount: null,
statecode: null,
ownername: null,
salesorderid: null,
salesorder:null,
};
/**
* 属性值规则
*
* @type {*}
* @memberof Edit_DatePanelEditFormBase
*/
public rules: any = {
statecode: [
{ required: true, type: 'number', message: '状态 值不能为空', trigger: 'change' },
{ required: true, type: 'number', message: '状态 值不能为空', trigger: 'blur' },
],
ownername: [
{ required: true, type: 'string', message: '负责人 值不能为空', trigger: 'change' },
{ required: true, type: 'string', message: '负责人 值不能为空', trigger: 'blur' },
],
}
/**
* 详情模型集合
*
* @type {*}
* @memberof Edit_DatePanelEditFormBase
*/
public detailsModel: any = {
group1: new FormGroupPanelModel({ caption: '订单基本信息', detailType: 'GROUPPANEL', name: 'group1', visible: true, isShowCaption: false, form: this, showMoreMode: 0, uiActionGroup: { caption: '', langbase: 'entities.salesorder.edit_datepanel_form', extractMode: 'ITEM', details: [] } }),
formpage1: new FormPageModel({ caption: '基本信息', detailType: 'FORMPAGE', name: 'formpage1', visible: true, isShowCaption: true, form: this, showMoreMode: 0 }),
srfupdatedate: new FormItemModel({ caption: '更新时间', detailType: 'FORMITEM', name: 'srfupdatedate', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 0 }),
srforikey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srforikey', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srfkey: new FormItemModel({ caption: '订单', detailType: 'FORMITEM', name: 'srfkey', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srfmajortext: new FormItemModel({ caption: '销售订单名称', detailType: 'FORMITEM', name: 'srfmajortext', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srftempmode: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srftempmode', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srfuf: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfuf', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srfdeid: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfdeid', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
srfsourcekey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfsourcekey', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
totalamount: new FormItemModel({ caption: '总金额', detailType: 'FORMITEM', name: 'totalamount', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
statecode: new FormItemModel({ caption: '状态', detailType: 'FORMITEM', name: 'statecode', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
ownername: new FormItemModel({ caption: '负责人', detailType: 'FORMITEM', name: 'ownername', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
salesorderid: new FormItemModel({ caption: '订单', detailType: 'FORMITEM', name: 'salesorderid', visible: true, isShowCaption: true, form: this, showMoreMode: 0, disabled: false, enableCond: 3 }),
};
}
\ No newline at end of file
/**
* Edit_DatePanel 部件模型
*
* @export
* @class Edit_DatePanelModel
*/
export default class Edit_DatePanelModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof Edit_DatePanelModel
*/
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: 'salesorderid',
dataType: 'GUID',
},
{
name: 'srfmajortext',
prop: 'salesordername',
dataType: 'TEXT',
},
{
name: 'srftempmode',
},
{
name: 'srfuf',
},
{
name: 'srfdeid',
},
{
name: 'srfsourcekey',
},
{
name: 'totalamount',
prop: 'totalamount',
dataType: 'BIGDECIMAL',
},
{
name: 'statecode',
prop: 'statecode',
dataType: 'NSCODELIST',
},
{
name: 'ownername',
prop: 'ownername',
dataType: 'TEXT',
},
{
name: 'salesorderid',
prop: 'salesorderid',
dataType: 'GUID',
},
{
name: 'salesorder',
prop: 'salesorderid',
dataType: 'FONTKEY',
},
]
}
}
\ No newline at end of file
<i-form :model="this.data" class='app-form' ref='form' id='salesorder_edit_datepanel' style="">
<input style="display:none;" />
<row >
<i-col v-show="detailsModel.group1.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group :model="detailsModel.group1" layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.group1.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.salesorder.edit_datepanel_form.details.group1')" :isShowCaption="false" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" >
<row>
<i-col v-show="detailsModel.totalamount.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='totalamount' :itemRules="this.rules.totalamount" class='' :caption="$t('entities.salesorder.edit_datepanel_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>
<i-col v-show="detailsModel.statecode.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='statecode' :itemRules="this.rules.statecode" class='' :caption="$t('entities.salesorder.edit_datepanel_form.details.statecode')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.statecode.error" :isEmptyCaption="false" labelPos="LEFT">
<dropdown-list
v-model="data.statecode"
:data="data"
:context="context"
:viewparams="viewparams"
:localContext ='{ }'
:localParam ='{ }'
:disabled="detailsModel.statecode.disabled"
tag='Salesorder__StateCode'
codelistType='STATIC'
placeholder='请选择...' style="">
</dropdown-list>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.ownername.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='ownername' :itemRules="this.rules.ownername" class='' :caption="$t('entities.salesorder.edit_datepanel_form.details.ownername')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.ownername.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.ownername" @enter="onEnter($event)" unit="" :disabled="detailsModel.ownername.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="./edit-date-panel-form.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { Edit_DatePanelEditFormBase } from './edit-date-panel-form-base';
/**
* form部件
*
* @export
* @class Edit_DatePanelEditForm
* @extends {Edit_DatePanelEditFormBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class Edit_DatePanelEditForm extends Edit_DatePanelEditFormBase { }
</script>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册