初始化项目
This commit is contained in:
200
AUTS.Web/Areas/App/Views/Auth/AuthList.cshtml
Normal file
200
AUTS.Web/Areas/App/Views/Auth/AuthList.cshtml
Normal file
@@ -0,0 +1,200 @@
|
||||
@model List<AUTS.Domain.Entities.TBL_UTS_Manage_Module>
|
||||
@{
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml"; ;
|
||||
}
|
||||
|
||||
|
||||
<link href="~/Theme/font-awesome/css/font-awesome.css" rel="stylesheet" />
|
||||
<link href="~/Theme/css/plugins/dataTables/datatables.min.css" rel="stylesheet" />
|
||||
|
||||
<div class="row wrapper border-bottom white-bg page-heading">
|
||||
<div class="col-lg-10">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<a href="@Url.Action("Index", "Home")">主页</a>
|
||||
</li>
|
||||
@*<li>
|
||||
<a href="@Url.Action("JournalLog", "CxwHome")">交易信息</a>
|
||||
</li>*@
|
||||
<li class="active">
|
||||
<strong>权限列表</strong>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<button class="btn btn-md btn-primary" type="button" id="btnaddAuth">添加权限组</button>
|
||||
|
||||
</div>
|
||||
<div class="ibox-content" id="content">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover " id="editable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>ID</th>
|
||||
<th>操作</th>
|
||||
<th>控制器</th>
|
||||
<th>方法</th>
|
||||
@*<th>备注</th>*@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if (Model != null && Model.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < Model.Count; i++)
|
||||
{
|
||||
<tr class="gradeX">
|
||||
<td><input type="checkbox" class="i-checks" value="@Model[i].ID" name="input[]" /><input type="hidden" value="@Model[i].ID"> </td>
|
||||
<td>@Model[i].ID</td>
|
||||
<td>@Model[i].Operation</td>
|
||||
<td>@Model[i].Controller</td>
|
||||
<td>@Model[i].Method</td>
|
||||
@*<td>@Model[i].Remark</td>*@
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-4" id="orderBox_Content">
|
||||
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>添加权限组</h5>
|
||||
<div class="ibox-tools">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<form class="form-horizontal" id="modifyCompanyForm">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">权限ID</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="text" name="ModuleID" class="form-control ModuleID" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">组名</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="请输入组名" name="Describe" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-3 col-md-9">
|
||||
<button class="btn btn-md btn-primary" type="button" id="btnModifyPLine" onclick="excutedUpDate('btnModifyPLine','@Url.Action("ModifyAuth", "Auth")','modifyCompanyForm','@Url.Action("AuthList", "Auth")')">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@*<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>权限组列表</h5>
|
||||
<div class="ibox-tools">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
|
||||
<table class="table table-striped table-bordered table-hover" id="editable2">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>权限组名</th>
|
||||
<th>权限</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="">
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>*@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
$.getScript("/Plugin/basicfunc.js");
|
||||
$.getScript("/Theme/js/jquery.form.min.js");
|
||||
$.getScript("/Plugin/inspinia-partial.js");
|
||||
</script>
|
||||
<script src="~/Theme/js/plugins/peity/jquery.peity.min.js"></script>
|
||||
<script src="~/Theme/js/plugins/dataTables/datatables.min.js"></script>
|
||||
|
||||
<script src="~/Theme/js/demo/peity-demo.js"></script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
//初始化表格
|
||||
var oTable = $('#editable').DataTable({
|
||||
"bLengthChange": false,
|
||||
'iDisplayLength': 30, //每页初始显示 条记录
|
||||
"language": //把文字变为中文
|
||||
{
|
||||
"sProcessing": "加载中...",
|
||||
"sLengthMenu": "显示条数: _MENU_ ",
|
||||
"sZeroRecords": "没有匹配结果",
|
||||
"sInfo": "显示第 _START_ 至 _END_ 项结果,共 _TOTAL_ 项",
|
||||
"sInfoEmpty": "显示第 0 至 0 项结果,共 0 项",
|
||||
"sInfoFiltered": "(由 _MAX_ 项结果过滤)",
|
||||
"sInfoPostFix": "",
|
||||
"sSearch": "搜索:",
|
||||
"sUrl": "",
|
||||
"sEmptyTable": "表中数据为空",
|
||||
"sLoadingRecords": "载入中...",
|
||||
"sInfoThousands": ",",
|
||||
"oPaginate": {
|
||||
"sFirst": "首页", //首页
|
||||
"sPrevious": "上一页", //上一页
|
||||
"sNext": "下一页", //下一页
|
||||
"sLast": "尾页" //尾页
|
||||
},
|
||||
},
|
||||
"pagingType": "full_numbers", //显示首页尾页
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
$("input[type='checkbox']").click(function () {//
|
||||
var tex = $(this).next().val();//获得对应ID
|
||||
|
||||
var AuthId = "";
|
||||
//console.log(tex);
|
||||
var len = $("tbody>tr").length;
|
||||
for (var i = 0; i < len; i++) {
|
||||
var colson = $("input[type='checkbox']").eq(i).is(":checked");
|
||||
//console.log(colson + "勾选");
|
||||
if (colson) {
|
||||
|
||||
AuthId += $("input[type='checkbox']").eq(i).val() + ",";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$(".ModuleID").val(AuthId);
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
118
AUTS.Web/Areas/App/Views/Auth/AuthManageList.cshtml
Normal file
118
AUTS.Web/Areas/App/Views/Auth/AuthManageList.cshtml
Normal file
@@ -0,0 +1,118 @@
|
||||
@model AUTS.Domain.ViewModels.Auth.AuthManage
|
||||
@{
|
||||
ViewBag.Title = "AuthManageList";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
|
||||
<link href="~/Theme/css/plugins/dataTables/datatables.min.css" rel="stylesheet" />
|
||||
|
||||
<div class="row wrapper border-bottom white-bg page-heading">
|
||||
<div class="col-lg-10">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<a href="@Url.Action("Index", "Home")">主页</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<strong>权限列表</strong>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<button class="btn btn-md btn-primary" type="button" id="btnaddAuth"><a href="@Url.Action("AuthList", "Auth")"></a>添加权限组</button>
|
||||
|
||||
</div>
|
||||
<div class="ibox-content" id="content">
|
||||
<select id="username" class="form-control username" style="display:inline;width:200px;">
|
||||
@if (Model.users != null && Model.users.Count > 0)
|
||||
{
|
||||
foreach (var item in Model.users.OrderBy(e=>e.UserName))
|
||||
{
|
||||
//if (item.UserName != "UTS_RD_Manager")
|
||||
//{
|
||||
<option value="@item.UserID">@item.UserName</option>
|
||||
//}
|
||||
}
|
||||
}
|
||||
</select>
|
||||
<table class="table table-striped table-bordered table-hover " id="editable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>ID</th>
|
||||
<th>权限组名</th>
|
||||
@*<th>权限ID</th>*@
|
||||
<th>权限</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if (Model != null && Model.AuthManages.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < Model.AuthManages.Count; i++)
|
||||
{
|
||||
<tr class="gradeX">
|
||||
<td><input type="checkbox" class="i-checks" value="@Model.AuthManages[i].ID" name="input[]" @*@foreach (var item in jurisdiction) { @(item.ToInt() == Model[i].ID ? "checked='checked'" : "") }*@ /><input type="hidden" value="@Model.AuthManages[i].ID"> </td>
|
||||
<td>@Model.AuthManages[i].ID</td>
|
||||
<td>@Model.AuthManages[i].Describe</td>
|
||||
@*<td>@Model.AuthManages[i].ModuleID</td>*@
|
||||
<td class="tdAuth">
|
||||
<select class="Auth">
|
||||
<option value="0">禁止</option>
|
||||
<option value="1">只读</option>
|
||||
<option value="2">读写</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-4" id="orderBox_Content">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
//选择下拉框用户
|
||||
$(".username").change(function () {
|
||||
var options = $(".username option:selected").val();
|
||||
selPrivilege(options, 0);
|
||||
})
|
||||
$("input[type='checkbox']").click(function () {//
|
||||
var AuthManagesID = $(this).next().val();//获得对应ID
|
||||
var Auth = $(this).parent().nextAll(".tdAuth").children().val();
|
||||
var user = $(".username option:selected").val();
|
||||
console.log(Auth);
|
||||
console.log(AuthManagesID);
|
||||
console.log(user);
|
||||
$.ajax({
|
||||
url: "/App/Auth/UserPrivilege",
|
||||
type: "post",
|
||||
data: { "uesr":user,"AuthManagesID": AuthManagesID, "Auth":Auth},
|
||||
success: function (data) {
|
||||
if (data.Status == 200) {
|
||||
$.toastr.success('添加成功',
|
||||
{
|
||||
position: 'top-center',
|
||||
time: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
313
AUTS.Web/Areas/App/Views/AutsChart/OrderStats.cshtml
Normal file
313
AUTS.Web/Areas/App/Views/AutsChart/OrderStats.cshtml
Normal file
@@ -0,0 +1,313 @@
|
||||
@model AUTS.Domain.ViewModels.VM_TBL_OrderStats
|
||||
@{
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
|
||||
|
||||
}
|
||||
<link href="~/Theme/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
|
||||
|
||||
<div class="row wrapper border-bottom white-bg page-heading">
|
||||
<div class="col-lg-10">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<a href="@Url.Action("Index", "Home")">主页</a>
|
||||
</li>
|
||||
<li>
|
||||
<a>图表</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<strong>订单生产统计</strong>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight">
|
||||
<div class="row">
|
||||
<div class="col-sm-11">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>订单生产统计</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
|
||||
<form method="get" id="OrderStatsSearchForm">
|
||||
|
||||
<div class="row">
|
||||
<div class="form-inline">
|
||||
|
||||
<div class="col-sm-3">
|
||||
|
||||
<div class="input-group m-b">
|
||||
|
||||
<span class="input-group-addon">机型:</span>
|
||||
<select class="input-sm form-control input-s-sm inline" name="projectid" id="projectid">
|
||||
<option value=''></option>
|
||||
@if (Model.ProjectList != null && Model.ProjectList.Count > 0)
|
||||
{
|
||||
foreach (var item in Model.ProjectList)
|
||||
{
|
||||
<option value="@item.ProjectID">@item.ProjectName</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4 m-b-xs" id="data_ovform">
|
||||
<div class="input-group m-b">
|
||||
<span class="input-group-addon">时间:</span>
|
||||
<div class="input-daterange input-group" id="datepicker">
|
||||
|
||||
<input type="text" class="input-sm form-control" readOnly name="startdate" />
|
||||
<span class="input-group-addon">to</span>
|
||||
<input type="text" class="input-sm form-control" readOnly name="enddate" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (Model.SearchKey != null && Model.SearchKey.Contains("order"))
|
||||
{
|
||||
<div class="col-sm-2 m-b-xs">
|
||||
<label class="checkbox-inline"> <input type="checkbox" value="true" name="IsOrder">是否根据订单</label>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
<div class="col-sm-3">
|
||||
<div class="input-group">
|
||||
<button type="button" class="btn btn-primary" id="btnOrderStatsSearch">查询</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
@*<div class="table-responsive" id="ordersPlannedSpeedBox_Content">
|
||||
</div>*@
|
||||
|
||||
<div class="table-responsive">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="ibox float-e-margins" id="orderInfo_Box">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="table-responsive" id="ordersPlannedSpeedBox_Content">
|
||||
</div>
|
||||
|
||||
|
||||
<div class="table-responsive" id="detailsBox_Content">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4" id="plineBox_Content">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Data picker -->
|
||||
<script src="~/Theme/js/plugins/datapicker/bootstrap-datepicker.js"></script>
|
||||
<script src="~/Theme/js/plugins/datapicker/locales/bootstrap-datepicker.zh-CN.js"></script>
|
||||
|
||||
|
||||
<script>
|
||||
var url = "/Theme/js/jquery.form.min.js";
|
||||
$.getScript(url);
|
||||
|
||||
$('#data_ovform .input-daterange').datepicker({
|
||||
language: "zh-CN",//语言
|
||||
todayBtn: "linked",//今日按钮
|
||||
keyboardNavigation: false,
|
||||
forceParse: false,
|
||||
autoclose: true,
|
||||
format: "yyyy/mm/dd"//日期格式
|
||||
});
|
||||
|
||||
//查询
|
||||
$("#btnOrderStatsSearch").click(function () {
|
||||
$("#OrderStatsSearchForm").ajaxSubmit({
|
||||
url: "/APP/AutsChart/OrderStatsAjax",
|
||||
type: "POST",
|
||||
success: function (res) {
|
||||
$("#ordersPlannedSpeedBox_Content").empty();
|
||||
$("#detailsBox_Content").empty();
|
||||
$("#orderInfo_Box").empty();
|
||||
if (res.Status == 200) {
|
||||
$("#ordersPlannedSpeedBox_Content").empty();
|
||||
if (res.Data) {
|
||||
//填充数据
|
||||
var jsonArray = res.Data;
|
||||
var headArray = [];
|
||||
|
||||
//循环取字段名
|
||||
for (var i in jsonArray[0]) {
|
||||
headArray[headArray.length] = i;
|
||||
}
|
||||
|
||||
var div = document.getElementById("ordersPlannedSpeedBox_Content");
|
||||
var table = document.createElement("table");
|
||||
table.id = "new_table";
|
||||
table.setAttribute("class", "table table-striped table-bordered table-hover dataTables-example");
|
||||
|
||||
var theadH = document.createElement("thead");
|
||||
var thead = document.createElement("tr");
|
||||
|
||||
//表头 从1开始 忽略ID
|
||||
for (var count = 1; count < headArray.length; count++) {
|
||||
var td = document.createElement("th");
|
||||
td.innerHTML = headArray[count];
|
||||
thead.appendChild(td);
|
||||
}
|
||||
theadH.appendChild(thead);
|
||||
table.appendChild(theadH);
|
||||
|
||||
var theadY = document.createElement("tbody");
|
||||
|
||||
//表格数据
|
||||
for (var tableRowNo = 0; tableRowNo < jsonArray.length; tableRowNo++) {
|
||||
|
||||
var tr = document.createElement("tr");
|
||||
|
||||
tr.setAttribute("onclick", "clickaction(" + jsonArray[tableRowNo]["ID"] + ")")
|
||||
|
||||
//从1开始 忽略ID
|
||||
for (var headCount = 1; headCount < headArray.length; headCount++) {
|
||||
var cell = document.createElement("td");
|
||||
cell.innerHTML = jsonArray[tableRowNo][headArray[headCount]];
|
||||
tr.appendChild(cell);
|
||||
}
|
||||
theadY.appendChild(tr);
|
||||
table.appendChild(theadY);
|
||||
|
||||
}
|
||||
div.appendChild(table);
|
||||
} else {
|
||||
$.toastr.success('暂无数据',
|
||||
{
|
||||
position: 'top-center',
|
||||
time: 1000,
|
||||
});
|
||||
}
|
||||
}
|
||||
else {
|
||||
$.toastr.error('查询失败! <br />' + res.Message, {
|
||||
time: 3000,
|
||||
position: 'top-center'
|
||||
});
|
||||
}
|
||||
},
|
||||
error: function (error) {
|
||||
alert(error);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function clickaction(id) {
|
||||
GetOrderInfo(id);
|
||||
OrdersPlannedSpeedDetails(id);
|
||||
}
|
||||
|
||||
function OrdersPlannedSpeedDetails(id) {
|
||||
var data = $('#OrderStatsSearchForm').serialize() + "&id=" + id;;// 你的formid
|
||||
// Ajax提交数据
|
||||
$.ajax({
|
||||
url: "/APP/AutsChart/GetOrdersPlannedSpeedDetails",
|
||||
type: "POST",
|
||||
async: true,
|
||||
data: data,
|
||||
dataType: "JSON",
|
||||
success: function (res) { // 请求成功后的回调函数,其中的参数data为controller返回的map,也就是说,然后通过data这个参数取JSON数据中的值
|
||||
|
||||
if (res.Status == 200) {
|
||||
$("#detailsBox_Content").empty();
|
||||
if (res.Data) {
|
||||
//填充数据
|
||||
var jsonArray = res.Data;
|
||||
var headArray = [];
|
||||
|
||||
//循环取字段名
|
||||
for (var i in jsonArray[0]) {
|
||||
headArray[headArray.length] = i;
|
||||
}
|
||||
|
||||
var div = document.getElementById("detailsBox_Content");
|
||||
var table = document.createElement("table");
|
||||
table.id = "new_table2";
|
||||
table.setAttribute("class", "table table-striped table-bordered table-hover dataTables-example");
|
||||
|
||||
var theadH = document.createElement("thead");
|
||||
var thead = document.createElement("tr");
|
||||
|
||||
//表头 从1开始 忽略ID
|
||||
for (var count = 0; count < headArray.length; count++) {
|
||||
var td = document.createElement("th");
|
||||
td.innerHTML = headArray[count];
|
||||
thead.appendChild(td);
|
||||
}
|
||||
theadH.appendChild(thead);
|
||||
table.appendChild(theadH);
|
||||
|
||||
var theadY = document.createElement("tbody");
|
||||
|
||||
//表格数据
|
||||
for (var tableRowNo = 0; tableRowNo < jsonArray.length; tableRowNo++) {
|
||||
|
||||
var tr = document.createElement("tr");
|
||||
|
||||
tr.setAttribute("onclick", "clickaction(" + jsonArray[tableRowNo]["ID"] + ")")
|
||||
|
||||
//从1开始 忽略ID
|
||||
for (var headCount = 0; headCount < headArray.length; headCount++) {
|
||||
var cell = document.createElement("td");
|
||||
cell.innerHTML = jsonArray[tableRowNo][headArray[headCount]];
|
||||
tr.appendChild(cell);
|
||||
}
|
||||
theadY.appendChild(tr);
|
||||
table.appendChild(theadY);
|
||||
|
||||
}
|
||||
div.appendChild(table);
|
||||
|
||||
for (var tableRowNo = 1; tableRowNo <= (jsonArray.length / 2); tableRowNo++) {
|
||||
|
||||
mergeCell('new_table2', tableRowNo * 2 - 1, tableRowNo * 2, 0);
|
||||
}
|
||||
|
||||
} else { }
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function GetOrderInfo(id) {
|
||||
//$("#orderInfo_Box").empty();
|
||||
$.ajax({
|
||||
cache: true,
|
||||
async: true,
|
||||
data: { "id": id },
|
||||
url: "/APP/AutsChart/OrdersInfo",
|
||||
success: function (data) {
|
||||
$('#orderInfo_Box').html(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
381
AUTS.Web/Areas/App/Views/AutsChart/RealTimeStatsInProduc.cshtml
Normal file
381
AUTS.Web/Areas/App/Views/AutsChart/RealTimeStatsInProduc.cshtml
Normal file
@@ -0,0 +1,381 @@
|
||||
@model AUTS.Domain.ViewModels.VM_TBL_OrderStats
|
||||
@{
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
|
||||
//List<AUTS.Domain.Entities.TBL_Orders> orderList = AUTS.Services.Cache.CacheHelp.GetUserDBOrderList();//订单列表
|
||||
}
|
||||
|
||||
<link href="~/Theme/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
|
||||
|
||||
<div class="row wrapper border-bottom white-bg page-heading">
|
||||
<div class="col-lg-10">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<a href="@Url.Action("Index", "Home")">主页</a>
|
||||
</li>
|
||||
<li>
|
||||
<a>图表</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<strong>订单生产统计</strong>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight">
|
||||
<div class="row">
|
||||
<div class="col-sm-11">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>订单生产统计</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
|
||||
<form method="get" id="StatsInProducSearchForm">
|
||||
|
||||
<div class="row">
|
||||
<div class="form-inline">
|
||||
|
||||
<div class="col-sm-3">
|
||||
|
||||
<div class="input-group m-b">
|
||||
|
||||
<span class="input-group-addon">机型:</span>
|
||||
<select class="input-sm form-control input-s-sm inline" name="projectid" id="projectid" onchange="projectChange()">
|
||||
@*<option value=''></option>*@
|
||||
@if (Model.ProjectList != null && Model.ProjectList.Count > 0)
|
||||
{
|
||||
foreach (var item in Model.ProjectList)
|
||||
{
|
||||
<option value="@item.ProjectID">@item.ProjectName</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@*<div class="col-sm-3 m-b-xs" id="data_ovform">
|
||||
<div class="input-group m-b">
|
||||
<span class="input-group-addon">订单:</span>
|
||||
<input type="text" class="form-control" name="order">
|
||||
</div>
|
||||
</div>*@
|
||||
|
||||
<div class="col-sm-3">
|
||||
|
||||
<div class="input-group m-b">
|
||||
|
||||
<span class="input-group-addon">订单:</span>
|
||||
<select class="input-sm form-control input-s-sm inline" name="order" id="order">
|
||||
@if (Model.OrderList != null && Model.OrderList.Count > 0)
|
||||
{
|
||||
foreach (var item in Model.OrderList)
|
||||
{
|
||||
<option value='@item.OrderID'>@item.OrderNo</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-2">
|
||||
<div class="input-group">
|
||||
<button type="button" class="btn btn-primary" id="btnStatsInProducSearch">查询</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
<div class="table-responsive">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="ibox float-e-margins" id="orderInfo_Box">
|
||||
@if (Model.OrderInfo != null)
|
||||
{
|
||||
@Html.Partial("../AutsChart/_RealTimeOrderInfo", Model.OrderInfo)
|
||||
}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="table-responsive" id="ordersPlannedSpeedBox_Content">
|
||||
</div>
|
||||
|
||||
|
||||
<div class="table-responsive" id="detailsBox_Content">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4" id="plineBox_Content">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.table > tbody > tr > td {
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.table > thead:first-child > tr:first-child > th {
|
||||
text-align: center;
|
||||
border-bottom: 1px solid #333;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- Data picker -->
|
||||
<script src="~/Theme/js/plugins/datapicker/bootstrap-datepicker.js"></script>
|
||||
<script src="~/Theme/js/plugins/datapicker/locales/bootstrap-datepicker.zh-CN.js"></script>
|
||||
|
||||
<script src="~/Theme/js/plugins/dataTables/datatables.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
var url = "/Theme/js/jquery.form.min.js";
|
||||
$.getScript(url);
|
||||
|
||||
$('#data_ovform .input-daterange').datepicker({
|
||||
language: "zh-CN",//语言
|
||||
todayBtn: "linked",//今日按钮
|
||||
keyboardNavigation: false,
|
||||
forceParse: false,
|
||||
autoclose: true,
|
||||
format: "yyyy/mm/dd"//日期格式
|
||||
});
|
||||
|
||||
//查询
|
||||
$("#btnStatsInProducSearch").click(function () {
|
||||
$("#StatsInProducSearchForm").ajaxSubmit({
|
||||
url: "/APP/AutsChart/StatsInProducAjax",
|
||||
type: "POST",
|
||||
success: function (res) {
|
||||
$("#ordersPlannedSpeedBox_Content").empty();
|
||||
if (res.Status == 200) {
|
||||
$("#ordersPlannedSpeedBox_Content").empty();
|
||||
if (res.Data) {
|
||||
|
||||
//var html = "";
|
||||
//html += '<div class="ibox-footer"> <div class="row"><div class="col-xs-6">';
|
||||
//html += '<small class="stats-label">订单:' + res.Data.OrderNo + '</small>';
|
||||
//html += '</div></div></div>';
|
||||
//html += '<div class="ibox-footer"><div class="row"><div class="col-xs-6">';
|
||||
//html += '<small class="stats-label">机型:' + res.Data.ProjectName + '</small>';
|
||||
//html += '</div><div class="col-xs-6">';
|
||||
//html += '<small class="stats-label">订单日期:' + res.Data.CreateTime + '</small></div></div></div>';
|
||||
//html += '<div class="ibox-footer"> <div class="row"><div class="col-xs-6">';
|
||||
//html += '<small class="stats-label">数量:' + res.Data.OrderCount + '</small></div><div class="col-xs-6">';
|
||||
//html += '<small class="stats-label">目标交期:' + res.Data.DeliveryTime + '</small></div></div></div>';
|
||||
//html += '<div class="ibox-footer"><div class="row"><div class="col-xs-12"><small class="stats-label">工艺站:' + res.Data.StationDes + '</small></div></div></div>';
|
||||
|
||||
//填充数据
|
||||
//var jsonArray = res.Data.Rows;
|
||||
var jsonArray = res.Data;
|
||||
var headArray = [];
|
||||
|
||||
//循环取字段名
|
||||
for (var i in jsonArray[0]) {
|
||||
headArray[headArray.length] = i;
|
||||
}
|
||||
|
||||
var div = document.getElementById("ordersPlannedSpeedBox_Content");
|
||||
var table = document.createElement("table");
|
||||
table.id = "new_table";
|
||||
table.setAttribute("class", "table table-striped table-bordered table-hover dataTables-example");
|
||||
|
||||
var theadH = document.createElement("thead");
|
||||
var thead = document.createElement("tr");
|
||||
|
||||
//表头 从1开始 忽略ID
|
||||
for (var count = 1; count < headArray.length; count++) {
|
||||
var td = document.createElement("th");
|
||||
td.innerHTML = headArray[count];
|
||||
thead.appendChild(td);
|
||||
}
|
||||
theadH.appendChild(thead);
|
||||
table.appendChild(theadH);
|
||||
|
||||
var theadY = document.createElement("tbody");
|
||||
|
||||
//表格数据
|
||||
for (var tableRowNo = 0; tableRowNo < jsonArray.length; tableRowNo++) {
|
||||
|
||||
var tr = document.createElement("tr");
|
||||
|
||||
//tr.setAttribute("onclick", "clickaction(" + jsonArray[tableRowNo]["ID"] + ")")
|
||||
|
||||
//从1开始 忽略ID
|
||||
for (var headCount = 1; headCount < headArray.length; headCount++) {
|
||||
var cell = document.createElement("td");
|
||||
cell.innerHTML = jsonArray[tableRowNo][headArray[headCount]];
|
||||
cell.setAttribute("class", jsonArray[tableRowNo][headArray[0]] + " " + headArray[headCount]);
|
||||
tr.appendChild(cell);
|
||||
}
|
||||
theadY.appendChild(tr);
|
||||
table.appendChild(theadY);
|
||||
|
||||
}
|
||||
div.appendChild(table);
|
||||
|
||||
//$("#orderInfo_Box").html(html);
|
||||
|
||||
setNewTable(table.id);
|
||||
|
||||
$('.testtotal').css({ 'border-bottom': '1px solid #333' });
|
||||
$('.日期').css({ 'border-bottom': '1px solid #333' });
|
||||
|
||||
} else {
|
||||
$.toastr.success('暂无数据',
|
||||
{
|
||||
position: 'top-center',
|
||||
time: 1000,
|
||||
});
|
||||
}
|
||||
}
|
||||
else {
|
||||
$.toastr.error('查询失败! <br />' + res.Message, {
|
||||
time: 3000,
|
||||
position: 'top-center'
|
||||
});
|
||||
}
|
||||
},
|
||||
error: function (error) {
|
||||
alert(error);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
var oTable;
|
||||
function setNewTable(tbid) {
|
||||
oTable = $('#' + tbid).DataTable({
|
||||
"bFilter": false, //过滤功能
|
||||
"info": false,
|
||||
"ordering": false,
|
||||
"lengthChange": false,
|
||||
"bAutoWidth": false,//自动宽度
|
||||
"bPaginate": false, //翻页功能
|
||||
"language": {
|
||||
"emptyTable": "无可用数据"
|
||||
},
|
||||
//表头固定
|
||||
//"fixedHeader": true,
|
||||
//"scrollX": "500px",
|
||||
//"scrollY": "400px",
|
||||
//"scrollCollapse": true,
|
||||
////固定首列,需要引入相应 dataTables.fixedColumns.min.js
|
||||
//"fixedColumns": {
|
||||
// "leftColumns": 2
|
||||
//},
|
||||
|
||||
"columnDefs": [{
|
||||
targets: 0, //第1列
|
||||
createdCell: function (td, cellData, rowData, row, col) {
|
||||
|
||||
var rowspan = (row % 4);
|
||||
//debugger;
|
||||
|
||||
if (rowspan == 0) {
|
||||
//$(td).remove();
|
||||
$(td).attr('rowspan', 4);
|
||||
}
|
||||
else {
|
||||
//$(td).attr('rowspan', 2);
|
||||
$(td).remove();
|
||||
}
|
||||
}
|
||||
}],
|
||||
});
|
||||
}
|
||||
|
||||
function GetOrderInfo(id) {
|
||||
//$("#orderInfo_Box").empty();
|
||||
$.ajax({
|
||||
cache: true,
|
||||
async: true,
|
||||
data: { "id": id },
|
||||
url: "/APP/AutsChart/OrdersInfo",
|
||||
success: function (data) {
|
||||
$('#orderInfo_Box').html(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function projectChange() {
|
||||
|
||||
var myselect = document.getElementById("projectid");
|
||||
var index = myselect.selectedIndex;
|
||||
var pid = myselect.options[index].value;
|
||||
|
||||
// Ajax提交数据
|
||||
$.ajax({
|
||||
url: "/app/AutsChart/SetOrderSelected",//"APP/login/login", // 提交到controller的url路径
|
||||
type: "post", // 提交方式
|
||||
data: { "pid": pid }, // data为String类型,必须为 Key/Value 格式。
|
||||
dataType: "json", // 服务器端返回的数据类型
|
||||
success: function (res) { // 请求成功后的回调函数,其中的参数data为controller返回的map,也就是说,然后通过data这个参数取JSON数据中的值
|
||||
$("#order").empty();
|
||||
|
||||
if (res.Status == 200) {
|
||||
|
||||
if (res.Data.Order.length > 0) {
|
||||
var orderhtml = "";
|
||||
for (var i = 0; i < res.Data.Order.length; i++) {
|
||||
orderhtml += ' <option value=' + res.Data.Order[i].OrderID + '>' + res.Data.Order[i].OrderNo + '</option>';
|
||||
}
|
||||
$("#order").html(orderhtml);
|
||||
setOrderInfo(res.Data.Order[0].OrderID);
|
||||
}
|
||||
else {
|
||||
$("#orderInfo_Box").empty();
|
||||
}
|
||||
}
|
||||
else if (res.Status != 200) {
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function orderChange() {
|
||||
|
||||
var myselect = document.getElementById("order");
|
||||
var index = myselect.selectedIndex;
|
||||
var orderID = myselect.options[index].value;
|
||||
|
||||
setOrderInfo(orderID);
|
||||
}
|
||||
|
||||
function setOrderInfo(orderID) {
|
||||
// Ajax提交数据
|
||||
$.ajax({
|
||||
url: "/app/AutsChart/SetRealTimeOrderInfo",//"APP/login/login", // 提交到controller的url路径
|
||||
type: "post", // 提交方式
|
||||
data: { "orderID": orderID }, // data为String类型,必须为 Key/Value 格式。
|
||||
//dataType: "json", // 服务器端返回的数据类型
|
||||
success: function (res) { // 请求成功后的回调函数,其中的参数data为controller返回的map,也就是说,然后通过data这个参数取JSON数据中的值
|
||||
//$("#order").empty();
|
||||
|
||||
$("#orderInfo_Box").html(res);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
22
AUTS.Web/Areas/App/Views/AutsChart/_OrdersInfo.cshtml
Normal file
22
AUTS.Web/Areas/App/Views/AutsChart/_OrdersInfo.cshtml
Normal file
@@ -0,0 +1,22 @@
|
||||
@model AUTS.Domain.ViewModels.VM_OrderInfo
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
<div class="ibox-footer">
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<small class="stats-label">客户:@Model.CustomerAbbr</small>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<small class="stats-label">机型:@Model.ProjectName</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-footer">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<small class="stats-label">订单号:@Model.OrderNo</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
40
AUTS.Web/Areas/App/Views/AutsChart/_RealTimeOrderInfo.cshtml
Normal file
40
AUTS.Web/Areas/App/Views/AutsChart/_RealTimeOrderInfo.cshtml
Normal file
@@ -0,0 +1,40 @@
|
||||
@model AUTS.Domain.ViewModels.RealTimeOrderInfo
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
<div class="ibox-footer">
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<small class="stats-label">订单:@Model.OrderNo</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-footer">
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<small class="stats-label">机型:@Model.ProjectName</small>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<small class="stats-label">订单日期:@Model.CreateTime</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-footer">
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<small class="stats-label">数量:@Model.OrderCount</small>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<small class="stats-label">目标交期:@Model.DeliveryTime</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-footer">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
工艺站:
|
||||
<small class="stats-label">@Model.StationDes</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
82
AUTS.Web/Areas/App/Views/BasicFunc/CompanyList.cshtml
Normal file
82
AUTS.Web/Areas/App/Views/BasicFunc/CompanyList.cshtml
Normal file
@@ -0,0 +1,82 @@
|
||||
@model List<AUTS.Domain.Entities.TBL_Customer>
|
||||
@{
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
|
||||
<div class="row wrapper border-bottom white-bg page-heading">
|
||||
<div class="col-lg-10">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<a href="@Url.Action("Index", "Home")">主页</a>
|
||||
</li>
|
||||
<li>
|
||||
<a>基础数据</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<strong>客户列表</strong>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>客户列表</h5>
|
||||
<div class="ibox-tools">
|
||||
|
||||
<button class="btn btn-md btn-primary" type="button" id="btnaddPLine" onclick="gotoCommonPartial('@Url.Action("CompanyDetails", "BasicFunc")','companyBox_Content')">添加客户</button>
|
||||
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover dataTables-example">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>企业简称</th>
|
||||
<th>企业名称</th>
|
||||
<th>创建时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if (Model != null && Model.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < Model.Count; i++)
|
||||
{
|
||||
<tr onclick="gotoDetailPartial('@Url.Action("CompanyDetails", "BasicFunc")',@Model[i].ID,'companyBox_Content')">
|
||||
<td>@(i + 1)</td>
|
||||
<td>@Model[i].CustomerAbbr</td>
|
||||
<td>@Model[i].CustomerName</td>
|
||||
<td>@Model[i].CreateTime</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4" id="companyBox_Content">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="~/Plugin/common.js"></script>
|
||||
12
AUTS.Web/Areas/App/Views/BasicFunc/CompanyListOptions.cshtml
Normal file
12
AUTS.Web/Areas/App/Views/BasicFunc/CompanyListOptions.cshtml
Normal file
@@ -0,0 +1,12 @@
|
||||
@model List<AUTS.Domain.Entities.TBL_Customer>
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
@if (Model != null && Model.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < Model.Count; i++)
|
||||
{
|
||||
<option value="@Model[i].ID">@Model[i].CustomerAbbr</option>
|
||||
}
|
||||
}
|
||||
388
AUTS.Web/Areas/App/Views/BasicFunc/DataExcelImport.cshtml
Normal file
388
AUTS.Web/Areas/App/Views/BasicFunc/DataExcelImport.cshtml
Normal file
@@ -0,0 +1,388 @@
|
||||
|
||||
@{
|
||||
ViewBag.Title = "DataExcelImport";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
List<AUTS.Domain.Entities.TBL_Project> projectList = AUTS.Services.Cache.CacheHelp.GetUserDBProjectList();//机型
|
||||
List<AUTS.Domain.Entities.TBL_Customer> CompanyList = AUTS.Services.Cache.CacheHelp.GetUserDBCustomerList();//公司
|
||||
}
|
||||
<link href="~/Theme/css/fileinput.min.css" rel="stylesheet" />
|
||||
<link href="~/Theme/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
|
||||
<div class="row wrapper border-bottom white-bg page-heading">
|
||||
<div class="col-lg-10">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<a href="@Url.Action("Index", "Home")">主页</a>
|
||||
</li>
|
||||
<li>
|
||||
<a>基础数据</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<strong>数据导入</strong>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-2">
|
||||
</div>
|
||||
</div>
|
||||
<div class="wrapper wrapper-content animated fadeInRight">
|
||||
<div class="row">
|
||||
<div class="col-xs-12" style="padding:0">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>数据导入</h5>
|
||||
<div class="ibox-tools">
|
||||
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ibox-content" style="padding:5px;">
|
||||
<select id="projectList" class="form-control" style="display:inline;width:150px;">
|
||||
<option value="0">选择机型</option>
|
||||
|
||||
@if (projectList != null)
|
||||
{
|
||||
foreach (var item in projectList.OrderBy(e => e.ProjectName))
|
||||
{
|
||||
<option value="@item.ID">@item.ProjectName</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
<form id="ffImport" method="post">
|
||||
<div title="Excel导入操作" style="padding:4px 0px 0px">
|
||||
<input id="file" type="file" name="myfile">
|
||||
</div>
|
||||
</form>
|
||||
<button class="btn btn-sm btn-primary" type="button" id="btn">保存</button>
|
||||
<div class="table-responsive">
|
||||
<p>结果输出:<span style="color:red">(绿色代表数据库符合字段,符合数据才录入数据库)</span><span id="ExCount"></span></p>
|
||||
<p id="errorInfo" style="color:red;"></p>
|
||||
<div id="result"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="~/Plugin/fileinput.min.js"></script>
|
||||
<script src="~/Plugin/zh.min.js"></script>
|
||||
<script src="~/Scripts/xlsx.full.min.js"></script>
|
||||
<script src="~/Plugin/sweetalert2@11.js"></script>
|
||||
<script>
|
||||
var sety;
|
||||
var fileName;
|
||||
$("#file[name='myfile']").attr("disabled", "true"); //设置禁用按钮
|
||||
var btn = document.getElementById("btn");
|
||||
// 读取本地excel文件
|
||||
function readWorkbookFromLocalFile(file, callback) {
|
||||
var reader = new FileReader();
|
||||
reader.onload = function (e) {
|
||||
var data = e.target.result;
|
||||
var workbook = XLSX.read(data, { type: 'binary' });
|
||||
if (callback) callback(workbook);
|
||||
};
|
||||
reader.readAsBinaryString(file);
|
||||
}
|
||||
|
||||
// 读取 excel文件
|
||||
function outputWorkbook(workbook) {
|
||||
var sheetNames = workbook.SheetNames; // 工作表名称集合
|
||||
sheetNames.forEach(name => {
|
||||
var worksheet = workbook.Sheets[name]; // 只能通过工作表名称来获取指定工作表
|
||||
for (var key in worksheet) {
|
||||
// v是读取单元格的原始值
|
||||
console.log(key, key[0] === '!' ? worksheet[key] : worksheet[key].v);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function readWorkbook(workbook) {
|
||||
var sheetNames = workbook.SheetNames; // 工作表名称集合
|
||||
var worksheet = workbook.Sheets[sheetNames[0]]; // 这里我们只读取第一张sheet
|
||||
var csv = XLSX.utils.sheet_to_csv(worksheet);
|
||||
document.getElementById('result').innerHTML = csv2table(csv);
|
||||
}
|
||||
|
||||
$(function () {
|
||||
$.ajax({
|
||||
url: '/app/BasicFunc/SelectDBData', //url地址
|
||||
type: 'POST', //上传方式
|
||||
//dataType: 'JSON',
|
||||
cache: false, // 不缓存
|
||||
processData: false, // jQuery不要去处理发送的数据
|
||||
contentType: false, // jQuery不要去设置Content-Type请求头
|
||||
success: function (data) {
|
||||
sety = data;
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
// 将csv转换成表格
|
||||
function csv2table(csv) {
|
||||
var html = '<table class="table table-striped table-bordered table-hover dataTables-example">';
|
||||
var inft = sety;
|
||||
var rows = csv.split('\n');
|
||||
rows.pop(); // 最后一行没用的
|
||||
rows.forEach(function (row, idx) {
|
||||
if (idx == 19) { return html; }
|
||||
var columns = row.split(',');
|
||||
columns.unshift(idx + 1); // 添加行索引
|
||||
if (idx == 0) { // 添加列索引
|
||||
html += '<tr>';
|
||||
for (var i = 0; i < columns.length; i++) {
|
||||
//
|
||||
html += '<th>' + (i == 0 ? '' : String.fromCharCode(65 + i - 1)) + '</th>';
|
||||
}
|
||||
html += '</tr>';
|
||||
}
|
||||
html += '<tr>';
|
||||
columns.forEach(function (column) {
|
||||
var setyys = column.toString().toUpperCase();
|
||||
if (inft.indexOf(setyys) != -1) {
|
||||
html += "<td style='color: #1ab394;'>" + column + "</td>";
|
||||
}
|
||||
else
|
||||
{
|
||||
html += "<td>" + column + "</td>";
|
||||
|
||||
}
|
||||
});
|
||||
html += '</tr>';
|
||||
});
|
||||
html += '</table>';
|
||||
return html;
|
||||
}
|
||||
|
||||
function table2csv(table) {
|
||||
var csv = [];
|
||||
$(table).find('tr').each(function () {
|
||||
var temp = [];
|
||||
$(this).find('td').each(function () {
|
||||
temp.push($(this).html());
|
||||
})
|
||||
temp.shift(); // 移除第一个
|
||||
csv.push(temp.join(','));
|
||||
});
|
||||
csv.shift();
|
||||
return csv.join('\n');
|
||||
}
|
||||
|
||||
btn.onclick = function () {
|
||||
Swal.fire({
|
||||
title: '是否导入数据',
|
||||
text: "导入",
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: '导入'
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
Swal.fire(
|
||||
'请等待!',
|
||||
)
|
||||
UpladFile(fileName);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//btn.onclick = function () {
|
||||
//
|
||||
// $.toastr.success("保存成功", {
|
||||
// time: 5000,
|
||||
// position: 'top-center'
|
||||
// });
|
||||
|
||||
//}
|
||||
|
||||
$(function () {
|
||||
document.getElementById('file').addEventListener('change', function (e) {
|
||||
var files = e.target.files;
|
||||
if (files.length == 0) return;
|
||||
var f = files[0];
|
||||
if (!/\.xlsx$/g.test(f.name) && !/\.xls$/g.test(f.name)) {
|
||||
alert('仅支持读取xlsx、xls格式!');
|
||||
return;
|
||||
}
|
||||
readWorkbookFromLocalFile(f, function (workbook) {
|
||||
readWorkbook(workbook);
|
||||
});
|
||||
});
|
||||
InitExcelFile();
|
||||
});
|
||||
var UpladLock = 0;
|
||||
//选择上传
|
||||
function UpladFile(fileObj) {
|
||||
$("#file[name='myfile']").attr("disabled", "true"); //设置禁用按钮
|
||||
var AddTo = $("input[name='hide']:checked").val();
|
||||
|
||||
var form = new FormData(); // FormData 对象
|
||||
form.append("file", fileObj); // 文件对象
|
||||
form.append("product", proID);
|
||||
form.append("AddTo", AddTo);
|
||||
$.ajax({
|
||||
url: '/app/BasicFunc/GetImportInfoData', //url地址
|
||||
type: 'POST', //上传方式
|
||||
data: form, // 上传formdata封装的数据
|
||||
//dataType: 'JSON',
|
||||
cache: false, // 不缓存
|
||||
processData: false, // jQuery不要去处理发送的数据
|
||||
contentType: false, // jQuery不要去设置Content-Type请求头
|
||||
success: function (data) { //成功回调
|
||||
$(".btn.btn-primary.btn-file").removeAttr('disabled')//重置按钮
|
||||
$(".btn.btn-primary.btn-file").removeClass('disabled')//重置按钮
|
||||
$("#file[name='myfile']").removeAttr('disabled')//重置按钮
|
||||
|
||||
if (data.Status != 200) {
|
||||
UpladLock = 1;
|
||||
$(".fileinput-upload").hide();
|
||||
$("#errorInfo").html(data.Message);
|
||||
$.toastr.error(data.Message, {
|
||||
time: 5000,
|
||||
position: 'top-center'
|
||||
});
|
||||
} else {
|
||||
sel();
|
||||
|
||||
Qty = JSON.stringify(data.Data);
|
||||
$("#errorInfo").html("");
|
||||
|
||||
UpladLock = 2;
|
||||
}
|
||||
},
|
||||
error: function (data) { //失败回调
|
||||
console.log(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
//选择上传
|
||||
|
||||
|
||||
$("#CompanyList").bind().change(function () {
|
||||
sel();
|
||||
});
|
||||
$("#projectList").bind().change(function () {
|
||||
sel();
|
||||
});
|
||||
|
||||
$("button.fileinput-remove").click(function () {
|
||||
$(".fileinput-upload").hide();
|
||||
|
||||
});
|
||||
var addBarCodes = 0;
|
||||
|
||||
$(".BarCodes").on("change", function () {
|
||||
addBarCodes = $("input[name='hide']:checked").val();
|
||||
if (addBarCodes == undefined)
|
||||
addBarCodes = 0;
|
||||
});
|
||||
|
||||
var companyID = -1;
|
||||
var proID;
|
||||
var Qty = {};
|
||||
|
||||
function sel() {
|
||||
var company = $("#CompanyList").val();
|
||||
var projectID = $("#projectList").val();
|
||||
if (projectID != "0") {
|
||||
$(".btn.btn-primary.btn-file").removeAttr('disabled')//重置按钮
|
||||
$(".btn.btn-primary.btn-file").removeClass('disabled')//重置按钮
|
||||
$("#file[name='myfile']").removeAttr('disabled')//重置按钮
|
||||
|
||||
proID = projectID;
|
||||
companyID = company;
|
||||
if ($("#filename").val() != "") {
|
||||
$(".fileinput-upload").show();
|
||||
}
|
||||
} else {
|
||||
$(".fileinput-upload").hide();
|
||||
|
||||
$("#file[name='myfile']").attr("disabled", "true"); //设置禁用按钮
|
||||
|
||||
if (projectID == "0") {
|
||||
$.toastr.error("请选择机型", {
|
||||
time: 3000,
|
||||
position: 'top-center'
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function InitExcelFile() {
|
||||
//记录GUID
|
||||
setTimeout(function () {
|
||||
$('span.hidden-xs').removeClass('hidden-xs');
|
||||
$("input.file-caption-name form-control").removeAttr("readonly");
|
||||
}, 200);
|
||||
//$("#AttachGUID").val(newGuid());
|
||||
//var company = $("#CompanyList").val();
|
||||
//var projectID = $("#projectList").val();
|
||||
$("#file").fileinput({
|
||||
uploadUrl: "/app/BasicFunc/GetImportInfoData",//上传的地址
|
||||
uploadAsync: true, //异步上传
|
||||
language: "zh", //设置语言
|
||||
showCaption: true, //是否显示标题
|
||||
showUpload: false, //是否显示上传按钮
|
||||
showRemove: false, //是否显示移除按钮
|
||||
showPreview: false, //是否显示预览按钮
|
||||
browseClass: "btn btn-primary", //按钮样式
|
||||
dropZoneEnabled: false, //是否显示拖拽区域
|
||||
allowedFileExtensions: ["xls", "xlsx"], //接收的文件后缀
|
||||
minFileCount: 1,
|
||||
maxFileCount: 1, //最大上传文件数限制
|
||||
previewFileIcon: '<i class="glyphicon glyphicon-file"></i>',
|
||||
allowedPreviewTypes: null,
|
||||
previewFileIconSettings: {
|
||||
'docx': '<i class="glyphicon glyphicon-file"></i>',
|
||||
'xlsx': '<i class="glyphicon glyphicon-file"></i>',
|
||||
'pptx': '<i class="glyphicon glyphicon-file"></i>',
|
||||
'jpg': '<i class="glyphicon glyphicon-picture"></i>',
|
||||
'pdf': '<i class="glyphicon glyphicon-file"></i>',
|
||||
'zip': '<i class="glyphicon glyphicon-file"></i>',
|
||||
},
|
||||
uploadExtraData: function () { //上传的时候,增加的附加参数
|
||||
return { product: proID }
|
||||
}
|
||||
})
|
||||
.on('filebatchselected', function (event, data) {
|
||||
|
||||
fileName = event.delegateTarget.files[0];//js 获取文件对象
|
||||
if (fileName !== undefined) {
|
||||
var file_typename = fileName.name.substring(fileName.name.lastIndexOf('.'));
|
||||
if (file_typename === '.xlsx' || file_typename === '.xls') {
|
||||
$("#filename").css("display", "block");
|
||||
$("#filename").val(fileName.name);
|
||||
} else {
|
||||
console.log("请选择正确的文件类型!")
|
||||
}
|
||||
} else {
|
||||
console.log("请选择正确的文件!")
|
||||
}
|
||||
})
|
||||
.on('fileuploaded', function (event, data, previewId, index) {//文件上传完成后的事件
|
||||
//var form = data.form, files = data.files, extra = data.extra,
|
||||
// response = data.response, reader = data.reader;
|
||||
if (data.response.Status != 200) {
|
||||
$.toastr.error(data.response.Message, {
|
||||
time: 3000,
|
||||
position: 'top-center'
|
||||
});
|
||||
} else {
|
||||
$.toastr.success("上传成功", {
|
||||
time: 3000,
|
||||
position: 'top-center'
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
391
AUTS.Web/Areas/App/Views/BasicFunc/EcxelList.cshtml
Normal file
391
AUTS.Web/Areas/App/Views/BasicFunc/EcxelList.cshtml
Normal file
@@ -0,0 +1,391 @@
|
||||
|
||||
@{
|
||||
ViewBag.Title = "EcxelList";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
List<AUTS.Domain.Entities.TBL_Project> projectList = AUTS.Services.Cache.CacheHelp.GetUserDBProjectList();//机型
|
||||
List<AUTS.Domain.Entities.TBL_Customer> CompanyList = AUTS.Services.Cache.CacheHelp.GetUserDBCustomerList();//公司
|
||||
|
||||
}
|
||||
@*<link href="https://cdn.bootcdn.net/ajax/libs/bootstrap-fileinput/5.2.3/css/fileinput.min.css" rel="stylesheet">*@
|
||||
<link href="~/Theme/css/fileinput.min.css" rel="stylesheet" />
|
||||
@*<link href="~/Content/fileinput.min.css" rel="stylesheet" />*@
|
||||
<div class="row wrapper border-bottom white-bg page-heading">
|
||||
<div class="col-lg-10">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<a href="@Url.Action("Index", "Home")">主页</a>
|
||||
</li>
|
||||
<li>
|
||||
<a>基础数据</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<strong>Sn导入</strong>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight">
|
||||
<div class="row">
|
||||
<div class="col-xs-12" style="padding:0">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>Sn导入</h5>
|
||||
<div class="ibox-tools">
|
||||
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ibox-content" style="padding:5px;">
|
||||
<select id="projectList" class="form-control" style="display:inline;width:150px;">
|
||||
<option value="0">选择机型</option>
|
||||
|
||||
@if (projectList != null)
|
||||
{
|
||||
foreach (var item in projectList.OrderBy(e => e.ProjectName))
|
||||
{
|
||||
<option value="@item.ID">@item.ProjectName</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
@*公司*@
|
||||
<select id="CompanyList" class="form-control" style="display:inline;width:120px;">
|
||||
<option value="0">选择客户</option>
|
||||
@if (CompanyList != null)
|
||||
{
|
||||
foreach (var item in CompanyList.OrderBy(e => e.CustomerAbbr))
|
||||
{
|
||||
<option value="@item.ID">@item.CustomerAbbr</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
<label> <input type="checkbox" name="hide" class="BarCodes" value="1">追加SN</label>
|
||||
|
||||
<form id="ffImport" method="post">
|
||||
<div title="Excel导入操作" style="padding:4px 0px 0px">
|
||||
<input id="file" type="file" name="myfile">
|
||||
</div>
|
||||
</form>
|
||||
<p>格式表头:Sn(序列号必须)<br />(PO(客户订单)、MO(制造订单)、QTY(数量)、LEAD_TIME(交期)、PRICE(单价)) 可选(无顺序要求)</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover dataTables-example">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>A</th>
|
||||
<th>B</th>
|
||||
<th>C</th>
|
||||
<th>D</th>
|
||||
<th>E</th>
|
||||
<th>F</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>1</th>
|
||||
<th>PO</th>
|
||||
<th>MO</th>
|
||||
<th>QTY</th>
|
||||
<th>LEAD_TIME</th>
|
||||
<th>SN</th>
|
||||
<th>PRICE</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<p>结果输出:<span id="ExCount"></span></p>
|
||||
<p id="errorInfo" style="color:red;"></p>
|
||||
<div id="result"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="~/Plugin/fileinput.min.js"></script>
|
||||
<script src="~/Plugin/zh.min.js"></script>
|
||||
<script src="~/Scripts/xlsx.full.min.js"></script>
|
||||
|
||||
<script>
|
||||
$("#file[name='myfile']").attr("disabled", "true"); //设置禁用按钮
|
||||
// 读取本地excel文件
|
||||
function readWorkbookFromLocalFile(file, callback) {
|
||||
var reader = new FileReader();
|
||||
reader.onload = function (e) {
|
||||
var data = e.target.result;
|
||||
var workbook = XLSX.read(data, { type: 'binary' });
|
||||
if (callback) callback(workbook);
|
||||
};
|
||||
reader.readAsBinaryString(file);
|
||||
}
|
||||
|
||||
// 读取 excel文件
|
||||
function outputWorkbook(workbook) {
|
||||
var sheetNames = workbook.SheetNames; // 工作表名称集合
|
||||
sheetNames.forEach(name => {
|
||||
var worksheet = workbook.Sheets[name]; // 只能通过工作表名称来获取指定工作表
|
||||
for (var key in worksheet) {
|
||||
// v是读取单元格的原始值
|
||||
console.log(key, key[0] === '!' ? worksheet[key] : worksheet[key].v);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function readWorkbook(workbook) {
|
||||
var sheetNames = workbook.SheetNames; // 工作表名称集合
|
||||
var worksheet = workbook.Sheets[sheetNames[0]]; // 这里我们只读取第一张sheet
|
||||
var csv = XLSX.utils.sheet_to_csv(worksheet);
|
||||
document.getElementById('result').innerHTML = csv2table(csv);
|
||||
}
|
||||
|
||||
// 将csv转换成表格
|
||||
function csv2table(csv) {
|
||||
var html = '<table class="table table-striped table-bordered table-hover dataTables-example">';
|
||||
var rows = csv.split('\n');
|
||||
rows.pop(); // 最后一行没用的
|
||||
rows.forEach(function (row, idx) {
|
||||
//console.log(row);
|
||||
if (idx == 19) { return html; }
|
||||
var columns = row.split(',');
|
||||
columns.unshift(idx + 1); // 添加行索引
|
||||
if (idx == 0) { // 添加列索引
|
||||
html += '<tr>';
|
||||
for (var i = 0; i < columns.length; i++) {
|
||||
//
|
||||
html += '<th>' + (i == 0 ? '' : String.fromCharCode(65 + i - 1)) + '</th>';
|
||||
}
|
||||
html += '</tr>';
|
||||
}
|
||||
html += '<tr>';
|
||||
columns.forEach(function (column) {
|
||||
html += '<td>' + column + '</td>';
|
||||
});
|
||||
html += '</tr>';
|
||||
});
|
||||
html += '</table>';
|
||||
return html;
|
||||
}
|
||||
|
||||
function table2csv(table) {
|
||||
var csv = [];
|
||||
$(table).find('tr').each(function () {
|
||||
var temp = [];
|
||||
$(this).find('td').each(function () {
|
||||
temp.push($(this).html());
|
||||
})
|
||||
temp.shift(); // 移除第一个
|
||||
csv.push(temp.join(','));
|
||||
});
|
||||
csv.shift();
|
||||
return csv.join('\n');
|
||||
}
|
||||
|
||||
$(function () {
|
||||
document.getElementById('file').addEventListener('change', function (e) {
|
||||
var files = e.target.files;
|
||||
if (files.length == 0) return;
|
||||
var f = files[0];
|
||||
if (!/\.xlsx$/g.test(f.name) && !/\.xls$/g.test(f.name)) {
|
||||
alert('仅支持读取xlsx、xls格式!');
|
||||
return;
|
||||
}
|
||||
readWorkbookFromLocalFile(f, function (workbook) {
|
||||
readWorkbook(workbook);
|
||||
});
|
||||
});
|
||||
InitExcelFile();
|
||||
});
|
||||
|
||||
var UpladLock = 0;
|
||||
//选择上传
|
||||
function UpladFile(fileObj) {
|
||||
$("#file[name='myfile']").attr("disabled", "true"); //设置禁用按钮
|
||||
var AddTo = $("input[name='hide']:checked").val();
|
||||
|
||||
var form = new FormData(); // FormData 对象
|
||||
form.append("file", fileObj); // 文件对象
|
||||
form.append("product", proID);
|
||||
form.append("AddTo", AddTo);
|
||||
$.ajax({
|
||||
url: '/app/BasicFunc/getExcelData', //url地址
|
||||
type: 'POST', //上传方式
|
||||
data: form, // 上传formdata封装的数据
|
||||
//dataType: 'JSON',
|
||||
cache: false, // 不缓存
|
||||
processData: false, // jQuery不要去处理发送的数据
|
||||
contentType: false, // jQuery不要去设置Content-Type请求头
|
||||
success: function (data) { //成功回调
|
||||
$(".btn.btn-primary.btn-file").removeAttr('disabled')//重置按钮
|
||||
$(".btn.btn-primary.btn-file").removeClass('disabled')//重置按钮
|
||||
$("#file[name='myfile']").removeAttr('disabled')//重置按钮
|
||||
|
||||
if (data.Status != 200) {
|
||||
UpladLock = 1;
|
||||
$(".fileinput-upload").hide();
|
||||
$("#errorInfo").html(data.Message);
|
||||
$.toastr.error(data.Message, {
|
||||
time: 5000,
|
||||
position: 'top-center'
|
||||
});
|
||||
} else {
|
||||
sel();
|
||||
|
||||
console.log(data.Data);
|
||||
Qty = JSON.stringify(data.Data);
|
||||
//console.log(Qty);
|
||||
$("#ExCount").html("共有" + data.Message + "条记录,只显示前20条");
|
||||
$("#errorInfo").html("");
|
||||
|
||||
UpladLock = 2;
|
||||
}
|
||||
//console.log(data);
|
||||
},
|
||||
error: function (data) { //失败回调
|
||||
console.log(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
//选择上传
|
||||
|
||||
|
||||
$("#CompanyList").bind().change(function () {
|
||||
sel();
|
||||
});
|
||||
$("#projectList").bind().change(function () {
|
||||
sel();
|
||||
});
|
||||
|
||||
$("button.fileinput-remove").click(function () {
|
||||
$(".fileinput-upload").hide();
|
||||
|
||||
});
|
||||
var addBarCodes = 0;
|
||||
|
||||
$(".BarCodes").on("change", function () {
|
||||
addBarCodes = $("input[name='hide']:checked").val();
|
||||
if (addBarCodes == undefined)
|
||||
addBarCodes = 0;
|
||||
|
||||
console.log(addBarCodes);
|
||||
});
|
||||
|
||||
var companyID = -1;
|
||||
var proID;
|
||||
var Qty = {};
|
||||
|
||||
function sel() {
|
||||
var company = $("#CompanyList").val();
|
||||
var projectID = $("#projectList").val();
|
||||
if (projectID != "0") {
|
||||
$(".btn.btn-primary.btn-file").removeAttr('disabled')//重置按钮
|
||||
$(".btn.btn-primary.btn-file").removeClass('disabled')//重置按钮
|
||||
$("#file[name='myfile']").removeAttr('disabled')//重置按钮
|
||||
|
||||
proID = projectID;
|
||||
companyID = company;
|
||||
if ($("#filename").val() != "") {
|
||||
$(".fileinput-upload").show();
|
||||
}
|
||||
} else {
|
||||
$(".fileinput-upload").hide();
|
||||
|
||||
$("#file[name='myfile']").attr("disabled", "true"); //设置禁用按钮
|
||||
|
||||
if (projectID == "0") {
|
||||
$.toastr.error("请选择机型", {
|
||||
time: 3000,
|
||||
position: 'top-center'
|
||||
});
|
||||
}
|
||||
//if (company == 0) {
|
||||
// $.toastr.error("请选择客户", {
|
||||
// time: 3000,
|
||||
// position: 'top-center'
|
||||
// });
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
function InitExcelFile() {
|
||||
//记录GUID
|
||||
setTimeout(function () {
|
||||
$('span.hidden-xs').removeClass('hidden-xs');
|
||||
$("input.file-caption-name form-control").removeAttr("readonly");
|
||||
|
||||
}, 200);
|
||||
|
||||
//$("#AttachGUID").val(newGuid());
|
||||
//var company = $("#CompanyList").val();
|
||||
//var projectID = $("#projectList").val();
|
||||
$("#file").fileinput({
|
||||
uploadUrl: "/app/BasicFunc/UpdateExcel",//上传的地址
|
||||
uploadAsync: true, //异步上传
|
||||
language: "zh", //设置语言
|
||||
showCaption: true, //是否显示标题
|
||||
showUpload: true, //是否显示上传按钮
|
||||
showRemove: true, //是否显示移除按钮
|
||||
showPreview: false, //是否显示预览按钮
|
||||
browseClass: "btn btn-primary", //按钮样式
|
||||
dropZoneEnabled: false, //是否显示拖拽区域
|
||||
allowedFileExtensions: ["xls", "xlsx"], //接收的文件后缀
|
||||
minFileCount: 1,
|
||||
maxFileCount: 1, //最大上传文件数限制
|
||||
previewFileIcon: '<i class="glyphicon glyphicon-file"></i>',
|
||||
allowedPreviewTypes: null,
|
||||
previewFileIconSettings: {
|
||||
'docx': '<i class="glyphicon glyphicon-file"></i>',
|
||||
'xlsx': '<i class="glyphicon glyphicon-file"></i>',
|
||||
'pptx': '<i class="glyphicon glyphicon-file"></i>',
|
||||
'jpg': '<i class="glyphicon glyphicon-picture"></i>',
|
||||
'pdf': '<i class="glyphicon glyphicon-file"></i>',
|
||||
'zip': '<i class="glyphicon glyphicon-file"></i>',
|
||||
},
|
||||
uploadExtraData: function () { //上传的时候,增加的附加参数
|
||||
return { product: proID, customer: companyID, MOData: Qty, AddTo: addBarCodes }
|
||||
}
|
||||
})
|
||||
.on('filebatchselected', function (event, data) {
|
||||
|
||||
var fileName = event.delegateTarget.files[0];//js 获取文件对象
|
||||
if (fileName !== undefined) {
|
||||
var file_typename = fileName.name.substring(fileName.name.lastIndexOf('.'));
|
||||
if (file_typename === '.xlsx' || file_typename === '.xls') {
|
||||
$("#filename").css("display", "block");
|
||||
$("#filename").val(fileName.name);
|
||||
UpladFile(fileName);
|
||||
} else {
|
||||
console.log("请选择正确的文件类型!")
|
||||
}
|
||||
} else {
|
||||
console.log("请选择正确的文件!")
|
||||
}
|
||||
})
|
||||
.on('fileuploaded', function (event, data, previewId, index) {//文件上传完成后的事件
|
||||
//var form = data.form, files = data.files, extra = data.extra,
|
||||
// response = data.response, reader = data.reader;
|
||||
if (data.response.Status != 200) {
|
||||
$.toastr.error(data.response.Message, {
|
||||
time: 3000,
|
||||
position: 'top-center'
|
||||
});
|
||||
} else {
|
||||
$.toastr.success("上传成功", {
|
||||
time: 3000,
|
||||
position: 'top-center'
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
81
AUTS.Web/Areas/App/Views/BasicFunc/OStatusList.cshtml
Normal file
81
AUTS.Web/Areas/App/Views/BasicFunc/OStatusList.cshtml
Normal file
@@ -0,0 +1,81 @@
|
||||
@model List<AUTS.Domain.Entities.TBL_UTS_Manage_OrderStatus>
|
||||
@{
|
||||
ViewBag.Title = "OStatusList";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
|
||||
<div class="row wrapper border-bottom white-bg page-heading">
|
||||
<div class="col-lg-10">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<a href="@Url.Action("Index", "Home")">主页</a>
|
||||
</li>
|
||||
<li>
|
||||
<a>基础数据</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<strong>订单状态列表</strong>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>订单状态列表</h5>
|
||||
<div class="ibox-tools">
|
||||
|
||||
<button class="btn btn-md btn-primary" type="button" id="btnaddPLine" onclick="gotoCommonPartial('@Url.Action("OStatusDetails", "BasicFunc")','companyBox_Content')">添加订单状态</button>
|
||||
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover dataTables-example">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>订单状态</th>
|
||||
<th>备注</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if (Model != null && Model.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < Model.Count; i++)
|
||||
{
|
||||
<tr onclick="gotoDetailPartial('@Url.Action("OStatusDetails", "BasicFunc")',@Model[i].ID,'companyBox_Content')">
|
||||
<td>@(i+1)</td>
|
||||
<td>@Model[i].StatusName</td>
|
||||
<td>@Model[i].Remark</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4" id="companyBox_Content">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="~/Plugin/common.js"></script>
|
||||
92
AUTS.Web/Areas/App/Views/BasicFunc/PLineList.cshtml
Normal file
92
AUTS.Web/Areas/App/Views/BasicFunc/PLineList.cshtml
Normal file
@@ -0,0 +1,92 @@
|
||||
@using PagedList.Mvc;
|
||||
@using PagedList;
|
||||
@model PagedList.PagedList<AUTS.Domain.Entities.TBL_ProductionLine>
|
||||
@{
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
|
||||
<div class="row wrapper border-bottom white-bg page-heading">
|
||||
<div class="col-lg-10">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<a href="@Url.Action("Index", "Home")">主页</a>
|
||||
</li>
|
||||
<li>
|
||||
<a>基础数据</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<strong>产线列表</strong>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>产线列表</h5>
|
||||
<div class="ibox-tools">
|
||||
<button class="btn btn-sm btn-primary" type="button" id="btnaddPLine" onclick="gotoCommonPartial('@Url.Action("PLineDetails", "BasicFunc")','plineBox_Content')">添加产线</button>
|
||||
<button class="btn btn-sm btn-warning" type="button" onclick="updateCommonCache('@Url.Action("ClearUserPLineCache", "BasicFunc")','@Url.Action("PLineList", "BasicFunc")')">更新缓存</button>
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover dataTables-example">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>产线名称</th>
|
||||
<th>说明</th>
|
||||
<th>备注</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if (Model != null && Model.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < Model.Count; i++)
|
||||
{
|
||||
<tr onclick="gotoDetailPartial('@Url.Action("PLineDetails", "BasicFunc")',@Model[i].ID,'plineBox_Content')">
|
||||
<td>@(i + 1)</td>
|
||||
<td>@Model[i].Name</td>
|
||||
<td>@Model[i].Description</td>
|
||||
<td>@Model[i].Remark</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
@if (Model != null && Model.Count > 0)
|
||||
{
|
||||
@Html.PagedListPager((IPagedList)Model, page => Url.Action(ViewContext.RouteData.Values["action"].ToString(),
|
||||
AUTS.Services.Tool.StringHelp.GetQueryString(HttpUtility.ParseQueryString(Request.Url.Query), page)), new PagedListRenderOptions() { ContainerDivClasses = new string[] { "pagination-small pull-right" } })
|
||||
}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4" id="plineBox_Content">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="~/Plugin/common.js"></script>
|
||||
|
||||
207
AUTS.Web/Areas/App/Views/BasicFunc/ProjectList.cshtml
Normal file
207
AUTS.Web/Areas/App/Views/BasicFunc/ProjectList.cshtml
Normal file
@@ -0,0 +1,207 @@
|
||||
@model List<AUTS.Domain.Entities.TBL_Project>
|
||||
@{
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
string imagesrc = "";
|
||||
|
||||
|
||||
List<AUTS.Domain.Sys_Currency> currencyList = AUTS.Services.Cache.CacheHelp.GetSysCurrencyList();//币种列表
|
||||
List<AUTS.Domain.Entities.TBL_ProductTypes> productTypesList = AUTS.Services.Cache.CacheHelp.GetUserDBProjectTypeList();//产品类型列表
|
||||
List<AUTS.Domain.Entities.TBL_StationList> StationList = AUTS.Services.Cache.CacheHelp.GetUserDBStationList();//工艺站
|
||||
}
|
||||
@*<link href="~/Theme/css/plugins/dataTables/datatables.min.css" rel="stylesheet" />*@
|
||||
<style>
|
||||
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
|
||||
border-top: none;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.table > tbody + tbody {
|
||||
border-top: 0px;
|
||||
}
|
||||
|
||||
.table > tbody {
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
|
||||
td {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.gray {
|
||||
color: gray;
|
||||
}
|
||||
</style>
|
||||
<div class="row wrapper border-bottom white-bg page-heading">
|
||||
<div class="col-lg-10">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<a href="@Url.Action("Index", "Home")">主页</a>
|
||||
</li>
|
||||
<li>
|
||||
<a>基础数据</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<strong>产品信息</strong>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight">
|
||||
<div class="row">
|
||||
<div class="col-sm-8" style="padding:0px;">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>产品列表 (<span class="count">@ViewBag.count</span>)</h5>
|
||||
<div class="ibox-tools">
|
||||
@*<button class="btn btn-sm btn-primary" type="button" id="btnaddUser" onclick="gotoCommonPartial('@Url.Action("ProjectDetails", "BasicFunc")','projectBox_Content')">添加产品</button>*@
|
||||
<button class="btn btn-sm btn-warning" type="button" onclick="updateCommonCache('@Url.Action("ClearUserProjectCache", "BasicFunc")','@Url.Action("ProjectList", "BasicFunc")')">更新信息</button>
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6" style="padding:0px;">
|
||||
<select id="ProductType" class="form-control">
|
||||
<option value="0">所有类型</option>
|
||||
@if (productTypesList != null && productTypesList.Count > 0)
|
||||
{
|
||||
foreach (var item in productTypesList)
|
||||
{
|
||||
@*@(item.ProductType == "RCU 主机" ? "selected" : "")*@
|
||||
<option value="@item.ID">@item.ProductType</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-xs-6" style="padding:0px;">
|
||||
|
||||
<select id="ValidProduct" class="form-control">
|
||||
<option value="valid">有效产品</option>
|
||||
<option value="all">所有产品</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-10" style="padding-right:0px;">
|
||||
<input type="text" id="searchData" name="name" class="form-control" width="200" value="" placeholder="搜索产品名称" />
|
||||
</div>
|
||||
<div class="col-xs-1" style="padding:0px;">
|
||||
<button type="button" class="btn btn-primary" id="search">搜索</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="ibox-content" style="padding:0px;">
|
||||
|
||||
<div id="orderData">
|
||||
<div>
|
||||
<nav style="text-align:center;">
|
||||
|
||||
<ul class="pagination" id="page">
|
||||
<li class="first" onclick="firstPage('/App/BasicFunc/ProjectDataList')"><a>«</a></li>
|
||||
<li class="left"><a>…</a></li>
|
||||
@for (int i = 0; i < ViewBag.allpage; i++)
|
||||
{
|
||||
<li class="pages" onclick="SpecifyPage(@(i),'/App/BasicFunc/ProjectDataList')"><a>@(i + 1)</a></li>
|
||||
}
|
||||
<li class="right"><a>…</a></li>
|
||||
<li class="finally"><a onclick="lastPage('/App/BasicFunc/ProjectDataList')">»</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<table class="table dataTables-example" border="0">
|
||||
@if (Model != null && Model.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < Model.Count; i++)
|
||||
{
|
||||
<tbody class="tbodyList">
|
||||
<tr>
|
||||
<td rowspan="5" style="margin:0px;padding:0px;width:75px">
|
||||
<input type="hidden" id="ID" class="ID" value="@Model[i].ID" />
|
||||
<div class="lightBoxGallery" style="width:85px;height:85px;">
|
||||
<img id="images" data-src="/BasicFunc/FileImage?url=@(Model[i].ImageName)" src="~/Images/tupian.jpg" style="margin:0px;">
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td style="text-align:left;width:30.5%;">ID:<span class="gray">@(Model[i].ID)</span></td>
|
||||
<td style="font-size:15px;color:#6495ED;"><strong> @Model[i].ProjectName</strong></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class="gray">@Model[i].CreateTime.Value.ToString("yyyy/MM/dd")</span> </td>
|
||||
@foreach (var item in productTypesList)
|
||||
{
|
||||
if (item.ID == Model[i].ProductTypeID)
|
||||
{
|
||||
<td>
|
||||
<span class="gray">@item.ProductType</span>
|
||||
</td>
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2" colspan="2" style="font-size:11px;color:gray;"><span class="gray">@Model[i].Description</span></td>
|
||||
</tr>
|
||||
<tr></tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
工艺站:
|
||||
@if (StationList.Count > 0 && StationList != null)
|
||||
{
|
||||
foreach (var item in StationList.Where(e => e.ProjectID == Model[i].ID).OrderBy(e => e.ArtworkOrder))
|
||||
{
|
||||
|
||||
<span class="gray">@item.StationName ,</span>
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
}
|
||||
}
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4" id="projectBox_Content">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@*<script src="~/Theme/js/plugins/dataTables/datatables.min.js"></script>*@
|
||||
|
||||
<script src="~/Plugin/allPages.js"></script>
|
||||
<script src="~/Plugin/ProjectList.js"></script>
|
||||
@*<script src="~/Plugin/loadImage.js"></script>*@
|
||||
<script>
|
||||
window.onload = function () {
|
||||
var url = window.location.href;
|
||||
var index = url.indexOf("ProductName");
|
||||
console.log(index);
|
||||
var str;
|
||||
if (index != -1) {
|
||||
str = url.substring(url.lastIndexOf("=") + 1, url.length);
|
||||
$("#searchData").val(str);
|
||||
history.pushState("", "", "/App/BasicFunc/ProjectList");
|
||||
}
|
||||
GetProjectDataList();
|
||||
}
|
||||
|
||||
</script>
|
||||
83
AUTS.Web/Areas/App/Views/BasicFunc/ProjectTypeList.cshtml
Normal file
83
AUTS.Web/Areas/App/Views/BasicFunc/ProjectTypeList.cshtml
Normal file
@@ -0,0 +1,83 @@
|
||||
@model List<AUTS.Domain.Entities.TBL_ProductTypes>
|
||||
@{
|
||||
ViewBag.Title = "ProjectTypeList";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
|
||||
<div class="row wrapper border-bottom white-bg page-heading">
|
||||
<div class="col-lg-10">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<a href="@Url.Action("Index", "Home")">主页</a>
|
||||
</li>
|
||||
<li>
|
||||
<a>基础数据</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<strong>产品类型列表</strong>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>产品类型列表</h5>
|
||||
<div class="ibox-tools">
|
||||
|
||||
<button class="btn btn-md btn-primary" type="button" id="btnaddPLine" onclick="gotoCommonPartial('@Url.Action("ProTypeDetails", "BasicFunc")','typeBox_Content')">添加类型</button>
|
||||
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover dataTables-example">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>产品类型</th>
|
||||
<th>备注</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if (Model != null && Model.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < Model.Count; i++)
|
||||
{
|
||||
<tr onclick="gotoDetailPartial('@Url.Action("ProTypeDetails", "BasicFunc")',@Model[i].ID,'typeBox_Content')">
|
||||
<td>@(i + 1)</td>
|
||||
<td>@Model[i].ProductType</td>
|
||||
<td>@Model[i].Remark</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4" id="typeBox_Content">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="~/Plugin/common.js"></script>
|
||||
|
||||
|
||||
56
AUTS.Web/Areas/App/Views/BasicFunc/_AddPLine.cshtml
Normal file
56
AUTS.Web/Areas/App/Views/BasicFunc/_AddPLine.cshtml
Normal file
@@ -0,0 +1,56 @@
|
||||
@model AUTS.Domain.Entities.TBL_ProductionLine
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>添加产线</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<form class="form-horizontal" id="modifyUserForm">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">产线名称</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="hidden" name="userID" />
|
||||
<input type="text" placeholder="请输入产线名称" name="name" class="form-control" value="@Model.Name">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">说明</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="请输入说明" name="description" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">备注</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="请输入备注" name="remark" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-3 col-md-9">
|
||||
<button class="btn btn-md btn-primary" type="button" id="btnModifyUser">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="~/Plugin/inspinia-partial.js"></script>
|
||||
58
AUTS.Web/Areas/App/Views/BasicFunc/_CompanyDetails.cshtml
Normal file
58
AUTS.Web/Areas/App/Views/BasicFunc/_CompanyDetails.cshtml
Normal file
@@ -0,0 +1,58 @@
|
||||
@model AUTS.Domain.Entities.TBL_Customer
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>@ViewBag.Title</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link-partial">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link-partial">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<form class="form-horizontal" id="modifyCompanyForm">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">公司简称</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="hidden" name="companyID" value="@Model.ID" />
|
||||
<input type="text" placeholder="请输入公司简称" name="customerAbbr" class="form-control" value="@Model.CustomerAbbr">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">公司名称</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="请输入公司名称" name="customerName" class="form-control" value="@Model.CustomerName">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-3 col-md-9">
|
||||
<button class="btn btn-md btn-primary" type="button" id="btnModifyPLine" onclick="excutedUpDate('btnModifyPLine','@Url.Action("ModifyCompany", "BasicFunc")','modifyCompanyForm','@Url.Action("CompanyList", "BasicFunc")')">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var url = "/Theme/js/jquery.form.min.js";
|
||||
$.getScript(url);
|
||||
|
||||
var url1 = "/Plugin/basicfunc.js";
|
||||
$.getScript(url1);
|
||||
|
||||
var url2 = "/Plugin/inspinia-partial.js";
|
||||
$.getScript(url2);
|
||||
|
||||
</script>
|
||||
82
AUTS.Web/Areas/App/Views/BasicFunc/_ImportinfoLog.cshtml
Normal file
82
AUTS.Web/Areas/App/Views/BasicFunc/_ImportinfoLog.cshtml
Normal file
@@ -0,0 +1,82 @@
|
||||
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
|
||||
@if (ViewData["tableDataimpLog"] != null)
|
||||
{
|
||||
System.Data.DataSet datas = (System.Data.DataSet)ViewData["tableDataimpLog"];
|
||||
<input type="hidden" class="dataNum" value="@(ViewBag.dataNum)" />
|
||||
<div>
|
||||
<nav style="text-align:center;">
|
||||
<ul class="pagination" id="page">
|
||||
<li class="first" onclick="TestLogsData(1)"><a>首页</a></li>
|
||||
<li class="left"><a>…</a></li>
|
||||
@for (int i = 0; i < ViewBag.allpage; i++)
|
||||
{
|
||||
<li class="pages" onclick="TestLogsData(@(i + 1))"><a>@(i + 1)</a></li>
|
||||
}
|
||||
<li class="right"><a>…</a></li>
|
||||
<li class="finally"><a onclick="TestLogsData(@ViewBag.allpage)">尾页</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<table class="table table-striped table-bordered table-hover " id="editable">
|
||||
<thead>
|
||||
<tr>
|
||||
@for (int i = 0; i < datas.Tables[0].Columns.Count; i++)
|
||||
{
|
||||
<th>
|
||||
@datas.Tables[0].Columns[i]
|
||||
</th>
|
||||
}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@for (int row = 0; row < datas.Tables[0].Rows.Count; row++)
|
||||
{
|
||||
<tr>
|
||||
@for (int i = 0; i < datas.Tables[0].Columns.Count; i++)
|
||||
{
|
||||
|
||||
<td>
|
||||
@if (datas.Tables[0].Rows[row][i].ToString() != "NULL")
|
||||
{
|
||||
@datas.Tables[0].Rows[row][i]
|
||||
}
|
||||
</td>
|
||||
}
|
||||
</tr>
|
||||
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
<h4>暂无数据</h4>
|
||||
}
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
let sum = $(".dataNum").val() || 0;
|
||||
$("#dataNumber").text("(" + sum + ")");
|
||||
var table = document.getElementById("editable");
|
||||
if (table != null) {
|
||||
var len = table.rows.length;
|
||||
var _row = table.rows;
|
||||
for (var i = 1; i < len; i++) {
|
||||
var _cell = _row[i].cells;
|
||||
var d = _cell[8].innerText;
|
||||
console.log(d);
|
||||
if (d.trim() == "True") {
|
||||
table.rows[i].style.color = "green";
|
||||
}
|
||||
else
|
||||
table.rows[i].style.color = "red";
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
78
AUTS.Web/Areas/App/Views/BasicFunc/_ImportinfoLst.cshtml
Normal file
78
AUTS.Web/Areas/App/Views/BasicFunc/_ImportinfoLst.cshtml
Normal file
@@ -0,0 +1,78 @@
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
@if (ViewData["tableDataimp"] != null)
|
||||
{
|
||||
System.Data.DataSet datas = (System.Data.DataSet)ViewData["tableDataimp"];
|
||||
<input type="hidden" class="dataNum" value="@(ViewBag.dataNum)" />
|
||||
<div>
|
||||
<nav style="text-align:center;">
|
||||
<ul class="pagination" id="page">
|
||||
<li class="first"><a onclick="TestLogsData(1)">首页</a></li>
|
||||
<li class="left"><a>…</a></li>
|
||||
@for (int i = 0; i < ViewBag.allpage; i++)
|
||||
{
|
||||
<li class="pages" onclick="TestLogsData(@(i + 1))"><a>@(i + 1)</a></li>
|
||||
}
|
||||
<li class="right"><a>…</a></li>
|
||||
<li class="finally"><a onclick="TestLogsData(@ViewBag.allpage)">尾页</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<table class="table table-striped table-bordered table-hover " id="editable">
|
||||
<thead>
|
||||
<tr>
|
||||
@for (int i = 0; i < datas.Tables[0].Columns.Count; i++)
|
||||
{
|
||||
<th>
|
||||
@datas.Tables[0].Columns[i]
|
||||
</th>
|
||||
}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@for (int row = 0; row < datas.Tables[0].Rows.Count; row++)
|
||||
{
|
||||
<tr>
|
||||
@for (int i = 0; i < datas.Tables[0].Columns.Count; i++)
|
||||
{
|
||||
if (datas.Tables[0].Columns[i].ColumnName.ToUpper() == "SHIPPINGCODE")
|
||||
{
|
||||
<td><a style="color: inherit;" href="/App/Toolbar/UpdateShippingData?shippingcode=@datas.Tables[0].Rows[row][i].ToString().Trim().Replace(".","")">@datas.Tables[0].Rows[row][i].ToString().Trim()</a></td>
|
||||
}
|
||||
else if (i == 4)
|
||||
{
|
||||
<td><a style="color: inherit;" onclick="getBarCodeTestLogs('@datas.Tables[0].Rows[row][i].ToString().Trim().Replace(".","")')" data-toggle="modal" data-target="#myModal4">@datas.Tables[0].Rows[row][i].ToString().Trim()</a></td>
|
||||
}
|
||||
else
|
||||
{
|
||||
<td>
|
||||
@if (datas.Tables[0].Rows[row][i].ToString() != "NULL")
|
||||
{
|
||||
@datas.Tables[0].Rows[row][i]
|
||||
}
|
||||
</td>
|
||||
}
|
||||
}
|
||||
</tr>
|
||||
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
<h4>暂无数据</h4>
|
||||
}
|
||||
<script>
|
||||
/*
|
||||
if (pagesNum > 5) {
|
||||
$("li.right").show();
|
||||
} else {
|
||||
$("li.right").hide();
|
||||
}
|
||||
$("li.pages").hide(); // Hide all page list items
|
||||
$("li.pages:lt(5)").show(); // Show the first five page list items
|
||||
*/
|
||||
</script>
|
||||
210
AUTS.Web/Areas/App/Views/BasicFunc/_Maintain.cshtml
Normal file
210
AUTS.Web/Areas/App/Views/BasicFunc/_Maintain.cshtml
Normal file
@@ -0,0 +1,210 @@
|
||||
@model List<showModel>
|
||||
|
||||
@using AUTS.Domain.Application;
|
||||
@using AUTS.Web.Areas.App.Models;
|
||||
@using AUTS.Domain.Entities;
|
||||
@{
|
||||
List<AUTS.Domain.Entities.TBL_Project> Projectlist = AUTS.Services.Cache.CacheHelp.GetUserDBProjectList();//产品类型列表
|
||||
List<AUTS.Domain.Entities.TBL_UTS_Manage_User> userList = AUTS.Services.Cache.CacheHelp.GeiUserList();
|
||||
var RepairResultslist = ViewData["RepairResults"] as List<TBL_RepairResults>;//维修日志表
|
||||
var StationListlist = ViewData["StationList"] as List<TBL_StationList>;//站位表
|
||||
var Orderslist = ViewData["Orders"] as List<TBL_Orders>;//订单表
|
||||
var RepairTypeslist = ViewData["RepairTypes"] as List<TBL_RepairTypes>;//维修类型表
|
||||
var RepairReasonlist = ViewData["RepairReason"] as List<RepairReason>;//维修原因表
|
||||
var Customerlist = ViewData["Customer"] as List<TBL_Customer>;//客户表
|
||||
bool AccountBill = ViewData["AccountBill"].ToBool();//结单权限
|
||||
}
|
||||
<div>
|
||||
<nav style="text-align:center;">
|
||||
|
||||
<ul class="pagination" id="page">
|
||||
<li class="first" onclick="firstPage('/App/BasicFunc/RepairRequestSelect')"><a>«</a></li>
|
||||
<li class="left"><a>…</a></li>
|
||||
@for (int i = 0; i < ViewBag.allpage; i++)
|
||||
{
|
||||
<li class="pages" onclick="SpecifyPage(@(i),'/App/BasicFunc/RepairRequestSelect')"><a>@(i + 1)</a></li>
|
||||
}
|
||||
<li class="right"><a>…</a></li>
|
||||
<li class="finally"><a onclick="lastPage('/App/BasicFunc/RepairRequestSelect')">»</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<table class="table dataTables-example" border="0">
|
||||
@{
|
||||
if (Model.Count > 0 && Model != null)
|
||||
{
|
||||
foreach (var item in Model)
|
||||
{
|
||||
<tbody style="border-block-start:1px dashed #ffd800" class="tbodyList">
|
||||
<tr onclick="Showinfo(this)" class="callset">
|
||||
|
||||
|
||||
<td colspan="2" style="padding-left: 12px;font-size: 15px; color: #6495ED; width: 30.5%;"><strong></strong></td>
|
||||
<td style="padding-left:15px"></td>
|
||||
<td>
|
||||
<button type="button" class="layui-btn layui-btn-xs layui-btn-normal" style="background-color:#18a689; margin-top:15px;" onclick="AddMaintain('@item.RepairRequestNum','@item.RejectSource','@item.Repairier')"><a href="#projectBox_Content" style="color:aliceblue">添加</a></button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr onclick="Showinfo(this)" class="callset">
|
||||
<td colspan="3" style="padding-left: 10px; text-align:left; width: 30.5%;">单号:<span class="gray">@item.RepairRequestNum</span></td>
|
||||
<td>
|
||||
<button type="button" class="layui-btn layui-btn-xs layui-btn-normal" style="background-color:#18a689; margin-top:3px;" onclick="compile('@item.RepairRequestNum','@item.RejectSource')"><a href="#projectBox_Content" style="color:aliceblue">编辑</a></button>
|
||||
</td>
|
||||
<td>
|
||||
</tr>
|
||||
<tr onclick="Showinfo(this)" class="callset">
|
||||
@*不良品来源*@
|
||||
<td colspan="3" style="padding-left: 10px">
|
||||
不良品来源:<span class="gray">@item.RejectSource</span>
|
||||
</td>
|
||||
@if (item.ziLs[0].Statement == 1)
|
||||
{
|
||||
<td> <button type="button" class="layui-btn layui-btn-xs layui-btn-normal" style="background-color:#18a689; ">已结单</button></td>
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (AccountBill)
|
||||
{
|
||||
<td> <button type="button" class="layui-btn layui-btn-xs layui-btn-normal" style="background-color:#18a689;" onclick="Statement('@item.RepairRequestNum')">结单</button></td>
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
<td> <button type="button" class="layui-btn layui-btn-xs layui-btn-normal" style="background-color:#18a689;" onclick="alert('无权限')">结单</button></td>
|
||||
}
|
||||
}
|
||||
</tr>
|
||||
<tr onclick="Showinfo(this)" class="callset" style="height:10px;">
|
||||
<td colspan="3" style="padding-left: 10px">创建时间:<span class="gray">@item.ziLs.Last().CreateTime</span></td>
|
||||
<td>
|
||||
<button type="button" class="layui-btn layui-btn-xs layui-btn-normal" id="btnCapacitySearch" style="background-color:#18a689; margin-top:3px; height:25px;" onclick="ExportExcel('@item.RepairRequestNum')">导出</button>
|
||||
<a href="#" class="download" target="_blank" style="color:blue; visibility:hidden ">下载</a>
|
||||
</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr onclick="Showinfo(this)" class="callset">
|
||||
<td colspan="3" style="padding-left:10px">数量:<span class="gray">@item.ziLs.Count</span></td>
|
||||
|
||||
<td style="padding:0px 0px 0px 15px"></td>
|
||||
|
||||
</tr>
|
||||
@foreach (var item1 in item.ziLs)
|
||||
{
|
||||
<tr style="background-color: rgb(255,250,240); border-block-start: 1px dotted #808080" class="hideclass Showinfoson" onclick="Showinfoson(@item1.ID,this)">
|
||||
<td colspan="4" style="padding-left: 40px">
|
||||
产品条形码:<span class="gray">:@(item1.Barcode.ToString() != null ? item1.Barcode : "")</span>
|
||||
<button type="button" class="layui-btn layui-btn-xs layui-btn-normal" style="background-color:#DC143C;" onclick="redact(@item1.ID)"><a href="#projectBox_Content" style="color:aliceblue">编辑</a></button>
|
||||
@* <a class="Showinfoson_a" style="color:lightskyblue" onclick="Showinfoson(@item1.ID,this)">详细</a>*@
|
||||
</td>
|
||||
<td colspan="4"></td>
|
||||
</tr>
|
||||
|
||||
<tr style="background-color: rgb(255,250,240);" class="hideclass " onclick="Showinfoson(@item1.ID,this)">
|
||||
<td colspan="2" style="padding-left: 40px">
|
||||
机型:<span class="gray">@(item1.ProductID.ToString() != "" ? Projectlist.SingleOrDefault(x => x.ID == item1.ProductID).ProjectName : "")</span>
|
||||
</td>
|
||||
<td colspan="2" style="padding-left: 40px"></td>
|
||||
</tr>
|
||||
<tr style="background-color: rgb(255,250,240);" class="hideclass " onclick="Showinfoson(@item1.ID,this)">
|
||||
<td colspan="2" style="padding-left: 40px">
|
||||
|
||||
|
||||
返修方案:
|
||||
@if (item1.theLog != null)
|
||||
{
|
||||
<span class="gray">
|
||||
nav style="text-align:center
|
||||
@item1.theLog.RepairComment;
|
||||
</span>
|
||||
}
|
||||
</td>
|
||||
<td colspan="2" style="padding-left: 40px"></td>
|
||||
</tr>
|
||||
<tr style="background-color: rgb(255,250,240);" class="hideclass" onclick="Showinfoson(@item1.ID,this)">
|
||||
<td colspan="4" style="padding-left: 40px">
|
||||
|
||||
结果:
|
||||
@if (item1.theLog != null)
|
||||
{
|
||||
<span class="gray">
|
||||
@(item1.theLog.RepairResult.ToString() != null ? RepairResultslist.SingleOrDefault(x => x.ID == item1.theLog.RepairResult).Name : "");
|
||||
</span>
|
||||
}
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="background-color: rgb(220,220,220); display: none;" class="hideclassson_@item1.ID">
|
||||
<td colspan="4" style="padding-left: 40px">
|
||||
<span class="gray">报修单:-------------------------------------</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="background-color: rgb(220,220,220); display: none;" class="hideclassson_@item1.ID">
|
||||
<td colspan="4" style="padding-left: 40px">
|
||||
<span class="gray">
|
||||
保修人:
|
||||
@(item1.UserID.ToString() != null ? (userList.SingleOrDefault(x => x.ID == item1.UserID) != null ? userList.SingleOrDefault(x => x.ID == item1.UserID).UserName : "无") : "无")
|
||||
</span>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr class="hideclassson_@item1.ID" style="background-color: rgb(220,220,220); display: none;">
|
||||
<td colspan="2" style="padding-left: 40px">
|
||||
<span class="gray">不良代码:@item1.RejectDesc</span>
|
||||
</td>
|
||||
<td colspan="2" style="padding-left: 40px">
|
||||
<span class="gray">详细说明:@item1.DetailRemark </span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="hideclassson_@item1.ID" style="background-color:rgb(220,220,220); display: none;">
|
||||
<td colspan="2" style="padding-left: 40px">
|
||||
<span class="gray">维修进度: @item1.RepairProgress</span>
|
||||
</td>
|
||||
<td colspan="4" style="padding-left: 40px">
|
||||
<span class="gray">备注:@item1.Remark </span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="hideclassson_@item1.ID" style="background-color:rgb(220,220,220); display: none;">
|
||||
<td colspan="2" style="padding-left: 40px">
|
||||
<span class="gray">保修图片:</span>
|
||||
</td>
|
||||
<td colspan="4" style="padding-left: 40px">
|
||||
<span class="gray"><img id="images" src="/BasicFunc/FileImage?url=@(item1.ProductImage)" style="margin:0px;"></span>
|
||||
</td>
|
||||
</tr>
|
||||
if (item1.theLog != null)
|
||||
{
|
||||
<tr class="hideclassson_@item1.ID" style="background-color: rgb(220,220,220); display: none;">
|
||||
<td colspan="4" style="padding-left: 40px">
|
||||
<span class="gray">维修单:-----------------------------</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="hideclassson_@item1.ID" style="background-color:rgb(220,220,220); display: none;">
|
||||
<td colspan="2" style="padding-left: 40px">
|
||||
<span class="gray">维修类型:@(item1.theLog.RepairType.ToString() != null ? RepairTypeslist.SingleOrDefault(x => x.ID == item1.theLog.RepairType).Name : "")</span>
|
||||
</td>
|
||||
<td colspan="2" style="padding-left: 40px">
|
||||
<span class="gray">维修原因:@(item1.theLog.RepairReason.ToString() != null ? RepairReasonlist.SingleOrDefault(x => x.ID == item1.theLog.RepairReason).Name : "")</span>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
else
|
||||
{
|
||||
<tr class="hideclassson_@item1.ID" style="background-color: rgb(220,220,220); display: none;">
|
||||
<td colspan="4" style="padding-left: 40px">
|
||||
<span class="gray">-----------------------------</span>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
}
|
||||
</tbody>
|
||||
}
|
||||
}
|
||||
}
|
||||
</table>
|
||||
<script src="~/Plugin/allPages.js"></script>
|
||||
<script src="~/Theme/js/plugins/dataTables/datatables.min.js"></script>
|
||||
129
AUTS.Web/Areas/App/Views/BasicFunc/_MaintainLog.cshtml
Normal file
129
AUTS.Web/Areas/App/Views/BasicFunc/_MaintainLog.cshtml
Normal file
@@ -0,0 +1,129 @@
|
||||
@model List<AUTS.Domain.Application.TBL_RepairLog>
|
||||
@{
|
||||
ViewBag.Title = "MaintainLog";
|
||||
Layout = "";
|
||||
List<AUTS.Domain.Entities.TBL_Project> Projectlist = AUTS.Services.Cache.CacheHelp.GetUserDBProjectList();//机型列表
|
||||
List<AUTS.Domain.Entities.TBL_StationList> station = AUTS.Services.Cache.CacheHelp.GetUserDBStationList();//站位表
|
||||
List<AUTS.Domain.Entities.TBL_Orders> Orderslist = AUTS.Services.Cache.CacheHelp.GetUserDBOrderList();//订单表
|
||||
List<AUTS.Domain.Application.TBL_RepairTypes> Repairlist = AUTS.Services.Cache.CacheHelp.GetUserDBSnRepairTypesList();//维修类型列表
|
||||
List<AUTS.Domain.Application.TBL_RepairReason> Repairreasonlist = AUTS.Services.Cache.CacheHelp.GetUserDBRepairReasonList();//维修原因列表
|
||||
List<AUTS.Domain.Application.TBL_RepairResults> RepairResultslist = AUTS.Services.Cache.CacheHelp.GetUserDBRepairResultsList();//维修结果列表
|
||||
List<AUTS.Domain.Entities.TBL_ProductTypes> ProductTypes = AUTS.Services.Cache.CacheHelp.GetUserDBProjectTypeList();//产品列表
|
||||
List<AUTS.Domain.Entities.TBL_StationList> StationList = AUTS.Services.Cache.CacheHelp.GetUserDBStationList();//站位列表
|
||||
List<AUTS.Domain.Entities.TBL_UTS_Manage_User> Userlist = ViewData["Company"] as List<AUTS.Domain.Entities.TBL_UTS_Manage_User>;
|
||||
List<AUTS.Domain.Entities.TBL_SnList> SNlist = AUTS.Services.Cache.CacheHelp.GetUserDBPSnlist();//订单表
|
||||
}
|
||||
<div>
|
||||
<nav style="text-align:center;">
|
||||
|
||||
<ul class="pagination" id="page">
|
||||
<li class="first" onclick="firstPage('/App/BasicFunc/MaintainLogSelect')"><a>«</a></li>
|
||||
<li class="left"><a>…</a></li>
|
||||
@for (int i = 0; i < ViewBag.allpage; i++)
|
||||
{
|
||||
<li class="pages" onclick="SpecifyPage(@(i),'/App/BasicFunc/MaintainLogSelect')"><a>@(i + 1)</a></li>
|
||||
}
|
||||
<li class="right"><a>…</a></li>
|
||||
<li class="finally"><a onclick="lastPage('/App/BasicFunc/MaintainLogSelect')">»</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<table class="table dataTables-example" border="0">
|
||||
@{
|
||||
|
||||
if (Model.Count > 0 && Model != null)
|
||||
{
|
||||
foreach (var item in Model)
|
||||
{
|
||||
<tbody style="border-block-start:1px dashed #ffd800" class="tbodyList">
|
||||
<tr onclick="Showinfoson(this)">
|
||||
@*提交人员*@
|
||||
<td colspan="2" style="padding-left: 10px;font-size:15px; color: #6495ED; width: 30.5%;"><strong>@item.DUT_SN</strong></td>
|
||||
@*<td style="padding-left:15px"></td>*@
|
||||
@*<td style="padding-left: 10px;font-size: 15px; color: #6495ED; width: 30.5%;"><strong>@item.FailMsg</strong></td>*@
|
||||
<td colspan="3" style="padding-left: 10px; text-align:left; width: 30.5%;"><span class="gray"><strong>@item.FailMsg</strong></span></td>
|
||||
</tr>
|
||||
<tr></tr>
|
||||
<tr onclick="Showinfoson(this)">
|
||||
<td colspan="2" style="padding-left: 10px; text-align:left; width: 30.5%;">
|
||||
机型:
|
||||
<span class="gray">
|
||||
@{
|
||||
@(Projectlist.SingleOrDefault(x => x.ID == item.ProductID)!=null? Projectlist.SingleOrDefault(x => x.ID == item.ProductID).ProjectName:"")
|
||||
}
|
||||
</span>
|
||||
</td>
|
||||
<td colspan="2" style="padding-left: 10px; text-align:left; width: 30.5%;">
|
||||
@if (item.RepairSource == "产线返修")
|
||||
{
|
||||
<soan>订单:<span class="gray">@(item.OrderID.ToString() != "" && item.OrderID != 0 ? Orderslist.Count != 0 ? Orderslist.SingleOrDefault(x => x.ID == item.OrderID).OrderNo : "" : "无订单")</span></soan>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="gray">返修来源订单号: @item.DocuNumber</span>
|
||||
}
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
<tr onclick="Showinfoson(this)">
|
||||
<td colspan="2" style="padding-left: 10px">
|
||||
站位:@(item.StationID.ToString() != "" ? StationList.Count != 0 && item.StationID != 0 ? StationList.SingleOrDefault(x => x.ID == item.StationID).StationName : "无" : "无")
|
||||
</td>
|
||||
<td colspan="2" style="padding-left: 10px" class="gray">
|
||||
错误步骤:@item.FailSteps
|
||||
</td>
|
||||
</tr>
|
||||
<tr onclick="Showinfoson(this)">
|
||||
<td colspan="2" style="padding-left: 10px"></td>
|
||||
<td colspan="2" style="padding-left: 10px; text-align:left; width: 30.5%;"><span class="gray">错误提示信息:@item.FailMsg</span></td>
|
||||
</tr>
|
||||
|
||||
<tr style="border-block-start: 1px dotted #808080" class="callset">
|
||||
<td colspan="2" style="padding-left: 10px">
|
||||
<span class="gray">产品错误代码:@item.ErrCode</span>
|
||||
</td>
|
||||
<td colspan="2"></td>
|
||||
</tr>
|
||||
<tr class="callset">
|
||||
<td colspan="2" style="padding-left: 10px">
|
||||
维修产品日期: @item.RepairDate
|
||||
</td>
|
||||
<td colspan="2" style="padding-left: 10px"></td>
|
||||
</tr>
|
||||
<tr class="callset">
|
||||
<td colspan="2" style="padding-left: 10px">
|
||||
|
||||
维修类型:@(item.RepairType.ToString() != "" ? Repairlist.Count != 0 ? Repairlist.SingleOrDefault(x => x.ID == item.RepairType).Name : "" : "")
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="callset">
|
||||
<td colspan="2" style="padding-left: 10px">
|
||||
不良原因: @(item.RepairReason.ToString() != "" ? Repairreasonlist.Count != 0 ? Repairreasonlist.SingleOrDefault(x => x.ID == item.RepairReason).Name : "" : "")
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="callset">
|
||||
<td colspan="2" style="padding-left: 10px">
|
||||
|
||||
<span class="gray">
|
||||
维修员备注: @item.RepairComment
|
||||
</span>
|
||||
</td>
|
||||
<td colspan="2" style="padding-left: 10px">
|
||||
@*<span class="gray">返修来源订单号: @item.DocuNumber</span>*@
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="callset">
|
||||
<td colspan="2" style="padding-left: 10px">
|
||||
<span class="gray">维修来源:@item.RepairSource</span>
|
||||
</td>
|
||||
<td colspan="2" style="padding-left: 10px">
|
||||
<span class="gray">维修产品结果:@(item.RepairResult.ToString() != "" ? RepairResultslist.Count != 0 ? RepairResultslist.SingleOrDefault(s => s.ID == item.RepairResult).Name : "" : "") </span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
}
|
||||
}
|
||||
}
|
||||
</table>
|
||||
58
AUTS.Web/Areas/App/Views/BasicFunc/_OStatusDetails.cshtml
Normal file
58
AUTS.Web/Areas/App/Views/BasicFunc/_OStatusDetails.cshtml
Normal file
@@ -0,0 +1,58 @@
|
||||
@model AUTS.Domain.Entities.TBL_UTS_Manage_OrderStatus
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>@ViewBag.Title</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link-partial">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link-partial">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<form class="form-horizontal" id="modifyCompanyForm">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">订单状态</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="hidden" name="ID" value="@Model.ID" />
|
||||
<input type="text" placeholder="请输入订单状态" name="StatusName" class="form-control" value="@Model.StatusName">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">备注</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="请输入备注" name="Remark" class="form-control" value="@Model.Remark">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-3 col-md-9">
|
||||
<button class="btn btn-md btn-primary" type="button" id="btnModifyPLine" onclick="excutedUpDate('btnModifyPLine','@Url.Action("ModifyOStatus", "BasicFunc")','modifyCompanyForm','@Url.Action("OStatusList", "BasicFunc")')">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var url = "/Theme/js/jquery.form.min.js";
|
||||
$.getScript(url);
|
||||
|
||||
var url1 = "/Plugin/basicfunc.js";
|
||||
$.getScript(url1);
|
||||
|
||||
var url2 = "/Plugin/inspinia-partial.js";
|
||||
$.getScript(url2);
|
||||
|
||||
</script>
|
||||
64
AUTS.Web/Areas/App/Views/BasicFunc/_PLineDetails.cshtml
Normal file
64
AUTS.Web/Areas/App/Views/BasicFunc/_PLineDetails.cshtml
Normal file
@@ -0,0 +1,64 @@
|
||||
@model AUTS.Domain.Entities.TBL_ProductionLine
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>@ViewBag.Title</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link-partial">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link-partial">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<form class="form-horizontal" id="modifyPLineForm">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">产线名称</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="hidden" name="id" value="@Model.ID" />
|
||||
<input type="text" placeholder="请输入产线名称" name="name" class="form-control" value="@Model.Name">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">说明</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="请输入说明" name="description" class="form-control" value="@Model.Description">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">备注</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="请输入备注" name="remark" class="form-control" value="@Model.Remark">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-3 col-md-9">
|
||||
<button class="btn btn-md btn-primary" type="button" id="btnModifyPLine">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var url = "/Theme/js/jquery.form.min.js";
|
||||
$.getScript(url);
|
||||
|
||||
var url1 = "/Plugin/basicfunc.js";
|
||||
$.getScript(url1);
|
||||
|
||||
var url2 = "/Plugin/inspinia-partial.js";
|
||||
$.getScript(url2);
|
||||
|
||||
</script>
|
||||
58
AUTS.Web/Areas/App/Views/BasicFunc/_ProTypeDetails.cshtml
Normal file
58
AUTS.Web/Areas/App/Views/BasicFunc/_ProTypeDetails.cshtml
Normal file
@@ -0,0 +1,58 @@
|
||||
@model AUTS.Domain.Entities.TBL_ProductTypes
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>@ViewBag.Title</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link-partial">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link-partial">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<form class="form-horizontal" id="modifyCompanyForm">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">类型名称</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="hidden" name="ID" value="@Model.ID" />
|
||||
<input type="text" placeholder="请输入类型名称" name="ProductType" class="form-control" value="@Model.ProductType">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">备注</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="请输入备注" name="Remark" class="form-control" value="@Model.Remark">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-3 col-md-9">
|
||||
<button class="btn btn-md btn-primary" type="button" id="btnModifyPLine" onclick="excutedUpDate('btnModifyPLine','@Url.Action("ModifyProType", "BasicFunc")','modifyCompanyForm','@Url.Action("ProjectTypeList", "BasicFunc")')">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var url = "/Theme/js/jquery.form.min.js";
|
||||
$.getScript(url);
|
||||
|
||||
var url1 = "/Plugin/basicfunc.js";
|
||||
$.getScript(url1);
|
||||
|
||||
var url2 = "/Plugin/inspinia-partial.js";
|
||||
$.getScript(url2);
|
||||
|
||||
</script>
|
||||
92
AUTS.Web/Areas/App/Views/BasicFunc/_ProjectDataList.cshtml
Normal file
92
AUTS.Web/Areas/App/Views/BasicFunc/_ProjectDataList.cshtml
Normal file
@@ -0,0 +1,92 @@
|
||||
@model List<AUTS.Domain.Entities.TBL_Project>
|
||||
@{
|
||||
Layout = null;
|
||||
string imagesrc = "";
|
||||
List<AUTS.Domain.Entities.TBL_ProductTypes> productTypesList = AUTS.Services.Cache.CacheHelp.GetUserDBProjectTypeList();//产品类型列表
|
||||
List<AUTS.Domain.Entities.TBL_StationList> StationList = AUTS.Services.Cache.CacheHelp.GetUserDBStationList();//工艺站
|
||||
}
|
||||
<input type="hidden" id="count" name="name" value="@ViewBag.count" />
|
||||
<div>
|
||||
<nav style="text-align:center;">
|
||||
|
||||
<ul class="pagination" id="page">
|
||||
<li class="first" onclick="firstPage('/App/BasicFunc/ProjectDataList')"><a>«</a></li>
|
||||
<li class="left"><a>…</a></li>
|
||||
@for (int i = 0; i < ViewBag.allpage; i++)
|
||||
{
|
||||
<li class="pages" onclick="SpecifyPage(@(i),'/App/BasicFunc/ProjectDataList')"><a>@(i + 1)</a></li>
|
||||
}
|
||||
<li class="right"><a>…</a></li>
|
||||
<li class="finally"><a onclick="lastPage('/App/BasicFunc/ProjectDataList')">»</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<table class="table dataTables-example" border="0">
|
||||
@if (Model != null && Model.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < Model.Count; i++)
|
||||
{
|
||||
<tbody class="tbodyList">
|
||||
<tr>
|
||||
<td rowspan="5" style="margin:0px;padding:0px;width:75px">
|
||||
<input type="hidden" id="ID" class="ID" value="@Model[i].ID" />
|
||||
<div class="lightBoxGallery" style="width:85px;height:85px;">
|
||||
<img id="images" data-src="/BasicFunc/FileImage?url=@(Model[i].ImageName)" src="~/Images/tupian.jpg" width="85" style="margin:0px;">
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td style="text-align:left;width:30.5%;">ID:<span class="gray">@(Model[i].ID)</span></td>
|
||||
<td style="font-size:15px;color:#6495ED;"><strong> @Model[i].ProjectName</strong></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class="gray">@Model[i].CreateTime.Value.ToString("yyyy/MM/dd")</span> </td>
|
||||
@foreach (var item in productTypesList)
|
||||
{
|
||||
if (item.ID == Model[i].ProductTypeID)
|
||||
{
|
||||
<td>
|
||||
<span class="gray">@item.ProductType</span>
|
||||
</td>
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2" colspan="2" style="font-size:11px;color:gray;"><span class="gray">@Model[i].Description</span></td>
|
||||
</tr>
|
||||
<tr></tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
工艺站:
|
||||
@if (StationList.Count > 0 && StationList != null)
|
||||
{
|
||||
foreach (var item in StationList.Where(e => e.ProjectID == Model[i].ID).OrderBy(e => e.ArtworkOrder))
|
||||
{
|
||||
|
||||
<span class="gray">@item.StationName ,</span>
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
}
|
||||
}
|
||||
|
||||
</table>
|
||||
<script>
|
||||
$("table>tbody.tbodyList").click(function () {
|
||||
var colorIndex = $(this).index();
|
||||
$("tbody.tbodyList").css("background-color", "white");
|
||||
$("tbody.tbodyList").eq(colorIndex).css("background-color", "#FFFAF0");
|
||||
});
|
||||
</script>
|
||||
<script src="~/Plugin/ProjectList.js"></script>
|
||||
<script src="~/Plugin/allPages.js"></script>
|
||||
<script src="~/Plugin/loadImage.js"></script>
|
||||
109
AUTS.Web/Areas/App/Views/BasicFunc/_ProjectDetails.cshtml
Normal file
109
AUTS.Web/Areas/App/Views/BasicFunc/_ProjectDetails.cshtml
Normal file
@@ -0,0 +1,109 @@
|
||||
@model AUTS.Domain.Entities.TBL_Project
|
||||
@{
|
||||
Layout = null;
|
||||
|
||||
string imagesrc = "";
|
||||
if (Model.PreviewImage != null)
|
||||
{
|
||||
//imagesrc = "data:image/" + Url.Action("GetImgPostFixByBytes", "Home", Model.PreviewImage) + ";base64," + Convert.ToBase64String(Model.PreviewImage);
|
||||
imagesrc = "data:image/jpg;base64," + Convert.ToBase64String(Model.PreviewImage);
|
||||
}
|
||||
|
||||
List<AUTS.Domain.Sys_Currency> currencyList = AUTS.Services.Cache.CacheHelp.GetSysCurrencyList();//币种列表
|
||||
}
|
||||
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>@ViewBag.Title</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link-partial">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link-partial">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<form class="form-horizontal" id="modifyProjectForm">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">产品名称</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="hidden" name="projectID" value="@Model.ID" />
|
||||
<input type="text" placeholder="请输入产品名称" name="projectName" class="form-control" value="@Model.ProjectName">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">币种</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<select class="form-control m-b" name="Currency">
|
||||
|
||||
@if (currencyList != null && currencyList.Count > 0)
|
||||
{
|
||||
foreach (var item in currencyList)
|
||||
{
|
||||
<option @(Model.Currency == item.Currency ? "selected" : "" ) value="@item.Currency">@item.Currency / @item.CurrencyName</option>
|
||||
}
|
||||
}
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">产值</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="请输入产值" name="price" class="form-control" value="@Model.Price">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">产品说明</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="请输入产品说明" name="description" class="form-control" value="@Model.Description">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">备注</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="请输入备注" name="remark" class="form-control" value="@Model.Remark">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">预览图</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<img id="imgCode" class="img-responsive" src="@imagesrc" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-3 col-md-9">
|
||||
<button class="btn btn-md btn-primary" type="button" id="btnModifyProject" onclick="excutedUpDate('btnModifyProject','@Url.Action("ModifyProject", "BasicFunc")','modifyProjectForm','@Url.Action("ProjectList", "BasicFunc")')">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var url = "/Theme/js/jquery.form.min.js";
|
||||
$.getScript(url);
|
||||
|
||||
var url1 = "/Plugin/basicfunc.js";
|
||||
$.getScript(url1);
|
||||
|
||||
var url2 = "/Plugin/inspinia-partial.js";
|
||||
$.getScript(url2);
|
||||
|
||||
|
||||
</script>
|
||||
44
AUTS.Web/Areas/App/Views/BasicFunc/_RejectsCode.cshtml
Normal file
44
AUTS.Web/Areas/App/Views/BasicFunc/_RejectsCode.cshtml
Normal file
@@ -0,0 +1,44 @@
|
||||
@model List<AUTS.Domain.Application.TBL_RejectsExplain>
|
||||
<div>
|
||||
<nav style="text-align:center;">
|
||||
|
||||
<ul class="pagination" id="page">
|
||||
<li class="first" onclick="firstPage('/App/BasicFunc/RejectsExplainSelect')"><a>«</a></li>
|
||||
<li class="left"><a>…</a></li>
|
||||
@for (int i = 0; i < ViewBag.allpage; i++)
|
||||
{
|
||||
<li class="pages" onclick="SpecifyPage(@(i),'/App/BasicFunc/RejectsExplainSelect')"><a>@(i + 1)</a></li>
|
||||
}
|
||||
<li class="right"><a>…</a></li>
|
||||
<li class="finally"><a onclick="lastPage('/App/BasicFunc/RejectsExplainSelect')">»</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<table class="table dataTables-example" border="0">
|
||||
@if (Model != null && Model.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < Model.Count; i++)
|
||||
{
|
||||
<tbody class="tbodyList">
|
||||
<tr>
|
||||
<td rowspan="5" style="margin:0px;padding:0px;width:75px"></td>
|
||||
<td style="font-size:15px;color:#6495ED;"><strong>不良代码:@Model[i].Matlab</strong></td>
|
||||
<td style="font-size:15px;color:#6495ED;"><strong>说明:@Model[i].Introductions</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
创建时间:@Model[i].CreationTime.ToString("yyyy-dd-mm")
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
不良品备注:@(Model[i].Remark != null ? Model[i].Remark : "无备注")
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
}
|
||||
}
|
||||
</table>
|
||||
<script src="~/Plugin/allPages.js"></script>
|
||||
<script src="~/Theme/js/plugins/dataTables/datatables.min.js"></script>
|
||||
467
AUTS.Web/Areas/App/Views/BasicFunc/colorboxlistExce.cshtml
Normal file
467
AUTS.Web/Areas/App/Views/BasicFunc/colorboxlistExce.cshtml
Normal file
@@ -0,0 +1,467 @@
|
||||
|
||||
@{
|
||||
ViewBag.Title = "colorboxlistExce";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
List<AUTS.Domain.Entities.TBL_Project> projectList = AUTS.Services.Cache.CacheHelp.GetUserDBProjectList();//机型
|
||||
List<AUTS.Domain.Entities.TBL_Customer> CompanyList = AUTS.Services.Cache.CacheHelp.GetUserDBCustomerList();//公司
|
||||
}
|
||||
<link href="~/Theme/css/fileinput.min.css" rel="stylesheet" />
|
||||
<link href="~/Theme/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
|
||||
<div class="row wrapper border-bottom white-bg page-heading">
|
||||
<div class="col-lg-10">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<a href="@Url.Action("Index", "Home")">主页</a>
|
||||
</li>
|
||||
<li>
|
||||
<a>基础数据</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<strong>数据导入</strong>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
</div>
|
||||
</div>
|
||||
<div class="wrapper wrapper-content animated fadeInRight">
|
||||
<div class="row">
|
||||
<div class="col-xs-12" style="padding:0">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>数据导入</h5>
|
||||
<div class="ibox-tools">
|
||||
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ibox-content" style="padding:5px;">
|
||||
<select id="projectList" class="form-control" style="display:inline;width:150px;">
|
||||
<option value="0">选择机型</option>
|
||||
|
||||
@if (projectList != null)
|
||||
{
|
||||
foreach (var item in projectList.OrderBy(e => e.ProjectName))
|
||||
{
|
||||
<option value="@item.ID">@item.ProjectName</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
<form id="ffImport" method="post">
|
||||
<div title="Excel导入操作" style="padding:4px 0px 0px">
|
||||
<input id="file" type="file" name="myfile">
|
||||
</div>
|
||||
</form>
|
||||
<button class="btn btn-sm btn-primary" type="button" id="btn">保存</button>
|
||||
<div class="table-responsive">
|
||||
<p>结果输出:<span style="color:red">(绿色代表数据库符合字段,符合数据才录入数据库,红色代表有重复数据)</span><span id="ExCount"></span></p>
|
||||
<p id="errorInfo" style="color:red;"></p>
|
||||
<div id="result"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="~/Plugin/fileinput.min.js"></script>
|
||||
<script src="~/Plugin/zh.min.js"></script>
|
||||
<script src="~/Scripts/xlsx.full.min.js"></script>
|
||||
<script src="~/Plugin/sweetalert2@11.js"></script>
|
||||
<script>
|
||||
var sety;
|
||||
var fileName;
|
||||
var record;
|
||||
let duplicates = [];
|
||||
let MOsubscript;
|
||||
let MOsubscriptsingle;//判断是否存在这个mo
|
||||
|
||||
$("#file[name='myfile']").attr("disabled", "true"); //设置禁用按钮
|
||||
var btn = document.getElementById("btn");
|
||||
// 读取本地excel文件
|
||||
function readWorkbookFromLocalFile(file, callback) {
|
||||
var reader = new FileReader();
|
||||
reader.onload = function (e) {
|
||||
var data = e.target.result;
|
||||
var workbook = XLSX.read(data, { type: 'binary' });
|
||||
if (callback) callback(workbook);
|
||||
};
|
||||
reader.readAsBinaryString(file);
|
||||
}
|
||||
// 读取 excel文件
|
||||
function outputWorkbook(workbook) {
|
||||
var sheetNames = workbook.SheetNames; // 工作表名称集合
|
||||
sheetNames.forEach(name => {
|
||||
var worksheet = workbook.Sheets[name]; // 只能通过工作表名称来获取指定工作表
|
||||
for (var key in worksheet) {
|
||||
// v是读取单元格的原始值
|
||||
//console.log(key, key[0] === '!' ? worksheet[key] : worksheet[key].v);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function readWorkbook(workbook) {
|
||||
var sheetNames = workbook.SheetNames; // 工作表名称集合
|
||||
var worksheet = workbook.Sheets[sheetNames[0]]; // 这里我们只读取第一张sheet
|
||||
var csv = XLSX.utils.sheet_to_csv(worksheet);
|
||||
document.getElementById('result').innerHTML = csv2table(csv);
|
||||
}
|
||||
|
||||
$(function () {
|
||||
$.ajax({
|
||||
url: '/app/BasicFunc/SelectDBData', //url地址
|
||||
type: 'POST', //上传方式
|
||||
//dataType: 'JSON',
|
||||
cache: false, // 不缓存
|
||||
processData: false, // jQuery不要去处理发送的数据
|
||||
contentType: false, // jQuery不要去设置Content-Type请求头
|
||||
success: function (data) {
|
||||
sety = data;
|
||||
},
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
// 将csv转换成表格
|
||||
function csv2table(csv) {
|
||||
var arr = new Array();
|
||||
var html = '<table class="table table-striped table-bordered table-hover dataTables-example">';
|
||||
var inft = sety;
|
||||
var rows = csv.split('\n');
|
||||
rows.pop(); // 最后一行没用的
|
||||
var firstMORow = '';
|
||||
rows.forEach(function (row, idx) {
|
||||
var columns = row.split(',');
|
||||
|
||||
for (var i = 0; i < columns.length; i++) {
|
||||
|
||||
}
|
||||
html += '<tr>';
|
||||
for (var i = 0; i < columns.length; i++) {
|
||||
var setyys = columns[i].toString().toUpperCase();
|
||||
|
||||
if (setyys == "COLORBOX_BARCODE") {
|
||||
record = i;
|
||||
}
|
||||
if (columns[i].toUpperCase() == 'MO') {
|
||||
MOsubscript = i;
|
||||
}
|
||||
if (columns[MOsubscript].toUpperCase() != 'MO') {
|
||||
MOsubscriptsingle = columns[MOsubscript];
|
||||
console.log(MOsubscriptsingle);
|
||||
}
|
||||
if (i == record) {
|
||||
arr.push(setyys);
|
||||
repetitionArray(arr);
|
||||
}
|
||||
if (inft.indexOf(setyys) != -1) {
|
||||
html += "<td style='color: #1ab394;'>" + columns[i] + "</td>";
|
||||
} else {
|
||||
html += "<td>" + columns[i] + "</td>";
|
||||
}
|
||||
// else {
|
||||
// if (duplicates.length != 0) {
|
||||
// for (var j = 0; j < duplicates.length; j++) {
|
||||
// if (duplicates[j] == columns[i]) {
|
||||
// html += "<td style='color: #FF3030;'>" + columns[i] + "</td>";
|
||||
// } else {
|
||||
// html += "<td>" + columns[i] + "</td>";
|
||||
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
// }
|
||||
// }
|
||||
}
|
||||
html += '</tr>';
|
||||
});
|
||||
|
||||
html += '</table>';
|
||||
return html;
|
||||
}
|
||||
function repetitionArray(yourArray){
|
||||
const tempArray = [...yourArray].sort()
|
||||
|
||||
for (let i = 0; i < tempArray.length; i++) {
|
||||
if (tempArray[i + 1] === tempArray[i]) {
|
||||
|
||||
duplicates.push(tempArray[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
function table2csv(table) {
|
||||
var csv = [];
|
||||
$(table).find('tr').each(function () {
|
||||
var temp = [];
|
||||
$(this).find('td').each(function () {
|
||||
temp.push($(this).html());
|
||||
})
|
||||
temp.shift(); // 移除第一个
|
||||
csv.push(temp.join(','));
|
||||
});
|
||||
csv.shift();
|
||||
return csv.join('\n');
|
||||
}
|
||||
|
||||
btn.onclick = function () {
|
||||
console.log(duplicates.length);
|
||||
if (duplicates.length > 0) {
|
||||
$.toastr.error("重复数据,禁止导入", {
|
||||
time: 50000,
|
||||
position: 'top-center'
|
||||
});
|
||||
} else {
|
||||
$.ajax({
|
||||
url: '/app/BasicFunc/EstimateMoexist', //url地址
|
||||
type: 'POST', //上传方式
|
||||
data: { "MO": MOsubscriptsingle },
|
||||
async: false, //同步
|
||||
success: function (data) {
|
||||
if (data.Status != 200) {
|
||||
//Swal.fire({
|
||||
// title: '已有此MO,还需继续添加吗?',
|
||||
// icon: 'warning',
|
||||
// showCancelButton: true,
|
||||
//}).then((result) => {
|
||||
// if (result.isConfirmed) {
|
||||
// UpladFile(fileName);
|
||||
// }
|
||||
//})
|
||||
Swal.fire({
|
||||
title: "导入错误",
|
||||
text: "已有此MO,禁止导入",
|
||||
type: "error",
|
||||
confirmButtonColor: "#4D9BFF",
|
||||
confirmButtonText: "确定",
|
||||
closeOnConfirm: true
|
||||
})
|
||||
}else {
|
||||
Swal.fire({
|
||||
title: '是否导入数据',
|
||||
text: '导入',
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
UpladFile(fileName);
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
$(function () {
|
||||
document.getElementById('file').addEventListener('change', function (e) {
|
||||
var files = e.target.files;
|
||||
if (files.length == 0) return;
|
||||
var f = files[0];
|
||||
if (!/\.xlsx$/g.test(f.name) && !/\.xls$/g.test(f.name)) {
|
||||
alert('仅支持读取xlsx、xls格式!');
|
||||
return;
|
||||
}
|
||||
readWorkbookFromLocalFile(f, function (workbook) {
|
||||
readWorkbook(workbook);
|
||||
});
|
||||
});
|
||||
InitExcelFile();
|
||||
});
|
||||
|
||||
var UpladLock = 0;
|
||||
//选择上传
|
||||
function UpladFile(fileObj) {
|
||||
|
||||
//$("#file[name='myfile']").attr("disabled", "true"); //设置禁用按钮
|
||||
var AddTo = $("input[name='hide']:checked").val();
|
||||
var form = new FormData(); // FormData 对象
|
||||
form.append("file", fileObj); // 文件对象
|
||||
form.append("product", proID);
|
||||
form.append("AddTo", AddTo);
|
||||
$.ajax({
|
||||
url: '/app/BasicFunc/GetcolorboxlistData', //url地址
|
||||
async: false, //同步
|
||||
type: 'POST', //上传方式
|
||||
data: form, // 上传formdata封装的数据
|
||||
//dataType: 'JSON',
|
||||
cache: false, // 不缓存
|
||||
processData: false, // jQuery不要去处理发送的数据
|
||||
contentType: false, // jQuery不要去设置Content-Type请求头
|
||||
success: function (data) { //成功回调
|
||||
$(".btn.btn-primary.btn-file").removeAttr('disabled')//重置按钮
|
||||
$(".btn.btn-primary.btn-file").removeClass('disabled')//重置按钮
|
||||
$("#file[name='myfile']").removeAttr('disabled')//重置按钮
|
||||
if (data.Status != 200) {
|
||||
UpladLock = 1;
|
||||
$(".fileinput-upload").hide();
|
||||
$("#errorInfo").html(data.Message);
|
||||
|
||||
|
||||
|
||||
Swal.fire({
|
||||
title: "导入错误",
|
||||
text: data.Message,
|
||||
type: "error",
|
||||
confirmButtonColor: "#4D9BFF",
|
||||
confirmButtonText: "确定",
|
||||
closeOnConfirm: true
|
||||
})
|
||||
//$.toastr.error(data.Message, {
|
||||
// time: 50000,
|
||||
// position: 'top-center'
|
||||
//});
|
||||
} else {
|
||||
Swal.fire({
|
||||
title: '已完成操作',
|
||||
}).then((result) => {
|
||||
})
|
||||
sel();
|
||||
Qty = JSON.stringify(data.Data);
|
||||
$("#errorInfo").html("");
|
||||
UpladLock = 2;
|
||||
}
|
||||
},
|
||||
error: function (data) { //失败回调
|
||||
console.log(data);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
function Data(fileObj) {
|
||||
|
||||
}
|
||||
//选择上传
|
||||
|
||||
|
||||
$("#CompanyList").bind().change(function () {
|
||||
sel();
|
||||
});
|
||||
$("#projectList").bind().change(function () {
|
||||
sel();
|
||||
});
|
||||
|
||||
$("button.fileinput-remove").click(function () {
|
||||
$(".fileinput-upload").hide();
|
||||
|
||||
});
|
||||
var addBarCodes = 0;
|
||||
|
||||
$(".BarCodes").on("change", function () {
|
||||
addBarCodes = $("input[name='hide']:checked").val();
|
||||
if (addBarCodes == undefined)
|
||||
addBarCodes = 0;
|
||||
});
|
||||
|
||||
var companyID = -1;
|
||||
var proID;
|
||||
var Qty = {};
|
||||
|
||||
function sel() {
|
||||
var company = $("#CompanyList").val();
|
||||
var projectID = $("#projectList").val();
|
||||
if (projectID != "0") {
|
||||
$(".btn.btn-primary.btn-file").removeAttr('disabled')//重置按钮
|
||||
$(".btn.btn-primary.btn-file").removeClass('disabled')//重置按钮
|
||||
$("#file[name='myfile']").removeAttr('disabled')//重置按钮
|
||||
|
||||
proID = projectID;
|
||||
companyID = company;
|
||||
if ($("#filename").val() != "") {
|
||||
$(".fileinput-upload").show();
|
||||
}
|
||||
} else {
|
||||
$(".fileinput-upload").hide();
|
||||
|
||||
//$("#file[name='myfile']").attr("disabled", "true"); //设置禁用按钮
|
||||
|
||||
if (projectID == "0") {
|
||||
$.toastr.error("请选择机型", {
|
||||
time: 3000,
|
||||
position: 'top-center'
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function InitExcelFile() {
|
||||
//记录GUID
|
||||
setTimeout(function () {
|
||||
$('span.hidden-xs').removeClass('hidden-xs');
|
||||
$("input.file-caption-name form-control").removeAttr("readonly");
|
||||
}, 200);
|
||||
//$("#AttachGUID").val(newGuid());
|
||||
//var company = $("#CompanyList").val();
|
||||
//var projectID = $("#projectList").val();
|
||||
//初始化文件上传控件
|
||||
$("#file").fileinput({
|
||||
uploadUrl: "/app/BasicFunc/GetImportInfoData",//上传的地址
|
||||
uploadAsync: true, //异步上传
|
||||
language: "zh", //设置语言
|
||||
showCaption: true, //是否显示标题
|
||||
showUpload: false, //是否显示上传按钮
|
||||
showRemove: false, //是否显示移除按钮
|
||||
showPreview: false, //是否显示预览按钮
|
||||
browseClass: "btn btn-primary", //按钮样式
|
||||
dropZoneEnabled: false, //是否显示拖拽区域
|
||||
allowedFileExtensions: ["xls", "xlsx"], //接收的文件后缀
|
||||
minFileCount: 0,
|
||||
maxFileCount: 0, //最大上传文件数限制
|
||||
previewFileIcon: '<i class="glyphicon glyphicon-file"></i>',
|
||||
allowedPreviewTypes: null,
|
||||
previewFileIconSettings: {
|
||||
'docx': '<i class="glyphicon glyphicon-file"></i>',
|
||||
'xlsx': '<i class="glyphicon glyphicon-file"></i>',
|
||||
'pptx': '<i class="glyphicon glyphicon-file"></i>',
|
||||
'jpg': '<i class="glyphicon glyphicon-picture"></i>',
|
||||
'pdf': '<i class="glyphicon glyphicon-file"></i>',
|
||||
'zip': '<i class="glyphicon glyphicon-file"></i>',
|
||||
},
|
||||
uploadExtraData: function () { //上传的时候,增加的附加参数
|
||||
return { product: proID }
|
||||
}
|
||||
})
|
||||
.on('filebatchselected', function (event, data) {
|
||||
|
||||
fileName = event.delegateTarget.files[0];//js 获取文件对象
|
||||
if (fileName !== undefined) {
|
||||
var file_typename = fileName.name.substring(fileName.name.lastIndexOf('.'));
|
||||
if (file_typename === '.xlsx' || file_typename === '.xls') {
|
||||
$("#filename").css("display", "block");
|
||||
$("#filename").val(fileName.name);
|
||||
} else {
|
||||
console.log("请选择正确的文件类型!")
|
||||
}
|
||||
} else {
|
||||
console.log("请选择正确的文件!")
|
||||
}
|
||||
})
|
||||
.on('fileuploaded', function (event, data, previewId, index) {//文件上传完成后的事件
|
||||
//var form = data.form, files = data.files, extra = data.extra,
|
||||
// response = data.response, reader = data.reader;
|
||||
if (data.response.Status != 200) {
|
||||
$.toastr.error(data.response.Message, {
|
||||
time: 3000,
|
||||
position: 'top-center'
|
||||
});
|
||||
} else {
|
||||
$.toastr.success("上传成功", {
|
||||
time: 3000,
|
||||
position: 'top-center'
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
277
AUTS.Web/Areas/App/Views/Capacity/CapacityEveryDay.cshtml
Normal file
277
AUTS.Web/Areas/App/Views/Capacity/CapacityEveryDay.cshtml
Normal file
@@ -0,0 +1,277 @@
|
||||
@model AUTS.Domain.ViewModels.VM_CapacityIndex
|
||||
@{
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
//List<AUTS.Domain.Entities.TBL_Project> projectList = AUTS.Services.Cache.CacheHelp.GetUserDBProjectList();//产品列表
|
||||
}
|
||||
|
||||
<div class="row wrapper border-bottom white-bg page-heading">
|
||||
<div class="col-lg-10">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<a href="@Url.Action("Index", "Home")">主页</a>
|
||||
</li>
|
||||
<li>
|
||||
<a>产能统计</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<strong>每日产能</strong>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight">
|
||||
<div class="row">
|
||||
<div class="col-sm-11">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>产能查询</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
|
||||
<form method="get" id="CapacitySearchForm">
|
||||
|
||||
<div class="row">
|
||||
<div class="form-inline">
|
||||
|
||||
<div class="col-sm-5">
|
||||
|
||||
<div class="input-group m-b">
|
||||
|
||||
<span class="input-group-addon">机型:</span>
|
||||
<select class="input-sm form-control input-s-sm inline" name="projectid" id="projectid">
|
||||
@if (Model.ProjectList != null && Model.ProjectList.Count > 0)
|
||||
{
|
||||
foreach (var item in Model.ProjectList)
|
||||
{
|
||||
<option value="@item.ID">@item.ProjectName</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-3 m-b-xs" id="data_ovform">
|
||||
@*<div class="input-group m-b">
|
||||
<span class="input-group-addon">订单:</span>
|
||||
<input type="text" class="form-control" name="orderid" id="orderid">
|
||||
</div>*@
|
||||
|
||||
<div class="input-group m-b">
|
||||
|
||||
<span class="input-group-addon">订单:</span>
|
||||
<select class="input-sm form-control input-s-sm inline" name="orderid" id="orderid">
|
||||
@if (Model.OrdersList != null && Model.OrdersList.Count > 0)
|
||||
{
|
||||
foreach (var item in Model.OrdersList)
|
||||
{
|
||||
<option value="@item.ID">@item.OrderNo</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<div class="input-group">
|
||||
<button type="button" class="btn btn-primary" id="btnEveryDaySearch">查询</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<div class="table-responsive">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-11">
|
||||
|
||||
<div id="everyDayOrderInfoBox">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="ibox-content">
|
||||
<div class="table-responsive" id="everyDayBox_Content">
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$("#btnEveryDaySearch").click(function () {
|
||||
var pid = $("#projectid").val();
|
||||
var orderid = $("#orderid").val();
|
||||
|
||||
if (pid == null || pid == "") {
|
||||
$.toastr.error('查询失败! <br />请选择机型', {
|
||||
time: 3000,
|
||||
position: 'top-center'
|
||||
});
|
||||
}
|
||||
if (!orderid) {
|
||||
$.toastr.error('查询失败! <br />请填写订单', {
|
||||
time: 3000,
|
||||
position: 'top-center'
|
||||
});
|
||||
}
|
||||
|
||||
// Ajax提交数据
|
||||
$.ajax({
|
||||
url: "/APP/Capacity/EveryDaySearchAjax",
|
||||
type: "post",
|
||||
data: { "pID": pid, "orderID": orderid },
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
if (res.Status == 200) {
|
||||
$("#everyDayBox_Content").empty();
|
||||
$("#everyDayOrderInfoBox").empty();
|
||||
|
||||
if (res.Data) {
|
||||
|
||||
var html = "";
|
||||
html += '<div class="ibox-footer"> <div class="row"><div class="col-xs-6">';
|
||||
html += '<small class="stats-label">订单:' + res.Data.OrderNo + '</small>';
|
||||
html += '</div></div></div>';
|
||||
html += '<div class="ibox-footer"><div class="row"><div class="col-xs-6">';
|
||||
html += '<small class="stats-label">机型:' + res.Data.ProjectName + '</small>';
|
||||
html += '</div><div class="col-xs-6">';
|
||||
html += '<small class="stats-label">订单日期:' + res.Data.CreateTime + '</small></div></div></div>';
|
||||
html += '<div class="ibox-footer"> <div class="row"><div class="col-xs-6">';
|
||||
html += '<small class="stats-label">数量:' + res.Data.OrderCount + '</small></div><div class="col-xs-6">';
|
||||
html += '<small class="stats-label">目标交期:' + res.Data.DeliveryTime + '</small></div></div></div>';
|
||||
|
||||
//填充数据
|
||||
var jsonArray = res.Data.Rows;
|
||||
var headArray = [];
|
||||
|
||||
//循环取字段名
|
||||
for (var i in jsonArray[0]) {
|
||||
headArray[headArray.length] = i;
|
||||
}
|
||||
|
||||
var div = document.getElementById("everyDayBox_Content");
|
||||
var table = document.createElement("table");
|
||||
table.id = "everyDay_table";
|
||||
table.setAttribute("class", "table table-striped table-bordered table-hover dataTables-example");
|
||||
|
||||
var theadH = document.createElement("thead");
|
||||
var thead = document.createElement("tr");
|
||||
|
||||
//表头 从1开始 忽略ID
|
||||
for (var count = 0; count < headArray.length; count++) {
|
||||
var td = document.createElement("th");
|
||||
td.innerHTML = headArray[count];
|
||||
thead.appendChild(td);
|
||||
}
|
||||
theadH.appendChild(thead);
|
||||
table.appendChild(theadH);
|
||||
|
||||
var theadY = document.createElement("tbody");
|
||||
|
||||
//表格数据
|
||||
for (var tableRowNo = 0; tableRowNo < jsonArray.length; tableRowNo++) {
|
||||
|
||||
var tr = document.createElement("tr");
|
||||
|
||||
tr.setAttribute("onclick", "clickaction(" + jsonArray[tableRowNo]["ID"] + ")")
|
||||
|
||||
//从1开始 忽略ID
|
||||
for (var headCount = 0; headCount < headArray.length; headCount++) {
|
||||
var cell = document.createElement("td");
|
||||
cell.innerHTML = jsonArray[tableRowNo][headArray[headCount]];
|
||||
tr.appendChild(cell);
|
||||
}
|
||||
theadY.appendChild(tr);
|
||||
table.appendChild(theadY);
|
||||
|
||||
}
|
||||
div.appendChild(table);
|
||||
$("#everyDayOrderInfoBox").html(html);
|
||||
for (var tableRowNo = 1; tableRowNo <= (jsonArray.length / 4); tableRowNo++) {
|
||||
|
||||
mergeCell('everyDay_table', tableRowNo * 4 - 4, tableRowNo * 4, 0);
|
||||
}
|
||||
|
||||
} else {
|
||||
$.toastr.success('暂无数据',
|
||||
{
|
||||
position: 'top-center',
|
||||
time: 1000,
|
||||
});
|
||||
}
|
||||
}
|
||||
else {
|
||||
$.toastr.error('查询失败! <br />' + res.Message, {
|
||||
time: 3000,
|
||||
position: 'top-center'
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$("#projectid").change(function () {
|
||||
|
||||
var pid = $("#projectid").val();
|
||||
//console.log(checkValue);
|
||||
|
||||
// Ajax提交数据
|
||||
$.ajax({
|
||||
url: "/APP/Capacity/GetOrderListInEveryDay",
|
||||
type: "post",
|
||||
data: { "pID": pid},
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
if (res.Status == 200) {
|
||||
|
||||
if (res.Data) {
|
||||
var orderhtml = "";
|
||||
for (var i = 0; i < res.Data.length; i++) {
|
||||
orderhtml += ' <option value=' + res.Data[i].OrderID + '>' + res.Data[i].OrderNo + '</option>';
|
||||
}
|
||||
$("#orderid").html(orderhtml);
|
||||
|
||||
} else {
|
||||
$("#orderid").empty();
|
||||
}
|
||||
}
|
||||
else {
|
||||
$.toastr.error('查询失败! <br />' + res.Message, {
|
||||
time: 3000,
|
||||
position: 'top-center'
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
//code...
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
313
AUTS.Web/Areas/App/Views/Capacity/CapacityIndex.cshtml
Normal file
313
AUTS.Web/Areas/App/Views/Capacity/CapacityIndex.cshtml
Normal file
@@ -0,0 +1,313 @@
|
||||
@model AUTS.Domain.ViewModels.VM_TBL_CapacityIndex
|
||||
@{
|
||||
//Layout = null;
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
|
||||
}
|
||||
|
||||
<link href="~/Theme/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
|
||||
|
||||
<div class="row wrapper border-bottom white-bg page-heading">
|
||||
<div class="col-lg-10">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<a href="@Url.Action("Index", "Home")">主页</a>
|
||||
</li>
|
||||
<li>
|
||||
<a>产能统计</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<strong>产能查询</strong>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight">
|
||||
<div class="row">
|
||||
<div class="col-sm-11">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>产能查询</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
|
||||
<form method="get" id="CapacitySearchForm">
|
||||
|
||||
<div class="row">
|
||||
<div class="form-inline">
|
||||
|
||||
<div class="col-sm-3">
|
||||
|
||||
<div class="input-group m-b">
|
||||
|
||||
<span class="input-group-addon">机型:</span>
|
||||
<select class="input-sm form-control input-s-sm inline" name="projectid" id="projectid">
|
||||
@if (Model.ProjectList != null && Model.ProjectList.Count > 0)
|
||||
{
|
||||
foreach (var item in Model.ProjectList)
|
||||
{
|
||||
<option value="@item.ID">@item.ProjectName</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4 m-b-xs" id="data_ovform">
|
||||
<div class="input-group m-b">
|
||||
<span class="input-group-addon">时间:</span>
|
||||
<div class="input-daterange input-group" id="datepicker">
|
||||
|
||||
<input type="text" class="input-sm form-control" readOnly name="startdate" />
|
||||
<span class="input-group-addon">to</span>
|
||||
<input type="text" class="input-sm form-control" readOnly name="enddate" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@*<div class="col-sm-2 m-b-xs">
|
||||
<div class="input-group m-b">
|
||||
<span class="input-group-addon">产线</span>
|
||||
<select class="input-sm form-control input-s-sm inline" name="plineid">
|
||||
<option value=''></option>
|
||||
@if (pLineList != null && pLineList.Count > 0)
|
||||
{
|
||||
foreach (var item in pLineList)
|
||||
{
|
||||
<option value="@item.ID">@item.Name</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-3">
|
||||
|
||||
<div class="input-group m-b">
|
||||
|
||||
<span class="input-group-addon">工艺站:</span>
|
||||
<select class="input-sm form-control input-s-sm inline" name="stationid" id="stationid">
|
||||
<option value=''></option>
|
||||
@if (stationList != null && stationList.Count > 0)
|
||||
{
|
||||
foreach (var item in stationList)
|
||||
{
|
||||
<option value="@item.StationID">@item.StationName</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>*@
|
||||
|
||||
<div class="col-sm-3">
|
||||
<div class="input-group">
|
||||
<button type="button" class="btn btn-primary" id="btnCapacitySearch">查询</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-inline">
|
||||
|
||||
@if (Model.SearchKey != null)
|
||||
{
|
||||
foreach (var item in Model.SearchKey)
|
||||
{
|
||||
@Html.Partial("../SearchKey/_" + item + "Search")
|
||||
}
|
||||
}
|
||||
|
||||
@*<div class="col-sm-3">
|
||||
|
||||
<div class="input-group m-b">
|
||||
|
||||
<span class="input-group-addon">客户:</span>
|
||||
<input type="text" class="form-control" name="customer">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3 m-b-xs" id="data_ovform">
|
||||
<div class="input-group m-b">
|
||||
<span class="input-group-addon">订单:</span>
|
||||
<input type="text" class="form-control" name="order">
|
||||
</div>
|
||||
</div>*@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@*<div class="col-sm-3">
|
||||
<div class="input-group">
|
||||
<button type="button" class="btn btn-primary" id="btnCapacitySearch">查询</button>
|
||||
</div>
|
||||
</div>*@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover dataTables-example">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>站</th>
|
||||
<th>总记录</th>
|
||||
<th>有效值</th>
|
||||
<th>PASS</th>
|
||||
<th>FAIL</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="outputValueTbody"></tbody>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4" id="plineBox_Content">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Data picker -->
|
||||
<script src="~/Theme/js/plugins/datapicker/bootstrap-datepicker.js"></script>
|
||||
<script src="~/Theme/js/plugins/datapicker/locales/bootstrap-datepicker.zh-CN.js"></script>
|
||||
|
||||
<script src="~/Theme/js/plugins/peity/jquery.peity.min.js"></script>
|
||||
<script src="~/Theme/js/plugins/pace/pace.min.js"></script>
|
||||
|
||||
<script>
|
||||
var url = "/Theme/js/jquery.form.min.js";
|
||||
$.getScript(url);
|
||||
|
||||
//var peityUrl = "/Theme/js/plugins/peity/jquery.peity.min.js";
|
||||
|
||||
$('#data_ovform .input-daterange').datepicker({
|
||||
language: "zh-CN",//语言
|
||||
todayBtn: "linked",//今日按钮
|
||||
keyboardNavigation: false,
|
||||
forceParse: false,
|
||||
autoclose: true,
|
||||
format: "yyyy/mm/dd"//日期格式
|
||||
});
|
||||
|
||||
|
||||
|
||||
//产能查询变更机型改变工艺站内容
|
||||
$('#projectid').change(function () {
|
||||
var pid = $(this).children('option:selected').val();//这就是selected的值
|
||||
|
||||
// Ajax提交数据
|
||||
$.ajax({
|
||||
url: "/app/Capacity/SetStationSelected",//"APP/login/login", // 提交到controller的url路径
|
||||
type: "post", // 提交方式
|
||||
data: { "pid": pid }, // data为String类型,必须为 Key/Value 格式。
|
||||
dataType: "json", // 服务器端返回的数据类型
|
||||
success: function (res) { // 请求成功后的回调函数,其中的参数data为controller返回的map,也就是说,然后通过data这个参数取JSON数据中的值
|
||||
$("#stationid").empty();
|
||||
if (res.Status == 200) {
|
||||
|
||||
if (res.Data) {
|
||||
var html = "";
|
||||
var html = " <option value=''></option>";
|
||||
for (var i = 0; i < res.Data.length; i++) {
|
||||
|
||||
html += ' <option value=' + res.Data[i].StationID + '>' + res.Data[i].StationName + '</option>';
|
||||
}
|
||||
$("#stationid").html(html);
|
||||
}
|
||||
|
||||
//textToast(res.Message);
|
||||
}
|
||||
else if (res.Status != 200) {
|
||||
//textToast(res.Message);
|
||||
}
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
//查询
|
||||
$("#btnCapacitySearch").click(function () {
|
||||
|
||||
$("#CapacitySearchForm").ajaxSubmit({
|
||||
url: "/APP/Capacity/CapacitySearch",
|
||||
type: "POST",
|
||||
success: function (res) {
|
||||
|
||||
$("#outputValueTbody").empty();
|
||||
if (res.Status == 200) {
|
||||
if (res.Data) {
|
||||
var html = "";
|
||||
for (var i = 0; i < res.Data.length; i++) {
|
||||
|
||||
html += '<tr>';
|
||||
html += '<td>' + res.Data[i].StationName + '</td>';
|
||||
html += '<td>' + res.Data[i].Total + '</td>';
|
||||
html += '<td>' + res.Data[i].EffectiveNum + '</td>';
|
||||
html += '<td>' + res.Data[i].PassNum + '</td>';
|
||||
html += '<td>' + res.Data[i].FailNum + '</td>';
|
||||
html += '<td><span class="pie">' + res.Data[i].PassNum + '/' + (res.Data[i].FailNum + res.Data[i].PassNum) + '</span></td>';
|
||||
//html += '<td><span class="pie">' + res.Data[i].PassNum + '/' + res.Data[i].FailNum + '</span>' + res.Data[i].PassNum / (res.Data[i].FailNum + res.Data[i].PassNum) + '</td>';
|
||||
//html += '<td><span class="pie">1/5</span></td>';
|
||||
|
||||
html += '</tr>';
|
||||
}
|
||||
$("#outputValueTbody").html(html);
|
||||
//$("span.pie").peity("pie")
|
||||
|
||||
$("span.pie").peity("pie", {
|
||||
fill: ['#1ab394', '#d7d7d7', '#ffffff']
|
||||
});
|
||||
|
||||
//$.getScript(peityUrl);
|
||||
}
|
||||
else {
|
||||
$.toastr.success('暂无数据',
|
||||
{
|
||||
position: 'top-center',
|
||||
time: 1000,
|
||||
});
|
||||
}
|
||||
} else {
|
||||
|
||||
$.toastr.error('查询失败! <br />' + res.Message, {
|
||||
time: 3000,
|
||||
position: 'top-center'
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
error: function (error) {
|
||||
alert(error);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
195
AUTS.Web/Areas/App/Views/Capacity/QALogList.cshtml
Normal file
195
AUTS.Web/Areas/App/Views/Capacity/QALogList.cshtml
Normal file
@@ -0,0 +1,195 @@
|
||||
|
||||
@{
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
|
||||
|
||||
List<AUTS.Domain.Entities.TBL_Project> projectList = AUTS.Services.Cache.CacheHelp.GetUserDBProjectList();//产品列表
|
||||
|
||||
}
|
||||
|
||||
<link href="~/Theme/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
|
||||
|
||||
<div class="row wrapper border-bottom white-bg page-heading">
|
||||
<div class="col-lg-10">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<a href="@Url.Action("Index", "Home")">主页</a>
|
||||
</li>
|
||||
<li>
|
||||
<a>产能统计</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<strong>产能查询</strong>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight">
|
||||
<div class="row">
|
||||
<div class="col-sm-11">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>产能查询</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
|
||||
<form method="get" id="QALogSearchForm">
|
||||
|
||||
<div class="row">
|
||||
<div class="form-inline">
|
||||
|
||||
<div class="col-sm-3">
|
||||
|
||||
<div class="input-group m-b">
|
||||
|
||||
<span class="input-group-addon">机型:</span>
|
||||
<select class="input-sm form-control input-s-sm inline" name="projectid" id="projectid">
|
||||
@if (projectList != null && projectList.Count > 0)
|
||||
{
|
||||
foreach (var item in projectList)
|
||||
{
|
||||
<option value="@item.ID">@item.ProjectName</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4 m-b-xs" id="data_ovform">
|
||||
<div class="input-group m-b">
|
||||
<span class="input-group-addon">时间:</span>
|
||||
<div class="input-daterange input-group" id="datepicker">
|
||||
|
||||
<input type="text" class="input-sm form-control" readOnly name="startdate" />
|
||||
<span class="input-group-addon">to</span>
|
||||
<input type="text" class="input-sm form-control" readOnly name="enddate" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<div class="input-group">
|
||||
<button type="button" class="btn btn-primary" id="btnQALogSearch">查询</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover dataTables-example">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>时间</th>
|
||||
<th>结果</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="qaLogTbody"></tbody>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4" id="plineBox_Content">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Data picker -->
|
||||
<script src="~/Theme/js/plugins/datapicker/bootstrap-datepicker.js"></script>
|
||||
<script src="~/Theme/js/plugins/datapicker/locales/bootstrap-datepicker.zh-CN.js"></script>
|
||||
|
||||
|
||||
<script>
|
||||
var url = "/Theme/js/jquery.form.min.js";
|
||||
$.getScript(url);
|
||||
|
||||
$('#data_ovform .input-daterange').datepicker({
|
||||
language: "zh-CN",//语言
|
||||
todayBtn: "linked",//今日按钮
|
||||
keyboardNavigation: false,
|
||||
forceParse: false,
|
||||
autoclose: true,
|
||||
format: "yyyy/mm/dd"//日期格式
|
||||
});
|
||||
|
||||
|
||||
//查询
|
||||
$("#btnQALogSearch").click(function () {
|
||||
|
||||
$("#QALogSearchForm").ajaxSubmit({
|
||||
url: "/APP/Capacity/QALogSearch",
|
||||
type: "POST",
|
||||
success: function (res) {
|
||||
|
||||
|
||||
$("#qaLogTbody").empty();
|
||||
if (res.Status == 200) {
|
||||
|
||||
$("#testLogInfoDiv").attr("style", "display:block;");
|
||||
if (res.Data.length > 0) {
|
||||
$("#testLogMsgDiv").attr("style", "display:block;");
|
||||
var html = "";
|
||||
for (var i = 0; i < res.Data.length; i++) {
|
||||
|
||||
html += '<tr >';
|
||||
html += '<td>' + res.Data[i].DUT_SN + '</td>';
|
||||
html += '<td>' + res.Data[i].StartTime + '</td>';
|
||||
html += '<td>' + res.Data[i].QA_CheckResult + '</td>';
|
||||
|
||||
html += ' </tr>';
|
||||
}
|
||||
$("#qaLogTbody").html(html);
|
||||
}
|
||||
else {
|
||||
$.toastr.success('暂无数据',
|
||||
{
|
||||
position: 'top-center',
|
||||
time: 1000,
|
||||
});
|
||||
}
|
||||
} else {
|
||||
|
||||
$.toastr.error('查询失败! <br />' + res.Message, {
|
||||
time: 3000,
|
||||
position: 'top-center'
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
error: function (error) {
|
||||
alert(error);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
332
AUTS.Web/Areas/App/Views/Capacity/QualityAssurance.cshtml
Normal file
332
AUTS.Web/Areas/App/Views/Capacity/QualityAssurance.cshtml
Normal file
@@ -0,0 +1,332 @@
|
||||
|
||||
@{
|
||||
//Layout = null;
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
|
||||
|
||||
List<AUTS.Domain.Entities.TBL_Project> projectList = AUTS.Services.Cache.CacheHelp.GetUserDBProjectList();//产品列表
|
||||
|
||||
|
||||
}
|
||||
|
||||
<link href="~/Theme/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
|
||||
|
||||
<div class="row wrapper border-bottom white-bg page-heading">
|
||||
<div class="col-lg-10">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<a href="@Url.Action("Index", "Home")">主页</a>
|
||||
</li>
|
||||
<li>
|
||||
<a>产能统计</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<strong>QA抽检</strong>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight">
|
||||
<div class="row">
|
||||
<div class="col-sm-11">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>产能查询</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
|
||||
<form method="get" id="QASearchForm" onkeydown="if(event.keyCode==13){return false;}">
|
||||
|
||||
<div class="row">
|
||||
<div class="form-inline">
|
||||
|
||||
<div class="col-sm-3">
|
||||
|
||||
<div class="input-group m-b">
|
||||
|
||||
<span class="input-group-addon">机型:</span>
|
||||
<select class="input-sm form-control input-s-sm inline" name="projectid" id="projectid">
|
||||
@if (projectList != null && projectList.Count > 0)
|
||||
{
|
||||
foreach (var item in projectList)
|
||||
{
|
||||
<option value="@item.ID">@item.ProjectName</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-sm-7">
|
||||
|
||||
<div class="input-group m-b">
|
||||
|
||||
<input type="text" class="form-control" name="number" id="number" placeholder="请输入条码号">
|
||||
|
||||
<span class="input-group-btn">
|
||||
<button type="button" class="btn btn-primary" id="btnQASearch">
|
||||
查询
|
||||
</button>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover dataTables-example">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>站</th>
|
||||
<th>时间</th>
|
||||
<th>结果</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="QATbody"></tbody>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4" id="plineBox_Content">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" id="qaResultBox" style="display:none;">
|
||||
<div class="col-sm-11">
|
||||
<div class="ibox float-e-margins">
|
||||
|
||||
<div class="ibox-content">
|
||||
|
||||
<form method="get" id="QASubmitForm">
|
||||
|
||||
<div class="row" id="qaNGDiv" style="display:none;">
|
||||
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<div class="input-group m-b">
|
||||
|
||||
<input type="text" class="form-control" placeholder="请输入抽检结果" name="qaRemarks" id="qaRemarks">
|
||||
|
||||
<span class="input-group-btn">
|
||||
<button type="button" class="btn btn-danger" id="manualChange" disabled="disabled">
|
||||
提交
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row" id="qaSubmitDiv" style="display:none;">
|
||||
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<span>抽检完成,总抽检:</span>
|
||||
<span id="qa_Total"></span>
|
||||
<span>,今日抽检:</span>
|
||||
<span id="qa_TotalToday"></span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<table id="qaResultTab" class="table table-striped table-bordered table-hover dataTables-example">
|
||||
<tbody id="qaResultTbody"></tbody>
|
||||
</table>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
var url = "/Theme/js/jquery.form.min.js";
|
||||
$.getScript(url);
|
||||
|
||||
//document.getElementById("number").focus();
|
||||
|
||||
document.onkeydown = function (event) {
|
||||
var e = window.event || event;
|
||||
//console.log("key:" + e.keyCode + ",name:" + e.key);
|
||||
if (e.keyCode == 13) {
|
||||
//回车执行查询
|
||||
qASearchAjax();
|
||||
}
|
||||
}
|
||||
|
||||
//查询按钮触发
|
||||
$("#btnQASearch").click(function () {
|
||||
qASearchAjax();
|
||||
});
|
||||
|
||||
//加载QA结果
|
||||
function loadQAResult(num, data) {
|
||||
|
||||
$("#qaResultTbody").empty();
|
||||
|
||||
var html = "";
|
||||
html += '<tr><th> 序号集:</th><td>' + data.ProductNumbers + '</td></tr>';
|
||||
|
||||
if (data.TestResult == true) {
|
||||
html += '<tr><th> 检测结果:</th><td> <div class="has-success"><label class="control-label">PASS</label></div></td></tr>';
|
||||
$("#qaResultTab").attr("style", "border:2px solid #1ab394;");
|
||||
}
|
||||
else {
|
||||
html += '<tr><th> 检测结果:</th><td> <div class="has-error"><label class="control-label">FALL</label></div></td></tr>';
|
||||
$("#qaResultTab").attr("style", "border:2px solid #ed5565;");
|
||||
}
|
||||
|
||||
html += '<tr><th> 检测过程:</th><td>' + data.CheckProc + '</td></tr>';
|
||||
|
||||
html += '<input type = "hidden" name="numberSubmit" value="' + num + '"/>';
|
||||
html += '<input type = "hidden" name="qa_CheckProcSubmit" value="' + data.CheckProc + '"/>';
|
||||
html += '<input type = "hidden" name="qa_TestResultSubmit" value="' + data.TestResult + '"/>';
|
||||
|
||||
html += '<input type = "hidden" name="qa_ProjectID" value="' + data.ProjectID + '"/>';
|
||||
html += '<input type = "hidden" name="qa_QAStationID" value="' + data.QAStationID + '"/>';
|
||||
|
||||
|
||||
$("#qaResultTbody").html(html);
|
||||
if (data.TestResult == true) {
|
||||
QAAjaxSubmit();
|
||||
}
|
||||
else {
|
||||
$("#qaNGDiv").attr("style", "display:block;");
|
||||
$("#manualChange").attr('disabled', false);
|
||||
}
|
||||
|
||||
$("#qaResultBox").attr("style", "display:block;");
|
||||
|
||||
|
||||
};
|
||||
|
||||
//FALL时提交事件
|
||||
function QAAjaxSubmit() {
|
||||
$("#QASubmitForm").ajaxSubmit({
|
||||
|
||||
url: "/APP/Capacity/QualityAssuranceSubmit",
|
||||
type: "POST",
|
||||
success: function (res) {
|
||||
|
||||
if (res.Status == 200) {
|
||||
$("#number").val("");
|
||||
$("#qaSubmitDiv").attr("style", "display:block;");
|
||||
$("#qa_Total").html(res.Data.Total);
|
||||
$("#qa_TotalToday").html(res.Data.TotalToday);
|
||||
//$.toastr.success('保存成功',
|
||||
// {
|
||||
// position: 'top-center',
|
||||
// time: 2000,
|
||||
// });
|
||||
}
|
||||
else {
|
||||
$.toastr.error('提交失败! <br />' + res.Message, {
|
||||
time: 3000,
|
||||
position: 'top-center'
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
error: function (error) {
|
||||
alert(error);
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
//FALL时提交按钮
|
||||
$("#manualChange").click(function () {
|
||||
QAAjaxSubmit();
|
||||
});
|
||||
|
||||
//序号查询事件
|
||||
function qASearchAjax() {
|
||||
|
||||
$("#qaRemarks").val("");
|
||||
|
||||
var num = $("#number").val();
|
||||
$("#qaResultBox").attr("style", "display:none;");
|
||||
$("#QASearchForm").ajaxSubmit({
|
||||
url: "/APP/Capacity/QualityAssuranceAjax",
|
||||
type: "POST",
|
||||
success: function (res) {
|
||||
$("#qa_Total").html("");
|
||||
$("#qa_TotalToday").html("");
|
||||
$("#qaSubmitDiv").attr("style", "display:none;");
|
||||
$("#qaNGDiv").attr("style", "display:none;");
|
||||
|
||||
$("#QATbody").empty();
|
||||
if (res.Status == 200) {
|
||||
if (res.Data.QADataSearchList.length > 0) {
|
||||
var html = "";
|
||||
for (var i = 0; i < res.Data.QADataSearchList.length; i++) {
|
||||
html += '<tr >';
|
||||
html += '<td>' + res.Data.QADataSearchList[i].StationName + '</td>';
|
||||
html += '<td>' + res.Data.QADataSearchList[i].StartTime + '</td>';
|
||||
if (res.Data.QADataSearchList[i].TestResult) {
|
||||
html += '<td>PASS</td>';
|
||||
}
|
||||
else {
|
||||
html += '<td>FALL</td>';
|
||||
}
|
||||
|
||||
html += ' </tr>';
|
||||
|
||||
}
|
||||
$("#QATbody").html(html);
|
||||
|
||||
loadQAResult(num, res.Data.qaResultVM);
|
||||
}
|
||||
else {
|
||||
$.toastr.success('暂无数据',
|
||||
{
|
||||
position: 'top-center',
|
||||
time: 1000,
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
$.toastr.error('查询失败! <br />' + res.Message, {
|
||||
time: 3000,
|
||||
position: 'top-center'
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
error: function (error) {
|
||||
alert(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
624
AUTS.Web/Areas/App/Views/Capacity/TestLogQuery.cshtml
Normal file
624
AUTS.Web/Areas/App/Views/Capacity/TestLogQuery.cshtml
Normal file
@@ -0,0 +1,624 @@
|
||||
|
||||
@{
|
||||
//Layout = null;
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
|
||||
List<AUTS.Domain.Entities.TBL_Project> projectList = AUTS.Services.Cache.CacheHelp.GetUserDBProjectList();//产品列表
|
||||
|
||||
}
|
||||
|
||||
<link href="~/Theme/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
|
||||
|
||||
<div class="row wrapper border-bottom white-bg page-heading">
|
||||
<div class="col-lg-10">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<a href="@Url.Action("Index", "Home")">主页</a>
|
||||
</li>
|
||||
<li>
|
||||
<a>产能统计</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<strong>测试记录查询</strong>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<div class="tabs-container">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a data-toggle="tab" href="#tab-1">条码查询</a></li>
|
||||
<li class=""><a data-toggle="tab" href="#tab-2">日期查询</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div id="tab-1" class="tab-pane active">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-content">
|
||||
|
||||
<form method="get" id="TestLogSearchForm" onkeydown="if(event.keyCode==13){return false;}">
|
||||
|
||||
<div class="row">
|
||||
<div class="form-inline">
|
||||
|
||||
<div class="col-sm-4">
|
||||
|
||||
<div class="input-group m-b">
|
||||
|
||||
<span class="input-group-addon">机型:</span>
|
||||
<select class="input-sm form-control input-s-sm inline" name="projectid" id="projectid">
|
||||
@if (projectList != null && projectList.Count > 0)
|
||||
{
|
||||
foreach (var item in projectList)
|
||||
{
|
||||
<option value="@item.ID">@item.ProjectName</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group m-b">
|
||||
<div class="input-group-btn" style="width: auto;">
|
||||
|
||||
<select class="form-control inline" name="keyWhere" id="keyWhere">
|
||||
<option value="number">条码号</option>
|
||||
<option value="testLogID">序号</option>
|
||||
|
||||
</select>
|
||||
|
||||
</div>
|
||||
<input type="text" class="form-control" name="keyWord" id="keyWord" onkeydown="enterInTestLog(event);" placeholder="请输入查询关键词">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-sm-2">
|
||||
<div class="input-group">
|
||||
<button type="button" class="btn btn-primary" id="btnTestLogSearch">查询</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" id="testLogInfoDiv">
|
||||
<div class="form-inline">
|
||||
|
||||
<div class="col-xs-4">
|
||||
|
||||
<div class="input-group m-b" id="maxIDDiv" style="display:none;">
|
||||
|
||||
<strong>最大ID:</strong> <span id="testLogMaxID">0</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-8">
|
||||
|
||||
<div class="input-group m-b" id="numsDiv" style="display:none;">
|
||||
|
||||
<strong>序号集:</strong> <span id="productNumbers"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="tab-2" class="tab-pane">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-content">
|
||||
|
||||
<form method="get" id="TestLogSearchDateForm" onkeydown="if(event.keyCode==13){return false;}">
|
||||
|
||||
<div class="row">
|
||||
<div class="form-inline">
|
||||
|
||||
<div class="col-sm-4">
|
||||
|
||||
<div class="input-group m-b">
|
||||
|
||||
<span class="input-group-addon">机型:</span>
|
||||
<select class="input-sm form-control input-s-sm inline" name="projectid" id="projectidforDate">
|
||||
@if (projectList != null && projectList.Count > 0)
|
||||
{
|
||||
foreach (var item in projectList)
|
||||
{
|
||||
<option value="@item.ID">@item.ProjectName</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6 m-b-xs" id="data_ovform">
|
||||
<div class="input-group m-b">
|
||||
<span class="input-group-addon">时间:</span>
|
||||
<div class="input-daterange input-group" id="datepicker">
|
||||
|
||||
<input type="text" class="input-sm form-control" readOnly name="startdate" id="startdate" />
|
||||
<span class="input-group-addon">to</span>
|
||||
<input type="text" class="input-sm form-control" readOnly name="enddate" id="enddate" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<div class="input-group">
|
||||
<button type="button" class="btn btn-primary" id="btnTestLogDate">查询</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="table-responsive" id="testLogDateDiv">
|
||||
<table class="table table-striped table-bordered table-hover dataTables-example" id="testLogDateTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>站</th>
|
||||
<th>DUT_SN</th>
|
||||
<th>时间</th>
|
||||
<th>结果</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="testLogDateTbody"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="table-responsive" style="display:none;" id="testLogMsgDiv">
|
||||
<table class="table table-striped table-bordered table-hover dataTables-example">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>站</th>
|
||||
<th>DUT_SN</th>
|
||||
<th>时间</th>
|
||||
<th>结果</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="testLogTbody"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-4" id="testLogDetail_Content" style="display:none;">
|
||||
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<table id="webdata" name="webdata" class="table table-striped table-bordered table-hover dataTables-example">
|
||||
<thead>
|
||||
<tr><th>ColName</th><th>ColValue</th></tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Data picker -->
|
||||
<script src="~/Theme/js/plugins/datapicker/bootstrap-datepicker.js"></script>
|
||||
<script src="~/Theme/js/plugins/datapicker/locales/bootstrap-datepicker.zh-CN.js"></script>
|
||||
|
||||
<script src="~/Theme/js/plugins/dataTables/datatables.min.js"></script>
|
||||
|
||||
<script>
|
||||
var url = "/Theme/js/jquery.form.min.js";
|
||||
$.getScript(url);
|
||||
|
||||
$('#data_ovform .input-daterange').datepicker({
|
||||
language: "zh-CN",//语言
|
||||
todayBtn: "linked",//今日按钮
|
||||
keyboardNavigation: false,
|
||||
forceParse: false,
|
||||
autoclose: true,
|
||||
format: "yyyy/mm/dd"//日期格式
|
||||
});
|
||||
|
||||
|
||||
//document.onkeydown = function (event) {
|
||||
// var e = window.event || event;
|
||||
// //console.log("key:" + e.keyCode + ",name:" + e.key);
|
||||
// if (e.keyCode == 13) {
|
||||
// //回车执行查询
|
||||
// testLogSearch();
|
||||
// }
|
||||
//}
|
||||
|
||||
function enterInTestLog(event) {
|
||||
var e = window.event || event;
|
||||
//console.log("key:" + e.keyCode + ",name:" + e.key);
|
||||
if (e.keyCode == 13) {
|
||||
//回车执行查询
|
||||
testLogSearch();
|
||||
}
|
||||
}
|
||||
|
||||
//查询
|
||||
$("#btnTestLogSearch").click(function () {
|
||||
testLogSearch();
|
||||
});
|
||||
|
||||
|
||||
//修改机型选择改变ID
|
||||
$("#projectid").change(function () {
|
||||
var keyWhere = $("#keyWhere").val();
|
||||
|
||||
if (keyWhere == "testLogID") {
|
||||
setMaxID();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$("#keyWhere").change(function () {
|
||||
var keyWhere = $("#keyWhere").val();
|
||||
|
||||
if (keyWhere == "testLogID") {
|
||||
setMaxID();
|
||||
}
|
||||
else {
|
||||
$("#maxIDDiv").attr("style", "display:none;");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
function setMaxID() {
|
||||
var projectid = $("#projectid").val();
|
||||
|
||||
// Ajax提交数据
|
||||
$.ajax({
|
||||
url: "/app/Capacity/GerOnProjectMaxID",//"APP/login/login", // 提交到controller的url路径
|
||||
type: "post", // 提交方式
|
||||
data: { "projectid": projectid }, // data为String类型,必须为 Key/Value 格式。
|
||||
dataType: "json", // 服务器端返回的数据类型
|
||||
success: function (res) { // 请求成功后的回调函数,其中的参数data为controller返回的map,也就是说,然后通过data这个参数取JSON数据中的值
|
||||
if (res.Status == 200) {
|
||||
$("#testLogMaxID").html(res.Data);
|
||||
}
|
||||
else {
|
||||
$("#testLogMaxID").html("0");
|
||||
}
|
||||
//else {
|
||||
// $("#testLogMaxID").html(res.Message);
|
||||
//}
|
||||
$("#maxIDDiv").attr("style", "display:block;");
|
||||
},
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
//获取测试记录详情
|
||||
function searchTestLogDetails(projectID, stationID, id) {
|
||||
// Ajax提交数据
|
||||
$.ajax({
|
||||
url: "/app/Capacity/GetTestLogDetails",// 提交到controller的url路径
|
||||
type: "get", // 提交方式
|
||||
data: { "projectID": projectID, "stationID": stationID, "id": id }, // data为String类型,必须为 Key/Value 格式。
|
||||
dataType: "json", // 服务器端返回的数据类型
|
||||
success: function (res) { // 请求成功后的回调函数,其中的参数data为controller返回的map,也就是说,然后通过data这个参数取JSON数据中的值
|
||||
|
||||
if (res.Status == 200) {
|
||||
$("#testLogDetail_Content").attr("style", "display:block;");
|
||||
|
||||
$("#webdata tbody").html("");
|
||||
//填充数据
|
||||
var jsonArray = res.Data;
|
||||
var headArray = [];
|
||||
|
||||
//循环取字段名
|
||||
for (var i in jsonArray[0]) {
|
||||
headArray[headArray.length] = i;
|
||||
}
|
||||
var webdata = document.getElementById("webdata");
|
||||
|
||||
var tbody = document.createElement("tbody");//创建tbody
|
||||
|
||||
for (var count = 0; count < headArray.length; count++) {
|
||||
var thead = document.createElement("tr");//创建行
|
||||
var td = document.createElement("th");//创建表头
|
||||
td.innerHTML = headArray[count];
|
||||
|
||||
var cell = document.createElement("td");
|
||||
cell.innerHTML = jsonArray[0][headArray[count]];
|
||||
|
||||
thead.appendChild(td);//把表头放入第一行
|
||||
thead.appendChild(cell);
|
||||
tbody.appendChild(thead);//把第一行放入表格
|
||||
}
|
||||
webdata.appendChild(tbody);
|
||||
|
||||
}
|
||||
else if (res.Message != "") {
|
||||
textToast(res.Message);
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
function testLogSearch() {
|
||||
$("#testLogMsgDiv").attr("style", "display:none;");//隐藏div
|
||||
$("#TestLogSearchForm").ajaxSubmit({
|
||||
url: "/APP/Capacity/TestLogSearch",
|
||||
type: "POST",
|
||||
success: function (res) {
|
||||
$("#testLogTbody").empty();
|
||||
if (res.Status == 200) {
|
||||
|
||||
$("#testLogInfoDiv").attr("style", "display:block;");
|
||||
$("#productNumbers").html(res.Data.ProductNumbers);
|
||||
if (res.Data.DataQuerySearchList.length > 0) {
|
||||
|
||||
$("#keyWord").val("");
|
||||
|
||||
$("#testLogMsgDiv").attr("style", "display:block;");
|
||||
var html = "";
|
||||
for (var i = 0; i < res.Data.DataQuerySearchList.length; i++) {
|
||||
|
||||
html += '<tr onclick="searchTestLogDetails(' + res.Data.DataQuerySearchList[i].ProjectID + ',' + res.Data.DataQuerySearchList[i].StationID + ',' + res.Data.DataQuerySearchList[i].ID + ')">';
|
||||
//html += '<tr>';
|
||||
html += '<td>' + res.Data.DataQuerySearchList[i].StationName + '</td>';
|
||||
html += '<td>' + res.Data.DataQuerySearchList[i].DUT_SN + '</td>';
|
||||
html += '<td>' + res.Data.DataQuerySearchList[i].StartTime + '</td>';
|
||||
html += '<td>' + res.Data.DataQuerySearchList[i].TestResult + '</td>';
|
||||
|
||||
html += ' </tr>';
|
||||
}
|
||||
$("#numsDiv").attr("style", "display:block;");
|
||||
$("#testLogTbody").html(html);
|
||||
}
|
||||
else {
|
||||
$.toastr.success('暂无数据',
|
||||
{
|
||||
position: 'top-center',
|
||||
time: 1000,
|
||||
});
|
||||
}
|
||||
} else {
|
||||
|
||||
$.toastr.error('查询失败! <br />' + res.Message, {
|
||||
time: 3000,
|
||||
position: 'top-center'
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
error: function (error) {
|
||||
alert(error);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
//查询
|
||||
$("#btnTestLogDate").click(function () {
|
||||
//testLogDate();
|
||||
testLogDateAjax();
|
||||
});
|
||||
|
||||
//function enterInDate(event) {
|
||||
// var e = window.event || event;
|
||||
// //console.log("key:" + e.keyCode + ",name:" + e.key);
|
||||
// if (e.keyCode == 13) {
|
||||
// //回车执行查询
|
||||
// testLogDateAjax();
|
||||
// }
|
||||
//}
|
||||
|
||||
function testLogDateAjax() {
|
||||
var ProjectID = $("#projectidforDate").val();
|
||||
var StartDate = $("#startdate").val();
|
||||
var EndDate = $("#enddate").val();
|
||||
//$("#testLogDateTbody").empty();
|
||||
$('#testLogDateTable').dataTable().fnDestroy();
|
||||
var table = $("#testLogDateTable").DataTable({
|
||||
language: {
|
||||
"processing": "处理中...",
|
||||
"lengthMenu": "_MENU_ 记录/页",
|
||||
"zeroRecords": "没有匹配的记录",
|
||||
"info": "第 _START_ 至 _END_ 项记录,共 _TOTAL_ 项",
|
||||
"infoEmpty": "第 0 至 0 项记录,共 0 项",
|
||||
"infoFiltered": "",
|
||||
"infoPostFix": "",
|
||||
//"search": "搜索:",
|
||||
"url": "/APP/Capacity/TestLogDateSearch",
|
||||
"decimal": ",",
|
||||
"thousands": ".",
|
||||
"emptyTable": "未找到符合条件的数据",
|
||||
"paginate": {
|
||||
"first": "«",
|
||||
"previous": "‹",
|
||||
"next": "›",
|
||||
"last": "»"
|
||||
}
|
||||
},
|
||||
retrieve: true,
|
||||
paging: true,
|
||||
ordering: false,
|
||||
info: true,
|
||||
autoWidth: false,
|
||||
pageLength: 10,//每页显示10条数据
|
||||
pagingType: "full_numbers", //分页样式:simple,simple_numbers,full,full_numbers,
|
||||
bFilter: false, //去掉搜索框方法
|
||||
bLengthChange: false,//也就是页面上确认是否可以进行选择一页展示多少条
|
||||
serverSide: true, //启用服务器端分页,要进行后端分页必须的环节
|
||||
ajax: function (data, callback, settings) {
|
||||
//封装相应的请求参数,这里获取页大小和当前页码
|
||||
var pagesize = data.length;//页面显示记录条数,在页面显示每页显示多少项的时候,页大小
|
||||
var page = (data.start) / data.length + 1;//当前页码
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/APP/Capacity/TestLogDateSearch",
|
||||
cache: false, //禁用缓存
|
||||
//data: json, //传入已封装的参数
|
||||
data: { "page": page, "pagesize": pagesize, "ProjectID": ProjectID, "StartDate": StartDate, "EndDate": EndDate }, //传入已封装的参数
|
||||
dataType: "json",//返回数据格式为json
|
||||
success: function (res) {
|
||||
if (res.Status == 200) {
|
||||
var returnData = {};
|
||||
//returnData.draw = arr.data.pagination.TotalCount;//这里直接自行返回了draw计数器,应该由后台返回,没什么卵用!
|
||||
returnData.recordsTotal = res.Data.TotalCount;//totalCount指的是总记录数
|
||||
returnData.recordsFiltered = res.Data.TotalCount;//后台不实现过滤功能,全部的记录数都需输出到前端,记录数为总数
|
||||
returnData.data = res.Data.DataList;//返回列表
|
||||
callback(returnData);//这个别忘了!!!
|
||||
}
|
||||
else {
|
||||
$.toastr.error('查询失败! <br />' + res.Message, {
|
||||
time: 3000,
|
||||
position: 'top-center'
|
||||
});
|
||||
}
|
||||
},
|
||||
error: function (XMLHttpRequest, textStatus, errorThrown) {
|
||||
$.dialog.alert("查询失败");
|
||||
$wrapper.spinModal(false);
|
||||
}
|
||||
});
|
||||
},
|
||||
columns: [
|
||||
{ "data": "StationName" },
|
||||
{ "data": "DUT_SN" },
|
||||
{ "data": "StartTime" },
|
||||
{ "data": "TestResult" },
|
||||
]
|
||||
});
|
||||
|
||||
$('#testLogDateTable tbody').on('click', 'tr', function () {
|
||||
var data = table.row(this).data();
|
||||
testLogSearchForDate(data.ProjectID, data.DUT_SN);
|
||||
//alert('You clicked on ' + data[0] + '\'s row');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//function testLogDate() {
|
||||
// $("#TestLogSearchDateForm").ajaxSubmit({
|
||||
// url: "/APP/Capacity/TestLogDateSearch",
|
||||
// type: "POST",
|
||||
// success: function (res) {
|
||||
// if (res.Status == 200) {
|
||||
// if (res.Data.length > 0) {
|
||||
// var html = "";
|
||||
// for (var i = 0; i < res.Data.length; i++) {
|
||||
|
||||
// html += '<tr onclick="searchTestLogDetails(' + res.Data[i].ProjectID + ',' + res.Data[i].StationID + ',' + res.Data[i].ID + ')">';
|
||||
// //html += '<tr>';
|
||||
// html += '<td>' + res.Data[i].StationName + '</td>';
|
||||
// html += '<td>' + res.Data[i].DUT_SN + '</td>';
|
||||
// html += '<td>' + res.Data[i].StartTime + '</td>';
|
||||
// html += '<td>' + res.Data[i].TestResult + '</td>';
|
||||
|
||||
// html += ' </tr>';
|
||||
// }
|
||||
// $("#testLogDateTbody").html(html);
|
||||
// }
|
||||
// else {
|
||||
// $.toastr.success('暂无数据',
|
||||
// {
|
||||
// position: 'top-center',
|
||||
// time: 1000,
|
||||
// });
|
||||
// }
|
||||
// } else {
|
||||
// $.toastr.error('查询失败! <br />' + res.Message, {
|
||||
// time: 3000,
|
||||
// position: 'top-center'
|
||||
// });
|
||||
// }
|
||||
// },
|
||||
// error: function (error) {
|
||||
// alert(error);
|
||||
// }
|
||||
// });
|
||||
//};
|
||||
|
||||
function testLogSearchForDate(projectid, KeyWord) {
|
||||
$("#testLogMsgDiv").attr("style", "display:none;");//隐藏div
|
||||
// Ajax提交数据
|
||||
$.ajax({
|
||||
url: "/APP/Capacity/TestLogSearch",//"APP/login/login", // 提交到controller的url路径
|
||||
type: "POST", // 提交方式
|
||||
data: { "projectid": projectid, "KeyWord": KeyWord, "KeyWhere": "number" }, // data为String类型,必须为 Key/Value 格式。
|
||||
dataType: "json", // 服务器端返回的数据类型
|
||||
success: function (res) {
|
||||
$("#testLogTbody").empty();
|
||||
if (res.Status == 200) {
|
||||
|
||||
$("#testLogInfoDiv").attr("style", "display:block;");
|
||||
$("#productNumbers").html(res.Data.ProductNumbers);
|
||||
if (res.Data.DataQuerySearchList.length > 0) {
|
||||
|
||||
$("#keyWord").val("");
|
||||
|
||||
$("#testLogMsgDiv").attr("style", "display:block;");
|
||||
var html = "";
|
||||
for (var i = 0; i < res.Data.DataQuerySearchList.length; i++) {
|
||||
|
||||
html += '<tr onclick="searchTestLogDetails(' + res.Data.DataQuerySearchList[i].ProjectID + ',' + res.Data.DataQuerySearchList[i].StationID + ',' + res.Data.DataQuerySearchList[i].ID + ')">';
|
||||
//html += '<tr>';
|
||||
html += '<td>' + res.Data.DataQuerySearchList[i].StationName + '</td>';
|
||||
html += '<td>' + res.Data.DataQuerySearchList[i].DUT_SN + '</td>';
|
||||
html += '<td>' + res.Data.DataQuerySearchList[i].StartTime + '</td>';
|
||||
html += '<td>' + res.Data.DataQuerySearchList[i].TestResult + '</td>';
|
||||
|
||||
html += ' </tr>';
|
||||
}
|
||||
$("#numsDiv").attr("style", "display:block;");
|
||||
$("#testLogTbody").html(html);
|
||||
}
|
||||
else {
|
||||
$.toastr.success('暂无数据',
|
||||
{
|
||||
position: 'top-center',
|
||||
time: 1000,
|
||||
});
|
||||
}
|
||||
} else {
|
||||
|
||||
$.toastr.error('查询失败! <br />' + res.Message, {
|
||||
time: 3000,
|
||||
position: 'top-center'
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
error: function (error) {
|
||||
alert(error);
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
437
AUTS.Web/Areas/App/Views/Dataanalysis/ArgumentsTrendgram.cshtml
Normal file
437
AUTS.Web/Areas/App/Views/Dataanalysis/ArgumentsTrendgram.cshtml
Normal file
@@ -0,0 +1,437 @@
|
||||
|
||||
@{
|
||||
ViewBag.Title = "ArgumentsTrendgram";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Orthostate";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
List<AUTS.Domain.Entities.TBL_Project> projectList = AUTS.Services.Cache.CacheHelp.GetUserDBProjectList();//产品列表
|
||||
}
|
||||
<script src="~/Theme/js/plugins/chartJs/chart.js"></script>
|
||||
<script src="~/Theme/js/plugins/datapicker/bootstrap-datepicker.js"></script>
|
||||
<script src="~/Theme/js/plugins/datapicker/locales/bootstrap-datepicker.zh-CN.js"></script>
|
||||
<script src="~/Scripts/echarts.js"></script>
|
||||
<script src="~/Scripts/mathJax.js"></script>
|
||||
<div class="row">
|
||||
<div class="col-xs-6 col-md-6" style="padding-top:1PX;">
|
||||
<select id="projectList" onchange="GetstationList();" class="form-control">
|
||||
@if (projectList != null)
|
||||
{
|
||||
foreach (var item in projectList.OrderBy(e => e.ProjectName))
|
||||
{
|
||||
<option value="@item.ID">@item.ProjectName</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
@*站位*@
|
||||
<div id="stationList" class="col-xs-6 col-md-6" style="padding-top:1PX;">
|
||||
<select id="checkbox" class="form-control">
|
||||
</select>
|
||||
</div>
|
||||
@*工具*@
|
||||
<div class="col-xs-12 col-md-12" style="padding-top:1PX;">
|
||||
<div class="col-xs-12 col-md-12 form-control" id="checkboxtool">
|
||||
<div class=" col-xs-12 col-sm-12 i-checks"><label> <input type="checkbox" checked class="columnsName" value="1"> <i></i>去重复数据</label></div>
|
||||
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-12 form-control">
|
||||
<input type="radio" name="cross" value="0" />all
|
||||
<input type="radio" checked name="cross" value="1" />true
|
||||
<input type="radio" name="cross" value="2" />false
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-6" style="padding-top:1PX;">
|
||||
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-12" style="padding-top:1PX;">
|
||||
<div class="form-control" style="padding: 1px 0; align-items: center; justify-content: center;">
|
||||
<div class="col-xs-5 col-sm-4">
|
||||
<input type="text" @*onchange="initTime();"*@ class="input-sm form-control" name="start" id="start" value="@DateTime.Now.ToString("yyyy-MM-dd")" readonly />
|
||||
</div>
|
||||
<div class="col-xs-5 col-sm-4">
|
||||
<input type="text" @*onchange="initTime();"*@ class="input-sm form-control" name="start" id="finish" value="@DateTime.Now.ToString("yyyy-MM-dd")" readonly />
|
||||
</div>
|
||||
<div class="col-xs-2 col-sm-2" style="padding:0 5px;">
|
||||
<button class="btn btn-sm btn-info" type="button" style="margin-bottom:0;" onclick="Suime();">查询</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-xs-12 col-md-12">
|
||||
<div class="ibox float-e-margins ">
|
||||
<div class="ibox-title" @*style="padding: 5px 15px; min-height:auto;"*@>
|
||||
<h5>参数</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content " style="padding:10px 15px; min-height:auto;">
|
||||
|
||||
<div id="checkboxs" class="chart">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
<div class="col-xs-12 col-md-12">
|
||||
<div class="row">
|
||||
<div class="col-sm-12" style="padding:0;">
|
||||
<div class="ibox float-e-margins ">
|
||||
<div class="ibox-title">
|
||||
<h5>参数趋势图</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content" style="padding:0;">
|
||||
<div id="noyue" style=" display:none">
|
||||
<p id="datalength" style="">总长度:</p>
|
||||
<p id="average">平均值:</p>
|
||||
<p id="max">最大值:</p>
|
||||
<p id="min">最小值:</p>
|
||||
</div>
|
||||
<div id="stesy" style="width: 100%; height:400px "></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-xs-12 col-md-12">
|
||||
<div class="row">
|
||||
<div class="col-sm-12" style="padding:0;">
|
||||
<div class="ibox float-e-margins ">
|
||||
<div class="ibox-title">
|
||||
<h5 id="scahsn">数据</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content" style="padding:0;">
|
||||
<div class="table-responsive" id="TestLogsData" style="word-wrap: break-word ">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="~/Theme/js/bootstrap-datepicker.min.js"></script>
|
||||
<script src="~/Theme/js/plugins/datapicker/locales/bootstrap-datepicker.zh-CN.js"></script>
|
||||
<script>
|
||||
$(function () {
|
||||
GetstationList();
|
||||
if (localStorage.getItem('oystart') != null) {
|
||||
$("#start").val(localStorage.getItem('oystart'));
|
||||
$("#finish").val(localStorage.getItem('oyfinish'));
|
||||
}
|
||||
});
|
||||
$("#start").datepicker({
|
||||
todayBtn: "linked",//今日按钮
|
||||
language: 'zh-CN', //设置语言
|
||||
autoclose: true, //选择后自动关闭
|
||||
clearBtn: true,//清除按钮
|
||||
format: "yyyy/mm/dd",//日期格式
|
||||
});
|
||||
$("#finish").datepicker({
|
||||
todayBtn: "linked",//今日按钮
|
||||
language: 'zh-CN', //设置语言
|
||||
autoclose: true, //选择后自动关闭
|
||||
clearBtn: true,//清除按钮
|
||||
format: "yyyy/mm/dd",//日期格式
|
||||
});
|
||||
|
||||
|
||||
function GetstationList() {
|
||||
var projectID = $("#projectList").val();
|
||||
$("#checkbox").html("");
|
||||
if (projectID != 0) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/APP/TestLog/GetStation",
|
||||
cache: false,
|
||||
data: { "productID": projectID },
|
||||
success: function (data) {
|
||||
if (data.Status == 200) {
|
||||
for (var i = 0; i < data.Data.length; i++) {
|
||||
$("#checkbox").append(` <option value="` + data.Data[i].ID + `">` + data.Data[i].StationName + `</option>`);
|
||||
}
|
||||
}
|
||||
fieldsname();
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
$("#checkbox").on("change", function () {
|
||||
fieldsname();
|
||||
});
|
||||
|
||||
|
||||
//数据库字段
|
||||
function fieldsname() {
|
||||
$("#checkboxs").html('');
|
||||
var projectID = $("#projectList").val();
|
||||
var stance = Number($("#checkbox").val());
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/APP/BasicFunc/DBDatafields",
|
||||
cache: false,
|
||||
data: { "projectID": projectID, "stance": stance },
|
||||
success: function (data) {
|
||||
var check = "";
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
check += '<div class="col-xs-6 col-sm-4 i-checks"><label> <input type="radio" name="fields" class="columnsName" value="' + data[i] + '"> <i></i>' + data[i] + '</label></div>';
|
||||
}
|
||||
$("#checkboxs").html(check);
|
||||
if (localStorage.getItem('oyfields') != null) {
|
||||
console.log(localStorage.getItem('oyfields'));
|
||||
$("input[name='fields'][value='" + localStorage.getItem('oyfields') + "']").prop("checked", true);
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
function Suime() {
|
||||
console.log(localStorage.getItem('oyfields'));
|
||||
let repetition = $("#checkboxtool input").get(0).checked;
|
||||
|
||||
|
||||
let fields = $("input[name='fields']:checked").val();
|
||||
let cross = Number($("input[name='cross']:checked").val());
|
||||
|
||||
|
||||
let finish = $("#finish").val();
|
||||
let star = $("#start").val();
|
||||
|
||||
|
||||
if (localStorage.getItem('oystart') == null) {
|
||||
localStorage.setItem('oystart', star);
|
||||
localStorage.setItem('oyfinish', finish);
|
||||
}
|
||||
|
||||
if (localStorage.getItem('oyfields') == null) {
|
||||
localStorage.setItem('oyfields', fields);
|
||||
console.log(localStorage.getItem('oyfields'));
|
||||
}
|
||||
let projectID = Number($("#projectList").val());
|
||||
let stance = Number($("#checkbox").val());
|
||||
|
||||
|
||||
if (fields == null) {
|
||||
$.toastr.error('请选择参数!', {
|
||||
time: 3000,
|
||||
position: 'top-center'
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (projectID <= 0) {
|
||||
$.toastr.error('请选择产品!', {
|
||||
time: 3000,
|
||||
position: 'top-center'
|
||||
});
|
||||
return;
|
||||
}
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/APP/Dataanalysis/SelectCSda",
|
||||
cache: false,
|
||||
data: { "projectID": projectID, "stance": stance, "star": star, "finish": finish, "repetition": repetition, "cross": cross, "fields": fields },
|
||||
success: function (data) {
|
||||
$("#TestLogsData").html(data);
|
||||
document.getElementById("scahsn").innerHTML = "数据(" + fields + ")";
|
||||
|
||||
|
||||
document.getElementById("noyue").style.display ="block";
|
||||
var total = 0;
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
total += data[i];
|
||||
}
|
||||
document.getElementById("datalength").innerHTML = "总长度" + data.length;
|
||||
document.getElementById("average").innerHTML = "平均值" + (total / data.length).toFixed(2);
|
||||
document.getElementById("max").innerHTML = "最大值" + Math.max.apply(Math, data);
|
||||
document.getElementById("min").innerHTML = "最小值" + Math.min.apply(Math, data);
|
||||
|
||||
|
||||
var mCharts = echarts.init(document.getElementById('stesy'));
|
||||
option = {
|
||||
//title: {
|
||||
// text: '未来一周气温变化',
|
||||
// subtext: '纯属虚构'
|
||||
//},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
//legend: {
|
||||
// data: ['最高气温']
|
||||
//},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
},
|
||||
yAxis: {
|
||||
|
||||
min: Math.min.apply(Math, data) * 0.8,//最小
|
||||
max: Math.max.apply(Math, data) * 1.2,
|
||||
type: 'value',
|
||||
axisLabel: {
|
||||
formatter: '{value} '
|
||||
}
|
||||
},
|
||||
series: [
|
||||
{
|
||||
type: 'line',
|
||||
data: data,
|
||||
markLine: {
|
||||
data: [
|
||||
{ type: 'average', name: '平均值', lineStyle: { color: 'green', type: 'solid', width: 4 } },
|
||||
{ type: 'max', name: '最大值' },
|
||||
{ type: 'min', name: '最小值' }
|
||||
]
|
||||
},
|
||||
},
|
||||
|
||||
]
|
||||
};
|
||||
mCharts.setOption(option);
|
||||
}
|
||||
});
|
||||
//$.ajax({
|
||||
// type: "POST",
|
||||
// url: "/APP/Dataanalysis/SelectCSdatas",
|
||||
// cache: false,
|
||||
// data: { "data": data,"repetition": repetition, "cross": cross},
|
||||
// success: function (data) {
|
||||
// $("#TestLogsData").html('');
|
||||
// $("#TestLogsData").html(data);
|
||||
// if (pagesNum > 3) {
|
||||
// var maxPages = pagesNum + 2
|
||||
// var minPages = pagesNum - 3;
|
||||
// for (var i = minPages; i < maxPages; i++) {
|
||||
// $("li.pages").eq(i).show();//显示页数
|
||||
// }
|
||||
// } else {
|
||||
// for (var i = 0; i < 5; i++) {
|
||||
// $("li.pages").eq(i).show();//显示页数
|
||||
// }
|
||||
// }
|
||||
// var pages = $("li.pages").size() - 3;//获取页数
|
||||
// if (pagesNum > pages) {
|
||||
// $("li.right").hide();
|
||||
// }
|
||||
// if (pagesNum > 3) {
|
||||
// $("li.left").show();
|
||||
// } else {
|
||||
// $("li.left").hide();
|
||||
// }
|
||||
// $("li.pages a").eq(pagesNum - 1).css("color", "white");//添加选中字体颜色
|
||||
// $("li.pages a").eq(pagesNum - 1).css("background-color", "#00BFFF");//添加选中背景颜色
|
||||
// }
|
||||
//});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
//function Viewpaging(pagesNum) {
|
||||
// let repetition = $("#checkboxtool input").get(0).checked;
|
||||
// let fields = $("input[name='fields']:checked").val();
|
||||
// let cross = Number($("input[name='cross']:checked").val());
|
||||
|
||||
// let finish = $("#finish").val();
|
||||
// let star = $("#start").val();
|
||||
|
||||
// let Pages = pagesNum;//页数
|
||||
|
||||
|
||||
// let projectID = Number($("#projectList").val());
|
||||
// let stance = Number($("#checkbox").val());
|
||||
|
||||
|
||||
// if (fields == null) {
|
||||
// $.toastr.error('请选择参数!', {
|
||||
// time: 3000,
|
||||
// position: 'top-center'
|
||||
// });
|
||||
// return;
|
||||
// }
|
||||
// if (projectID <= 0) {
|
||||
// $.toastr.error('请选择产品!', {
|
||||
// time: 3000,
|
||||
// position: 'top-center'
|
||||
// });
|
||||
// return;
|
||||
// }
|
||||
// var data =
|
||||
// {
|
||||
// "ProjectID": projectID,
|
||||
// "startTime": star,
|
||||
// "EndTime": finish,
|
||||
// "StationID": stance,
|
||||
// Pages
|
||||
// };
|
||||
// $.ajax({
|
||||
// type: "POST",
|
||||
// url: "/APP/Dataanalysis/SelectCSdatas",
|
||||
// cache: false,
|
||||
// data: { "data": data, "repetition": repetition, "cross": cross },
|
||||
// success: function (data) {
|
||||
// $("#TestLogsData").html('');
|
||||
// $("#TestLogsData").html(data);
|
||||
// if (pagesNum > 3) {
|
||||
// var maxPages = pagesNum + 2
|
||||
// var minPages = pagesNum - 3;
|
||||
// for (var i = minPages; i < maxPages; i++) {
|
||||
// $("li.pages").eq(i).show();//显示页数
|
||||
// }
|
||||
// } else {
|
||||
// for (var i = 0; i < 5; i++) {
|
||||
// $("li.pages").eq(i).show();//显示页数
|
||||
// }
|
||||
// }
|
||||
// var pages = $("li.pages").size() - 3;//获取页数
|
||||
// if (pagesNum > pages) {
|
||||
// $("li.right").hide();
|
||||
// }
|
||||
// if (pagesNum > 3) {
|
||||
// $("li.left").show();
|
||||
// } else {
|
||||
// $("li.left").hide();
|
||||
// }
|
||||
// $("li.pages a").eq(pagesNum - 1).css("color", "white");//添加选中字体颜色
|
||||
// $("li.pages a").eq(pagesNum - 1).css("background-color", "#00BFFF");//添加选中背景颜色
|
||||
// }
|
||||
// });
|
||||
//}
|
||||
|
||||
</script>
|
||||
|
||||
236
AUTS.Web/Areas/App/Views/Dataanalysis/Orthostate.cshtml
Normal file
236
AUTS.Web/Areas/App/Views/Dataanalysis/Orthostate.cshtml
Normal file
@@ -0,0 +1,236 @@
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Orthostate";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
List<AUTS.Domain.Entities.TBL_Project> projectList = AUTS.Services.Cache.CacheHelp.GetUserDBProjectList();//产品列表
|
||||
}
|
||||
<script src="~/Theme/js/plugins/chartJs/chart.js"></script>
|
||||
<script src="~/Theme/js/plugins/datapicker/bootstrap-datepicker.js"></script>
|
||||
<script src="~/Theme/js/plugins/datapicker/locales/bootstrap-datepicker.zh-CN.js"></script>
|
||||
<script src="~/Scripts/vue.js"></script>
|
||||
<script src="~/Scripts/echarts.js"></script>
|
||||
<script src="~/Scripts/mathJax.js"></script>
|
||||
<div class="row">
|
||||
@*划分依据*@
|
||||
@*<div class="col-xs-12 col-md-12" style="padding-top:1PX;">
|
||||
<button id="index_speedySreach0" type="button" class="btn btn-default btn-sm index_speedySreach" onclick="partitioncriterion(0,this)">今日</button>
|
||||
<button id="index_speedySreach3" type="button" class="btn btn-default btn-sm index_speedySreach" onclick="partitioncriterion(3,this)">3天</button>
|
||||
<button id="index_speedySreach7" type="button" class="btn btn-default btn-sm index_speedySreach" onclick="partitioncriterion(7,this)">7天</button>
|
||||
<button id="index_speedySreach30" type="button" class="btn btn-default btn-sm index_speedySreach" onclick="partitioncriterion(30,this)">30天</button>
|
||||
<button id="index_speedySreach40" type="button" class="btn btn-default btn-sm index_speedySreach" onclick="partitioncriterion(5,this)">按订单</button>
|
||||
</div>*@
|
||||
@*机型*@
|
||||
<div class="col-xs-6 col-md-6" style="padding-top:1PX;">
|
||||
<select id="projectList" onchange="GetstationList();" class="form-control">
|
||||
@*<option value="0">所有机型</option>*@
|
||||
@if (projectList != null)
|
||||
{
|
||||
foreach (var item in projectList.OrderBy(e => e.ProjectName))
|
||||
{
|
||||
<option value="@item.ID">@item.ProjectName</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
@*站位*@
|
||||
<div id="stationList" class="col-xs-6 col-md-6" style="padding-top:1PX;">
|
||||
<select id="checkbox" class="form-control">
|
||||
</select>
|
||||
</div>
|
||||
@*工具*@
|
||||
<div class="col-xs-12 col-md-12" style="padding-top:1PX;">
|
||||
<div class="col-xs-12 col-md-12 form-control" id="checkboxtool">
|
||||
<div class=" col-xs-12 col-sm-12 i-checks"><label> <input type="checkbox" checked class="columnsName" value="1"> <i></i>去重复数据</label></div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-12 form-control">
|
||||
<input type="radio" name="cross" value="0" />all
|
||||
<input type="radio" checked name="cross" value="1" />true
|
||||
<input type="radio" name="cross" value="2" />false
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-6" style="padding-top:1PX;">
|
||||
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-12" style="padding-top:1PX;">
|
||||
<div class="form-control" style="padding: 1px 0; align-items: center; justify-content: center;">
|
||||
<div class="col-xs-5 col-sm-4">
|
||||
<input type="text" @*onchange="initTime();"*@ class="input-sm form-control" name="start" id="start" value="@DateTime.Now.ToString("yyyy-MM-dd")" readonly />
|
||||
</div>
|
||||
<div class="col-xs-5 col-sm-4">
|
||||
<input type="text" @*onchange="initTime();"*@ class="input-sm form-control" name="start" id="finish" value="@DateTime.Now.ToString("yyyy-MM-dd")" readonly />
|
||||
</div>
|
||||
<div class="col-xs-2 col-sm-2" style="padding:0 5px;">
|
||||
<button class="btn btn-sm btn-info" type="button" style="margin-bottom:0;" onclick="Suime(1);">查询</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-xs-12 col-md-12">
|
||||
<div class="ibox float-e-margins ">
|
||||
<div class="ibox-title" @*style="padding: 5px 15px; min-height:auto;"*@>
|
||||
<h5 id="dbnan">参数</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content " style="padding:10px 15px; min-height:auto;">
|
||||
<div id="checkboxs" class="chart">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="partView" style="height:100%;width:100%">
|
||||
|
||||
</div>
|
||||
|
||||
<script src="~/Theme/js/bootstrap-datepicker.min.js"></script>
|
||||
<script src="~/Theme/js/plugins/datapicker/locales/bootstrap-datepicker.zh-CN.js"></script>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
GetstationList();
|
||||
if (localStorage.getItem('oystart') != null) {
|
||||
$("#start").val(localStorage.getItem('oystart'));
|
||||
$("#finish").val(localStorage.getItem('oyfinish'));
|
||||
}
|
||||
});
|
||||
|
||||
$("#start").datepicker({
|
||||
todayBtn: "linked",//今日按钮
|
||||
language: 'zh-CN', //设置语言
|
||||
autoclose: true, //选择后自动关闭
|
||||
clearBtn: true,//清除按钮
|
||||
format: "yyyy/mm/dd",//日期格式
|
||||
});
|
||||
$("#finish").datepicker({
|
||||
todayBtn: "linked",//今日按钮
|
||||
language: 'zh-CN', //设置语言
|
||||
autoclose: true, //选择后自动关闭
|
||||
clearBtn: true,//清除按钮
|
||||
format: "yyyy/mm/dd",//日期格式
|
||||
});
|
||||
|
||||
|
||||
|
||||
function GetstationList() {
|
||||
var projectID = $("#projectList").val();
|
||||
$("#checkbox").html("");
|
||||
if (projectID != 0) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/APP/TestLog/GetStation",
|
||||
cache: false,
|
||||
data: { "productID": projectID },
|
||||
success: function (data) {
|
||||
if (data.Status == 200) {
|
||||
for (var i = 0; i < data.Data.length; i++) {
|
||||
$("#checkbox").append(` <option value="` + data.Data[i].ID + `">` + data.Data[i].StationName + `</option>`);
|
||||
}
|
||||
}
|
||||
fieldsname();
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
$("#checkbox").on("change", function () {
|
||||
fieldsname();
|
||||
});
|
||||
|
||||
|
||||
|
||||
//数据库字段
|
||||
function fieldsname() {
|
||||
$("#checkboxs").html('');
|
||||
var projectID = $("#projectList").val();
|
||||
var stance = Number($("#checkbox").val());
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/APP/BasicFunc/DBDatafields",
|
||||
cache: false,
|
||||
data: { "projectID": projectID, "stance": stance },
|
||||
success: function (data) {
|
||||
var check = "";
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
check += '<div class="col-xs-6 col-sm-4 i-checks"><label> <input type="radio" name="fields" class="columnsName" value="' + data[i] + '"> <i></i>' + data[i] + '</label></div>';
|
||||
}
|
||||
$("#checkboxs").html(check);
|
||||
if (localStorage.getItem('oyfields') != null) {
|
||||
$("input[name='fields'][value='" + localStorage.getItem('oyfields') + "']").prop("checked", true);
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function Suime(pagesNum) {
|
||||
let projects = $("#projectList option:selected").text();
|
||||
let stancse = $("#checkbox option:selected").text();
|
||||
|
||||
|
||||
let repetition = $("#checkboxtool input").get(0).checked;
|
||||
let fields = $("input[name='fields']:checked").val();
|
||||
let cross = Number($("input[name='cross']:checked").val());
|
||||
|
||||
let finish = $("#finish").val();
|
||||
let star = $("#start").val();
|
||||
|
||||
if (localStorage.getItem('oystart') == null) {
|
||||
localStorage.setItem('oystart', star);
|
||||
localStorage.setItem('oyfinish', finish);
|
||||
}
|
||||
|
||||
if (localStorage.getItem('oyfields') == null) {
|
||||
localStorage.setItem('oyfields', fields);
|
||||
}
|
||||
let Pages = pagesNum;//页数
|
||||
|
||||
|
||||
let projectID = Number($("#projectList").val());
|
||||
let stance = Number($("#checkbox").val());
|
||||
|
||||
|
||||
if (fields == null) {
|
||||
$.toastr.error('请选择参数!', {
|
||||
time: 3000,
|
||||
position: 'top-center'
|
||||
});
|
||||
return;
|
||||
} else
|
||||
{
|
||||
document.getElementById("dbnan").innerHTML = "参数(字段名" + fields + ",机型:" + projects + ",站位" + stancse+")";
|
||||
|
||||
}
|
||||
if (projectID <= 0) {
|
||||
$.toastr.error('请选择产品!', {
|
||||
time: 3000,
|
||||
position: 'top-center'
|
||||
});
|
||||
return;
|
||||
}
|
||||
var data =
|
||||
{
|
||||
"ProjectID": projectID,
|
||||
"startTime": star,
|
||||
"EndTime": finish,
|
||||
"StationID": stance,
|
||||
Pages
|
||||
};
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/APP/Dataanalysis/SelectCSdata",
|
||||
cache: false,
|
||||
data: { "projectID": projectID, "stance": stance, "star": star, "finish": finish, "repetition": repetition, "cross": cross, "fields": fields },
|
||||
success: function (data) {
|
||||
$("#partView").html(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
186
AUTS.Web/Areas/App/Views/Dataanalysis/_Orthostate.cshtml
Normal file
186
AUTS.Web/Areas/App/Views/Dataanalysis/_Orthostate.cshtml
Normal file
@@ -0,0 +1,186 @@
|
||||
@{
|
||||
Layout = null;
|
||||
List<string> strings = (List<string>)ViewData["fieldsdata"];
|
||||
string name = ViewData["fields"].ToString();
|
||||
string str = "";
|
||||
if (strings.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < strings.Count; i++)
|
||||
{
|
||||
str += "," + strings[i];
|
||||
}
|
||||
str = str.Substring(1);
|
||||
}
|
||||
}
|
||||
@if (strings.Count > 0)
|
||||
{
|
||||
<div class="col-xs-12 col-md-12">
|
||||
<div class="row">
|
||||
<div class="col-sm-12" style="padding:0;">
|
||||
<div class="ibox float-e-margins ">
|
||||
<div class="ibox-title" style="padding: 5px 15px; min-height:auto;">
|
||||
<h5>正态分布图(<b>字段名:@name,<b class="explain"></b>)</b></h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link" onclick="frameShow(this)">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content " style="padding: 5px 15px; min-height: auto; width: 100%;">
|
||||
<div id="app">
|
||||
<div id="data" style="display:none">@str</div>
|
||||
<div>
|
||||
<p>总长度:{{data.length}}</p>
|
||||
<p>总 和: {{ numFilter(sum)}}</p>
|
||||
<p>平均值:{{numFilter(average)}}</p>
|
||||
<p>最大值:{{numFilter(max)}}</p>
|
||||
<p>最小值:{{numFilter(min)}}</p>
|
||||
<p>{{isSample ? '样本' : '总体' }}方差:{{ numFilter(variance)}}</p>
|
||||
<p>{{isSample ? '样本' : '总体' }}标准差:{{ numFilter(standardDeviation)}}</p>
|
||||
<p>一倍标准差范围:{{ numFilter(standarDevRangeOfOne.low) +" ~ "+ numFilter(standarDevRangeOfOne.up)}}</p>
|
||||
<p>二倍标准差范围:{{ numFilter(standarDevRangeOfTwo.low) +" ~ "+ numFilter(standarDevRangeOfTwo.up)}}</p>
|
||||
<p>三倍标准差范围:{{numFilter(standarDevRangeOfThree.low) +" ~ "+ numFilter(standarDevRangeOfThree.up)}}</p>
|
||||
</div>
|
||||
<div ref="chart" id="chart" style="width: 100%; height: 500px;"></div>
|
||||
<div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-xs-12 col-md-12">
|
||||
<div class="row">
|
||||
<div class="col-sm-12" style="padding:0;">
|
||||
<div class="ibox float-e-margins ">
|
||||
<div class="ibox-title" style="padding: 5px 15px; min-height:auto;">
|
||||
<h5>数量统计图(<b>字段名:@name,<b class="explain"></b>)</b></h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link" onclick="frameShow(this)">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content " style="padding: 5px 15px; min-height: auto; width: 100%;">
|
||||
<div id="app2">
|
||||
<div>
|
||||
<p>总长度:{{data.length}}</p>
|
||||
|
||||
|
||||
<div id="date">{{datares}}</div>
|
||||
</div>
|
||||
<div ref="chart" id="chart" style="width: 100%; height: 500px;"></div>
|
||||
|
||||
|
||||
|
||||
<div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-xs-12 col-md-12">
|
||||
<div class="row">
|
||||
<div class="col-sm-12" style="padding:0;">
|
||||
<div class="ibox float-e-margins ">
|
||||
<div class="ibox-title">
|
||||
<h5>参数趋势图(<b>字段名:@name,<b class="explain"></b>)</b></h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link" onclick="frameShow(this)">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content" style="padding:0;">
|
||||
<div id="noyue" @*style=" display:none"*@>
|
||||
<p id="datalength" style="">总长度:</p>
|
||||
<p id="average">平均值:</p>
|
||||
<p id="max">最大值:</p>
|
||||
<p id="min">最小值:</p>
|
||||
</div>
|
||||
<div id="stesy" style="width: 100%; height:400px "></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-xs-12 col-md-12">
|
||||
<div class="row">
|
||||
<div class="col-sm-12" style="padding:0;">
|
||||
<div class="ibox float-e-margins ">
|
||||
<div class="ibox-title">
|
||||
<h5>数据(<b>字段名:@name,<b class="explain"></b>)</b></h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link" onclick="frameShow(this)">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content" style="padding:0;">
|
||||
<div class="table-responsive" id="TestLogsData" style="word-wrap: break-word ">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<h4> 暂无数据 </h4>
|
||||
}
|
||||
|
||||
<script src="~/Theme/js/bootstrap-datepicker.min.js"></script>
|
||||
<script src="~/Theme/js/plugins/datapicker/locales/bootstrap-datepicker.zh-CN.js"></script>
|
||||
<script src="~/Plugin/Orthostate.js"></script>
|
||||
<script>
|
||||
|
||||
|
||||
let projectID = $("#projectList option:selected").text();
|
||||
let stance = $("#checkbox option:selected").text();
|
||||
|
||||
|
||||
$(".explain").html("机型:" + projectID + ",站位:" + stance);
|
||||
|
||||
|
||||
//手动收起展开
|
||||
function frameShow(ec) {
|
||||
$(ec).parent().parent().parent().find('.ibox-content').toggle();
|
||||
var tyuu = $(ec).find('.fa fa-chevron-up');
|
||||
console.log(tyuu);
|
||||
}
|
||||
|
||||
//arr1是数据源
|
||||
let set = $("#data").html();
|
||||
$("#TestLogsData").html(set);
|
||||
var list = set.split(',');
|
||||
var arr1 = new Array(); //创建一个空数组
|
||||
for (var i = 0; i < list.length; i++) {
|
||||
arr1.push(Number(list[i]));
|
||||
}
|
||||
|
||||
var total = 0;
|
||||
for (var i = 0; i < arr1.length; i++) {
|
||||
total += arr1[i];
|
||||
}
|
||||
document.getElementById("datalength").innerHTML = "总长度: " + arr1.length;
|
||||
document.getElementById("average").innerHTML = "平均值: " + (total / arr1.length).toFixed(2);
|
||||
document.getElementById("max").innerHTML = "最大值: " + Math.max.apply(Math, arr1);
|
||||
document.getElementById("min").innerHTML = "最小值: " + Math.min.apply(Math, arr1);
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
@@ -0,0 +1,64 @@
|
||||
@{
|
||||
Layout = null;
|
||||
System.Data.DataSet datas = (System.Data.DataSet)ViewData["OrthostateData"];
|
||||
|
||||
}
|
||||
|
||||
|
||||
@if (datas.Tables.Count!=0)
|
||||
{
|
||||
<input type="hidden" class="dataNum" value="1" />
|
||||
<div>
|
||||
<nav style="text-align:center;">
|
||||
<ul class="pagination" id="page">
|
||||
<li class="first" onclick="Viewpaging(1)"><a>首页</a></li>
|
||||
<li class="left"><a>…</a></li>
|
||||
@for (int i = 0; i < ViewBag.allpage; i++)
|
||||
{
|
||||
<li class="pages" onclick="Viewpaging(@(i + 1))"><a>@(i + 1)</a></li>
|
||||
}
|
||||
<li class="right"><a>…</a></li>
|
||||
<li class="finally"><a onclick="Viewpaging(@ViewBag.allpage)">尾页</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<table class="table table-striped table-bordered table-hover " id="editable">
|
||||
<thead>
|
||||
<tr>
|
||||
@for (int i = 0; i < datas.Tables[0].Columns.Count; i++)
|
||||
{
|
||||
<th>
|
||||
@datas.Tables[0].Columns[i]
|
||||
</th>
|
||||
}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@for (int row = 0; row < datas.Tables[0].Rows.Count; row++)
|
||||
{
|
||||
<tr>
|
||||
@for (int i = 0; i < datas.Tables[0].Columns.Count; i++)
|
||||
{
|
||||
if (i == 4)
|
||||
{
|
||||
<td>@datas.Tables[0].Rows[row][i].ToString().Trim()</td>
|
||||
}
|
||||
else
|
||||
{
|
||||
<td>
|
||||
@if (datas.Tables[0].Rows[row][i].ToString() != "NULL")
|
||||
{
|
||||
@datas.Tables[0].Rows[row][i]
|
||||
}
|
||||
</td>
|
||||
}
|
||||
}
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
else
|
||||
{
|
||||
<h1>暂无数据</h1>
|
||||
}
|
||||
25
AUTS.Web/Areas/App/Views/Dataanalysis/badness.cshtml
Normal file
25
AUTS.Web/Areas/App/Views/Dataanalysis/badness.cshtml
Normal file
@@ -0,0 +1,25 @@
|
||||
@model AUTS.Domain.ViewModels.VM_CapacityIndex
|
||||
@{
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
//List<AUTS.Domain.Entities.TBL_Project> projectList = AUTS.Services.Cache.CacheHelp.GetUserDBProjectList();//产品列表
|
||||
}
|
||||
<div class="row wrapper border-bottom white-bg page-heading">
|
||||
<div class="col-lg-10">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<a href="@Url.Action("Index", "Home")">主页</a>
|
||||
</li>
|
||||
<li>
|
||||
<a>数据分析</a>
|
||||
</li>
|
||||
<li>
|
||||
<a>不良统计</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<strong>测试直通率统计</strong>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
</div>
|
||||
</div>
|
||||
39
AUTS.Web/Areas/App/Views/Dataanalysis/capacity.cshtml
Normal file
39
AUTS.Web/Areas/App/Views/Dataanalysis/capacity.cshtml
Normal file
@@ -0,0 +1,39 @@
|
||||
@model AUTS.Domain.ViewModels.VM_CapacityIndex
|
||||
@{
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
ViewBag.Title = "产能分析";
|
||||
|
||||
}
|
||||
<link href="~/Theme/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
|
||||
|
||||
<div class="row wrapper border-bottom white-bg page-heading">
|
||||
<div class="col-lg-10">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<a href="@Url.Action("Index", "Home")">主页</a>
|
||||
</li>
|
||||
<li>
|
||||
<a>数据分析</a>
|
||||
</li>
|
||||
<li>
|
||||
<a>产能分析</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<strong id="title_text">产能统计</strong>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<select id="title_selected" class="form-control m-b" style="margin:5px 0;">
|
||||
<option value="0" selected>产能统计</option>
|
||||
<option value="1">作业效率</option>
|
||||
<option value="2">效率对比</option>
|
||||
</select>
|
||||
|
||||
<div class="ibox float-e-margins" id="selectcontent">
|
||||
</div>
|
||||
<script src="~/Plugin/Capacity.js"></script>
|
||||
|
||||
266
AUTS.Web/Areas/App/Views/Dataanalysis/selected0.cshtml
Normal file
266
AUTS.Web/Areas/App/Views/Dataanalysis/selected0.cshtml
Normal file
@@ -0,0 +1,266 @@
|
||||
@model AUTS.Domain.ViewModels.VM_CapacityIndex
|
||||
@{
|
||||
<script src="~/Theme/js/inspinia.js"></script>
|
||||
Layout = null;
|
||||
List<AUTS.Domain.Entities.TBL_Project> projectList = AUTS.Services.Cache.CacheHelp.GetUserDBProjectList();//产品列表
|
||||
<script src="~/Plugin/Capacity.js"></script>
|
||||
|
||||
}
|
||||
<script src="~/Theme/js/plugins/chartJs/chart.js"></script>
|
||||
<script src="~/Theme/js/plugins/datapicker/bootstrap-datepicker.js"></script>
|
||||
<script src="~/Theme/js/plugins/datapicker/locales/bootstrap-datepicker.zh-CN.js"></script>
|
||||
<div class="row selected0">
|
||||
@*划分依据*@
|
||||
<div class="col-xs-12 col-md-12" style="padding-top:1PX;">
|
||||
|
||||
@*<div onclick="partitioncriterion(0,this)" class="btn-primary col-xs-3 col-sm-3 partitioncriterion partitioncriterion_0">日产能 </div>
|
||||
<div onclick="partitioncriterion(1,this)" class=" col-xs-3 col-sm-3 partitioncriterion partitioncriterion_1">周产能</div>
|
||||
<div onclick="partitioncriterion(2,this)" class=" col-xs-3 col-sm-3 partitioncriterion partitioncriterion_2">月产能</div>
|
||||
<div onclick="partitioncriterion(3,this)" class=" col-xs-3 col-sm-3 partitioncriterion partitioncriterion_3">按订单</div>*@
|
||||
|
||||
|
||||
<button id="index_speedySreach0" type="button" class="btn btn-default btn-sm index_speedySreach" onclick="partitioncriterion(0,this)">今日</button>
|
||||
<button id="index_speedySreach3" type="button" class="btn btn-default btn-sm index_speedySreach" onclick="partitioncriterion(3,this)">3天</button>
|
||||
<button id="index_speedySreach7" type="button" class="btn btn-default btn-sm index_speedySreach" onclick="partitioncriterion(7,this)">7天</button>
|
||||
<button id="index_speedySreach30" type="button" class="btn btn-default btn-sm index_speedySreach" onclick="partitioncriterion(30,this)">30天</button>
|
||||
<button id="index_speedySreach40" type="button" class="btn btn-default btn-sm index_speedySreach" onclick="partitioncriterion(5,this)">按订单</button>
|
||||
|
||||
</div>
|
||||
@*机型*@
|
||||
<div class="col-xs-6 col-md-6" style="padding-top:1PX;">
|
||||
<select id="projectList" onchange="projectListchange();" class="form-control">
|
||||
@*<option value="0">所有机型</option>*@
|
||||
@if (projectList != null)
|
||||
{
|
||||
foreach (var item in projectList.OrderBy(e => e.ProjectName))
|
||||
{
|
||||
<option value="@item.ID">@item.ProjectName</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
@*所有订单*@
|
||||
<div class="col-xs-6 col-md-6" style="padding-top:1PX;">
|
||||
<select id="OrderList" class="form-control">
|
||||
<option value="0">所有订单</option>
|
||||
@*@if (projectList != null)
|
||||
{
|
||||
foreach (var item in projectList.OrderBy(e => e.ProjectName))
|
||||
{
|
||||
<option value="@item.ID">@item.ProjectName</option>
|
||||
}
|
||||
}*@
|
||||
</select>
|
||||
</div>
|
||||
@*站位*@
|
||||
<div id="stationList" class="col-xs-6 col-md-6" style="padding-top:1PX;">
|
||||
<select id="checkbox" class="form-control">
|
||||
@*<option value="0">选择站位</option>*@
|
||||
</select>
|
||||
</div>
|
||||
@*工具*@
|
||||
<div class="col-xs-6 col-md-6" style="padding-top:1PX;">
|
||||
<div class="form-control" id="checkboxtool">
|
||||
<div class=" col-xs-12 col-sm-12 i-checks"><label> <input type="checkbox" class="columnsName" value="1"> <i></i>去重复数据</label></div>
|
||||
<div class="hide col-xs-6 col-sm-6 i-checks"><label> <input type="checkbox" class="columnsName" value="2"> <i></i>站位合并</label></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@*时间选择*@
|
||||
<!--- <div class="col-xs-12 col-md-12" style="padding-top:1PX;">
|
||||
<div class="form-control" style="padding: 1px 0; align-items: center; justify-content: center;">
|
||||
<div class="col-xs-4 col-sm-2">
|
||||
<label class="form-control input-sm " style="border:none;text-align:right;">查询日期 @*<i style="opacity:0.5;" class="text-warning fa fa-star" onclick="hint(1)"></i>*@</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>-->
|
||||
<div class="col-xs-12 col-md-12" style="padding-top:1PX;">
|
||||
<div class="form-control" style="padding: 1px 0; align-items: center; justify-content: center;">
|
||||
<div class="col-xs-5 col-sm-4">
|
||||
<input type="text" @*onchange="initTime();"*@ class="input-sm form-control" name="start" id="start" @*value="@DateTime.Now.ToString("yyyy-MM-dd")"*@ readonly />
|
||||
</div>
|
||||
<div class="col-xs-5 col-sm-4">
|
||||
<input type="text" @*onchange="initTime();"*@ class="input-sm form-control" name="start" id="finish" value="@DateTime.Now.ToString("yyyy-MM-dd")" readonly />
|
||||
</div>
|
||||
<div class="col-xs-2 col-sm-2" style="padding:0 5px;">
|
||||
<button class="btn btn-sm btn-info" type="button" style="margin-bottom:0;" onclick="GoData();">查询</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@*时间范围选择*@
|
||||
@*<div class="col-xs-12 col-md-12" style="padding-top:1PX;">
|
||||
<div class="form-control" style="padding:1px 0;">
|
||||
<div class="col-xs-6 col-sm-4">
|
||||
<label class="form-control input-sm " style="border:none;text-align:center;">查询范围 <i style="opacity:0.5;" class="text-warning fa fa-star" onclick="hint(1)"></i></label>
|
||||
</div>
|
||||
<div class="col-xs-3 col-sm-4" style="padding:0 5px;">
|
||||
<select id="startTime" onchange="changeEndTime();" class="form-control input-sm"></select>
|
||||
</div>
|
||||
<div class="col-xs-3 col-sm-4 " style="padding:0 5px;">
|
||||
<select id="EndTime" class="form-control input-sm"></select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>*@
|
||||
@*柱状图数据*@
|
||||
<div class="col-xs-12 col-md-12">
|
||||
<div class="ibox float-e-margins ">
|
||||
<div class="ibox-title" style="padding: 5px 15px; min-height:auto;">
|
||||
<h5>产能图</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content " style="padding: 5px 15px; min-height: ;">
|
||||
<div class="chart">
|
||||
<canvas id="stackedBarChart" style="max-height:250px;" width="400" height="200"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@*错误统计*@
|
||||
<div class="col-xs-12 col-md-12">
|
||||
<div class="ibox float-e-margins ">
|
||||
<div class="ibox-title" style="padding: 5px 15px; min-height:auto;">
|
||||
<h5 id="cesid">详细数据</h5>
|
||||
<br/>
|
||||
<h4 style="color:lightgray">*因产品重测,以下数量可能包含重复数据</h4>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content " style="padding: 5px 15px;max-height:300PX;overflow:scroll;">
|
||||
<div class="form-control" style="padding:1px 0;" id="errinfo">
|
||||
<div class="col-xs-4 col-sm-4">
|
||||
<label id="dateselect" class="form-control input-sm " style="border:none;">时间</label>
|
||||
</div>
|
||||
<div class="col-xs-4 col-sm-4" style="padding:0 5px;">
|
||||
<label class="form-control input-sm " style="border:none;">PASS</label>
|
||||
</div>
|
||||
<div class="col-xs-4 col-sm-4" style="padding:0 5px;">
|
||||
<label class="form-control input-sm " style="border:none;">FAIL</label>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="~/Plugin/sweetalert2@11.js"></script>
|
||||
<script>
|
||||
if (TodayProductions_old_select != null && TodayProductions_old_select.productID != null) {
|
||||
$("#projectList").val(TodayProductions_old_select.productID);
|
||||
}
|
||||
//调用产品变动事件
|
||||
projectListchange();
|
||||
</script>
|
||||
<script>
|
||||
|
||||
$("#start").datepicker({
|
||||
todayBtn: "linked",//今日按钮
|
||||
language: 'zh-CN', //设置语言
|
||||
autoclose: true, //选择后自动关闭
|
||||
clearBtn: true,//清除按钮
|
||||
format: "yyyy/mm/dd",//日期格式
|
||||
});
|
||||
$("#finish").datepicker({
|
||||
todayBtn: "linked",//今日按钮
|
||||
language: 'zh-CN', //设置语言
|
||||
autoclose: true, //选择后自动关闭
|
||||
clearBtn: true,//清除按钮
|
||||
format: "yyyy/mm/dd",//日期格式
|
||||
});
|
||||
|
||||
$("#start").datepicker('setEndDate', "@DateTime.Now.ToString("yyyy/MM/dd")");
|
||||
|
||||
|
||||
//<option value="0">0点</option>
|
||||
/// 当前月天数
|
||||
function mGetDate(date = null) {
|
||||
if (date == null) {
|
||||
date = new Date();
|
||||
}
|
||||
date = new Date(date);
|
||||
var year = date.getFullYear();
|
||||
var month = date.getMonth() + 1;
|
||||
var d = new Date(year, month, 0);
|
||||
if (month == (new Date().getMonth() + 1) && year == new Date().getFullYear())
|
||||
{
|
||||
return new Date().getDate();
|
||||
}
|
||||
return d.getDate();
|
||||
}
|
||||
/// 初始化 两个范围选择器
|
||||
function initTime(type = null) {
|
||||
if (type == null) {
|
||||
// 用户选择的 划分分类
|
||||
type = partitioncriterionval || 0;
|
||||
}
|
||||
$("#startTime").html("");
|
||||
$("#EndTime").html("");
|
||||
let max = 23;
|
||||
let min = 0;
|
||||
switch (type) {
|
||||
case 1:
|
||||
max = 7;
|
||||
min = 1;
|
||||
break;
|
||||
case 2:
|
||||
max = mGetDate($("#start").val());
|
||||
min = 1;
|
||||
break;
|
||||
}
|
||||
for (var i = min; i <= max; i++) {
|
||||
$("#EndTime").append(` <option value="` + i + `">` + i + `</option>`);
|
||||
$("#startTime").append(` <option value="` + i + `">` + i + `</option>`);
|
||||
}
|
||||
$("#EndTime").val(max);
|
||||
$("#startTime").val(min);
|
||||
}
|
||||
initTime();
|
||||
// 规范最大选择 不低于 开始
|
||||
function changeEndTime(){
|
||||
let min = Number($("#startTime").val());
|
||||
let max = Number($("#EndTime").val());
|
||||
console.log(min)
|
||||
console.log(max)
|
||||
if (max < min) {
|
||||
$("#EndTime").val(min)
|
||||
};
|
||||
let option = $("#EndTime > option");
|
||||
for (let i = 0; i < option.length; i++) {
|
||||
let tump = option[i];
|
||||
let txt = Number($(tump).val()) ;
|
||||
$(tump).removeAttr("disabled");
|
||||
if (txt < min) {
|
||||
console.log(txt, min)
|
||||
$(tump).attr("disabled", true);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 弹出提示
|
||||
function hint(i) {
|
||||
let text = `<h4>日产能:即选择的日期<br/><br/>
|
||||
周产能:选择日期的所在周<br/><br/>
|
||||
月产能:选择日期所在月<h4>`;
|
||||
if (i != 1) {
|
||||
text = `<h4>日产能范围:即选择的日期0 - 23小时<br/><br/>
|
||||
周产能范围:选择日期的所在周的周一 - 周日<br/><br/>
|
||||
月产能范围:选择日期所在月的1号 - 月天数<h4>`
|
||||
}
|
||||
Swal.fire({
|
||||
title: "<h3>帮助</h3>",
|
||||
confirmButtonText: "确定",
|
||||
confirmButtonColor: '#23c6c8',// 确定按钮的 颜色
|
||||
html: text,
|
||||
width: 600,
|
||||
padding: '3em',
|
||||
})
|
||||
}
|
||||
|
||||
</script>
|
||||
213
AUTS.Web/Areas/App/Views/DevManage/DevList.cshtml
Normal file
213
AUTS.Web/Areas/App/Views/DevManage/DevList.cshtml
Normal file
@@ -0,0 +1,213 @@
|
||||
|
||||
@{
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
|
||||
<link href="~/Theme/css/plugins/jsTree/style.min.css" rel="stylesheet">
|
||||
|
||||
<div class="row wrapper border-bottom white-bg page-heading">
|
||||
<div class="col-lg-10">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<a href="@Url.Action("Index", "Home")">主页</a>
|
||||
</li>
|
||||
<li>
|
||||
<a>设备管理</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<strong>设备列表</strong>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>设备列表</h5>
|
||||
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content" id="listBox">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@*<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox ">
|
||||
<div class="ibox-title">
|
||||
<h5>设备列表</h5>
|
||||
</div>
|
||||
<div class="ibox-content" style="touch-action: pan-y;" id="nestableBox">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>*@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox ">
|
||||
<div class="ibox-title">
|
||||
<h5>设备列表</h5>
|
||||
</div>
|
||||
<div class="ibox-content" id="treeview12">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox float-e-margins" id="ServiceLogBox">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Nestable List -->
|
||||
@*<script src="~/Theme/js/plugins/nestable/jquery.nestable.js"></script>*@
|
||||
|
||||
<script src="~/Theme/js/plugins/bootstrap-treeview/bootstrap-treeview.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function () {
|
||||
updateDevList();
|
||||
//updateTree();
|
||||
//updateNestableList();
|
||||
GetDevListTreeJson();
|
||||
|
||||
//$('#treeview12').treeview({
|
||||
// data: GetDevListTreeJson(),
|
||||
// //data: "/APP/DevManage/GetDevListTreeJson_New",
|
||||
//});
|
||||
//// 收合指定内存块中的元素
|
||||
//$('#nestable2').nestable('collapseAll');
|
||||
});
|
||||
|
||||
function GetDevListTreeJson() {
|
||||
$.ajax({
|
||||
url: "/APP/DevManage/GetDevListTreeJson_New",
|
||||
type: "GET",
|
||||
async: true,
|
||||
dataType: "JSON",
|
||||
success: function (res) { // 请求成功后的回调函数,其中的参数data为controller返回的map,也就是说,然后通过data这个参数取JSON数据中的值
|
||||
//var str = JSON.stringify(res.Data);
|
||||
console.log(res);
|
||||
$('#treeview12').treeview({
|
||||
data: res,// 数据源
|
||||
highlightSelected: false,
|
||||
showBorder: true,
|
||||
//onNodeChecked: function (event, data) {
|
||||
// alert("AAA");
|
||||
//},
|
||||
onNodeSelected: function (event, data) {
|
||||
//alert(data.id);
|
||||
GetServiceLogList(data.id);
|
||||
}
|
||||
});
|
||||
|
||||
//return res;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
//function updateNestableList() {
|
||||
// $.ajax({
|
||||
// cache: true,
|
||||
// async: true,
|
||||
// type: 'POST',
|
||||
// url: "/APP/DevManage/GetDevNestableList",
|
||||
// success: function (data) {
|
||||
// $('#nestableBox').html(data);
|
||||
// $('#nestable2').nestable({
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
//};
|
||||
|
||||
@*function updateTree() {
|
||||
$('#using_json').jstree({
|
||||
'core': {
|
||||
'data': {
|
||||
'url': function (node) {
|
||||
if (node.id >0)
|
||||
return '@(Url.Action("GetAppListTreeJson"))?sid=' + node.id;
|
||||
else
|
||||
return '@(Url.Action("GetDevListTreeJson"))';
|
||||
|
||||
},
|
||||
'data': function (node) {
|
||||
return { 'parent': node.id };
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
};*@
|
||||
|
||||
function updateDevList() {
|
||||
$.ajax({
|
||||
cache: true,
|
||||
async: true,
|
||||
type: 'POST',
|
||||
url: "/APP/DevManage/GetDevList",
|
||||
success: function (data) {
|
||||
$('#listBox').html(data);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
function GetServiceLogList(sid) {
|
||||
$.ajax({
|
||||
cache: true,
|
||||
async: true,
|
||||
type: 'POST',
|
||||
//data: { "sid": sid},
|
||||
url: "/APP/DevManage/GetServiceLogList?sid=" + sid,
|
||||
success: function (data) {
|
||||
$('#ServiceLogBox').html(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var t = 5;
|
||||
|
||||
function fun() {
|
||||
t--;
|
||||
//console.log(t);
|
||||
if (t <= 0) {
|
||||
//clearInterval(inter);
|
||||
updateDevList();
|
||||
GetDevListTreeJson();
|
||||
//updateNestableList();
|
||||
//updateTree();
|
||||
//jQuery('#using_json').jstree(true).refresh(true);
|
||||
t = 5;
|
||||
}
|
||||
}
|
||||
//var inter = setInterval("fun()", 1000);
|
||||
|
||||
</script>
|
||||
122
AUTS.Web/Areas/App/Views/DevManage/DevListView.cshtml
Normal file
122
AUTS.Web/Areas/App/Views/DevManage/DevListView.cshtml
Normal file
@@ -0,0 +1,122 @@
|
||||
@{
|
||||
//ViewBag.Title = "设备列表";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
|
||||
<style>
|
||||
.OnlineDate {
|
||||
float: right;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="row wrapper border-bottom white-bg page-heading">
|
||||
<div class="col-lg-10">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<a href="@Url.Action("Index", "Home")">主页</a>
|
||||
</li>
|
||||
<li>
|
||||
<a>设备管理</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<strong>设备列表</strong>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight">
|
||||
<div class="row">
|
||||
<div class="col-sm-12" style="padding:0px;">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>设备列表</h5>
|
||||
|
||||
<div class="ibox-tools">
|
||||
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content" style="padding:0px;">
|
||||
<div id="tree"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="~/Theme/js/plugins/bootstrap-treeview/bootstrap-treeview.min.js"></script>
|
||||
<script>
|
||||
$(function () {
|
||||
GetDevListView();
|
||||
})
|
||||
var inter = setInterval("GetDevListView()", 60000);
|
||||
|
||||
var TreeNodeID = 0;
|
||||
function GetDevListView() {
|
||||
$.ajax({
|
||||
type: "Post",
|
||||
url: "/app/DevManage/GetDevListView",
|
||||
dataType: "json",
|
||||
success: function (result) {
|
||||
//console.log(result);
|
||||
$('#tree').treeview({
|
||||
data: result, // 数据源
|
||||
showCheckbox: false, //是否显示复选框
|
||||
highlightSelected: false, //是否高亮选中
|
||||
nodeIcon: 'glyphicon glyphicon-user', //节点上的图标
|
||||
//nodeIcon: 'glyphicon glyphicon-globe',
|
||||
emptyIcon: '', //没有子节点的节点图标
|
||||
multiSelect: false, //多选
|
||||
onNodeExpanded: function (event, data) {
|
||||
if (data.parentId == undefined) {
|
||||
TreeNodeID = data.nodeId;
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
$('#tree').treeview('collapseAll', { silent: true });
|
||||
|
||||
if (TreeNodeID != 0) {
|
||||
$('#tree').treeview('expandNode', [TreeNodeID, { silent: true, ignoreChildren: false }]);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
alert("树形结构加载失败!")
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function clearError(sid, type) {
|
||||
|
||||
$.ajax({
|
||||
type: "Post",
|
||||
url: "/app/DevManage/clearError",
|
||||
data: { "sID": sid, "type": type },
|
||||
dataType: "json",
|
||||
success: function (result) {
|
||||
if (result.Status == 200) {
|
||||
$.toastr.success('清除成功', {
|
||||
time: 3000,
|
||||
position: 'top-center'
|
||||
});
|
||||
GetDevListView();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
107
AUTS.Web/Areas/App/Views/DevManage/DevLogList.cshtml
Normal file
107
AUTS.Web/Areas/App/Views/DevManage/DevLogList.cshtml
Normal file
@@ -0,0 +1,107 @@
|
||||
@using PagedList.Mvc;
|
||||
@using PagedList;
|
||||
@model PagedList.PagedList<AUTS.Domain.Entities.TBL_UTS_Manage_DataServiceLog>
|
||||
@*@model List<AUTS.Domain.Entities.TBL_UTS_Manage_DataServiceLog>*@
|
||||
@{
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
<div class="row wrapper border-bottom white-bg page-heading">
|
||||
<div class="col-lg-10">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<a href="@Url.Action("Index", "Home")">主页</a>
|
||||
</li>
|
||||
<li>
|
||||
<a>设备管理</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<strong>设备列表</strong>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>设备列表</h5>
|
||||
|
||||
|
||||
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover dataTables-example">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>时间</th>
|
||||
<th>公网IP</th>
|
||||
<th>内网IP</th>
|
||||
<th>文件名</th>
|
||||
@*<th>App</th>*@
|
||||
<th>版本</th>
|
||||
<th>测试配置名称</th>
|
||||
<th>操作内容</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if (Model != null && Model.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < Model.Count; i++)
|
||||
{
|
||||
<tr class="gradeC">
|
||||
<td>@(i + 1)</td>
|
||||
<td>@Model[i].DateTime</td>
|
||||
<td>@Model[i].PublicIp</td>
|
||||
<td>@Model[i].PrivateIp</td>
|
||||
<td>@Model[i].LogType</td>
|
||||
@*<td>@Model[i].AppName</td>*@
|
||||
<td>@Model[i].ServiceVersion</td>
|
||||
<td>@Model[i].VendorName</td>
|
||||
<td>@Model[i].LogText</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
@if (Model != null && Model.Count > 0)
|
||||
{
|
||||
@Html.PagedListPager((IPagedList)Model, page => Url.Action(ViewContext.RouteData.Values["action"].ToString(),
|
||||
AUTS.Services.Tool.StringHelp.GetQueryString(HttpUtility.ParseQueryString(Request.Url.Query), page)), new PagedListRenderOptions() { ContainerDivClasses = new string[] { "pagination-small pull-right" }, MaximumPageNumbersToDisplay = 5,
|
||||
LinkToFirstPageFormat = "«",
|
||||
LinkToPreviousPageFormat = "‹",
|
||||
LinkToNextPageFormat = "›",
|
||||
LinkToLastPageFormat = "»",
|
||||
})
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-4" id="userDetailsBox">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
181
AUTS.Web/Areas/App/Views/DevManage/ServiceLogList.cshtml
Normal file
181
AUTS.Web/Areas/App/Views/DevManage/ServiceLogList.cshtml
Normal file
@@ -0,0 +1,181 @@
|
||||
@using PagedList.Mvc;
|
||||
@using PagedList;
|
||||
@model PagedList.PagedList<AUTS.Domain.Entities.TBL_UTS_Manage_ServiceLog>
|
||||
@*@model List<AUTS.Domain.Entities.TBL_UTS_Manage_ServiceLog>*@
|
||||
@{
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
//Layout = null;
|
||||
|
||||
|
||||
}
|
||||
|
||||
<!-- FooTable -->
|
||||
<link href="~/Theme/css/plugins/footable/footable.core.css" rel="stylesheet">
|
||||
|
||||
|
||||
<div class="row wrapper border-bottom white-bg page-heading">
|
||||
<div class="col-lg-10">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<a href="@Url.Action("Index", "Home")">主页</a>
|
||||
</li>
|
||||
<li>
|
||||
<a>设备管理</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<strong>服务日志列表</strong>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>服务日志列表</h5>
|
||||
|
||||
|
||||
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@*<div class="ibox-content">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover dataTables-example">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>服务名</th>
|
||||
<th>时间</th>
|
||||
<th>公网IP</th>
|
||||
<th>内网IP</th>
|
||||
<th>Mac地址</th>
|
||||
<th>系统</th>
|
||||
<th>设备名</th>
|
||||
<th>设备用户</th>
|
||||
<th>网络状态</th>
|
||||
<th>类型</th>
|
||||
<th>内容</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if (Model != null && Model.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < Model.Count; i++)
|
||||
{
|
||||
<tr class="gradeC">
|
||||
<td>@(i + 1)</td>
|
||||
<td>@Model[i].AppName</td>
|
||||
<td>@Model[i].DateTime</td>
|
||||
<td>@Model[i].DevPublicIP</td>
|
||||
<td>@Model[i].DevPrivateIP</td>
|
||||
<td>@Model[i].DevMac</td>
|
||||
<td>@Model[i].DevOS</td>
|
||||
<td>@Model[i].DevName</td>
|
||||
<td>@Model[i].DevUserName</td>
|
||||
<td>@Model[i].DevOnline</td>
|
||||
<td>@Model[i].LogType</td>
|
||||
<td>@Model[i].LogText</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>*@
|
||||
|
||||
<div class="ibox-content">
|
||||
|
||||
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="20">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th data-sort-ignore="true" data-toggle="true">服务名</th>
|
||||
<th data-sort-ignore="true">时间</th>
|
||||
<th data-sort-ignore="true" data-hide="phone">设备名</th>
|
||||
<th data-sort-ignore="true" data-hide="phone">设备用户</th>
|
||||
<th data-hide="all">公网IP</th>
|
||||
<th data-hide="all">内网IP</th>
|
||||
<th data-hide="all">系统</th>
|
||||
<th data-hide="all">Mac地址</th>
|
||||
<th data-hide="all">内容</th>
|
||||
<th data-sort-ignore="true" data-hide="phone">网络状态</th>
|
||||
<th data-sort-ignore="true">类型</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if (Model != null && Model.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < Model.Count; i++)
|
||||
{
|
||||
<tr class="gradeC">
|
||||
<td>@Model[i].AppName</td>
|
||||
<td>@Model[i].DateTime</td>
|
||||
<td>@Model[i].DevName</td>
|
||||
<td>@Model[i].DevUserName</td>
|
||||
|
||||
<td>@Model[i].DevPublicIP</td>
|
||||
<td>@Model[i].DevPrivateIP</td>
|
||||
<td>@Model[i].DevOS</td>
|
||||
<td>@Model[i].DevMac</td>
|
||||
<td>@Model[i].LogText</td>
|
||||
|
||||
<td>@Model[i].DevOnline</td>
|
||||
<td>@Model[i].LogType</td>
|
||||
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
@if (Model != null && Model.Count > 0)
|
||||
{
|
||||
@Html.PagedListPager((IPagedList)Model, page => Url.Action(ViewContext.RouteData.Values["action"].ToString(),
|
||||
AUTS.Services.Tool.StringHelp.GetQueryString(HttpUtility.ParseQueryString(Request.Url.Query), page)), new PagedListRenderOptions() { ContainerDivClasses = new string[] { "pagination-small pull-right" } })
|
||||
}
|
||||
@*<td colspan="5">
|
||||
|
||||
<ul class="pagination pull-right"></ul>
|
||||
</td>*@
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- FooTable -->
|
||||
@*<script src="~/Theme/js/plugins/footable/footable.all.min.js"></script>*@
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
//$(document).ready(function () {
|
||||
|
||||
// $('.footable').footable();
|
||||
// $('.footable2').footable();
|
||||
|
||||
//});
|
||||
|
||||
</script>
|
||||
52
AUTS.Web/Areas/App/Views/DevManage/_DevList.cshtml
Normal file
52
AUTS.Web/Areas/App/Views/DevManage/_DevList.cshtml
Normal file
@@ -0,0 +1,52 @@
|
||||
@model List<AUTS.Domain.Entities.TBL_UTS_Manage_DataServiceList>
|
||||
@{
|
||||
Layout = null;
|
||||
var nowTime = DateTime.Now;
|
||||
}
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover dataTables-example">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>昵称</th>
|
||||
<th>设备名称</th>
|
||||
<th>设备类型</th>
|
||||
<th>Mac地址</th>
|
||||
<th>版本</th>
|
||||
<th>初次登陆时间</th>
|
||||
<th>上次在线时间</th>
|
||||
<th>在线状态</th>
|
||||
@*<th>是否有效</th>*@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if (Model != null && Model.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < Model.Count; i++)
|
||||
{
|
||||
<tr class="gradeC">
|
||||
<td>@(i + 1)</td>
|
||||
<td>@Model[i].TerminalAlias</td>
|
||||
<td>@Model[i].TerminalName</td>
|
||||
<td>@Model[i].TerminalType</td>
|
||||
<td>@Model[i].TerminalMAC</td>
|
||||
<td>@Model[i].ServiceVersion</td>
|
||||
<td>@Model[i].ServiceRegisterDateTime</td>
|
||||
<td>@Model[i].ServiceLastActiveDateTime</td>
|
||||
<td>
|
||||
@if ((nowTime - (Model[i].ServiceLastActiveDateTime ?? nowTime)).TotalSeconds <= 900)
|
||||
{
|
||||
<i class="fa fa-circle text-navy"></i>
|
||||
}
|
||||
else
|
||||
{
|
||||
<i class="fa fa-unlink text-muted"></i>
|
||||
}
|
||||
</td>
|
||||
@*<td>@Model[i].ServiceValid</td>*@
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
</table>
|
||||
</div>
|
||||
34
AUTS.Web/Areas/App/Views/DevManage/_NestableList.cshtml
Normal file
34
AUTS.Web/Areas/App/Views/DevManage/_NestableList.cshtml
Normal file
@@ -0,0 +1,34 @@
|
||||
@model List<AUTS.Domain.ViewModels.VM_DevNestable>
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
<div class="dd" id="nestable2">
|
||||
<ol class="dd-list">
|
||||
@if (Model != null && Model.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < Model.Count; i++)
|
||||
{
|
||||
<li class="dd-item">
|
||||
<div class="dd-handle">
|
||||
@Html.Raw(HttpUtility.HtmlDecode(Model[i].HtmlText))
|
||||
</div>
|
||||
@if (Model[i].AppList.Count > 0)
|
||||
{
|
||||
<ol class="dd-list">
|
||||
|
||||
@for (int j = 0; j < Model[i].AppList.Count; j++)
|
||||
{
|
||||
<li class="dd-item">
|
||||
<div class="dd-handle">
|
||||
@Html.Raw(HttpUtility.HtmlDecode(Model[i].AppList[j].AppHtmlText))
|
||||
</div>
|
||||
</li>
|
||||
}
|
||||
</ol>
|
||||
}
|
||||
</li>
|
||||
}
|
||||
}
|
||||
</ol>
|
||||
</div>
|
||||
84
AUTS.Web/Areas/App/Views/DevManage/_ServiceLogList.cshtml
Normal file
84
AUTS.Web/Areas/App/Views/DevManage/_ServiceLogList.cshtml
Normal file
@@ -0,0 +1,84 @@
|
||||
@using PagedList.Mvc;
|
||||
@using PagedList;
|
||||
@model PagedList.PagedList<AUTS.Domain.Entities.TBL_UTS_Manage_DataServiceLog>
|
||||
@{
|
||||
/**/
|
||||
//Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
<div class="ibox-title">
|
||||
<h5>服务日志</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="panel-group" id="accordion">
|
||||
|
||||
@if (Model != null && Model.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < Model.Count; i++)
|
||||
{
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading" data-toggle="collapse" data-parent="#accordion" href='#collapse-@Model[i].ID'>
|
||||
@Model[i].LogText
|
||||
<br />
|
||||
<h3 class="panel-title">
|
||||
<i class="pull-right">@Model[i].DateTime</i>
|
||||
<i>@Model[i].LogType</i>
|
||||
</h3>
|
||||
@*<h3 class="panel-title">
|
||||
<i class="pull-right">@Model[i].DateTime</i>
|
||||
<a>@Model[i].LogType</a>
|
||||
</h3>*@
|
||||
|
||||
</div>
|
||||
<div id="collapse-@Model[i].ID" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<i class="pull-right">@Model[i].PrivateIp</i>
|
||||
<i>@Model[i].PublicIp</i>
|
||||
<br />
|
||||
V @Model[i].ServiceVersion
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
@if (Model != null && Model.Count > 0)
|
||||
{
|
||||
@Html.PagedListPager((IPagedList)Model, page => Url.Action(ViewContext.RouteData.Values["action"].ToString(),
|
||||
AUTS.Services.Tool.StringHelp.GetQueryString(HttpUtility.ParseQueryString(Request.Url.Query), page)),
|
||||
PagedListRenderOptions.EnableUnobtrusiveAjaxReplacing(
|
||||
new PagedListRenderOptions
|
||||
{
|
||||
ContainerDivClasses = new string[] { "pagination-small pull-right" },
|
||||
MaximumPageNumbersToDisplay = 5,
|
||||
LinkToFirstPageFormat = "«",
|
||||
LinkToPreviousPageFormat = "‹",
|
||||
LinkToNextPageFormat = "›",
|
||||
LinkToLastPageFormat = "»",
|
||||
},
|
||||
new AjaxOptions()
|
||||
{
|
||||
UpdateTargetId = "ServiceLogBox",
|
||||
}
|
||||
))
|
||||
}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
var url = "/Scripts/jquery.unobtrusive-ajax.min.js";
|
||||
$.getScript(url);
|
||||
</script>
|
||||
|
||||
@*<script src="~/Scripts/jquery.unobtrusive-ajax.min.js"></script>*@
|
||||
81
AUTS.Web/Areas/App/Views/Home/BasisFun.cshtml
Normal file
81
AUTS.Web/Areas/App/Views/Home/BasisFun.cshtml
Normal file
@@ -0,0 +1,81 @@
|
||||
|
||||
@{
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
|
||||
|
||||
|
||||
<div class="row wrapper border-bottom white-bg page-heading">
|
||||
<div class="col-lg-10">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<a href="@Url.Action("Index", "Home")">主页</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<strong>基础数据</strong>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight">
|
||||
<div class="row">
|
||||
<div class="col-lg-3 col-xs-6">
|
||||
<div class="contact-box center-version">
|
||||
<a href="@Url.Action("CompanyList", "BasicFunc")">
|
||||
<img alt="image" class="img-circle" src="~/Images/Project/006.png">
|
||||
<h3 class="m-b-xs"><strong>客户信息</strong></h3>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 col-xs-6">
|
||||
<div class="contact-box center-version">
|
||||
<a href="@Url.Action("PLineList", "BasicFunc")">
|
||||
<img alt="image" class="img-circle" src="~/Images/Project/006.png">
|
||||
|
||||
|
||||
<h3 class="m-b-xs"><strong>产线信息</strong></h3>
|
||||
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 col-xs-6">
|
||||
<div class="contact-box center-version">
|
||||
<a href="@Url.Action("ProjectList", "BasicFunc")">
|
||||
<img alt="image" class="img-circle" src="~/Images/Project/006.png">
|
||||
|
||||
|
||||
<h3 class="m-b-xs"><strong>产品信息</strong></h3>
|
||||
|
||||
|
||||
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-3 col-xs-6">
|
||||
<div class="contact-box center-version">
|
||||
<a href="@Url.Action("OStatusList", "BasicFunc")">
|
||||
<img alt="image" class="img-circle" src="~/Images/Project/006.png">
|
||||
<h3 class="m-b-xs"><strong>订单状态</strong></h3>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.contact-box.center-version > a img {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
15
AUTS.Web/Areas/App/Views/Home/GetOrderList.cshtml
Normal file
15
AUTS.Web/Areas/App/Views/Home/GetOrderList.cshtml
Normal file
@@ -0,0 +1,15 @@
|
||||
@model List<AUTS.Domain.Entities.TBL_OrderInternal>
|
||||
@{
|
||||
ViewBag.Title = "获取产品订单";
|
||||
Layout = null;
|
||||
|
||||
}
|
||||
|
||||
<option value="0">所有订单</option>
|
||||
@if (Model != null)
|
||||
{
|
||||
foreach (var item in Model.OrderByDescending(e => e.CreateTime))
|
||||
{
|
||||
<option value="@item.ID">@item.InternalNo</option>
|
||||
}
|
||||
}
|
||||
333
AUTS.Web/Areas/App/Views/Home/Index.cshtml
Normal file
333
AUTS.Web/Areas/App/Views/Home/Index.cshtml
Normal file
@@ -0,0 +1,333 @@
|
||||
|
||||
@{
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
var Umodel = AUTS.Services.UserLoginHelper.CurrentUser();
|
||||
var ManageName = AUTS.Services.UserLoginHelper.ManageName();
|
||||
List<AUTS.Domain.Entities.TBL_Project> projectList = AUTS.Services.Cache.CacheHelp.GetUserDBProjectList();//机型
|
||||
}
|
||||
<style>
|
||||
.contact-box.center-version > a {
|
||||
padding: 5px;
|
||||
}
|
||||
.contact-box {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
</style>
|
||||
<link href="~/Theme/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
|
||||
|
||||
<div class="row wrapper border-bottom white-bg page-heading">
|
||||
<div class="col-lg-10">
|
||||
<ol class="breadcrumb">
|
||||
<li class="active">
|
||||
<a href="@Url.Action("Index", "Home")">主页</a>
|
||||
<button class="btn btn-xs btn-primary" type="button" onclick="updateCommonCache('@Url.Action("ClearOrderCacheHelp", "Home")','@Url.Action("Index", "Home")')">刷新数据</button>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight" style="padding-bottom:0px;padding-top:5px;">
|
||||
|
||||
<div class="row" style="color: black;">
|
||||
@*@if (Umodel.IsAdmin)
|
||||
{
|
||||
<div class="col-lg-3 col-xs-3">
|
||||
<div class="contact-box center-version">
|
||||
<a href="@Url.Action("UserList", "User")">
|
||||
<img alt="image" class="img-circle" src="~/Images/Project/009.png">
|
||||
<h3 class="m-b-xs"><strong>用户管理</strong></h3>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
}*@
|
||||
@*@if (ManageName.Contains("M/O"))
|
||||
{*@
|
||||
@*<div class="col-lg-3 col-xs-3">
|
||||
<div class="contact-box center-version">
|
||||
<a href="@Url.Action("BasisFun", "Home")">
|
||||
<img alt="image" class="img-circle" src="~/Images/Project/006.png">
|
||||
<h3 class="m-b-xs"><strong>基础数据</strong></h3>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</div>*@
|
||||
@* }*@
|
||||
|
||||
<div class="col-lg-2 col-xs-2" style="padding:0px;color: black;">
|
||||
<div class="contact-box center-version">
|
||||
<a href="@Url.Action("ProjectList", "BasicFunc")" style="color: black;">
|
||||
@*<img alt="image" class="img-circle" src="~/Images/Project/002.png">*@
|
||||
<h4 class="m-b-xs">(@(projectList==null? 0:projectList.Count))</h4>
|
||||
<h6 class="m-b-xs" style="color: black; font-weight: bold;">产品信息</h6>
|
||||
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-2 col-xs-2" style="padding:0px;color: black;">
|
||||
|
||||
<div class="contact-box center-version">
|
||||
<a href="@Url.Action("OrderInternalList", "Order")" style="color: black;">
|
||||
@*<img alt="image" class="img-circle" src="~/Images/Project/001.png">*@
|
||||
<h4 class="m-b-xs orderCount"></h4>
|
||||
<h6 class="m-b-xs" style="color: black;font-weight:bold;">订单信息</h6>
|
||||
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-2 col-xs-2" style="padding:0px;color: black;">
|
||||
|
||||
<div class="contact-box center-version">
|
||||
<a href="@Url.Action("PPlanInternalTb", "PPlan")">
|
||||
@*<img alt="image" class="img-circle" src="~/Images/Project/002.png">*@
|
||||
<h4 class="m-b-xs ">(0)</h4>
|
||||
<h6 class="m-b-xs" style="color: black;font-weight:bold;">生产计划</h6>
|
||||
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@if (Umodel.UserName == "MomoWen" || Umodel.UserName == "UTS_RD_Manager"||Umodel.UserName.ToUpper()== "ZQPMS")
|
||||
{
|
||||
<div class="col-lg-2 col-xs-2" style="padding:0px;color: black;">
|
||||
|
||||
<div class="contact-box center-version">
|
||||
<a href="@Url.Action("colorboxlistExce", "BasicFunc")">
|
||||
@*<img alt="image" class="img-circle" src="~/Images/Project/002.png">*@
|
||||
<h4 class="m-b-xs ">(0)</h4>
|
||||
<h6 class="m-b-xs" style="color: black;font-weight:bold;">彩盒码导入</h6>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@*<div class="col-lg-3 col-xs-3">
|
||||
<div class="contact-box center-version">
|
||||
<a href="@Url.Action("AuthList", "Auth")">
|
||||
<img alt="image" class="img-circle" src="~/Images/Project/002.png">
|
||||
<h3 class="m-b-xs"><strong>权限列表</strong></h3>
|
||||
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3 col-xs-3">
|
||||
<div class="contact-box center-version">
|
||||
<a href="@Url.Action("AuthManageList", "Auth")">
|
||||
<img alt="image" class="img-circle" src="~/Images/Project/002.png">
|
||||
<h3 class="m-b-xs"><strong>权限组</strong></h3>
|
||||
</a>
|
||||
</div>
|
||||
</div>*@
|
||||
|
||||
@*<div class="col-lg-3 col-xs-3">
|
||||
<div class="contact-box center-version">
|
||||
<a href="@Url.Action("CapacityIndex", "Capacity")">
|
||||
<img alt="image" class="img-circle" src="~/Images/Project/008.png">
|
||||
<h3 class="m-b-xs"><strong>产值查询</strong></h3>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3 col-xs-3">
|
||||
<div class="contact-box center-version">
|
||||
<a href="">
|
||||
<img alt="image" class="img-circle" src="~/Images/Project/005.png">
|
||||
<h3 class="m-b-xs"><strong>工程分析</strong></h3>
|
||||
</a>
|
||||
</div>
|
||||
</div>*@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
@*订单信息*@
|
||||
<div class="wrapper wrapper-content animated fadeInRight" style="padding:0px 10px;">
|
||||
<div class="row" id="orderInfoNum">
|
||||
@*<div class="ibox-title">
|
||||
<h5>订单<span class="orderCount"></span></h5>
|
||||
</div>*@
|
||||
<div class="ibox-content" style="padding:0px;">
|
||||
<div class="row">
|
||||
<div class="col-lg-2 col-xs-2" style="padding:0 0 0 13px;">
|
||||
<div class="contact-box center-version">
|
||||
<a onclick="getOInternal(1)" style="padding:5px 0;" id="Confirm">
|
||||
已确认<br />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-2 col-xs-2" style="padding:0">
|
||||
<div class="contact-box center-version">
|
||||
<a onclick="getOInternal(2)" style="padding:5px 0;" id="BarCode">
|
||||
已配条码<br />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-2 col-xs-2" style="padding:0">
|
||||
<div class="contact-box center-version">
|
||||
<a onclick="getOInternal(3)" style="padding:5px 0;" id="Scheduling">
|
||||
已排产<br />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-2 col-xs-2" style="padding:0">
|
||||
<div class="contact-box center-version">
|
||||
<a onclick="getOInternal(4)" style="padding:5px 0;" id="Yield">
|
||||
正在生产<br />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-2 col-xs-2" style="padding:0">
|
||||
<div class="contact-box center-version">
|
||||
<a onclick="getOInternal(5)" style="padding:5px 0;" id="prodCompletion">
|
||||
完成生产<br />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-2 col-xs-2" style="padding:0 13px 0 0;">
|
||||
<div class="contact-box center-version">
|
||||
<a onclick="getOInternal(6)" style="padding:5px 0;" id="Accomplish">
|
||||
已完成<br />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@*订单信息*@
|
||||
@*设备信息*@
|
||||
<div id="ServiceListdata" class="wrapper wrapper-content animated fadeInRight" style="padding:0px 10px;">
|
||||
</div>
|
||||
@*设备信息*@
|
||||
@*产能查询*@
|
||||
<div class="wrapper wrapper-content animated fadeInRight" style="padding:5px 10px;">
|
||||
<div class="row">
|
||||
<!--<div class="ibox-title">-->
|
||||
@*<div class="row">
|
||||
|
||||
</div>*@
|
||||
<!--<h5>产能查询-->@*<a href="/App/Pplan/PplanList?day=today">(添加今天备注)</a>*@<!--</h5>
|
||||
</div>-->
|
||||
<div class="ibox-content" style="padding:0px;">
|
||||
|
||||
<div class="row ">
|
||||
<div class="col-xs-10 col-md-10" style="padding-top:1PX;">
|
||||
<button id="index_speedySreach0" type="button" class="btn btn-default btn-sm index_speedySreach" onclick="speedySreach(0);">今天</button>
|
||||
<button id="index_speedySreach3" type="button" class="btn btn-default btn-sm index_speedySreach" onclick="speedySreach(3);">3天</button>
|
||||
<button id="index_speedySreach7" type="button" class="btn btn-default btn-sm index_speedySreach" onclick="speedySreach(7);">7天</button>
|
||||
<button id="index_speedySreach30" type="button" class="btn btn-default btn-sm index_speedySreach" onclick="speedySreach(30);">30天</button>
|
||||
<button id="index_speedySreach-1" type="button" class="btn btn-default btn-sm index_speedySreach" onclick="speedySreach(-1);">全部</button>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6 col-md-6" style="padding-top:1PX;">
|
||||
@*机型*@
|
||||
<select id="projectList" class="form-control">
|
||||
<option value="0">所有机型</option>
|
||||
|
||||
@if (projectList != null)
|
||||
{
|
||||
foreach (var item in projectList.OrderBy(e => e.ProjectName))
|
||||
{
|
||||
<option value="@item.ID">@item.ProjectName</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-6" style="padding:1PX 15px 0 0;">
|
||||
@*订单*@
|
||||
<select id="OrderList" onchange="todayData();" class="form-control">
|
||||
<option value="0">所有订单</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-8 col-md-6" style="padding-top:1PX;">
|
||||
<div class="form-inline visible-*-block" style="padding:1px 0;" id="data_5">
|
||||
<div class="input-daterange input-group visible-xs-2" id="datepicker">
|
||||
<input type="text" class="input-sm form-control" name="start" id="start" readonly />
|
||||
<span class="input-group-addon" style="background-color:white;">至</span>
|
||||
<input type="text" class="input-sm form-control" name="end" id="end" readonly style="width:110%"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row ">
|
||||
<div class="col-xs-12">
|
||||
<div class="table-responsive" id="orderInfo">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row ">
|
||||
<div class="col-xs-12">
|
||||
<div class="table-responsive" id="SnInfo">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@*产能查询*@
|
||||
<div class="table-responsive" id="ordersPlannedSpeedBox_Content">
|
||||
</div>
|
||||
<div class="table-responsive" id="detailsBox_Content">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
h5 > span {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.contact-box.center-version > a img {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
#orderInfo > div span {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
#orderInfo > div#oInfo span {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
#orderInfo > div#producInfo {
|
||||
padding-top: 5px;
|
||||
border-top: solid 1px #ddd;
|
||||
}
|
||||
|
||||
#productionModule {
|
||||
border: solid 1px #aee9f3;
|
||||
}
|
||||
|
||||
a strong {
|
||||
font-size: 16px;
|
||||
}
|
||||
</style>
|
||||
@*时间*@
|
||||
<script src="~/Theme/js/bootstrap-datepicker.min.js"></script>
|
||||
<script src="~/Theme/js/plugins/datapicker/locales/bootstrap-datepicker.zh-CN.js"></script>
|
||||
<script src="~/Theme/js/jquery.cookie.js"></script>
|
||||
<script src="~/Plugin/HIndex.js"></script>
|
||||
<script>
|
||||
$('#end').datepicker({
|
||||
language: "zh-CN",//语言
|
||||
todayBtn: "linked",//今日按钮
|
||||
autoclose: true,//选择后关闭日期选择
|
||||
format: "yyyy/mm/dd",//日期格式
|
||||
});
|
||||
$('#start').datepicker({
|
||||
language: "zh-CN",//语言
|
||||
todayBtn: "linked",//今日按钮
|
||||
autoclose: true,//选择后关闭日期选择
|
||||
format: "yyyy/mm/dd",//日期格式
|
||||
});
|
||||
$("#start").datepicker('setEndDate',"@DateTime.Now.ToString("yyyy-MM-dd")");
|
||||
$("#end").datepicker('setEndDate',"@DateTime.Now.ToString("yyyy-MM-dd")");
|
||||
|
||||
</script>
|
||||
45
AUTS.Web/Areas/App/Views/Home/NoAuthority.cshtml
Normal file
45
AUTS.Web/Areas/App/Views/Home/NoAuthority.cshtml
Normal file
@@ -0,0 +1,45 @@
|
||||
|
||||
@{
|
||||
Layout = null;
|
||||
ViewBag.Title = "您没有访问此页面的权限";
|
||||
}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>AUTS | @ViewBag.Title</title>
|
||||
|
||||
<link href="~/Theme/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="~/Theme/font-awesome/css/font-awesome.css" rel="stylesheet">
|
||||
|
||||
<link href="~/Theme/css/animate.css" rel="stylesheet">
|
||||
<link href="~/Theme/css/style.css" rel="stylesheet">
|
||||
|
||||
</head>
|
||||
|
||||
<body class="gray-bg">
|
||||
|
||||
|
||||
<div class="middle-box text-center animated fadeInDown">
|
||||
<h1>500</h1>
|
||||
<h3 class="font-bold">提示:</h3>
|
||||
|
||||
<div class="error-desc">
|
||||
您没有访问此页面的权限.<br />
|
||||
<br /><a href="javascript:history.go(-1)" class="btn btn-primary m-t">返回上一页</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Mainly scripts -->
|
||||
<script src="~/Theme/js/jquery-2.1.1.js"></script>
|
||||
<script src="~/Theme/js/bootstrap.min.js"></script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
129
AUTS.Web/Areas/App/Views/Home/_GetTodayData.cshtml
Normal file
129
AUTS.Web/Areas/App/Views/Home/_GetTodayData.cshtml
Normal file
@@ -0,0 +1,129 @@
|
||||
@model List<AUTS.Domain.ViewModels.Home.VM_TodayData>
|
||||
@{
|
||||
Layout = null;
|
||||
Dictionary<int, int> record = new Dictionary<int, int>();
|
||||
var proList = AUTS.Services.Cache.CacheHelp.GetUserDBProjectList();
|
||||
}
|
||||
@if (Model != null && Model.Count > 0)
|
||||
{
|
||||
var data = Model.OrderByDescending(x => x.today).GroupBy(e => e.ProductID);
|
||||
foreach (var item in data)
|
||||
{
|
||||
<h4 onclick="Showtable(this);"> 机型:@(proList.Find(e => e.ID == item.FirstOrDefault(c => c.ProductID != 0).ProductID).ProjectName)</h4>
|
||||
<table class="table table-striped table-bordered table-hover table-full-width" id="editable">
|
||||
@*<thead>*@
|
||||
<tr style="background-color: #d8f7ea">
|
||||
<th>
|
||||
日期
|
||||
</th>
|
||||
@foreach (var items in item)
|
||||
{
|
||||
foreach (var dic in items.StaAndNum)
|
||||
{
|
||||
<th>
|
||||
@dic.Key
|
||||
</th>
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
</tr>
|
||||
@*</thead>*@
|
||||
|
||||
<tbody>
|
||||
@*item.First().today == DateTime.Now.ToString("yyyy/MM/dd") &&*@
|
||||
@if (item.Last().today != item.First().today)
|
||||
{
|
||||
<tr style="background-color: #d8f7ea">
|
||||
<td>
|
||||
合计
|
||||
</td>
|
||||
@*统计数量*@
|
||||
@{Dictionary<string, int> total = new Dictionary<string, int>();}
|
||||
@foreach (var items in item)
|
||||
{
|
||||
|
||||
foreach (var dic in items.StaAndNum)
|
||||
{
|
||||
if (total.Keys.FirstOrDefault(x => x == dic.Key) == null)
|
||||
{
|
||||
total.Add(dic.Key, dic.Value);
|
||||
}
|
||||
else
|
||||
{
|
||||
total[dic.Key] = total[dic.Key] + dic.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
@foreach (var items in total)
|
||||
{
|
||||
var key = items.Key;
|
||||
var pid = item.FirstOrDefault(c => c.ProductID != 0).ProductID;
|
||||
<td>
|
||||
@*@items.Value*@
|
||||
<a onclick="DataContent('@pid','@key')">@items.Value</a>
|
||||
|
||||
</td>
|
||||
}
|
||||
|
||||
</tr>
|
||||
}
|
||||
@foreach (var items in item)
|
||||
{
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
@items.today (@DateTime.Parse(items.today).ToString("ddd"))
|
||||
</td>
|
||||
|
||||
@foreach (var dic in items.StaAndNum)
|
||||
{
|
||||
<td>
|
||||
@if (dic.Value != 0)
|
||||
{
|
||||
var key = dic.Key;
|
||||
var pid=item.FirstOrDefault(c => c.ProductID != 0).ProductID;
|
||||
<a onclick="DataContent('@pid','@key','@items.today')">@dic.Value</a>
|
||||
}
|
||||
else
|
||||
{
|
||||
@dic.Value
|
||||
}
|
||||
|
||||
</td>
|
||||
}
|
||||
</tr>
|
||||
}
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<h3>暂无数据</h3>
|
||||
}
|
||||
|
||||
@*跳转到机型查询*@
|
||||
<script>
|
||||
function DataContent(Ji, Zhan, time) {
|
||||
console.log(time);
|
||||
if (time != null) {
|
||||
var startTime = time;
|
||||
var endTime = time;
|
||||
}
|
||||
else {
|
||||
var startTime = $("#start").bind().val();
|
||||
var endTime = $("#end").bind().val();
|
||||
}
|
||||
|
||||
localStorage.setItem("select_oy_Ji", Ji);
|
||||
localStorage.setItem("select_oy_Zhan", Zhan);
|
||||
localStorage.setItem("select_oy_end", endTime);
|
||||
localStorage.setItem("select_oy_start", startTime);
|
||||
var link = "/App/SelProduct/SnTestList";
|
||||
window.location.href = link;
|
||||
}
|
||||
|
||||
</script>
|
||||
211
AUTS.Web/Areas/App/Views/Home/_ServiceList.cshtml
Normal file
211
AUTS.Web/Areas/App/Views/Home/_ServiceList.cshtml
Normal file
@@ -0,0 +1,211 @@
|
||||
@{ List<AUTS.Domain.Entities.TBL_UTS_Manage_DataServiceList>
|
||||
ServiceList = AUTS.Services.Manager.TestLogs.GetServiceAppList(ViewBag.id); // 设备
|
||||
|
||||
List<AUTS.Domain.Entities.TBL_UTS_Manage_AppList> AppListAll = AUTS.Services.Manager.TestLogs.GetAppList();
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
<div class="row" style="background-color: #ffffff;padding:5px;">
|
||||
<div style="display:flex;flex-wrap:wrap;">
|
||||
<div style="flex:8;">
|
||||
<span onclick="showservicelist('0');">当前共有 @(ServiceList==null?0: ServiceList.Count),</span>
|
||||
<span onclick="showservicelist('1');">在线 @(ServiceList==null?0: ServiceList.Where(x=>x.IsOnline==true).Count()),</span>
|
||||
<span onclick="showservicelist('2');">离线 @(ServiceList==null?0: ServiceList.Where(x=>x.IsOnline==false).Count())。</span>
|
||||
</div>
|
||||
<div style="flex:3;text-align:right;">
|
||||
<span class="text-muted"> @(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss dddd"))</span>
|
||||
@*<span class="text-muted"> @(DateTime.Now.ToString("hh")):@(DateTime.Now.ToString("mm"))</span>*@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="ServiceList" style="display: none;">
|
||||
|
||||
@if (ServiceList != null)
|
||||
{
|
||||
foreach (var item in ServiceList)
|
||||
{
|
||||
@* 不在线设备 *@
|
||||
if (!item.IsOnline)
|
||||
{
|
||||
|
||||
<div class="col-md-4 col-xs-6 NoOnline" style="padding: 0px; display: none;">
|
||||
<div class="contact-box center-version " style="margin: 2px; padding: 5px; color: #a9a9a9;">
|
||||
<span style="display:inline-block; font-size:14px;width:90%;font-weight:bold;"> @item.ID:<span style="font-size:1px;">@item.TerminalAlias</span></span>
|
||||
|
||||
@{
|
||||
if (AppListAll.Where(x => x.ServiceID == item.ID).Count() > 0)
|
||||
{
|
||||
<span style="font-size: 2px;"> @(AppListAll.Where(x => x.ServiceID == item.ID).Last().AppName):</span>
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
<br />
|
||||
}
|
||||
}
|
||||
|
||||
@{
|
||||
if (AppListAll.Where(x => x.ServiceID == item.ID).Count() > 0)
|
||||
{
|
||||
if (AppListAll.Where(x => x.ServiceID == item.ID).Last().LastInfomation != null)
|
||||
{
|
||||
string[] strtext = AppListAll.Where(x => x.ServiceID == item.ID).Last().LastInfomation.Split(',');
|
||||
if (strtext.Count() > 3)
|
||||
{
|
||||
<span style="font-size: 2px;">
|
||||
@{
|
||||
if (strtext[3].ToString() == "Status:Testing")
|
||||
{
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard-pulse" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M10 1.5a.5.5 0 0 0-.5-.5h-3a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-1Zm-5 0A1.5 1.5 0 0 1 6.5 0h3A1.5 1.5 0 0 1 11 1.5v1A1.5 1.5 0 0 1 9.5 4h-3A1.5 1.5 0 0 1 5 2.5v-1Zm-2 0h1v1H3a1 1 0 0 0-1 1V14a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V3.5a1 1 0 0 0-1-1h-1v-1h1a2 2 0 0 1 2 2V14a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V3.5a2 2 0 0 1 2-2Zm6.979 3.856a.5.5 0 0 0-.968.04L7.92 10.49l-.94-3.135a.5.5 0 0 0-.895-.133L4.232 10H3.5a.5.5 0 0 0 0 1h1a.5.5 0 0 0 .416-.223l1.41-2.115 1.195 3.982a.5.5 0 0 0 .968-.04L9.58 7.51l.94 3.135A.5.5 0 0 0 11 11h1.5a.5.5 0 0 0 0-1h-1.128L9.979 5.356Z" />
|
||||
</svg>
|
||||
}
|
||||
else if (strtext[3].ToString() == "Status:Idle")
|
||||
{
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard-x" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M6.146 7.146a.5.5 0 0 1 .708 0L8 8.293l1.146-1.147a.5.5 0 1 1 .708.708L8.707 9l1.147 1.146a.5.5 0 0 1-.708.708L8 9.707l-1.146 1.147a.5.5 0 0 1-.708-.708L7.293 9 6.146 7.854a.5.5 0 0 1 0-.708z" />
|
||||
<path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z" />
|
||||
<path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z" />
|
||||
</svg>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
:</span>
|
||||
<span style="text-align: right; display: inline-block; font-size: 14px; width:5%;">(@(item.CacheCount ?? 0))</span>
|
||||
<br />
|
||||
}
|
||||
else
|
||||
{
|
||||
<span style="font-size: 2px;">无状况:</span>
|
||||
<span style="text-align: right; display: inline-block; font-size: 14px; width:5%;">(@(item.CacheCount ?? 0))</span>
|
||||
<br />
|
||||
}
|
||||
<span style="font-size: 2px;">@strtext[0].Remove(0,3):@strtext[1].Remove(0, 3 )</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span style="font-size: 2px;">无状况:</span>
|
||||
<span>
|
||||
<span style="text-align: right; display: inline-block; font-size: 14px; width:5%;">(@(item.CacheCount ?? 0))</span>
|
||||
</span>
|
||||
<br />
|
||||
<span style="font-size: 2px;">空</span>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<span style="font-size: 2px;">无状况:</span>
|
||||
<span>
|
||||
<span style="text-align: right; display: inline-block; font-size: 14px; width:5%;">(@(item.CacheCount ?? 0))</span>
|
||||
</span>
|
||||
<br />
|
||||
<span style="font-size: 2px;">空</span>
|
||||
}
|
||||
}
|
||||
@*@(strtext = AppListAll.Where(x => x.ServiceID == item.ID).Where(j => j.LastActiveDateTime > DateTime.Now.AddMinutes(5)).Last().LastInfomation.Split(','))*@
|
||||
|
||||
|
||||
@*<span style="font-size: 2px;">@(AppListAll.SingleOrDefault(x=>x.ServiceID== 51).LastInfomation) </span>*@
|
||||
<br />
|
||||
<span style="font-size: 10px;"> @(item.NetworkNeiborhood == null || item.NetworkNeiborhood.Length <= 0 ? "-" : item.NetworkNeiborhood ) </span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@* 在线设备 *@
|
||||
else
|
||||
{
|
||||
<div class="col-md-4 col-xs-6 Online" style="padding: 0px;display:none;">
|
||||
|
||||
<div class="contact-box center-version " style="margin: 2px; padding: 5px; color: green;">
|
||||
<span style="display:inline-block; font-size:14px;width:90%;font-weight:bold;"> @item.ID:<span style="font-size:1px;">@item.TerminalAlias</span></span>
|
||||
|
||||
@{
|
||||
if (AppListAll.Where(x => x.ServiceID == item.ID).Count() > 0)
|
||||
{
|
||||
<span style="font-size: 2px;"> @(AppListAll.Where(x => x.ServiceID == item.ID).Last().AppName):</span>
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
<br />
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@{
|
||||
if (AppListAll.Where(x => x.ServiceID == item.ID).Count() > 0)
|
||||
{
|
||||
if (AppListAll.Where(x => x.ServiceID == item.ID).Last().LastInfomation != null)
|
||||
{
|
||||
string[] strtext = AppListAll.Where(x => x.ServiceID == item.ID).Last().LastInfomation.Split(',');
|
||||
if (strtext.Count() > 3)
|
||||
{
|
||||
<span style="font-size: 2px;">
|
||||
@{
|
||||
if (strtext[3].ToString() == "Status:Testing")
|
||||
{
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard-pulse" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M10 1.5a.5.5 0 0 0-.5-.5h-3a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-1Zm-5 0A1.5 1.5 0 0 1 6.5 0h3A1.5 1.5 0 0 1 11 1.5v1A1.5 1.5 0 0 1 9.5 4h-3A1.5 1.5 0 0 1 5 2.5v-1Zm-2 0h1v1H3a1 1 0 0 0-1 1V14a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V3.5a1 1 0 0 0-1-1h-1v-1h1a2 2 0 0 1 2 2V14a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V3.5a2 2 0 0 1 2-2Zm6.979 3.856a.5.5 0 0 0-.968.04L7.92 10.49l-.94-3.135a.5.5 0 0 0-.895-.133L4.232 10H3.5a.5.5 0 0 0 0 1h1a.5.5 0 0 0 .416-.223l1.41-2.115 1.195 3.982a.5.5 0 0 0 .968-.04L9.58 7.51l.94 3.135A.5.5 0 0 0 11 11h1.5a.5.5 0 0 0 0-1h-1.128L9.979 5.356Z" />
|
||||
</svg>
|
||||
}
|
||||
else if (strtext[3].ToString() == "Status:Idle")
|
||||
{
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard-x" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M6.146 7.146a.5.5 0 0 1 .708 0L8 8.293l1.146-1.147a.5.5 0 1 1 .708.708L8.707 9l1.147 1.146a.5.5 0 0 1-.708.708L8 9.707l-1.146 1.147a.5.5 0 0 1-.708-.708L7.293 9 6.146 7.854a.5.5 0 0 1 0-.708z" />
|
||||
<path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z" />
|
||||
<path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z" />
|
||||
</svg>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
:
|
||||
</span>
|
||||
<span style="text-align: right; display: inline-block; font-size: 14px; width:5%;">(@(item.CacheCount ?? 0))</span>
|
||||
<br />
|
||||
}
|
||||
else
|
||||
{
|
||||
<span style="font-size: 2px;">无状况:</span>
|
||||
<span style="text-align: right; display: inline-block; font-size: 14px; width:5%;">(@(item.CacheCount ?? 0))</span>
|
||||
<br />
|
||||
}
|
||||
<span style="font-size: 2px;">@strtext[0].Remove(0, 3):@strtext[1].Remove(0, 3)</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span style="font-size: 2px;">无状况:</span>
|
||||
<span>
|
||||
<span style="text-align: right; display: inline-block; font-size: 14px; width:5%;">(@(item.CacheCount ?? 0))</span>
|
||||
</span>
|
||||
<br />
|
||||
<span style="font-size: 2px;">空</span>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<span style="font-size: 2px;">无状况:</span>
|
||||
<span>
|
||||
<span style="text-align: right; display: inline-block; font-size: 14px; width:5%;">(@(item.CacheCount ?? 0))</span>
|
||||
</span>
|
||||
<br />
|
||||
<span style="font-size: 2px;">空</span>
|
||||
}
|
||||
}
|
||||
@*@(strtext = AppListAll.Where(x => x.ServiceID == item.ID).Where(j => j.LastActiveDateTime > DateTime.Now.AddMinutes(5)).Last().LastInfomation.Split(','))*@
|
||||
|
||||
|
||||
@*<span style="font-size: 2px;">@(AppListAll.SingleOrDefault(x=>x.ServiceID== 51).LastInfomation) </span>*@
|
||||
<br />
|
||||
<span style="font-size: 10px;"> @(item.NetworkNeiborhood == null || item.NetworkNeiborhood.Length <= 0 ? "-" : item.NetworkNeiborhood ) </span>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
}
|
||||
</div>
|
||||
57
AUTS.Web/Areas/App/Views/Home/_TodayProduction.cshtml
Normal file
57
AUTS.Web/Areas/App/Views/Home/_TodayProduction.cshtml
Normal file
@@ -0,0 +1,57 @@
|
||||
@model List<AUTS.Domain.ViewModels.Home.VM_TodayProduction>
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
@if (Model != null)
|
||||
{
|
||||
foreach (var item in Model.OrderByDescending(e => e.today).GroupBy(e => new { e.today, e.OInternalID }))
|
||||
{
|
||||
foreach (var items in item)
|
||||
{
|
||||
<div id="producInfo">
|
||||
<h3>@item.Key.today</h3>
|
||||
|
||||
<span>机型:<strong>@items.projectName</strong></span>
|
||||
<span>@items.describe</span>
|
||||
<span>数量:@items.number</span>
|
||||
</div>
|
||||
<div id="oInfo">
|
||||
<span>@items.Company</span>
|
||||
<span>@items.OInternalID</span>
|
||||
<span>交期:@items.deliveryTime</span>
|
||||
</div>
|
||||
break;
|
||||
}
|
||||
<table class="table table-striped table-bordered table-hover table-full-width" id="editable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>站</th>
|
||||
<th>今日目标</th>
|
||||
<th>今日产能</th>
|
||||
<th>产能率</th>
|
||||
<th>累计目标</th>
|
||||
<th>累计产能</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@foreach (var items in item)
|
||||
{
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>@items.StationName</td>
|
||||
<td>@items.ObjectiveYield</td>
|
||||
<td>@items.testLog</td>
|
||||
<td>@items.ratio%</td>
|
||||
<td>@items.ObjectiveYieldTotal</td>
|
||||
<td>@items.testLogTotal</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
}
|
||||
|
||||
</table>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<h5>暂无数据</h5>
|
||||
}
|
||||
82
AUTS.Web/Areas/App/Views/Home/_TodayProductions.cshtml
Normal file
82
AUTS.Web/Areas/App/Views/Home/_TodayProductions.cshtml
Normal file
@@ -0,0 +1,82 @@
|
||||
@model List<AUTS.Domain.ViewModels.Home.VM_TodayProduction>
|
||||
@{
|
||||
Layout = null;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@if (Model != null&& Model.Count>0)
|
||||
{
|
||||
foreach (var item in Model.OrderByDescending(e => e.today).GroupBy(e => e.OInternalID))
|
||||
{
|
||||
int[] CapacityTotals = new int[12];
|
||||
int c = 0;
|
||||
foreach (var items in item)
|
||||
{
|
||||
if (c == 0)
|
||||
{
|
||||
<div id="producInfo">
|
||||
|
||||
<span>M/O:<strong>@items.OInternalID</strong></span>
|
||||
<span>机型:<strong>@items.projectName</strong></span>
|
||||
@*<span>@items.describe</span>*@
|
||||
<span>数量:<strong>@items.number</strong></span>
|
||||
<span>状态:<strong>@items.OrderStatus</strong></span>
|
||||
</div>
|
||||
<div id="oInfo">
|
||||
<span><strong>@items.Company</strong></span>
|
||||
<span>交期:<strong>@items.deliveryTime</strong></span>
|
||||
</div>
|
||||
break;
|
||||
}
|
||||
}
|
||||
<table class="table table-striped table-bordered table-hover table-full-width" id="editable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>日期</th>
|
||||
|
||||
@foreach (var items in item)
|
||||
{
|
||||
if (c == 0)
|
||||
{
|
||||
@*<th>订单号</th>*@
|
||||
c++;
|
||||
for (int i = 0; i < items.StationNames.Length; i++)
|
||||
{
|
||||
<th>@items.StationNames[i]</th>
|
||||
}
|
||||
}
|
||||
}
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach (var items in item)
|
||||
{
|
||||
<tr>
|
||||
<td>@items.today</td>
|
||||
@for (int i = 0; i < items.CapacityNum.Length; i++)
|
||||
{
|
||||
CapacityTotals[i]+=items.CapacityNum[i];
|
||||
c = items.CapacityNum.Length;
|
||||
<td>@items.CapacityNum[i]</td>
|
||||
}
|
||||
</tr>
|
||||
|
||||
}
|
||||
<tr>
|
||||
<td>总数</td>
|
||||
@for (int i = 0; i < c; i++)
|
||||
{
|
||||
if (CapacityTotals[i] >= 0)
|
||||
{
|
||||
<td>@CapacityTotals[i]</td>
|
||||
}
|
||||
}
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
}
|
||||
}
|
||||
98
AUTS.Web/Areas/App/Views/Login/Index.cshtml
Normal file
98
AUTS.Web/Areas/App/Views/Login/Index.cshtml
Normal file
@@ -0,0 +1,98 @@
|
||||
|
||||
@{
|
||||
/**/
|
||||
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
@*<title>AUTS-DATA | 登录</title>*@
|
||||
<title>英皓思科技uts数据服务系统</title>
|
||||
|
||||
|
||||
<link href="~/Theme/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="~/Theme/font-awesome/css/font-awesome.css" rel="stylesheet">
|
||||
|
||||
<!-- 插件消息框样式 https://gitee.com/wispx/toastr -->
|
||||
<link href="~/Theme/css/plugins/toastr/toastr.min.css" rel="stylesheet">
|
||||
|
||||
<link href="~/Theme/css/animate.css" rel="stylesheet">
|
||||
<link href="~/Theme/css/style.css" rel="stylesheet">
|
||||
|
||||
<!-- Mainly scripts -->
|
||||
<script src="~/Theme/js/jquery-2.1.1.js"></script>
|
||||
|
||||
<script src="~/Theme/js/bootstrap.min.js"></script>
|
||||
<script src="~/Theme/js/jquery.cookie.js"></script>
|
||||
<script src="~/Theme/js/jquery.form.min.js"></script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
var rem = $.cookie('remember');
|
||||
if (rem) {
|
||||
$("#remember").prop("checked", true);
|
||||
$("#username").val($.cookie("username"));
|
||||
$("#password").val($.cookie("password"));
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="gray-bg" >
|
||||
|
||||
<div class="middle-box loginscreen animated fadeInDown">
|
||||
<div>
|
||||
<div class="text-center">
|
||||
|
||||
<h1 class="logo-name" style="font-size:40px;letter-spacing:inherit;">英皓思科技</h1>
|
||||
<h1 class="logo-name" style="font-size:40px; letter-spacing:inherit;">uts数据服务</h1>
|
||||
</div>
|
||||
|
||||
<form class="m-t" role="form" id="loginForm">
|
||||
<div class="form-group">
|
||||
<input type="text" name="username" id="username" class="form-control" placeholder="请输入用户名" @*autocomplete="off"*@>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="password" name="password" id="password" class="form-control" placeholder="请输入密码" @*autocomplete="new-password"*@>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="i-checks"><label> <input type="checkbox" id="remember"><i></i> 记住密码 </label></div>
|
||||
|
||||
</div>
|
||||
<button type="button" id="btnlogin" class="btn btn-primary block full-width m-b">登 录</button>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 text-center m-t-lg m-b-lg">
|
||||
<p><strong>© 2021 AUTS</strong><br />v 2.0</p>
|
||||
</div>
|
||||
</div>
|
||||
<div style="z-index: 1000; background: #f5f5f5; width: 100vw; padding:10px 0; text-align: center; bottom:0px; ">
|
||||
<div target="_blank" style="height: 24px; line-height: 24px; color: #666;">版权所有 ©<a href="">东莞市英皓思科技有限公司</a></div>
|
||||
<a target="_blank" style="height: 24px; line-height: 24px; color: #666; " href="https://beian.miit.gov.cn/">粤ICP备2020111566号</a>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
<!-- Toastr 插件消息框样式 https://gitee.com/wispx/toastr -->
|
||||
<script src="~/Theme/js/plugins/toastr/toastr.min.js"></script>
|
||||
|
||||
<script src="~/Plugin/login.min.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
200
AUTS.Web/Areas/App/Views/Order/OrderInternalList.cshtml
Normal file
200
AUTS.Web/Areas/App/Views/Order/OrderInternalList.cshtml
Normal file
@@ -0,0 +1,200 @@
|
||||
@model List<AUTS.Domain.ViewModels.VM_OrderInternalList>
|
||||
@{
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
List<AUTS.Domain.Entities.TBL_StationList> stationList = AUTS.Services.Cache.CacheHelp.GetUserDBStationList();//工艺站
|
||||
List<AUTS.Domain.Entities.TBL_Customer> CompanyList = AUTS.Services.Cache.CacheHelp.GetUserDBCustomerList();//公司
|
||||
List<AUTS.Domain.Entities.TBL_Project> projectList = AUTS.Services.Cache.CacheHelp.GetUserDBProjectList();//机型
|
||||
List<AUTS.Domain.Entities.TBL_UTS_Manage_OrderStatus> StatusList = AUTS.Services.Cache.CacheHelp.GetUserDBOrderStatusLis();//状态
|
||||
}
|
||||
|
||||
<link href="~/Theme/css/plugins/sweetalert/sweetalert.css" rel="stylesheet" />
|
||||
<style>
|
||||
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
|
||||
border: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.order {
|
||||
border-top: solid 2px #ddd;
|
||||
}
|
||||
|
||||
select.form-control {
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
.drop-down {
|
||||
border-bottom: 1px #ddd solid;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="row wrapper border-bottom white-bg page-heading">
|
||||
<div class="col-lg-10">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<a href="@Url.Action("Index", "Home")">主页</a>
|
||||
</li>
|
||||
<li>
|
||||
<a>订单管理</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<strong>M/O列表</strong>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight">
|
||||
<div class="row">
|
||||
<div class="col-sm-8" style="padding:0px;">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>M/O列表(<span class="dataCount">@ViewBag.dataCount</span>)</h5>
|
||||
<div class="ibox-tools">
|
||||
<button class="btn btn-sm btn-warning" type="button" onclick="updateCommonCache('@Url.Action("ClearOInternalList", "order")','@Url.Action("OrderInternalList", "Order")')">更新M/O</button>
|
||||
<button class="btn btn-sm btn-primary" type="button" id="btnaddPLine" onclick="gotoCommonPartial('@Url.Action("OrderInternalDetails", "Order")','orderInternalBox_Content')"><a href="#orderInternalBox_Content" style="color:white;">添加内部单</a></button>
|
||||
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content" style="padding:0px;">
|
||||
@*下拉框*@
|
||||
<div class="drop-down">
|
||||
<nav style="text-align:center;">
|
||||
|
||||
@*公司*@
|
||||
<select id="CompanyList" class="form-control" onchange="queryInfo('@Url.Action("PageInternalList", "Order")')" style="display:inline;width:100px;">
|
||||
<option value="0">所有客户</option>
|
||||
@if (CompanyList != null)
|
||||
{
|
||||
foreach (var item in CompanyList)
|
||||
{
|
||||
<option value="@item.ID">@item.CustomerAbbr</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
@*机型*@
|
||||
<select id="projectList" class="form-control" onchange="queryInfo('@Url.Action("PageInternalList", "Order")')" style="display:inline;width:100px;">
|
||||
<option value="0">所有机型</option>
|
||||
|
||||
@if (projectList != null)
|
||||
{
|
||||
foreach (var item in projectList.OrderBy(e => e.ProjectName))
|
||||
{
|
||||
<option value="@item.ID">@item.ProjectName</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
@*状态*@
|
||||
<select id="StatusList" class="form-control" onchange="queryInfo('@Url.Action("PageInternalList", "Order")')" style="display:inline;width:100px;">
|
||||
<option value="0">所有状态</option>
|
||||
@if (StatusList != null)
|
||||
{
|
||||
foreach (var item in StatusList)
|
||||
{
|
||||
<option value="@item.ID">@item.StatusName</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="table-responsive" id="orderData">
|
||||
|
||||
<!--table-->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4" id="orderInternalBox_Content">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="~/Theme/js/plugins/sweetalert/sweetalert.min.js"></script>
|
||||
<script src="~/Plugin/allPages.js"></script>
|
||||
<script src="~/Plugin/OrderInternalList.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
var url = window.location.href;
|
||||
var index = url.indexOf("Status");
|
||||
var str;
|
||||
if (index != -1) {
|
||||
str = url.substring(url.lastIndexOf("=") + 1, url.length);
|
||||
}
|
||||
if (str == null || str == undefined) {
|
||||
str = 0;
|
||||
}
|
||||
$("#StatusList").val(str);
|
||||
qureyData('/App/Order/PageInternalList', 0, 20, 0);
|
||||
}
|
||||
|
||||
function qureyData(url, min, max, colorIndex) {
|
||||
var company = $("#CompanyList").val();
|
||||
var projectID = $("#projectList").val();//产品
|
||||
var statusID = $("#StatusList").val();
|
||||
var property = $("#ValidProduct").val();
|
||||
var pType = $("#ProductType").val();
|
||||
var search = $("#searchData").val();
|
||||
var search = $("#searchData").val();
|
||||
var search = $("#searchData").val();
|
||||
var Customer = $("#Customer").val();//不良品
|
||||
var inquire = $("#inquire").val();//单号
|
||||
var verdict = $('#verdict').val();//判断是当天,3天,7天,30天
|
||||
var SN = $('#BarCode').val();//SN号或者订单号
|
||||
var project = $('#projectid').val();//维修类型
|
||||
var Station = $("select[name = 'StationID']").val();//站位
|
||||
var startTime = $('#start').bind().val();//起始时间
|
||||
var EndTime = $('#end').bind().val();//结束时间
|
||||
var Userid = $('#Userid').val();//操作人
|
||||
var data = {
|
||||
OInteriorID: "1",
|
||||
OrderNo: "2",
|
||||
ProjectID: projectID,
|
||||
CustomerAbbr: company,
|
||||
OStatus: statusID,
|
||||
dataMin: min,
|
||||
dataMax: max,
|
||||
Property: property,
|
||||
ProductType: pType,
|
||||
Search: search,
|
||||
company: Customer,
|
||||
inquire: inquire,
|
||||
Day: verdict,
|
||||
Snmark: SN,
|
||||
repair: project,
|
||||
StationID: Station,
|
||||
startTime: startTime,
|
||||
EndTime: EndTime,
|
||||
CustomerAbbr: Userid
|
||||
};
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: "post",
|
||||
data: JSON.stringify(data),
|
||||
contentType: 'application/json',
|
||||
async: true,
|
||||
success: function (res) {
|
||||
//console.log(res);
|
||||
$("#orderData").empty();
|
||||
$("#orderData").html(res);
|
||||
$("li.pages a").eq(colorIndex).css("color", "white");//添加选中字体颜色
|
||||
$("li.pages a").eq(colorIndex).css("background-color", "#00BFFF");//添加选中背景颜色
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
178
AUTS.Web/Areas/App/Views/Order/OrderList.cshtml
Normal file
178
AUTS.Web/Areas/App/Views/Order/OrderList.cshtml
Normal file
@@ -0,0 +1,178 @@
|
||||
@model List<AUTS.Domain.ViewModels.VM_OrderList>
|
||||
@{
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
List<AUTS.Domain.Entities.TBL_Customer> CompanyList = AUTS.Services.Cache.CacheHelp.GetUserDBCustomerList();//公司
|
||||
List<AUTS.Domain.Entities.TBL_Project> projectList = AUTS.Services.Cache.CacheHelp.GetUserDBProjectList();//机型
|
||||
List<AUTS.Domain.Entities.TBL_UTS_Manage_OrderStatus> StatusList = AUTS.Services.Cache.CacheHelp.GetUserDBOrderStatusLis();//状态
|
||||
|
||||
}
|
||||
@*<link href="~/Theme/css/plugins/dataTables/datatables.min.css" rel="stylesheet" />*@
|
||||
<style>
|
||||
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
|
||||
border: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.order {
|
||||
border-top: solid 2px #ddd;
|
||||
}
|
||||
select.form-control {
|
||||
padding: 6px;
|
||||
}
|
||||
.drop-down {
|
||||
border-bottom: 1px #ddd solid;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="row wrapper border-bottom white-bg page-heading">
|
||||
<div class="col-lg-10">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<a href="@Url.Action("Index", "Home")">主页</a>
|
||||
</li>
|
||||
<li>
|
||||
<a>订单管理</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<strong>P/O列表</strong>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight">
|
||||
<div class="row">
|
||||
<div class="col-sm-8" style="padding:0px;">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>P/O列表(<span class="dataCount">@ViewBag.dataCount</span>)</h5>
|
||||
<div class="ibox-tools">
|
||||
|
||||
<button class="btn btn-md btn-primary" type="button" id="btnaddPLine" onclick="gotoCommonPartialNeedDate('@Url.Action("OrderDetails", "Order")','orderBox_Content')"><a href="#orderBox_Content" style="color:white;">添加订单</a></button>
|
||||
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="ibox-content" style="padding:0px;">
|
||||
@*条件*@
|
||||
<div class="drop-down">
|
||||
<nav style="text-align:center;">
|
||||
|
||||
@*公司*@
|
||||
<select id="CompanyList" class="form-control" onchange="queryInfo('@Url.Action("GetPageData", "Order")')" style="display:inline;width:100px;">
|
||||
<option value="0">所有客户</option>
|
||||
@if (CompanyList != null)
|
||||
{
|
||||
foreach (var item in CompanyList)
|
||||
{
|
||||
<option value="@item.ID">@item.CustomerAbbr</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
@*机型*@
|
||||
<select id="projectList" class="form-control" onchange="queryInfo('@Url.Action("GetPageData", "Order")')" style="display:inline;width:100px;">
|
||||
<option value="0">所有机型</option>
|
||||
|
||||
@if (projectList != null)
|
||||
{
|
||||
foreach (var item in projectList.OrderBy(e => e.ProjectName))
|
||||
{
|
||||
<option value="@item.ID">@item.ProjectName</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
@*状态*@
|
||||
<select id="StatusList" class="form-control" onchange="queryInfo('@Url.Action("GetPageData", "Order")')" style="display:inline;width:100px;">
|
||||
<option value="0">所有状态</option>
|
||||
@if (StatusList != null)
|
||||
{
|
||||
foreach (var item in StatusList)
|
||||
{
|
||||
<option value="@item.ID">@item.StatusName</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="table-responsive" id="orderData">
|
||||
|
||||
<div>
|
||||
<nav style="text-align:center;">
|
||||
|
||||
<ul class="pagination" id="page">
|
||||
<li class="first" onclick="firstPage('/App/Order/GetPageData')"><a>«</a></li>
|
||||
<li class="left"><a>…</a></li>
|
||||
@for (int i = 0; i < ViewBag.allpage; i++)
|
||||
{
|
||||
<li class="pages" onclick="SpecifyPage(@(i),'/App/Order/GetPageData')"><a>@(i + 1)</a></li>
|
||||
}
|
||||
<li class="right"><a>…</a></li>
|
||||
<li class="finally"><a onclick="lastPage('/App/Order/GetPageData')">»</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<table class="table" id="editable">
|
||||
|
||||
@if (Model != null && Model.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < Model.Count; i++)
|
||||
{
|
||||
<tbody class="order" id="show">
|
||||
<input type="hidden" class="orderId" name="name" value="@Model[i].OrderID" />
|
||||
<tr class="list">
|
||||
<td>ID:@Model[i].OrderID</td>
|
||||
<td>P/O:<strong>@Model[i].OrderNo</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>机型:<strong style="color:#6495ED;">@Model[i].ProjectName</strong></td>
|
||||
<td>数量:@Model[i].OrderCount</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>录入日期:@Model[i].CreateTime</td>
|
||||
<td>客户:@Model[i].CustomerAbbr</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>订单交期:@Model[i].DeliveryTime</td>
|
||||
<td>订单状态:@Model[i].OrderStatus</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><button class="btn btn-xs btn-primary" type="button" id="btnaddPLine" onclick="gotoDetailPartial('@Url.Action("OrderDetails", "Order")',@Model[i].OrderID,'orderBox_Content')"><a href="#orderBox_Content" style="color:white;">修改</a></button></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4" id="orderBox_Content">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@*<script src="~/Theme/js/plugins/dataTables/datatables.min.js"></script>*@
|
||||
<script src="~/Plugin/allPages.js"></script>
|
||||
<script src="~/Plugin/orderlist.js"></script>
|
||||
|
||||
162
AUTS.Web/Areas/App/Views/Order/_OrderDetails.cshtml
Normal file
162
AUTS.Web/Areas/App/Views/Order/_OrderDetails.cshtml
Normal file
@@ -0,0 +1,162 @@
|
||||
@model AUTS.Domain.Entities.TBL_Orders
|
||||
@{
|
||||
Layout = null;
|
||||
|
||||
List<AUTS.Domain.Entities.TBL_Customer> companyList = AUTS.Services.Cache.CacheHelp.GetUserDBCustomerList();//客户列表
|
||||
|
||||
List<AUTS.Domain.Entities.TBL_Project> projectList = AUTS.Services.Cache.CacheHelp.GetUserDBProjectList();//产品列表
|
||||
|
||||
List<AUTS.Domain.Entities.TBL_UTS_Manage_OrderStatus> statusList = AUTS.Services.Cache.CacheHelp.GetUserDBOrderStatusLis();//订单状态
|
||||
|
||||
List<AUTS.Domain.Entities.TBL_ProductTypes> typeList = AUTS.Services.Cache.CacheHelp.GetUserDBProjectTypeList();//产品类型
|
||||
List<AUTS.Domain.Entities.TBL_StationList> stationList = AUTS.Services.Cache.CacheHelp.GetUserDBStationList();//工艺站
|
||||
|
||||
}
|
||||
|
||||
<link href="~/Theme/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
|
||||
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>@ViewBag.Title</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link-partial">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link-partial">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<form class="form-horizontal" id="modifyOrderForm">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">P/O</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="hidden" name="orderID" value="@Model.ID" />
|
||||
<input type="text" placeholder="请输入P/O" name="orderNo" class="form-control" value="@Model.OrderNo">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">所属客户</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<select class="form-control m-b" name="companyID">
|
||||
@if (companyList != null && companyList.Count > 0)
|
||||
{
|
||||
foreach (var item in companyList)
|
||||
{
|
||||
<option @(Model.CompanyID == item.ID ? "selected" : "" ) value="@item.ID">@item.CustomerAbbr</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">产品类型</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<select class="form-control m-b" name="ProductTypeID">
|
||||
@if (typeList != null && typeList.Count > 0)
|
||||
{
|
||||
foreach (var item in typeList.OrderBy(e => e.ProductType))
|
||||
{
|
||||
<option @(Model.ProductTypeID == item.ID ? "selected" : "" ) value="@item.ID">@item.ProductType</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">产品型号</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<select class="form-control m-b" name="productID" id="productID">
|
||||
@if (projectList != null && projectList.Count > 0)
|
||||
{
|
||||
foreach (var item in projectList.Where(e=>e.IsValid==1&&e.SnType==1).OrderBy(e => e.ProjectName))
|
||||
{
|
||||
<option @(Model.ProductID == item.ID ? "selected" : "" ) value="@item.ID">@item.ProjectName : @item.Description</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">生产数量</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="number" placeholder="请输入生产数量" name="orderCount" class="form-control" value="@Model.OrderCount">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@*<div class="form-group">
|
||||
<label class="col-md-3 control-label">序号开始</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="请输入序号开始" name="sn_Start" class="form-control" value="@Model.Sn_Start">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">序号结束</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="请输入序号结束" name="sn_End" class="form-control" value="@Model.Sn_End">
|
||||
</div>
|
||||
</div>*@
|
||||
|
||||
|
||||
<div class="form-group" id="data_delivery">
|
||||
|
||||
<label class="col-md-3 control-label">订单交期</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<div class="input-group date">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span><input type="text" name="deliveryTime" readOnly class="form-control" value="@(Model.DeliveryTime.ToString("yyyy/MM/dd"))">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-3 col-md-9">
|
||||
<button class="btn btn-md btn-primary" type="button" id="btnModifyOrder" onclick="excutedUpDate('btnModifyOrder','@Url.Action("ModifyOrder", "Order")','modifyOrderForm','@Url.Action("OrderList", "Order")')">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
$.when(
|
||||
addDatepicker(),
|
||||
$.getScript("/Plugin/basicfunc.js"),
|
||||
$.getScript("/Theme/js/jquery.form.min.js"),
|
||||
$.getScript("/Plugin/inspinia-partial.js"),
|
||||
|
||||
).done(function () {
|
||||
$('#data_delivery .input-group.date').datepicker({
|
||||
language: "zh-CN",//语言
|
||||
todayBtn: "linked",//今日按钮
|
||||
autoclose: true,//选择后关闭日期选择
|
||||
format: "yyyy/mm/dd"//日期格式
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
29
AUTS.Web/Areas/App/Views/Order/_OrderDetailsOnMO.cshtml
Normal file
29
AUTS.Web/Areas/App/Views/Order/_OrderDetailsOnMO.cshtml
Normal file
@@ -0,0 +1,29 @@
|
||||
@model AUTS.Domain.ViewModels.VM_OrderInfoOnMO
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
<div class="col-md-12">
|
||||
<table class="table small m-b-xs">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<strong>客户</strong> @Model.CustomerAbbr
|
||||
</td>
|
||||
<td>
|
||||
<strong>机型</strong> @Model.ProjectName
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<strong>数量</strong> @Model.OrderCount
|
||||
</td>
|
||||
<td>
|
||||
<strong>交期</strong> @Model.DeliveryTime
|
||||
</td>
|
||||
</tr>
|
||||
<tr></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
136
AUTS.Web/Areas/App/Views/Order/_OrderInternalDetails.cshtml
Normal file
136
AUTS.Web/Areas/App/Views/Order/_OrderInternalDetails.cshtml
Normal file
@@ -0,0 +1,136 @@
|
||||
@model AUTS.Domain.ViewModels.VM_OrderInternalDetails
|
||||
@{
|
||||
Layout = null;
|
||||
|
||||
List<AUTS.Domain.Entities.TBL_Orders> orderList = AUTS.Services.Cache.CacheHelp.GetUserDBOrderList();//订单列表
|
||||
|
||||
List<AUTS.Domain.Entities.TBL_Project> projectList = AUTS.Services.Cache.CacheHelp.GetUserDBProjectList();//产品列表
|
||||
|
||||
List<AUTS.Domain.Entities.TBL_Customer> companyList = AUTS.Services.Cache.CacheHelp.GetUserDBCustomerList();//客户列表
|
||||
|
||||
var Umodel = AUTS.Services.UserLoginHelper.CurrentUser();
|
||||
|
||||
var company = "";
|
||||
var ProjectName = "";
|
||||
}
|
||||
|
||||
<link href="~/Theme/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
|
||||
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>@ViewBag.Title</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link-partial">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link-partial">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<form class="form-horizontal" id="modifyOrderInternalForm">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">P/O</label>
|
||||
<input type="hidden" name="id" value="@Model.ID" />
|
||||
<div class="col-md-9">
|
||||
|
||||
<select class="form-control m-b" name="orderID" id="orderID">
|
||||
@if (Model.OrdersList != null && Model.OrdersList.Count > 0)
|
||||
{
|
||||
foreach (var item in Model.OrdersList.OrderByDescending(e=>e.ID))
|
||||
{
|
||||
<option @(Model.OrderID == item.ID ? "selected" : "" ) value="@item.ID">@item.OrderNo : @(ProjectName = projectList.Single(e => e.ID == item.ProductID).ProjectName) : @(company = companyList.Single(e => e.ID == item.CompanyID).CustomerAbbr)</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">M/O</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="请输入M/O" name="internalNo" class="form-control" value="@Model.InternalNo">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">产品型号</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<label class="projectName control-label"></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">客户</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<label class="Company control-label">@Model.Company</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">订单交期</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<label class="DeliveryTime control-label">@Model.DeliveryTime</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">数量</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="请输入数量" name="ObjectiveYield" class="form-control ObjectiveYield" value="@Model.ObjectiveYield">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" style="@(Umodel.SetBarCode!=true?"display:none;":"")">
|
||||
<label class="col-md-3 control-label">工艺站</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="hidden" name="number" class="number" />
|
||||
<input type="hidden" name="Station" class="stationList" value="@Model.StationList" />
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>工序</th>
|
||||
<th>工序说明</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="stationList"></tbody>
|
||||
|
||||
</table>
|
||||
<span>勾选后将自动生成条码</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-3 col-md-9">
|
||||
<button class="btn btn-md btn-primary" type="button" id="btnModifyOrderInternal" onclick="excutedUpDate('btnModifyOrderInternal','@Url.Action("ModifyOrderInternal", "Order")','modifyOrderInternalForm','@Url.Action("OrderInternalList", "Order")')">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@*<div class="form-group" id="OrderDetailsBox">
|
||||
@Html.Partial("../Order/_OrderDetailsOnMO", Model.OrderInfoOnMO)
|
||||
</div>*@
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
$.getScript("/Plugin/basicfunc.js");
|
||||
$.getScript("/Theme/js/jquery.form.min.js");
|
||||
$.getScript("/Plugin/inspinia-partial.js");
|
||||
$.getScript("/Plugin/OInternalListDetails.js");
|
||||
|
||||
</script>
|
||||
@*<script src="~/Plugin/OrderDetails.js"></script>*@
|
||||
221
AUTS.Web/Areas/App/Views/Order/_OrderInternalList.cshtml
Normal file
221
AUTS.Web/Areas/App/Views/Order/_OrderInternalList.cshtml
Normal file
@@ -0,0 +1,221 @@
|
||||
@model List<AUTS.Domain.ViewModels.VM_OrderInternalList>
|
||||
@{
|
||||
Layout = null;
|
||||
List<AUTS.Domain.Entities.TBL_StationList> stationList = AUTS.Services.Cache.CacheHelp.GetUserDBStationList();//工艺站
|
||||
List<AUTS.Domain.Entities.TBL_UTS_Manage_OrderStatus> StatusList = AUTS.Services.Cache.CacheHelp.GetUserDBOrderStatusLis();//状态
|
||||
var Umodel = AUTS.Services.UserLoginHelper.CurrentUser();
|
||||
string DBNAME = ViewBag.dbname;
|
||||
|
||||
}
|
||||
<style>
|
||||
.status {
|
||||
display: inline;
|
||||
}
|
||||
td {
|
||||
width: 25%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<input type="hidden" name="name" value="@ViewBag.dataCount" id="dataCount" />
|
||||
<div>
|
||||
<nav style="text-align:center;">
|
||||
<ul class="pagination" id="page">
|
||||
<li class="first" onclick="firstPage('/App/Order/PageInternalList')"><a>«</a></li>
|
||||
<li class="left"><a>…</a></li>
|
||||
@for (int i = 0; i < ViewBag.allpage; i++)
|
||||
{
|
||||
<li class="pages" onclick="SpecifyPage(@(i),'/App/Order/PageInternalList')"><a>@(i + 1)</a></li>
|
||||
}
|
||||
<li class="right"><a>…</a></li>
|
||||
<li class="finally"><a onclick="lastPage('/App/Order/PageInternalList')">»</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<table class="table" id="editable">
|
||||
|
||||
@if (Model != null && Model.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < Model.Count; i++)
|
||||
{
|
||||
<tbody class="order" id="show">
|
||||
<input type="hidden" class="ID" name="name" value="@Model[i].ID" />
|
||||
<input type="hidden" class="ProjectID" name="name" value="@Model[i].ProjectID" />
|
||||
<tr class="list">
|
||||
<td>ID:@Model[i].ID</td>
|
||||
<td>M/O:<strong>@Model[i].InternalNo</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>机型:<strong style="color:#6495ED;"><a onclick="GoToUrl('@Model[i].ProjectName')">@Model[i].ProjectName</a></strong></td>
|
||||
<td>P/O:<strong>@Model[i].OrderNo</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>客户:@Model[i].CustomerAbbr</td>
|
||||
<td>数量:@Model[i].OrderCount</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
SN:@if (Model[i].Sn_StartEnd != null)
|
||||
{
|
||||
<span class="BarCode"> @Model[i].Sn_StartEnd.Replace(",", "\r\n")</span>
|
||||
}
|
||||
</td>
|
||||
@*<td>
|
||||
SN:@Model[i].Sn_StartEnd
|
||||
</td>*@
|
||||
<td>录入日期:@Model[i].CreateTime</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>当前状态:@Model[i].OrderStatus</td>
|
||||
<td>订单交期:@Model[i].DeliveryTime</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="BorCode">
|
||||
条码站:
|
||||
@if (stationList.Count > 0 && stationList != null)
|
||||
{
|
||||
for (int j = 0; j < stationList.Count; j++)
|
||||
{
|
||||
if (Model[i].ProjectID == stationList[j].ProjectID)
|
||||
{
|
||||
if (Model[i].StationList != null && Model[i].StationList != "")
|
||||
{
|
||||
if (Model[i].StationList.Contains(stationList[j].StationName))
|
||||
{
|
||||
<span style="color:blue;">@stationList[j].StationName,</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span style="color:black;">@stationList[j].StationName,</span>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<span style="color:black;">@stationList[j].StationName,</span>
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
<span style="color:black;">....</span>
|
||||
@*foreach (var item in stationList)
|
||||
{
|
||||
if (Model[i].ProjectID == item.ProjectID)
|
||||
{
|
||||
if (Model[i].StationList != null && Model[i].StationList != "")
|
||||
{
|
||||
if (Model[i].StationList.Contains(item.StationName))
|
||||
{
|
||||
<span style="color:blue;">@item.StationName,</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span style="color:black;">@item.StationName,</span>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<span style="color:black;">@item.StationName,</span>
|
||||
|
||||
}
|
||||
}
|
||||
}*@
|
||||
}
|
||||
<input type="hidden" class="StationList" value="@Model[i].StationList" />
|
||||
</td>
|
||||
<td>
|
||||
@if (Umodel.AccountBill)
|
||||
{
|
||||
if (DBNAME != "uts_ZongQing")
|
||||
{
|
||||
<button class="btn btn-xs btn-primary" type="button" id="btnaddPLine" onclick="gotoDetailPartial('@Url.Action("OrderInternalDetails", "Order")',@Model[i].ID,'orderInternalBox_Content')"><a href="#orderInternalBox_Content" style="color:white;">修改</a></button>
|
||||
}
|
||||
if (Model[i].OrderStatus != "已转MO" && Model[i].OrderStatus != "已分配条码" && Model[i].OrderStatus != "已排产")
|
||||
{
|
||||
<button class="btn btn-xs btn-primary" disabled="disabled" type="button" id="btnCloseOrder">开始生产</button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button class="btn btn-xs btn-primary" type="button" id="btnCloseOrder" onclick="production(@Model[i].ID,'@Model[i].InternalNo')">开始生产</button>
|
||||
}
|
||||
if (Model[i].OrderStatus == "已结单")
|
||||
{
|
||||
<button class="btn btn-xs btn-primary" disabled="disabled" type="button" id="btnCloseOrder">已结单</button>
|
||||
}
|
||||
else if (Model[i].OrderStatus == "已转MO" || Model[i].OrderStatus == "已分配条码" || Model[i].OrderStatus == "已排产")
|
||||
{
|
||||
<button class="btn btn-xs btn-primary" disabled="disabled" type="button" id="btnCloseOrder">结单</button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button class="btn btn-xs btn-primary" type="button" id="btnCloseOrder" onclick="btnCloseOrder(@Model[i].ID,'@Model[i].InternalNo')">结单</button>
|
||||
}
|
||||
<button class="btn btn-xs btn-primary" type="button" id="btnGetData" onclick="btnGetData(@Model[i].ID,@Model[i].ProjectID)">查看数据</button>
|
||||
@*@if (Umodel.UserName == "UTS_RD_Manager")
|
||||
{
|
||||
<button class="btn btn-xs btn-primary" type="button" id="btnGetData" onclick="btnUpData(@Model[i].ID,@Model[i].ProjectID)">更新数据</button>
|
||||
}*@
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
<button class="btn btn-xs btn-primary" type="button" id="btnaddPLine" disabled="disabled">修改</button>
|
||||
|
||||
<button class="btn btn-xs btn-primary" disabled="disabled" type="button" id="btnCloseOrder">开始生产</button>
|
||||
|
||||
<button class="btn btn-xs btn-primary" disabled="disabled" type="button" id="btnCloseOrder">结单</button>
|
||||
|
||||
<button class="btn btn-xs btn-primary" disabled="disabled" type="button" id="btnGetData" onclick="btnGetData(@Model[i].ID,@Model[i].ProjectID)">查看数据</button>
|
||||
|
||||
}
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@*<tr>
|
||||
<td colspan="2">
|
||||
<div style="display:inline">
|
||||
<button class="btn btn-default btn-circle" type="button">
|
||||
0
|
||||
</button>
|
||||
</div>
|
||||
@foreach (var item in StatusList)
|
||||
{
|
||||
if (item.StatusID != 99)
|
||||
{
|
||||
<div style="display:inline">
|
||||
<button class="btn btn-default btn-circle" type="button">
|
||||
@item.StatusID
|
||||
</button>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div style="display:inline">
|
||||
<span>P/O录入</span>
|
||||
</div>
|
||||
@foreach (var item in StatusList)
|
||||
{
|
||||
if (item.StatusID != 99)
|
||||
{
|
||||
<div style="display:inline">
|
||||
<span> @item.StatusName</span>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
</td>
|
||||
</tr>*@
|
||||
</tbody>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
<script src="~/Plugin/allPages.js"></script>
|
||||
<script src="~/Plugin/OrderInternalList.js"></script>
|
||||
@@ -0,0 +1,39 @@
|
||||
@model List<AUTS.Web.Areas.App.Controllers.OrderController.MOProductAmount>
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
<!--
|
||||
<tr>
|
||||
<th>选择</th>
|
||||
<th>MO订单</th>
|
||||
<th>状态</th>
|
||||
<th>MO订单数量</th>
|
||||
<th>已完成数量</th>
|
||||
<th>已出货数量</th>
|
||||
<th>已完成未出货数量</th>
|
||||
</tr>
|
||||
-->
|
||||
|
||||
@if (Model != null && Model.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < Model.Count; i++)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input id="checkbox_MOItem_@i" name="MOItem_In_CreateShippingCode" value="MO|@Model[i].InternalNo|@Model[i].AmountOfMadeNotShipped" type="checkbox" onclick="checkboxMOItemOnclick(this)">
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
<td>@Model[i].InternalNo</td>
|
||||
<td>@Model[i].OrderStatus</td>
|
||||
<td>@Model[i].ObjectiveYield</td>
|
||||
<td>@Model[i].AmountOfMade</td>
|
||||
<td>@Model[i].AmountOfShipped</td>
|
||||
<td>@Model[i].AmountOfMadeNotShipped</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
|
||||
61
AUTS.Web/Areas/App/Views/Order/_OrderList.cshtml
Normal file
61
AUTS.Web/Areas/App/Views/Order/_OrderList.cshtml
Normal file
@@ -0,0 +1,61 @@
|
||||
@model List<AUTS.Domain.ViewModels.VM_OrderList>
|
||||
@{
|
||||
/**/
|
||||
|
||||
Layout = null;
|
||||
}
|
||||
<input type="hidden" name="name" value="@ViewBag.dataCount" id="dataCount" />
|
||||
<div>
|
||||
<nav style="text-align:center;">
|
||||
|
||||
<ul class="pagination" id="page">
|
||||
<li class="first" onclick="firstPage('/App/Order/GetPageData')"><a>«</a></li>
|
||||
<li class="left"><a>…</a></li>
|
||||
@for (int i = 0; i < ViewBag.allpage; i++)
|
||||
{
|
||||
<li class="pages" onclick="SpecifyPage(@(i),'/App/Order/GetPageData')"><a>@(i + 1)</a></li>
|
||||
}
|
||||
<li class="right"><a>…</a></li>
|
||||
<li class="finally"><a onclick="lastPage('/App/Order/GetPageData')">»</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<table class="table" id="editable">
|
||||
|
||||
@if (Model != null && Model.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < Model.Count; i++)
|
||||
{
|
||||
<tbody class="order" id="show">
|
||||
<input type="hidden" class="orderId" name="name" value="@Model[i].OrderID" />
|
||||
<tr class="list">
|
||||
<td>ID:@Model[i].OrderID</td>
|
||||
<td>P/O:<strong>@Model[i].OrderNo</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>机型:<strong style="color:#6495ED;">@Model[i].ProjectName</strong></td>
|
||||
<td>数量:@Model[i].OrderCount</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>录入日期:@Model[i].CreateTime</td>
|
||||
<td>客户:@Model[i].CustomerAbbr</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>订单交期:@Model[i].DeliveryTime</td>
|
||||
<td>订单状态:@Model[i].OrderStatus</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><button class="btn btn-xs btn-primary" type="button" id="btnaddPLine" onclick="gotoDetailPartial('@Url.Action("OrderDetails", "Order")',@Model[i].OrderID,'orderBox_Content')"><a href="#orderBox_Content" style="color:white;">修改</a></button></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
<script src="~/Plugin/orderlist.js"></script>
|
||||
<script src="~/Plugin/allPages.js"></script>
|
||||
|
||||
22
AUTS.Web/Areas/App/Views/Order/_OrdersInfo.cshtml
Normal file
22
AUTS.Web/Areas/App/Views/Order/_OrdersInfo.cshtml
Normal file
@@ -0,0 +1,22 @@
|
||||
@model AUTS.Domain.ViewModels.VM_OrderInfo
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
<div class="ibox-footer">
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<small class="stats-label">客户:@Model.CustomerAbbr</small>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<small class="stats-label">机型:@Model.ProjectName</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-footer">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<small class="stats-label">订单号:@Model.OrderNo</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
203
AUTS.Web/Areas/App/Views/OutputValue/OVInPPlan.cshtml
Normal file
203
AUTS.Web/Areas/App/Views/OutputValue/OVInPPlan.cshtml
Normal file
@@ -0,0 +1,203 @@
|
||||
|
||||
@{
|
||||
//Layout = null;
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
|
||||
List<AUTS.Domain.Entities.TBL_ProductionLine> pLineList = AUTS.Services.Cache.CacheHelp.GetUserDBPLineList();//产线列表
|
||||
|
||||
List<AUTS.Domain.Entities.TBL_Project> projectList = AUTS.Services.Cache.CacheHelp.GetUserDBProjectList();//产品列表
|
||||
|
||||
}
|
||||
|
||||
<link href="~/Theme/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
|
||||
|
||||
<div class="row wrapper border-bottom white-bg page-heading">
|
||||
<div class="col-lg-10">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<a href="@Url.Action("Index", "Home")">主页</a>
|
||||
</li>
|
||||
<li>
|
||||
<a>生产查询</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<strong>产值查询</strong>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight">
|
||||
<div class="row">
|
||||
<div class="col-sm-11">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>产值查询</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<form method="get" id="OVSearchForm">
|
||||
|
||||
<div class="row">
|
||||
<div class="form-inline">
|
||||
|
||||
<div class="col-sm-3">
|
||||
|
||||
<div class="input-group m-b">
|
||||
|
||||
<span class="input-group-addon">机型:</span>
|
||||
<select class="input-sm form-control input-s-sm inline" name="projectid">
|
||||
@if (projectList != null && projectList.Count > 0)
|
||||
{
|
||||
foreach (var item in projectList)
|
||||
{
|
||||
<option value="@item.ID">@item.ProjectName</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4 m-b-xs" id="data_ovform">
|
||||
<div class="input-group m-b">
|
||||
<span class="input-group-addon">时间:</span>
|
||||
<div class="input-daterange input-group" id="datepicker">
|
||||
|
||||
<input type="text" class="input-sm form-control" readOnly name="startdate" />
|
||||
<span class="input-group-addon">to</span>
|
||||
<input type="text" class="input-sm form-control" readOnly name="enddate" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-3 m-b-xs">
|
||||
<div class="input-group m-b">
|
||||
<span class="input-group-addon">产线</span>
|
||||
<select class="input-sm form-control input-s-sm inline" name="plineid">
|
||||
<option value=''></option>
|
||||
@if (pLineList != null && pLineList.Count > 0)
|
||||
{
|
||||
foreach (var item in pLineList)
|
||||
{
|
||||
<option value="@item.ID">@item.Name</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-2">
|
||||
<div class="input-group">
|
||||
<button type="button" class="btn btn-sm btn-primary" id="btnOVSearch">查询</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover dataTables-example">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>时间</th>
|
||||
<th>产线</th>
|
||||
<th>产值</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="outputValueTbody">
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4" id="plineBox_Content">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Data picker -->
|
||||
<script src="~/Theme/js/plugins/datapicker/bootstrap-datepicker.js"></script>
|
||||
<script src="~/Theme/js/plugins/datapicker/locales/bootstrap-datepicker.zh-CN.js"></script>
|
||||
|
||||
|
||||
<script>
|
||||
var url = "/Theme/js/jquery.form.min.js";
|
||||
$.getScript(url);
|
||||
|
||||
$('#data_ovform .input-daterange').datepicker({
|
||||
language: "zh-CN",//语言
|
||||
keyboardNavigation: false,
|
||||
forceParse: false,
|
||||
autoclose: true,
|
||||
format: "yyyy/mm/dd"//日期格式
|
||||
});
|
||||
|
||||
//修改会员
|
||||
$("#btnOVSearch").click(function () {
|
||||
|
||||
$("#OVSearchForm").ajaxSubmit({
|
||||
url: "/APP/OutputValue/OVInPPlanSearch",
|
||||
type: "POST",
|
||||
success: function (res) {
|
||||
|
||||
$("#outputValueTbody").empty();
|
||||
if (res.Status == 200) {
|
||||
if (res.Data) {
|
||||
var html = "";
|
||||
for (var i = 0; i < res.Data.length; i++) {
|
||||
html += '<tr><td>' + res.Data[i].ProductionTime + '</td><td>'
|
||||
+ res.Data[i].ProductionLineName + '</td><td>' + res.Data[i].OutputPrice + '</td></tr>';
|
||||
}
|
||||
$("#outputValueTbody").html(html);
|
||||
}
|
||||
else {
|
||||
$.toastr.success('暂无数据',
|
||||
{
|
||||
position: 'top-center',
|
||||
time: 1000,
|
||||
});
|
||||
}
|
||||
} else {
|
||||
|
||||
$.toastr.error('查询失败! <br />' + res.Message, {
|
||||
time: 3000,
|
||||
position: 'top-center'
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
error: function (error) {
|
||||
alert(error);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
56
AUTS.Web/Areas/App/Views/OutputValue/_SearchCondition.cshtml
Normal file
56
AUTS.Web/Areas/App/Views/OutputValue/_SearchCondition.cshtml
Normal file
@@ -0,0 +1,56 @@
|
||||
|
||||
@{
|
||||
Layout = null;
|
||||
List<AUTS.Domain.Entities.TBL_ProductionLine> pLineList = AUTS.Services.Cache.CacheHelp.GetUserDBPLineList();//产线列表
|
||||
}
|
||||
|
||||
<link href="~/Theme/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-5 m-b-xs">
|
||||
<label>
|
||||
产线:
|
||||
<select class="input-sm form-control input-s-sm inline">
|
||||
@if (pLineList != null && pLineList.Count > 0)
|
||||
{
|
||||
foreach (var item in pLineList)
|
||||
{
|
||||
<option value="@item.ID">@item.Name</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-4 m-b-xs" id="data_5">
|
||||
<div class="input-daterange input-group" id="datepicker">
|
||||
<input type="text" class="input-sm form-control" name="start" value="@(DateTime.Now.ToString("yyyy/MM/dd"))" />
|
||||
<span class="input-group-addon">to</span>
|
||||
<input type="text" class="input-sm form-control" name="end" value="@(DateTime.Now.ToString("yyyy/MM/dd"))" />
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="input-group">
|
||||
<button type="button" class="btn btn-sm btn-primary"> Go!</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Data picker -->
|
||||
<script src="~/Theme/js/plugins/datapicker/bootstrap-datepicker.js"></script>
|
||||
<script src="~/Theme/js/plugins/datapicker/locales/bootstrap-datepicker.zh-CN.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
$('#data_5 .input-daterange').datepicker({
|
||||
language: "zh-CN",//语言
|
||||
keyboardNavigation: false,
|
||||
forceParse: false,
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
</script>
|
||||
136
AUTS.Web/Areas/App/Views/PPlan/CalendarDemo.cshtml
Normal file
136
AUTS.Web/Areas/App/Views/PPlan/CalendarDemo.cshtml
Normal file
@@ -0,0 +1,136 @@
|
||||
|
||||
@{
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
|
||||
|
||||
<link href="~/Theme/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="~/Theme/font-awesome/css/font-awesome.css" rel="stylesheet">
|
||||
|
||||
<link href="~/Theme/css/plugins/iCheck/custom.css" rel="stylesheet">
|
||||
|
||||
<link href="~/Theme/css/plugins/fullcalendar/fullcalendar.css" rel="stylesheet">
|
||||
<link href="~/Theme/css/plugins/fullcalendar/fullcalendar.print.css" rel='stylesheet' media='print'>
|
||||
|
||||
<link href="~/Theme/css/animate.css" rel="stylesheet">
|
||||
<link href="~/Theme/css/style.css" rel="stylesheet">
|
||||
|
||||
<div class="col-lg-8">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="calendar.html#">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li>
|
||||
<a href="calendar.html#">Config option 1</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="calendar.html#">Config option 2</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div id="calendar"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Mainly scripts -->
|
||||
<script src="~/Theme/js/plugins/fullcalendar/moment.min.js"></script>
|
||||
<script src="~/Theme/js/jquery-2.1.1.js"></script>
|
||||
<script src="~/Theme/js/bootstrap.min.js"></script>
|
||||
<script src="~/Theme/js/plugins/metisMenu/jquery.metisMenu.js"></script>
|
||||
<script src="~/Theme/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
|
||||
|
||||
<!-- Custom and plugin javascript -->
|
||||
<script src="~/Theme/js/inspinia.js"></script>
|
||||
<script src="~/Theme/js/plugins/pace/pace.min.js"></script>
|
||||
|
||||
<!-- jQuery UI custom -->
|
||||
<script src="~/Theme/js/jquery-ui.custom.min.js"></script>
|
||||
|
||||
<!-- iCheck -->
|
||||
<script src="~/Theme/js/plugins/iCheck/icheck.min.js"></script>
|
||||
|
||||
<!-- Full Calendar -->
|
||||
<script src="~/Theme/js/plugins/fullcalendar/fullcalendar.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function () {
|
||||
/* initialize the external events
|
||||
-----------------------------------------------------------------*/
|
||||
$('#external-events div.external-event').each(function () {
|
||||
|
||||
// store data so the calendar knows to render an event upon drop
|
||||
$(this).data('event', {
|
||||
title: $.trim($(this).text()), // use the element's text as the event title
|
||||
stick: true // maintain when user navigates (see docs on the renderEvent method)
|
||||
});
|
||||
|
||||
// make the event draggable using jQuery UI
|
||||
$(this).draggable({
|
||||
zIndex: 1111999,
|
||||
revert: true, // will cause the event to go back to its
|
||||
revertDuration: 0 // original position after the drag
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
/* initialize the calendar
|
||||
-----------------------------------------------------------------*/
|
||||
var date = new Date();
|
||||
var d = date.getDate();
|
||||
var m = date.getMonth();
|
||||
var y = date.getFullYear();
|
||||
|
||||
$('#calendar').fullCalendar({
|
||||
/*设置日历头部信息,如果设置为false,则不显示头部信息。
|
||||
* 包括left,center,right左中右三个位置都可以对应一下配置
|
||||
* title:显示当前月份/周、日信息
|
||||
* prev:用于切换到上一月/周/日视图的按钮
|
||||
* next:用于切换到下一月/周/日视图的按钮
|
||||
* prevYear:用于切换到上一年视图的按钮
|
||||
* nextYear:用于切换到下一年视图的按钮
|
||||
* */
|
||||
header: {
|
||||
left: 'prev,next',
|
||||
center: 'title',
|
||||
right: ''
|
||||
},
|
||||
monthNames: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], //月份自定义命名
|
||||
monthNamesShort: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], //月份缩略命名
|
||||
dayNames: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"], //同理monthNames
|
||||
dayNamesShort: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"], //同理monthNamesShort
|
||||
editable: false, //支持Event日程拖动修改,默认false
|
||||
droppable: true, // this allows things to be dropped onto the calendar
|
||||
drop: function () {//日程拖拽停止并且已经拖拽到其它位置了
|
||||
if ($('#drop-remove').is(':checked')) {
|
||||
$(this).remove();
|
||||
}
|
||||
},
|
||||
events: function (start, end, timezone, callback) {
|
||||
var date = this.getDate().format('YYYY-MM');
|
||||
var arr = date.split("-");
|
||||
var events = loopMonthDay(arr[0], arr[1]); //loopMonthDay(arr[0],arr[1]); 是自己封装的函数
|
||||
callback(events);//将整理好格式的数组放在回调中执行,这样在切换月份的时候就会自动掉接口获取
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function GetFullcalendar() {
|
||||
|
||||
};
|
||||
|
||||
</script>
|
||||
116
AUTS.Web/Areas/App/Views/PPlan/PPlanInternalList.cshtml
Normal file
116
AUTS.Web/Areas/App/Views/PPlan/PPlanInternalList.cshtml
Normal file
@@ -0,0 +1,116 @@
|
||||
@model List<AUTS.Domain.Entities.TBL_OrderInternal>
|
||||
@{
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
|
||||
List<AUTS.Domain.Entities.TBL_Orders> orderList = AUTS.Services.Cache.CacheHelp.GetUserDBOrderList();//订单列表
|
||||
}
|
||||
|
||||
<div class="row wrapper border-bottom white-bg page-heading">
|
||||
<div class="col-lg-10">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<a href="@Url.Action("Index", "Home")">主页</a>
|
||||
</li>
|
||||
<li>
|
||||
<a>订单管理</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<strong>内部订单列表</strong>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>内部订单列表</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover dataTables-example">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>单号</th>
|
||||
<th>内部单号</th>
|
||||
@*<th>起止序号</th>*@
|
||||
<th>创建时间</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if (Model != null && Model.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < Model.Count; i++)
|
||||
{
|
||||
<tr onclick="gotoDetailPartial('@Url.Action("PPlanInternalDetails", "PPlan")',@Model[i].ID,'pPlanInterBox_Content')">
|
||||
<td>@(i + 1)</td>
|
||||
<td>@(orderList.Single(x => x.OrderID == Model[i].OrderID).OrderNo)</td>
|
||||
<td>@Model[i].InternalNo</td>
|
||||
|
||||
@*<td>@Model[i].Sn_Start ~ @Model[i].Sn_End</td>*@
|
||||
<td>@Model[i].CreateTime</td>
|
||||
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@*<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>内部订单列表</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover " id="editable"></table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>*@
|
||||
|
||||
<div class="row" id="pPlanInterBox_Content">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script src="~/Theme/js/plugins/jeditable/jquery.jeditable.js"></script>
|
||||
<script src="~/Theme/js/plugins/dataTables/datatables.min.js"></script>
|
||||
301
AUTS.Web/Areas/App/Views/PPlan/PPlanInternalTb.cshtml
Normal file
301
AUTS.Web/Areas/App/Views/PPlan/PPlanInternalTb.cshtml
Normal file
@@ -0,0 +1,301 @@
|
||||
@model List<AUTS.Domain.ViewModels.VM_TBL_PPlanInternalTb>
|
||||
@{
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
|
||||
List<AUTS.Domain.Entities.TBL_Orders> orderList = AUTS.Services.Cache.CacheHelp.GetUserDBOrderList();//订单列表
|
||||
|
||||
List<AUTS.Domain.Entities.TBL_Customer> CompanyList = AUTS.Services.Cache.CacheHelp.GetUserDBCustomerList();//公司
|
||||
List<AUTS.Domain.Entities.TBL_Project> projectList = AUTS.Services.Cache.CacheHelp.GetUserDBProjectList();//机型
|
||||
List<AUTS.Domain.Entities.TBL_UTS_Manage_OrderStatus> StatusList = AUTS.Services.Cache.CacheHelp.GetUserDBOrderStatusLis();//状态
|
||||
}
|
||||
|
||||
@*<link href="~/Theme/css/plugins/datapicker/datepicker3.css" rel="stylesheet">*@
|
||||
|
||||
<link href="~/Theme/css/plugins/datetimepicker/bootstrap-datetimepicker.min.css" rel="stylesheet" />
|
||||
|
||||
<div class="row wrapper border-bottom white-bg page-heading">
|
||||
<div class="col-lg-10">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<a href="@Url.Action("Index", "Home")">主页</a>
|
||||
</li>
|
||||
<li>
|
||||
<a>生产计划</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<strong>生产计划</strong>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight" style="padding:0px;">
|
||||
|
||||
|
||||
<div class="ibox float-e-margins" style="display:none;" id="ppInfo">
|
||||
<div class="row">
|
||||
<div class="col-sm-12" style="padding:0 0 0 5px;">
|
||||
<div class="ibox-title">
|
||||
<h5>内部单详情</h5>
|
||||
|
||||
<div class="ibox-tools">
|
||||
|
||||
<button class="btn btn-xs btn-primary" type="button" id="btnaddPLine" onclick="fnClickAddRow()">添加生产计划</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12" style="padding:0 0 0 5px;">
|
||||
<div class="ibox-content" style="padding:0px;">
|
||||
<div class="row">
|
||||
<input type="hidden" name="oiID" id="oiID" />
|
||||
<input type="hidden" name="projectID" id="projectID" />
|
||||
<div class="col-xs-6">
|
||||
<small class="stats-label">客户:<span id="customerAbbr"></span></small>
|
||||
</div>
|
||||
<div class="col-xs-6" style="padding:0px;">
|
||||
<small class="stats-label">机型:<span id="projectName"></span></small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<small class="stats-label">订单号:<span id="orderNo"></span></small>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6" style="padding:0px;">
|
||||
<small class="stats-label">内部单号:<span id="internalNo"></span></small>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-xs-6">
|
||||
<small class="stats-label">订单交期:<span id="deliveryTime"></span></small>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6" style="padding:0px;">
|
||||
<small class="stats-label">订单数量:<span id="OrderCount"></span></small>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-xs-12">
|
||||
<small class="stats-label">工艺站:<span id="stationText"></span></small>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12" style="padding:0 0 0 5px;">
|
||||
<div class="ibox-content" style="padding:0px;">
|
||||
<div class="table-responsive" id="pPlanInterBox_Content">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12" style="padding:0 0 0 5px;">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>M/O列表</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content" style="padding:0px;">
|
||||
@*下拉框*@
|
||||
|
||||
<div class="drop-down">
|
||||
<nav style="text-align:center;">
|
||||
|
||||
@*公司*@
|
||||
<select id="CompanyList" class="form-control" onchange="queryInfo('@Url.Action("PPlanInternalTbList", "pplan")')" style="display:inline;width:100px;">
|
||||
<option value="0">所有客户</option>
|
||||
@if (CompanyList != null)
|
||||
{
|
||||
foreach (var item in CompanyList)
|
||||
{
|
||||
<option value="@item.ID">@item.CustomerAbbr</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
@*机型*@
|
||||
<select id="projectList" class="form-control" onchange="queryInfo('@Url.Action("PPlanInternalTbList", "pplan")')" style="display:inline;width:130px;">
|
||||
<option value="0">所有机型</option>
|
||||
|
||||
@if (projectList != null)
|
||||
{
|
||||
foreach (var item in projectList)
|
||||
{
|
||||
<option value="@item.ID">@item.ProjectName</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
@*状态*@
|
||||
<select id="StatusList" class="form-control" onchange="queryInfo('@Url.Action("PPlanInternalTbList", "pplan")')" style="display:inline;width:100px;">
|
||||
<option value="0">所有状态</option>
|
||||
@if (StatusList != null)
|
||||
{
|
||||
foreach (var item in StatusList)
|
||||
{
|
||||
<option value="@item.ID">@item.StatusName</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive" id="orderData">
|
||||
@*分页*@
|
||||
<div>
|
||||
<nav style="text-align:center;">
|
||||
|
||||
<ul class="pagination" id="page">
|
||||
<li class="first" onclick="firstPage('/App/pplan/PPlanInternalTbList')"><a>«</a></li>
|
||||
<li class="left"><a>…</a></li>
|
||||
@for (int i = 0; i < ViewBag.allpage; i++)
|
||||
{
|
||||
<li class="pages" onclick="SpecifyPage(@(i),'/App/pplan/PPlanInternalTbList')"><a>@(i + 1)</a></li>
|
||||
}
|
||||
<li class="right"><a>…</a></li>
|
||||
<li class="finally"><a onclick="lastPage('/App/pplan/PPlanInternalTbList')">»</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
@*内部订单数据*@
|
||||
<table class="table">
|
||||
@if (Model != null && Model.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < Model.Count; i++)
|
||||
{
|
||||
<tbody class="addColor" onclick="gotoDetailPartialNew(@Model[i].ID)">
|
||||
<tr>
|
||||
<td>ID:<span class="gray">@Model[i].ID</span></td>
|
||||
<td>P/O:<strong>@Model[i].OrderNo</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>机型:<strong style="color:#6495ED;">@Model[i].ProjectName</strong></td>
|
||||
<td>M/O:<strong>@Model[i].InternalNo</strong></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td>公司:<span class="gray">@Model[i].CustomerAbbr</span></td>
|
||||
<td>数量:<span class="gray">@Model[i].OrderCount</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>录入日期:<span class="gray">@Model[i].CreateTime</span></td>
|
||||
<td>订单交期:<span class="gray">@Model[i].DeliveryTime</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>订单状态:<span class="gray">@Model[i].OStatus</span></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
}
|
||||
}
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<style>
|
||||
small {
|
||||
color: black;
|
||||
}
|
||||
|
||||
small > span {
|
||||
color: #676A6C;
|
||||
}
|
||||
|
||||
table#new_table > tbody > tr > td {
|
||||
padding: 3px 0px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
table#new_table > thead > tr > th {
|
||||
padding: 5px;
|
||||
text-align: center;
|
||||
width: 110px;
|
||||
border-bottom: 1px solid rgb(51, 51, 51);
|
||||
}
|
||||
|
||||
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
|
||||
border: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.addColor * {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.gray {
|
||||
color: gray;
|
||||
}
|
||||
|
||||
.trColor {
|
||||
background-color: #FFFAF0;
|
||||
}
|
||||
|
||||
#new_table_wrapper {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.tdColor {
|
||||
color: red;
|
||||
}
|
||||
|
||||
select.form-control {
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
.drop-down {
|
||||
border-bottom: 1px #ddd solid;
|
||||
}
|
||||
/*.table > td {
|
||||
border-bottom: 1px solid #FFF;
|
||||
}*/
|
||||
</style>
|
||||
|
||||
<script src="~/Theme/js/plugins/jeditable/jquery.jeditable.js"></script>
|
||||
<script src="~/Theme/js/plugins/dataTables/datatables.min.js"></script>
|
||||
@*<script src="~/Theme/js/plugins/fixedColumns/dataTables.fixedColumns.min.js"></script>*@
|
||||
|
||||
<!-- Data picker -->
|
||||
<script src="~/Theme/js/plugins/datetimepicker/bootstrap-datetimepicker.min.js"></script>
|
||||
<script src="~/Theme/js/plugins/datetimepicker/locales/bootstrap-datetimepicker.zh-CN.js"></script>
|
||||
|
||||
<script src="~/Plugin/pplan.js"></script>
|
||||
<script src="~/Plugin/allPages.js"></script>
|
||||
141
AUTS.Web/Areas/App/Views/PPlan/PPlanList.cshtml
Normal file
141
AUTS.Web/Areas/App/Views/PPlan/PPlanList.cshtml
Normal file
@@ -0,0 +1,141 @@
|
||||
@model List<AUTS.Domain.ViewModels.VM_PPlanList>
|
||||
@{
|
||||
/**/
|
||||
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
<link href="~/Theme/css/plugins/dataTables/datatables.min.css" rel="stylesheet" />
|
||||
|
||||
|
||||
<div class="row wrapper border-bottom white-bg page-heading">
|
||||
<div class="col-lg-10">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<a href="@Url.Action("Index", "Home")">主页</a>
|
||||
</li>
|
||||
<li>
|
||||
<a>生产计划</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<strong>生产计划列表</strong>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>生产计划列表</h5>
|
||||
|
||||
<div class="ibox-tools">
|
||||
<button class="btn btn-sm btn-primary" type="button" id="btnaddPLine" onclick="gotoCommonPartialNeedDate('@Url.Action("PPlanDetails", "PPlan")','pPlanBox_Content')">添加生产计划</button>
|
||||
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<a href="/App/Pplan/PplanList">全部计划</a>
|
||||
<a href="/App/Pplan/PplanList?day=today">今日计划</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="table-responsive">
|
||||
@if (Model != null && Model.Count > 0)
|
||||
{
|
||||
<table class="table table-striped table-bordered table-hover dataTables-example" id="editable">
|
||||
<thead>
|
||||
<tr>
|
||||
@*<th>#</th>*@
|
||||
<th>生产时间</th>
|
||||
<th>内部单号</th>
|
||||
<th>订单号</th>
|
||||
<th>产品型号</th>
|
||||
<th>站位</th>
|
||||
<th>目标产量</th>
|
||||
@*<th>累计产量</th>*@
|
||||
<th>备注</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@for (int i = 0; i < Model.Count; i++)
|
||||
{
|
||||
<tr onclick="gotoDetailPartialNeedDate('@Url.Action("PPlanDetails", "PPlan")',@Model[i].ID,'pPlanBox_Content')">
|
||||
@*<td>@Model[i].ID</td>*@
|
||||
<td>@Model[i].ProductionTime</td>
|
||||
<td>
|
||||
@Model[i].InternalNo
|
||||
</td>
|
||||
<td>@Model[i].OrderNo</td>
|
||||
<td>@Model[i].ProductName</td>
|
||||
<td>@Model[i].Station</td>
|
||||
<td>@Model[i].ObjectiveYield</td>
|
||||
@*<td>@Model[i].ActualOutput</td>*@
|
||||
<td>@Model[i].Remark</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
else
|
||||
{
|
||||
<h3>暂无计划</h3>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4" id="pPlanBox_Content">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="~/Theme/js/plugins/dataTables/datatables.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
var oTable = $('#editable').DataTable({
|
||||
language: {
|
||||
"processing": "处理中...",
|
||||
"lengthMenu": "_MENU_ 记录/页",
|
||||
"zeroRecords": "没有匹配的记录",
|
||||
"info": "第 _START_ 至 _END_ 项记录,共 _TOTAL_ 项",
|
||||
"infoEmpty": "第 0 至 0 项记录,共 0 项",
|
||||
"infoFiltered": "",
|
||||
"infoPostFix": "",
|
||||
//"search": "搜索:",
|
||||
//"type":"post",
|
||||
//"url": "/APP/SelProduct/GetSnListData",
|
||||
"decimal": ",",
|
||||
"thousands": ".",
|
||||
"emptyTable": "未找到符合条件的数据",
|
||||
"paginate": {
|
||||
"first": "«",
|
||||
"previous": "上一页",
|
||||
"next": "下一页",
|
||||
"last": "»"
|
||||
}
|
||||
},
|
||||
"bLengthChange": false,
|
||||
pageLength: 20,//每页显示10条数据
|
||||
bFilter: false, //去掉搜索框方法
|
||||
"order": [
|
||||
[0, 'desc']//第一列倒序
|
||||
],
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
193
AUTS.Web/Areas/App/Views/PPlan/SnList.cshtml
Normal file
193
AUTS.Web/Areas/App/Views/PPlan/SnList.cshtml
Normal file
@@ -0,0 +1,193 @@
|
||||
|
||||
@{
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
List<AUTS.Domain.Entities.TBL_Project> projectList = AUTS.Services.Cache.CacheHelp.GetUserDBProjectList();//产品列表
|
||||
}
|
||||
|
||||
<div class="row wrapper border-bottom white-bg page-heading">
|
||||
<div class="col-lg-10">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<a href="@Url.Action("Index", "Home")">主页</a>
|
||||
</li>
|
||||
<li>
|
||||
<a>生产计划</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<strong>条码列表</strong>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>条码列表</h5>
|
||||
<div class="ibox-tools">
|
||||
|
||||
<button class="btn btn-md btn-primary" type="button" id="btnaddPLine" onclick="gotoCommonPartial('@Url.Action("AddSnList", "PPlan")','pPlanBox_Content')">添加规则</button>
|
||||
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
|
||||
@*<form method="get" id="CapacitySearchForm">
|
||||
|
||||
<div class="row">
|
||||
<div class="form-inline">
|
||||
|
||||
<div class="col-sm-3">
|
||||
|
||||
<div class="input-group m-b">
|
||||
|
||||
<span class="input-group-addon">机型:</span>
|
||||
<select class="input-sm form-control input-s-sm inline" name="projectid" id="projectid">
|
||||
<option value=''></option>
|
||||
@if (projectList != null && projectList.Count > 0)
|
||||
{
|
||||
foreach (var item in projectList)
|
||||
{
|
||||
<option value="@item.ProjectID">@item.ProjectName</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-3 m-b-xs" id="data_ovform">
|
||||
<div class="input-group m-b">
|
||||
<span class="input-group-addon">订单:</span>
|
||||
<input type="text" class="form-control" name="order">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<div class="input-group">
|
||||
<button type="button" class="btn btn-primary" id="btnCapacitySearch">查询</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>*@
|
||||
|
||||
<div class="table-responsive">
|
||||
|
||||
<table class="table table-striped table-bordered table-hover dataTables-example" id="table_id_example">
|
||||
<thead>
|
||||
<tr>
|
||||
@*<th>#</th>*@
|
||||
<th>内部单号</th>
|
||||
<th>订单号</th>
|
||||
<th>机型</th>
|
||||
<th>条码</th>
|
||||
<th>创建时间</th>
|
||||
<th>使用时间</th>
|
||||
<th>是否使用</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4" id="pPlanBox_Content">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="~/Theme/js/plugins/dataTables/datatables.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
$("#table_id_example").DataTable({
|
||||
language: {
|
||||
"processing": "处理中...",
|
||||
//"lengthMenu": "_MENU_ 记录/页",
|
||||
"zeroRecords": "没有匹配的记录",
|
||||
"info": "第 _START_ 至 _END_ 项记录,共 _TOTAL_ 项",
|
||||
"infoEmpty": "第 0 至 0 项记录,共 0 项",
|
||||
"infoFiltered": "",
|
||||
"infoPostFix": "",
|
||||
//"search": "搜索:",
|
||||
"url": "/APP/SelProduct/GetSnListData",
|
||||
"decimal": ",",
|
||||
"thousands": ".",
|
||||
"emptyTable": "未找到符合条件的数据",
|
||||
"paginate": {
|
||||
"first": "«",
|
||||
"previous": "‹",
|
||||
"next": "›",
|
||||
"last": "»"
|
||||
}
|
||||
},
|
||||
retrieve: true,
|
||||
paging: true,
|
||||
ordering: false,
|
||||
info: true,
|
||||
autoWidth: false,
|
||||
pageLength: 10,//每页显示10条数据
|
||||
pagingType: "full_numbers", //分页样式:simple,simple_numbers,full,full_numbers,
|
||||
bFilter: false, //去掉搜索框方法
|
||||
bLengthChange: false,//也就是页面上确认是否可以进行选择一页展示多少条
|
||||
serverSide: true, //启用服务器端分页,要进行后端分页必须的环节
|
||||
ajax: function (data, callback, settings) {
|
||||
//封装相应的请求参数,这里获取页大小和当前页码
|
||||
var pagesize = data.length;//页面显示记录条数,在页面显示每页显示多少项的时候,页大小
|
||||
var start = data.start;//开始的记录序号
|
||||
var page = (data.start) / data.length + 1;//当前页码
|
||||
//var data = {
|
||||
// page: page,
|
||||
// pagesize: pagesize,//这里只传了当前页和页大小,如果有其他参数,可继续封装
|
||||
//}
|
||||
//var json = {
|
||||
// dataArray: JSON.stringify(data)
|
||||
//}
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/APP/SelProduct/GetSnListData",
|
||||
cache: false, //禁用缓存
|
||||
//data: json, //传入已封装的参数
|
||||
data: { "page": page, "pagesize": pagesize }, //传入已封装的参数
|
||||
dataType: "json",//返回数据格式为json
|
||||
success: function (res) {
|
||||
var returnData = {};
|
||||
//returnData.draw = arr.data.pagination.TotalCount;//这里直接自行返回了draw计数器,应该由后台返回,没什么卵用!
|
||||
returnData.recordsTotal = res.Data.TotalCount;//totalCount指的是总记录数
|
||||
returnData.recordsFiltered = res.Data.TotalCount;//后台不实现过滤功能,全部的记录数都需输出到前端,记录数为总数
|
||||
returnData.data = res.Data.SnList;//返回列表
|
||||
callback(returnData);//这个别忘了!!!
|
||||
},
|
||||
error: function (XMLHttpRequest, textStatus, errorThrown) {
|
||||
$.dialog.alert("查询失败");
|
||||
$wrapper.spinModal(false);
|
||||
}
|
||||
});
|
||||
},
|
||||
columns: [
|
||||
{ "data": "InternalNo" },
|
||||
{ "data": "OrderNo" },
|
||||
{ "data": "ProjectName" },
|
||||
{ "data": "BarCode" },
|
||||
{ "data": "CreateTime" },
|
||||
{ "data": "UseTime" },
|
||||
{ "data": "IsUse" },
|
||||
]
|
||||
})
|
||||
})
|
||||
</script>
|
||||
99
AUTS.Web/Areas/App/Views/PPlan/SnRulesList.cshtml
Normal file
99
AUTS.Web/Areas/App/Views/PPlan/SnRulesList.cshtml
Normal file
@@ -0,0 +1,99 @@
|
||||
@model List<AUTS.Domain.ViewModels.VM_SnRulesList>
|
||||
@{
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
|
||||
<div class="row wrapper border-bottom white-bg page-heading">
|
||||
<div class="col-lg-10">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<a href="@Url.Action("Index", "Home")">主页</a>
|
||||
</li>
|
||||
<li>
|
||||
<a>生产计划</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<strong>条码规则列表</strong>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>条码规则列表</h5>
|
||||
<div class="ibox-tools">
|
||||
|
||||
<button class="btn btn-md btn-primary" type="button" id="btnaddPLine" onclick="gotoCommonPartialNeedDate('@Url.Action("SnRulesDetails", "PPlan")','pPlanBox_Content')">添加条码规则</button>
|
||||
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="table-responsive">
|
||||
@if (Model != null && Model.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < Model.Count; i++)
|
||||
{
|
||||
<div class="col-lg-12">
|
||||
<div class="contact-box" style="padding:0px">
|
||||
<div class="col-sm-2">
|
||||
<div align="center">
|
||||
<img alt="image" class="img-circle circle-border m-b-md" src="@Model[i].Img">
|
||||
<div class="m-t-xs font-bold">@Model[i].ProjectName</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<h3><i>@Model[i].InternalNo</i></h3>
|
||||
<p><i class="fa fa-calendar"></i> @Model[i].DeliveryTime</p>
|
||||
<p> <strong>订单数量:</strong> <i>@Model[i].OrderCount</i></p>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-7">
|
||||
|
||||
@for (int j = 0; j < Model[i].SnRules.Count; j++)
|
||||
{
|
||||
if (Model[i].SnRules[j].ID > 0)
|
||||
{
|
||||
<p onclick="gotoDetailPartialNeedDate('@Url.Action("SnRulesDetails", "PPlan")',@Model[i].SnRules[j].ID,'pPlanBox_Content')">
|
||||
<strong>@Model[i].SnRules[j].StationNames:</strong>
|
||||
@Model[i].SnRules[j].Sn_Start ∼ @Model[i].SnRules[j].Sn_End
|
||||
</p>
|
||||
}
|
||||
else
|
||||
{
|
||||
<p>
|
||||
<strong>@Model[i].SnRules[j].StationNames:</strong>
|
||||
</p>
|
||||
}
|
||||
|
||||
}
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4" id="pPlanBox_Content">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
158
AUTS.Web/Areas/App/Views/PPlan/_AddOrEditPPlan.cshtml
Normal file
158
AUTS.Web/Areas/App/Views/PPlan/_AddOrEditPPlan.cshtml
Normal file
@@ -0,0 +1,158 @@
|
||||
@model AUTS.Domain.Entities.TBL_ProductionPlan
|
||||
@{
|
||||
Layout = null;
|
||||
|
||||
List<AUTS.Domain.Entities.TBL_ProductionLine> pLineList = AUTS.Services.Cache.CacheHelp.GetUserDBPLineList();//产线列表
|
||||
|
||||
|
||||
List<AUTS.Domain.Entities.TBL_OrderInternal> orderInternalList = AUTS.Services.Cache.CacheHelp.GetUserDBOrderInternalList();//内部订单列表
|
||||
|
||||
var productID = AUTS.Services.Cache.CacheHelp.GetUserDBOrderList().Single(x => x.ID == Model.OrderID).ProductID;//型号ID
|
||||
|
||||
List<AUTS.Domain.Entities.TBL_StationList> stationList = AUTS.Services.Cache.CacheHelp.GetUserDBStationList().Where(x => x.ProjectID == productID).OrderBy(x => x.ArtworkOrder).ToList();//型号ID
|
||||
}
|
||||
|
||||
<link href="~/Theme/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
|
||||
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>@ViewBag.Title</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link-partial">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link-partial">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<form class="form-horizontal" id="addOrEditPPlanForm">
|
||||
<input type="hidden" name="id" value="@Model.ID" />
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">内部订单</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
|
||||
<select class="form-control m-b" name="orderInternalID" style="pointer-events: none;">
|
||||
|
||||
@if (orderInternalList != null && orderInternalList.Count > 0)
|
||||
{
|
||||
foreach (var item in orderInternalList)
|
||||
{
|
||||
<option @(Model.OrderInternalID == item.ID ? "selected" : "" ) value="@item.ID">@item.InternalNo</option>
|
||||
}
|
||||
}
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">生产产线</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<select class="form-control m-b" name="productionLineID">
|
||||
@if (pLineList != null && pLineList.Count > 0)
|
||||
{
|
||||
foreach (var item in pLineList)
|
||||
{
|
||||
<option @(Model.ProductionLineID == item.ID ? "selected" : "" ) value="@item.ID">@item.Name</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">工艺站</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<select class="form-control m-b" name="stationID">
|
||||
@if (stationList != null && stationList.Count > 0)
|
||||
{
|
||||
foreach (var item in stationList)
|
||||
{
|
||||
<option @(Model.StationID == item.ID ? "selected" : "" ) value="@item.ID">@item.StationName -@item.StationDesc</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">目标产量</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="请输入目标产量" name="objectiveYield" class="form-control" value="@(Model.ObjectiveYield==0?"":Model.ObjectiveYield.ToString())">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">累计目标产量</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="请输入累计目标产量" name="objectiveYieldTotal" class="form-control" value="@(Model.ObjectiveYieldTotal==0?"":Model.ObjectiveYieldTotal.ToString())">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="data_addoredit">
|
||||
|
||||
<label class="col-md-3 control-label">生产时间</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<div class="input-group date">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span><input type="text" name="productionTime" class="form-control" value="@(Model.ProductionTime.ToString("yyyy/MM/dd"))">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">备注</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="备注" name="remark" class="form-control" value="@Model.Remark">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-3 col-md-9">
|
||||
<button class="btn btn-md btn-primary" type="button" id="btnAddOrEditPPlan" onclick="excutedUpDatePPlan('btnAddOrEditPPlan','@Url.Action("ModifyPPlan", "PPlan")','addOrEditPPlanForm',@Model.OrderInternalID)">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
$.when(
|
||||
addDatepicker(),
|
||||
$.getScript("/Plugin/basicfunc.js"),
|
||||
$.getScript("/Theme/js/jquery.form.min.js"),
|
||||
$.getScript("/Plugin/inspinia-partial.js"),
|
||||
|
||||
|
||||
).done(function () {
|
||||
$('#data_addoredit .input-group.date').datepicker({
|
||||
language: "zh-CN",//语言
|
||||
todayBtn: "linked",//今日按钮
|
||||
autoclose: true,//选择后关闭日期选择
|
||||
format: "yyyy/mm/dd"//日期格式
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
142
AUTS.Web/Areas/App/Views/PPlan/_AddSnList.cshtml
Normal file
142
AUTS.Web/Areas/App/Views/PPlan/_AddSnList.cshtml
Normal file
@@ -0,0 +1,142 @@
|
||||
|
||||
@{
|
||||
Layout = null;
|
||||
|
||||
List<AUTS.Domain.Entities.TBL_OrderInternal> orderInternalList = AUTS.Services.Cache.CacheHelp.GetUserDBOrderInternalList();//内部订单列表
|
||||
|
||||
List<AUTS.Domain.Entities.TBL_Project> projectList = new List<AUTS.Domain.Entities.TBL_Project>();//产品列表
|
||||
var orderCount = 0;
|
||||
if (orderInternalList != null && orderInternalList.Count > 0)
|
||||
{
|
||||
var oIID = orderInternalList[0].OrderID;
|
||||
|
||||
AUTS.Domain.Entities.TBL_Orders order = AUTS.Services.Cache.CacheHelp.GetUserDBOrderList().Single(x => x.ID == oIID);//订单列表
|
||||
projectList = AUTS.Services.Cache.CacheHelp.GetUserDBProjectList().Where(x => x.ID == order.ProductID).ToList();//产品列表
|
||||
orderCount = order.OrderCount;
|
||||
//projectList = AUTS.Services.Cache.CacheHelp.GetUserDBProjectList().ToList();//产品列表
|
||||
}
|
||||
}
|
||||
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>@ViewBag.Title</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link-partial">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link-partial">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<form class="form-horizontal" id="modifyPPlanForm">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">内部单</label>
|
||||
<div class="col-md-9">
|
||||
|
||||
<select class="form-control m-b" name="oInterID" id="oInterID" onchange="orderChange()">
|
||||
@if (orderInternalList != null && orderInternalList.Count > 0)
|
||||
{
|
||||
foreach (var item in orderInternalList)
|
||||
{
|
||||
<option value="@item.ID">@item.InternalNo</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">机型</label>
|
||||
<div class="col-md-9">
|
||||
|
||||
<select class="form-control m-b" name="projectID" id="projectID">
|
||||
@if (projectList != null && projectList.Count > 0)
|
||||
{
|
||||
foreach (var item in projectList)
|
||||
{
|
||||
<option value="@item.ID">@item.ProjectName</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">订单数量</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="number" placeholder="订单数量" name="ordelCount" id="ordelCount" value="@orderCount" class="form-control" readonly>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">条码数量</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="number" placeholder="请输入条码数量" name="sn_Count" class="form-control">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-3 col-md-9">
|
||||
<button class="btn btn-md btn-primary" type="button" id="btnModifyPPlan" onclick="excutedUpDate('btnModifyPPlan','@Url.Action("AddSnListAjax", "PPlan")','modifyPPlanForm','@Url.Action("SnList", "PPlan")')">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$.getScript("/Plugin/basicfunc.js");
|
||||
$.getScript("/Theme/js/jquery.form.min.js");
|
||||
|
||||
function orderChange() {
|
||||
|
||||
var myselect = document.getElementById("oInterID");
|
||||
var index = myselect.selectedIndex;
|
||||
var oInterID = myselect.options[index].value;
|
||||
//var pid = $(this).children('option:selected').val();//这就是selected的值
|
||||
|
||||
// Ajax提交数据
|
||||
$.ajax({
|
||||
url: "/app/PPlan/SetProjectSelected",//"APP/login/login", // 提交到controller的url路径
|
||||
type: "post", // 提交方式
|
||||
data: { "oInterID": oInterID }, // data为String类型,必须为 Key/Value 格式。
|
||||
dataType: "json", // 服务器端返回的数据类型
|
||||
success: function (res) { // 请求成功后的回调函数,其中的参数data为controller返回的map,也就是说,然后通过data这个参数取JSON数据中的值
|
||||
$("#projectID").empty();
|
||||
//$("#stationBox").empty();
|
||||
|
||||
if (res.Status == 200) {
|
||||
|
||||
if (res.Data) {
|
||||
var projecthtml = "";
|
||||
for (var i = 0; i < res.Data.Project.length; i++) {
|
||||
//html += ' <label class="checkbox-inline"> <input type="checkbox" name="stationID" value="' + res.Data[i].StationID + '">' + res.Data[i].StationName + '</label>';
|
||||
projecthtml += ' <option value=' + res.Data.Project[i].ProjectID + '>' + res.Data.Project[i].ProjectName + '</option>';
|
||||
}
|
||||
$("#projectID").html(projecthtml);
|
||||
|
||||
//var stationHtml = "";
|
||||
//for (var i = 0; i < res.Data.StationList.length; i++) {
|
||||
// stationHtml += ' <label class="checkbox-inline"> <input type="checkbox" name="stationID" value="' + res.Data.StationList[i].StationID + '">' + res.Data.StationList[i].StationName + '-' + res.Data.StationList[i].StationDesc + '</label>';
|
||||
// //html += ' <option value=' + res.Data[i].StationID + '>' + res.Data[i].StationName + '</option>';
|
||||
//}
|
||||
//$("#stationBox").html(stationHtml);
|
||||
$("#ordelCount").val(res.Data.Count);
|
||||
}
|
||||
}
|
||||
else if (res.Status != 200) {
|
||||
}
|
||||
},
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
40
AUTS.Web/Areas/App/Views/PPlan/_PPlanDataList.cshtml
Normal file
40
AUTS.Web/Areas/App/Views/PPlan/_PPlanDataList.cshtml
Normal file
@@ -0,0 +1,40 @@
|
||||
@model List<AUTS.Domain.ViewModels.VM_PPlanList>
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
<table class="table table-striped table-bordered table-hover dataTables-example">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>生产时间</th>
|
||||
<th>内部单号</th>
|
||||
<th>订单号</th>
|
||||
<th>产品型号</th>
|
||||
<th>站位</th>
|
||||
<th>目标产量</th>
|
||||
<th>备注</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if (Model != null && Model.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < Model.Count; i++)
|
||||
{
|
||||
<tr onclick="gotoDetailPartialNeedDate('@Url.Action("PPlanDetails", "PPlan")',@Model[i].ID,'pPlanBox_Content')">
|
||||
@*<td>@Model[i].ID</td>*@
|
||||
<td>@Model[i].ProductionTime</td>
|
||||
<td>
|
||||
@Model[i].InternalNo
|
||||
</td>
|
||||
<td>@Model[i].OrderNo</td>
|
||||
<td>@Model[i].ProductName</td>
|
||||
<td>@Model[i].Station</td>
|
||||
<td>@Model[i].ObjectiveYield</td>
|
||||
@*<td>@Model[i].ActualOutput</td>*@
|
||||
<td>@Model[i].Remark</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
131
AUTS.Web/Areas/App/Views/PPlan/_PPlanDetails.cshtml
Normal file
131
AUTS.Web/Areas/App/Views/PPlan/_PPlanDetails.cshtml
Normal file
@@ -0,0 +1,131 @@
|
||||
@model AUTS.Domain.Entities.TBL_ProductionPlan
|
||||
@{
|
||||
Layout = null;
|
||||
|
||||
List<AUTS.Domain.Entities.TBL_ProductionLine> pLineList = AUTS.Services.Cache.CacheHelp.GetUserDBPLineList();//产线列表
|
||||
|
||||
|
||||
List<AUTS.Domain.Entities.TBL_OrderInternal> orderInternalList = AUTS.Services.Cache.CacheHelp.GetUserDBOrderInternalList();//内部订单列表
|
||||
}
|
||||
|
||||
<link href="~/Theme/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
|
||||
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>@ViewBag.Title</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link-partial">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link-partial">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<form class="form-horizontal" id="modifyPPlanForm">
|
||||
<input type="hidden" name="id" value="@Model.ID" />
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">内部订单</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
|
||||
<select class="form-control m-b" name="orderInternalID">
|
||||
@if (orderInternalList != null && orderInternalList.Count > 0)
|
||||
{
|
||||
foreach (var item in orderInternalList)
|
||||
{
|
||||
<option @(Model.OrderInternalID == item.ID ? "selected" : "" ) value="@item.ID">@item.InternalNo</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">生产产线</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<select class="form-control m-b" name="productionLineID">
|
||||
@if (pLineList != null && pLineList.Count > 0)
|
||||
{
|
||||
foreach (var item in pLineList)
|
||||
{
|
||||
<option @(Model.ProductionLineID == item.ID ? "selected" : "" ) value="@item.ID">@item.Name</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">目标产量</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="请输入目标产量" name="objectiveYield" class="form-control" value="@Model.ObjectiveYield">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">累计目标产量</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="请输入累计目标产量" name="objectiveYieldTotal" class="form-control" value="@Model.ObjectiveYieldTotal">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group" id="data_1">
|
||||
|
||||
<label class="col-md-3 control-label">生产时间</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<div class="input-group date">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span><input type="text" name="productionTime" class="form-control" value="@(Model.ProductionTime.ToString("yyyy/MM/dd"))">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">备注</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="备注" name="remark" class="form-control" value="@Model.Remark">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-3 col-md-9">
|
||||
<button class="btn btn-md btn-primary" type="button" id="btnModifyPPlan" onclick="excutedUpDate('btnModifyPPlan','@Url.Action("ModifyPPlan", "PPlan")','modifyPPlanForm','@Url.Action("PPlanList", "PPlan")')">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
$.when(
|
||||
$.getScript("/Plugin/basicfunc.js"),
|
||||
$.getScript("/Theme/js/jquery.form.min.js"),
|
||||
$.getScript("/Plugin/inspinia-partial.js"),
|
||||
).done(function () {
|
||||
$('#data_1 .input-group.date').datepicker({
|
||||
language: "zh-CN",//语言
|
||||
todayBtn: "linked",//今日按钮
|
||||
autoclose: true,//选择后关闭日期选择
|
||||
format: "yyyy/mm/dd"//日期格式
|
||||
});
|
||||
});
|
||||
</script>
|
||||
152
AUTS.Web/Areas/App/Views/PPlan/_PPlanInternalDetails.cshtml
Normal file
152
AUTS.Web/Areas/App/Views/PPlan/_PPlanInternalDetails.cshtml
Normal file
@@ -0,0 +1,152 @@
|
||||
@model AUTS.Domain.ViewModels.VM_TBL_PPlanInternalDetails
|
||||
@{
|
||||
Layout = null;
|
||||
|
||||
List<AUTS.Domain.Entities.TBL_ProductionLine> pLineList = AUTS.Services.Cache.CacheHelp.GetUserDBPLineList();//产线列表
|
||||
|
||||
List<AUTS.Domain.Entities.TBL_StationList> stationList = AUTS.Services.Cache.CacheHelp.GetUserDBStationList();//站列表
|
||||
}
|
||||
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>内部单详情</h5>
|
||||
|
||||
<div class="ibox-tools">
|
||||
|
||||
<button class="btn btn-xs btn-primary" type="button" id="btnaddPLine" onclick="gotoAddOrEditPPlan('@Url.Action("AddOrEditPPlan", "PPlan")',@Model.ID,'addoreditPPlan')">添加生产计划</button>
|
||||
|
||||
@*<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>*@
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="ibox-footer">
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<small class="stats-label">客户:@Model.CustomerAbbr</small>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<small class="stats-label">机型:@Model.ProjectName</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-footer">
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<small class="stats-label">订单号:@Model.OrderNo</small>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6">
|
||||
<small class="stats-label">内部单号:@Model.InternalNo</small>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ibox-footer">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-xs-12">
|
||||
<small class="stats-label">订单交期:@Model.DeliveryTime.ToString("yyyy/MM/dd")</small>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@*<div class="ibox-footer">
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="col-xs-6">
|
||||
<small class="stats-label">开始序号:@Model.Sn_Start</small>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<small class="stats-label">结束序号:@Model.Sn_End</small>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>*@
|
||||
</div>
|
||||
|
||||
<div class="ibox-content">
|
||||
|
||||
@if (Model.PPlanList != null && Model.PPlanList.Count > 0)
|
||||
{
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover dataTables-example">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>生产时间</th>
|
||||
<th>生产产线</th>
|
||||
<th>工艺线</th>
|
||||
<th>目标产量</th>
|
||||
<th>累计目标产量</th>
|
||||
|
||||
<th>备注</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@for (int i = 0; i < Model.PPlanList.Count; i++)
|
||||
{
|
||||
<tr onclick="gotoAddOrEditPPlan('@Url.Action("AddOrEditPPlan", "PPlan")',@Model.ID,'addoreditPPlan',@Model.PPlanList[i].ID)">
|
||||
<td>
|
||||
@Model.PPlanList[i].ProductionTime.ToString("yyyy/MM/dd")
|
||||
<span class="help-block m-b-none">@AUTS.Services.Tool.StringHelp.GetWeek(Model.PPlanList[i].ProductionTime)</span>
|
||||
</td>
|
||||
<td>@(pLineList.Single(x => x.ID == Model.PPlanList[i].ProductionLineID).Name)</td>
|
||||
<td>
|
||||
|
||||
@stationList.Single(x => x.ID == Model.PPlanList[i].StationID).StationName - @stationList.Single(x => x.ID == Model.PPlanList[i].StationID).StationDesc
|
||||
</td>
|
||||
<td>@Model.PPlanList[i].ObjectiveYield</td>
|
||||
<td>@Model.PPlanList[i].ObjectiveYieldTotal</td>
|
||||
|
||||
<td>@Model.PPlanList[i].Remark</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<small>
|
||||
<strong>暂无生产计划</strong>
|
||||
</small>
|
||||
}
|
||||
|
||||
<div id="addoreditPPlan">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
// 链接到明细数据页
|
||||
function gotoAddOrEditPPlan(url, interID, containerDiv, pid) {
|
||||
$.ajax({
|
||||
cache: true,
|
||||
async: true,
|
||||
type: 'POST',
|
||||
url: url,
|
||||
data: { "interID": interID, "pid": pid },
|
||||
success: function (data) {
|
||||
|
||||
$('#' + containerDiv).html(data);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
57
AUTS.Web/Areas/App/Views/PPlan/_PPlanInternalTbList.cshtml
Normal file
57
AUTS.Web/Areas/App/Views/PPlan/_PPlanInternalTbList.cshtml
Normal file
@@ -0,0 +1,57 @@
|
||||
@model List<AUTS.Domain.ViewModels.VM_TBL_PPlanInternalTb>
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
<div>
|
||||
<nav style="text-align:center;">
|
||||
|
||||
<ul class="pagination" id="page">
|
||||
<li class="first" onclick="firstPage('/App/pplan/PPlanInternalTbList')"><a>«</a></li>
|
||||
<li class="left"><a>…</a></li>
|
||||
@for (int i = 0; i < ViewBag.allpage; i++)
|
||||
{
|
||||
<li class="pages" onclick="SpecifyPage(@(i),'/App/pplan/PPlanInternalTbList')"><a>@(i + 1)</a></li>
|
||||
}
|
||||
<li class="right"><a>…</a></li>
|
||||
<li class="finally"><a onclick="lastPage('/App/pplan/PPlanInternalTbList')">»</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<table class="table" id="editable">
|
||||
|
||||
|
||||
@if (Model != null && Model.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < Model.Count; i++)
|
||||
{
|
||||
<tbody class="addColor" onclick="gotoDetailPartialNew(@Model[i].ID)">
|
||||
<tr>
|
||||
<td>ID:<span class="gray">@Model[i].ID</span></td>
|
||||
<td>P/O:<strong>@Model[i].OrderNo</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>机型:<strong style="color:#6495ED;">@Model[i].ProjectName</strong></td>
|
||||
<td>M/O:<strong>@Model[i].InternalNo</strong></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td>公司:<span class="gray">@Model[i].CustomerAbbr</span></td>
|
||||
<td>数量:<span class="gray">@Model[i].OrderCount</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>录入日期:<span class="gray">@Model[i].CreateTime</span></td>
|
||||
<td>订单交期:<span class="gray">@Model[i].DeliveryTime</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>订单状态:<span class="gray">@Model[i].OStatus</span></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
}
|
||||
}
|
||||
</table>
|
||||
|
||||
<script src="~/Plugin/pplan.js"></script>
|
||||
<script src="~/Plugin/allPages.js"></script>
|
||||
173
AUTS.Web/Areas/App/Views/PPlan/_SnRulesDetails.cshtml
Normal file
173
AUTS.Web/Areas/App/Views/PPlan/_SnRulesDetails.cshtml
Normal file
@@ -0,0 +1,173 @@
|
||||
@model AUTS.Domain.Entities.TBL_SnRules
|
||||
@{
|
||||
Layout = null;
|
||||
|
||||
List<AUTS.Domain.Entities.TBL_OrderInternal> orderInternalList = AUTS.Services.Cache.CacheHelp.GetUserDBOrderInternalList();//内部订单列表
|
||||
|
||||
List<AUTS.Domain.Entities.TBL_Project> projectList = new List<AUTS.Domain.Entities.TBL_Project>();//产品列表
|
||||
if (orderInternalList != null && orderInternalList.Count > 0)
|
||||
{
|
||||
var oIID = Model.OrderID == 0 ? orderInternalList[0].OrderID : Model.OrderID;
|
||||
|
||||
AUTS.Domain.Entities.TBL_Orders order = AUTS.Services.Cache.CacheHelp.GetUserDBOrderList().Single(x => x.ID == oIID);//订单列表
|
||||
projectList = AUTS.Services.Cache.CacheHelp.GetUserDBProjectList().Where(x => x.ID == order.ProductID).ToList();//产品列表
|
||||
|
||||
//projectList = AUTS.Services.Cache.CacheHelp.GetUserDBProjectList().ToList();//产品列表
|
||||
}
|
||||
|
||||
List<AUTS.Domain.Entities.TBL_StationList> stationList = new List<AUTS.Domain.Entities.TBL_StationList>();
|
||||
|
||||
if (projectList != null && projectList.Count > 0)
|
||||
{
|
||||
stationList = AUTS.Services.Cache.CacheHelp.GetUserDBStationList().Where(x => x.ProjectID == projectList[0].ID && x.StationType != "QA").OrderBy(x => x.ArtworkOrder).ToList();//工作站列表
|
||||
}
|
||||
|
||||
var stationIDs = "," + Model.StationIDs + ",";
|
||||
}
|
||||
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>@ViewBag.Title</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link-partial">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link-partial">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<form class="form-horizontal" id="modifyPPlanForm">
|
||||
<input type="hidden" name="id" value="@Model.ID" />
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">内部单</label>
|
||||
<div class="col-md-9">
|
||||
|
||||
<select class="form-control m-b" name="oInterID" id="oInterID" onchange="orderChange()">
|
||||
@if (orderInternalList != null && orderInternalList.Count > 0)
|
||||
{
|
||||
foreach (var item in orderInternalList)
|
||||
{
|
||||
<option @(Model.OrderID == item.OrderID ? "selected" : "" ) value="@item.ID">@item.InternalNo</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">机型</label>
|
||||
<div class="col-md-9">
|
||||
|
||||
<select class="form-control m-b" name="projectID" id="projectID">
|
||||
@if (projectList != null && projectList.Count > 0)
|
||||
{
|
||||
foreach (var item in projectList)
|
||||
{
|
||||
<option value="@item.ID">@item.ProjectName</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">用于站位</label>
|
||||
|
||||
<div class="col-md-9" id="stationBox">
|
||||
@if (stationList != null && stationList.Count > 0)
|
||||
{
|
||||
foreach (var item in stationList)
|
||||
{
|
||||
<label class="checkbox-inline"> <input type="checkbox" @(stationIDs.Contains("," + item.ID + ",") ? "checked" : "" ) name="stationID" value="@item.ID">@item.StationName -@item.StationDesc</label>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">序号前缀</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="请输入序号前缀" name="sn_Prefix" class="form-control" value="@Model.Sn_Prefix">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">序号开始</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="请输入序号开始" name="sn_Start" class="form-control" value="@Model.Sn_Start">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">序号结束</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="请输入序号结束" name="sn_End" class="form-control" value="@Model.Sn_End">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-3 col-md-9">
|
||||
<button class="btn btn-md btn-primary" type="button" id="btnModifyPPlan" onclick="excutedUpDate('btnModifyPPlan','@Url.Action("ModifySnRules", "PPlan")','modifyPPlanForm','@Url.Action("SnRulesList", "PPlan")')">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$.getScript("/Plugin/basicfunc.js");
|
||||
$.getScript("/Theme/js/jquery.form.min.js");
|
||||
|
||||
function orderChange() {
|
||||
|
||||
var myselect = document.getElementById("oInterID");
|
||||
var index = myselect.selectedIndex;
|
||||
var oInterID = myselect.options[index].value;
|
||||
//var pid = $(this).children('option:selected').val();//这就是selected的值
|
||||
|
||||
// Ajax提交数据
|
||||
$.ajax({
|
||||
url: "/app/PPlan/SetProjectSelected",//"APP/login/login", // 提交到controller的url路径
|
||||
type: "post", // 提交方式
|
||||
data: { "oInterID": oInterID }, // data为String类型,必须为 Key/Value 格式。
|
||||
dataType: "json", // 服务器端返回的数据类型
|
||||
success: function (res) { // 请求成功后的回调函数,其中的参数data为controller返回的map,也就是说,然后通过data这个参数取JSON数据中的值
|
||||
$("#projectID").empty();
|
||||
$("#stationBox").empty();
|
||||
|
||||
if (res.Status == 200) {
|
||||
|
||||
if (res.Data) {
|
||||
var projecthtml = "";
|
||||
for (var i = 0; i < res.Data.Project.length; i++) {
|
||||
//html += ' <label class="checkbox-inline"> <input type="checkbox" name="stationID" value="' + res.Data[i].StationID + '">' + res.Data[i].StationName + '</label>';
|
||||
projecthtml += ' <option value=' + res.Data.Project[i].ProjectID + '>' + res.Data.Project[i].ProjectName + '</option>';
|
||||
}
|
||||
$("#projectID").html(projecthtml);
|
||||
|
||||
var stationHtml = "";
|
||||
for (var i = 0; i < res.Data.StationList.length; i++) {
|
||||
stationHtml += ' <label class="checkbox-inline"> <input type="checkbox" name="stationID" value="' + res.Data.StationList[i].StationID + '">' + res.Data.StationList[i].StationName + '-' + res.Data.StationList[i].StationDesc + '</label>';
|
||||
//html += ' <option value=' + res.Data[i].StationID + '>' + res.Data[i].StationName + '</option>';
|
||||
}
|
||||
$("#stationBox").html(stationHtml);
|
||||
}
|
||||
}
|
||||
else if (res.Status != 200) {
|
||||
}
|
||||
},
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
693
AUTS.Web/Areas/App/Views/ProductMaintain/AddMaintain.cshtml
Normal file
693
AUTS.Web/Areas/App/Views/ProductMaintain/AddMaintain.cshtml
Normal file
@@ -0,0 +1,693 @@
|
||||
@model List<AUTS.Domain.Application.TBL_RejectsExplain>
|
||||
@{
|
||||
ViewBag.Title = "AddMaintain";
|
||||
Layout = null;// "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
List<AUTS.Domain.Entities.TBL_Project> ProjectList = AUTS.Services.Cache.CacheHelp.GetUserDBProjectList();//产品列表
|
||||
List<AUTS.Domain.Entities.TBL_Customer> CustomerList = AUTS.Services.Cache.CacheHelp.GetUserDBCustomerList();//客户列表
|
||||
List<AUTS.Domain.Entities.TBL_ProductTypes> ProjectTypeList = AUTS.Services.Cache.CacheHelp.GetUserDBProjectTypeList();//产品类型列表
|
||||
|
||||
|
||||
}
|
||||
@*<link href="~/Content/layui/css/layui.css" rel="stylesheet" />
|
||||
<script src="~/Content/layui/layui.js"></script>*@
|
||||
@*<script src="~/Plugin/basicfunc.js"></script>*@
|
||||
@*母版样式*@
|
||||
@*///////////////////////////////////*@
|
||||
@*<link href="~/Theme/css/bootstrap.min.css" rel="stylesheet" />
|
||||
<link href="~/Theme/font-awesome/css/font-awesome.css" rel="stylesheet" />
|
||||
|
||||
<!-- Toastr style提示框样式 -->
|
||||
<link href="~/Theme/css/plugins/toastr/toastr.css" rel="stylesheet">
|
||||
|
||||
<link href="~/Theme/js/plugins/gritter/jquery.gritter.css" rel="stylesheet" />
|
||||
|
||||
<link href="~/Theme/css/animate.css" rel="stylesheet" />
|
||||
<link href="~/Theme/css/style.css" rel="stylesheet" />
|
||||
<!-- 主要的脚本 -->
|
||||
<script src="~/Theme/js/jquery-2.1.1.js"></script>
|
||||
<script src="~/Theme/js/bootstrap.min.js"></script>
|
||||
<script src="~/Theme/js/plugins/metisMenu/jquery.metisMenu.js"></script>
|
||||
<!-- 菜单栏插件 -->
|
||||
<script src="~/Theme/js/plugins/slimscroll/jquery.slimscroll.min.js"></script><!-- 滚动条插件 -->*@
|
||||
@*//////////////////////////////////////////////////////////*@
|
||||
<style>
|
||||
@*上传文件样式*@
|
||||
.file {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
border: 1px solid #333;
|
||||
padding: 4px 10px;
|
||||
overflow: hidden;
|
||||
text-decoration: none;
|
||||
text-indent: 0;
|
||||
line-height: 20px;
|
||||
border-radius: 5px;
|
||||
color: #000;
|
||||
background: #ccc; /* 一些不支持背景渐变的浏览器 */
|
||||
background: -moz-linear-gradient(top, #fff, #ccc);
|
||||
background: -webkit-gradient(linear, 0 0, 0 bottom, from(#fff), to(#ccc));
|
||||
background: -o-linear-gradient(top, #fff, #ccc);
|
||||
}
|
||||
|
||||
.file input {
|
||||
position: absolute;
|
||||
font-size: 50px;
|
||||
right: 0;
|
||||
top: 0;
|
||||
opacity: 0;
|
||||
filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0);
|
||||
}
|
||||
</style>
|
||||
<div class="ibox float-e-margins">
|
||||
<!--<div class="ibox-title">-->
|
||||
@*<h5>@ViewBag.Title</h5>*@
|
||||
<!--<div class="ibox-tools">
|
||||
<a class="collapse-link-partial">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link-partial">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>-->
|
||||
<div class="ibox-content">
|
||||
<form class="form-horizontal" id="modifyPPlanForm">
|
||||
@*<input type="hidden" name="id" value="@Model.ID" />*@
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">报修单号</label>
|
||||
<div class="col-md-9">
|
||||
<input type="text" readonly="true" placeholder="请输入报修单号" name="RepairRequestNum" class="form-control" value="@ViewBag.RepairRequestNum">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">不良品来源</label>
|
||||
@*<div class="col-md-9">
|
||||
<input type="text" readonly="true" placeholder="请输入不良品来源" name="RejectSource" class="form-control" value="@ViewBag.RejectSource">
|
||||
</div>*@
|
||||
<div class="col-md-9">
|
||||
@*<input type="text" placeholder="请输入不良品来源" name="RejectSource" class="form-control" value="">*@
|
||||
<select class="form-control m-b" id="pej" name="RejectSource" disabled="disabled">
|
||||
@if (CustomerList != null && CustomerList.Count > 0)
|
||||
{
|
||||
foreach (var item in CustomerList)
|
||||
{
|
||||
if (@ViewBag.RejectSource == item.CustomerName)
|
||||
{
|
||||
<option selected value="@item.CustomerName">@item.CustomerName</option>
|
||||
}
|
||||
else
|
||||
{
|
||||
<option value="@item.CustomerName">@item.CustomerName</option>
|
||||
}
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">产品类型</label>
|
||||
<div class="col-md-9">
|
||||
<select class="form-control m-b" id="Producttype" onchange="actionProductShow()">
|
||||
@if (ProjectTypeList != null && ProjectTypeList.Count > 0)
|
||||
{
|
||||
foreach (var item in ProjectTypeList)
|
||||
{
|
||||
<option value="@item.ID">@item.ProductType</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
<select class="form-control m-b" id="ProductId" name="ProductID"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">费用承担方</label>
|
||||
<div class="col-md-9">
|
||||
<select class="form-control m-b" name="Payer">
|
||||
<option value="1">公司承担</option>
|
||||
<option value="2">客户承担</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">业务员</label>
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="请输入业务员名称" name="Salesman" class="form-control" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">修后流向</label>
|
||||
<div class="col-md-9">
|
||||
<select class="form-control m-b" name="Storage">
|
||||
<option value="1">退回仓库</option>
|
||||
<option value="2">退回客户</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">产品照片</label>
|
||||
<input type="text" name="ProductImage" style="display:none" id="ProductImageshow">
|
||||
<div class="col-md-9">
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<div class="custom-file">
|
||||
<a style="margin-left:15px" href="javascript:;" class="file">
|
||||
请选择图片
|
||||
<input type="file" onchange="uploadimg()" style="margin-left:30px" class=" custom-file-input" accept="image/*" id="photo">
|
||||
</a>
|
||||
@*<a onclick="openMedia()">摄像头</a>
|
||||
<a onclick="takePhoto()">拍照</a><br /><br />
|
||||
<video style="display: none;" class="src-video" width="500px" height="500px" autoplay="autoplay"></video>
|
||||
<canvas id="canvas" width="200px" height="200px" style="display: none;"></canvas>
|
||||
<img src="" alt="" class="photo">*@
|
||||
复制完图片,点击此处CTRL+V
|
||||
<img id="img1" style="margin-left: 15px; display: none" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">产品条码</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="请输入产品条码" name="Barcode" class="form-control" value="">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@*<div class="form-group">
|
||||
<label class="col-md-3 control-label">产品标识</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="text" readonly required="required" placeholder="请输入产品标识" name="ProductMarking" class="form-control" value="">
|
||||
</div>
|
||||
</div>*@
|
||||
|
||||
<div class="form-group" id="data_1">
|
||||
|
||||
<label class="col-md-3 control-label">不良代码</label>
|
||||
<div class="col-md-9">
|
||||
<select class="form-control m-b" name="RejectCode" onchange="infoShowEr()">
|
||||
@if (Model != null && Model.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < Model.Count; i++)
|
||||
{
|
||||
<option value="@Model[i].id">@Model[i].Matlab -----@Model[i].Introductions</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">不良说明</label>
|
||||
<div class="col-md-9">
|
||||
<input type="text" readonly placeholder="请输入不良说明" name="RejectDesc" class="form-control" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">详细说明</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="请输入详细说明" id="Xxsm" name="DetailRemark" class="form-control" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">报修备注</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="请输入报修备注" name="Remark" class="form-control" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-3 col-md-9">
|
||||
<button class="btn btn-md btn-primary" type="button" id="btnModifyPPlan" onclick="UpDate('btnModifyPPlan', '@Url.Action("addMaintainOperation", "ProductMaintain")', 'modifyPPlanForm', '@Url.Action("Maintain", "ProductMaintain")');">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.addEventListener('paste', function (event) {
|
||||
document.getElementById("img1").style.display = "inline";
|
||||
var isChrome = false;
|
||||
if (event.clipboardData || event.originalEvent) {
|
||||
//某些chrome版本使用的是event.originalEvent
|
||||
var clipboardData = (event.clipboardData || event.originalEvent.clipboardData);
|
||||
if (clipboardData.items) {
|
||||
// for chrome
|
||||
var items = clipboardData.items,
|
||||
len = items.length,
|
||||
blob = null;
|
||||
isChrome = true;
|
||||
for (var i = 0; i < len; i++) {
|
||||
if (items[i].type.indexOf("image") !== -1) {
|
||||
//getAsFile() 此方法只是living standard firefox ie11 并不支持
|
||||
blob = items[i].getAsFile();
|
||||
}
|
||||
}
|
||||
if (blob !== null) {
|
||||
var blobUrl = URL.createObjectURL(blob);
|
||||
//blob对象显示
|
||||
document.getElementById("img1").src = blobUrl;
|
||||
var reader = new FileReader();
|
||||
//base64码显示
|
||||
/* reader.onload = function (event) {
|
||||
// event.target.result 即为图片的Base64编码字符串
|
||||
var base64_str = event.target.result;
|
||||
|
||||
document.getElementById("imgNode").src=base64_str;
|
||||
}
|
||||
reader.readAsDataURL(blob);*/var fd = new FormData(document.forms[0]);
|
||||
fd.append("the_file", blob, 'image.png');
|
||||
//创建XMLHttpRequest对象
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('POST', '/image');
|
||||
xhr.onload = function () {
|
||||
if (xhr.readyState === 4) {
|
||||
if (xhr.status === 200) {
|
||||
var data = JSON.parse(xhr.responseText);
|
||||
} else {
|
||||
}
|
||||
};
|
||||
};
|
||||
xhr.onerror = function (e) {
|
||||
console.log(xhr.statusText);
|
||||
}
|
||||
//xhr.send(fd);会报错
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
// let srcVideo = document.querySelector('video.src-video');
|
||||
// let mediaStream;
|
||||
// let photo = document.querySelector('img.photo');
|
||||
// let srcimg = document.querySelector('img#img1');
|
||||
// // 开启摄像头
|
||||
//function openMedia() {
|
||||
// photo.src = '';
|
||||
// srcVideo.style.display = 'block';
|
||||
// let constraints = {
|
||||
// audio: false, //音频轨道
|
||||
// video: { width: 200, height: 200 } //视频轨道
|
||||
// }
|
||||
// let mediaPromise = navigator.mediaDevices.getUserMedia(constraints);
|
||||
// mediaPromise.then(function (stream) {
|
||||
// /* 使用这个stream stream */
|
||||
// mediaStream = stream;
|
||||
// srcVideo.srcObject = stream;
|
||||
// srcVideo.play();
|
||||
// }).catch(function (err) {
|
||||
// /* 处理error */
|
||||
// alert(err);
|
||||
// });
|
||||
// };
|
||||
// // 拍照
|
||||
// function takePhoto() {
|
||||
// let canvas = document.querySelector('#canvas');
|
||||
// //获取 `canvas`元素,根据`srcVideo`中的数据进行图片绘制 `ctx.drawImage()`;
|
||||
// let ctx = canvas.getContext('2d');
|
||||
// ctx.drawImage(srcVideo, 0, 0, 200, 200);
|
||||
// //将 `canvas`绘制的图片信息,展示在 `img`标签中;
|
||||
// photo.src = canvas.toDataURL();
|
||||
// closeMedia();
|
||||
// };
|
||||
|
||||
// // 关闭摄像头
|
||||
// let closeMedia = function () {
|
||||
// mediaStream.getTracks().forEach(track => {
|
||||
// track.stop();
|
||||
// });
|
||||
// srcVideo.style.display = 'none';
|
||||
// }
|
||||
|
||||
//页面加载完成时
|
||||
$(document).ready(function () {
|
||||
//保存上次产品类型
|
||||
var select = document.getElementById("#Producttype");
|
||||
var alloptions = $("#Producttype option");
|
||||
for (var i = 0; i < alloptions.length; i++) {
|
||||
if (alloptions[i].value == localStorage.getItem("select_oy_Producttype")) {
|
||||
alloptions[i].selected = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
//保存上次不良代码
|
||||
var select = $('select[name=RejectCode]').val();
|
||||
var Code = $("select[name=RejectCode] option");
|
||||
for (var i = 0; i < Code.length; i++) {
|
||||
if (Code[i].value == localStorage.getItem("select_oy_RejectCode")) {
|
||||
Code[i].selected = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
//保存上次的详细说明
|
||||
if (typeof (localStorage.getItem("select_oy_Xxsm")) != undefined) {
|
||||
$('#Xxsm').val(localStorage.getItem("select_oy_Xxsm"));
|
||||
}
|
||||
if (typeof (localStorage.getItem("select_oy_Remark")) != undefined) {
|
||||
console.log(localStorage.getItem("select_oy_Remark"));
|
||||
$("input[name='Remark']").val(localStorage.getItem("select_oy_Remark"));
|
||||
}
|
||||
});
|
||||
|
||||
function set_select_checked(selectId, checkValue) {
|
||||
var select = document.getElementById(selectId);
|
||||
for (var i = 0; i < select.option.length; i++) {
|
||||
if (select.options[i].value == checkValue) {
|
||||
select.options[i].selected = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
infoShowEr();
|
||||
actionProductShow();
|
||||
function infoShowEr() {
|
||||
var set = $('select[name=RejectCode]').val();
|
||||
if (set != null && set != "请先添加不良代码") {
|
||||
$.ajax({
|
||||
url: "/App/ProductMaintain/selectExplain",
|
||||
data: { where: set },
|
||||
type: "post",// 提交方式
|
||||
success: function (res) {
|
||||
$('input[name=RejectDesc]').val(res);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$('RejectDesc').val("无");
|
||||
}
|
||||
}
|
||||
function actionProductShow() {
|
||||
try {
|
||||
var typeid = $('#Producttype').val();
|
||||
$("select[name='ProductID']").empty();
|
||||
$.ajax({
|
||||
url: "/App/ProductMaintain/actionProduct",
|
||||
data: { id: typeid},
|
||||
type: "post",// 提交方式
|
||||
success: function (res) {
|
||||
res = JSON.parse(res)
|
||||
for (var i = 0; i < res.length; i++) {
|
||||
|
||||
if (res[i].ID == localStorage.getItem("select_oy_ProductID") && localStorage.getItem("select_oy_ProductID") != null)
|
||||
{
|
||||
$("select[name='ProductID']").append(` <option selected='selected' value="` + res[i].ID + `">` + res[i].ProjectName + `</option>`);
|
||||
}
|
||||
else
|
||||
{
|
||||
$("select[name='ProductID']").append(` <option value="` + res[i].ID + `">` + res[i].ProjectName + `</option>`);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
}
|
||||
$.getScript("/Plugin/basicfunc.js");
|
||||
$.getScript("/Theme/js/jquery.form.min.js");
|
||||
|
||||
$(function () {
|
||||
$('#photo').on("change", function () {
|
||||
var file = this.files[0];
|
||||
if (this.files && file) {
|
||||
let reader = new FileReader();
|
||||
reader.onload = function (e) {
|
||||
$('#img1').attr('src', e.target.result);
|
||||
document.getElementById("img1").style.display = "inline";
|
||||
}
|
||||
reader.readAsDataURL(file);
|
||||
picturebase64 = file;
|
||||
}
|
||||
});
|
||||
})
|
||||
function uploadimg(type) {
|
||||
let files = $("#photo").prop("files");
|
||||
if (files.length <= 0)
|
||||
return;
|
||||
|
||||
if (type != 1)
|
||||
return;
|
||||
uploads();
|
||||
}
|
||||
|
||||
//图片转换base64
|
||||
function getBase64Image(img) {
|
||||
console.log(img.width);
|
||||
console.log(img.height);
|
||||
var canvas = document.createElement("canvas");
|
||||
console.log(canvas);
|
||||
canvas.width = img.width;
|
||||
canvas.height = img.height;
|
||||
var ctx = canvas.getContext("2d");
|
||||
ctx.drawImage(img, 0, 0, img.width, img.height);
|
||||
var ext = img.src.substring(img.src.lastIndexOf(".") + 1).toLowerCase();
|
||||
var dataURL = canvas.toDataURL("image/" + ext);
|
||||
return dataURL;
|
||||
}
|
||||
|
||||
// base64转blob
|
||||
const base64ToBlob = function (base64Data) {
|
||||
let arr = base64Data.split(','),
|
||||
fileType = arr[0].match(/:(.*?);/)[1],
|
||||
bstr = atob(arr[1]),
|
||||
l = bstr.length,
|
||||
u8Arr = new Uint8Array(l);
|
||||
|
||||
while (l--) {
|
||||
u8Arr[l] = bstr.charCodeAt(l);
|
||||
}
|
||||
return new Blob([u8Arr], {
|
||||
type: fileType
|
||||
});
|
||||
};
|
||||
// blob转file
|
||||
const blobToFile = function (newBlob, fileName) {
|
||||
newBlob.lastModifiedDate = new Date();
|
||||
newBlob.name = fileName;
|
||||
return newBlob;
|
||||
};
|
||||
//上传图片
|
||||
/*async*/ function uploadsimg() {
|
||||
let sun = document.getElementById("img1").src;
|
||||
if (sun != '' && sun != null)
|
||||
{
|
||||
const blob = base64ToBlob(getBase64Image(document.getElementById("img1")));
|
||||
console.log(blob)
|
||||
const file = blobToFile(blob, '123');
|
||||
var formData = new FormData() //创建一个forData
|
||||
try {
|
||||
formData.append('img', file) //把file添加进去 name命名为img
|
||||
} catch (e) {
|
||||
formData = null;
|
||||
}
|
||||
/*await*/ $.ajax({
|
||||
url: "/ImgServer/Update",
|
||||
data: formData,
|
||||
type: "POST",
|
||||
async: false,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
success: function (data) {//成功
|
||||
if (data == "" || data == null) {
|
||||
srclocation = null;
|
||||
layer.msg('未选择图片上传');
|
||||
}
|
||||
else {
|
||||
srclocation = data.data.src;
|
||||
document.getElementById("ProductImageshow").value = srclocation;
|
||||
layer.msg('图片上传成功');
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
layer.msg('图片上传失败');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
async function uploads() {
|
||||
var formData = new FormData() //创建一个forData
|
||||
try {
|
||||
formData.append('img', $('#photo')[0].files[0]) //把file添加进去 name命名为img
|
||||
} catch (e) {
|
||||
formData = null;
|
||||
}
|
||||
await $.ajax({
|
||||
url: "/ImgServer/Update",
|
||||
data: formData,
|
||||
type: "POST",
|
||||
async: false,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
success: function (data) {//成功
|
||||
if (data == "" || data == null) {
|
||||
srclocation = null;
|
||||
layer.msg('未选择图片上传');
|
||||
}
|
||||
else {
|
||||
srclocation = data.data.src;
|
||||
document.getElementById("ProductImageshow").value = srclocation;
|
||||
layer.msg('图片上传成功');
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
layer.msg('图片上传失败');
|
||||
}
|
||||
})
|
||||
}
|
||||
//追加
|
||||
function UpDate(btnID, url, formID) {
|
||||
var RejectCode = $("select[name='RejectCode']").val();
|
||||
var ProductID = $("select[name='ProductID']").val();
|
||||
var typeid = $('#Producttype').val();
|
||||
var Xxsm = $('#Xxsm').val();
|
||||
var Remark = $("input[name='Remark']").val();
|
||||
let sun = document.getElementById("img1").src;
|
||||
if (sun != '' && sun != null) {
|
||||
uploadsimg();
|
||||
$('#pej').attr("disabled", false);//取消下拉框禁用才能获取值
|
||||
//localStorage.clear();
|
||||
if ($("input[name='Barcode']").val().length > 0) {
|
||||
var btnText = $('#' + btnID).html();
|
||||
$('#' + btnID).attr("disabled", "true"); //设置禁用按钮
|
||||
$('#' + btnID).text('提交中...'); //显示提交中
|
||||
$('#' + formID).ajaxSubmit({
|
||||
url: url,
|
||||
type: "POST",
|
||||
success: function (res) {
|
||||
if (res.Status == 200) {
|
||||
localStorage.setItem("select_oy_RejectCode", RejectCode);//保存不良代码
|
||||
localStorage.setItem("select_oy_Producttype", typeid);//保存产品类型
|
||||
localStorage.setItem("select_oy_ProductID", ProductID);//保存产品
|
||||
localStorage.setItem("select_oy_Xxsm", Xxsm);//保存详细说明
|
||||
localStorage.setItem("select_oy_Remark", Remark);//保存详细说明
|
||||
$.toastr.success('添加成功',
|
||||
{
|
||||
position: 'top-center',
|
||||
time: 1000,
|
||||
callback: function () {
|
||||
}
|
||||
});
|
||||
$('#' + btnID).text(btnText); //还原显示
|
||||
$('#' + btnID).removeAttr('disabled')//重置按钮
|
||||
window.parent.location.reload();
|
||||
} else {
|
||||
$.toastr.error('添加失败',
|
||||
{
|
||||
position: 'top-center',
|
||||
time: 350,
|
||||
callback: function () {
|
||||
}
|
||||
});
|
||||
$('#' + btnID).text(btnText); //还原显示
|
||||
$('#' + btnID).removeAttr('disabled')//重置按钮
|
||||
}
|
||||
},
|
||||
error: function (error) {
|
||||
$('#' + btnID).removeAttr('disabled')//重置按钮
|
||||
$('#' + btnID).text(btnText); //还原显示
|
||||
alert(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
$.toastr.error('请输入条码',
|
||||
{
|
||||
position: 'top-center',
|
||||
time: 2000,
|
||||
callback: function () {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Swal.fire({
|
||||
title: '未添加图片是否保存',
|
||||
//text: "You won't be able to revert this!",
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: '保存'
|
||||
}).then((result) =>
|
||||
{
|
||||
if (result.isConfirmed) {
|
||||
$('#pej').attr("disabled", false);//取消下拉框禁用才能获取值
|
||||
//localStorage.clear();
|
||||
if ($("input[name='Barcode']").val().length > 0) {
|
||||
var btnText = $('#' + btnID).html();
|
||||
$('#' + btnID).attr("disabled", "true"); //设置禁用按钮
|
||||
$('#' + btnID).text('提交中...'); //显示提交中
|
||||
$('#' + formID).ajaxSubmit({
|
||||
url: url,
|
||||
type: "POST",
|
||||
success: function (res) {
|
||||
if (res.Status == 200) {
|
||||
localStorage.setItem("select_oy_RejectCode", RejectCode);//保存不良代码
|
||||
localStorage.setItem("select_oy_Producttype", typeid);//保存产品类型
|
||||
localStorage.setItem("select_oy_ProductID", ProductID);//保存产品
|
||||
localStorage.setItem("select_oy_Xxsm", Xxsm);//保存详细说明
|
||||
localStorage.setItem("select_oy_Remark", Remark);//保存详细说明
|
||||
$.toastr.success('添加成功',
|
||||
{
|
||||
position: 'top-center',
|
||||
time: 1000,
|
||||
callback: function () {
|
||||
}
|
||||
});
|
||||
$('#' + btnID).text(btnText); //还原显示
|
||||
$('#' + btnID).removeAttr('disabled')//重置按钮
|
||||
window.parent.location.reload();
|
||||
} else {
|
||||
$.toastr.error('添加失败',
|
||||
{
|
||||
position: 'top-center',
|
||||
time: 350,
|
||||
callback: function () {
|
||||
}
|
||||
});
|
||||
$('#' + btnID).text(btnText); //还原显示
|
||||
$('#' + btnID).removeAttr('disabled')//重置按钮
|
||||
}
|
||||
},
|
||||
error: function (error) {
|
||||
$('#' + btnID).removeAttr('disabled')//重置按钮
|
||||
$('#' + btnID).text(btnText); //还原显示
|
||||
alert(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
$.toastr.error('请输入条码',
|
||||
{
|
||||
position: 'top-center',
|
||||
time: 2000,
|
||||
callback: function () {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
</script>
|
||||
@@ -0,0 +1,56 @@
|
||||
|
||||
@{
|
||||
ViewBag.Title = "AddRejectsCode";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
|
||||
<script src="~/Plugin/basicfunc.js"></script>
|
||||
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link-partial">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link-partial">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<form class="form-horizontal" id="modifyPPlanForm">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">不良品代码</label>
|
||||
<div class="col-md-7">
|
||||
<input type="text" placeholder="请输入不良品代码" name="Matlab" class="form-control" value="" onblur="leave()">
|
||||
|
||||
</div>
|
||||
<label style="color:red" id="hintname"></label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">不良品说明</label>
|
||||
|
||||
<div class="col-md-7">
|
||||
<input type="text" placeholder="请输入不良品说明" name="Introductions" class="form-control" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">备注</label>
|
||||
<div class="col-md-7">
|
||||
<input type="text" placeholder="请输入备注" name="Remark" class="form-control" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-3 col-md-9">
|
||||
<button class="btn btn-md btn-primary" type="button" id="btnModifyPPlan" onclick="excutedUpDate('btnModifyPPlan','@Url.Action("AddRejectsCodeOperation", "ProductMaintain")','modifyPPlanForm','@Url.Action("RejectsCode", "ProductMaintain")')">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$.getScript("/Plugin/basicfunc.js");
|
||||
$.getScript("/Theme/js/jquery.form.min.js");
|
||||
</script>
|
||||
|
||||
578
AUTS.Web/Areas/App/Views/ProductMaintain/MMaintain.cshtml
Normal file
578
AUTS.Web/Areas/App/Views/ProductMaintain/MMaintain.cshtml
Normal file
@@ -0,0 +1,578 @@
|
||||
@model List<showModel>
|
||||
@using AUTS.Domain.Entities;
|
||||
@using AUTS.Domain.Application;
|
||||
@using AUTS.Web.Areas.App.Models;
|
||||
@{
|
||||
|
||||
ViewBag.Title = "MMaintain";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
List<AUTS.Domain.Entities.TBL_Project> Projectlist = AUTS.Services.Cache.CacheHelp.GetUserDBProjectList();//产品类型列表
|
||||
List<AUTS.Domain.Entities.TBL_UTS_Manage_User> userList = AUTS.Services.Cache.CacheHelp.GeiUserList();
|
||||
var RepairResultslist = ViewData["RepairResults"] as List<TBL_RepairResults>;//维修日志表
|
||||
//var StationListlist = ViewData["StationList"] as List<TBL_StationList>;//站位表
|
||||
//var Orderslist = ViewData["Orders"] as List<TBL_Orders>;//订单表
|
||||
var RepairTypeslist = ViewData["RepairTypes"] as List<TBL_RepairTypes>;//维修类型表
|
||||
var RepairReasonlist = ViewData["RepairReason"] as List<RepairReason>;//维修原因表
|
||||
var Customerlist = ViewData["Customer"] as List<TBL_Customer>;//客户表
|
||||
bool AccountBill = ViewData["AccountBill"].ToBool();//结单权限
|
||||
}
|
||||
<link href="~/Content/layui/css/layui.css" rel="stylesheet" />
|
||||
<script src="~/Content/layui/layui.js"></script>
|
||||
<style>
|
||||
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
|
||||
border-top: none;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.table > tbody + tbody {
|
||||
border-top: 0px;
|
||||
}
|
||||
|
||||
.table > tbody {
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
|
||||
td {
|
||||
color: black;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.gray {
|
||||
color: gray;
|
||||
}
|
||||
|
||||
.hideclass {
|
||||
display: none;
|
||||
}
|
||||
|
||||
button {
|
||||
width: 60px;
|
||||
}
|
||||
|
||||
.hideclassson_ {
|
||||
background-color: rgb(0,250,240);
|
||||
}
|
||||
</style>
|
||||
<div class="row wrapper border-bottom white-bg page-heading">
|
||||
<div class="col-lg-10">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<a href="@Url.Action("Index", "Home")">主页</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<strong>产品维修</strong>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
</div>
|
||||
</div>
|
||||
<div class="wrapper wrapper-content animated fadeInRight">
|
||||
<div class="row">
|
||||
<div class="col-sm-8" style="padding:0px;">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
|
||||
<div class="input-group m-b">
|
||||
<span class="input-group-addon">单号:</span>
|
||||
@*<input type="text" name="ProductImage" id="inquire" style="width:120px; height:30px;">*@
|
||||
<input type="text" class="form-control" name="ProductImage" id="inquire" style="height:35px;">
|
||||
</div>
|
||||
|
||||
<div class="input-group m-b">
|
||||
<span class="input-group-addon">条码:</span>
|
||||
@*<input type="text" name="ProductImage" id="inquire" style="width:120px; height:30px;">*@
|
||||
<input type="text" class="form-control" name="ProductImage" id="BarCode" style="height:35px;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="input-group m-b">
|
||||
<span class="input-group-addon">公司筛选:</span>
|
||||
<select id="Customer" class="form-control" style="display:inline;width:120px;">
|
||||
<option value="0">所有来源</option>
|
||||
@if (Customerlist != null)
|
||||
{
|
||||
for (int i = 0; i < Customerlist.Count; i++)
|
||||
{
|
||||
<option value="@Customerlist[i].CustomerName">@Customerlist[i].CustomerName</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group m-b">
|
||||
<span class="input-group-addon">日期:</span>
|
||||
<div class="form-inline visible-*-block" style="padding:1px 0;" id="data_5">
|
||||
<div class="input-daterange input-group visible-xs-2" id="datepicker">
|
||||
<input type="text" class="input-sm form-control" name="start" id="start" readonly />
|
||||
<span class="input-group-addon">至</span>
|
||||
<input type="text" class="input-sm form-control" name="end" id="end" readonly />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<button type="button" style="width:80px;" class="btn btn-primary" id="btnCapacitySearch" onclick="queryInfo('@Url.Action("RepairRequestSelect", "BasicFunc")')">筛选</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<div class="input-group">
|
||||
<a href="#" class="download" target="_blank" style="color:blue; visibility:hidden ">下载</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<div class="input-group">
|
||||
<button class="btn btn-primary btn-primary" style="width:120px;" type="button" id="btnaddPLine" onclick="gotoCommonPartial('@Url.Action("addOrder", "ProductMaintain")','projectBox_Content')"><a href="#projectBox_Content" style="color:aliceblue">添加维修表</a></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content" style="padding:0px;">
|
||||
|
||||
<div id="orderData">
|
||||
<div>
|
||||
<nav style="text-align:center;">
|
||||
|
||||
<ul class="pagination" id="page">
|
||||
<li class="first" onclick="firstPage('/App/BasicFunc/RepairRequestSelect')"><a>«</a></li>
|
||||
<li class="left"><a>…</a></li>
|
||||
@for (int i = 0; i < ViewBag.allpage; i++)
|
||||
{
|
||||
<li class="pages" onclick="SpecifyPage(@(i),'/App/BasicFunc/RepairRequestSelect')"><a>@(i + 1)</a></li>
|
||||
}
|
||||
<li class="right"><a>…</a></li>
|
||||
<li class="finally"><a onclick="lastPage('/App/BasicFunc/RepairRequestSelect')">»</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<table class="table dataTables-example" border="0">
|
||||
@{
|
||||
if (Model.Count > 0 && Model != null)
|
||||
{
|
||||
foreach (var item in Model)
|
||||
{
|
||||
<tbody class="tbodyList">
|
||||
<tr onclick="Showinfo(this)" class="callset">
|
||||
|
||||
|
||||
<td colspan="2" style="padding-left: 12px;font-size: 15px; color: #6495ED; width: 30.5%;"><strong></strong></td>
|
||||
<td style="padding-left:15px"></td>
|
||||
<td>
|
||||
<button type="button" class="layui-btn layui-btn-xs layui-btn-normal" style="background-color:#18a689; margin-top:15px;" onclick="AddMaintain('@item.RepairRequestNum','@item.RejectSource','@item.Repairier')"><a href="#projectBox_Content" style="color:aliceblue">添加</a></button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr onclick="Showinfo(this)" class="callset">
|
||||
<td colspan="3" style="padding-left: 10px; text-align:left; width: 30.5%;">单号:<span class="gray">@item.RepairRequestNum</span></td>
|
||||
<td>
|
||||
<button type="button" class="layui-btn layui-btn-xs layui-btn-normal" style="background-color:#18a689; margin-top:3px;" onclick="compile('@item.RepairRequestNum','@item.RejectSource')"><a href="#projectBox_Content" style="color:aliceblue">编辑</a></button>
|
||||
</td>
|
||||
<td>
|
||||
</tr>
|
||||
<tr onclick="Showinfo(this)" class="callset">
|
||||
@*不良品来源*@
|
||||
<td colspan="3" style="padding-left: 10px">
|
||||
不良品来源:<span class="gray">@item.RejectSource</span>
|
||||
</td>
|
||||
@if (item.ziLs[0].Statement == 1)
|
||||
{
|
||||
<td> <button type="button" class="layui-btn layui-btn-xs layui-btn-normal" style="background-color:#18a689; ">已结单</button></td>
|
||||
}
|
||||
else
|
||||
{
|
||||
if (AccountBill)
|
||||
{
|
||||
<td> <button type="button" class="layui-btn layui-btn-xs layui-btn-normal" style="background-color:#18a689;" onclick="Statement('@item.RepairRequestNum')">结单</button></td>
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
<td> <button type="button" class="layui-btn layui-btn-xs layui-btn-normal" style="background-color:#18a689;" onclick="alert('无权限')">结单</button></td>
|
||||
}
|
||||
}
|
||||
</tr>
|
||||
<tr onclick="Showinfo(this)" class="callset" style="height:10px;">
|
||||
<td colspan="3" style="padding-left: 10px">创建时间:<span class="gray">@item.ziLs.Last().CreateTime</span></td>
|
||||
<td>
|
||||
<button type="button" class="layui-btn layui-btn-xs layui-btn-normal" id="btnCapacitySearch" style="background-color:#18a689; margin-top:3px; height:25px;" onclick="ExportExcel('@item.RepairRequestNum')">导出</button>
|
||||
<a href="#" class="download" target="_blank" style="color:blue; visibility:hidden ">下载</a>
|
||||
</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr onclick="Showinfo(this)" class="callset">
|
||||
<td colspan="3" style="padding-left:10px">数量:<span class="gray">@item.ziLs.Count</span></td>
|
||||
|
||||
<td style="padding:0px 0px 0px 15px"></td>
|
||||
|
||||
</tr>
|
||||
@foreach (var item1 in item.ziLs)
|
||||
{
|
||||
<tr style="background-color: rgb(255,250,240); border-block-start: 1px dotted #808080" class="hideclass Showinfoson" onclick="Showinfoson(@item1.ID,this)">
|
||||
<td colspan="4" style="padding-left: 40px">
|
||||
产品条形码:<span class="gray">:@(item1.Barcode.ToString() != null ? item1.Barcode : "")</span>
|
||||
<button type="button" class="layui-btn layui-btn-xs layui-btn-normal" style="background-color:#DC143C;" onclick="redact(@item1.ID)"><a href="#projectBox_Content" style="color:aliceblue">编辑</a></button>
|
||||
@* <a class="Showinfoson_a" style="color:lightskyblue" onclick="Showinfoson(@item1.ID,this)">详细</a>*@
|
||||
</td>
|
||||
<td colspan="4"></td>
|
||||
</tr>
|
||||
|
||||
<tr style="background-color: rgb(255,250,240);" class="hideclass " onclick="Showinfoson(@item1.ID,this)">
|
||||
<td colspan="2" style="padding-left: 40px">
|
||||
机型:<span class="gray">@(item1.ProductID.ToString() != "" ? Projectlist.SingleOrDefault(x => x.ID == item1.ProductID) != null ? Projectlist.SingleOrDefault(x => x.ID == item1.ProductID).ProjectName : "" : "")</span>
|
||||
</td>
|
||||
<td colspan="2" style="padding-left: 40px">
|
||||
录入人:
|
||||
<span class="gray"> @(item1.UserID.ToString() != null ? (userList.SingleOrDefault(x => x.ID == item1.UserID) != null ? userList.SingleOrDefault(x => x.ID == item1.UserID).UserName : "无") : "无")</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="background-color: rgb(255,250,240);" class="hideclass " onclick="Showinfoson(@item1.ID,this)">
|
||||
<td colspan="2" style="padding-left: 40px">
|
||||
|
||||
|
||||
返修方案:
|
||||
@if (item1.theLog != null)
|
||||
{
|
||||
<span class="gray">
|
||||
nav style="text-align:center
|
||||
@item1.theLog.RepairComment;
|
||||
</span>
|
||||
}
|
||||
</td>
|
||||
<td colspan="2" style="padding-left: 40px"> 业务员:<span class="gray" >@item1.Salesman</span></td>
|
||||
</tr>
|
||||
<tr style="background-color: rgb(255,250,240);" class="hideclass" onclick="Showinfoson(@item1.ID,this)">
|
||||
<td colspan="4" style="padding-left: 40px">
|
||||
|
||||
结果:
|
||||
@if (item1.theLog != null)
|
||||
{
|
||||
<span class="gray">
|
||||
@(item1.theLog.RepairResult.ToString() != null ? RepairResultslist.SingleOrDefault(x => x.ID == item1.theLog.RepairResult).Name : "");
|
||||
</span>
|
||||
}
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="background-color: rgb(220,220,220); display: none;" class="hideclassson_@item1.ID">
|
||||
<td colspan="4" style="padding-left: 40px">
|
||||
<span class="gray">报修单:-------------------------------------</span>
|
||||
</td>
|
||||
</tr>
|
||||
@*<tr style="background-color: rgb(220,220,220); display: none;" class="hideclassson_@item1.ID">
|
||||
<td colspan="2" style="padding-left: 40px">
|
||||
<span class="gray">
|
||||
报修人:
|
||||
</span>
|
||||
</td>
|
||||
<td colspan="2" style="padding-left: 40px">
|
||||
<span class="gray">业务员:@item1.Salesman</span>
|
||||
</td>
|
||||
</tr>*@
|
||||
<tr class="hideclassson_@item1.ID" style="background-color: rgb(220,220,220); display: none;">
|
||||
<td colspan="2" style="padding-left: 40px">
|
||||
<span class="gray">不良代码:@item1.RejectDesc</span>
|
||||
</td>
|
||||
<td colspan="2" style="padding-left: 40px">
|
||||
<span class="gray">详细说明:@item1.DetailRemark </span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="hideclassson_@item1.ID" style="background-color:rgb(220,220,220); display: none;">
|
||||
<td colspan="2" style="padding-left: 40px">
|
||||
<span class="gray">维修进度: @item1.RepairProgress</span>
|
||||
</td>
|
||||
<td colspan="4" style="padding-left: 40px">
|
||||
<span class="gray">备注:@item1.Remark </span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="hideclassson_@item1.ID" style="background-color:rgb(220,220,220); display: none;">
|
||||
<td colspan="2" style="padding-left: 40px">
|
||||
<span class="gray">
|
||||
费用承担方:
|
||||
@if (item1.Payer == 1)
|
||||
{
|
||||
<span>公司承担</span>
|
||||
}
|
||||
else if (item1.Payer == 2)
|
||||
{
|
||||
<span>客户承担</span>
|
||||
}
|
||||
</span>
|
||||
</td>
|
||||
<td colspan="4" style="padding-left: 40px">
|
||||
<span class="gray">
|
||||
修后流向:
|
||||
@if (item1.Storage == 1)
|
||||
{
|
||||
<span>退回仓库</span>
|
||||
}
|
||||
else if (item1.Storage == 2)
|
||||
{
|
||||
<span>退回客户</span>
|
||||
}
|
||||
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="hideclassson_@item1.ID" style="background-color:rgb(220,220,220); display: none;">
|
||||
<td colspan="2" style="padding-left: 40px">
|
||||
<span class="gray">保修图片:</span>
|
||||
</td>
|
||||
<td colspan="4" style="padding-left: 40px">
|
||||
<img id="images" data-src="/BasicFunc/FileImage?url=@(item1.ProductImage)" src="~/Images/tupian.jpg" style="margin:0px; height:60px; width:60px;">
|
||||
@*<span class="gray"><img id="images" src="/BasicFunc/FileImage?url=@(item1.ProductImage)" style="margin:0px;"></span>*@
|
||||
</td>
|
||||
</tr>
|
||||
if (item1.theLog != null)
|
||||
{
|
||||
<tr class="hideclassson_@item1.ID" style="background-color: rgb(220,220,220); display: none;">
|
||||
<td colspan="4" style="padding-left: 40px">
|
||||
<span class="gray">维修单:-----------------------------</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="hideclassson_@item1.ID" style="background-color:rgb(220,220,220); display: none;">
|
||||
<td colspan="2" style="padding-left: 40px">
|
||||
<span class="gray">维修类型:@(item1.theLog.RepairType.ToString() != null ? RepairTypeslist.SingleOrDefault(x => x.ID == item1.theLog.RepairType).Name : "")</span>
|
||||
</td>
|
||||
<td colspan="2" style="padding-left: 40px">
|
||||
<span class="gray">维修原因:@(item1.theLog.RepairReason.ToString() != null ? RepairReasonlist.SingleOrDefault(x => x.ID == item1.theLog.RepairReason).Name : "")</span>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
else
|
||||
{
|
||||
<tr class="hideclassson_@item1.ID" style="background-color: rgb(220,220,220); display: none;">
|
||||
<td colspan="4" style="padding-left: 40px">
|
||||
<span class="gray">-----------------------------</span>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
}
|
||||
</tbody>
|
||||
}
|
||||
}
|
||||
}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4" id="projectBox_Content">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="~/Theme/js/bootstrap-datepicker.min.js"></script>
|
||||
<script src="~/Theme/js/plugins/datapicker/locales/bootstrap-datepicker.zh-CN.js"></script>
|
||||
<script src="~/Plugin/allPages.js"></script>
|
||||
<script src="~/Theme/js/plugins/dataTables/datatables.min.js"></script>
|
||||
<script src="~/Scripts/jquery-editable-select.js"></script>
|
||||
<script src="~/Plugin/sweetalert2@11.js"></script>
|
||||
<script src="~/Plugin/loadImage.js"></script>
|
||||
<script>
|
||||
$('#end').datepicker({
|
||||
language: "zh-CN",//语言
|
||||
todayBtn: "linked",//今日按钮
|
||||
autoclose: true,//选择后关闭日期选择
|
||||
format: "yyyy/mm/dd",//日期格式
|
||||
clearBtn: true, // 清空按钮,点击该按钮,输入框中没有内容
|
||||
});
|
||||
$('#start').datepicker({
|
||||
language: "zh-CN",//语言
|
||||
todayBtn: "linked",//今日按钮
|
||||
autoclose: true,//选择后关闭日期选择
|
||||
format: "yyyy/mm/dd",//日期格式
|
||||
clearBtn: true, // 清空按钮,点击该按钮,输入框中没有内容
|
||||
});
|
||||
$("#start").datepicker('setEndDate',"@DateTime.Now.ToString("yyyy-MM-dd")");
|
||||
$("#end").datepicker('setEndDate',"@DateTime.Now.ToString("yyyy-MM-dd")");
|
||||
|
||||
function skip() {
|
||||
//window.location.href = '/App/ProductMaintain/AddMaintain';
|
||||
layer.open({
|
||||
type: 2
|
||||
, content: '/App/ProductMaintain/addOrder'//内容,html
|
||||
, title: '添加产品维修' //标题栏
|
||||
, closeBtn: 1//右上角关闭
|
||||
, area: screen() < 2 ? ['90%', '80%'] : ['30%', '80%']
|
||||
, shade: 0.1
|
||||
, id: '0' //设定一个id,防止重复弹出
|
||||
, moveType: 0 //拖拽模式,0或者
|
||||
});
|
||||
}
|
||||
//判断浏览器大小方法
|
||||
function screen() {
|
||||
//获取当前窗口的宽度
|
||||
var width = $(window).width();
|
||||
if (width > 1200) {
|
||||
return 3; //大屏幕
|
||||
} else if (width > 992) {
|
||||
return 2; //中屏幕
|
||||
} else if (width > 768) {
|
||||
return 1; //小屏幕
|
||||
} else {
|
||||
return 0; //超小屏幕
|
||||
}
|
||||
}
|
||||
function Showinfo(that) {
|
||||
event.stopPropagation();
|
||||
$(that).siblings('.hideclass').toggle();
|
||||
if ($(that).siblings('.hideclass').css('display') == "none") {
|
||||
$($(that).siblings('.Showinfoson')).click();
|
||||
$(that).siblings('.callset').css("background-color", "");
|
||||
$(that).css("background-color", "");
|
||||
} else {
|
||||
$(that).siblings('.callset').css("background-color", "rgb(255,250,240)");
|
||||
$(that).css("background-color", "rgb(255,250,240)");
|
||||
}
|
||||
}
|
||||
function Showinfoson(that, tr) {
|
||||
event.stopPropagation();
|
||||
if ($(tr).closest('.Showinfoson').siblings('.hideclass').css('display') == "none") {
|
||||
$(tr).siblings('.hideclassson_' + that).hide();
|
||||
} else {
|
||||
$(tr).siblings('.hideclassson_' + that).toggle();
|
||||
}
|
||||
$(tr)
|
||||
}
|
||||
/**
|
||||
* 产品追加方法
|
||||
*/
|
||||
function AddMaintain(RepairRequestNum, RejectSource, Repairier) {
|
||||
event.stopPropagation();
|
||||
//var event = window.event || arguments.callee.caller.arguments[0]
|
||||
//event.stopPropagation();
|
||||
//layer.open({
|
||||
// type: 2
|
||||
// , content: '/App/ProductMaintain/AddMaintain?RepairRequestNum=' + RepairRequestNum + '&&RejectSource=' + RejectSource + "&&Repairier=" + Repairier//内容,html
|
||||
// , title: '追加产品维修' //标题栏
|
||||
// , closeBtn: 1//右上角关闭
|
||||
// , area: screen() < 2 ? ['90%', '80%'] : ['600px', '700px']
|
||||
// , shade: 0.1
|
||||
// , id: '0' //设定一个id,防止重复弹出
|
||||
// , moveType: 0 //拖拽模式,0或者
|
||||
//});
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '/App/ProductMaintain/AddMaintain',
|
||||
data: { RepairRequestNum: RepairRequestNum, RejectSource: RejectSource, Repairier: Repairier },
|
||||
success: function (data) {
|
||||
$('#projectBox_Content').html(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
function compile(odd, comp) {
|
||||
event.stopPropagation()
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '/App/ProductMaintain/compileMaintain',
|
||||
data: { odd: odd, company: comp },
|
||||
success: function (data) {
|
||||
$('#projectBox_Content').html(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
function redact(id) {
|
||||
event.stopPropagation()
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '/App/ProductMaintain/compilRepairLog',
|
||||
data: { id: id },
|
||||
success: function (data) {
|
||||
$('#projectBox_Content').html(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
function Statement(Sn) {
|
||||
event.stopPropagation()
|
||||
var srt = confirm("确认要结单吗?")
|
||||
if (srt) {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '/App/ProductMaintain/Statement',
|
||||
data: { RepairRequestNum: Sn },
|
||||
success: function (data) {
|
||||
if (data.Status == 200) {
|
||||
$.toastr.success('结单成功',
|
||||
{
|
||||
position: 'top-center',
|
||||
time: 1000,
|
||||
callback: function () {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$.toastr.error('结单失败',
|
||||
{
|
||||
position: 'top-center',
|
||||
time: 350,
|
||||
callback: function () {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function ExportExcel(data) {
|
||||
|
||||
|
||||
event.stopPropagation();
|
||||
Swal.fire({
|
||||
title: '是否要导出数据',
|
||||
//text: "You won't be able to revert this!",
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: '导出'
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
Swal.fire(
|
||||
'请等待!'
|
||||
)
|
||||
window.open("/APP/TestLog/Excel_Maintain?data=" + data);
|
||||
return;
|
||||
//var grouping = $("input[name='hide']:checked").val();
|
||||
//$.ajax({
|
||||
// type: "get",
|
||||
// url: "/APP/TestLog/Excel_Maintain",
|
||||
// cache: false,
|
||||
// data: {
|
||||
// "data": data
|
||||
// },
|
||||
// success: function (res) {
|
||||
// console.log(res);
|
||||
// if (res.Status == 200) {
|
||||
// $.toastr.success('导出成功请点击下载。', {
|
||||
// time: 3000,
|
||||
// position: 'top-center'
|
||||
// });
|
||||
// $(".download").show();
|
||||
// $(".download").attr("href", res.Message);
|
||||
// window.open(res.Message);
|
||||
|
||||
// } else {
|
||||
// $.toastr.error('网络异常,请稍后再试。', {
|
||||
// time: 3000,
|
||||
// position: 'top-center'
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
//});
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
440
AUTS.Web/Areas/App/Views/ProductMaintain/MaintainLog.cshtml
Normal file
440
AUTS.Web/Areas/App/Views/ProductMaintain/MaintainLog.cshtml
Normal file
@@ -0,0 +1,440 @@
|
||||
@model List<AUTS.Domain.Application.TBL_RepairLog>
|
||||
@{
|
||||
ViewBag.Title = "MaintainLog";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
List<AUTS.Domain.Entities.TBL_Project> Projectlist = AUTS.Services.Cache.CacheHelp.GetUserDBProjectList();//机型列表
|
||||
List<AUTS.Domain.Entities.TBL_Orders> Orderslist = AUTS.Services.Cache.CacheHelp.GetUserDBOrderList();//订单表
|
||||
List<AUTS.Domain.Application.TBL_RepairTypes> Repairlist = AUTS.Services.Cache.CacheHelp.GetUserDBSnRepairTypesList();//维修类型列表
|
||||
List<AUTS.Domain.Application.TBL_RepairReason> Repairreasonlist = AUTS.Services.Cache.CacheHelp.GetUserDBRepairReasonList();//维修原因列表
|
||||
List<AUTS.Domain.Application.TBL_RepairResults> RepairResultslist = AUTS.Services.Cache.CacheHelp.GetUserDBRepairResultsList();//维修结果列表
|
||||
//List<AUTS.Domain.Entities.TBL_ProductTypes> ProductTypes = AUTS.Services.Cache.CacheHelp.GetUserDBProjectTypeList();//产品列表
|
||||
List<AUTS.Domain.Entities.TBL_StationList> StationList = AUTS.Services.Cache.CacheHelp.GetUserDBStationList();//站位列表
|
||||
List<AUTS.Domain.Entities.TBL_UTS_Manage_User> Userlist = ViewData["Company"] as List<AUTS.Domain.Entities.TBL_UTS_Manage_User>;
|
||||
List<AUTS.Domain.Entities.TBL_SnList> SNlist = AUTS.Services.Cache.CacheHelp.GetUserDBPSnlist();//订单表
|
||||
}
|
||||
<style>
|
||||
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
|
||||
border-top: none;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.table > tbody + tbody {
|
||||
border-top: 0px;
|
||||
}
|
||||
|
||||
.table > tbody {
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
|
||||
td {
|
||||
color: black;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.gray {
|
||||
color: gray;
|
||||
}
|
||||
|
||||
.callset {
|
||||
display: none;
|
||||
}
|
||||
|
||||
button {
|
||||
width: 60px;
|
||||
}
|
||||
|
||||
.hideclassson_ {
|
||||
background-color: rgb(0,250,240);
|
||||
}
|
||||
</style>
|
||||
<meta charset="utf-8">
|
||||
<div class="wrapper wrapper-content animated fadeInRight">
|
||||
<div class="row">
|
||||
<div class="col-sm-8" style="padding:0px;">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>维修表</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
|
||||
<div class="input-group m-b">
|
||||
<span class="input-group-addon">机型:</span>
|
||||
<select class="input-sm form-control input-s-sm inline" id="projectList" onclick="actionProductShow()" style="height:35px;">
|
||||
<option value="0">全部</option>
|
||||
@if (Projectlist != null && Projectlist.Count > 0)
|
||||
{
|
||||
foreach (var item in Projectlist)
|
||||
{
|
||||
<option value="@item.ID">@item.ProjectName</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
|
||||
<div class="input-group m-b">
|
||||
<span class="input-group-addon">单号/SN:</span>
|
||||
<input type="text" class="form-control" id="BarCode" style="height:35px;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
|
||||
<div class="input-group m-b">
|
||||
<span class="input-group-addon">维修类型:</span>
|
||||
<select class="input-sm form-control input-s-sm inline" name="projectid" id="projectid" style="height:35px;">
|
||||
<option value="0">全部</option>
|
||||
<option value="1">产线返修</option>
|
||||
<option value="2">市场返修</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
|
||||
<div class="input-group m-b">
|
||||
<span class="input-group-addon">维修人:</span>
|
||||
<select class="input-sm form-control input-s-sm inline" name="projectid" id="Userid" style="height:35px;">
|
||||
<option value="0">全部</option>
|
||||
@if (Userlist != null && Userlist.Count > 0)
|
||||
{
|
||||
foreach (var item in Userlist)
|
||||
{
|
||||
<option value="@item.ID">@item.UserName</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div class="input-group m-b">
|
||||
<span class="input-group-addon">站位:</span>
|
||||
<select class="input-sm form-control input-s-sm inline" name="StationID" style="height:35px;"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group m-b">
|
||||
<span class="input-group-addon">日期:</span>
|
||||
<div class="form-inline visible-*-block" style="padding:1px 0;" id="data_5">
|
||||
<div class="input-daterange input-group visible-xs-2" id="datepicker">
|
||||
<input type="text" class="input-sm form-control" name="start" id="start" readonly />
|
||||
<span class="input-group-addon">至</span>
|
||||
<input type="text" class="input-sm form-control" name="end" id="end" readonly />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="input-group">
|
||||
<button type="button" class="btn btn-primary" id="btnCapacitySearch" onclick="Tiemwhere('@Url.Action("MaintainLogSelect", "BasicFunc")')">查询</button>
|
||||
<button type="button" style="width:90px;" class="btn btn-primary" id="btnCapacitySearch" onclick="getCon()">Excel导出</button>
|
||||
<a href="#" class="download" target="_blank" style="color:blue; visibility:hidden ">下载</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="orderData" style="background-color:#FFFFFF">
|
||||
<div>
|
||||
<nav style="text-align:center;">
|
||||
|
||||
<ul class="pagination" id="page">
|
||||
<li class="first" onclick="firstPage('/App/BasicFunc/MaintainLogSelect')"><a>«</a></li>
|
||||
<li class="left"><a>…</a></li>
|
||||
@for (int i = 0; i < ViewBag.allpage; i++)
|
||||
{
|
||||
<li class="pages" onclick="SpecifyPage(@(i),'/App/BasicFunc/MaintainLogSelect')"><a>@(i + 1)</a></li>
|
||||
}
|
||||
<li class="right"><a>…</a></li>
|
||||
<li class="finally"><a onclick="lastPage('/App/BasicFunc/MaintainLogSelect')">»</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<table class="table dataTables-example" border="0">
|
||||
@{
|
||||
|
||||
if (Model.Count > 0 && Model != null)
|
||||
{
|
||||
foreach (var item in Model)
|
||||
{
|
||||
<tbody class="tbodyList">
|
||||
<tr onclick="Showinfoson(this)">
|
||||
@*提交人员*@
|
||||
<td colspan="2" style="padding-left: 10px;font-size:15px; color: #6495ED; width: 30.5%;"><strong>@item.DUT_SN</strong></td>
|
||||
@*<td style="padding-left:15px"></td>*@
|
||||
@*<td style="padding-left: 10px;font-size: 15px; color: #6495ED; width: 30.5%;"><strong>@item.FailMsg</strong></td>*@
|
||||
<td colspan="3" style="padding-left: 10px; text-align:left; width: 30.5%;"><span class="gray"><strong>@item.FailMsg</strong></span></td>
|
||||
</tr>
|
||||
<tr></tr>
|
||||
<tr onclick="Showinfoson(this)">
|
||||
<td colspan="2" style="padding-left: 10px; text-align:left; width: 30.5%;">
|
||||
机型:
|
||||
<span class="gray">
|
||||
@{
|
||||
string sum = item.DUT_SN.Trim().ToUpper();
|
||||
<span>@(Projectlist.SingleOrDefault(x => x.ID == (SNlist.SingleOrDefault(j => j.BarCode == sum) != null ? SNlist.SingleOrDefault(j => j.BarCode == sum).ProductID : 0)) != null ? Projectlist.SingleOrDefault(x => x.ID == (SNlist.SingleOrDefault(j => j.BarCode == sum) != null ? SNlist.SingleOrDefault(j => j.BarCode == sum).ProductID : 0)).ProjectName : "")</span>
|
||||
}
|
||||
</span>
|
||||
</td>
|
||||
<td colspan="2" style="padding-left: 10px; text-align:left; width: 30.5%;">
|
||||
@if (item.RepairSource == "产线返修")
|
||||
{
|
||||
<soan>订单:<span class="gray">@(item.OrderID.ToString() != "" && item.OrderID != 0 ? Orderslist.Count != 0 ? Orderslist.SingleOrDefault(x => x.ID == item.OrderID).OrderNo : "" : "无订单")</span></soan>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="gray">返修来源订单号: @item.DocuNumber</span>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr onclick="Showinfoson(this)">
|
||||
<td colspan="2" style="padding-left: 10px">
|
||||
站位:@(item.StationID.ToString() != "" ? StationList.Count != 0 && item.StationID != 0 ? StationList.SingleOrDefault(x => x.ID == item.StationID).StationName : "无" : "无")
|
||||
</td>
|
||||
<td colspan="2" style="padding-left: 10px" class="gray">
|
||||
错误步骤:@item.FailSteps
|
||||
</td>
|
||||
</tr>
|
||||
<tr onclick="Showinfoson(this)">
|
||||
<td colspan="2" style="padding-left: 10px">维修产品日期:@item.RepairDate.ToString("yyyy-MM-dd")</td>
|
||||
<td colspan="2" style="padding-left: 10px; text-align:left; width: 30.5%;"><span class="gray">错误提示信息:@item.FailMsg</span></td>
|
||||
</tr>
|
||||
|
||||
<tr style="border-block-start: 1px dotted #808080" class="callset">
|
||||
<td colspan="2" style="padding-left: 10px">
|
||||
<span class="gray">产品错误代码:@item.ErrCode</span>
|
||||
</td>
|
||||
<td colspan="2"></td>
|
||||
</tr>
|
||||
<tr class="callset">
|
||||
<td colspan="2" style="padding-left: 10px">
|
||||
维修产品日期: @item.RepairDate
|
||||
</td>
|
||||
<td rowspan="2" style="padding-left: 10px">
|
||||
@*<img id="images" src="/BasicFunc/FileImage?url=@(item.ProductImg1)" style="margin:0px;">*@
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="callset">
|
||||
<td colspan="2" style="padding-left: 10px">
|
||||
|
||||
维修类型:@(item.RepairType.ToString() != "" ? Repairlist.Count != 0 ? Repairlist.SingleOrDefault(x => x.ID == item.RepairType).Name : "" : "")
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="callset">
|
||||
<td colspan="2" style="padding-left: 10px">
|
||||
不良原因: @(item.RepairReason.ToString() != "" ? Repairreasonlist.Count != 0 ? Repairreasonlist.SingleOrDefault(x => x.ID == item.RepairReason).Name : "" : "")
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="callset">
|
||||
<td colspan="2" style="padding-left: 10px">
|
||||
|
||||
<span class="gray">
|
||||
维修员注释: @item.RepairComment
|
||||
</span>
|
||||
</td>
|
||||
<td colspan="2" style="padding-left: 10px">
|
||||
@*<span class="gray">返修来源订单号: @item.DocuNumber</span>*@
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="callset">
|
||||
<td colspan="2" style="padding-left: 10px">
|
||||
<span class="gray">维修来源:@item.RepairSource</span>
|
||||
</td>
|
||||
<td colspan="2" style="padding-left: 10px">
|
||||
<span class="gray">维修产品结果:@(item.RepairResult.ToString() != "" ? RepairResultslist.Count != 0 ? RepairResultslist.SingleOrDefault(s => s.ID == item.RepairResult).Name : "" : "") </span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
}
|
||||
}
|
||||
}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4" id="projectBox_Content">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="~/Theme/js/bootstrap-datepicker.min.js"></script>
|
||||
<script src="~/Theme/js/plugins/datapicker/locales/bootstrap-datepicker.zh-CN.js"></script>
|
||||
<script src="~/Plugin/allPages.js"></script>
|
||||
<script src="~/Plugin/MaintainLog.js"></script>
|
||||
@*<script src="//cdn.jsdelivr.net/npm/sweetalert2@11"></script>*@
|
||||
<script src="~/Plugin/sweetalert2@11.js"></script>
|
||||
<script>
|
||||
$('#end').datepicker({
|
||||
language: "zh-CN",//语言
|
||||
todayBtn: "linked",//今日按钮
|
||||
autoclose: true,//选择后关闭日期选择
|
||||
format: "yyyy/mm/dd",//日期格式
|
||||
clearBtn: true, // 清空按钮,点击该按钮,输入框中没有内容
|
||||
});
|
||||
$('#start').datepicker({
|
||||
language: "zh-CN",//语言
|
||||
todayBtn: "linked",//今日按钮
|
||||
autoclose: true,//选择后关闭日期选择
|
||||
format: "yyyy/mm/dd",//日期格式
|
||||
clearBtn: true, // 清空按钮,点击该按钮,输入框中没有内容
|
||||
});
|
||||
$("#start").datepicker('setEndDate',"@DateTime.Now.ToString("yyyy-MM-dd")");
|
||||
$("#end").datepicker('setEndDate',"@DateTime.Now.ToString("yyyy-MM-dd")");
|
||||
|
||||
function Showinfoson(that) {
|
||||
$(that).siblings('.callset').toggle();
|
||||
}
|
||||
|
||||
function ExportExcel() {
|
||||
|
||||
//var data = getCondition(1);
|
||||
//window.open("/APP/TestLog/Excel_RepairLog?data=" + data);
|
||||
Swal.fire({
|
||||
title: '是否导出Excel',
|
||||
//text: "You won't be able to revert this!",
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: '导出'
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
Swal.fire(
|
||||
'请等待!'
|
||||
)
|
||||
var ServiceListID = $("#ServiceList").val();
|
||||
var data = getCondition(1);
|
||||
|
||||
var grouping = $("input[name='hide']:checked").val();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
//responseType: 'blob',
|
||||
url: "/APP/TestLog/Excel_RepairLog",
|
||||
|
||||
cache: false,
|
||||
data: {
|
||||
"data": data,"ServiceListID": ServiceListID
|
||||
},
|
||||
success: function (res) {
|
||||
//const blob = new Blob(["\ufeff",res], {
|
||||
// type: 'application/vnd.ms-excel;charset=utf-8',
|
||||
//});
|
||||
//const fileName = Date.parse(new Date()) +'.xls';
|
||||
//const elink = document.createElement('a');
|
||||
//elink.download = fileName;
|
||||
//elink.style.display = 'none';
|
||||
//elink.href = URL.createObjectURL(blob);
|
||||
//document.body.appendChild(elink);
|
||||
//elink.click();
|
||||
//URL.revokeObjectURL(elink.href); // 释放URL 对象
|
||||
//document.body.removeChild(elink);
|
||||
//window.open(res);
|
||||
return;
|
||||
//if (res.Status == 200) {
|
||||
// $.toastr.success('导出成功请点击下载。', {
|
||||
// time: 3000,
|
||||
// position: 'top-center'
|
||||
// });
|
||||
// window.open();
|
||||
|
||||
//} else {
|
||||
// $.toastr.error('网络异常,请稍后再试。', {
|
||||
// time: 3000,
|
||||
// position: 'top-center'
|
||||
// });
|
||||
//}
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function getCon()
|
||||
{
|
||||
var SN = $('#BarCode').val();//SN号或者订单号
|
||||
var project = $('#projectid').val();//维修类型
|
||||
var projectID = $("#projectList").val();//产品
|
||||
var Station = $("select[name = 'StationID']").val();//站位
|
||||
var company = $("#Userid").val();
|
||||
var startTime = $('#start').bind().val();//起始时间
|
||||
var EndTime = $('#end').bind().val();//结束时间
|
||||
Excel(SN, project, projectID, Station, company, startTime, EndTime);
|
||||
}
|
||||
function Excel(SN, project, projectID, Station, company, startTime, EndTime)
|
||||
{
|
||||
Swal.fire({
|
||||
title: '是否导出Excel',
|
||||
//text: "You won't be able to revert this!",
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: '导出'
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
Swal.fire(
|
||||
'请等待!'
|
||||
)
|
||||
window.open("/APP/TestLog/Excel_RepairLoger?SN=" + SN + '&project=' + project + '&Station=' + Station + '&company=' + company + '&startTime=' + startTime + '&EndTime=' + EndTime + '&projectID=' + projectID);
|
||||
return;
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
function getCondition(page) {
|
||||
var company = $("#CompanyList").val();
|
||||
var projectID = $("#projectList").val();//产品
|
||||
var statusID = $("#StatusList").val();
|
||||
var property = $("#ValidProduct").val();
|
||||
var pType = $("#ProductType").val();
|
||||
var search = $("#searchData").val();
|
||||
var search = $("#searchData").val();
|
||||
var search = $("#searchData").val();
|
||||
var Customer = $("#Customer").val();//不良品
|
||||
var inquire = $("#inquire").val();
|
||||
var verdict = $('#verdict').val();//判断是当天,3天,7天,30天
|
||||
var SN = $('#BarCode').val();//SN号或者订单号
|
||||
var project = $('#projectid').val();//维修类型
|
||||
var Station = $("select[name = 'StationID']").val();//站位
|
||||
var startTime = $('#start').bind().val();//起始时间
|
||||
var EndTime = $('#end').bind().val();//结束时间
|
||||
var Userid = $('#Userid').val();//操作人
|
||||
console.log(Userid);
|
||||
var data = {
|
||||
OInteriorID: "1",
|
||||
OrderNo: "2",
|
||||
ProjectID: projectID,
|
||||
//CustomerAbbr: company,
|
||||
OStatus: statusID,
|
||||
Property: property,
|
||||
ProductType: pType,
|
||||
Search: search,
|
||||
company: Customer,
|
||||
inquire: inquire,
|
||||
Day: verdict,
|
||||
Snmark: SN,
|
||||
repair: project,
|
||||
StationID: Station,
|
||||
startTime: startTime,
|
||||
EndTime: EndTime,
|
||||
CustomerAbbr: Userid,
|
||||
Pages: page
|
||||
};
|
||||
return data;
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
139
AUTS.Web/Areas/App/Views/ProductMaintain/RejectsCode.cshtml
Normal file
139
AUTS.Web/Areas/App/Views/ProductMaintain/RejectsCode.cshtml
Normal file
@@ -0,0 +1,139 @@
|
||||
@model List<AUTS.Domain.Application.TBL_RejectsExplain>
|
||||
@{
|
||||
ViewBag.Title = "RejectsCode";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
|
||||
<style>
|
||||
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
|
||||
border-top: none;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.table > tbody + tbody {
|
||||
border-top: 0px;
|
||||
}
|
||||
|
||||
.table > tbody {
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
|
||||
td {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.gray {
|
||||
color: gray;
|
||||
}
|
||||
|
||||
.hideclass {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<div class="row wrapper border-bottom white-bg page-heading">
|
||||
<div class="col-lg-10">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<a href="@Url.Action("Index", "Home")">主页</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<strong>产品维修</strong>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight">
|
||||
<div class="row">
|
||||
<div class="col-sm-8" style="padding:0px;">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<div class="ibox-tools">
|
||||
@*<button class="btn btn-sm btn-primary" type="button" id="btnaddUser" onclick="gotoCommonPartial('@Url.Action("ProjectDetails", "BasicFunc")','projectBox_Content')">添加产品</button>*@
|
||||
<button class="btn btn-sm btn-primary" type="button" id="btnaddPLine" onclick="skip()">添加不良代码</button>
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-xs-6" style="padding:0px;">
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-10" style="padding-right:0px;">
|
||||
</div>
|
||||
<div class="col-xs-1" style="padding:0px;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="ibox-content" style="padding:0px;">
|
||||
|
||||
<div id="orderData">
|
||||
<div>
|
||||
<nav style="text-align:center;">
|
||||
|
||||
<ul class="pagination" id="page">
|
||||
<li class="first" onclick="firstPage('/App/BasicFunc/RejectsExplainSelect')"><a>«</a></li>
|
||||
<li class="left"><a>…</a></li>
|
||||
@for (int i = 0; i < ViewBag.allpage; i++)
|
||||
{
|
||||
<li class="pages" onclick="SpecifyPage(@(i),'/App/BasicFunc/RejectsExplainSelect')"><a>@(i + 1)</a></li>
|
||||
}
|
||||
<li class="right"><a>…</a></li>
|
||||
<li class="finally"><a onclick="lastPage('/App/BasicFunc/RejectsExplainSelect')">»</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<table class="table dataTables-example" border="0">
|
||||
@if (Model != null && Model.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < Model.Count; i++)
|
||||
{
|
||||
<tbody class="tbodyList">
|
||||
<tr>
|
||||
<td rowspan="5" style="margin:0px;padding:0px;width:75px"></td>
|
||||
<td style="font-size:15px;color:#6495ED;"><strong>不良代码:</strong><span style="color:black">@Model[i].Matlab</span></td>
|
||||
<td style="font-size:15px;color:#6495ED;"><strong>说明:</strong><span style="color:black">@Model[i].Introductions</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color:#808080">
|
||||
创建时间:@Model[i].CreationTime.ToString("yyyy-dd-mm")
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
不良品备注:@(Model[i].Remark != null ? Model[i].Remark : "无备注")
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
}
|
||||
}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4" id="projectBox_Content">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="~/Plugin/allPages.js"></script>
|
||||
<script src="~/Theme/js/plugins/dataTables/datatables.min.js"></script>
|
||||
<script>
|
||||
function skip() {
|
||||
window.location.href = '/App/ProductMaintain/AddRejectsCode';
|
||||
}
|
||||
</script>
|
||||
44
AUTS.Web/Areas/App/Views/ProductMaintain/_RejectsCode.cshtml
Normal file
44
AUTS.Web/Areas/App/Views/ProductMaintain/_RejectsCode.cshtml
Normal file
@@ -0,0 +1,44 @@
|
||||
@model List<AUTS.Domain.Application.TBL_RejectsExplain>
|
||||
<div>
|
||||
<nav style="text-align:center;">
|
||||
|
||||
<ul class="pagination" id="page">
|
||||
<li class="first" onclick="firstPage('/App/BasicFunc/RejectsExplainSelect')"><a>«</a></li>
|
||||
<li class="left"><a>…</a></li>
|
||||
@for (int i = 0; i < ViewBag.allpage; i++)
|
||||
{
|
||||
<li class="pages" onclick="SpecifyPage(@(i),'/App/BasicFunc/RejectsExplainSelect')"><a>@(i + 1)</a></li>
|
||||
}
|
||||
<li class="right"><a>…</a></li>
|
||||
<li class="finally"><a onclick="lastPage('/App/BasicFunc/RejectsExplainSelect')">»</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<table class="table dataTables-example" border="0">
|
||||
@if (Model != null && Model.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < Model.Count; i++)
|
||||
{
|
||||
<tbody class="tbodyList">
|
||||
<tr>
|
||||
<td rowspan="5" style="margin:0px;padding:0px;width:75px"></td>
|
||||
<td style="font-size:15px;color:#6495ED;"><strong>不良代码:@Model[i].Matlab</strong></td>
|
||||
<td style="font-size:15px;color:#6495ED;"><strong>说明:@Model[i].Introductions</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
创建时间:@Model[i].CreationTime.ToString("yyyy-dd-mm")
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
不良品备注:@(Model[i].Remark != null ? Model[i].Remark : "无备注")
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
}
|
||||
}
|
||||
</table>
|
||||
<script src="~/Plugin/allPages.js"></script>
|
||||
<script src="~/Theme/js/plugins/dataTables/datatables.min.js"></script>
|
||||
606
AUTS.Web/Areas/App/Views/ProductMaintain/addOrder.cshtml
Normal file
606
AUTS.Web/Areas/App/Views/ProductMaintain/addOrder.cshtml
Normal file
@@ -0,0 +1,606 @@
|
||||
@model List<AUTS.Domain.Application.TBL_RejectsExplain>
|
||||
@{
|
||||
//ViewBag.Title = "addOrder";
|
||||
Layout = null;// "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
List<AUTS.Domain.Entities.TBL_Project> ProjectList = AUTS.Services.Cache.CacheHelp.GetUserDBProjectList();//产品列表
|
||||
List<AUTS.Domain.Entities.TBL_Customer> CustomerList = AUTS.Services.Cache.CacheHelp.GetUserDBCustomerList();//客户列表
|
||||
List<AUTS.Domain.Entities.TBL_ProductTypes> ProjectTypeList = AUTS.Services.Cache.CacheHelp.GetUserDBProjectTypeList();//产品类型列表
|
||||
}
|
||||
|
||||
<style> @*上传文件样式*@
|
||||
#btna {
|
||||
display: block;
|
||||
width: 70px;
|
||||
height: 30px;
|
||||
border: 2px outset #eee;
|
||||
background: #eee;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
padding-top: 2px;
|
||||
|
||||
}
|
||||
|
||||
.file {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
border: 1px solid #333;
|
||||
padding: 4px 10px;
|
||||
overflow: hidden;
|
||||
text-decoration: none;
|
||||
text-indent: 0;
|
||||
line-height: 20px;
|
||||
border-radius: 5px;
|
||||
color: #000;
|
||||
background: #ccc; /* 一些不支持背景渐变的浏览器 */
|
||||
background: -moz-linear-gradient(top, #fff, #ccc);
|
||||
background: -webkit-gradient(linear, 0 0, 0 bottom, from(#fff), to(#ccc));
|
||||
background: -o-linear-gradient(top, #fff, #ccc);
|
||||
}
|
||||
|
||||
.file input {
|
||||
position: absolute;
|
||||
font-size: 50px;
|
||||
right: 0;
|
||||
top: 0;
|
||||
opacity: 0;
|
||||
filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0);
|
||||
}
|
||||
</style>
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-content">
|
||||
<form class="form-horizontal" id="modifyPPlanForm">
|
||||
@*<input type="hidden" name="id" value="@Model.ID" />*@
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">报修单号</label>
|
||||
<div class="col-md-9">
|
||||
<input type="text" readonly="true" placeholder="请输入报修单号" name="RepairRequestNum" class="form-control" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">不良品来源</label>
|
||||
<div class="col-md-9">
|
||||
@*<input type="text" placeholder="请输入不良品来源" name="RejectSource" class="form-control" value="">*@
|
||||
<select class="form-control m-b" name="RejectSource">
|
||||
@if (CustomerList != null && CustomerList.Count > 0)
|
||||
{
|
||||
foreach (var item in CustomerList)
|
||||
{
|
||||
<option value="@item.CustomerName">@item.CustomerName</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">产品类型</label>
|
||||
<div class="col-md-9">
|
||||
<select class="form-control m-b" id="Producttype" onchange="actionProductShow()">
|
||||
@if (ProjectTypeList != null && ProjectTypeList.Count > 0)
|
||||
{
|
||||
foreach (var item in ProjectTypeList)
|
||||
{
|
||||
<option value="@item.ID">@item.ProductType</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
<select class="form-control m-b" name="ProductID"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">费用承担方</label>
|
||||
<div class="col-md-9">
|
||||
<select class="form-control m-b" name="Payer">
|
||||
<option value="1">公司承担</option>
|
||||
<option value="2">客户承担</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">业务员</label>
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="请输入业务员名称" name="Salesman" class="form-control" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">修后退回</label>
|
||||
<div class="col-md-9">
|
||||
<select class="form-control m-b" name="Storage">
|
||||
<option value="1">退回仓库</option>
|
||||
<option value="2">退回客户</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@*拼接产品条码*@
|
||||
<input type="text" name="Barcode" class="form-control" value="" style="display:none">
|
||||
|
||||
|
||||
<div class="form-group" id="data_1">
|
||||
|
||||
<label class="col-md-3 control-label">不良代码</label>
|
||||
<div class="col-md-9">
|
||||
<select class="form-control m-b" name="RejectCode" onchange="infoShowEr()" id="selector">
|
||||
@if (Model != null && Model.Count > 0)
|
||||
{
|
||||
|
||||
for (int i = 0; i < Model.Count; i++)
|
||||
{
|
||||
<option value="@Model[i].id">@Model[i].Matlab -----@Model[i].Introductions</option>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<option>请先添加不良代码</option>
|
||||
}
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">产品照片</label>
|
||||
<input type="text" name="ProductImage" style="display:none" id="ProductImageshow">
|
||||
<div class="col-md-9">
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<div class="custom-file">
|
||||
<a style="margin-left:15px" href="javascript:;" class="file">
|
||||
请选择图片
|
||||
<input type="file" onchange="uploadimg()" style="margin-left:30px" class=" custom-file-input" accept="image/*" id="photo">
|
||||
</a>
|
||||
复制完图片,点击此处CTRL+V
|
||||
</div>
|
||||
<img id="img1" style="margin-left: 15px; display: none" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">不良说明</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="text" readonly placeholder="请输入不良说明" name="RejectDesc" class="form-control" value="" id="explain">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">详细说明</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="请输入详细说明" name="DetailRemark" class="form-control" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">报修备注</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="请输入报修备注" name="Remark" class="form-control" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">
|
||||
<a id="btna" onclick=" AddBtn()" class="">添加条码</a>
|
||||
</label>
|
||||
</div>
|
||||
<div id="sloetg">
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-3 col-md-9">
|
||||
<button class="btn btn-md btn-primary" type="button" id="btnModifyPPlan" onclick="UpDate('btnModifyPPlan', '@Url.Action("addMaintainOperation", "ProductMaintain")', 'modifyPPlanForm', '@Url.Action("Maintain", "ProductMaintain")');">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
document.addEventListener('paste', function (event) {
|
||||
document.getElementById("img1").style.display = "inline";
|
||||
var isChrome = false;
|
||||
if (event.clipboardData || event.originalEvent) {
|
||||
//某些chrome版本使用的是event.originalEvent
|
||||
var clipboardData = (event.clipboardData || event.originalEvent.clipboardData);
|
||||
if (clipboardData.items) {
|
||||
// for chrome
|
||||
var items = clipboardData.items,
|
||||
len = items.length,
|
||||
blob = null;
|
||||
isChrome = true;
|
||||
for (var i = 0; i < len; i++) {
|
||||
if (items[i].type.indexOf("image") !== -1) {
|
||||
//getAsFile() 此方法只是living standard firefox ie11 并不支持
|
||||
blob = items[i].getAsFile();
|
||||
}
|
||||
}
|
||||
if (blob !== null) {
|
||||
var blobUrl = URL.createObjectURL(blob);
|
||||
//blob对象显示
|
||||
document.getElementById("img1").src = blobUrl;
|
||||
var reader = new FileReader();
|
||||
//base64码显示
|
||||
/* reader.onload = function (event) {
|
||||
// event.target.result 即为图片的Base64编码字符串
|
||||
var base64_str = event.target.result;
|
||||
|
||||
document.getElementById("imgNode").src=base64_str;
|
||||
}
|
||||
reader.readAsDataURL(blob);*/var fd = new FormData(document.forms[0]);
|
||||
fd.append("the_file", blob, 'image.png');
|
||||
//创建XMLHttpRequest对象
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('POST', '/image');
|
||||
xhr.onload = function () {
|
||||
if (xhr.readyState === 4) {
|
||||
if (xhr.status === 200) {
|
||||
var data = JSON.parse(xhr.responseText);
|
||||
} else {
|
||||
}
|
||||
};
|
||||
};
|
||||
xhr.onerror = function (e) {
|
||||
console.log(xhr.statusText);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
//let srcVideo = document.querySelector('video.src-video');
|
||||
//let mediaStream;
|
||||
//let photo = document.querySelector('img.photo');
|
||||
//let srcimg = document.querySelector('img#img1');
|
||||
//// 开启摄像头
|
||||
//function openMedia() {
|
||||
// photo.src = '';
|
||||
// srcVideo.style.display = 'block';
|
||||
// let constraints = {
|
||||
// audio: false, //音频轨道
|
||||
// video: { width: 200, height: 200 } //视频轨道
|
||||
// }
|
||||
// let mediaPromise = navigator.mediaDevices.getUserMedia(constraints);
|
||||
// mediaPromise.then(function (stream) {
|
||||
// /* 使用这个stream stream */
|
||||
// mediaStream = stream;
|
||||
// srcVideo.srcObject = stream;
|
||||
// srcVideo.play();
|
||||
// }).catch(function (err) {
|
||||
// /* 处理error */
|
||||
// alert(err);
|
||||
// });
|
||||
//};
|
||||
|
||||
//// 拍照
|
||||
//function takePhoto() {
|
||||
// let canvas = document.querySelector('#canvas');
|
||||
// //获取 `canvas`元素,根据`srcVideo`中的数据进行图片绘制 `ctx.drawImage()`;
|
||||
// let ctx = canvas.getContext('2d');
|
||||
// ctx.drawImage(srcVideo, 0, 0, 200, 200);
|
||||
// //将 `canvas`绘制的图片信息,展示在 `img`标签中;
|
||||
// photo.src = canvas.toDataURL();
|
||||
// closeMedia();
|
||||
//};
|
||||
|
||||
//// 关闭摄像头
|
||||
//let closeMedia = function () {
|
||||
// mediaStream.getTracks().forEach(track => {
|
||||
// track.stop();
|
||||
// });
|
||||
// srcVideo.style.display = 'none';
|
||||
//}
|
||||
|
||||
|
||||
function additionBtn()
|
||||
{
|
||||
}
|
||||
|
||||
//图片转换base64
|
||||
function getBase64Image(img) {
|
||||
|
||||
var canvas = document.createElement("canvas");
|
||||
|
||||
canvas.width = img.width;
|
||||
canvas.height = img.height;
|
||||
var ctx = canvas.getContext("2d");
|
||||
ctx.drawImage(img, 0, 0, img.width, img.height);
|
||||
var ext = img.src.substring(img.src.lastIndexOf(".") + 1).toLowerCase();
|
||||
var dataURL = canvas.toDataURL("image/" + ext);
|
||||
return dataURL;
|
||||
|
||||
}
|
||||
|
||||
// base64转blob
|
||||
const base64ToBlob = function (base64Data) {
|
||||
let arr = base64Data.split(','),
|
||||
fileType = arr[0].match(/:(.*?);/)[1],
|
||||
bstr = atob(arr[1]),
|
||||
l = bstr.length,
|
||||
u8Arr = new Uint8Array(l);
|
||||
|
||||
while (l--) {
|
||||
u8Arr[l] = bstr.charCodeAt(l);
|
||||
}
|
||||
return new Blob([u8Arr], {
|
||||
type: fileType
|
||||
});
|
||||
};
|
||||
// blob转file
|
||||
const blobToFile = function (newBlob, fileName) {
|
||||
newBlob.lastModifiedDate = new Date();
|
||||
newBlob.name = fileName;
|
||||
return newBlob;
|
||||
};
|
||||
//上传图片
|
||||
/*async*/ function uploadsimg() {
|
||||
let sun = document.getElementById("img1").src;
|
||||
if (sun != '' && sun != null)
|
||||
{
|
||||
const blob = base64ToBlob(getBase64Image(document.getElementById("img1")));
|
||||
|
||||
const file = blobToFile(blob, '123');
|
||||
var formData = new FormData() //创建一个forData
|
||||
try {
|
||||
formData.append('img', file) //把file添加进去 name命名为img
|
||||
} catch (e) {
|
||||
formData = null;
|
||||
}
|
||||
/*await*/ $.ajax({
|
||||
url: "/ImgServer/Update",
|
||||
data: formData,
|
||||
type: "POST",
|
||||
async: false,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
success: function (data) {//成功
|
||||
if (data == "" || data == null) {
|
||||
srclocation = null;
|
||||
layer.msg('未选择图片上传');
|
||||
}
|
||||
else {
|
||||
srclocation = data.data.src;
|
||||
document.getElementById("ProductImageshow").value = srclocation;
|
||||
layer.msg('图片上传成功');
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
layer.msg('图片上传失败');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//页面加载完成时
|
||||
$(document).ready(function () {
|
||||
var myDate = new Date();
|
||||
//获取当前年
|
||||
var year = myDate.getFullYear();
|
||||
//获取当前月
|
||||
var month;
|
||||
if ((myDate.getMonth() + 1).length == 1) {
|
||||
month = myDate.getMonth() + 1;
|
||||
}
|
||||
else {
|
||||
month = "0" + (myDate.getMonth() + 8);
|
||||
}
|
||||
//获取当前日
|
||||
var date = myDate.getDate();
|
||||
var h = myDate.getHours(); //获取当前小时数(0-23)
|
||||
var m = myDate.getMinutes(); //获取当前分钟数(0-59)
|
||||
var s = myDate.getSeconds();
|
||||
$("input[name='RepairRequestNum']").val("BLV_" + year + month + "_" + date + h + m + s);
|
||||
infoShowEr();
|
||||
actionProductShow();
|
||||
});
|
||||
function infoShowEr() {
|
||||
var set = $('#selector').val();
|
||||
if (set != null && set != "请先添加不良代码") {
|
||||
$.ajax({
|
||||
url: "/App/ProductMaintain/selectExplain",
|
||||
data: { where: set },
|
||||
type: "post",// 提交方式
|
||||
success: function (res) {
|
||||
$('#explain').val(res);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$('#explain').val("无");
|
||||
}
|
||||
}
|
||||
function actionProductShow() {
|
||||
try {
|
||||
var typeid = $('#Producttype').val();
|
||||
$("select[name='ProductID']").empty();
|
||||
$.ajax({
|
||||
url: "/App/ProductMaintain/actionProduct",
|
||||
data: { id: typeid },
|
||||
type: "post",// 提交方式
|
||||
success: function (res) {
|
||||
res = JSON.parse(res)
|
||||
for (var i = 0; i < res.length; i++) {
|
||||
$("select[name='ProductID']").append(` <option value="` + res[i].ID + `">` + res[i].ProjectName + `</option>`);
|
||||
}
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
}
|
||||
$.getScript("/Plugin/basicfunc.js");
|
||||
$.getScript("/Theme/js/jquery.form.min.js");
|
||||
$(function () {
|
||||
$('#photo').on("change", function () {
|
||||
var file = this.files[0];
|
||||
if (this.files && file) {
|
||||
let reader = new FileReader();
|
||||
reader.onload = function (e) {
|
||||
$('#img1').attr('src', e.target.result);
|
||||
document.getElementById("img1").style.display = "inline";
|
||||
}
|
||||
reader.readAsDataURL(file);
|
||||
picturebase64 = file;
|
||||
}
|
||||
});
|
||||
})
|
||||
function uploadimg(type) {
|
||||
let files = $("#photo").prop("files");
|
||||
if (files.length <= 0)
|
||||
return;
|
||||
|
||||
if (type != 1)
|
||||
return;
|
||||
uploads();
|
||||
}
|
||||
async function uploads() {
|
||||
var formData = new FormData() //创建一个forData
|
||||
try {
|
||||
formData.append('img', $('#photo')[0].files[0]) //把file添加进去 name命名为img
|
||||
} catch (e) {
|
||||
formData = null;
|
||||
}
|
||||
await $.ajax({
|
||||
url: "/ImgServer/Update",
|
||||
data: formData,
|
||||
type: "POST",
|
||||
async: false,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
success: function (data) {//成功
|
||||
if (data == "" || data == null) {
|
||||
srclocation = null;
|
||||
layer.msg('未选择图片上传');
|
||||
}
|
||||
else {
|
||||
|
||||
srclocation = data.data.src;
|
||||
document.getElementById("ProductImageshow").value = srclocation;
|
||||
layer.msg('图片上传成功');
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
layer.msg('图片上传失败');
|
||||
}
|
||||
})
|
||||
}
|
||||
//提交
|
||||
function UpDate(btnID, url, formID, suUrl) {
|
||||
//保存产品条码
|
||||
var set='';
|
||||
console.log($('.WHOLE').length)
|
||||
for (var i = 0; i < $('.WHOLE').length; i++)
|
||||
{
|
||||
set += $('.WHOLE')[i].value + ',';
|
||||
}
|
||||
$("[name='Barcode']").val(set);
|
||||
console.log($("[name='Barcode']").val());
|
||||
if ($("input[name='Barcode']").val().length > 0)
|
||||
{
|
||||
|
||||
let sun = document.getElementById("img1").src;
|
||||
if (sun != '' && sun != null) {
|
||||
uploadsimg();
|
||||
var btnText = $('#' + btnID).html();
|
||||
$('#' + btnID).attr("disabled", "true"); //设置禁用按钮
|
||||
$('#' + btnID).text('提交中...'); //显示提交中
|
||||
$('#' + formID).ajaxSubmit({
|
||||
url: url,
|
||||
type: "POST",
|
||||
success: function (res) {
|
||||
if (res.Status == 200) {
|
||||
//location.href = suUrl;
|
||||
$.toastr.success('添加成功',
|
||||
{
|
||||
position: 'top-center',
|
||||
time: 1000,
|
||||
callback: function () {
|
||||
}
|
||||
});
|
||||
window.parent.location.reload();
|
||||
} else {
|
||||
layer.alert("保存失败");
|
||||
$('#' + btnID).text(btnText); //还原显示
|
||||
$('#' + btnID).removeAttr('disabled')//重置按钮
|
||||
}
|
||||
},
|
||||
error: function (error) {
|
||||
$('#' + btnID).removeAttr('disabled')//重置按钮
|
||||
$('#' + btnID).text(btnText); //还原显示
|
||||
alert(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
Swal.fire({
|
||||
title: '未添加图片是否保存',
|
||||
//text: "You won't be able to revert this!",
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: '保存'
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed)
|
||||
{
|
||||
var btnText = $('#' + btnID).html();
|
||||
$('#' + btnID).attr("disabled", "true"); //设置禁用按钮
|
||||
$('#' + btnID).text('提交中...'); //显示提交中
|
||||
$('#' + formID).ajaxSubmit({
|
||||
url: url,
|
||||
type: "POST",
|
||||
success: function (res) {
|
||||
if (res.Status == 200) {
|
||||
//location.href = suUrl;
|
||||
$.toastr.success('添加成功',
|
||||
{
|
||||
position: 'top-center',
|
||||
time: 1000,
|
||||
callback: function () {
|
||||
}
|
||||
});
|
||||
window.parent.location.reload();
|
||||
} else {
|
||||
layer.alert("保存失败");
|
||||
$('#' + btnID).text(btnText); //还原显示
|
||||
$('#' + btnID).removeAttr('disabled')//重置按钮
|
||||
}
|
||||
},
|
||||
error: function (error) {
|
||||
$('#' + btnID).removeAttr('disabled')//重置按钮
|
||||
$('#' + btnID).text(btnText); //还原显示
|
||||
alert(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
} else {
|
||||
$.toastr.error('请输入条码',
|
||||
{
|
||||
position: 'top-center',
|
||||
time: 2000,
|
||||
callback: function () {
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
function AddBtn()
|
||||
{
|
||||
$("#sloetg").append(`
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">产品条码</label>
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="请输入产品条码" class="form-control WHOLE">
|
||||
</div>
|
||||
</div>
|
||||
<br/>`
|
||||
);
|
||||
}
|
||||
</script>
|
||||
195
AUTS.Web/Areas/App/Views/ProductMaintain/compilRepairLog.cshtml
Normal file
195
AUTS.Web/Areas/App/Views/ProductMaintain/compilRepairLog.cshtml
Normal file
@@ -0,0 +1,195 @@
|
||||
@model List<AUTS.Domain.Entities.TBL_RepairRequest>
|
||||
@using AUTS.Domain.Entities;
|
||||
@using AUTS.Domain.Application;
|
||||
@using AUTS.Web.Areas.App.Models;
|
||||
@{
|
||||
Layout = null;// "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
List<AUTS.Domain.Entities.TBL_ProductTypes> ProjectTypeList = AUTS.Services.Cache.CacheHelp.GetUserDBProjectTypeList();//产品类型列表
|
||||
List<AUTS.Domain.Entities.TBL_Project> Projectlist = AUTS.Services.Cache.CacheHelp.GetUserDBProjectList();//产品类型列表
|
||||
var Explain = Session["Explain"] as List<TBL_RejectsExplain>;//客户表
|
||||
var ProductTypelist = Session["ProductTypeID"] as TBL_ProductTypes;//产品类型
|
||||
|
||||
}
|
||||
<div class="ibox float-e-margins">
|
||||
<!--<div class="ibox-title">-->
|
||||
@*<h5>@ViewBag.Title</h5>*@
|
||||
<!--<div class="ibox-tools">
|
||||
<a class="collapse-link-partial">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link-partial">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>-->
|
||||
<div class="ibox-content">
|
||||
<form class="form-horizontal" id="modifyPPlanForm">
|
||||
@if (Model != null && Model.Count > 0)
|
||||
{
|
||||
foreach (var item in Model)
|
||||
{
|
||||
<input name="ID" class="form-control" value="@item.ID" style="visibility: hidden;">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">报修单号</label>
|
||||
<div class="col-md-9">
|
||||
<input type="text" readonly="true" name="RepairRequestNum" class="form-control" value="@item.RepairRequestNum">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">不良品来源</label>
|
||||
<div class="col-md-9">
|
||||
|
||||
<input type="text" readonly="true" name="RejectSource" class="form-control" value="@item.RejectSource">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">产品类型</label>
|
||||
<div class="col-md-9">
|
||||
<select class="form-control m-b" id="Producttype" onchange="actionProductShow()">
|
||||
@if (ProjectTypeList != null && ProjectTypeList.Count > 0)
|
||||
{
|
||||
foreach (var item1 in ProjectTypeList)
|
||||
{
|
||||
<option @(item1.ID == ProductTypelist.ID ? "selected='selected'" : "") value="@item1.ID">@item1.ProductType</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
<select class="form-control m-b" id="ProductId" name="ProductID">
|
||||
@foreach (var itemSie in Projectlist)
|
||||
{
|
||||
<option @(item.ProductID == itemSie.ID ? "selected='selected'" : "") value="@itemSie.ID">@itemSie.ProjectName</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">产品条码</label>
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="" name="Barcode" class="form-control" value="@item.Barcode">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">不良代码</label>
|
||||
<div class="col-md-9">
|
||||
<select class="form-control m-b" name="RejectCode" onchange="infoShowEr()" id="selector">
|
||||
@if (Explain != null && Explain.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < Explain.Count; i++)
|
||||
{
|
||||
<option @(item.RejectCode == Explain[i].id.ToString() ? "selected='selected'" : "") value="@Explain[i].id">@Explain[i].Matlab -----@Explain[i].Introductions</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="" name="RejectDesc" class="form-control" value="@item.RejectDesc" style="display:none;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">详细说明</label>
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="" name="DetailRemark" class="form-control" value="@item.DetailRemark">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">备注</label>
|
||||
<div class="col-md-9">
|
||||
<input type="text" placeholder="" name="Remark" class="form-control" value="@item.Remark">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-3 col-md-9">
|
||||
<button class="btn btn-md btn-primary" type="button" id="btnModifyPPlan" onclick="UpDate('btnModifyPPlan', '@Url.Action("compilRepairLogOperation", "ProductMaintain")', 'modifyPPlanForm');">保存</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$.getScript("/Plugin/basicfunc.js");
|
||||
$.getScript("/Theme/js/jquery.form.min.js");
|
||||
function actionProductShow() {
|
||||
try {
|
||||
var typeid = $('#Producttype').val();
|
||||
$("select[name='ProductID']").empty();
|
||||
$.ajax({
|
||||
url: "/App/ProductMaintain/actionProduct",
|
||||
data: { id: typeid },
|
||||
type: "post",// 提交方式
|
||||
success: function (res) {
|
||||
res = JSON.parse(res)
|
||||
for (var i = 0; i < res.length; i++) {
|
||||
|
||||
$("select[name='ProductID']").append(` <option value="` + res[i].ID + `">` + res[i].ProjectName + `</option>`);
|
||||
}
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
}
|
||||
function UpDate(btnID, url, formID) {
|
||||
$('#pej').attr("disabled", false);//取消下拉框禁用才能获取值
|
||||
//localStorage.clear();
|
||||
if ($("input[name='Barcode']").val().length > 0) {
|
||||
var btnText = $('#' + btnID).html();
|
||||
$('#' + btnID).attr("disabled", "true"); //设置禁用按钮
|
||||
$('#' + btnID).text('提交中...'); //显示提交中
|
||||
$('#' + formID).ajaxSubmit({
|
||||
url: url,
|
||||
type: "POST",
|
||||
success: function (res) {
|
||||
if (res.Status == 200) {
|
||||
$.toastr.success('更新成功',
|
||||
{
|
||||
position: 'top-center',
|
||||
time: 350,
|
||||
callback: function () {
|
||||
}
|
||||
});
|
||||
window.parent.location.reload();
|
||||
} else {
|
||||
$.toastr.error('更新失败',
|
||||
{
|
||||
position: 'top-center',
|
||||
time: 350,
|
||||
callback: function () {
|
||||
}
|
||||
});
|
||||
$('#' + btnID).text(btnText); //还原显示
|
||||
$('#' + btnID).removeAttr('disabled')//重置按钮
|
||||
}
|
||||
},
|
||||
error: function (error) {
|
||||
$('#' + btnID).removeAttr('disabled')//重置按钮
|
||||
$('#' + btnID).text(btnText); //还原显示
|
||||
alert(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
layer.alert("请输入产品条码");
|
||||
}
|
||||
};
|
||||
function infoShowEr() {
|
||||
var set = $('#selector').val();
|
||||
if (set != null && set != "请先添加不良代码") {
|
||||
$.ajax({
|
||||
url: "/App/ProductMaintain/selectExplain",
|
||||
data: { where: set },
|
||||
type: "post",// 提交方式
|
||||
success: function (res) {
|
||||
|
||||
$("input[name='RejectDesc']").val(res);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
@@ -0,0 +1,81 @@
|
||||
@{
|
||||
Layout = null;// "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
List<AUTS.Domain.Entities.TBL_Customer> CustomerList = AUTS.Services.Cache.CacheHelp.GetUserDBCustomerList();//客户列表
|
||||
}
|
||||
<div class="ibox float-e-margins">
|
||||
<!--<div class="ibox-title">-->
|
||||
@*<h5>@ViewBag.Title</h5>*@
|
||||
<!--<div class="ibox-tools">
|
||||
<a class="collapse-link-partial">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link-partial">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>-->
|
||||
<div class="ibox-content">
|
||||
<form class="form-horizontal" id="modifyPPlanForm">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">报修单号</label>
|
||||
<div class="col-md-9">
|
||||
<input type="text" disabled="disabled" placeholder="请输入报修单号" id="RepairRequestNum" class="form-control" value="@ViewBag.oddupdate">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">不良品来源</label>
|
||||
<div class="col-md-9">
|
||||
<select class="form-control m-b" id="RejectSource">
|
||||
@if (CustomerList != null && CustomerList.Count > 0)
|
||||
{
|
||||
foreach (var item in CustomerList)
|
||||
{
|
||||
<option @(ViewBag.company==item.CustomerName?"selected":"") value="@item.CustomerName">@item.CustomerName</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-3 col-md-9">
|
||||
<button class="btn btn-md btn-primary" type="button" id="btnModifyPPlan" onclick="revise()">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function revise()
|
||||
{
|
||||
var Num = $('#RepairRequestNum').val();
|
||||
var RejectSource = $('#RejectSource').val();
|
||||
; $.ajax({
|
||||
type: 'POST',
|
||||
url: '/App/ProductMaintain/updateMaintain',
|
||||
data: { Num: Num, RejectSource: RejectSource},
|
||||
success: function (data) {
|
||||
if (data.Status == 200) {
|
||||
$.toastr.success('更新成功',
|
||||
{
|
||||
position: 'top-center',
|
||||
time: 1000,
|
||||
callback: function () {
|
||||
location.href = "/App/ProductMaintain/Maintain";
|
||||
}
|
||||
});
|
||||
window.parent.location.reload();
|
||||
}
|
||||
else {
|
||||
$.toastr.error('更新失败',
|
||||
{
|
||||
position: 'top-center',
|
||||
time: 500,
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
11
AUTS.Web/Areas/App/Views/SearchKey/_CustomerSearch.cshtml
Normal file
11
AUTS.Web/Areas/App/Views/SearchKey/_CustomerSearch.cshtml
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
<div class="col-sm-3">
|
||||
<div class="input-group m-b">
|
||||
<span class="input-group-addon">客户:</span>
|
||||
<input type="text" class="form-control" name="customer">
|
||||
</div>
|
||||
</div>
|
||||
11
AUTS.Web/Areas/App/Views/SearchKey/_OrderSearch.cshtml
Normal file
11
AUTS.Web/Areas/App/Views/SearchKey/_OrderSearch.cshtml
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
<div class="col-sm-3 m-b-xs" id="data_ovform">
|
||||
<div class="input-group m-b">
|
||||
<span class="input-group-addon">订单:</span>
|
||||
<input type="text" class="form-control" name="order">
|
||||
</div>
|
||||
</div>
|
||||
22
AUTS.Web/Areas/App/Views/SearchKey/_PlineidSearch.cshtml
Normal file
22
AUTS.Web/Areas/App/Views/SearchKey/_PlineidSearch.cshtml
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
@{
|
||||
Layout = null;
|
||||
List<AUTS.Domain.Entities.TBL_ProductionLine> pLineList = AUTS.Services.Cache.CacheHelp.GetUserDBPLineList();//产线列表
|
||||
}
|
||||
|
||||
<div class="col-sm-2 m-b-xs">
|
||||
<div class="input-group m-b">
|
||||
<span class="input-group-addon">产线</span>
|
||||
<select class="input-sm form-control input-s-sm inline" name="plineid">
|
||||
<option value=''></option>
|
||||
@if (pLineList != null && pLineList.Count > 0)
|
||||
{
|
||||
foreach (var item in pLineList)
|
||||
{
|
||||
<option value="@item.ID">@item.Name</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
27
AUTS.Web/Areas/App/Views/SearchKey/_StationidSearch.cshtml
Normal file
27
AUTS.Web/Areas/App/Views/SearchKey/_StationidSearch.cshtml
Normal file
@@ -0,0 +1,27 @@
|
||||
|
||||
@{
|
||||
Layout = null;
|
||||
|
||||
List<AUTS.Domain.Entities.TBL_Project> projectList = AUTS.Services.Cache.CacheHelp.GetUserDBProjectList();//产品列表
|
||||
|
||||
List<AUTS.Domain.Entities.TBL_StationList> stationList = AUTS.Services.Cache.CacheHelp.GetUserDBStationList().Where(x => x.ProjectID == projectList[0].ProjectID && x.StationType != "QA").OrderBy(o => o.ArtworkOrder).ToList();//工作站列表
|
||||
}
|
||||
|
||||
|
||||
<div class="col-sm-3">
|
||||
|
||||
<div class="input-group m-b">
|
||||
|
||||
<span class="input-group-addon">工艺站:</span>
|
||||
<select class="input-sm form-control input-s-sm inline" name="stationid" id="stationid">
|
||||
<option value=''></option>
|
||||
@if (stationList != null && stationList.Count > 0)
|
||||
{
|
||||
foreach (var item in stationList)
|
||||
{
|
||||
<option value="@item.StationID">@item.StationName</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
279
AUTS.Web/Areas/App/Views/SelProduct/SnList.cshtml
Normal file
279
AUTS.Web/Areas/App/Views/SelProduct/SnList.cshtml
Normal file
@@ -0,0 +1,279 @@
|
||||
@{
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
List<AUTS.Domain.Entities.TBL_Project> projectList = AUTS.Services.Cache.CacheHelp.GetUserDBProjectList();//产品列表
|
||||
List<AUTS.Domain.Entities.TBL_OrderInternal> OrderInternal = AUTS.Services.Cache.CacheHelp.GetUserDBOrderInternalList();//M/O
|
||||
}
|
||||
|
||||
<div class="row wrapper border-bottom white-bg page-heading">
|
||||
<div class="col-lg-10">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<a href="@Url.Action("Index", "Home")">主页</a>
|
||||
</li>
|
||||
<li>
|
||||
<a>产品查询</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<strong>条码列表</strong>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight" id="TextLog">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>条码列表</h5>
|
||||
<div class="ibox-tools">
|
||||
|
||||
@*<button class="btn btn-md btn-primary" type="button" id="btnaddPLine" onclick="gotoCommonPartial('@Url.Action("AddSnList", "PPlan")','pPlanBox_Content')">添加规则</button>*@
|
||||
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
|
||||
<form method="get" id="CapacitySearchForm">
|
||||
|
||||
<div class="row">
|
||||
<div class="form-inline">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm-4">
|
||||
|
||||
<div class="input-group m-b">
|
||||
|
||||
<span class="input-group-addon">机型:</span>
|
||||
<select class="input-sm form-control input-s-sm inline" name="projectid" id="projectid">
|
||||
<option value="0"></option>
|
||||
@if (projectList != null && projectList.Count > 0)
|
||||
{
|
||||
foreach (var item in projectList.OrderBy(e => e.ProjectName))
|
||||
{
|
||||
<option value="@item.ID">@item.ProjectName</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-4 m-b-xs" id="data_ovform">
|
||||
|
||||
<div class="input-group m-b">
|
||||
|
||||
<span class="input-group-addon">M/O:</span>
|
||||
<select class="input-sm form-control input-s-sm inline" name="OrderInternalID" id="OrderInternalID">
|
||||
<option value="0"></option>
|
||||
@if (OrderInternal != null && OrderInternal.Count > 0)
|
||||
{
|
||||
foreach (var item in OrderInternal)
|
||||
{
|
||||
<option value="@item.ID">@item.InternalNo</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
@*<div class="input-group m-b">
|
||||
<span class="input-group-addon"></span>
|
||||
<input type="text" class="form-control" name="order" id="OrderInternalID">
|
||||
</div>*@
|
||||
</div>
|
||||
|
||||
<div class="col-sm-4">
|
||||
|
||||
<div class="input-group m-b">
|
||||
|
||||
<span class="input-group-addon">分配类型:</span>
|
||||
<select class="input-sm form-control input-s-sm inline" name="SnType" id="SnType">
|
||||
<option value="-1"></option>
|
||||
<option value="0">无序</option>
|
||||
<option value="1">自动生成</option>
|
||||
<option value="2">直接录入</option>
|
||||
<option value="3">Excel导入</option>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-4 m-b-xs" id="data_ovform">
|
||||
<div class="input-group m-b">
|
||||
<span class="input-group-addon">条码:</span>
|
||||
<input type="text" class="form-control" name="Sn" id="BarCode">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-4 m-b-xs" id="data_ovform">
|
||||
<div class="input-group m-b">
|
||||
<span class="input-group-addon">组合条码:</span>
|
||||
<input type="text" class="form-control" name="AssemblySn" id="AssemblySn">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<div class="input-group">
|
||||
<button type="button" class="btn btn-primary" id="btnCapacitySearch">查询</button>
|
||||
<button type="button" class="btn btn-primary" id="btnClose">清空</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<div class="table-responsive">
|
||||
|
||||
<table class="table table-striped table-bordered table-hover dataTables-example" id="table_id_example">
|
||||
<thead>
|
||||
<tr>
|
||||
@*<th>#</th>*@
|
||||
<th>内部单号</th>
|
||||
<th>订单号</th>
|
||||
<th>机型</th>
|
||||
<th>分配类型</th>
|
||||
<th>条码</th>
|
||||
<th>组合条码</th>
|
||||
<th>组合时间</th>
|
||||
<th>创建时间</th>
|
||||
<th>使用时间</th>
|
||||
<th>是否使用</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4" id="pPlanBox_Content">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="~/Theme/js/plugins/dataTables/datatables.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
GetSnList();
|
||||
})
|
||||
|
||||
|
||||
$("#btnClose").click(function () {
|
||||
$("#BarCode").val('');
|
||||
$("#AssemblySn").val('');
|
||||
$('#OrderInternalID option:first').attr('selected', 'selected');
|
||||
$('#SnType option:first').attr('selected', 'selected');
|
||||
$('#projectid option:first').attr('selected', 'selected');
|
||||
})
|
||||
|
||||
$("#btnCapacitySearch").click(function () {
|
||||
$("#table_id_example").dataTable().fnClearTable();
|
||||
$("#table_id_example").dataTable().fnDestroy();
|
||||
GetSnList();
|
||||
});
|
||||
|
||||
function show(Sn) {
|
||||
sessionStorage.setItem("BarCode", Sn);
|
||||
window.location.href = "/App/SelProduct/TestLog";
|
||||
}
|
||||
|
||||
function GetSnList() {
|
||||
$("#table_id_example").DataTable({
|
||||
language: {
|
||||
"processing": "处理中...",
|
||||
"lengthMenu": "_MENU_ 记录/页",
|
||||
"zeroRecords": "没有匹配的记录",
|
||||
"info": "第 _START_ 至 _END_ 项记录,共 _TOTAL_ 项",
|
||||
"infoEmpty": "第 0 至 0 项记录,共 0 项",
|
||||
"infoFiltered": "",
|
||||
"infoPostFix": "",
|
||||
//"search": "搜索:",
|
||||
//"type":"post",
|
||||
//"url": "/APP/SelProduct/GetSnListData",
|
||||
"decimal": ",",
|
||||
"thousands": ".",
|
||||
"emptyTable": "未找到符合条件的数据",
|
||||
"paginate": {
|
||||
"first": "«",
|
||||
"previous": "‹",
|
||||
"next": "›",
|
||||
"last": "»"
|
||||
}
|
||||
},
|
||||
retrieve: true,
|
||||
paging: true,
|
||||
ordering: false,
|
||||
info: true,
|
||||
autoWidth: false,
|
||||
pageLength: 20,//每页显示10条数据
|
||||
pagingType: "full_numbers", //分页样式:simple,simple_numbers,full,full_numbers,
|
||||
bFilter: false, //去掉搜索框方法
|
||||
bLengthChange: false,//也就是页面上确认是否可以进行选择一页展示多少条
|
||||
serverSide: true, //启用服务器端分页,要进行后端分页必须的环节
|
||||
ajax: function (data, callback, settings) {
|
||||
//封装相应的请求参数,这里获取页大小和当前页码
|
||||
var pagesize = data.length;//页面显示记录条数,在页面显示每页显示多少项的时候,页大小
|
||||
var start = data.start;//开始的记录序号
|
||||
var page = (data.start) / data.length + 1;//当前页码
|
||||
|
||||
var product = $("#projectid").val();
|
||||
var orderID = $("#OrderInternalID").val();
|
||||
var BarCode = $("#BarCode").val();
|
||||
var SnType = $("#SnType").val();
|
||||
var AssemblySn = $("#AssemblySn").val();
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/APP/SelProduct/GetSnListData",
|
||||
cache: false, //禁用缓存
|
||||
data: {
|
||||
"page": page, "pagesize": pagesize, "product": product, "OInternalID": orderID,
|
||||
"SnTypeInt": SnType, "BarCode": BarCode, "AssemblySn": AssemblySn
|
||||
}, //传入已封装的参数
|
||||
dataType: "json",//返回数据格式为json
|
||||
success: function (res) {
|
||||
//console.log(res);
|
||||
var returnData = {};
|
||||
//returnData.draw = arr.data.pagination.TotalCount;//这里直接自行返回了draw计数器,应该由后台返回,没什么卵用!
|
||||
returnData.recordsTotal = res.Data.TotalCount;//totalCount指的是总记录数
|
||||
returnData.recordsFiltered = res.Data.TotalCount;//后台不实现过滤功能,全部的记录数都需输出到前端,记录数为总数
|
||||
returnData.data = res.Data.SnList;//返回列表
|
||||
callback(returnData);//这个别忘了!!!
|
||||
},
|
||||
error: function (XMLHttpRequest, textStatus, errorThrown) {
|
||||
//$.dialog.alert("查询失败");
|
||||
alert("查询失败");
|
||||
//$wrapper.spinModal(false);
|
||||
}
|
||||
});
|
||||
},
|
||||
columns: [
|
||||
{ "data": "InternalNo" },
|
||||
{ "data": "OrderNo" },
|
||||
{ "data": "ProjectName" },
|
||||
{ "data": "SnType" },
|
||||
{ "data": "BarCode" },
|
||||
{ "data": "AssemblySn" },
|
||||
{ "data": "AssemblyTime" },
|
||||
{ "data": "CreateTime" },
|
||||
{ "data": "UseTime" },
|
||||
{ "data": "IsUse" },
|
||||
]
|
||||
})
|
||||
}
|
||||
</script>
|
||||
371
AUTS.Web/Areas/App/Views/SelProduct/SnTestList.cshtml
Normal file
371
AUTS.Web/Areas/App/Views/SelProduct/SnTestList.cshtml
Normal file
@@ -0,0 +1,371 @@
|
||||
@model List<AUTS.Domain.Entities.TBL_SnList>
|
||||
@{
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
List<AUTS.Domain.Entities.TBL_Project> projectList = AUTS.Services.Cache.CacheHelp.GetUserDBProjectList();//产品列表
|
||||
List<AUTS.Domain.Entities.TBL_OrderInternal> OrderInternal = AUTS.Services.Cache.CacheHelp.GetUserDBOrderInternalList();//M/O
|
||||
}
|
||||
|
||||
<div class="row wrapper border-bottom white-bg page-heading">
|
||||
<div class="col-lg-10">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<a href="@Url.Action("Index", "Home")">主页</a>
|
||||
</li>
|
||||
<li>
|
||||
<a>产品查询</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<strong>条码数据</strong>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight" id="TextLog">
|
||||
<div class="row">
|
||||
<div class="col-sm-12" style="padding:0">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>
|
||||
条码列表<span class="DataCount"></span>
|
||||
</h5>
|
||||
<div class="ibox-tools">
|
||||
<label> <input type="checkbox" name="hide" class="i-checks" value="hidden">隐藏空数据 </label>
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content" style="padding:0">
|
||||
@* 条件 *@
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<select class="input-sm form-control input-s-sm inline" name="projectid" id="projectid" style="padding:0px">
|
||||
<option value="0">请选择机型</option>
|
||||
@if (projectList != null && projectList.Count > 0)
|
||||
{
|
||||
foreach (var item in projectList)
|
||||
{
|
||||
<option value="@item.ID">@item.ProjectName</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<select class="input-sm form-control input-s-sm inline" name="OrderInternalID" id="OrderInternalID" onchange="IsNotEmpty()" style="padding:0px">
|
||||
<option value="0">请选择M/O</option>
|
||||
@if (OrderInternal != null && OrderInternal.Count > 0)
|
||||
{
|
||||
foreach (var item in OrderInternal)
|
||||
{
|
||||
<option value="@item.ID">@item.InternalNo</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<select class="input-sm form-control input-s-sm inline" id="ztid" style="padding:0px">
|
||||
@*<option value="0">请选择站台</option>*@
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div>
|
||||
<div class="form-inline visible-*-block" id="data_5">
|
||||
<div class="input-daterange input-group visible-xs-2" id="datepicker">
|
||||
<input type="text" class="input-sm form-control" name="start" id="start" readonly />
|
||||
<span class="input-group-addon">至</span>
|
||||
<input type="text" class="input-sm form-control" name="end" id="end" onchange="Datiem()" readonly />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<label> <input type="checkbox" name="ztall" class="i-checks ztSTATUS" value="0">all </label>
|
||||
<text style="opacity:0">22</text>
|
||||
<label> <input type="checkbox" name="zttrue" class="i-checks ztSTATUS" value="1">true </label>
|
||||
<text style="opacity:0">22</text>
|
||||
<label> <input type="checkbox" name="ztfalse" class="i-checks ztSTATUS" value="2">false </label>
|
||||
<text style="opacity:0">22</text>
|
||||
<label> <input type="checkbox" name="ztnull" class="i-checks ztSTATUS" value="3">null </label>
|
||||
</div>
|
||||
@*<div class="col-xs-6">
|
||||
<button type="button" class="btn btn-primary" id="">提交</button>
|
||||
</div>*@
|
||||
</div>
|
||||
|
||||
<div class="table-responsive" id="SnList">
|
||||
<table class="table table-striped table-bordered table-hover dataTables-example" id="table_id_example">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>条码</th>
|
||||
<th>
|
||||
站
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.bootcdn.net/ajax/libs/bootstrap-datepicker/1.9.0/js/bootstrap-datepicker.min.js"></script>
|
||||
<script src="~/Theme/js/plugins/datapicker/locales/bootstrap-datepicker.zh-CN.js"></script>
|
||||
<script>
|
||||
|
||||
$(function () {
|
||||
console.log(localStorage.getItem("select_oy_Ji"));
|
||||
//$("#projectid").get(0).selectedIndex = localStorage.getItem("select_oy_Ji");
|
||||
$('#projectid').val(localStorage.getItem("select_oy_Ji"));
|
||||
$("#start").val(localStorage.getItem("select_oy_start"));
|
||||
$("#end").val(localStorage.getItem("select_oy_end"));
|
||||
Getpi();
|
||||
setTimeout(function () {
|
||||
getSnList(1);
|
||||
}, 5000);
|
||||
console.log($("#ztid").val());
|
||||
});
|
||||
$('#start').datepicker({
|
||||
language: "zh-CN",//语言
|
||||
todayBtn: "linked",//今日按钮
|
||||
autoclose: true,//选择后关闭日期选择
|
||||
format: "yyyy-mm-dd",//日期格式
|
||||
});
|
||||
$('#end').datepicker({
|
||||
language: "zh-CN",//语言
|
||||
todayBtn: "linked",//今日按钮
|
||||
autoclose: true,//选择后关闭日期选择
|
||||
format: "yyyy-mm-dd",//日期格式
|
||||
});
|
||||
function Datiem() {
|
||||
var Cdatetime = $("#start").val();
|
||||
var ztid = $("#ztid").val();
|
||||
if (Cdatetime != "" && ztid != 0)
|
||||
{
|
||||
getSnList(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
$.toastr.success('选择初始时间和站台', {
|
||||
time: 5000,
|
||||
position: 'top-center'
|
||||
});
|
||||
$("#end").val("");
|
||||
}
|
||||
}
|
||||
|
||||
var OInteriorID = sessionStorage.getItem("OInteriorID");
|
||||
var ProjectID = sessionStorage.getItem("ProjectID");
|
||||
if (ProjectID != "" && OInteriorID != "") {
|
||||
$("#projectid").val(ProjectID);
|
||||
$("#OrderInternalID").val(OInteriorID);
|
||||
getSnList(1);
|
||||
sessionStorage.setItem("OInteriorID", "");
|
||||
sessionStorage.setItem("ProjectID", "");
|
||||
|
||||
}
|
||||
//机型更改
|
||||
$("#projectid").on("change", function () {
|
||||
getInternalData();
|
||||
Getpi();
|
||||
getSnList(1);
|
||||
});
|
||||
//隐藏数据
|
||||
$(".hidden").on("change", function () {
|
||||
getSnList(1);
|
||||
var ZTID = $("#ztid").val();
|
||||
});
|
||||
//勾选
|
||||
$(".ztSTATUS").on("change", function () {
|
||||
var ZTID = $("#ztid").val();
|
||||
if (ZTID == 0) {
|
||||
$.toastr.success('选择站台后有效。', {
|
||||
time: 3000,
|
||||
position: 'top-center'
|
||||
});
|
||||
return;
|
||||
}
|
||||
getSnList(1);
|
||||
});
|
||||
////站台更改
|
||||
$("#ztid").on("change", function () {
|
||||
getSnList(1);
|
||||
});
|
||||
//机型更改
|
||||
function getInternalData() {
|
||||
var projectid = $("#projectid").val();
|
||||
$.ajax({
|
||||
url: "/App/SelProduct/getOInternalList",
|
||||
type: "post",
|
||||
async: false,
|
||||
data: { "Product": projectid },
|
||||
success: function (res) {
|
||||
|
||||
$("#OrderInternalID").html('');
|
||||
|
||||
if (res.Data != null) {
|
||||
for (var i = 0; i < res.Data.length; i++) {
|
||||
$("#OrderInternalID").prepend("<option value='" + res.Data[i].ID + "'>" + res.Data[i].InternalNo + "</option>");
|
||||
}
|
||||
}
|
||||
$("#OrderInternalID").prepend("<option value='-2'>所有</option>");
|
||||
$("#OrderInternalID").prepend("<option value='-1'>无M/O</option>");
|
||||
$("#OrderInternalID").val(-2);
|
||||
}
|
||||
});
|
||||
}
|
||||
// m/o更改
|
||||
function IsNotEmpty() {
|
||||
var OrderInternalID = $("#OrderInternalID").val();
|
||||
var projectid = $("#projectid").val();
|
||||
if (projectid != 0 && OrderInternalID != 0) {
|
||||
getSnList(1);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function Getpi() {
|
||||
var projectid = $("#projectid").val();
|
||||
$.ajax({
|
||||
url: "/App/SelProduct/Get",
|
||||
type: "post",
|
||||
async: false,
|
||||
data: { "ProjectID": projectid },
|
||||
success: function (ztid) {
|
||||
let ztidhtml = ``;
|
||||
for (var i = 0; i < ztid.length; i++) {
|
||||
if (localStorage.getItem("select_oy_Zhan") != null) {
|
||||
if (ztid[i].StationName == localStorage.getItem("select_oy_Zhan"))
|
||||
{
|
||||
ztidhtml += `<option selected=selected value="` + ztid[i].ID + `" ` + ($("#ztid").val() == ztid[i].ID ? "selected=true" : "") + `>` + ztid[i].StationName + `</option>`;
|
||||
}
|
||||
else
|
||||
{
|
||||
ztidhtml += `<option value="` + ztid[i].ID + `" ` + ($("#ztid").val() == ztid[i].ID ? "selected=true" : "") + `>` + ztid[i].StationName + `</option>`;
|
||||
}
|
||||
}
|
||||
else {
|
||||
ztidhtml += `<option value="` + ztid[i].ID + `" ` + ($("#ztid").val() == ztid[i].ID ? "selected=true" : "") + `>` + ztid[i].StationName + `</option>`;
|
||||
}
|
||||
}
|
||||
$("#ztid").html(ztidhtml);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//getSnList(); 查询
|
||||
function getSnList(pagesNum) {
|
||||
var end = $("#end").val();
|
||||
var start = $("#start").val();
|
||||
var OrderInternalID = $("#OrderInternalID").val();
|
||||
var projectid = $("#projectid").val();
|
||||
//是否隐藏 空数据库
|
||||
var property = $("input[name='hide']:checked").val();
|
||||
//勾选的状态
|
||||
var ztstatus = [];
|
||||
if ($("input[name='zttrue']:checked").length > 0) {
|
||||
ztstatus.push(1);
|
||||
};
|
||||
if ($("input[name='ztfalse']:checked").length > 0) {
|
||||
ztstatus.push(0);
|
||||
};
|
||||
if ($("input[name='ztnull']:checked").length > 0) {
|
||||
ztstatus.push(2);
|
||||
};
|
||||
if ($("input[name='ztall']:checked").length > 0) {
|
||||
ztstatus = [];
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
//站台
|
||||
var ZTID = $("#ztid").val();
|
||||
var max = pagesNum * 20;
|
||||
var min = (pagesNum - 1) * 20;
|
||||
var data = {
|
||||
ZTID: ZTID,
|
||||
ZTstatus: ztstatus,
|
||||
OInteriorID: OrderInternalID,
|
||||
ProjectID: projectid,
|
||||
dataMin: min,
|
||||
dataMax: max,
|
||||
Property: property,
|
||||
startTime: start,
|
||||
EndTime: end
|
||||
};
|
||||
$.ajax({
|
||||
url: "/App/SelProduct/SnTestList",
|
||||
type: "post",
|
||||
async: true,
|
||||
data: JSON.stringify(data),
|
||||
contentType: 'application/json',
|
||||
success: function (res) {
|
||||
$("#SnList").html(" ");
|
||||
$("#SnList").html(res);
|
||||
$("li.pages").hide();
|
||||
$.toastr.success('查询成功。', {
|
||||
time: 3000,
|
||||
position: 'top-center'
|
||||
});
|
||||
//let ztid = JSON.parse($("#ztidhtml").val());
|
||||
//let ztidhtml = ``;
|
||||
//for (var i = 0; i < ztid.length; i++) {
|
||||
// if (localStorage.getItem("select_oy_Zhan") != null)
|
||||
// {
|
||||
// if (ztid[i].StationName == localStorage.getItem("select_oy_Zhan")) {
|
||||
// ztidhtml += `<option selected=selected value="` + ztid[i].ID + `" ` + ($("#ztid").val() == ztid[i].ID ? "selected=true" : "") + `>` + ztid[i].StationName + `</option>`;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// ztidhtml += `<option value="` + ztid[i].ID + `" ` + ($("#ztid").val() == ztid[i].ID ? "selected=true" : "") + `>` + ztid[i].StationName + `</option>`;
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// ztidhtml += `<option value="` + ztid[i].ID + `" ` + ($("#ztid").val() == ztid[i].ID ? "selected=true" : "") + `>` + ztid[i].StationName + `</option>`;
|
||||
// }
|
||||
//}
|
||||
//$("#ztid").html(ztidhtml);
|
||||
if (pagesNum > 3) {
|
||||
var maxPages = pagesNum + 2
|
||||
var minPages = pagesNum - 3;
|
||||
for (var i = minPages; i < maxPages; i++) {
|
||||
$("li.pages").eq(i).show();//显示页数
|
||||
}
|
||||
} else {
|
||||
for (var i = 0; i < 5; i++) {
|
||||
$("li.pages").eq(i).show();//显示页数
|
||||
}
|
||||
}
|
||||
var pages = $("li.pages").size() - 3;//获取页数
|
||||
if (pagesNum > pages) {
|
||||
$("li.right").hide();
|
||||
}
|
||||
if (pagesNum > 3) {
|
||||
$("li.left").show();
|
||||
} else {
|
||||
$("li.left").hide();
|
||||
}
|
||||
$("li.pages a").eq(pagesNum - 1).css("color", "white");//添加选中字体颜色
|
||||
$("li.pages a").eq(pagesNum - 1).css("background-color", "#00BFFF");//添加选中背景颜色
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
387
AUTS.Web/Areas/App/Views/SelProduct/TestLog.cshtml
Normal file
387
AUTS.Web/Areas/App/Views/SelProduct/TestLog.cshtml
Normal file
@@ -0,0 +1,387 @@
|
||||
|
||||
@{
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
<style>
|
||||
.overlay {
|
||||
background-color: #000; /*//背景色*/
|
||||
opacity: 1.0; /*//不透明度*/
|
||||
filter: alpha(opacity=100); /*透明度*/
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.overlayimg {
|
||||
z-index: 11;
|
||||
width: 99%; /*//宽度*/
|
||||
height: auto; /*//高度自动*/
|
||||
}
|
||||
|
||||
/*新代码*/
|
||||
.div_items {
|
||||
width: 200%;
|
||||
height: 200px;
|
||||
border-top: 0px;
|
||||
display: none;
|
||||
overflow: auto;
|
||||
}
|
||||
.div_item {
|
||||
width: 100%;
|
||||
height: 20px;
|
||||
margin-top: 1px;
|
||||
font-size: 13px;
|
||||
line-height: 20px;
|
||||
}
|
||||
td {
|
||||
padding: 10px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
/*新代码*/
|
||||
</style>
|
||||
|
||||
<div class="row wrapper border-bottom white-bg page-heading">
|
||||
<div class="col-lg-10">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<a href="@Url.Action("Index", "Home")">主页</a>
|
||||
</li>
|
||||
<li>
|
||||
<a>产品查询</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<strong>测试数据</strong>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wrapper wrapper-content animated fadeInRight">
|
||||
<div class="row">
|
||||
<div class="col-sm-12" style="padding:0;">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>查询测试数据</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="col-xs-10 col-sm-4 m-b-xs" id="data_ovform" style="padding-right:0px;">
|
||||
<div class="input-group m-b">
|
||||
<span class="input-group-addon">SN:</span>
|
||||
<input type="text" class="form-control" name="BarCode" id="BarCode" list="city">
|
||||
</div>
|
||||
<!--新代码-->
|
||||
<div class="input-group m-b">
|
||||
@* <span>机型 M/O 最新时间 SN</span>*@
|
||||
@*<div class="div_items">*@
|
||||
<table class="div_items">
|
||||
<tr>
|
||||
<td>机型</td>
|
||||
<td>M/O</td>
|
||||
<td>最新时间</td>
|
||||
<td>SN</td>
|
||||
</tr>
|
||||
</table>
|
||||
@*</div>*@
|
||||
</div>
|
||||
<!--新代码-->
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-xs-2" style="padding:0px">
|
||||
<div class="input-group">
|
||||
<button type="button" class="btn btn-primary" id="btnBarCode">查询</button>
|
||||
</div>
|
||||
</div>
|
||||
<datalist id="city"></datalist>
|
||||
</div>
|
||||
|
||||
<div class="row" id="TreeNode">
|
||||
<input type="hidden" id="CodeList"/>
|
||||
<div id="TestLog">
|
||||
|
||||
</div>
|
||||
<p>
|
||||
机型:<span id="product"></span>
|
||||
M/O:<span id="OInterior"></span>
|
||||
</p>
|
||||
<div id="tree">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal inmodal" id="myModal4" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content animated fadeIn">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
||||
<small id="font-bold"></small>
|
||||
</div>
|
||||
<div class="modal-body" id="modal-body">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="BrotherTree" >
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="~/Theme/js/jquery.cookie.js"></script>
|
||||
<script src="~/Theme/js/plugins/bootstrap-treeview/bootstrap-treeview.min.js"></script>
|
||||
<script>
|
||||
var BarCodeList = new Array();
|
||||
|
||||
|
||||
function SeetVal() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$(document).ready(function () {
|
||||
$("#city").empty();
|
||||
var pull = $.cookie("pulldown");
|
||||
if (pull != undefined) {
|
||||
var strArray = pull.split(',');
|
||||
if (strArray.length > 0) {
|
||||
for (var i = 0; i < strArray.length; i++) {
|
||||
if (strArray[i] != "") {
|
||||
$("#city").append("<option value=" + strArray[i] + ">");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var type = sessionStorage.getItem("BarCode");
|
||||
if (type != "") {
|
||||
getTestLogs(type);
|
||||
$("#BarCode").val(type);
|
||||
sessionStorage.setItem("BarCode", "");
|
||||
}
|
||||
});
|
||||
|
||||
//新代码
|
||||
function Snval(e) {
|
||||
$("#BarCode").val(e.id);
|
||||
Show();
|
||||
}
|
||||
$("#btnBarCode").click(function () {
|
||||
var type = $("#BarCode").val();
|
||||
if (type.length >= 1) {
|
||||
$(".div_items").css('display', 'inline ');//如果什么都没填,跳出,保持全部显示状态
|
||||
} else {
|
||||
$(".div_items").css('display', 'none');
|
||||
}
|
||||
if (type != "") {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/APP/SelProduct/selectSN",
|
||||
cache: false,
|
||||
data: { "Sn": type },
|
||||
success: function (data) {
|
||||
$(".ins").remove();
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
//$(".div_items").append(` <div class="div_item" style="border: 1px solid ">` + data[i].Product + ` ` + data[i].OrderInternal + ` ` + data[i].UpdateTime + ` ` + data[i].BarCode + ` </div> `);
|
||||
|
||||
$(".div_items").append(`<tr><td class="ins">` + data[i].Product + `</td><td class="ins">` + data[i].OrderInternal + `</td><td class="ins">` + data[i].UpdateTime + `</td><td class="div_item ins" id="` + data[i].BarCode +`" onclick="Snval(this)">` + data[i].BarCode +`</td></tr>`);
|
||||
|
||||
|
||||
//关键字变色
|
||||
|
||||
var searchText = $("#BarCode").val();//获取你输入的关键字
|
||||
|
||||
var regExp = new RegExp(searchText, "g");//创建正则表达式,g表示全局的,如果不用g,则查找到第一个就不会继续向下查找了
|
||||
|
||||
|
||||
$(".div_item").each(function ()//遍历p里的文字;
|
||||
{
|
||||
var html = $(this).html();
|
||||
var newHtml = html.replace(regExp, "<span style='color:#FF0000' >" + searchText + "</span>");//将找到的关键字替换,加上highlight属性;
|
||||
$(this).html(newHtml);//更新文章;
|
||||
});
|
||||
|
||||
}
|
||||
//移入移出效果
|
||||
$(".div_item").hover(function () {
|
||||
$(this).css('background-color', '#1C86EE').css('color', 'white');
|
||||
}, function () {
|
||||
$(this).css('background-color', 'white').css('color', 'black');
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
});
|
||||
//新代码
|
||||
|
||||
|
||||
//获取条码
|
||||
function getBarCode(barcode) {
|
||||
var BarCode = $("#BarCode").val();
|
||||
|
||||
var CodeList = $("#CodeList").val();//记录条码
|
||||
var CodeLists = CodeList.split(',');
|
||||
//console.log(CodeLists);
|
||||
var strArray = barcode.split(',');
|
||||
for (var i = 0; i < strArray.length; i++) {
|
||||
if (strArray[i].trim() != "" && CodeLists.indexOf(strArray[i]) == -1) {
|
||||
$("#CodeList").val(CodeList + "," + strArray[i]);
|
||||
getTestLogs(strArray[i], i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//图片
|
||||
function addExpand() {
|
||||
var imgs = document.getElementsByTagName("img");
|
||||
//imgs[0].focus();
|
||||
for (var i = 0; i < imgs.length; i++) {
|
||||
imgs[i].onclick = expandPhoto;
|
||||
imgs[i].onkeydown = expandPhoto;
|
||||
}
|
||||
}
|
||||
|
||||
function expandPhoto(that) {
|
||||
var overlay = document.createElement("div");
|
||||
overlay.setAttribute("id", "overlay");
|
||||
overlay.setAttribute("class", "overlay");
|
||||
var modalDody = document.getElementById('modal-body');
|
||||
modalDody.innerHTML = '';
|
||||
modalDody.appendChild(overlay);
|
||||
|
||||
//document.body.appendChild(overlay);
|
||||
|
||||
var img = document.createElement("img");
|
||||
img.setAttribute("id", "expand")
|
||||
img.setAttribute("class", "overlayimg");
|
||||
img.src = that.getAttribute("src");
|
||||
document.getElementById('font-bold').innerHTML = img.src.split('=')[1].split('&')[0];
|
||||
document.getElementById("overlay").appendChild(img);
|
||||
|
||||
img.onclick = restore;
|
||||
|
||||
}
|
||||
|
||||
function restore() {
|
||||
document.body.removeChild(document.getElementById("overlay"));
|
||||
document.body.removeChild(document.getElementById("expand"));
|
||||
}
|
||||
//图片
|
||||
|
||||
function Show() {
|
||||
$(".div_items").css('display', 'none');
|
||||
var BarCode = $("#BarCode").val();
|
||||
|
||||
$("#CodeList").val(BarCode);
|
||||
|
||||
$("#BrotherTree").html('');
|
||||
|
||||
var pull = $.cookie("pulldown");
|
||||
if (pull != undefined) {
|
||||
var strArray = pull.split(',');
|
||||
strArray.unshift(BarCode);//添加开头值
|
||||
strArray.pop();//删除结尾值
|
||||
$.cookie("pulldown", strArray, { expires: 30 });
|
||||
|
||||
} else {
|
||||
var inputLog = ["", "", "", "", "", "", "", "", "", "",];
|
||||
inputLog.unshift(BarCode);//添加开头值
|
||||
inputLog.pop();//删除结尾值
|
||||
$.cookie("pulldown", inputLog, { expires: 30 });
|
||||
}
|
||||
|
||||
getTestLogs(BarCode);
|
||||
|
||||
};
|
||||
|
||||
function getTestLogs(BarCode, type = 99) {
|
||||
if (BarCode.trim() == "") {
|
||||
return;
|
||||
}
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/APP/SelProduct/TestLogDatas",
|
||||
cache: false,
|
||||
data: { "Sn": BarCode },
|
||||
success: function (data) {
|
||||
$.toastr.success('查询成功', {
|
||||
time: 3000,
|
||||
position: 'top-center'
|
||||
});
|
||||
if (type != 99) {
|
||||
var tree = document.createElement("div");
|
||||
tree.setAttribute("id", "tree" + type);
|
||||
var Info = BarCode + " <p>机型:<span>"
|
||||
+ data[0].ProjectName + "</span> M/O:<span>"
|
||||
+ data[0].InternalNo + "</span></p>";
|
||||
|
||||
$("#BrotherTree").append(Info);
|
||||
$("#BrotherTree").append(tree);
|
||||
$('#tree' + type).treeview({
|
||||
data: data[0].nodef, // 数据源
|
||||
showCheckbox: false, //是否显示复选框
|
||||
highlightSelected: false, //是否高亮选中
|
||||
multiSelect: false //多选
|
||||
});
|
||||
$('#tree' + type).treeview('collapseAll', { silent: true });
|
||||
}
|
||||
else {
|
||||
$("#product").html('');
|
||||
$("#OInterior").html('');
|
||||
$('#tree').html('');
|
||||
$("#product").html(data[0].ProjectName);
|
||||
$("#OInterior").html(data[0].InternalNo);
|
||||
$('#tree').treeview({
|
||||
data: data[0].nodef, // 数据源
|
||||
showCheckbox: false, //是否显示复选框
|
||||
highlightSelected: false, //是否高亮选中
|
||||
//nodeIcon: 'glyphicon glyphicon-user', //节点上的图标
|
||||
//nodeIcon: 'glyphicon glyphicon-globe',
|
||||
//emptyIcon: '', //没有子节点的节点图标
|
||||
multiSelect: false, //多选
|
||||
ShowExpandCollapse: false,
|
||||
onNodeChecked: function (event, data) {
|
||||
|
||||
},
|
||||
onNodeSelected: function (event, data) {
|
||||
}
|
||||
});
|
||||
$('#tree').treeview('collapseAll', { silent: true });
|
||||
}
|
||||
addExpand();
|
||||
|
||||
|
||||
//$("#TestLog").html(data);
|
||||
},
|
||||
error: function () {
|
||||
alert("树形结构加载失败!")
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
142
AUTS.Web/Areas/App/Views/SelProduct/_AddSnList.cshtml
Normal file
142
AUTS.Web/Areas/App/Views/SelProduct/_AddSnList.cshtml
Normal file
@@ -0,0 +1,142 @@
|
||||
|
||||
@{
|
||||
Layout = null;
|
||||
|
||||
List<AUTS.Domain.Entities.TBL_OrderInternal> orderInternalList = AUTS.Services.Cache.CacheHelp.GetUserDBOrderInternalList();//内部订单列表
|
||||
|
||||
List<AUTS.Domain.Entities.TBL_Project> projectList = new List<AUTS.Domain.Entities.TBL_Project>();//产品列表
|
||||
var orderCount = 0;
|
||||
if (orderInternalList != null && orderInternalList.Count > 0)
|
||||
{
|
||||
var oIID = orderInternalList[0].OrderID;
|
||||
|
||||
AUTS.Domain.Entities.TBL_Orders order = AUTS.Services.Cache.CacheHelp.GetUserDBOrderList().Single(x => x.OrderID == oIID);//订单列表
|
||||
projectList = AUTS.Services.Cache.CacheHelp.GetUserDBProjectList().Where(x => x.ProjectID == order.ProductID).ToList();//产品列表
|
||||
orderCount = order.OrderCount;
|
||||
//projectList = AUTS.Services.Cache.CacheHelp.GetUserDBProjectList().ToList();//产品列表
|
||||
}
|
||||
}
|
||||
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>@ViewBag.Title</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link-partial">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link-partial">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<form class="form-horizontal" id="modifyPPlanForm">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">内部单</label>
|
||||
<div class="col-md-9">
|
||||
|
||||
<select class="form-control m-b" name="oInterID" id="oInterID" onchange="orderChange()">
|
||||
@if (orderInternalList != null && orderInternalList.Count > 0)
|
||||
{
|
||||
foreach (var item in orderInternalList)
|
||||
{
|
||||
<option value="@item.ID">@item.InternalNo</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">机型</label>
|
||||
<div class="col-md-9">
|
||||
|
||||
<select class="form-control m-b" name="projectID" id="projectID">
|
||||
@if (projectList != null && projectList.Count > 0)
|
||||
{
|
||||
foreach (var item in projectList)
|
||||
{
|
||||
<option value="@item.ID">@item.ProjectName</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">订单数量</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="number" placeholder="订单数量" name="ordelCount" id="ordelCount" value="@orderCount" class="form-control" readonly>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">条码数量</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<input type="number" placeholder="请输入条码数量" name="sn_Count" class="form-control">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-3 col-md-9">
|
||||
<button class="btn btn-md btn-primary" type="button" id="btnModifyPPlan" onclick="excutedUpDate('btnModifyPPlan','@Url.Action("AddSnListAjax", "SelProduct")','modifyPPlanForm','@Url.Action("SnList", "SelProduct")')">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$.getScript("/Plugin/basicfunc.js");
|
||||
$.getScript("/Theme/js/jquery.form.min.js");
|
||||
|
||||
function orderChange() {
|
||||
|
||||
var myselect = document.getElementById("oInterID");
|
||||
var index = myselect.selectedIndex;
|
||||
var oInterID = myselect.options[index].value;
|
||||
//var pid = $(this).children('option:selected').val();//这就是selected的值
|
||||
|
||||
// Ajax提交数据
|
||||
$.ajax({
|
||||
url: "/app/SelProduct/SetProjectSelected",//"APP/login/login", // 提交到controller的url路径
|
||||
type: "post", // 提交方式
|
||||
data: { "oInterID": oInterID }, // data为String类型,必须为 Key/Value 格式。
|
||||
dataType: "json", // 服务器端返回的数据类型
|
||||
success: function (res) { // 请求成功后的回调函数,其中的参数data为controller返回的map,也就是说,然后通过data这个参数取JSON数据中的值
|
||||
$("#projectID").empty();
|
||||
//$("#stationBox").empty();
|
||||
|
||||
if (res.Status == 200) {
|
||||
|
||||
if (res.Data) {
|
||||
var projecthtml = "";
|
||||
for (var i = 0; i < res.Data.Project.length; i++) {
|
||||
//html += ' <label class="checkbox-inline"> <input type="checkbox" name="stationID" value="' + res.Data[i].StationID + '">' + res.Data[i].StationName + '</label>';
|
||||
projecthtml += ' <option value=' + res.Data.Project[i].ProjectID + '>' + res.Data.Project[i].ProjectName + '</option>';
|
||||
}
|
||||
$("#projectID").html(projecthtml);
|
||||
|
||||
//var stationHtml = "";
|
||||
//for (var i = 0; i < res.Data.StationList.length; i++) {
|
||||
// stationHtml += ' <label class="checkbox-inline"> <input type="checkbox" name="stationID" value="' + res.Data.StationList[i].StationID + '">' + res.Data.StationList[i].StationName + '-' + res.Data.StationList[i].StationDesc + '</label>';
|
||||
// //html += ' <option value=' + res.Data[i].StationID + '>' + res.Data[i].StationName + '</option>';
|
||||
//}
|
||||
//$("#stationBox").html(stationHtml);
|
||||
$("#ordelCount").val(res.Data.Count);
|
||||
}
|
||||
}
|
||||
else if (res.Status != 200) {
|
||||
}
|
||||
},
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
306
AUTS.Web/Areas/App/Views/SelProduct/_SnTestList.cshtml
Normal file
306
AUTS.Web/Areas/App/Views/SelProduct/_SnTestList.cshtml
Normal file
@@ -0,0 +1,306 @@
|
||||
|
||||
@{
|
||||
Layout = null;
|
||||
|
||||
var SnList = ViewData["SnList"] as List<AUTS.Domain.Entities.TBL_SnList>;
|
||||
var Station = ViewData["Stations"] as List<AUTS.Domain.Entities.TBL_StationList>;
|
||||
//var Stationdata = Json.Encode(Station.Select(x => new { x.ID, x.StationName }).ToList());
|
||||
}
|
||||
|
||||
@if (Station != null)
|
||||
{
|
||||
<div>
|
||||
|
||||
<nav style="text-align:center;">
|
||||
<ul class="pagination" id="page">
|
||||
<li class="first" onclick="getSnList(1)"><a>首页</a></li>
|
||||
<li class="left"><a>…</a></li>
|
||||
@for (int i = 0; i < ViewBag.allpage; i++)
|
||||
{
|
||||
<li class="pages" onclick="getSnList(@(i + 1))"><a>@(i + 1)</a></li>
|
||||
}
|
||||
<li class="right"><a>…</a></li>
|
||||
<li class="finally"><a onclick="getSnList(@ViewBag.allpage)">尾页</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<table class="table table-striped table-bordered table-hover dataTables-example" id="table_id_example">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>条码</th>
|
||||
@for (int i = 0; i < Station.Count; i++)
|
||||
{
|
||||
<th>
|
||||
@Station[i].StationName
|
||||
</th>
|
||||
}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if (SnList != null && SnList.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < SnList.Count; i++)
|
||||
{
|
||||
|
||||
<tr style="text-align:center;">
|
||||
<td>@SnList[i].ID</td>
|
||||
|
||||
<td><a onclick="show('@SnList[i].BarCode')"> @SnList[i].BarCode</a></td>
|
||||
@for (int j = 0; j < Station.Count; j++)
|
||||
{
|
||||
if (Station.Count > 0)
|
||||
{
|
||||
switch (Station[j].SnListOrder)
|
||||
{
|
||||
case 1:
|
||||
<td @(SnList[i].Result1 == 1 ? "style=color:#00B400" : "style=color:#ff0000")>
|
||||
<span class="result">@(SnList[i].Result1 == 1 ? "true" : SnList[i].Result1 == 0 ? "" : "")</span>
|
||||
<br />@(SnList[i].S1 == null ? "" : SnList[i].S1.Value.ToString("yyyy/MM/dd"))
|
||||
<br />@(SnList[i].S1 == null ? "" : SnList[i].S1.Value.ToString("HH:mm:ss"))
|
||||
</td>
|
||||
break;
|
||||
case 2:
|
||||
<td @(SnList[i].Result2 == 1 ? "style=color:#00B400" : "style=color:#ff0000")>
|
||||
|
||||
@(SnList[i].Result2 == 1 ? "true" : SnList[i].Result2 == 0 ? "" : "")
|
||||
<br />@(SnList[i].S2 == null ? "" : SnList[i].S2.Value.ToString("yyyy/MM/dd"))
|
||||
<br />@(SnList[i].S2 == null ? "" : SnList[i].S2.Value.ToString("HH:mm:ss"))
|
||||
</td>
|
||||
break;
|
||||
case 3:
|
||||
<td @(SnList[i].Result3 == 1 ? "style=color:#00B400" : "style=color:#ff0000")>
|
||||
@(SnList[i].Result3 == 1 ? "true" : SnList[i].Result3 == 0 ? "" : "")
|
||||
<br />@(SnList[i].S3 == null ? "" : SnList[i].S3.Value.ToString("yyyy/MM/dd"))
|
||||
<br />@(SnList[i].S3 == null ? "" : SnList[i].S3.Value.ToString("HH:mm:ss"))
|
||||
</td>
|
||||
break;
|
||||
case 4:
|
||||
<td @(SnList[i].Result4 == 1 ? "style=color:#00B400" : "style=color:#ff0000")>
|
||||
@(SnList[i].Result4 == 1 ? "true" : SnList[i].Result4 == 0 ? "" : "")
|
||||
<br />@(SnList[i].S4 == null ? "" : SnList[i].S4.Value.ToString("yyyy/MM/dd"))
|
||||
<br />@(SnList[i].S4 == null ? "" : SnList[i].S4.Value.ToString("HH:mm:ss"))
|
||||
</td>
|
||||
break;
|
||||
case 5:
|
||||
<td @(SnList[i].Result5 == 1 ? "style=color:#00B400" : "style=color:#ff0000")>
|
||||
|
||||
@(SnList[i].Result5 == 1 ? "true" : SnList[i].Result5 == 0 ? "" : "")
|
||||
<br />@(SnList[i].S5 == null ? "" : SnList[i].S5.Value.ToString("yyyy/MM/dd"))
|
||||
<br />@(SnList[i].S5 == null ? "" : SnList[i].S5.Value.ToString("HH:mm:ss"))
|
||||
</td>
|
||||
break;
|
||||
case 6:
|
||||
<td @(SnList[i].Result6 == 1 ? "style=color:#00B400" : "style=color:#ff0000")>
|
||||
|
||||
@(SnList[i].Result6 == 1 ? "true" : SnList[i].Result6 == 0 ? "" : "")
|
||||
<br />@(SnList[i].S6 == null ? "" : SnList[i].S6.Value.ToString("yyyy/MM/dd"))
|
||||
<br />@(SnList[i].S6 == null ? "" : SnList[i].S6.Value.ToString("HH:mm:ss"))
|
||||
</td>
|
||||
break;
|
||||
case 7:
|
||||
<td @(SnList[i].Result7 == 1 ? "style=color:#00B400" : "style=color:#ff0000")>
|
||||
|
||||
@(SnList[i].Result7 == 1 ? "true" : SnList[i].Result7 == 0 ? "" : "")
|
||||
<br />@(SnList[i].S7 == null ? "" : SnList[i].S7.Value.ToString("yyyy/MM/dd"))
|
||||
<br />@(SnList[i].S7 == null ? "" : SnList[i].S7.Value.ToString("HH:mm:ss"))
|
||||
</td>
|
||||
break;
|
||||
case 8:
|
||||
<td @(SnList[i].Result8 == 1 ? "style=color:#00B400" : "style=color:#ff0000")>
|
||||
|
||||
@(SnList[i].Result8 == 1 ? "true" : SnList[i].Result8 == 0 ? "" : "")
|
||||
<br />@(SnList[i].S8 == null ? "" : SnList[i].S8.Value.ToString("yyyy/MM/dd"))
|
||||
<br />@(SnList[i].S8 == null ? "" : SnList[i].S8.Value.ToString("HH:mm:ss"))
|
||||
</td>
|
||||
break;
|
||||
case 9:
|
||||
<td @(SnList[i].Result9 == 1 ? "style=color:#00B400" : "style=color:#ff0000")>
|
||||
|
||||
@(SnList[i].Result9 == 1 ? "true" : SnList[i].Result8 == 0 ? "" : "")
|
||||
<br />@(SnList[i].S9 == null ? "" : SnList[i].S9.Value.ToString("yyyy/MM/dd"))
|
||||
<br />@(SnList[i].S9 == null ? "" : SnList[i].S9.Value.ToString("HH:mm:ss"))
|
||||
</td>
|
||||
break;
|
||||
case 10:
|
||||
<td @(SnList[i].Result10 == 1 ? "style=color:#00B400" : "style=color:#ff0000")>
|
||||
|
||||
@(SnList[i].Result10 == 1 ? "true" : SnList[i].Result10 == 0 ? "" : "")
|
||||
<br />@(SnList[i].S10 == null ? "" : SnList[i].S10.Value.ToString("yyyy/MM/dd"))
|
||||
<br />@(SnList[i].S10 == null ? "" : SnList[i].S10.Value.ToString("HH:mm:ss"))
|
||||
</td>
|
||||
break;
|
||||
case 11:
|
||||
<td @(SnList[i].Result11 == 1 ? "style=color:#00B400" : "style=color:#ff0000")>
|
||||
|
||||
@(SnList[i].Result11 == 1 ? "true" : SnList[i].Result11 == 0 ? "" : "")
|
||||
<br />@(SnList[i].S11 == null ? "" : SnList[i].S11.Value.ToString("yyyy/MM/dd"))
|
||||
<br />@(SnList[i].S11 == null ? "" : SnList[i].S11.Value.ToString("HH:mm:ss"))
|
||||
</td>
|
||||
break;
|
||||
case 12:
|
||||
<td @(SnList[i].Result12 == 1 ? "style=color:#00B400" : "style=color:#ff0000")>
|
||||
|
||||
@(SnList[i].Result12 == 1 ? "true" : SnList[i].Result12 == 0 ? "" : "")
|
||||
<br />@(SnList[i].S12 == null ? "" : SnList[i].S12.Value.ToString("yyyy/MM/dd"))
|
||||
<br />@(SnList[i].S12 == null ? "" : SnList[i].S12.Value.ToString("HH:mm:ss"))
|
||||
</td>
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
@*//可用键值对
|
||||
<tr style="text-align:center;">
|
||||
<td>@SnList[i].ID</td>
|
||||
<td><a onclick="show('@SnList[i].BarCode')"> @SnList[i].BarCode</a></td>
|
||||
@if (Station.Count > 0)
|
||||
{
|
||||
<td @(SnList[i].Result1 == 1 ? "style=color:#00B400" : "style=color:#ff0000")>
|
||||
<span class="result">@(SnList[i].Result1 == 1 ? "true" : SnList[i].Result1 == 0 ? "false" : "")</span>
|
||||
<br />@(SnList[i].S1 == null ? "" : SnList[i].S1.Value.ToString("yyyy/MM/dd"))
|
||||
<br />@(SnList[i].S1 == null ? "" : SnList[i].S1.Value.ToString("HH:mm:ss"))
|
||||
</td>
|
||||
}
|
||||
|
||||
@if (Station.Count > 1)
|
||||
{
|
||||
<td @(SnList[i].Result2 == 1 ? "style=color:#00B400" : "style=color:#ff0000")>
|
||||
|
||||
@(SnList[i].Result2 == 1 ? "true" : SnList[i].Result2 == 0 ? "false" : "")
|
||||
<br />@(SnList[i].S2 == null ? "" : SnList[i].S2.Value.ToString("yyyy/MM/dd"))
|
||||
<br />@(SnList[i].S2 == null ? "" : SnList[i].S2.Value.ToString("HH:mm:ss"))
|
||||
</td>
|
||||
}
|
||||
|
||||
@if (Station.Count > 2)
|
||||
{
|
||||
<td @(SnList[i].Result3 == 1 ? "style=color:#00B400" : "style=color:#ff0000")>
|
||||
@(SnList[i].Result3 == 1 ? "true" : SnList[i].Result3 == 0 ? "false" : "")
|
||||
<br />@(SnList[i].S3 == null ? "" : SnList[i].S3.Value.ToString("yyyy/MM/dd"))
|
||||
<br />@(SnList[i].S3 == null ? "" : SnList[i].S3.Value.ToString("HH:mm:ss"))
|
||||
</td>
|
||||
}
|
||||
|
||||
@if (Station.Count > 3)
|
||||
{
|
||||
<td @(SnList[i].Result4 == 1 ? "style=color:#00B400" : "style=color:#ff0000")>
|
||||
@(SnList[i].Result4 == 1 ? "true" : SnList[i].Result4 == 0 ? "false" : "")
|
||||
<br />@(SnList[i].S4 == null ? "" : SnList[i].S4.Value.ToString("yyyy/MM/dd"))
|
||||
<br />@(SnList[i].S4 == null ? "" : SnList[i].S4.Value.ToString("HH:mm:ss"))
|
||||
</td>
|
||||
}
|
||||
|
||||
@if (Station.Count > 4)
|
||||
{
|
||||
<td @(SnList[i].Result5 == 1 ? "style=color:#00B400" : "style=color:#ff0000")>
|
||||
|
||||
@(SnList[i].Result5 == 1 ? "true" : SnList[i].Result5 == 0 ? "false" : "")
|
||||
<br />@(SnList[i].S5 == null ? "" : SnList[i].S5.Value.ToString("yyyy/MM/dd"))
|
||||
<br />@(SnList[i].S5 == null ? "" : SnList[i].S5.Value.ToString("HH:mm:ss"))
|
||||
</td>
|
||||
}
|
||||
|
||||
@if (Station.Count > 5)
|
||||
{
|
||||
<td @(SnList[i].Result6 == 1 ? "style=color:#00B400" : "style=color:#ff0000")>
|
||||
|
||||
@(SnList[i].Result6 == 1 ? "true" : SnList[i].Result6 == 0 ? "false" : "")
|
||||
<br />@(SnList[i].S6 == null ? "" : SnList[i].S6.Value.ToString("yyyy/MM/dd"))
|
||||
<br />@(SnList[i].S6 == null ? "" : SnList[i].S6.Value.ToString("HH:mm:ss"))
|
||||
</td>
|
||||
}
|
||||
|
||||
@if (Station.Count > 6)
|
||||
{
|
||||
<td @(SnList[i].Result7 == 1 ? "style=color:#00B400" : "style=color:#ff0000")>
|
||||
|
||||
@(SnList[i].Result7 == 1 ? "true" : SnList[i].Result7 == 0 ? "false" : "")
|
||||
<br />@(SnList[i].S1 == null ? "" : SnList[i].S7.Value.ToString("yyyy/MM/dd"))
|
||||
<br />@(SnList[i].S7 == null ? "" : SnList[i].S7.Value.ToString("HH:mm:ss"))
|
||||
</td>
|
||||
}
|
||||
|
||||
@if (Station.Count > 7)
|
||||
{
|
||||
<td @(SnList[i].Result8 == 1 ? "style=color:#00B400" : "style=color:#ff0000")>
|
||||
|
||||
@(SnList[i].Result8 == 1 ? "true" : SnList[i].Result8 == 0 ? "false" : "")
|
||||
<br />@(SnList[i].S8 == null ? "" : SnList[i].S8.Value.ToString("yyyy/MM/dd"))
|
||||
<br />@(SnList[i].S8 == null ? "" : SnList[i].S8.Value.ToString("HH:mm:ss"))
|
||||
</td>
|
||||
}
|
||||
|
||||
@if (Station.Count > 8)
|
||||
{
|
||||
<td @(SnList[i].Result9 == 1 ? "style=color:#00B400" : "style=color:#ff0000")>
|
||||
@(SnList[i].Result9 == 1 ? "true" : SnList[i].Result9 == 0 ? "false" : "")
|
||||
<br />@(SnList[i].S9 == null ? "" : SnList[i].S9.Value.ToString("yyyy/MM/dd"))
|
||||
<br />@(SnList[i].S9 == null ? "" : SnList[i].S9.Value.ToString("HH:mm:ss"))
|
||||
</td>
|
||||
}
|
||||
|
||||
@if (Station.Count > 9)
|
||||
{
|
||||
<td @(SnList[i].Result10 == 1 ? "style=color:#00B400" : "style=color:#ff0000")>
|
||||
|
||||
@(SnList[i].Result10 == 1 ? "true" : SnList[i].Result10 == 0 ? "false" : "")
|
||||
<br />@(SnList[i].S10 == null ? "" : SnList[i].S10.Value.ToString("yyyy/MM/dd"))
|
||||
<br />@(SnList[i].S10 == null ? "" : SnList[i].S10.Value.ToString("HH:mm:ss"))
|
||||
</td>
|
||||
}
|
||||
|
||||
@if (Station.Count > 10)
|
||||
{
|
||||
<td @(SnList[i].Result11 == 1 ? "style=color:#00B400" : "style=color:#ff0000")>
|
||||
|
||||
@(SnList[i].Result11 == 1 ? "true" : SnList[i].Result11 == 0 ? "false" : "")
|
||||
<br />@(SnList[i].S11 == null ? "" : SnList[i].S11.Value.ToString("yyyy/MM/dd"))
|
||||
<br />@(SnList[i].S11 == null ? "" : SnList[i].S11.Value.ToString("HH:mm:ss"))
|
||||
</td>
|
||||
}
|
||||
|
||||
@if (Station.Count > 11)
|
||||
{
|
||||
<td @(SnList[i].Result12 == 1 ? "style=color:#00B400" : "style=color:#ff0000")>
|
||||
@(SnList[i].Result12 == 1 ? "true" : SnList[i].Result12 == 0 ? "false" : "")
|
||||
<br />@(SnList[i].S12 == null ? "" : SnList[i].S12.Value.ToString("yyyy/MM/dd"))
|
||||
<br />@(SnList[i].S12 == null ? "" : SnList[i].S12.Value.ToString("HH:mm:ss"))
|
||||
</td>
|
||||
}
|
||||
|
||||
</tr>*@
|
||||
}
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
else
|
||||
{
|
||||
<td>暂无数据</td>
|
||||
}
|
||||
|
||||
@*<input id="ztidhtml" type="hidden" value="@Stationdata" />*@
|
||||
|
||||
<script>
|
||||
function show(Sn) {
|
||||
sessionStorage.setItem("BarCode", Sn);
|
||||
window.location.href = "/App/SelProduct/TestLog";
|
||||
}
|
||||
$(".DataCount").html('(' +@ViewBag.DataCount+')');
|
||||
var pagesNum = $("li.pages").size();//获取页数
|
||||
$("li.left").hide();
|
||||
|
||||
if (pagesNum > 5) {
|
||||
$("li.right").show();
|
||||
} else {
|
||||
$("li.right").hide();
|
||||
}
|
||||
</script>
|
||||
108
AUTS.Web/Areas/App/Views/SelProduct/_TestLogData.cshtml
Normal file
108
AUTS.Web/Areas/App/Views/SelProduct/_TestLogData.cshtml
Normal file
@@ -0,0 +1,108 @@
|
||||
@model List<AUTS.Domain.ToDayCapacity>
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
@if (Model != null && Model.Count > 0)
|
||||
{
|
||||
<table class="table table-striped table-bordered table-hover dataTables-example" id="editable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>站</th>
|
||||
<th>SN</th>
|
||||
<th>检测时间</th>
|
||||
<th>测试结果</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>@item.StationName</td>
|
||||
<td>@item.DUT_SN</td>
|
||||
<td>@item.StartTime</td>
|
||||
<td>@item.TestResult</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
else
|
||||
{
|
||||
<h3>暂无计划</h3>
|
||||
}
|
||||
|
||||
<script src="~/Theme/js/plugins/dataTables/datatables.min.js"></script>
|
||||
<script>
|
||||
|
||||
var table = $("#editable").DataTable({
|
||||
language: {
|
||||
"processing": "处理中...",
|
||||
"sLengthMenu": "显示 _MENU_ 项结果",
|
||||
"zeroRecords": "没有匹配的记录",
|
||||
"info": "第 _START_ 至 _END_ 项记录,共 _TOTAL_ 项",
|
||||
"infoEmpty": "第 0 至 0 项记录,共 0 项",
|
||||
"sSearch": "搜索:",
|
||||
"infoFiltered": "",
|
||||
"infoPostFix": "",
|
||||
"decimal": ",",
|
||||
"thousands": ".",
|
||||
"emptyTable": "未找到符合条件的数据",
|
||||
"paginate": {
|
||||
"first": "首页",
|
||||
"previous": "上一页",
|
||||
"next": "下一页",
|
||||
"last": "尾页"
|
||||
}
|
||||
},
|
||||
"order": [[2, "desc"]],
|
||||
retrieve: true,
|
||||
paging: true,
|
||||
ordering: true,
|
||||
info: true,
|
||||
autoWidth: false,
|
||||
pageLength: 100,//每页显示25条数据
|
||||
pagingType: "full_numbers", //分页样式:simple,simple_numbers,full,full_numbers,zzzzzzz
|
||||
bFilter: true, //去掉搜索框方法
|
||||
bLengthChange: true,//也就是页面上确认是否可以进行选择一页展示多少条
|
||||
});
|
||||
//serverSide: true, //启用服务器端分页,要进行后端分页必须的环节
|
||||
//ajax: function (data, callback, settings) {
|
||||
// //封装相应的请求参数,这里获取页大小和当前页码
|
||||
// var pagesize = data.length;//页面显示记录条数,在页面显示每页显示多少项的时候,页大小
|
||||
// var page = (data.start) / data.length + 1;//当前页码
|
||||
// $.ajax({
|
||||
// type: "POST",
|
||||
// url: "/app/SelProduct/TestLogData",
|
||||
// cache: false, //禁用缓存
|
||||
// //data: json, //传入已封装的参数
|
||||
// data: { "id": 9,"page": page, "pagesize": pagesize }, //传入已封装的参数
|
||||
// dataType: "json",//返回数据格式为json
|
||||
// success: function (res) {
|
||||
// //console.log(res.Data);
|
||||
// //console.log(res.Status);
|
||||
// var returnData = {};
|
||||
// //returnData.draw = arr.data.pagination.TotalCount;//这里直接自行返回了draw计数器,应该由后台返回,没什么卵用!
|
||||
// returnData.recordsTotal = res.Status;//totalCount指的是总记录数
|
||||
// returnData.recordsFiltered = res.Status;//后台不实现过滤功能,全部的记录数都需输出到前端,记录数为总数
|
||||
|
||||
// returnData.data = res.Data;//返回列表
|
||||
// //console.log(res.Data[0].CreateTiem);
|
||||
// callback(returnData);//这个别忘了!!!
|
||||
// //console.log(returnData)
|
||||
// },
|
||||
// error: function (XMLHttpRequest, textStatus, errorThrown) {
|
||||
// alert("查询失败");
|
||||
// $wrapper.spinModal(false);
|
||||
// }
|
||||
// });
|
||||
//},
|
||||
//columns: [
|
||||
// //{ "data": "ID" },
|
||||
// { "data": "DUT_SN" },
|
||||
// { "data": "StartTime" },
|
||||
// { "data": "TestResult" },
|
||||
//]
|
||||
//});
|
||||
</script>
|
||||
122
AUTS.Web/Areas/App/Views/SelProduct/_TestLogDatas.cshtml
Normal file
122
AUTS.Web/Areas/App/Views/SelProduct/_TestLogDatas.cshtml
Normal file
@@ -0,0 +1,122 @@
|
||||
|
||||
@{
|
||||
Layout = null;
|
||||
AUTS.Domain.Entities.TBL_OrderInternal orderInfo = ViewData["OrderInfo"] as AUTS.Domain.Entities.TBL_OrderInternal;
|
||||
}
|
||||
|
||||
<div>
|
||||
<span>机型:@ViewData["ProjectName"]</span>
|
||||
|
||||
@if (orderInfo != null)
|
||||
{
|
||||
<span>@orderInfo.InternalNo</span>
|
||||
}
|
||||
|
||||
</div>
|
||||
|
||||
@if (ViewData["tableData"] != null)
|
||||
{
|
||||
System.Data.DataSet dates = (System.Data.DataSet)ViewData["tableData"];
|
||||
List<string> stationName = (List<string>)ViewData["stationName"];
|
||||
int length = 0;
|
||||
for (int i = 0; i < dates.Tables.Count; i++)
|
||||
{
|
||||
if (dates.Tables[i].Rows.Count > 0)
|
||||
{
|
||||
for (int row = 0; row < dates.Tables[i].Rows.Count; row++)
|
||||
{
|
||||
<div class="dd col-sm-4" id="nestable_@length">
|
||||
<ol class="dd-list">
|
||||
<li class="dd-item" data-id="1">
|
||||
<div class="dd-handle">
|
||||
<span class="label label-info"></span> @stationName[i] <c style="padding:0 45px"> @dates.Tables[i].Rows[row][9]</c> @dates.Tables[i].Rows[row][7]
|
||||
</div>
|
||||
<ol class="dd-list TestInfo">
|
||||
@{length++;}
|
||||
|
||||
@for (int j = 0; j < dates.Tables[i].Columns.Count; j++)
|
||||
{
|
||||
<li class="dd-item" data-id="2">
|
||||
<div class="dd-handle" style="word-break:break-all; ">
|
||||
<span class="pull-right text-muted small"> @dates.Tables[i].Rows[row][j] </span>
|
||||
@dates.Tables[i].Columns[j]
|
||||
|
||||
@if (dates.Tables[i].Columns[j].ToString() == "ImagePath" || dates.Tables[i].Columns[j].ToString() == "ImagePath2")
|
||||
{
|
||||
<img src="/BasicFunc/FileImage?url=@dates.Tables[i].Rows[row][j].ToString()&type=false" alt="Alternate Text" width="50" height="50" />
|
||||
}
|
||||
|
||||
</div>
|
||||
</li>
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
</ol>
|
||||
</ol>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="col-sm-4" style="padding:0">
|
||||
<ol class="dd-list">
|
||||
<li class="dd-item" data-id="1">
|
||||
<div class="dd-handle">
|
||||
<span class="label label-info"></span> @stationName[i] 暂无数据
|
||||
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<!--<h3 class="col-sm-4">@stationName[i] 暂无数据</h3>-->
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<h3 class="col-sm-4">暂无数据</h3>
|
||||
}
|
||||
|
||||
<script src="~/Theme/js/plugins/nestable/jquery.nestable.js">
|
||||
</script>
|
||||
<script>
|
||||
//$(document).ready(function () {
|
||||
|
||||
|
||||
// var updateOutput = function (e) {
|
||||
// var list = e.length ? e : $(e.target),
|
||||
// output = list.data('output');
|
||||
// if (window.JSON) {
|
||||
// output.val(window.JSON.stringify(list.nestable('serialize')));//, null, 2));
|
||||
// }
|
||||
// else {
|
||||
// output.val('JSON browser support required for this demo.');
|
||||
// }
|
||||
// };
|
||||
|
||||
// var nestableLength = $(".dd").length;
|
||||
// for (var i = 0; i < nestableLength; i++) {
|
||||
// $('#nestable_' + i).nestable({
|
||||
// group: 1
|
||||
// }).on('change', updateOutput);
|
||||
|
||||
// updateOutput($('#nestable_' + i).data('output', $('#nestable_' + i + '-output')));
|
||||
// }
|
||||
|
||||
// $("button[data-action='expand']").css("display", "block");
|
||||
// $("button[data-action='collapse']").css("display", "none");
|
||||
// $(".TestInfo").css("display", "none");
|
||||
// //$('#nestable-menu').on('click', function (e) {
|
||||
// // var target = $(e.target),
|
||||
// // action = target.data('action');
|
||||
// // if (action === 'expand-all') {
|
||||
// // $('.dd').nestable('expandAll');
|
||||
// // }
|
||||
// // if (action === 'collapse-all') {
|
||||
// // $('.dd').nestable('collapseAll');
|
||||
// // }
|
||||
// //});
|
||||
//});
|
||||
</script>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user