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

xignzi006 发布系统代码

上级 bdf6a31b
!!!!模版产生代码错误:---- /**
Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? * product
---- *
* @export
---- * @interface Product
FTL stack trace ("~" means nesting-related): */
- Failed at: #list item.getAllPSAppDEFields() as f... [in template "TEMPLCODE_zh_CN" at line 8, column 1] export interface Product {
----
\ No newline at end of file /**
* VendorID
*
* @returns {*}
* @memberof Product
*/
vendorid?: any;
/**
* ProductStructure
*
* @returns {*}
* @memberof Product
*/
productstructure?: any;
/**
* VersionNumber
*
* @returns {*}
* @memberof Product
*/
versionnumber?: any;
/**
* StageId
*
* @returns {*}
* @memberof Product
*/
stageid?: any;
/**
* StatusCode
*
* @returns {*}
* @memberof Product
*/
statuscode?: any;
/**
* EntityImage
*
* @returns {*}
* @memberof Product
*/
entityimage?: any;
/**
* OverriddenCreatedOn
*
* @returns {*}
* @memberof Product
*/
overriddencreatedon?: any;
/**
* StockItem
*
* @returns {*}
* @memberof Product
*/
stockitem?: any;
/**
* ImportSequenceNumber
*
* @returns {*}
* @memberof Product
*/
importsequencenumber?: any;
/**
* ValidFromDate
*
* @returns {*}
* @memberof Product
*/
validfromdate?: any;
/**
* SupplierName
*
* @returns {*}
* @memberof Product
*/
suppliername?: any;
/**
* ProductTypeCode
*
* @returns {*}
* @memberof Product
*/
producttypecode?: any;
/**
* EntityImageId
*
* @returns {*}
* @memberof Product
*/
entityimageid?: any;
/**
* EntityImage_Timestamp
*
* @returns {*}
* @memberof Product
*/
entityimage_timestamp?: any;
/**
* ProductUrl
*
* @returns {*}
* @memberof Product
*/
producturl?: any;
/**
* StandardCost
*
* @returns {*}
* @memberof Product
*/
standardcost?: any;
/**
* QuantityOnHand
*
* @returns {*}
* @memberof Product
*/
quantityonhand?: any;
/**
* CurrentCost
*
* @returns {*}
* @memberof Product
*/
currentcost?: any;
/**
* ExchangeRate
*
* @returns {*}
* @memberof Product
*/
exchangerate?: any;
/**
* ProductId
*
* @returns {*}
* @memberof Product
*/
productid?: any;
/**
* Description
*
* @returns {*}
* @memberof Product
*/
description?: any;
/**
* VendorName
*
* @returns {*}
* @memberof Product
*/
vendorname?: any;
/**
* DMTImportState
*
* @returns {*}
* @memberof Product
*/
dmtimportstate?: any;
/**
* EntityImage_URL
*
* @returns {*}
* @memberof Product
*/
entityimage_url?: any;
/**
* StockVolume
*
* @returns {*}
* @memberof Product
*/
stockvolume?: any;
/**
* QuantityDecimal
*
* @returns {*}
* @memberof Product
*/
quantitydecimal?: any;
/**
* VendorPartNumber
*
* @returns {*}
* @memberof Product
*/
vendorpartnumber?: any;
/**
* ValidToDate
*
* @returns {*}
* @memberof Product
*/
validtodate?: any;
/**
* Reparented
*
* @returns {*}
* @memberof Product
*/
reparented?: any;
/**
* CreateMan
*
* @returns {*}
* @memberof Product
*/
createman?: any;
/**
* ProcessId
*
* @returns {*}
* @memberof Product
*/
processid?: any;
/**
* CreateDate
*
* @returns {*}
* @memberof Product
*/
createdate?: any;
/**
* ProductNumber
*
* @returns {*}
* @memberof Product
*/
productnumber?: any;
/**
* Kit
*
* @returns {*}
* @memberof Product
*/
kit?: any;
/**
* UpdateDate
*
* @returns {*}
* @memberof Product
*/
updatedate?: any;
/**
* CurrentCost_Base
*
* @returns {*}
* @memberof Product
*/
currentcost_base?: any;
/**
* UpdateMan
*
* @returns {*}
* @memberof Product
*/
updateman?: any;
/**
* StockWeight
*
* @returns {*}
* @memberof Product
*/
stockweight?: any;
/**
* Size
*
* @returns {*}
* @memberof Product
*/
size?: any;
/**
* TimeZoneRuleVersionNumber
*
* @returns {*}
* @memberof Product
*/
timezoneruleversionnumber?: any;
/**
* UTCConversionTimeZoneCode
*
* @returns {*}
* @memberof Product
*/
utcconversiontimezonecode?: any;
/**
* productName
*
* @returns {*}
* @memberof Product
*/
productname?: any;
/**
* Price_Base
*
* @returns {*}
* @memberof Product
*/
price_base?: any;
/**
* Price
*
* @returns {*}
* @memberof Product
*/
price?: any;
/**
* TraversedPath
*
* @returns {*}
* @memberof Product
*/
traversedpath?: any;
/**
* HierarchyPath
*
* @returns {*}
* @memberof Product
*/
hierarchypath?: any;
/**
* StandardCost_Base
*
* @returns {*}
* @memberof Product
*/
standardcost_base?: any;
/**
* StateCode
*
* @returns {*}
* @memberof Product
*/
statecode?: any;
/**
* ParentProductId
*
* @returns {*}
* @memberof Product
*/
parentproductid?: any;
/**
* TransactionCurrencyId
*
* @returns {*}
* @memberof Product
*/
transactioncurrencyid?: any;
/**
* PriceLevelId
*
* @returns {*}
* @memberof Product
*/
pricelevelid?: any;
/**
* DefaultUoMId
*
* @returns {*}
* @memberof Product
*/
defaultuomid?: any;
/**
* DefaultUoMScheduleId
*
* @returns {*}
* @memberof Product
*/
defaultuomscheduleid?: any;
/**
* SubjectId
*
* @returns {*}
* @memberof Product
*/
subjectid?: any;
}
\ No newline at end of file
export default { export default {
fields: {
vendorid: 'VendorID',
productstructure: 'ProductStructure',
versionnumber: 'VersionNumber',
stageid: 'StageId',
statuscode: 'StatusCode',
entityimage: 'EntityImage',
overriddencreatedon: 'OverriddenCreatedOn',
stockitem: 'StockItem',
importsequencenumber: 'ImportSequenceNumber',
validfromdate: 'ValidFromDate',
suppliername: 'SupplierName',
producttypecode: 'ProductTypeCode',
entityimageid: 'EntityImageId',
entityimage_timestamp: 'EntityImage_Timestamp',
producturl: 'ProductUrl',
standardcost: 'StandardCost',
quantityonhand: 'QuantityOnHand',
currentcost: 'CurrentCost',
exchangerate: 'ExchangeRate',
productid: 'ProductId',
description: 'Description',
vendorname: 'VendorName',
dmtimportstate: 'DMTImportState',
entityimage_url: 'EntityImage_URL',
stockvolume: 'StockVolume',
quantitydecimal: 'QuantityDecimal',
vendorpartnumber: 'VendorPartNumber',
validtodate: 'ValidToDate',
reparented: 'Reparented',
createman: 'CreateMan',
processid: 'ProcessId',
createdate: 'CreateDate',
productnumber: 'ProductNumber',
kit: 'Kit',
updatedate: 'UpdateDate',
currentcost_base: 'CurrentCost_Base',
updateman: 'UpdateMan',
stockweight: 'StockWeight',
size: 'Size',
timezoneruleversionnumber: 'TimeZoneRuleVersionNumber',
utcconversiontimezonecode: 'UTCConversionTimeZoneCode',
productname: 'productName',
price_base: 'Price_Base',
price: 'Price',
traversedpath: 'TraversedPath',
hierarchypath: 'HierarchyPath',
standardcost_base: 'StandardCost_Base',
statecode: 'StateCode',
parentproductid: 'ParentProductId',
transactioncurrencyid: 'TransactionCurrencyId',
pricelevelid: 'PriceLevelId',
defaultuomid: 'DefaultUoMId',
defaultuomscheduleid: 'DefaultUoMScheduleId',
subjectid: 'SubjectId',
},
views: { views: {
gridview: { gridview: {
caption: "product", caption: "product",
......
export default { export default {
fields: {
vendorid: 'VendorID',
productstructure: 'ProductStructure',
versionnumber: 'VersionNumber',
stageid: 'StageId',
statuscode: 'StatusCode',
entityimage: 'EntityImage',
overriddencreatedon: 'OverriddenCreatedOn',
stockitem: 'StockItem',
importsequencenumber: 'ImportSequenceNumber',
validfromdate: 'ValidFromDate',
suppliername: 'SupplierName',
producttypecode: 'ProductTypeCode',
entityimageid: 'EntityImageId',
entityimage_timestamp: 'EntityImage_Timestamp',
producturl: 'ProductUrl',
standardcost: 'StandardCost',
quantityonhand: 'QuantityOnHand',
currentcost: 'CurrentCost',
exchangerate: 'ExchangeRate',
productid: 'ProductId',
description: 'Description',
vendorname: 'VendorName',
dmtimportstate: 'DMTImportState',
entityimage_url: 'EntityImage_URL',
stockvolume: 'StockVolume',
quantitydecimal: 'QuantityDecimal',
vendorpartnumber: 'VendorPartNumber',
validtodate: 'ValidToDate',
reparented: 'Reparented',
createman: 'CreateMan',
processid: 'ProcessId',
createdate: 'CreateDate',
productnumber: 'ProductNumber',
kit: 'Kit',
updatedate: 'UpdateDate',
currentcost_base: 'CurrentCost_Base',
updateman: 'UpdateMan',
stockweight: 'StockWeight',
size: 'Size',
timezoneruleversionnumber: 'TimeZoneRuleVersionNumber',
utcconversiontimezonecode: 'UTCConversionTimeZoneCode',
productname: 'productName',
price_base: 'Price_Base',
price: 'Price',
traversedpath: 'TraversedPath',
hierarchypath: 'HierarchyPath',
standardcost_base: 'StandardCost_Base',
statecode: 'StateCode',
parentproductid: 'ParentProductId',
transactioncurrencyid: 'TransactionCurrencyId',
pricelevelid: 'PriceLevelId',
defaultuomid: 'DefaultUoMId',
defaultuomscheduleid: 'DefaultUoMScheduleId',
subjectid: 'SubjectId',
},
views: { views: {
gridview: { gridview: {
caption: 'product', caption: 'product',
......
// 避免空文件,后台不让空文件过
.product-edit-view {
--product-edit-view: 0;
}
// 视图样式
// this is less
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import ProductEditViewBase from './product-edit-view-base.vue';
import view_form from '@widgets/product/main-form/main-form.vue';
@Component({
components: {
view_form,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$store.commit('addCurPageViewtag', { route: to, viewtag: vm.viewtag });
});
},
})
export default class ProductEditView extends ProductEditViewBase {
}
</script>
\ No newline at end of file
// 避免空文件,后台不让空文件过
.product-grid-view {
--product-grid-view: 0;
}
// 视图样式
// this is less
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import ProductGridViewBase from './product-grid-view-base.vue';
import view_grid from '@widgets/product/main-grid/main-grid.vue';
import view_searchform from '@widgets/product/default-searchform/default-searchform.vue';
@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 });
});
},
})
export default class ProductGridView extends ProductGridViewBase {
}
</script>
\ No newline at end of file
...@@ -63,6 +63,30 @@ const router = new Router({ ...@@ -63,6 +63,30 @@ const router = new Router({
...indexRoutes, ...indexRoutes,
], ],
}, },
{
path: '/products/:product?/gridview/:gridview?',
meta: {
caption: 'entities.product.views.gridview.caption',
parameters: [
{ pathName: 'products', parameterName: 'product' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/product/product-grid-view/product-grid-view.vue'),
},
{
path: '/products/:product?/editview/:editview?',
meta: {
caption: 'entities.product.views.editview.caption',
parameters: [
{ pathName: 'products', parameterName: 'product' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/product/product-edit-view/product-edit-view.vue'),
},
...globalRoutes, ...globalRoutes,
{ {
path: '/login/:login?', path: '/login/:login?',
......
!!!!模版产生代码错误:---- import { Http,Util } from '@/utils';
Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? import EntityService from '../entity-service';
----
----
FTL stack trace ("~" means nesting-related): /**
- Failed at: ${item.getKeyPSAppDEField().getCodeNa... [in template "TEMPLCODE_zh_CN" at line 435, column 26] * product服务对象基类
---- *
\ No newline at end of file * @export
* @class ProductServiceBase
* @extends {EntityServie}
*/
export default class ProductServiceBase extends EntityService {
/**
* Creates an instance of ProductServiceBase.
*
* @param {*} [opts={}]
* @memberof ProductServiceBase
*/
constructor(opts: any = {}) {
super(opts);
}
/**
* 初始化基础数据
*
* @memberof ProductServiceBase
*/
public initBasicData(){
this.APPLYDEKEY ='product';
this.APPDEKEY = 'productid';
this.APPDENAME = 'products';
this.APPDETEXT = 'productname';
this.APPNAME = 'ibizbusinesscentral';
this.SYSTEMNAME = 'ibizbusinesscentral';
}
// 实体接口
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ProductServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().get(`/products/${context.product}/select`,isloading);
}
/**
* Create接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ProductServiceBase
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
}
if(data.srffrontuf){
delete data.srffrontuf;
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/products`,data,isloading);
return res;
}
/**
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ProductServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/products/${context.product}`,isloading);
return res;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ProductServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().delete(`/products/${context.product}`,isloading);
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ProductServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/products/${context.product}/save`,data,isloading);
return res;
}
/**
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ProductServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/products/getdraft`,isloading);
res.data.product = data.product;
return res;
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ProductServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().post(`/products/${context.product}/checkkey`,data,isloading);
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ProductServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/products/${context.product}`,data,isloading);
return res;
}
/**
* FetchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ProductServiceBase
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/products/fetchdefault`,tempData,isloading);
}
}
\ No newline at end of file
...@@ -3,6 +3,16 @@ ...@@ -3,6 +3,16 @@
*/ */
export const viewstate: any = { export const viewstate: any = {
appviews: [ appviews: [
{
viewtag: '314a2bd00356d4c4523d4510ad0ca055',
viewmodule: 'Product',
viewname: 'productGridView',
viewaction: '',
viewdatachange: false,
refviews: [
'f66adb6cde916c7c4efbba4078660506',
],
},
{ {
viewtag: 'C52BC31D-D473-4EEF-A24E-B60E91F4B764', viewtag: 'C52BC31D-D473-4EEF-A24E-B60E91F4B764',
viewmodule: 'Ungroup', viewmodule: 'Ungroup',
...@@ -13,6 +23,15 @@ export const viewstate: any = { ...@@ -13,6 +23,15 @@ export const viewstate: any = {
'314a2bd00356d4c4523d4510ad0ca055', '314a2bd00356d4c4523d4510ad0ca055',
], ],
}, },
{
viewtag: 'f66adb6cde916c7c4efbba4078660506',
viewmodule: 'Product',
viewname: 'productEditView',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
], ],
createdviews: [], createdviews: [],
} }
\ 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
.ivu-tabs-no-animation>.ivu-tabs-content{
padding: 0 16px;
}
.ivu-card-head{
padding: 14px 0;
}
.app-search-form {
padding: 8px 14px 0;
.ivu-form-item{
margin-bottom: 8px;
}
.search_reset {
margin-right: 12px;
margin-bottom: 8px;
}
.search-button{
text-align: right;
}
}
.app-search-form-flex {
height: 100%;
> .ivu-row {
height: 100%;
> .ivu-tabs {
height: 100%;
display: flex;
flex-direction: column;
> .ivu-tabs-content {
flex-grow: 1;
overflow: auto;
> .ivu-tabs-tabpane {
height: 100%;
}
}
}
}
}
.app-tabpanel-flex {
height: 100%;
> .ivu-tabs-content {
height: calc(100% - 52px);
> .ivu-tabs-tabpane {
height: 100%;
}
}
}
// this is less
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import DefaultBase from './default-searchform-base.vue';
@Component({
components: {
}
})
export default class Default extends DefaultBase {
}
</script>
\ No newline at end of file
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import MainBase from './main-form-base.vue';
@Component({
components: {
}
})
export default class Main extends MainBase {
}
</script>
\ No newline at end of file
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import MainBase from './main-grid-base.vue';
@Component({
components: {
}
})
export default class Main extends MainBase {
}
</script>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册