123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290 |
- @{
- /**/
- ViewBag.Title = "农机调拨";
- 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 ResponseApplyCarInfo
- <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("SaveCarAllocate", 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" }))
- {
- @Html.Hidden("apply_id", Model.apply_id)
- <div class="wrapper-content">
- <div class="panel-body" style="padding-top:0px;">
- <div class="tab-content">
- <div id="tab-1" class="tab-pane active">
- <div class="clearfix f-hafl">
- <div class="col-hafl">
- @*<div class="form-group">
- <label class="col-lg-3 control-label">农机名称:</label>
- <div class="col-lg-8">
- @Html.HiddenFor(p => p.apply_id)
- <label style="margin-top:7px;">@Model.productName</label>
- </div>
- </div>*@
- <div class="form-group">
- <label class="col-lg-3 control-label">出厂编号:</label>
- <div class="col-lg-8">
- <label style="margin-top:7px;">@Model.FactoryNumber</label>
- </div>
- </div>
- <div class="form-group">
- <label class="col-lg-3 control-label">农机条码:</label>
- <div class="col-lg-8">
- <label style="margin-top:7px;">@Model.productBarCode</label>
- </div>
- </div>
- </div>
- <div class="col-hafl">
- <div class="form-group">
- <label class="col-lg-3 control-label">IMEI号:</label>
- <div class="col-lg-8">
- <label style="margin-top:7px;">@Model.imei</label>
- </div>
- </div>
- <div class="form-group">
- <label class="col-lg-3 control-label">车型号:</label>
- <div class="col-lg-8">
- <label style="margin-top:7px;">@Model.productModel</label>
- </div>
- </div>
- </div>
- <div class="col-hafl">
- <div class="form-group">
- <label class="col-lg-3 control-label">农机类型:</label>
- <div class="col-lg-8">
- @{
- switch (Model.carType)
- {
- case 1:
- {
- <label style="margin-top:7px;">拖拉机</label>
- }
- break;
- case 2:
- {
- <label style="margin-top:7px;">收割机</label>
- }
- break;
- case 3:
- {
- <label style="margin-top:7px;">插秧机</label>
- }
- break;
- case 4:
- {
- <label style="margin-top:7px;">烘干机</label>
- }
- break;
- }
- }
- </div>
- </div>
- </div>
- <div class="col-hafl">
- <div class="form-group">
- <label class="col-lg-3 control-label">所属经销商:</label>
- <div class="col-lg-8">
- <label style="margin-top:7px;">@Model.orgDistributorsName</label>
- </div>
- </div>
- </div>
- </div>
- <div class="form-group">
- <label class="col-lg-3 control-label">申请类型:</label>
- <div class="col-lg-8">
- <select name="apply_type" id="apply_type" class="form-control" datatype="*" onchange="loadSettlementCycle()">
- <option value="0">请选择</option>
- <option value="1" )>退货</option>
- <option value="2" )>返厂</option>
- <option value="3" )>调拨</option>
- <option value="4" )>锁车</option>
- <option value="5" )>解锁</option>
- </select>
- </div>
- </div>
- <div class="form-group" id="f1">
- <label class="col-lg-3 control-label">调货经销商:</label>
- <div class="col-lg-8">
- <select id="distributorsId" name="distributorsId" class="form-control select2">
- <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" id="f2">
- <label class="col-lg-3 control-label">调拨原因:</label>
- <div class="col-lg-8">
- <select name="note" id="note" class="form-control" datatype="*">
- <option value="0">请选择</option>
- <option value="10" )>一级商到一级商(有调拨手续)</option>
- <option value="20" )>一级商到一级商(无调拨手续)</option>
- <option value="30" )>一级经销商内部调拨</option>
- <option value="40" )>其它</option>
- </select>
- </div>
- </div>
- <div class="form-group" id="f3">
- <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" 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;
- });
- });
- function loadSettlementCycle() {
- var selectValue = $("#apply_type").val();
- if (selectValue == 3) {
- $("#f1").show();
- $("#f2").show();
- $("#f3").hide();
- }
- else {
- $("#f1").hide();
- $("#f2").hide();
- $("#f3").show();
- }
- }
- </script>
- }
|