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

搜索表单——update

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