76 lines
2.7 KiB
Plaintext
76 lines
2.7 KiB
Plaintext
@model CRM.Core.DTO.Ord.OrderPayDto
|
|
@using WX.CRM.Model.Entity;
|
|
@{
|
|
ViewBag.Title = "使用订金";
|
|
Layout = "~/Views/Shared/_content.cshtml";
|
|
|
|
}
|
|
|
|
<style>
|
|
.layui-table td, .layui-table th {
|
|
padding: 5px 15px;
|
|
}
|
|
</style>
|
|
|
|
<form class="layui-form" action="" style="width:100%; height:calc(100% - 50px);overflow-y:auto;">
|
|
<div class="layui-form-item" pane="">
|
|
<label class="layui-form-label">可使用订金</label>
|
|
<div class="layui-input-block">
|
|
@{
|
|
var list = ViewBag.OrderDepositList as IEnumerable<WX_SZZYORDERDEPOSIT>;
|
|
if (list.Any())
|
|
{
|
|
foreach (var item in list)
|
|
{
|
|
<input type="checkbox" name="ckDeposit" lay-skin="primary" value="@item.ID" title="订金金额:@item.PAYPRICE 付款时间:@item.PAYDATE.Value.ToShortDateString()">
|
|
}
|
|
}
|
|
}
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
<div class="layui-btn-group" style="text-align:center;display:block;">
|
|
<input class="layui-btn layui-btn-ok" id="btnUse" data-method="use" type="button" value="使用" />
|
|
</div>
|
|
|
|
|
|
<script type="text/javascript">
|
|
layui.use(['form', 'layer'], function () {
|
|
var form = layui.form;
|
|
var layer = layui.layer;
|
|
|
|
var active = {
|
|
use: function () {
|
|
$('#btnUse').addClass("layui-btn-disabled").attr("disabled", true);
|
|
var valueBox = [];
|
|
$('input[name="ckDeposit"]:checked').each(function () {
|
|
//valueBox.push(parseInt($(this).val()));
|
|
valueBox.push($(this).val());
|
|
});
|
|
if (valueBox.length <= 0) {
|
|
layer.msg('请选择!', { icon: 2 });
|
|
return;
|
|
}
|
|
|
|
$.r_post('/WeiXin/OrderDeposit/Use', { deposit: valueBox.join(), orderid: @Request["orderId"] }, function (result) {
|
|
if (result.result) {
|
|
//layer.close(index);
|
|
layer.msg('操作成功!', { icon: 1 }, function () { window.parent.location.reload(); });
|
|
} else {
|
|
layer.msg('操作失败!' + result.retmsg, { icon: 2 });
|
|
}
|
|
$('#btnUse').removeClass("layui-btn-disabled").attr("disabled", false);
|
|
});
|
|
},
|
|
};
|
|
|
|
$('.layui-btn-group .layui-btn').on('click', function () {
|
|
var othis = $(this), method = othis.data('method');
|
|
active[method] ? active[method].call(this, othis) : '';
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|