提交 63aaa672 编写于 作者: KK's avatar KK

搜索表单——update

上级 aef1f0ce
......@@ -5,32 +5,40 @@
<#if ctrl.render??>
${ctrl.render.code}
<#else>
<van-form ref='${ctrl.name}' class="app-form <#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<div ref='${ctrl.name}' class="app-form <#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#-- isNoTabHeader是否隐藏分页头部-->
<#if ctrl.isNoTabHeader()>
<#list ctrl.getPSDEFormPages() as formmenber>
${P.getPartCode(formmenber).code}
</#list>
<#else>
<van-tabs v-model="detailsModel.${ctrl.name}.activiedPage" @click="detailsModel.${ctrl.name}.clickPage($event)">
<ion-tabs class="app-form-tabs" @ionTabsDidChange="detailsModel.${ctrl.name}.clickPage($event)">
<#list ctrl.getPSDEFormPages() as formpage>
<van-tab name='${formpage.name}' :disabled="!detailsModel.${formpage.name}.visible">
<div slot="title" class="caption<#if formpage.getLabelPSSysCss?? && formpage.getLabelPSSysCss()??> ${formpage.getLabelPSSysCss().getCssName()}</#if>">
<#if formpage.getPSSysImage()??>
<#assign sysimage = formpage.getPSSysImage()/>
<#if sysimage.getImagePath() == "">
<i class="${sysimage.getCssClass()}" style="margin-right: 2px"></i>
<#else>
<img src="${sysimage.getImagePath()}" style="margin-right: 2px"/>
</#if>
</#if>
{{<#if langbase??>$t('${langbase}.details.${formpage.name}')<#else>'${formpage.getCaption()}'</#if>}}
</div>
${P.getPartCode(formpage).code}
</van-tab>
<ion-tab class="app-form-tab" tab="${formpage.name}">
<ion-row>
${P.getPartCode(formpage).code}
</ion-row>
</ion-tab>
</#list>
</van-tabs>
<ion-tab-bar slot="top">
<#list ctrl.getPSDEFormPages() as formpage>
<ion-tab-button tab="${formpage.name}" :disabled="!detailsModel.${formpage.name}.visible">
<ion-label class="caption<#if formpage.getLabelPSSysCss?? && formpage.getLabelPSSysCss()??> ${formpage.getLabelPSSysCss().getCssName()}</#if>">
<#if formpage.getPSSysImage()??>
<#assign sysimage = formpage.getPSSysImage()/>
<#if sysimage.getImagePath() == "">
<i class="${sysimage.getCssClass()}" style="margin-right: 2px"></i>
<#else>
<img src="${sysimage.getImagePath()}" style="margin-right: 2px"/>
</#if>
</#if>
{{<#if langbase??>$t('${langbase}.details.${formpage.name}')<#else>'${formpage.getCaption()}'</#if>}}
</ion-label>
</ion-tab-button>
</#list>
</ion-tab-bar>
</ion-tabs>
</#if>
</van-form>
</div>
</#if>
</template>
\ No newline at end of file
......@@ -17,7 +17,8 @@ ${item.render.code}
</#list>
</#if>
]"
:viewParam="context"
:context="context"
:viewparams="viewparams"
parameterName='${appde.getCodeName()?lower_case}'
refviewtype='<#if refView.getPSViewType()??>${refView.getPSViewType().getId()}</#if>'
refreshitems='<#if item.getRefreshItems()??>${item.getRefreshItems()}</#if>'
......@@ -25,6 +26,6 @@ ${item.render.code}
viewname='${srffilepath2(refView.codeName)}'
:data="JSON.stringify(this.data)"
@drdatasaved="drdatasaved($event)"
style="<#if item.getPSLayoutPos()?? && item.getPSLayoutPos().getLayout() == "FLEX">height: 100%</#if><#if item.getContentHeight() == 0><#if refView.getHeight() gt 0>height:${refView.getHeight()?c}px</#if><#else>height:${item.getContentHeight()?c}px</#if>;overflow: auto;">
style="<#if item.getPSLayoutPos()?? && item.getPSLayoutPos().getLayout() == "FLEX">height: 100%;</#if><#if item.getContentHeight() == 0><#if refView.getHeight() gt 0>height:${refView.getHeight()?c}px</#if><#else>height:${item.getContentHeight()?c}px;</#if>">
</app-form-druipart>
</#if>
......@@ -21,9 +21,7 @@ ${item.render.code}
${content}
</div>
<#else>
<van-row>
${content}
</van-row>
${content}
</#if>
</app-form-group>
</#if>
......@@ -336,7 +336,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
<#if formitem.getPSDEFormItemUpdate()??>
<#assign itemUpdate=formitem.getPSDEFormItemUpdate()/>
if(Object.is(name, '${formitem.name}')){
if (Object.is(name, '${formitem.name}')) {
const details: string[] = [<#list itemUpdate.getPSDEFIUpdateDetails() as detail><#if detail_index gt 0>, </#if>'${detail.getPSDEFormDetailName()?lower_case}'</#list>];
this.updateFormItems('${itemUpdate.codeName}', this.data, details, ${itemUpdate.isShowBusyIndicator()?c});
}
......@@ -822,8 +822,8 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
this.$nextTick(() => {
this.formState.next({ type: 'load', data: data });
});
} else if (response && response.status === 401) {
const { data: _data } = response;
} else if (response && response.status !== 401) {
const { error: _data } = response;
this.$notice.error(_data.message);
}
return response;
......@@ -856,8 +856,8 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
this.$nextTick(() => {
this.formState.next({ type: 'load', data: data });
});
} else if (response && response.status === 401) {
const { data: _data } = response;
} else if (response && response.status !== 401) {
const { error: _data } = response;
this.$notice.error(_data.message);
}
return response;
......@@ -897,7 +897,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
this.formState.next({ type: 'save', data: data });
});
} else if (response.status && response.status !== 401) {
const { data: _data } = response;
const { error: _data } = response;
if (Object.is(_data.status, 'BAD_REQUEST') && _data.parameters && _data.parameters.fieldErrors) {
this.resetValidates();
this.fillValidates(_data.parameters.fieldErrors)
......@@ -972,7 +972,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
}
</#if>
} else if (response && response.status !== 401) {
const { data: _data } = response;
const { error: _data } = response;
if (Object.is(_data.status, 'BAD_REQUEST') && _data.parameters && _data.parameters.fieldErrors) {
this.resetValidates();
this.fillValidates(_data.parameters.fieldErrors)
......@@ -1007,7 +1007,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
this.data.ismodify = false;
this.$notice.success((data.srfmajortext ? data.srfmajortext : '') + '&nbsp;删除成功!');
} else if (response && response.status !== 401) {
const { data: _data } = response;
const { error: _data } = response;
this.$notice.error(_data.message);
}
return response;
......@@ -1034,7 +1034,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
if (response && response.status === 200) {
this.$notice.success('工作流启动成功');
} else if (response && response.status !== 401) {
this.$notice.error('工作流启动失败, ' + response.info);
this.$notice.error('工作流启动失败, ' + response.error.message);
}
return response;
}
......@@ -1059,7 +1059,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
if (response && response.status === 200) {
this.$notice.success('工作流提交成功');
} else if (response && response.status !== 401) {
this.$notice.error('工作流提交失败, ' + response.info);
this.$notice.error('工作流提交失败, ' + response.error.message);
}
return response;
}
......@@ -1082,7 +1082,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
}
const arg: any = { ...data };
Object.assign(arg, this.viewparams);
const response: any = this.service.frontLogic(mode, { ...this.context }, arg, showloading);
const response: any = await this.service.frontLogic(mode, { ...this.context }, arg, showloading);
if (response && response.status === 200) {
const data = response.data;
const _data: any = {};
......@@ -1100,7 +1100,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
this.formState.next({ type: 'updateformitem', ufimode: arg.srfufimode, data: _data });
});
} else if (response && response.status !== 401) {
const { data: _data } = response;
const { error: _data } = response;
if (Object.is(_data.status, 'BAD_REQUEST') && _data.parameters && _data.parameters.fieldErrors) {
this.resetValidates();
this.fillValidates(_data.parameters.fieldErrors)
......
......@@ -81,7 +81,7 @@
</ion-header>
<#-- 搜索表单:BEGIN -->
<#if view.hasPSControl('c')>
<#if view.hasPSControl('searchform')>
<ion-menu side="start" content-id="main-content" ref='searchform<#if view.getName()??>${view.getName()}</#if>'>
<ion-header>
<ion-toolbar translucent>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册