17.66版本:

增加按单据科目来弹出增加明细

首先在xml需要增加字段及相关属性,如果数据库TBILL表里没有这个字段先增加:

     

 <BILLC_DETAIL_ID  desc="" name="明细" detail="BILLC_SUBJECT_FEE=物料消耗(FY18.02)|7fd61776-39f7-49b2-8888-b2552a8c3c6e|800x360|800x360|物料明细填写|BILLC_CURR_AMOUNT=BILL_AMOUNT;BILLC_REMARK=BILL_REMARK▓BILLC_SUBJECT_FEE=水费(FY16.01)|7fd61776-39f7-49b2-8888-b2552a8c3c6e|800x360|请填写定额费用报销|BILLC_CURR_AMOUNT=BILL_AMOUNT;BILLC_REMARK=BILL_REMARK"/>

 

属性解释:

BILLC_SUBJECT_FEE=水费(FY16.01)|7fd61776-39f7-49b2-8888-b2552a8c3c6e|800x360|请填写定额费用报销|BILLC_CURR_AMOUNT=BILL_AMOUNT;BILLC_REMARK=BILL_REMARK

 

表示当费用科目选择 水费(FY16.01) 时,将会弹出模板ID为:7fd61776-39f7-49b2-8888-b2552a8c3c6e 的模板进行填写,“请填写定额费用报销” 为弹出窗口的标题,BILLC_CURR_AMOUNT=BILL_AMOUNT 表示当前模板的的字段值将从 弹出模板的字段 BILL_AMOUNT 回填,多个字段回填用;隔开


 注意:费用科目的字段必须添加属性 detail="Y"

      <BILLC_SUBJECT_FEE detail="Y" desc="" check="noempty" divsior="▓BILL_AUDIT_TYPE▓" name="报销明细,费用科目:" formula="''" select=" and '$BILL_AUDIT_TYPE_NAME$' LIKE '%'+SUBJECTF_REMARK+'%'"/


 

xsl文件修改,在回写的金额字段增加相关配置

                        <!--金额-->
                          <td align="right">
                            <span>
                              <input class="input" type="text" style="width:97%;text-align:right" align="right" onchange="ChangeValue(this,'SaveTable/TBILL_CONTENT[@num='+this.num+']/BILLC_CURR_AMOUNT',this.value);">
                                <xsl:attribute name="id">
                                  <xsl:value-of select="concat('BILLC_CURR_AMOUNT_ctl',@num,'')" />
                                </xsl:attribute>
                                <xsl:attribute name="value">
                                  <xsl:value-of select="format-number(BILLC_CURR_AMOUNT, '###,###.00', 'example')" />
                                </xsl:attribute>
                                <xsl:attribute name="num">
                                  <xsl:value-of select="@num" />
                                </xsl:attribute>
                                
                              <xsl:if test="BILLC_DETAIL_ID!=''">
                                <xsl:attribute name="readonly" >
                                </xsl:attribute>
                                  <xsl:attribute name="style">background-color:LightGreen;width:86%;text-align:right</xsl:attribute>   
                                  
                              <button class="search_small_01" onclick="fn_call('filed','金额明细','BILLC_DETAIL_ID',this.num)">
                                <xsl:attribute name="num">
                                  <xsl:value-of select="@num" />
                               </xsl:attribute>                             
                              </button>
                              
                              </xsl:if>
   
                            
                              </input>
                            </span>
                          </td>


<xsl:if test="BILLC_DETAIL_ID!=''"> 表示当通过弹出明细生成金额数据后将不再允许直接填写金额

同时背景颜色将更加突出:

 <xsl:attribute name="style">background-color:LightGreen;width:86%;text-align:right</xsl:attribute> 

 

这种判断后可以影响单元格的颜色

单据填写后和打开单据的效果:

wKiom1P0lJiAsbxQAADqYePHe8E020.jpg

wKioL1P0leSCtCZ1AAEopRi2LmQ937.jpg