LR-20210131IOQH\Administrator
2021-06-25 ac4f98f9d24552d1c43935f20a969a2fda0723f0
zhengcaioa/zhengcaioa/Views/FiPiecerate/Edit.cshtml
@@ -3,14 +3,14 @@
@using zhengcaioa.Models;
@{
    List<SysCodeDtl> Pieceratetype = ViewData["Pieceratetype"] as List<SysCodeDtl>; //行业分类
//List<SysCodeDtl> Pieceratetype = ViewData["Pieceratetype"] as List<SysCodeDtl>; //行业分类
    List<SysCodeDtl> Standard = ViewData["Standard"] as List<SysCodeDtl>; //提成标准
List<SysCodeDtl> Standard = ViewData["Standard"] as List<SysCodeDtl>; //提成标准
}
@{
@@ -101,12 +101,12 @@
                        </div>
                        <div id="div_content" class="ibox-content" style="background-color:white;">
                            <div class="row">
                                <div class="clearfix layer-area" style="padding-bottom:15px;">
                                @*<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="CreatedAtTime" class="form-control" label="启用时间" name="CreatedAtTime" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="text" value="@Model.CreatedAtTime.ToString("yyyy/MM/dd")" readonly="readonly">
                                        <input type="hidden" id="Id" name="Id" value="@Model.Id" />
                                    </div>
@@ -142,24 +142,49 @@
                                  
                                </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 class="form-control" label="服务项目" name="Project" id="Project" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="true" type="text" value="@Model.Project">
                                        <input type="hidden" id="Id" name="Id" value="@Model.Id" />
                                    </div>
                                    <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">是否计件登记<i class="red">*</i></label>
                                    <div class="col-sm-2 col-md-2" grouptype="Vdata">
                                        <select id="Standard" class="form-control" name="Standard" data-placeholder="选择 序列 ...">
                                            <option value="" hassubinfo="true">请选择</option>
                                            @foreach (var item in Standard)
                                            {
                                            @if (!item.CodeSn.Equals(Model.Standard))
                                                {
                                            <option value="@item.CodeSn" hassubinfo="true">
                                                @item.Comments
                                            </option>
                                                }
                                                else
                                                {
                                            <option value="@item.CodeSn" hassubinfo="true" selected="selected">
                                                @item.Comments
                                            </option>
                                                }
                                            }
                                            }
                                        </select>
                                    </div>
                                    @*<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 class="form-control" label="项目价格" name="Amount" id="Amount" labtype="txt" addvisible="true" editvisible="true"  reg="" ismust="true" type="number" value="@Model.Amount" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">
        </div>*@
                                    <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 class="form-control" label="项目价格" name="Amount" id="Amount" labtype="txt" addvisible="true" editvisible="true"  reg="" ismust="true" type="number" value="@Model.Amount" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">
                                    </div>
                                </div>
                                <div class="clearfix layer-area" style="padding-bottom:15px;">
                                @*<div class="clearfix layer-area" style="padding-bottom:15px;">
                                    <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label">提成标准</label>
@@ -191,7 +216,7 @@
                                    <div class="col-sm-2 col-md-2">
                                        <input class="form-control" label="提成额度" name="Percent" id="Percent" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="number" value="@Model.Percent" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">
                                    </div>
                                </div>
                                </div>*@
@@ -241,7 +266,7 @@
            "hideMethod": "fadeOut"
        };
        laydate({ elem: "#CreatedAtTime", format: 'YYYY/MM/DD', istime: false, event: "focus" });
        //laydate({ elem: "#CreatedAtTime", format: 'YYYY/MM/DD', istime: false, event: "focus" });
          var id = '@Model.Id';
@@ -287,14 +312,14 @@
        // 保存岗位信息
        var savePosition = function () {
            if ($("#CreatedAtTime").val() == '') {
                toastr.warning("启用时间不能为空");
                return;
            }
            if ($("#Pieceratetype").val() == '') {
                toastr.warning("类别不能为空");
                return;
            }
            //if ($("#CreatedAtTime").val() == '') {
            //    toastr.warning("启用时间不能为空");
            //    return;
            //}
            //if ($("#Pieceratetype").val() == '') {
            //    toastr.warning("类别不能为空");
            //    return;
            //}
@@ -302,18 +327,19 @@
                toastr.warning("服务项目不能为空");
                return;
            }
            if ($.trim($("#Amount").val()) == '') {
                toastr.warning("项目价格不能为空");
             if ($.trim($("#Standard").val()) == '') {
                 toastr.warning("是否计件登记不能为空");
                return;
            }
            if ($.trim($("#Standard").val()) == '') {
                toastr.warning("提成标准不能为空");
                return;
            }
            if ($.trim($("#Percent").val()) == '') {
                toastr.warning("提成额度不能为空");
                return;
            }
            //if ($.trim($("#Amount").val()) == '') {
            //    toastr.warning("项目价格不能为空");
            //    return;
            //}
            //if ($.trim($("#Percent").val()) == '') {
            //    toastr.warning("提成额度不能为空");
            //    return;
            //}
           
            //var data = { id: $("#Id").val(), StartTime:$("#StartTime").val(), Sheng: $("#Sheng").val(), job_level: $("#Job_level").val().toString(), ExistsAttachment: fileId != "" }
            $.ajax({