---
# System prepended metadata

title: A14 - MR30402 請款單資料維護：搜尋欄位新增一欄可由契約編號做搜尋
tags: [已處理]

---

#  A14 - MR30402 請款單資料維護：搜尋欄位新增一欄可由契約編號做搜尋

###### tags: `已處理`
## 問題

MR30402 請款單資料維護：搜尋欄位新增一欄可由契約編號做搜尋。

## 邏輯分析

新增搜尋欄位

## 更正程式碼

**修正模式:A**

mr30402_lis.jsp

166行
``` html
    <tr>     
     
     <td class="SynctFieldCaptionTD" nowrap>契約字號&nbsp;</td> 
      <td class="SynctDataTD">N&nbsp;-&nbsp;<input class="SynctInput" maxlength="4" size="3" value="<ccs:control name='s_PNOH_CYY'/>" name="<ccs:control name='s_PNOH_CYY' property='name'/>">&nbsp;-&nbsp;<input class="SynctInput" maxlength="5" size="4" value="<ccs:control name='s_PNOH_CSEQ_FROM'/>" name="<ccs:control name='s_PNOH_CSEQ_FROM' property='name'/>" onblur="setCV()">&nbsp;～&nbsp;<input class="SynctInput" value="<ccs:control name='s_PNOH_CSEQ_TO'/>" name="<ccs:control name='s_PNOH_CSEQ_TO' property='name'/>" maxlength="5" size="4">&nbsp;- 
        <select class="SynctSelect" name="<ccs:control name='s_PNOH_CSEQ1' property='name'/>">
          <option value="" selected>選擇值</option>
 <ccs:control name='s_PNOH_CSEQ1' property='options'/> 
        </select>
 </td> 

    </tr>
```


mr30402_lis.xml

42行

``` java
<TextBox name="s_PNOH_CYY" caption="契約字號(年度)" dataType="Text"
                controlSourceType="DataSource" controlSource=""
                required="False" unique="" format="" dbFormat="" verificationRule="" errorControl=""/>
        <TextBox name="s_PNOH_CSEQ_FROM" caption="契約字號(起流水號)" dataType="Integer"
                controlSourceType="DataSource" controlSource=""
                required="False" unique="" format="" dbFormat="" verificationRule="" errorControl=""/>
        <TextBox name="s_PNOH_CSEQ_TO" caption="契約字號(迄流水號)" dataType="Integer"
                controlSourceType="DataSource" controlSource=""
                required="False" unique="" format="" dbFormat="" verificationRule="" errorControl=""/>
        <ListBox name="s_PNOH_CSEQ1" caption="契約字號(子合約號)" dataType="Text"
                controlSourceType="DataSource" boundColumn="DEPT_ANO" textColumn="DEPT_NAME"
                connection="SynctConn" controlSource=""
                required="False" unique="" errorControl="" isHtml="">
            <Select query="SELECT DEPT_ANO, DEPT_NAME FROM BASC_DEPT" type="raw" orderBy="DEPT_ANO">
                <Where>
                    <WhereClause>
                        <Parameter name="UnitFilter65"/>
                        <Operation operator="And"/>
                        <Bracket>
                            <Expression expression="DEPT_KIND = '0'"/>
                            <Operation operator="Or"/>
                            <Expression expression="DEPT_KIND = '1'"/>
                        </Bracket>
                        <Operation operator="And"/>
                        <Expression expression="DEPT_DEL = '0'"/>

                    </WhereClause>
                    <WhereParameter name="UnitFilter65" field="DEPT_ANO" type="Text"
                            operation="BEGINS_WITH" useIsNull="False" sourceType="Session" sourceName="UnitFilter"
                            format="" dbFormat=""/>
                </Where>
            </Select>
        </ListBox>
```

167行
``` java
       <Operation operator="And"/>
                    <Parameter name="s_PNOH_CYY"/>
                    <Operation operator="And"/>
                    <Parameter name="s_PNOH_CSEQ_FROM"/>
                    <Operation operator="And"/>
                    <Parameter name="s_PNOH_CSEQ_END"/>
                    <Operation operator="And"/>
                    <Parameter name="s_PNOH_ANO"/>
```



193行

``` java
           <WhereParameter name="s_PNOH_CYY" field="PNOH_CYY" type="Float"
                        operation="EQUAL" useIsNull="False" sourceType="URL" sourceName="s_PNOH_CYY"
                        format="" dbFormat=""/>

                <WhereParameter name="s_PNOH_CYY" field="PNOH_CYY" type="Float"
                        operation="GREATER_THAN_OR_EQUAL" useIsNull="False" sourceType="URL" sourceName="s_PNOH_FROM"
                        format="" dbFormat=""/>
 
                 <WhereParameter name="s_PNOH_CSEQ_FROM" field="PNOH_CSEQ" type="Float"
                        operation="GREATER_THAN_OR_EQUAL" useIsNull="False" sourceType="URL" sourceName="s_PNOH_CSEQ_FROM"
                        format="" dbFormat=""/>
                <WhereParameter name="s_PNOH_CSEQ_END" field="PNOH_CSEQ" type="Float"
                        operation="LESS_THAN_OR_EQUAL" useIsNull="False" sourceType="URL" sourceName="s_PNOH_CSEQ_TO"
                        format="" dbFormat=""/>
                <WhereParameter name="s_PNOH_ANO" field="PNOH_ANO" type="Float"
                        operation="EQUAL" useIsNull="False" sourceType="URL" sourceName="s_PNOH_CSEQ1"
                        format="" dbFormat=""/>
```