| | |
| | | <tbody> |
| | | |
| | | <tr> |
| | | <td width="25%"> |
| | | <td width="17%"> |
| | | <label for="orderId">订单号</label> |
| | | </td> |
| | | <td width="25%"> |
| | | <td width="34%" colspan="2"> |
| | | {{ d.params.data.model.orderId || '' }} |
| | | </td> |
| | | <td width="25%"> |
| | | <td width="17%"> |
| | | <label for="shipAddress">学校</label> |
| | | </td> |
| | | <td width="25%"> |
| | | <td width="34%" colspan="2"> |
| | | {{ d.params.data.model.shipAddress || '' }} |
| | | </td> |
| | | </tr> |
| | |
| | | <td> |
| | | <label for="shi">市</label> |
| | | </td> |
| | | <td> |
| | | <td colspan="2"> |
| | | {{ d.params.data.model.shi || '' }} |
| | | </td> |
| | | <td> |
| | | <label for="quxian">区县</label> |
| | | </td> |
| | | <td> |
| | | <td colspan="2"> |
| | | {{ d.params.data.model.quxian || '' }} |
| | | </td> |
| | | </tr> |
| | |
| | | <td> |
| | | <label for="pianqu">片区</label> |
| | | </td> |
| | | <td> |
| | | <td colspan="2"> |
| | | {{ d.params.data.model.pianqu || '' }} |
| | | </td> |
| | | <td> |
| | | <label for="quxian">收货地址</label> |
| | | </td> |
| | | <td> |
| | | <td colspan="2"> |
| | | {{ d.params.data.model.shouhuoAddress || '' }} |
| | | </td> |
| | | </tr> |
| | |
| | | <td> |
| | | <label for="shipName">联系人</label> |
| | | </td> |
| | | <td> |
| | | <td colspan="2"> |
| | | {{ d.params.data.model.shipName || '' }} |
| | | </td> |
| | | <td> |
| | | <label for="shipMobile">联系电话</label> |
| | | </td> |
| | | <td> |
| | | <td colspan="2"> |
| | | {{ d.params.data.model.shipMobile || '' }} |
| | | </td> |
| | | </tr> |
| | |
| | | <td> |
| | | <label for="oldOrderAmount">计划金额</label> |
| | | </td> |
| | | <td > |
| | | <td colspan="2"> |
| | | <input id="oldOrderAmount" name="oldOrderAmount" type="number" class="layui-input" value="{{ d.params.data.model.oldOrderAmount || '' }}" readonly="readonly" /> |
| | | </td> |
| | | <td> |
| | | <label for="orderAmount">调整金额</label> |
| | | </td> |
| | | <td> |
| | | <input id="orderAmount" name="orderAmount" type="number" class="layui-input" value="{{ d.params.data.model.orderAmount || '' }}" readonly="readonly" /> |
| | | <td colspan="2"> |
| | | <input id="orderAmount" style="color:red;" name="orderAmount" type="number" class="layui-input" value="{{ d.params.data.model.orderAmount || '' }}" readonly="readonly" /> |
| | | </td> |
| | | </tr> |
| | | |
| | |
| | | <td > |
| | | <label for="keYongAmount">可用余额</label> |
| | | </td> |
| | | <td> |
| | | <input id="keYongAmount" name="keYongAmount" type="number" class="layui-input" value="{{ d.params.data.model.keYongAmount || '' }}" readonly="readonly" /> |
| | | <td colspan="2"> |
| | | <input type="hidden" name="huaFeiAmount" id="huaFeiAmount" value="{{d.params.data.model.huaFeiAmount }}"> |
| | | <input id="keYongAmount" style="color:red;" name="keYongAmount" type="number" class="layui-input" value="{{ d.params.data.model.keYongAmount }}" readonly="readonly" /> |
| | | </td> |
| | | <td> |
| | | <label for="status">订单状态</label> |
| | | </td> |
| | | <td> |
| | | <td colspan="2"> |
| | | {{ d.params.data.model.statusText || '' }} |
| | | </td> |
| | | </tr> |
| | |
| | | <td> |
| | | <label for="createTime">建立时间</label> |
| | | </td> |
| | | <td> |
| | | <td colspan="2"> |
| | | {{ d.params.data.model.createTime || '' }} |
| | | </td> |
| | | <td> |
| | | <label for="upDataTime">修改时间</label> |
| | | </td> |
| | | <td> |
| | | <td colspan="2"> |
| | | {{ d.params.data.model.upDataTime || '' }} |
| | | </td> |
| | | </tr> |
| | | |
| | | <tr> |
| | | <!--<tr> |
| | | <td style="background-color:lightsteelblue;" colspan="4"> |
| | | 原订单 |
| | | </td> |
| | | |
| | | </tr> |
| | | </tr>--> |
| | | <tr> |
| | | <td style="background-color:lightsteelblue;"> |
| | | 商品名称 |
| | |
| | | 单价(元) |
| | | </td> |
| | | <td style="background-color:lightsteelblue;"> |
| | | 数量 |
| | | 计划数量 |
| | | </td> |
| | | <td style="background-color:lightsteelblue;"> |
| | | 总价(元) |
| | | 计划金额(元) |
| | | </td> |
| | | <td style="background-color:lightsteelblue;"> |
| | | 调整数量 |
| | | </td> |
| | | <td style="background-color:lightsteelblue;"> |
| | | 调整金额(元) |
| | | </td> |
| | | </tr> |
| | | |
| | | {{# layui.each(d.params.data.modelItem1, function(index, item){ }} |
| | | <tr> |
| | | <td> |
| | | {{ item.name }} {{ item.specification }} |
| | | </td> |
| | | <td> |
| | | {{ item.price }} |
| | | </td> |
| | | <td> |
| | | {{ item.nums }} |
| | | </td> |
| | | <td> |
| | | {{ item.amount }} |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <input type="hidden" name="itemIdarray" value="{{item.idnew || '' }}"> |
| | | {{ item.name }} {{ item.specification }} |
| | | </td> |
| | | <td> |
| | | {{ item.price }} |
| | | <input type="hidden" name="price" value="{{item.price || '' }}"> |
| | | </td> |
| | | <td> |
| | | {{ item.nums }} |
| | | </td> |
| | | <td> |
| | | {{ item.amount }} |
| | | </td> |
| | | <td> |
| | | <input style="height:21px;" name="itemNumarray" lay-verType="tips" type="number" min="0" max="99999999" lay-verify="required|number" class="layui-input" placeholder="请输入数量" lay-reqText="请输入数量" value="{{ item.numsnew }}" onchange="changenum('{{ index }}')" /> |
| | | </td> |
| | | <td> |
| | | |
| | | |
| | | <input style="height:21px;" name="amount" type="number" class="layui-input" value="{{ item.amountnew }}" readonly="readonly" /> |
| | | </td> |
| | | </tr> |
| | | {{# }); }} |
| | | |
| | | |
| | | |
| | | <tr> |
| | | <!--<tr> |
| | | <td style="background-color:lightsteelblue;" colspan="4"> |
| | | 修改订单 |
| | | </td> |
| | |
| | | <td style="background-color:lightsteelblue;"> |
| | | 总价(元) |
| | | </td> |
| | | |
| | | </tr> |
| | | |
| | | {{# layui.each(d.params.data.modelItem2, function(index, item){ }} |
| | |
| | | <input name="amount" type="number" class="layui-input" value="{{ item.amount }}" readonly="readonly" /> |
| | | </td> |
| | | </tr> |
| | | {{# }); }} |
| | | {{# }); }}--> |
| | | |
| | | </tbody> |
| | | </table> |
| | |
| | | var itemNumarray = $("input[name='itemNumarray']:eq(" + index + ")").val(); |
| | | var price = $("input[name='price']:eq(" + index + ")").val(); |
| | | |
| | | |
| | | |
| | | |
| | | $("input[name='amount']:eq(" + index + ")").val((itemNumarray * price).toFixed(2)); |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | var huaFeiAmount = $('#huaFeiAmount').val(); |
| | | |
| | | |
| | | $('#orderAmount').val(zongjia); |
| | | |
| | | |
| | | |
| | | var yue = (parseFloat($('#oldOrderAmount').val()) - zongjia).toFixed(2); |
| | | var yue = (parseFloat($('#oldOrderAmount').val()) - zongjia - parseFloat($('#huaFeiAmount').val())).toFixed(2); |
| | | $('#keYongAmount').val(yue); |
| | | |
| | | |
| | | if (yue < 0) { |
| | | layer.msg("订单金额超出计划金额"); |
| | | layer.msg("可用余额不足"); |
| | | } |
| | | |
| | | } |