123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232 |
- @{
- ViewBag.Title = "Detail";
- Layout = "~/Views/Shared/_Layout.cshtml";
- }
- @using MES.Production.Service;
- @using Central.Control.Domain;
- @using Ant.Service.Common;
- @using Ant.Service.Common.Enums;
- @using MES.Production.Entity;
- @using CommonToolHelper;
- @model Ent_YW_Bicycle
- <style>
- body {
- background-color: white;
- }
- .changeicon {
- float: right;
- margin-right: -15px;
- position: absolute;
- right: -7px;
- top: 0px;
- border: none;
- background-color: #18a689;
- color: #FFFFFF;
- line-height: 33px;
- height: 33px;
- }
- </style>
- @using (Ajax.BeginForm("Save", null, new AjaxOptions()
- {
- HttpMethod = "Post",
- OnBegin = "SubAjax.Loading",
- OnComplete = "SubAjax.Complate",
- OnFailure = "SubAjax.Failure",
- OnSuccess = "SubAjax.Success"
- }, new { @class = "form-horizontal dig-from", @role = "form" }))
- {
- <div class="wrapper-content">
- <div class="panel-body" style="padding-top:0px;">
- <div class="tab-content">
- <div id="tab-1" class="tab-pane active">
- @Html.Hidden("distributorsid", ViewData["distributorsid"])
- @Html.Hidden("distributorName", ViewData["distributorName"])
- @*<div class="form-group">
- <label class="col-lg-3 control-label">所属经销商:</label>
- <div class="col-lg-8">
- <select id="SiteID" name="SiteID" class="form-control select2" datatype="*" nullmsg="请选择所属经销商">
- <option value="" @(string.IsNullOrEmpty(Model.DistributorsID) ? "selected" : "")>--请选择--</option>
- @{
- foreach (var item in ViewBag.dpt)
- {
- <option value="@item.ID" @(Model.DistributorsID == @item.ID ? "selected" : "")>@CommonHtmlHelper.RtfTextToHtml(item.NAME)</option>
- }
- }
- </select>
- </div>
- </div>*@
- <div class="form-group">
- <label class="col-lg-3 control-label">农机状态:</label>
- <div class="col-lg-8">
- <select name="CarSate" id="CarSate" class="form-control" datatype="*" nullmsg="请选择车状态">
- <option value="">请选择</option>
- @{
- var level = ViewData["levels"] as List<SYS_CODE>;
- if (level != null && level.Count > 0)
- {
- foreach (var item in level)
- {
- string carstate = Model.CarSate.ToString();
- <option value="@item.CODEVALUE" @(carstate == item.CODEVALUE ? "selected" : "")>@item.NAMETEXT</option>
- }
- }
- }
- </select>
- </div>
- </div>
- <div class="form-group">
- <label class="col-lg-3 control-label">农机名称:</label>
- <div class="col-lg-8">
- @Html.TextBoxFor(p => p.CarName, new { @class = "form-control", @placeholder = "请输入农机名称", @datatype = "*1-30", @nullmsg = "请输入农机名称" })
- </div>
- </div>
- <div class="form-group">
- <label class="col-lg-3 control-label">农机条码:</label>
- <div class="col-lg-8">
- @Html.TextBoxFor(p => p.carBar, new { @class = "form-control", @placeholder = "请输入农机条码", @datatype = "n15-20", @nullmsg = "请输入农机条码", @errormsg = "农机条码必须是15-20位的数字!" })
- </div>
- </div>
- <div class="clearfix f-hafl">
- <div class="col-hafl">
- <div class="form-group">
- <label class="col-lg-3 control-label">IMEI号:</label>
- <div class="col-lg-8">
- @Html.HiddenFor(p => p.ID)
- @Html.TextBoxFor(p => p.CarID, new { @class = "form-control", @id = "CarID", @placeholder = "车ID(IMEI)", @datatype = "n15-15", @nullmsg = "IMEI号不能为空!", @errormsg = "IMEI号必须是15位数字!" })
- </div>
- </div>
- <div class="form-group">
- <label class="col-lg-3 control-label">车型号:</label>
- <div class="col-lg-8">
- @Html.TextBoxFor(p => p.CarModel, new
- {
- @class = "form-control",
- @datatype = "*",
- @nullmsg = "请输入车型号",
- @placeholder = "请输入车型号",
- @errormsg = "排序值只能输入数字,数字越小排序越靠前"
- })
- </div>
- </div>
- </div>
- <div class="col-hafl">
- <div class="form-group">
- <label class="col-lg-3 control-label" style="width:29% !important; padding-left:5px; padding-right:5px;">农机类型:</label>
- <div class="col-lg-8">
- <select name="carType" id="carType" class="form-control" datatype="*" nullmsg="请选择农机类型">
- <option value="">请选择</option>
- @{
- var cartype = ViewData["cartype"] as List<SYS_CODE>;
- if (cartype != null && cartype.Count > 0)
- {
- foreach (var item in cartype)
- {
- <option value="@item.CODEVALUE" @(!string.IsNullOrEmpty(Model.carType.ToString()) && Model.carType.ToString() == item.CODEVALUE ? "selected" : "")>@item.NAMETEXT</option>
- }
- }
- }
- </select>
- </div>
- </div>
- <div class="form-group">
- <label class="col-lg-3 control-label" style="width:29% !important; padding-left:5px; padding-right:5px;">出厂编号:</label>
- <div class="col-lg-8">
- @Html.TextBoxFor(p => p.FactoryNumber, new { @class = "form-control", @id = "FactoryNumber", @placeholder = "出厂编号", @nullmsg = "出厂编号不能为空!" })
- </div>
- </div>
- </div>
- </div>
- <div class="hr-line-dashed" style="margin:0;">
- <div class="form-group m20">
- <div class="col-sm-2 col-sm-offset-2">
- <button class="btn btn-primary btn-save" type="submit"><i class="fa fa-check"></i> <span>确定保存</span></button>
- <button class="btn btn-warning" id="btn-dig-close" type="button"><i class="im-undo2"></i> 取消返回</button>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- }
- @section scripts{
- <script type="text/javascript">
- $(function () {
- $('.form-horizontal').initValidform();
- $('.select2').select2();
- //分配部门
- $('#changeDpt').click(function () {
- var vals = $('#hiddpt').val();
- top.dialog({
- url: '/Sys/Department/GetSelectDpt',
- title: '选择景点',
- width: 450,
- height: 500,
- data: vals, // 给 iframe 的数据
- onclose: function () {
- if (this.returnValue != 'no') {
- $('#hiddpt').val(this.returnValue.split('|')[0]);
- $('#dpt').html(this.returnValue.split('|')[1]);
- //清理岗位
- $('#hidpost').val('');
- $('#post').html('');
- }
- },
- oniframeload: function () {
- }
- }).showModal();
- return false;
- });
- //$("#SiteID").change(function () {
- // var pstate = document.getElementById("SiteID");
- // var state = pstate.options[pstate.selectedIndex].value;
- // var test = pstate.options[pstate.selectedIndex].text;
- // alert(test);
- // //state就是选中的value中的值
- //});
- //分配岗位
- $('#changePost').click(function () {
- var dptid = $('#DPTID').val() + ',' + $('#hiddpt').val();
- if ($('#DPTID').val() == '' && $('#hiddpt').val() == '') {
- dig.alertError('提示', '请选择部门后再选择岗位');
- return;
- }
- var vals = $('#hidpost').val();
- top.dialog({
- url: '/Sys/Post/PostUser?dptid=' + dptid,
- title: '分配岗位',
- width: 500,
- height: 500,
- data: vals, // 给 iframe 的数据
- onclose: function () {
- if (this.returnValue != 'no') {
- $('#hidpost').val(this.returnValue.split('|')[0]);
- $('#post').html(this.returnValue.split('|')[1]);
- }
- },
- oniframeload: function () {
- }
- }).showModal();
- return false;
- });
- });
- </script>
- }
|