<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ## 表單值改變事件: **子表名_onlChange** ### 說明:當子表的值發生改變的時候,關聯修改主表的字段值。 ### 示例場景:訂單明細表(子表)商品數量/單價發生改變時,訂單表(主表)的總金額跟著變。 - 創建表單 1.建立訂單表(主表)`jee_order` | 字段 | 描述 | | --- | --- | | order_no | 訂單編碼 | | money| 訂單總金額 | | note|訂單描述 | 2.建立明細表(子表)`jee_detail` | 字段 | 描述 | | --- | --- | | name| 商品名稱 | | price| 單價 | | num|數量 | - 配置Js增強 ![](https://img.kancloud.cn/94/ac/94acbc0b0f6dc16232a37378979b45d7_797x394.png) - 代碼: ``` jee_detail_onlChange(){ return { price(){ let total = 0 // 使用getSubTableInstance方法替換原有的refmap取值 this.getSubTableInstance('jee_detail').getValues((err,values)=>{ if(values && values.length>0){ for(let item of values){ total+=item.price*item.num; } } this.triggleChangeValues({money: total}) }) }, num(){ let total = 0 // 使用getSubTableInstance方法替換原有的refmap取值 this.getSubTableInstance('jee_detail').getValues((err,values)=>{ if(values && values.length>0){ for(let item of values){ total+=item.price*item.num; } } this.triggleChangeValues({money: total}) }) } } } ``` >[info] 1.獲取子表表單或table的對象使用api:`this.getSubTableInstance('jee_detail')`,jee_detail為表名 > 2.this.getSubTableInstance('jee_detail').getValues獲取一對多子表的所有數據 > 3.如果想獲取一對一的表單所有值,使用:this.getSubTableInstance('jee_detail').getFieldsValue() - 表單效果 ![](https://img.kancloud.cn/0c/9c/0c9c9f423ab7c0f895bf6abe68fc1ac9_1158x522.png)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看