banner
biuaxia

biuaxia

"万物皆有裂痕,那是光进来的地方。"
github
bilibili
tg_channel

Modification of the Natural Resources Department's Requirements

title: Modification of Natural Resources Department Requirements
date: 2021-09-02 15:38:07
comment: false
toc: true
category:

  • Landray
    tags:
  • Landray
  • Lanling
  • Requirements
  • Text

Requirements Document#

Natural Resources Department GKP Development Requirement Description August 3, 2021.zip

Text Adjustments#

Change "Flow Direction" to "Next Step Flow"#

As shown in the figure:

image.png


Modification method: Change lbpmNode.processingNode.operationsTDTitle.handlerOperationTypepass in src/com/landray/kmss/sys/lbpmservice/ApplicationResources.properties to Next Step Flow.

Change "Attachment List" to "Incoming Documents"#

Modification method:

In the resource file ApplicationResource.properties of the km/imissive module, find the keyword kmImissive(Receive|Send)Main.attList and replace it with Incoming Documents.

Change "Circulation" to "Synchronize Circulation"#

As shown in the figure:

image.png


Modification method: Change sysCirculationMain.button.circulation in src/com/landray/kmss/sys/circulation/ApplicationResources.properties to Synchronize Circulation.

Change "Document Information" to "Incoming Document Processing Note" and "Outgoing Document Approval Note"#

As shown in the figure:

image.png


Modification method:

  1. For outgoing documents, change kmImissiveSendMain.baseinfo in km/imissive/ApplicationResource.properties to Outgoing Document Approval Note.
  2. For incoming documents, change kmImissiveReceiveMain.baseinfo in km/imissive/ApplicationResource.properties to Incoming Document Processing Note.

Change "Document Body Menu" to "Draft Document"#

As shown in the figure:

image.png


Modification method: Change kmImissiveSendMain.docContent in src/com/landray/kmss/km/imissive/ApplicationResources.properties to Draft Document.

Interface Adjustments#

Such modifications are recommended to be handled by searching keywords through the browser's Network - Panel, rather than directly looking for code.

For example, to hide the body text, we can find unique fields like titleicon through search.

image.png

Then search for lui-tab-icon tab-icon-10 in the code, narrowing down to the desired result in the send/receive document JSP directory:

image.png

If the search results are too many, logical judgment based on the actual code is also necessary.

Move Submit Button to the Front#

As shown in the figure:

image.png


Modification method:

  1. Wait for the browser interface to load completely, then execute in Console:

    $.map(LUI("toolbar").buttons,function(item,index){  
        return item.config.text + item.config.order + "_" + item.config.click  
    })  
    
  2. Check the output; the part after _ is the method name, search in the JSP page.

    image.png

  3. Check the output's sorting number and navigate to the page according to specific rules.

    For example, in the browsing page, the actual order is

    0: "Delete1_Delete('kmImissiveSendMain.do?method=delete&fdId=17ba53c85e0c6448ecd9d63432e8064f');"  
    1: "Save1__saveFormData();"  
    2: "Collect1_openBookDia();"  
    3: "Cancel Collection1_deleteBookedMark(GetBookmarkUrl());"  
    4: "Circulate3_circulate();"  
    5: "Submit4_$('#process_review_button').click();"  
    6: "Submit4_lbpm.globals.extendRoleOptWindowSubmit('updateByPanel','right');"  
    7: "Edit5_editDoc();"  
    8: "Print5_printDoc();"  
    9: "Close5_Com_CloseWindow();"  
    

    The corresponding order is:

    image.png


    For example, in the editing page, the actual order is:

    0: "Close4_Com_CloseWindow()"  
    1: "Associate Configuration4_undefined"  
    2: "Submit5_submitOrUpdateDoc(document.kmImissiveSendMainForm, 'update');"  
    

    The corresponding order is:

    image.png


    Remember to handle the order according to different pages; the display order on each page may not be the same!

Hide Body and Attachment View for Non-Incoming Document Processes#

That is, when Incoming Document Not Processed (docStatus!=30), hide the menu items. As shown:

