<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>

                # 修改控件值【從改主】 >[info] 功能:一對多的從表字段改變后,關聯修改主表的字段。 場景:訂單明細表(子表)商品數量/單價發生改變時,訂單表(主表)的總金額跟著變。 [TOC] ## 創建表單 1.建立訂單表(主表)`jee_order` | 字段 | 描述 | | --- | --- | | order_no | 訂單編碼 | | money| 訂單總金額 | | note|訂單描述 | 2.建立明細表(子表)`jee_detail` | 字段 | 描述 | | --- | --- | | name| 商品名稱 | | price| 單價 | | num|數量 | ## 配置js增強 選中主表`jee_order`,點擊`“js增強”`添加js增強代碼: ![](https://img.kancloud.cn/5e/54/5e544f493711b27d5d7b19e4c15d59a2_793x471.png) 代碼示例: ``` jee_detail_onlChange(){ return { price(){ let total = 0 that.$refs['jee_detail'][0].getValues((err,values)=>{ if(values && values.length>0){ for(let item of values){ total+=item.price*item.num; } } that.triggleChangeValues({money: total}) }) }, num(){ let total = 0 that.$refs['jee_detail'][0].getValues((err,values)=>{ if(values && values.length>0){ for(let item of values){ total+=item.price*item.num; } } that.triggleChangeValues({money: total}) }) } } } ``` 測試表單: ![](https://img.kancloud.cn/b2/a9/b2a93592773cadb8555ac90548da16c3_1092x442.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>

                              哎呀哎呀视频在线观看