123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333 |
- @using MES.Production.Service;
- @using Central.Control.Domain;
- @using Ant.Service.Common;
- @using CommonToolHelper;
- @{
- ViewBag.Title = "Detail";
- Layout = "~/Views/Shared/_Layout.cshtml";
- }
- <style>
- body {
- background-color: white;
- }
- .changeicon {
- float: right;
- margin-right: 22px;
- position: absolute;
- right: -7px;
- top: 0px;
- border: none;
- background-color: #18a689;
- color: #FFFFFF;
- line-height: 33px;
- height: 33px;
- }
- </style>
- <link href="~/Content/uploadfile/CSS/bootstrap.min.css" rel="stylesheet" />
- <link href="~/Content/uploadfile/CSS/font-awesome.css" rel="stylesheet" />
- @*<script src="~/Content/js/jquery/jquery-1.8.2.min.js"></script>*@
- @using (Ajax.BeginForm("SaveMarkAlarm", 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">
- <div class="tab-content">
- <div id="tab-1" class="tab-pane active">
- @*@Html.HiddenFor(p => p.ID)*@
- @Html.Hidden("CarID", ViewData["CarID"])
- @Html.Hidden("CarBar", ViewData["CarBar"])
- <div class="form-group">
- <label class="col-lg-3 control-label">IMEI号:</label>
- <div class="col-lg-8">
- <label class="form-control" id="lbl_imei">@ViewBag.carid</label>
- </div>
- </div>
- <div class="form-group">
- <label class="col-lg-3 control-label">农机名称:</label>
- <div class="col-lg-8">
- <label class="form-control">@ViewData["carname"]</label>
- @*@Html.TextBox("txt_carname", ViewData["carname"], new { @class = "input-sm form-control", @enabled = "false", @placeholder = "请输入农机整机条码查询" })*@
- </div>
- </div>
- <div class="form-group">
- <label class="col-lg-3 control-label">出厂编号:</label>
- <div class="col-lg-8">
- <label class="form-control">@ViewData["FactoryNumber"]</label>
- </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="*" onchange="loadSettlementCycle()">
- <option value="0">请选择</option>
- @*<option value="10">外出参展</option>*@
- @*<option value="20">销售未回款</option>*@
- @*<option value="30" selected>销售已回款</option>*@
- <option value="30" selected>已销售</option>
- @*<option value="40" )>其它</option>*@
- </select>
- </div>
- </div>
- <div class="form-group" id="l1">
- <label class="col-lg-3 control-label">开始时间:</label>
- <div class="col-lg-8">
- @*@Html.TextBoxFor(p => p.AddTime, new { @class = "form-control", @id = "startdate", @readonly = "readonly" })*@
- @Html.TextBox("startdate", ViewData["startdate"], new { @class = "form-control", @placeholder = "请输入解防开始时间", @readonly = "readonly" })
- @*<input id="startdate" class="input-sm form-control" runat="server" type="text" />*@
- </div>
- </div>
- <div class="form-group" id="l2">
- <label class="col-lg-3 control-label">结束时间:</label>
- <div class="col-lg-8">
- @*@Html.TextBoxFor(p => p.AddTime, new { @class = "form-control", @id = "startdate", @readonly = "readonly" })*@
- @Html.TextBox("enddate", ViewData["enddate"], new { @class = "form-control", @placeholder = "请输入解防结束时间", @readonly = "readonly" })
- @*<input id="startdate" class="input-sm form-control" runat="server" type="text" />*@
- </div>
- </div>
- @*<div class="form-group" id="l3">
- <label class="col-lg-3 control-label">预计回款时间:</label>
- <div class="col-lg-8">
- @Html.TextBox("backPayTime", ViewData["backPayTime"], new { @class = "form-control", @placeholder = "请输入预计回款时间", @readonly = "readonly" })
- </div>
- </div>
- <div class="form-group" id="l6">
- <label class="col-lg-3 control-label">购买时间:</label>
- <div class="col-lg-8">
- @Html.TextBox("buyTime", ViewData["buyTime"], new { @class = "form-control", @placeholder = "请输入购买时间", @readonly = "readonly" })
- </div>
- </div>*@
- <div class="form-group" id="l4">
- <label class="col-lg-3 control-label">购买人姓名:</label>
- <div class="col-lg-8">
- @Html.TextBox("username", "", new
- {
- @class = "form-control",
- @placeholder = "请输入购买人姓名"
- })
- </div>
- </div>
- <div class="form-group" id="l5">
- <label class="col-lg-3 control-label">购买人手机:</label>
- <div class="col-lg-8">
- @Html.TextBox("userTel", "", new { @class = "form-control", @id = "CarID", @placeholder = "购买人手机号" })
- </div>
- </div>
- <div class="form-group" id="l7">
- <label class="col-lg-3 control-label">购买人地址:</label>
- <div class="col-lg-8">
- @Html.TextBox("userAddress", "", new { @class = "form-control", @placeholder = "请输入购买人地址" })
- </div>
- </div>
- <div class="form-group">
- <label class="col-lg-3 control-label">
- 标记原因:
- </label>
- <div class="col-lg-8">
- @Html.TextArea("notes", "", new { @class = "form-control", @rows = "3", @cols = "20", @maxlength = "1000", @placeholder = "请输入标记原因" })
- </div>
- </div>
- <div class="hr-line-dashed">
- <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{
- <link href="~/Content/js/laydate/theme/default/laydate.css" rel="stylesheet" />
- <link href="~/Content/js/layui/css/layui.css" rel="stylesheet" />
- <script src="~/Content/js/layui/layui.js"></script>
- <script src="~/Content/js/laydate/laydate.js"></script>
- <script type="text/javascript">
- var applicationPath = "http://" + window.location.host;
- //alert(applicationPath);
- layui.use('laydate', function () {
- var laydate = layui.laydate;
- //日期时间选择器
- laydate.render({
- elem: '#startdate'
- , type: 'date'
- });
- //日期时间选择器
- laydate.render({
- elem: '#enddate'
- , type: 'date'
- });
- //日期时间选择器
- laydate.render({
- elem: '#backPayTime'
- , type: 'date'
- });
- //日期时间选择器
- laydate.render({
- elem: '#buyTime'
- , type: 'date'
- });
- });
- $(function () {
- $('.form-horizontal').initValidform();
- $('.select2').select2();
- $("#l1").hide();
- $("#l2").hide();
- $("#l3").hide();
- $("#l4").show();
- $("#l5").show();
- $("#l6").show();
- $("#l7").show();
- //document.getElementById("startdate").readOnly = true;
- $('#changesendUser').click(function () {
- var vals = $('#IMEI').val();
- // alert(vals);
- dig.addModel('选择设备', '/Sys/Device/SelectDevcieList?userid=' + vals, 800, 500, function () {
- if (this.returnValue != 'no') {
- var vl = "";
- if ($('#IMEI').val() == "") {
- vl = this.returnValue.split('|')[1]
- }
- else {
- vl = $('#IMEI').val() + "," + this.returnValue.split('|')[1]
- }
- //alert(vl);
- $('#IMEI').val(vl);
- var vals = "";
- if ($('#readuser').html().replace(/^\s\s*/, '').replace(/\s\s*$/, '').length == 0) {
- vals = this.returnValue.split('|')[1];
- }
- else {
- vals = $('#readuser').html().replace(/^\s\s*/, '').replace(/\s\s*$/, '') + "," + this.returnValue.split('|')[1];
- }
- $('#readuser').html(vals);
- }
- });
- });
- //分配岗位
- $('#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') {
- var vl = this.returnValue.split('|')[0]
- $('#hidpost').val(vl);
- var vals = $('#readuser').val() + this.returnValue.split('|')[1]
- $('#post').html(vals);
- }
- },
- oniframeload: function () {
- }
- }).showModal();
- return false;
- });
- });
- function loadSettlementCycle() {
- var selectValue = $("#CarSate").val();
- if (selectValue == 10) {
- $("#l1").show();
- $("#l2").show();
- $("#l3").hide();
- $("#l4").hide();
- $("#l5").hide();
- $("#l6").hide();
- $("#l7").hide();
- }
- if (selectValue == 20) {
- $("#l1").hide();
- $("#l2").hide();
- $("#l3").show();
- $("#l4").show();
- $("#l5").show();
- $("#l6").show();
- $("#l7").show();
- }
- if (selectValue == 30) {
- $("#l1").hide();
- $("#l2").hide();
- $("#l3").hide();
- $("#l4").show();
- $("#l5").show();
- $("#l6").show();
- $("#l7").show();
- }
- if (selectValue == 40) {
- $("#l1").show();
- $("#l2").show();
- $("#l3").hide();
- $("#l4").hide();
- $("#l5").hide();
- $("#l6").hide();
- $("#l7").hide();
- }
- if (selectValue == 0) {
- $("#l1").show();
- $("#l2").show();
- $("#l3").hide();
- $("#l4").hide();
- $("#l5").hide();
- $("#l6").hide();
- $("#l7").hide();
- }
- }
- </script>
- }
|