|
@@ -30,51 +30,51 @@
|
|
|
<tbody id="pay-content">
|
|
|
<% if(isEdited && ctx.session.sessionUser.accountId === ctx.advance.uid) { %>
|
|
|
<tr>
|
|
|
- <th width="150">支付比例</th>
|
|
|
- <td class="text-right">
|
|
|
+ <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" placeholder="请填写支付比例,将自动计算本期金额" data-type="0"
|
|
|
- value="<%- advance.cur_amount && ctx.helper.mul(ctx.helper.div(advance.cur_amount, advancePayTotal), 100, 2) || 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) %>">
|
|
|
<div class="input-group-append"><span class="input-group-text">%</span></div>
|
|
|
</div>
|
|
|
</td>
|
|
|
- <th width="150">本期金额</th>
|
|
|
- <td class="text-right">
|
|
|
+ <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"
|
|
|
placeholder="请填写本期金额,将自动计算支付比例" data-type="1"
|
|
|
- value="<%- advance.cur_amount && advance.cur_amount.toFixed(decimal) %>">
|
|
|
+ value="<%- advance.status === auditConst.status.uncheck || advance.status === auditConst.status.checkNo ? ctx.helper.mul(advancePayTotal, ctx.helper.div(advance.pay_ratio, 100, decimal), decimal) : (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">支付比例</th>
|
|
|
- <td class="text-right">
|
|
|
+ <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">本期金额</th>
|
|
|
- <td class="text-right">
|
|
|
+ <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>截止上期</th>
|
|
|
- <td class="text-right" id="p_total1">
|
|
|
- <%- ctx.helper.formatMoney((prevAdvance && prevAdvance.prev_total_amount || 0), ',', decimal) %>
|
|
|
+ <th class="text-center">截止上期</th>
|
|
|
+ <td class="text-right" id="p_total1" width="405">
|
|
|
+ <%- ctx.helper.formatMoney((prevAdvance && prevAdvance.prev_total_amount || 0), ',', decimal) %>元
|
|
|
</td>
|
|
|
- <th>截止本期金额</th>
|
|
|
- <td class="text-right" id="p_total2">
|
|
|
- <%- ctx.helper.formatMoney((prevAdvance && prevAdvance.prev_total_amount + advance.cur_amount || (advance.cur_amount || 0)), ',', decimal) %>
|
|
|
+ <th class="text-center">截止本期金额</th>
|
|
|
+ <td class="text-right" id="p_total2" width="405">
|
|
|
+ <%- ctx.helper.formatMoney((prevAdvance && prevAdvance.prev_total_amount + advance.cur_amount || (advance.cur_amount || 0)), ',', decimal) %>元
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
- <th>备注</th>
|
|
|
+ <th class="text-center" >备注</th>
|
|
|
<td colspan="3">
|
|
|
- <textarea id="ad-remark" class="form-control form-control-sm"
|
|
|
+ <textarea id="ad-remark" class="form-control form-control-sm" rows="2"
|
|
|
<%- isEdited && ctx.session.sessionUser.accountId === ctx.advance.uid ? '' : 'disabled' %>></textarea>
|
|
|
</td>
|
|
|
</tr>
|