|
@@ -28,39 +28,26 @@
|
|
|
</tr>
|
|
|
</thead>
|
|
|
<tbody id="pay-content">
|
|
|
- <% if(isEdited && ctx.session.sessionUser.accountId === ctx.advance.uid) { %>
|
|
|
<tr>
|
|
|
<th width="150" class="text-center">支付比例</th>
|
|
|
<td class="text-right" width="405">
|
|
|
<div class="input-group input-group-sm">
|
|
|
<input type="number" class="pay-input form-control nospin text-right"
|
|
|
- max="<%- max_pr %>" min="1" step="0.01" placeholder="请填写支付比例,将自动计算本期金额" data-type="0"
|
|
|
- value="<%- advance.status === auditConst.status.uncheck || advance.status === auditConst.status.checkNo ? advance.pay_ratio : (advance.cur_amount && ctx.helper.mul(ctx.helper.div(advance.cur_amount, advancePayTotal), 100, 2) || 0) %>">
|
|
|
+ max="<%- max_pr %>" min="1" step="0.01" placeholder="请填写支付比例,将自动计算本期金额" data-type="0" <%- isEdited && ctx.session.sessionUser.accountId === ctx.advance.uid ? '' : 'disabled' %>
|
|
|
+ value="<%- advance.cur_amount && ctx.helper.mul(ctx.helper.div(advance.cur_amount, advancePayTotal), 100, 2) || 0 %>">
|
|
|
<div class="input-group-append"><span class="input-group-text">%</span></div>
|
|
|
</div>
|
|
|
</td>
|
|
|
<th width="150" class="text-center">本期金额</th>
|
|
|
<td class="text-right" width="405">
|
|
|
<div class="input-group input-group-sm">
|
|
|
- <input type="number" class="pay-input form-control nospin text-right" min="1"
|
|
|
+ <input type="number" class="pay-input form-control nospin text-right" min="1" <%- isEdited && ctx.session.sessionUser.accountId === ctx.advance.uid ? '' : 'disabled' %>
|
|
|
placeholder="请填写本期金额,将自动计算支付比例" data-type="1"
|
|
|
- value="<%- advance.status === auditConst.status.uncheck || advance.status === auditConst.status.checkNo ? ctx.helper.mul(advancePayTotal, ctx.helper.div(advance.pay_ratio, 100)).toFixed(decimal) : (advance.cur_amount && advance.cur_amount.toFixed(decimal)) %>">
|
|
|
+ value="<%- advance.cur_amount && advance.cur_amount.toFixed(decimal) %>">
|
|
|
<div class="input-group-append"><span class="input-group-text">元</span></div>
|
|
|
</div>
|
|
|
</td>
|
|
|
</tr>
|
|
|
- <% } else {%>
|
|
|
- <tr>
|
|
|
- <th width="150" class="text-center">支付比例</th>
|
|
|
- <td class="text-right" width="405">
|
|
|
- <%- advance.cur_amount && ctx.helper.mul(ctx.helper.div(advance.cur_amount, advancePayTotal), 100, 2) || 0 %>%
|
|
|
- </td>
|
|
|
- <th width="150" class="text-center">本期金额</th>
|
|
|
- <td class="text-right" width="405">
|
|
|
- <%- ctx.helper.formatMoney((advance.cur_amount || 0), ',', decimal) %>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <% } %>
|
|
|
<tr>
|
|
|
<th class="text-center">截止上期</th>
|
|
|
<td class="text-right" id="p_total1" width="405">
|
|
@@ -68,7 +55,7 @@
|
|
|
</td>
|
|
|
<th class="text-center">截止本期金额</th>
|
|
|
<td class="text-right" id="p_total2" width="405">
|
|
|
- <%- ctx.helper.formatMoney(advance.status === auditConst.status.uncheck || advance.status === auditConst.status.checkNo ? ctx.helper.add(ctx.helper.mul(advancePayTotal, ctx.helper.div(advance.pay_ratio, 100, decimal), decimal), (prevAdvance && prevAdvance.prev_total_amount || 0)) : (prevAdvance && prevAdvance.prev_total_amount + advance.cur_amount || (advance.cur_amount || 0)), ',', decimal) %>元
|
|
|
+ <%- ctx.helper.formatMoney((prevAdvance && prevAdvance.prev_total_amount + advance.cur_amount || (advance.cur_amount || 0)), ',', decimal) %>元
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|