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

tony001 发布系统代码 [后台服务,演示应用]

上级 48bea6f6
......@@ -560,23 +560,23 @@ export default class IBIZBOOKOptionView_layoutBase extends Vue {
* @param {*} [srfParentDeName] 父实体名称
*/
public panel_Layoutpanel_button_calluilogic1_click(args: any[], contextJO?:any, params?: any, $event?: any, xData?: any, actionContext?:any, srfParentDeName?:string) {
if (actionContext.viewType === 'APPLOGINVIEW') {
const length = Object.keys(actionContext.layoutData).length;
if (this.viewType === 'APPLOGINVIEW') {
const length = Object.keys(this.layoutData).length;
for (let i = length - 1; i >= 0; i--) {
const name = Object.keys(actionContext.layoutData)[i];
if (actionContext.layoutData.hasOwnProperty(name) && !Object.is(actionContext.layoutModelDetails[name].itemType, 'CONTAINER')) {
actionContext.handleValueChange({ name, value: null });
const name = Object.keys(this.layoutData)[i];
if (this.layoutData.hasOwnProperty(name) && !Object.is(this.layoutModelDetails[name].itemType, 'CONTAINER')) {
this.handleValueChange({ name, value: null });
}
}
actionContext.$nextTick(() => {
actionContext.$forceUpdate();
this.$nextTick(() => {
this.$forceUpdate();
})
} else {
const parentRef = actionContext.$parent;
const parentRef: any = this.$parent;
if (parentRef.closeView && (parentRef.closeView instanceof Function)) {
parentRef.closeView(args);
} else if (actionContext.closeView && (actionContext.closeView instanceof Function)) {
actionContext.closeView(args);
} else if (this.closeView && (this.closeView instanceof Function)) {
this.closeView(args);
}
}
}
......
......@@ -484,23 +484,23 @@ export default class IBIZCustomerMPickupView_layoutBase extends Vue {
* @param {*} [srfParentDeName] 父实体名称
*/
public panel_Layoutpanel_button_calluilogic2_click(args: any[], contextJO?:any, params?: any, $event?: any, xData?: any, actionContext?:any, srfParentDeName?:string) {
if (actionContext.viewType === 'APPLOGINVIEW') {
const length = Object.keys(actionContext.layoutData).length;
if (this.viewType === 'APPLOGINVIEW') {
const length = Object.keys(this.layoutData).length;
for (let i = length - 1; i >= 0; i--) {
const name = Object.keys(actionContext.layoutData)[i];
if (actionContext.layoutData.hasOwnProperty(name) && !Object.is(actionContext.layoutModelDetails[name].itemType, 'CONTAINER')) {
actionContext.handleValueChange({ name, value: null });
const name = Object.keys(this.layoutData)[i];
if (this.layoutData.hasOwnProperty(name) && !Object.is(this.layoutModelDetails[name].itemType, 'CONTAINER')) {
this.handleValueChange({ name, value: null });
}
}
actionContext.$nextTick(() => {
actionContext.$forceUpdate();
this.$nextTick(() => {
this.$forceUpdate();
})
} else {
const parentRef = actionContext.$parent;
const parentRef: any = this.$parent;
if (parentRef.closeView && (parentRef.closeView instanceof Function)) {
parentRef.closeView(args);
} else if (actionContext.closeView && (actionContext.closeView instanceof Function)) {
actionContext.closeView(args);
} else if (this.closeView && (this.closeView instanceof Function)) {
this.closeView(args);
}
}
}
......
......@@ -483,23 +483,23 @@ export default class IBIZCustomerPickupView_layoutBase extends Vue {
* @param {*} [srfParentDeName] 父实体名称
*/
public panel_Layoutpanel_button_calluilogic2_click(args: any[], contextJO?:any, params?: any, $event?: any, xData?: any, actionContext?:any, srfParentDeName?:string) {
if (actionContext.viewType === 'APPLOGINVIEW') {
const length = Object.keys(actionContext.layoutData).length;
if (this.viewType === 'APPLOGINVIEW') {
const length = Object.keys(this.layoutData).length;
for (let i = length - 1; i >= 0; i--) {
const name = Object.keys(actionContext.layoutData)[i];
if (actionContext.layoutData.hasOwnProperty(name) && !Object.is(actionContext.layoutModelDetails[name].itemType, 'CONTAINER')) {
actionContext.handleValueChange({ name, value: null });
const name = Object.keys(this.layoutData)[i];
if (this.layoutData.hasOwnProperty(name) && !Object.is(this.layoutModelDetails[name].itemType, 'CONTAINER')) {
this.handleValueChange({ name, value: null });
}
}
actionContext.$nextTick(() => {
actionContext.$forceUpdate();
this.$nextTick(() => {
this.$forceUpdate();
})
} else {
const parentRef = actionContext.$parent;
const parentRef: any = this.$parent;
if (parentRef.closeView && (parentRef.closeView instanceof Function)) {
parentRef.closeView(args);
} else if (actionContext.closeView && (actionContext.closeView instanceof Function)) {
actionContext.closeView(args);
} else if (this.closeView && (this.closeView instanceof Function)) {
this.closeView(args);
}
}
}
......
......@@ -484,23 +484,23 @@ export default class IBIZCustomerUsr2MPickupView_layoutBase extends Vue {
* @param {*} [srfParentDeName] 父实体名称
*/
public panel_Layoutpanel_button_calluilogic2_click(args: any[], contextJO?:any, params?: any, $event?: any, xData?: any, actionContext?:any, srfParentDeName?:string) {
if (actionContext.viewType === 'APPLOGINVIEW') {
const length = Object.keys(actionContext.layoutData).length;
if (this.viewType === 'APPLOGINVIEW') {
const length = Object.keys(this.layoutData).length;
for (let i = length - 1; i >= 0; i--) {
const name = Object.keys(actionContext.layoutData)[i];
if (actionContext.layoutData.hasOwnProperty(name) && !Object.is(actionContext.layoutModelDetails[name].itemType, 'CONTAINER')) {
actionContext.handleValueChange({ name, value: null });
const name = Object.keys(this.layoutData)[i];
if (this.layoutData.hasOwnProperty(name) && !Object.is(this.layoutModelDetails[name].itemType, 'CONTAINER')) {
this.handleValueChange({ name, value: null });
}
}
actionContext.$nextTick(() => {
actionContext.$forceUpdate();
this.$nextTick(() => {
this.$forceUpdate();
})
} else {
const parentRef = actionContext.$parent;
const parentRef: any = this.$parent;
if (parentRef.closeView && (parentRef.closeView instanceof Function)) {
parentRef.closeView(args);
} else if (actionContext.closeView && (actionContext.closeView instanceof Function)) {
actionContext.closeView(args);
} else if (this.closeView && (this.closeView instanceof Function)) {
this.closeView(args);
}
}
}
......
......@@ -531,23 +531,23 @@ export default class IBIZCustomerUsr2PickupView_layoutBase extends Vue {
* @param {*} [srfParentDeName] 父实体名称
*/
public panel_Layoutpanel_button_calluilogic2_click(args: any[], contextJO?:any, params?: any, $event?: any, xData?: any, actionContext?:any, srfParentDeName?:string) {
if (actionContext.viewType === 'APPLOGINVIEW') {
const length = Object.keys(actionContext.layoutData).length;
if (this.viewType === 'APPLOGINVIEW') {
const length = Object.keys(this.layoutData).length;
for (let i = length - 1; i >= 0; i--) {
const name = Object.keys(actionContext.layoutData)[i];
if (actionContext.layoutData.hasOwnProperty(name) && !Object.is(actionContext.layoutModelDetails[name].itemType, 'CONTAINER')) {
actionContext.handleValueChange({ name, value: null });
const name = Object.keys(this.layoutData)[i];
if (this.layoutData.hasOwnProperty(name) && !Object.is(this.layoutModelDetails[name].itemType, 'CONTAINER')) {
this.handleValueChange({ name, value: null });
}
}
actionContext.$nextTick(() => {
actionContext.$forceUpdate();
this.$nextTick(() => {
this.$forceUpdate();
})
} else {
const parentRef = actionContext.$parent;
const parentRef: any = this.$parent;
if (parentRef.closeView && (parentRef.closeView instanceof Function)) {
parentRef.closeView(args);
} else if (actionContext.closeView && (actionContext.closeView instanceof Function)) {
actionContext.closeView(args);
} else if (this.closeView && (this.closeView instanceof Function)) {
this.closeView(args);
}
}
}
......
......@@ -466,60 +466,62 @@ export default class AppLoginViewBase extends Vue {
* @param {*} [srfParentDeName] 父实体名称
*/
public panel_Usr1102196415_auth_loginbutton1_click(args: any[], contextJO?:any, params?: any, $event?: any, xData?: any, actionContext?:any, srfParentDeName?:string) {
const layoutData = args.length > 0 ? args[0] : {};
const layoutModelDetails: any = actionContext.layoutModelDetails || {};
let userNameKey: string = Object.keys(layoutModelDetails).find((key: string) => Object.is(layoutModelDetails[key].predefinedType, 'AUTH_USERID')) || '';
let passwordKey: string = Object.keys(layoutModelDetails).find((key: string) => Object.is(layoutModelDetails[key].predefinedType, 'AUTH_PASSWORD')) || '';
let messageKey: string = Object.keys(layoutModelDetails).find((key: string) => Object.is(layoutModelDetails[key].predefinedType, 'AUTH_LOGINMSG')) || '';
if (!userNameKey || !passwordKey) {
actionContext.$message({ message: '用户名或密码未配置!',type: 'warning'});
if (messageKey) {
actionContext.handleValueChange({ name: messageKey, value: '用户名或密码未配置!' });
}
}
const loginname: any = layoutData[userNameKey];
const password: any = layoutData[passwordKey];
if (!loginname || !password) {
actionContext.$message({ message: '请输入用户名与密码',type: 'warning'});
if (messageKey) {
actionContext.handleValueChange({ name: messageKey, value: '请输入用户名与密码' });
}
}
// 清除cookie
let leftTime = new Date();
leftTime.setTime(leftTime.getSeconds() - 1000);
document.cookie = "ibzuaa-token=;expires=" + leftTime.toUTCString();
const data = { loginname, password };
const post: Promise<any> = actionContext.$http.post('/v7/login', data, true);
post.then((response: any) => {
if (response && response.status === 200) {
const data = response.data;
if (data && data.token) {
localStorage.setItem('token', data.token);
Util.setCookie('ibzuaa-token',data.token,0);
}
if(data && data.user){
localStorage.setItem('user', JSON.stringify(data.user));
}
// 设置cookie,保存账号密码7天
Util.setCookie("loginname",loginname, 7);
// 跳转首页
const url: any = actionContext.$route.query.redirect ? actionContext.$route.query.redirect : '*';
actionContext.$router.push({path: url});
}
}).catch((error: any) => {
// 登录提示
const data = error.data;
if (data && data.message) {
if (this.viewType === 'APPLOGINVIEW') {
const layoutData = args.length > 0 ? args[0] : {};
const layoutModelDetails: any = this.layoutModelDetails || {};
let userNameKey: string = Object.keys(layoutModelDetails).find((key: string) => Object.is(layoutModelDetails[key].predefinedType, 'AUTH_USERID')) || '';
let passwordKey: string = Object.keys(layoutModelDetails).find((key: string) => Object.is(layoutModelDetails[key].predefinedType, 'AUTH_PASSWORD')) || '';
let messageKey: string = Object.keys(layoutModelDetails).find((key: string) => Object.is(layoutModelDetails[key].predefinedType, 'AUTH_LOGINMSG')) || '';
if (!userNameKey || !passwordKey) {
if (messageKey) {
actionContext.handleValueChange({ name: messageKey, value: data.message });
this.handleValueChange({ name: messageKey, value: '用户名或密码未配置!' });
} else {
this.$message({ message: '用户名或密码未配置!',type: 'warning'});
}
} else {
}
const loginname: any = layoutData[userNameKey];
const password: any = layoutData[passwordKey];
if (!loginname || !password) {
if (messageKey) {
actionContext.handleValueChange({ name: messageKey, value: actionContext.$t('components.login.loginfailed') });
this.handleValueChange({ name: messageKey, value: '请输入用户名与密码' });
} else {
this.$message({ message: '请输入用户名与密码',type: 'warning'});
}
}
});
// 清除cookie
let leftTime = new Date();
leftTime.setTime(leftTime.getSeconds() - 1000);
document.cookie = "ibzuaa-token=;expires=" + leftTime.toUTCString();
const data = { loginname, password };
const post: Promise<any> = this.$http.post('/v7/login', data, true);
post.then((response: any) => {
if (response && response.status === 200) {
const data = response.data;
if (data && data.token) {
localStorage.setItem('token', data.token);
Util.setCookie('ibzuaa-token',data.token,0);
}
if(data && data.user){
localStorage.setItem('user', JSON.stringify(data.user));
}
// 设置cookie,保存账号密码7天
Util.setCookie("loginname",loginname, 7);
// 跳转首页
const url: any = this.$route.query.redirect ? this.$route.query.redirect : '*';
this.$router.push({path: url});
}
}).catch((error: any) => {
// 登录提示
const data = error.data;
if (data) {
if (messageKey) {
this.handleValueChange({ name: messageKey, value: data.message || this.$t('components.login.loginfailed') });
}
}
});
} else {
this.$router.push({ path: "/login", query: { redirect: window.location.hash.replace("#", '') } });
}
}
/**
* 重置
......@@ -533,23 +535,23 @@ export default class AppLoginViewBase extends Vue {
* @param {*} [srfParentDeName] 父实体名称
*/
public panel_Usr1102196415_auth_resetinput1_click(args: any[], contextJO?:any, params?: any, $event?: any, xData?: any, actionContext?:any, srfParentDeName?:string) {
if (actionContext.viewType === 'APPLOGINVIEW') {
const length = Object.keys(actionContext.layoutData).length;
if (this.viewType === 'APPLOGINVIEW') {
const length = Object.keys(this.layoutData).length;
for (let i = length - 1; i >= 0; i--) {
const name = Object.keys(actionContext.layoutData)[i];
if (actionContext.layoutData.hasOwnProperty(name) && !Object.is(actionContext.layoutModelDetails[name].itemType, 'CONTAINER')) {
actionContext.handleValueChange({ name, value: null });
const name = Object.keys(this.layoutData)[i];
if (this.layoutData.hasOwnProperty(name) && !Object.is(this.layoutModelDetails[name].itemType, 'CONTAINER')) {
this.handleValueChange({ name, value: null });
}
}
actionContext.$nextTick(() => {
actionContext.$forceUpdate();
this.$nextTick(() => {
this.$forceUpdate();
})
} else {
const parentRef = actionContext.$parent;
const parentRef: any = this.$parent;
if (parentRef.closeView && (parentRef.closeView instanceof Function)) {
parentRef.closeView(args);
} else if (actionContext.closeView && (actionContext.closeView instanceof Function)) {
actionContext.closeView(args);
} else if (this.closeView && (this.closeView instanceof Function)) {
this.closeView(args);
}
}
}
......@@ -565,13 +567,13 @@ export default class AppLoginViewBase extends Vue {
* @param {*} [srfParentDeName] 父实体名称
*/
public panel_Usr1102196415_auth_logout1_click(args: any[], contextJO?:any, params?: any, $event?: any, xData?: any, actionContext?:any, srfParentDeName?:string) {
actionContext.$Modal.confirm({
this.$Modal.confirm({
title: '提示',
content: '确认要退出登录?',
okText: '确认',
cancelText: '取消',
onOk: () => {
actionContext.$http
this.$http
.get("/v7/logout")
.then((response: any) => {
if (response && response.status === 200) {
......@@ -580,7 +582,7 @@ export default class AppLoginViewBase extends Vue {
let leftTime = new Date();
leftTime.setTime(leftTime.getSeconds() - 1);
document.cookie = "ibzuaa-token=;expires=" + leftTime.toUTCString();
actionContext.$router.push({ name: "login" });
this.$router.push({ path: "/login", query: { redirect: window.location.hash.replace("#", '') } });
}
})
.catch((error: any) => {
......
......@@ -628,7 +628,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/
public load(opt: any = {}): void {
if(!this.loadAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZAPPEDITORListView' + (this.$t('app.searchForm.notConfig.loadAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZAPPEDITORGridView' + (this.$t('app.searchForm.notConfig.loadAction') as string) });
return;
}
const arg: any = { ...opt };
......@@ -664,7 +664,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/
public loadDraft(opt: any = {},mode?:string): void {
if(!this.loaddraftAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZAPPEDITORListView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZAPPEDITORGridView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) });
return;
}
const arg: any = { ...opt } ;
......
......@@ -202,9 +202,6 @@ export default class DefaultBase extends Vue implements ControlInterface {
const data = args && args.data ? args.data : this.getData() || {};
const event = args && args.event ? args.event : {};
let result: boolean = true;
if ('search;load;save'.indexOf(eventName) !== -1) {
result = await this.execute_engine_searchform_ctrl_logic(data, event);
}
if (!result) {
return false;
}
......@@ -212,17 +209,6 @@ export default class DefaultBase extends Vue implements ControlInterface {
return true;
}
/**
* 部件逻辑 -- engine_searchform
*
* @param {string} eventName 部件事件名称
* @param {any[]} data 数据
* @param {*} event 源事件对象
* @memberof DefaultBase
*/
public async execute_engine_searchform_ctrl_logic(data: any[], event?: any): Promise<boolean> {
return true;
}
......@@ -701,7 +687,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/
public load(opt: any = {}): void {
if(!this.loadAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr9GridView' + (this.$t('app.searchForm.notConfig.loadAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKCustomView_layout' + (this.$t('app.searchForm.notConfig.loadAction') as string) });
return;
}
const arg: any = { ...opt };
......@@ -737,7 +723,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/
public loadDraft(opt: any = {},mode?:string): void {
if(!this.loaddraftAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr9GridView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKCustomView_layout' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) });
return;
}
const arg: any = { ...opt } ;
......
......@@ -1352,7 +1352,7 @@ export default class GuideBorrowFormBase extends Vue implements ControlInterface
*/
public load(opt: any = {}): void {
if(!this.loadAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.loadaction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.loadaction') as string) });
return;
}
const arg: any = { ...opt };
......@@ -1387,7 +1387,7 @@ export default class GuideBorrowFormBase extends Vue implements ControlInterface
*/
public loadDraft(opt: any = {}): void {
if(!this.loaddraftAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.loaddraftaction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.loaddraftaction') as string) });
return;
}
const arg: any = { ...opt } ;
......@@ -1448,7 +1448,7 @@ export default class GuideBorrowFormBase extends Vue implements ControlInterface
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
if(!action){
let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction";
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.actionname') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.actionname') as string) });
return;
}
Object.assign(arg,{viewparams:this.viewparams});
......@@ -1556,7 +1556,7 @@ export default class GuideBorrowFormBase extends Vue implements ControlInterface
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
if(!action){
let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction";
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.actionname') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.actionname') as string) });
return;
}
Object.assign(arg,{viewparams:this.viewparams});
......@@ -1630,7 +1630,7 @@ export default class GuideBorrowFormBase extends Vue implements ControlInterface
public remove(opt:Array<any> = [],showResultInfo?: boolean): Promise<any> {
return new Promise((resolve: any, reject: any) => {
if(!this.removeAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.removeaction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.removeaction') as string) });
return;
}
const arg: any = opt[0];
......
......@@ -1318,7 +1318,7 @@ export default class GuideReturnFormBase extends Vue implements ControlInterface
*/
public load(opt: any = {}): void {
if(!this.loadAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.loadaction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.loadaction') as string) });
return;
}
const arg: any = { ...opt };
......@@ -1353,7 +1353,7 @@ export default class GuideReturnFormBase extends Vue implements ControlInterface
*/
public loadDraft(opt: any = {}): void {
if(!this.loaddraftAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.loaddraftaction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.loaddraftaction') as string) });
return;
}
const arg: any = { ...opt } ;
......@@ -1414,7 +1414,7 @@ export default class GuideReturnFormBase extends Vue implements ControlInterface
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
if(!action){
let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction";
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.actionname') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.actionname') as string) });
return;
}
Object.assign(arg,{viewparams:this.viewparams});
......@@ -1522,7 +1522,7 @@ export default class GuideReturnFormBase extends Vue implements ControlInterface
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
if(!action){
let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction";
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.actionname') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.actionname') as string) });
return;
}
Object.assign(arg,{viewparams:this.viewparams});
......@@ -1596,7 +1596,7 @@ export default class GuideReturnFormBase extends Vue implements ControlInterface
public remove(opt:Array<any> = [],showResultInfo?: boolean): Promise<any> {
return new Promise((resolve: any, reject: any) => {
if(!this.removeAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.removeaction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.removeaction') as string) });
return;
}
const arg: any = opt[0];
......
......@@ -1421,7 +1421,7 @@ export default class GuideViewFormBase extends Vue implements ControlInterface {
*/
public load(opt: any = {}): void {
if(!this.loadAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.loadaction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.loadaction') as string) });
return;
}
const arg: any = { ...opt };
......@@ -1456,7 +1456,7 @@ export default class GuideViewFormBase extends Vue implements ControlInterface {
*/
public loadDraft(opt: any = {}): void {
if(!this.loaddraftAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.loaddraftaction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.loaddraftaction') as string) });
return;
}
const arg: any = { ...opt } ;
......@@ -1517,7 +1517,7 @@ export default class GuideViewFormBase extends Vue implements ControlInterface {
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
if(!action){
let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction";
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.actionname') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.actionname') as string) });
return;
}
Object.assign(arg,{viewparams:this.viewparams});
......@@ -1625,7 +1625,7 @@ export default class GuideViewFormBase extends Vue implements ControlInterface {
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
if(!action){
let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction";
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.actionname') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.actionname') as string) });
return;
}
Object.assign(arg,{viewparams:this.viewparams});
......@@ -1699,7 +1699,7 @@ export default class GuideViewFormBase extends Vue implements ControlInterface {
public remove(opt:Array<any> = [],showResultInfo?: boolean): Promise<any> {
return new Promise((resolve: any, reject: any) => {
if(!this.removeAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.removeaction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.removeaction') as string) });
return;
}
const arg: any = opt[0];
......
......@@ -299,7 +299,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZOrderPickupGridViewBase
* @memberof IBIZOrderSF1GridViewBase
*/
public Edit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
......@@ -365,7 +365,7 @@ export default class MainBase extends Vue implements ControlInterface {
const data = args && args.data ? args.data : this.getData() || {};
const event = args && args.event ? args.event : {};
let result: boolean = true;
if ('rowdblclick;selectionchange;load;beforeload'.indexOf(eventName) !== -1) {
if ('rowdblclick;selectionchange;remove;load;beforeload'.indexOf(eventName) !== -1) {
result = await this.execute_engine_grid_ctrl_logic(data, event);
}
if (!result) {
......@@ -451,6 +451,20 @@ export default class MainBase extends Vue implements ControlInterface {
return this.selections[0];
}
/**
* 打开新建数据视图
*
* @type {any}
* @memberof MainBase
*/
@Prop() public newdata: any;
/**
* 打开编辑数据视图
*
* @type {any}
* @memberof MainBase
*/
@Prop() public opendata: any;
/**
* 是否嵌入关系界面
......@@ -983,7 +997,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/
public load(opt: any = {}, pageReset: boolean = false): void {
if(!this.fetchAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderPickupGridView'+(this.$t('app.gridpage.notConfig.fetchAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderSF1GridView'+(this.$t('app.gridpage.notConfig.fetchAction') as string) });
return;
}
if(pageReset){
......@@ -1078,7 +1092,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/
public async remove(datas: any[]): Promise<any> {
if(!this.removeAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderPickupGridView'+(this.$t('app.gridpage.notConfig.removeAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderSF1GridView'+(this.$t('app.gridpage.notConfig.removeAction') as string) });
return;
}
let _datas:any[] = [];
......@@ -1184,7 +1198,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/
public addBatch(arg: any = {}): void {
if(!this.fetchAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderPickupGridView'+(this.$t('app.gridpage.notConfig.fetchAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderSF1GridView'+(this.$t('app.gridpage.notConfig.fetchAction') as string) });
return;
}
if(!arg){
......@@ -2101,7 +2115,7 @@ export default class MainBase extends Vue implements ControlInterface {
try {
if(Object.is(item.rowDataState, 'create')){
if(!this.createAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderPickupGridView'+(this.$t('app.gridpage.notConfig.createAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderSF1GridView'+(this.$t('app.gridpage.notConfig.createAction') as string) });
}else{
Object.assign(item,{viewparams:this.viewparams});
let response = await this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator);
......@@ -2109,7 +2123,7 @@ export default class MainBase extends Vue implements ControlInterface {
}
}else if(Object.is(item.rowDataState, 'update')){
if(!this.updateAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderPickupGridView'+(this.$t('app.gridpage.notConfig.updateAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderSF1GridView'+(this.$t('app.gridpage.notConfig.updateAction') as string) });
}else{
Object.assign(item,{viewparams:this.viewparams});
if(item.ibizorder){
......@@ -2176,7 +2190,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/
public newRow(args: any[], params?: any, $event?: any, xData?: any): void {
if(!this.loaddraftAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderPickupGridView'+(this.$t('app.gridpage.notConfig.loaddraftAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZOrderSF1GridView'+(this.$t('app.gridpage.notConfig.loaddraftAction') as string) });
return;
}
let _this = this;
......
......@@ -104,6 +104,21 @@ export default class MainModel {
prop: 'n_ibizordername_like',
dataType: 'QUERYPARAM'
},
{
name: 'n_orderstate_eq',
prop: 'n_orderstate_eq',
dataType: 'QUERYPARAM'
},
{
name: 'n_ordertime_gt',
prop: 'n_ordertime_gt',
dataType: 'QUERYPARAM'
},
{
name: 'n_ordertime_lt',
prop: 'n_ordertime_lt',
dataType: 'QUERYPARAM'
},
{
name:'size',
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册