| | |
| | | @using zhengcaioa.Models; |
| | | @{ |
| | | Layout = null; |
| | | List<SimBindView> Card = ViewData["SimCard"] as List<SimBindView>; |
| | | } |
| | | |
| | | <!DOCTYPE html> |
| | |
| | | <div id="div_content" class="ibox-content" style="background-color:white;"> |
| | | <div class="row"> |
| | | <div class="clearfix layer-area" style="padding-bottom:15px;"> |
| | | <label class="text-right col-sm-1 col-md-1 control-label">电话卡号<i class="red">*</i></label> |
| | | <label class="text-right col-sm-1 col-md-1 control-label">电话号码<i class="red">*</i></label> |
| | | <div class="col-sm-2 col-md-2"> |
| | | <select id="cbbCard" class="data form-control" name="sim_id" data-placeholder="选择 序列 ..."> |
| | | <option value="" hassubinfo="true">请选择</option> |
| | | @foreach (var item in Card) |
| | | { |
| | | @if (!item.Id.Equals(Model.sim_id)) |
| | | { |
| | | <option value="@item.Id" hassubinfo="true"> |
| | | @item.simcard |
| | | </option> |
| | | } |
| | | else |
| | | { |
| | | <option value="@item.Id" hassubinfo="true" selected="selected"> |
| | | @item.simcard |
| | | </option> |
| | | } |
| | | } |
| | | </select> |
| | | <input type="hidden" name="id" value="@Model.id" /> |
| | | <input type="text" value="@Model.sub_userid" class="form-control" readonly="readonly" /> |
| | | <input type="hidden" name="sim_id" value="@Model.sim_id" /> |
| | | </div> |
| | | </div> |
| | | <div class="clearfix layer-area" style="padding-bottom:15px;"> |
| | | <label class="text-right col-sm-1 col-md-1 control-label">费用月份<i class="red">*</i></label> |
| | | <div class="col-sm-2 col-md-2"> |
| | | <input type="text" name="bill_month" class="form-control" value="@Model.bill_month" readonly="readonly" /> |
| | | <input type="hidden" name="bill_year" value="@Model.bill_year" /> |
| | | </div> |
| | | </div> |
| | | <div class="clearfix layer-area" style="padding-bottom:15px;"> |
| | | <label class="text-right col-sm-1 col-md-1 control-label">实际电话费用<i class="red">*</i></label> |
| | | <div class="col-sm-2 col-md-2"> |
| | | <input id="billamount" class="form-control" label="薪资待遇" name="bill_amount" labtype="txt" addvisible="true" maxlength="500" editvisible="true" reg="" ismust="true" type="text" value="@Model.bill_amount" oninput="if(value.length>4)value=value.slice(0,10)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)"> |
| | | </div> |
| | | </div> |
| | | <div class="clearfix layer-area" style="padding-bottom:15px;"> |
| | | |
| | | <label class="text-right col-sm-1 col-md-1 control-label">费用记账日期<i class="red">*</i></label> |
| | | <div class="col-sm-2 col-md-2"> |
| | | <input id="acTime" class="form-control" name="accounted_time" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="text" value="@Model.accounted_time.ToString("yyyy/MM/dd")" > |
| | | <input id="billamount" class="form-control" name="bill_amount" labtype="txt" addvisible="true" maxlength="500" editvisible="true" reg="" ismust="true" type="text" value="@Model.bill_amount" oninput="if(value.length>4)value=value.slice(0,10)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </form> |
| | | |
| | | <script type="text/javascript"> |
| | | $(function () { |
| | | |
| | | $("#cbbCard").chosen(); |
| | | |
| | | laydate({ elem: "#acTime", format: 'YYYY/MM/DD', istime: false, event: "focus" }); |
| | | |
| | | }); |
| | | |
| | | var hh = document.body.clientHeight - $('.ibox-title').height() - $("#top").height() * 2 - 95; |
| | | $("#div_content").height(hh); |
| | | |
| | | toastr.options = { |
| | | "closeButton": true, |
| | | "debug": false, |
| | | "progressBar": true, |
| | | "positionClass": "toast-bottom-right", |
| | | "onclick": null, |
| | | "showDuration": "300", |
| | | "hideDuration": "600", |
| | | "timeOut": "4500", |
| | | "extendedTimeOut": "600", |
| | | "showEasing": "swing", |
| | | "hideEasing": "linear", |
| | | "showMethod": "fadeIn", |
| | | "hideMethod": "fadeOut" |
| | | }; |
| | | |
| | | |
| | | toastr.options = { |
| | | "closeButton": true, |
| | | "debug": false, |
| | | "progressBar": true, |
| | | "positionClass": "toast-bottom-right", |
| | | "onclick": null, |
| | | "showDuration": "300", |
| | | "hideDuration": "600", |
| | | "timeOut": "4500", |
| | | "extendedTimeOut": "600", |
| | | "showEasing": "swing", |
| | | "hideEasing": "linear", |
| | | "showMethod": "fadeIn", |
| | | "hideMethod": "fadeOut" |
| | | }; |
| | | |
| | | // 保存 |
| | | function saveSimCost() { |
| | | |
| | | if ($("#cbbCard").val() == '') { |
| | | toastr.warning("电话卡号不能为空"); |
| | | return; |
| | | } |
| | | |
| | | if ($("#billamount").val() == '') { |
| | | toastr.warning("实际电话费用不能为空"); |
| | | return; |
| | | } |
| | | if ($("#acTime").val() == '') { |
| | | toastr.warning("费用记账日期不能为空"); |
| | | return; |
| | | } |
| | | |
| | | |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: "/SimCost/SaveSimCost", |