找回密码
 立即注册

QQ登录

只需一步,快速开始

李军

论坛元老

36

主题

72

帖子

1万

积分

论坛元老

积分
18724

活字格认证

李军
论坛元老   /  发表于:2014-4-28 15:32  /   查看:4561  /  回复:1
<table class="tb_gray" width="100%">
                                      <tr>  
                                          <td class="tb_gray_block">提供方:</td>
                                          <td><wijmo:C1ComboBox ID="cbLoanVendor" runat="server" Width="172px" Height="18px" OnClientChanged="GetLoanByVendor" AutoPostBack="false"></wijmo:C1ComboBox></td>


function on_first_pay_rate_blur(obj) {
             var rate = parseFloat(obj.value);
             caculate_loan(rate);
         }

         function caculate_loan(rate) {
             var car_price = parseFloat($("#txtCarAmt").val());
             var first_pay_amt = car_price * rate;
             var loan_cash = car_price - first_pay_amt;
             //$("#panelLoan_cnt_txtFirstPayAmt").wijinputnumber("setValue", first_pay_amt, '');
             document.getElementById("panelLoan_cnt_txtFirstPayAmt").value = first_pay_amt.toFixed(2);
             document.getElementById("panelLoan_cnt_txtLoanCash").value = loan_cash.toFixed(2);
         }


非常紧急,麻烦帮忙解决一下

非常感谢
                                          <td class="tb_gray_block">贷款产品:</td>
                                          <td>
                                            <aspropDownList ID="ddlLoanProduct" runat="server"  Width="185px" Height="24px" AutoPostBack="false" CssClass="NBox"></aspropDownList>
                                          </td>
                                          <td class="tb_gray_block">贷款机构:</td>
                                          <td><wijmo:C1ComboBox ID="cbLoanOrg" runat="server" Width="172px" Height="18px" AutoPostBack="false"></wijmo:C1ComboBox></td>
                                      </tr>
                                      <tr>
                                          <td class="tb_gray_block">首付比例:</td>
                                          <td><wijmo:C1InputNumeric ID="txtFirstPayRate" runat="server" Width="178px" Height="18px" DecimalPlaces="4" MaxValue="1"  onblur="on_first_pay_rate_blur(this);"></wijmo:C1InputNumeric></td>
                                          <td class="tb_gray_block">首付金额:</td>
                                          <td><wijmo:C1InputNumeric ID="txtFirstPayAmt" runat="server" Width="178px" Height="18px"  onblur="on_first_pay_amt_blur(this);"></wijmo:C1InputNumeric></td>
                                          <td class="tb_gray_block">贷款金额:</td>
                                          <td><wijmo:C1InputNumeric ID="txtLoanCash" runat="server" Width="178px" Height="18px" ReadOnly="true"></wijmo:C1InputNumeric></td>
                                      </tr>
                                      <tr>
                                          <td class="tb_gray_block">按揭方式:</td>
                                          <td>
                                            <aspropDownList ID="ddlLoanType" runat="server"  Width="185px" Height="24px" CssClass="NBox"></aspropDownList>
                                          </td>
                                          <td class="tb_gray_block">贷款期限:</td>
                                          <td>
                                            <aspropDownList ID="ddlLoanTime" runat="server" Width="185px" Height="24px">
                                                <aspistItem Text="12" Selected="True"></aspistItem>
                                                <aspistItem Text="24"></aspistItem>
                                                <aspistItem Text="36"></aspistItem>
                                                <aspistItem Text="48"></aspistItem>
                                                <aspistItem Text="60"></aspistItem>
                                            </aspropDownList><i>月</i>
                                          </td>
                                          <td class="tb_gray_block">利率:</td>
                                          <td><wijmo:C1InputNumeric ID="txtLoanRate" runat="server" Width="178px" Height="18px" DecimalPlaces="4" MaxValue="1"></wijmo:C1InputNumeric></td>
                                      </tr>
                                    </table>

1 个回复

倒序浏览
iceman
社区贡献组   /  发表于:2014-4-28 17:31:00
沙发
回复 1楼李军的帖子

您好,
前台通过以下代码给 C1Numberic 赋值可以从后台获取:

  1.         function caculate_loan(rate) {
  2.             var car_price =200;
  3.             var first_pay_amt = car_price * rate;
  4.             var loan_cash = car_price - first_pay_amt;
  5.             var txtFirst = $(&quot;#txtFirstPayAmt&quot;);
  6.             txtFirst.c1inputnumeric(&quot;setValue&quot;, first_pay_amt, true);
  7.             var txtLoan = $(&quot;#txtLoanCash&quot;);
  8.             txtLoan.c1inputnumeric(&quot;setValue&quot;, loan_cash.toFixed(2), true);
  9.         }
复制代码


附件是我的 Demo 请参考:

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部