image.png


The modification method for the browsing page is:

  1. Find the file WebContent/km/imissive/km_imissive_receive_main/kmImissiveReceiveMain_singleTabContent.jsp
  2. Search for the keyword km-imissive:kmImissiveReceiveMain.attContent

The comparison before and after modification is as follows:

Before modification

<ui:content  title="${ lfn:message('km-imissive:kmImissiveReceiveMain.attContent') }" id="attPreview" titleicon="lui-tab-icon tab-icon-05">  
	<div id="attachment_preview">  
		<iframe width="100%" height="100%" frameborder="0" scrolling="auto" id="previewAttFrame" src="${KMSS_Parameter_ContextPath}sys/attachment/sys_att_main/sysAttMain_preview_noDataB.jsp"></iframe>  
	</div>  
</ui:content>  

After modification

<script>  
	console.log("Display Body and Attachment View Menu", '${kmImissiveReceiveMainForm.docStatus == '30'}');  
</script>  
<c:if test="${kmImissiveReceiveMainForm.docStatus == '30'}">  
  <ui:content  title="${ lfn:message('km-imissive:kmImissiveReceiveMain.attContent') }" id="attPreview" titleicon="lui-tab-icon tab-icon-05">  
		<div id="attachment_preview">  
			<iframe width="100%" height="100%" frameborder="0" scrolling="auto" id="previewAttFrame" src="${KMSS_Parameter_ContextPath}sys/attachment/sys_att_main/sysAttMain_preview_noDataB.jsp"></iframe>  
		</div>  
  </ui:content>  
</c:if>  

The modification method for the editing page is:

  1. Find the file WebContent/km/imissive/km_imissive_receive_main/kmImissiveReceiveMain_singleTabEditContent.jsp
  2. Search for the keyword km-imissive:kmImissiveReceiveMain.docContent
  3. Search for the keyword km-imissive:kmImissiveReceiveMain.attContent

The comparison before and after modification is as follows:

Before modification

<ui:content  title="${ lfn:message('km-imissive:kmImissiveReceiveMain.docContent') }"  style="padding:6px" id="attContent"  titleicon="lui-tab-icon tab-icon-10" >  
    <div class="lui_form_content_frame">  
        Content too long, omitted...  
    </div>  
</ui:content>  
<ui:content  title="${ lfn:message('km-imissive:kmImissiveReceiveMain.attContent') }" id="attPreview" titleicon="lui-tab-icon tab-icon-05">  
    <div id="attachment_preview">  
        <iframe width="100%" height="100%" frameborder="0" scrolling="auto" id="previewAttFrame" src="${KMSS_Parameter_ContextPath}sys/attachment/sys_att_main/sysAttMain_preview_noDataB.jsp"></iframe>  
    </div>  
</ui:content>  

After modification:

<script>  
    console.log("Display Body and Attachment View Menu", '${kmImissiveReceiveMainForm.docStatus == '30'}');  
</script>  
<c:if test="${kmImissiveReceiveMainForm.docStatus == '30'}">  
    <ui:content  title="${ lfn:message('km-imissive:kmImissiveReceiveMain.docContent') }"  style="padding:6px" id="attContent"  titleicon="lui-tab-icon tab-icon-10" >  
        <div class="lui_form_content_frame">  
            Content too long, omitted...  
        </div>  
    </ui:content>  
    <ui:content  title="${ lfn:message('km-imissive:kmImissiveReceiveMain.attContent') }" id="attPreview" titleicon="lui-tab-icon tab-icon-05">  
        <div id="attachment_preview">  
            <iframe width="100%" height="100%" frameborder="0" scrolling="auto" id="previewAttFrame" src="${KMSS_Parameter_ContextPath}sys/attachment/sys_att_main/sysAttMain_preview_noDataB.jsp"></iframe>  
        </div>  
    </ui:content>  
</c:if>  

Element Order Adjustment#

Modifying such requirements is similar to interface adjustments but requires flexibility.

Default Display of the First Attachment in the List#

Effect as shown:

image.png


Element order modification method:

  1. The browsing interface JSP file is: WebContent/km/imissive/km_imissive_(receive|send)_main/kmImissive(Receive|Send)Main_singleTabContent.jsp
  2. The editing interface JSP file is: WebContent/km/imissive/km_imissive_(receive|send)_main/kmImissive(Receive|Send)Main_singleTabEditContent.jsp
  3. Find the keyword kmImissive(Receive|Send)Main.attList
  4. Adjust the HTML container with this keyword to the first position of the parent container.

For example, the adjustment of the outgoing document editing interface, the code before adjustment is:

<ui:tabpanel id="barRightPanel" channel="barRightPanel" layout="${layout}">  

    <c:import url="/sys/workflow/import/sysWfProcess_edit.jsp" charEncoding="UTF-8">  
        <c:param name="formName" value="kmImissiveSendMainForm" />  
        <c:param name="fdKey" value="sendMainDoc" />  
        <c:param name="showHistoryOpers" value="true" />  
        <c:param name="isExpand" value="true" />  
        <c:param name="approveType" value="right" />  
        <c:param name="method" value="${param.method == 'addSend' or param.method == 'addSendOuter'? 'add':param.method}" />  
        <c:param name="approvePosition" value="right" />  
    </c:import>  
    <ui:content  title="${ lfn:message('km-imissive:kmImissiveSendMain.attList') }" id="attPreviewList" titleicon="lui-fm-icon lui-fm-icon-2">  
        <c:import url="/km/imissive/km_att_preview/sysAttPreview_view2.jsp" charEncoding="UTF-8">  
            <c:param name="wpsoaassist" value="${wpsoaassist}" />  
        </c:import>  
    </ui:content>  
    <c:import url="/sys/relation/import/sysRelationMain_edit.jsp" charEncoding="UTF-8">  
        <c:param name="formName" value="kmImissiveSendMainForm" />  
        <c:param name="approveType" value="right" />  
        <c:param name="needTitle" value="true" />  
    </c:import>  
        <ui:event event="indexChanged" args="data" >  
        if($('#main').hasClass("lui-slide-main-spread") && data.panel.id == 'barRightPanel'){  
            $("[data-lui-slide-btn]").trigger("click");  
        }  
    </ui:event>  
</ui:tabpanel>  

The code after adjustment is:

<ui:tabpanel id="barRightPanel" channel="barRightPanel" layout="${layout}">  
    <%--Attachment list placed first--%>  
    <ui:content  title="${ lfn:message('km-imissive:kmImissiveSendMain.attList') }" id="attPreviewList" titleicon="lui-fm-icon lui-fm-icon-2">  
        <c:import url="/km/imissive/km_att_preview/sysAttPreview_view2.jsp" charEncoding="UTF-8">  
            <c:param name="wpsoaassist" value="${wpsoaassist}" />  
        </c:import>  
    </ui:content>  

    <c:import url="/sys/workflow/import/sysWfProcess_edit.jsp" charEncoding="UTF-8">  
        <c:param name="formName" value="kmImissiveSendMainForm" />  
        <c:param name="fdKey" value="sendMainDoc" />  
        <c:param name="showHistoryOpers" value="true" />  
        <c:param name="isExpand" value="true" />  
        <c:param name="approveType" value="right" />  
        <c:param name="method" value="${param.method == 'addSend' or param.method == 'addSendOuter'? 'add':param.method}" />  
        <c:param name="approvePosition" value="right" />  
    </c:import>  
    <c:import url="/sys/relation/import/sysRelationMain_edit.jsp" charEncoding="UTF-8">  
        <c:param name="formName" value="kmImissiveSendMainForm" />  
        <c:param name="approveType" value="right" />  
        <c:param name="needTitle" value="true" />  
    </c:import>  
        <ui:event event="indexChanged" args="data" >  
        if($('#main').hasClass("lui-slide-main-spread") && data.panel.id == 'barRightPanel'){  
            $("[data-lui-slide-btn]").trigger("click");  
        }  
    </ui:event>  
</ui:tabpanel>  
Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.