From 583f2b9fcbe915eb073532ead9080d11a33e0c24 Mon Sep 17 00:00:00 2001
From: zzr99 <1940172413@qq.com>
Date: 星期二, 17 八月 2021 18:34:10 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MESWMS-LayUI
---
WebTM/views/home/console.html | 30
WebTM/views/生产管理/产量汇报单/Sc_ProductReportBillList.html | 4
WebTM/views/PublicPage/Gy_Maintain.html | 254 +++++++++++
WebTM/views/车间管理/工序流转卡/Sc_ProcessExchangeBillList.html | 348 ++++++++-------
WebTM/views/生产管理/产量汇报单/Sc_Add_ProductReportBillList.html | 96 ++++
WebTM/views/模治具管理/模治具管理/Sc_MouldMaintainBillList.html | 23
WebTM/views/index.html | 5
WebTM/views/模治具管理/模治具管理/Sc_Add_MouldMaintainBillList.html | 392 ++++++++++++-----
WebTM/views/生产管理/产量汇报单/Sc_ProductReportBillList_Web.html | 109 ++++
WebTM/WebTM.csproj | 1
10 files changed, 953 insertions(+), 309 deletions(-)
diff --git a/WebTM/WebTM.csproj b/WebTM/WebTM.csproj
index a3b35c9..f16a144 100644
--- a/WebTM/WebTM.csproj
+++ b/WebTM/WebTM.csproj
@@ -105,6 +105,7 @@
<Content Include="views\grf\a.grf" />
<Content Include="views\grf\b1.grf" />
<Content Include="views\grf\b.grf" />
+ <Content Include="views\PublicPage\Gy_Maintain.html" />
<Content Include="views\ReportHtml.html" />
<Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\Add_Edit_Gy_MouldType.html" />
<Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\grf\b.grf" />
diff --git a/WebTM/views/PublicPage/Gy_Maintain.html b/WebTM/views/PublicPage/Gy_Maintain.html
new file mode 100644
index 0000000..5118664
--- /dev/null
+++ b/WebTM/views/PublicPage/Gy_Maintain.html
@@ -0,0 +1,254 @@
+锘�<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>閫夋嫨淇濆吇椤圭洰璧勬枡</title>
+ <meta name="renderer" content="webkit">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+ <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
+ <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
+ <script src="../../layuiadmin/layui/layui.js"></script>
+ <script src="../../layuiadmin/treeTable.js"></script>
+ <script src="../../layuiadmin/Scripts/json2.js"></script>
+ <script src="../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
+ <script src="../../layuiadmin/Scripts/webConfig.js"></script>
+ <script src="../../layuiadmin/layui/lay/modules/util.js"></script>
+ <style media="screen">
+ .custom-tree-item-clicked {
+ color: #FC9003
+ }
+ </style>
+</head>
+<body>
+ <div class="layui-fluid">
+ <div class="layui-col-md12">
+ <div class="layui-card" style="padding: 1px">
+ <div class="layui-card-body" style="padding: 1px;">
+ <form class="layui-form" action="" lay-filter="component-form-group">
+ <div class="layui-collapse">
+ <div class="layui-colla-item">
+ <div class="layui-form-item" style="border-top: solid 1px #F6F6F6;">
+ <div class="layui-row" style="padding:10px 0">
+ <div class="layui-col-xs3 layui-inline" style="width: 23%;">
+ <div id="treeMaintain" lay-filter="treeMaintain" class="demo-tree demo-tree-box" style="height: 580px; overflow: scroll;"></div>
+ </div>
+ <div class="layui-col-xs9 layui-inline">
+ <div class="layui-row">
+ <div class="layui-inline">
+ <label class="layui-form-label">浠g爜</label>
+ <div class="layui-input-block">
+ <input type="text" class="layui-input" name="HNumber" id="HNumber">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">鍚嶇О</label>
+ <div class="layui-input-block">
+ <input type="text" class="layui-input" name="HName" id="HName">
+ </div>
+ </div>
+ <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
+ <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+ </button>
+ </div>
+ <div>
+ <table class="" id="mainTable" lay-filter="mainTable"></table>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <script src="../../layuiadmin/layui/zgqlayui.js"></script>
+ <script src="../../layuiadmin/zgqCustom/zgqCustom.js"></script>
+ <script>
+ var treeCkData = { id: 0 };
+ var TagId = "";
+ var TagParentId = "";
+
+ layui.config({
+ base: '../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+ }).extend({
+ index: 'lib/index', //涓诲叆鍙fā鍧�
+ }).use(['tree', 'index', 'form', 'table', 'element', 'laypage', 'laydate'], function () {
+ var $ = layui.$
+ , admin = layui.admin
+ , layer = layui.layer
+ , table = layui.table
+ , form = layui.form
+ , element = layui.element
+ , laypage = layui.laypage
+ , laydate = layui.laydate
+ , util = layui.util
+ , tree = layui.tree
+ var sWhere = " where HStopFlag=0 and HEndFlag<>'1' "; //鏍戝瀷
+ var sWhere1 = " where HStopFlag=0 and HEndFlag=1 "; //鍒楄〃
+
+ tree.render({
+ elem: '#treeMaintain',
+ data: getData(sWhere),
+ showCheckbox: false, //鏄惁鏄剧ず澶嶉�夋
+ id: 'demoId',
+ isJump: false, //鏄惁鍏佽鐐瑰嚮鑺傜偣鏃跺脊鍑烘柊绐楀彛璺宠浆
+ showLine: true,//鏄惁寮�鍚繛鎺ョ嚎
+ onlyIconControl: true, //鐐瑰嚮鍚庝笉鏀剁缉
+ click: function (obj) {
+ //鐐瑰嚮楂樺厜
+ if (obj.data.id !== treeCkData.id) {
+ $('div[data-id="' + obj.data.id + '"] span').eq(1).last().addClass("custom-tree-item-clicked");
+ $('div[data-id="' + treeCkData.id + '"] span').eq(1).last().removeClass('custom-tree-item-clicked');
+ treeCkData = obj.data;
+ TagId = obj.data.id;
+ TagParentId = obj.data.ParentID;
+ }
+ else {
+ $('div[data-id="' + treeCkData.id + '"] span').eq(1).last().removeClass('custom-tree-item-clicked');
+ treeCkData = { id: 0 };
+ TagId = "";
+ TagParentId = "";
+ }
+
+
+ $.ajax({
+ url: GetWEBURL() + '/Gy_MaintenanceMode/MaintainCX',
+ type: "GET",
+ data: { "HInterID": obj.data.id },
+ success: function (data1) {
+ if (data1.count == 1) {
+ option.data = data1.data;
+ table.render(option);
+ layer.close(index);
+ } else {
+ layer.close(index);
+ layer.alert(data1.code + data1.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.close(index);
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
+ });
+
+
+ var option = {
+ elem: '#mainTable'
+ //, toolbar: '#toolbarDemo'
+ , height: 'full-120'
+ , page: true
+ , cellMinWidth: 90
+ , cols: [[
+ { type: 'radio', fixed: 'left' }
+ , { field: 'HItemID', title: 'HItemID', sort: true, hide: true }
+ , { field: 'ParentID', title: 'ParentID', sort: true, hide: true }
+ , { field: 'HNumber', title: '淇濆吇椤圭洰浠g爜' }
+ , { field: 'HName', title: '淇濆吇椤圭洰' }
+ ]]
+ };
+
+ var index = layer.load(0, { shade: false });
+ //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
+ $.ajax({
+ url: GetWEBURL() + '/PublicPageMethod/MaintainList',
+ type: "GET",
+ data: { "sWhere": SeachFilter(sWhere1) },
+ success: function (data1) {
+ if (data1.count == 1) {
+ option.data = data1.data;
+ table.render(option);
+ layer.close(index);
+ } else {
+ layer.close(index);
+ layer.alert(data1.code + data1.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.close(index);
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+
+
+ //鏌ヨ鎸夐挳
+ form.on('submit(btnSearch)', function (data) {
+
+ $.ajax({
+ url: GetWEBURL() + '/PublicPageMethod/MaintainList',
+ type: "GET",
+ data: { "sWhere": SeachFilter(sWhere1) },
+ success: function (data1) {
+ if (data1.count == 1) {
+ option.data = data1.data;
+ table.render(option);
+ layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
+ } else {
+ layer.alert(data1.code + data1.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ sWhere1 = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
+ });
+
+ //浠ヤ笂鏄痩ayui妯″潡
+ });
+
+ //鏌ヨ鏍戠姸鏁版嵁
+ function getData(sWhere) {
+ var treeData;
+
+ $.ajax({
+ url: GetWEBURL() + '/Gy_MaintenanceMode/MaintainLoadTree',
+ type: "GET",
+ data: { "sWhere": sWhere },
+ async: false,
+ success: function (result) {
+ var data = result.data;
+ //鐢熸垚鏁版嵁瀵硅薄闆嗗悎
+ treeData = LoadTree(data);
+
+ }
+ });
+ return treeData;
+ }
+ /**澶勭悊鏍戝舰灞曠ず鏁版嵁锛岃姹傛湁ID鍜孭arentID銆乼itle瀛楁**/
+ function LoadTree(data) {
+ let map = {};
+ let treeData = [];
+ data.forEach(it => {
+ map[it.id] = it; //ID涓烘瘡涓妭鐐圭殑id
+ })
+ //鐢熸垚缁撴灉闆�
+ data.forEach(it => {
+ const parent = map[it.ParentID]; //ParentID涓虹埗鑺傜偣鐨刬d
+ if (parent) {
+ if (!Array.isArray(parent.children)) parent.children = [];
+ parent.children.push(it);
+ } else {
+ treeData.push(it)
+ }
+ })
+ return treeData;
+ }
+
+ function SeachFilter(sWhere1) {
+ var HNumber = $("#HNumber").val();
+ var HName = $("#HName").val();
+ if (HNumber) {
+ sWhere1 += " and HNumber like '%" + HNumber + "%'";
+ }
+ if (HName) {
+ sWhere1 += " and HName like '%" + HName + "%'";
+ }
+ return sWhere1;
+ }
+ </script>
+
+</body>
+</html>
diff --git a/WebTM/views/home/console.html b/WebTM/views/home/console.html
index 357b5d1..d516872 100644
--- a/WebTM/views/home/console.html
+++ b/WebTM/views/home/console.html
@@ -99,12 +99,12 @@
<cite>濮斿宸ュ簭鍙戝嚭鍗�</cite>
</a>
</li>
- <li class="layui-col-xs3">
+ <!--<li class="layui-col-xs3">
<a lay-href="set/user/info.html">
<i class="layui-icon layui-icon-set"></i>
<cite>鎴戠殑璧勬枡</cite>
</a>
- </li>
+ </li>-->
</ul>
</div>
<div class="layui-carousel-ind"><ul><li class="layui-this"></li><li class=""></li></ul></div><button class="layui-icon layui-carousel-arrow" lay-type="sub">顦�</button><button class="layui-icon layui-carousel-arrow" lay-type="add">顦�</button>
@@ -194,12 +194,12 @@
<cite>濮斿宸ュ簭鍙戝嚭鍗�</cite>
</a>
</li>
- <li class="layui-col-xs3">
+ <!--<li class="layui-col-xs3">
<a lay-href="set/user/info.html">
<i class="layui-icon layui-icon-set"></i>
<cite>鎴戠殑璧勬枡</cite>
</a>
- </li>
+ </li>-->
</ul>
</div>
<div class="layui-carousel-ind"><ul><li class="layui-this"></li><li class=""></li></ul></div><button class="layui-icon layui-carousel-arrow" lay-type="sub">顦�</button><button class="layui-icon layui-carousel-arrow" lay-type="add">顦�</button>
@@ -272,27 +272,31 @@
<div carousel-item="">
<ul class="layui-row layui-col-space10 layui-this">
<li class="layui-col-xs6">
- <a lay-href="app/content/comment.html" class="layadmin-backlog-body">
+ <a href="javascript:void(0);">
+ <!--<a lay-href="app/content/comment.html" class="layadmin-backlog-body">-->
<h3>寰呭璇勮</h3>
- <p><cite>66</cite></p>
+ <p><cite>0</cite></p>
</a>
</li>
<li class="layui-col-xs6">
- <a lay-href="app/forum/list.html" class="layadmin-backlog-body">
+ <a href="javascript:void(0);">
+ <!--<a lay-href="app/forum/list.html" class="layadmin-backlog-body">-->
<h3>寰呭甯栧瓙</h3>
- <p><cite>12</cite></p>
+ <p><cite>0</cite></p>
</a>
</li>
<li class="layui-col-xs6">
- <a lay-href="template/goodslist.html" class="layadmin-backlog-body">
+ <a href="javascript:void(0);">
+ <!--<a lay-href="template/goodslist.html" class="layadmin-backlog-body">-->
<h3>寰呭鍟嗗搧</h3>
- <p><cite>99</cite></p>
+ <p><cite>0</cite></p>
</a>
</li>
<li class="layui-col-xs6">
- <a href="javascript:;" onclick="layer.tips('涓嶈烦杞�', this, {tips: 3});" class="layadmin-backlog-body">
+ <a href="javascript:void(0);">
+ <!--<a href="javascript:;" onclick="layer.tips('涓嶈烦杞�', this, {tips: 3});" class="layadmin-backlog-body">-->
<h3>寰呭彂璐�</h3>
- <p><cite>20</cite></p>
+ <p><cite>0</cite></p>
</a>
</li>
</ul>
@@ -300,7 +304,7 @@
<li class="layui-col-xs6">
<a href="javascript:;" class="layadmin-backlog-body">
<h3>寰呭鍙嬫儏閾炬帴</h3>
- <p><cite style="color: #FF5722;">5</cite></p>
+ <p><cite style="color: #FF5722;">0</cite></p>
</a>
</li>
</ul>
diff --git a/WebTM/views/index.html b/WebTM/views/index.html
index 4f4faca..58ab2d1 100644
--- a/WebTM/views/index.html
+++ b/WebTM/views/index.html
@@ -50,8 +50,9 @@
</ul>
<ul class="layui-nav layui-layout-right" lay-filter="layadmin-layout-right">
- <li class="layui-nav-item" lay-unselect>
- <a lay-href="app/message/index.html" layadmin-event="message" lay-text="娑堟伅涓績">
+ <li class="layui-nav-item" lay-unselect >
+ <a href="javascript:void(0);">
+ <!--<a lay-href="app/message/index.html" layadmin-event="message" lay-text="娑堟伅涓績">-->
<i class="layui-icon layui-icon-notice"></i>
<!--濡傛灉鏈夋柊娑堟伅锛屽垯鏄剧ず灏忓渾鐐�-->
diff --git "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_Add_MouldMaintainBillList.html" "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_Add_MouldMaintainBillList.html"
index 5be302a..f7f8dfe 100644
--- "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_Add_MouldMaintainBillList.html"
+++ "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_Add_MouldMaintainBillList.html"
@@ -61,11 +61,6 @@
<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
</button>
</div>
-
- <label class="layui-form-label">浜у搧妯″叿</label>
- <div class="layui-input-inline">
- <input type="text" name="HMouldID" id="HMouldID" class="layui-input" value="0">
- </div>
</div>
</div>
<div class="layui-form-item">
@@ -125,22 +120,33 @@
<div class="layui-tab-item layui-show">
<table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
</div>
- <div class="layui-tab-item layui-show">
+ <div class="layui-tab-item">
<table class="layui-hide" id="mainTable1" lay-filter="mainTable1"></table>
</div>
</div>
- </div>
- <script type="text/html" id="toolbarDemo">
- <div class="layui-btn-container">
-
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine"><i class="layui-icon layui-icon-form"></i>澧炲姞涓�琛�</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></i>澶嶅埗涓�琛�</button>
-
- </div>
- </script>
- <script type="text/html" id="xuhao">
- {{d.LAY_TABLE_INDEX+1}}
- </script>
+ </div>
+ <script type="text/html" id="toolbarDemo">
+ <div class="layui-btn-container">
+
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine"><i class="layui-icon layui-icon-form"></i>澧炲姞涓�琛�</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></i>澶嶅埗涓�琛�</button>
+
+ </div>
+ </script>
+ <script type="text/html" id="toolbarDemo1">
+ <div class="layui-btn-container">
+
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine1"><i class="layui-icon layui-icon-form"></i>澧炲姞涓�琛�</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine1"><i class="layui-icon layui-icon-form"></i>澶嶅埗涓�琛�</button>
+
+ </div>
+ </script>
+ <script type="text/html" id="xuhao">
+ {{d.LAY_TABLE_INDEX+1}}
+ </script>
+ <script type="text/html" id="xuhao1">
+ {{d.LAY_TABLE_INDEX+1}}
+ </script>
</form>
</div>
</div>
@@ -149,6 +155,10 @@
<script type="text/html" id="barDemo">
<!--<a class="layui-btn layui-btn-xs" lay-event="edit">缂栬緫</a>-->
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a>
+ </script>
+ <script type="text/html" id="barDemo1">
+ <!--<a class="layui-btn layui-btn-xs" lay-event="edit">缂栬緫</a>-->
+ <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del1">鍒犻櫎</a>
</script>
<script src="../../../layuiadmin/layui/layui.js"></script>
<script src="../../../layuiadmin/Scripts/json2.js"></script>
@@ -184,8 +194,8 @@
var option2;
var option1;
var sBillType = "3807";
- var TabRow = { "HMaterID": 0, "HUnitID": "0 ", "HQty": "0 ", "HQtyMust": "0", "HManagerID": "0", "HRemark": " " };
- var TabRow1 = { "HMaterID": 0, "HUnitID": "0 ", "HQty": "0 ", "HQtyMust": "0", "HManagerID": "0", "HRemark": " " };
+ var TabRow = { "HMaintainItemID": 0, "HMaintainNumber": "", "HMaintainItem": "", "HMaintainPart": "", "HClaim": "", "HManagerID": "0 ", "HManagerNumber": "", "HManagerName": "", "HRemark": "" };
+ var TabRow1 = { "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HMaterSpec": "", "HUnitID": "0", "HUnitNumber": "", "HUnitName": "", "HQty": "0", "HQtyMust": "0", "HManagerID": "0", "HManagerNumber": "", "HManagerName": "", "HRemark": "" };
//#endregion
//#region 杩涘叆椤甸潰鍗冲姞杞�
@@ -226,10 +236,33 @@
}
});
+ // 澶村伐鍏锋爮浜嬩欢
+ table.on('toolbar(mainTable1)', function (obj) {
+ var rowid = 0;
+ var checkStatus = table.checkStatus('mainTable1')
+ , data = checkStatus.data;;
+ var AddRow = table.cache['mainTable1'];
+ var NewRow = TabRow1;
+ switch (obj.event) {
+ //鏂板涓�琛�
+ case 'btn-AddLine1': btnAddLine1(NewRow);
+ break;
+ //澶嶅埗涓�琛�
+ case 'btn-CopyLine1': btnCopyLine1(data);
+ break;
+ }
+ });
+
// 琛屽唴浜嬩欢
table.on('tool(mainTable)', function (obj) {
set_GridDelete(obj); //琛屽唴鍒犻櫎
set_GridCellCheck(obj); //琛屽唴蹇嵎閿瓫閫�
+ });
+
+ // 琛屽唴浜嬩欢
+ table.on('tool(mainTable1)', function (obj) {
+ set_GridDelete1(obj); //琛屽唴鍒犻櫎
+ set_GridCellCheck1(obj); //琛屽唴蹇嵎閿瓫閫�
});
//淇濆吇璁″垝鍐呯爜
@@ -319,7 +352,95 @@
function set_GridCellCheck(obj) {
$(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
if (event.key == "F7") {
- if (obj.event === 'HMaterCode') //鐗╂枡淇℃伅
+ if (obj.event === 'HMaintainNumber') //淇濆吇椤圭洰淇℃伅
+ {
+ //椤甸潰灞�-鑷畾涔�
+ layer.open({
+ type: 2,
+ skin: 'layui-layer-rim', //鍔犱笂杈规
+ title: '淇濆吇椤圭洰鍒楄〃',
+ closeBtn: 1,
+ shift: 2,
+ area: ['90%', '90%'],
+ maxmin: true,
+ content: ['../../PublicPage/Gy_Maintain.html', 'yes'],
+ btn: ['纭畾', '鍙栨秷']
+ , btn1: function (index, layero) {
+ //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+ var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰
+ var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+ if (checkStatus.data.length === 0) {
+ return layer.msg('璇烽�夋嫨鏁版嵁');
+ }
+
+ //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+ obj.update({
+ HMaintainItemID: checkStatus.data[0].HItemID,
+ HMaintainNumber: checkStatus.data[0].HNumber,
+ HMaintainItem: checkStatus.data[0].HName,
+ });
+ layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ , btn2: function (index, layero) {
+ //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+ //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+ },
+ end: function () {
+ }
+ });
+ }
+ if (obj.event === 'HManagerNumber') //璐d换浜轰俊鎭�
+ {
+ //椤甸潰灞�-鑷畾涔�
+ layer.open({
+ type: 2,
+ skin: 'layui-layer-rim', //鍔犱笂杈规
+ title: '璐d换浜哄垪琛�',
+ closeBtn: 1,
+ shift: 2,
+ area: ['90%', '90%'],
+ maxmin: true,
+ content: ['../../PublicPage/UserInformation.html', 'yes'],
+ btn: ['纭畾', '鍙栨秷']
+ , btn1: function (index, layero) {
+
+ //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+ var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰
+ var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+ if (checkStatus.data.length === 0) {
+ return layer.msg('璇烽�夋嫨鏁版嵁');
+ }
+
+ //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+ obj.update({
+ HManagerID: checkStatus.data[0].HItemID,
+ HManagerNumber: checkStatus.data[0].HNumber,
+ HManagerName: checkStatus.data[0].HName
+ });
+
+ layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ , btn2: function (index, layero) {
+ //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+ //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+ },
+ end: function () {
+
+ }
+ });
+ }
+ obj.event = "";
+ return false;
+
+ }
+ })
+ }
+
+ //琛ㄦ牸琛屽唴浜嬩欢蹇嵎閿瓫閫�
+ function set_GridCellCheck1(obj) {
+ $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
+ if (event.key == "F7") {
+ if (obj.event === 'HMaterNumber') //閰嶄欢椤逛俊鎭�
{
//椤甸潰灞�-鑷畾涔�
layer.open({
@@ -342,7 +463,7 @@
//鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
obj.update({
HMaterID: checkStatus.data[0].HItemID,
- HMaterCode: checkStatus.data[0].HNumber,
+ HMaterNumber: checkStatus.data[0].HNumber,
HMaterName: checkStatus.data[0].HName,
HMaterSpec: checkStatus.data[0].HModel,
});
@@ -357,7 +478,7 @@
});
}
- if (obj.event === 'HUnitCode') //鍗曚綅淇℃伅
+ if (obj.event === 'HUnitNumber') //鍗曚綅淇℃伅
{
//椤甸潰灞�-鑷畾涔�
layer.open({
@@ -382,7 +503,7 @@
//鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
obj.update({
HUnitID: checkStatus.data[0].HItemID,
- HUnitCode: checkStatus.data[0].HNumber,
+ HUnitNumber: checkStatus.data[0].HNumber,
HUnitName: checkStatus.data[0].HName
});
@@ -398,54 +519,13 @@
});
}
- if (obj.event === 'HSourceCode') //璧勬簮淇℃伅
+ if (obj.event === 'HManagerNumber') //璐d换浜轰俊鎭�
{
//椤甸潰灞�-鑷畾涔�
layer.open({
type: 2,
skin: 'layui-layer-rim', //鍔犱笂杈规
- title: '璧勬簮鍒楄〃',
- closeBtn: 1,
- shift: 2,
- area: ['90%', '90%'],
- maxmin: true,
- content: ['../../PublicPage/SourceInformation.html', 'yes'],
- btn: ['纭畾', '鍙栨秷']
- , btn1: function (index, layero) {
-
- //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
- var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰
- var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
- if (checkStatus.data.length === 0) {
- return layer.msg('璇烽�夋嫨鏁版嵁');
- }
-
- //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
- obj.update({
- HSourceID: checkStatus.data[0].HItemID,
- HSourceCode: checkStatus.data[0].HNumber,
- HSourceName: checkStatus.data[0].HName
- });
-
- layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
- }
- , btn2: function (index, layero) {
- //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
- //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
- },
- end: function () {
-
- }
- });
- }
-
- if (obj.event === 'HWorkerCode') //浜哄憳淇℃伅
- {
- //椤甸潰灞�-鑷畾涔�
- layer.open({
- type: 2,
- skin: 'layui-layer-rim', //鍔犱笂杈规
- title: '璧勬簮鍒楄〃',
+ title: '璐d换浜哄垪琛�',
closeBtn: 1,
shift: 2,
area: ['90%', '90%'],
@@ -463,9 +543,9 @@
//鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
obj.update({
- HWorkerid: checkStatus.data[0].HItemID,
- HWorkerCode: checkStatus.data[0].HNumber,
- HWorkerName: checkStatus.data[0].HName
+ HManagerID: checkStatus.data[0].HItemID,
+ HManagerNumber: checkStatus.data[0].HNumber,
+ HManagerName: checkStatus.data[0].HName
});
layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
@@ -491,8 +571,13 @@
//debugger;
var sMainStr = JSON.stringify(data.field);
var sSubStr = JSON.stringify(table.cache['mainTable']);
- var sMainSub = sMainStr + ';' + sSubStr;
-
+ var sSubStr1 = JSON.stringify(table.cache['mainTable1']);
+ var sMainSub = sMainStr + ';' + sSubStr + ';' + sSubStr1;
+ if (!AllowLoadData(sSubStr))//鏁版嵁楠岃瘉
+ {
+ return false;
+ }
+
$.ajax(
{
type: "POST",
@@ -529,8 +614,7 @@
//#endregion
//鍒濆鍖栬〃鍗曟彃浠�
- function set_InitFrom()
- {
+ function set_InitFrom() {
//甯歌鐢ㄦ硶
laydate.render({
elem: '#HDate'
@@ -545,29 +629,28 @@
}
//鍒濆鍖栬〃鏍�
- function set_InitGrid()
- {
+ function set_InitGrid() {
Table1(); //淇濆吇椤瑰垪琛�
Table2(); //閰嶄欢椤瑰垪琛�
-
+
}
//鍒濆鍖栦繚鍏婚」鍒楄〃
- function Table1()
- {
+ function Table1() {
//琛ㄥご
columns = [
{ type: 'checkbox', fixed: 'left' }
, { templet: '#xuhao', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe" }
- , { field: 'HMaintainItemID', title: '淇濆吇椤圭洰ID', edit: 'text', event: "" }
- , { field: 'HMaintainNumber', title: '淇濆吇椤圭洰浠g爜', edit: 'text', event: "" }
- , { field: 'HMaintainItem', title: '淇濆吇椤圭洰', edit: 'text', event: "" }
- , { field: 'HMaintainPart', title: '淇濆吇閮ㄤ綅', edit: 'text', event: "" }
- , { field: 'HClaim', title: '鍏蜂綋瑕佹眰', edit: 'text', event: "" }
- , { field: 'HManagerID', title: '璐熻矗浜篒D', edit: 'text' }
- , { field: 'HManagerNumber', title: '璐熻矗浜轰唬鐮�', edit: 'text' }
+ , { field: 'HMaintainItemID', title: '淇濆吇椤圭洰ID', edit: 'text', hide: true }
+ , { field: 'HMaintainNumber', title: '淇濆吇椤圭洰浠g爜', edit: 'text', event: 'HMaintainNumber' }
+ , { field: 'HMaintainItem', title: '淇濆吇椤圭洰', edit: 'text' }
+ , { field: 'HMaintainPart', title: '淇濆吇閮ㄤ綅', edit: 'text' }
+ , { field: 'HClaim', title: '鍏蜂綋瑕佹眰', edit: 'text' }
+ , { field: 'HManagerID', title: '璐熻矗浜篒D', edit: 'text', hide: true }
+ , { field: 'HManagerNumber', title: '璐熻矗浜轰唬鐮�', edit: 'text', event: 'HManagerNumber' }
, { field: 'HManagerName', title: '璐熻矗浜�', edit: 'text' }
, { field: 'HRemark', title: '澶囨敞', edit: 'text' }
+ , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' }
];
option = {
id: 'mainTable'
@@ -588,21 +671,26 @@
//琛ㄥご
columns = [
{ type: 'checkbox', fixed: 'left' }
- , { templet: '#xuhao', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe" }
- , { field: 'HMaintainItemID', title: '淇濆吇椤圭洰ID', edit: 'text', event: "" }
- , { field: 'HMaintainNumber', title: '淇濆吇椤圭洰浠g爜', edit: 'text', event: "" }
- , { field: 'HMaintainItem', title: '淇濆吇椤圭洰', edit: 'text', event: "" }
- , { field: 'HMaintainPart', title: '淇濆吇閮ㄤ綅', edit: 'text', event: "" }
- , { field: 'HClaim', title: '鍏蜂綋瑕佹眰', edit: 'text', event: "" }
- , { field: 'HManagerID', title: '璐熻矗浜篒D', edit: 'text' }
- , { field: 'HManagerNumber', title: '璐熻矗浜轰唬鐮�', edit: 'text' }
+ , { templet: '#xuhao1', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe" }
+ , { field: 'HMaterID', title: '閰嶄欢ID', edit: 'text', hide: true }
+ , { field: 'HMaterNumber', title: '閰嶄欢浠g爜', edit: 'text', event: "HMaterNumber" }
+ , { field: 'HMaterName', title: '閰嶄欢鍚嶇О', edit: 'text' }
+ , { field: 'HMaterSpec', title: '瑙勬牸鍨嬪彿', edit: 'text' }
+ , { field: 'HUnitID', title: '鍗曚綅ID', edit: 'text', hide: true }
+ , { field: 'HUnitNumber', title: '鍗曚綅浠g爜', edit: 'text', event: "HUnitNumber" }
+ , { field: 'HUnitName', title: '鍗曚綅鍚嶇О', edit: 'text' }
+ , { field: 'HQty', title: '瀹為檯鐢ㄩ噺', edit: 'text' }
+ , { field: 'HQtyMust', title: '鏍囧噯鐢ㄩ噺', edit: 'text' }
+ , { field: 'HManagerID', title: '璐熻矗浜篒D', edit: 'text', hide: true }
+ , { field: 'HManagerNumber', title: '璐熻矗浜轰唬鐮�', edit: 'text', event: "HManagerNumber" }
, { field: 'HManagerName', title: '璐熻矗浜�', edit: 'text' }
, { field: 'HRemark', title: '澶囨敞', edit: 'text' }
+ , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo1' }
];
option2 = {
id: 'mainTable1'
, elem: '#mainTable1'
- , toolbar: '#toolbarDemo'
+ , toolbar: '#toolbarDemo1'
, page: false
, cellMinWidth: 120
, height: 500
@@ -614,19 +702,17 @@
}
//鏃犳簮鍗曟柊澧�
- function set_AddFNew()
- {
+ function set_AddFNew() {
//鑾峰彇鏈�澶у崟鎹彿
- //get_MAXNum();
- option.data = [TabRow];
- option2.data = [TabRow1];
+ get_MAXNum();
+ option.data = [];
+ option2.data = [];
table.render(option);
table.render(option2);
}
//缂栬緫
- function set_EditFromGrid()
- {
+ function set_EditFromGrid() {
set_EditForm(linterid); //缂栬緫鑾峰彇琛ㄥご
set_EditGrid(linterid); //缂栬緫鑾峰彇琛ㄤ綋
option.data = [TabRow];
@@ -643,14 +729,15 @@
$.ajax({
url: GetWEBURL() + "/Web/GetMAXNum",
type: "GET",
- data: { "HBillType": '3807' },
+ data: { "HBillType": '3819' },
success: function (d) {
$("#HInterID").val(0);
+ $("#HPlanInterID").val(0);
$("#HBillNo").val(d.data[0].HBillNo);
$("#HDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
$("#HBeginDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
$("#HEndDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
-
+
}
});
}
@@ -667,7 +754,7 @@
success: function (result) {
if (result.code == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
var data = result.data.h_v_Sc_MouldMaintainBillList[0];
- form.val("component-form-group", {
+ form.val("component-form-group", {
"HBillNo": data.鍗曟嵁鍙�
, "HDate": formatDate(data.鏃ユ湡)
, "HInnerBillNo": data.鍐呴儴鍗曟嵁鍙�
@@ -702,13 +789,13 @@
return [year, month, day].join('-');
}
-
+
// 缂栬緫鑾峰彇琛ㄤ綋
function set_EditGrid(linterid) {
$("#HInterID").val(linterid);//淇敼鏃朵富琛↖D
//缂栬緫鍔犺浇鏁版嵁
$.ajax({
- url: GetWEBURL() + 'Sc_MouldMaintainBill/Sc_MouldMaintainBillListProjectDetai',
+ url: GetWEBURL() + 'Sc_MouldMaintainBill/Sc_MouldMaintainBillListProjectDetaiNew',
type: "GET",
data: { "HInterID": linterid },
success: function (result) {
@@ -751,24 +838,97 @@
}
}
+ //澧炲姞涓�琛�
+ function btnAddLine1(NewRow) {
+ table.cache["mainTable1"].push(NewRow);
+ option2.data = table.cache["mainTable1"];
+ table.render(option2);
+ }
+
+ //澶嶅埗涓�琛�
+ function btnCopyLine1(data) {
+ var copydata = JSON.stringify(data);
+ if (data.length <= 0) {
+ layer.msg("璇烽�夋嫨闇�瑕佸鍒剁殑涓�琛岋紒");
+ }
+ else if (data.length > 1) {
+ layer.msg("鍙兘閫夋嫨澶嶅埗涓�琛岋紒");
+ }
+ else {
+ var copydata2 = copydata.substring(1, copydata.length);//鍘婚櫎棣栬瀛楃'['
+ var copyrow = copydata2.substring(0, copydata2.length - 1);//鍘婚櫎鏈熬瀛楃']'
+ table.cache["mainTable1"].push(JSON.parse(copyrow));//灏嗗鍒剁殑琛屽己杞垚json杩藉姞鍒拌〃鏍间笂
+ option2.data = table.cache["mainTable1"];//灏嗘暟鎹粦瀹氬埌data涓�
+ table.render(option2);//灏嗘暟鎹覆鏌撳埌琛ㄦ牸涓�
+ }
+ }
+
//琛ㄦ牸琛屽唴浜嬩欢鍒犻櫎
function set_GridDelete(obj) {
var data = obj.data;
- var rowIndex = $(obj.tr).attr("data-index");
if (obj.event === 'del') {
layer.confirm('鐪熺殑鍒犻櫎琛屼箞', function (index) {
- if (rowIndex === '0') {
- layer.msg('棣栬鏃犳硶鍒犻櫎锛侊紒锛�');
- } else {
- obj.del();
- option.data = table.cache["mainTable"];//灏嗘暟鎹粦瀹氬埌data涓�
- table.reload(option);
- layer.close(index);
- }
+ var rowIndex = $(obj.tr).attr("data-index");
+ option.data = table.cache["mainTable"];//灏嗘暟鎹粦瀹氬埌data涓�
+ obj.del();
+ option.data.splice(rowIndex, 1);//鍒犻櫎缂撳瓨鐨勮
+ table.reload('mainTable',option);
+ layer.close(index);
+
});
}
}
+ //琛ㄦ牸琛屽唴浜嬩欢鍒犻櫎
+ function set_GridDelete1(obj) {
+ var data = obj.data;
+ if (obj.event === 'del1') {
+ layer.confirm('鐪熺殑鍒犻櫎琛屼箞', function (index) {
+ var rowIndex = $(obj.tr).attr("data-index");
+ var oldData = table.cache["mainTable1"];//灏嗘暟鎹粦瀹氬埌data涓�
+ obj.del();
+ oldData.splice(rowIndex, 1);//鍒犻櫎缂撳瓨鐨勮
+ table.reload('mainTable1',oldData);
+ layer.close(index);
+ });
+ }
+ }
+
+ //#region 闈炵┖楠岃瘉
+ function AllowLoadData(sSubStr) { //闈炵┖楠岃瘉
+ var Result = true;
+ if ($("#HMouldID").val() == '' || $("#HMouldID").val() == null) {
+ layer.msg("浜у搧妯″叿涓嶈兘涓虹┖!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ return Result = false;
+ }
+ if (typeof (sSubStr) == "undefined" || sSubStr == "" || sSubStr =="[]") {
+ layer.msg("淇濆吇椤规槑缁嗚褰曚笉鑳戒负绌�", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ return Result = false;
+ }
+ if (typeof (sSubStr) != "undefined" && typeof (sSubStr) != "") {
+ sSubStr = JSON.parse(sSubStr);
+ for (var i = 0; i < sSubStr.length; i++) {
+ if (sSubStr[i].HMaintainItemID == "") {
+ layer.msg("鏄庣粏璁板綍绗�" + (i + 1) + "琛�,淇濆吇椤圭洰淇℃伅涓虹┖!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ return Result = false;
+ }
+ if (sSubStr[i].HMaintainItem == "") {
+ layer.msg("鏄庣粏璁板綍绗�" + (i + 1) + "琛�,淇濆吇閮ㄤ綅淇℃伅涓虹┖!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ return Result = false;
+ }
+ if (sSubStr[i].HManagerNumber == "") {
+ layer.msg("鏄庣粏璁板綍绗�" + (i + 1) + "琛�,璐d换浜轰俊鎭负绌�!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ return Result = false;
+ }
+
+ }
+ }
+ else {
+ return Result = true;
+ }
+ return Result;
+ }
+ //#endregion
});
</script>
</body>
diff --git "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_MouldMaintainBillList.html" "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_MouldMaintainBillList.html"
index 43c17e8..e3c9329 100644
--- "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_MouldMaintainBillList.html"
+++ "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Sc_MouldMaintainBillList.html"
@@ -82,12 +82,12 @@
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Add"><i class="layui-icon layui-icon-add-1"></i>鏂板</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit"><i class="layui-icon layui-icon-edit"></i>缂栬緫</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
- <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-reload"><i class="layui-icon layui-icon-refresh"></i>鍒锋柊</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-confirm" id="btn_confirm"><i class="layui-icon layui-icon-ok-circle"></i>纭</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>鍒锋柊</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit"><i class="layui-icon layui-icon-logout"></i>閫�鍑�</button>
+ <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-confirm" id="btn_confirm"><i class="layui-icon layui-icon-ok-circle"></i>纭</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-back" id="btn_back"><i class="layui-icon layui-icon-close-fill"></i>椹冲洖</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-details"><i class="layui-icon layui-icon-form"></i>璇︽儏</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-generate"><i class="layui-icon layui-icon-file"></i>鐢熸垚閫佽揣鍗�</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit"><i class="layui-icon layui-icon-return"></i>閫�鍑�</button>-->
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-generate"><i class="layui-icon layui-icon-file"></i>鐢熸垚閫佽揣鍗�</button>-->
</div>
</script>
@@ -132,16 +132,13 @@
table.on('toolbar(mainTable)', function (obj) {
switch (obj.event) {
//鏂板
- case 'set_AddNew': set_AddNew();
+ case 'btn-Add': set_AddNew();
break;
//缂栬緫
- case 'set_ShowBill': set_ShowBill();
+ case 'btn-Edit': set_ShowBill();
break;
//鍒犻櫎
- case 'set_DeleteBill': set_DeleteBill();
- break;
- //娴忚
- case 'get_PrintReport': get_PrintReport();
+ case 'btn-Delete': set_DeleteBill();
break;
//鍒锋柊
case 'get_Refresh': get_Refresh();
@@ -303,7 +300,7 @@
shift: 2,
area: ['100%', '100%'],
maxmin: true,
- content: '../妯℃不鍏风鐞�/Sc_Add_MouldMaintainBillList.html',
+ content: '../妯℃不鍏风鐞�/Sc_Add_MouldMaintainBillList.html?OperationType=1&linterid=&HSouceBillType=',
end: function () {
//鍒锋柊椤甸潰,
location.reload();
@@ -320,7 +317,7 @@
var checkStatus = table.checkStatus('mainTable')
, data = checkStatus.data;
if (checkStatus.data.length === 1) {
- var hID = data[0].hmainid.toString();
+ var linterid = data[0].hmainid.toString();
//if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
layer.open({
type: 2
@@ -329,7 +326,7 @@
, shade: 0.6 //閬僵閫忔槑搴�
, maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
, anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
- , content: '../妯℃不鍏风鐞�/Sc_Add_MouldMaintainBillList.html?hID=' + hID
+ , content: '../妯℃不鍏风鐞�/Sc_Add_MouldMaintainBillList.html?OperationType=3&linterid=' + linterid + '&HSouceBillType='
, resize: false,
end: function () {
//鍒锋柊椤甸潰,
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\344\272\247\351\207\217\346\261\207\346\212\245\345\215\225/Sc_Add_ProductReportBillList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\344\272\247\351\207\217\346\261\207\346\212\245\345\215\225/Sc_Add_ProductReportBillList.html"
index ef47151..732dfe4 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\344\272\247\351\207\217\346\261\207\346\212\245\345\215\225/Sc_Add_ProductReportBillList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\344\272\247\351\207\217\346\261\207\346\212\245\345\215\225/Sc_Add_ProductReportBillList.html"
@@ -88,6 +88,8 @@
<div class="layui-btn-group">
<button type="button" id="add-btn" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Saver">淇濆瓨</button>
+ <button type="button" id="VerIfySaver" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="VerIfySaver">瀹℃牳</button>
+ <button type="button" id="ReVerIfySaver" class="layui-btn layui-btn-normal layui-btn-circle" lay-submit="" lay-filter="ReVerIfySaver">鍙嶅鏍�</button>
<button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Exit">閫�鍑�</button>
</div>
@@ -638,6 +640,18 @@
});
+ //瀹℃牳
+ form.on('submit(VerIfySaver)', function (data)
+ {
+ SaveVerify();
+ });
+ //鍙嶅鏍�
+ form.on('submit(ReVerIfySaver)', function (data)
+ {
+ ReVerIfySaver();
+ });
+
+
//閫�鍑�
form.on('submit(Exit)', function (data) {
Pub_Close(1);
@@ -826,12 +840,12 @@
var yessqty = HQty + HBadQty + HWasterQty;
var sumqty = parseFloat($("#HQty").val()) + yessqty;
if (sumqty > parseFloat($("#HPlanQty").val())) {
- layer.confirm("宸叉眹鎶ユ暟閲�:銆�" + yessqty + "銆�,褰撳墠姹囨姤鏁伴噺:銆�" + parseFloat($("#HQty").val()) + "銆戜笉鑳藉ぇ浜庤鍒掓暟閲�:銆�" + parseFloat($("#HPlanQty").val()) + "銆�,纭瑕佹彁浜ゅ悧锛�", {
+ layer.confirm("宸叉眹鎶ユ暟閲�:銆�" + yessqty + "銆�,褰撳墠姹囨姤鏁伴噺:銆�" + parseFloat($("#HQty").val()) + "銆戜笉鑳藉ぇ浜庤鍒掓暟閲�:銆�" + parseFloat($("#HPlanQty").val()) + "銆戯紒", {
btn: ['纭', '鍙栨秷']
}, function (index) {
//鍏抽棴褰撳墠frame
layer.close(index);
- Submit(data);
+ //Submit(data);
}, function () {
});
@@ -865,9 +879,14 @@
dataType: "json",
success: function (data) {
if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
- layer.msg(data.Message, { time: 1 * 2000, icon: 1 }, function (index) {
- layer.close(layer.index);
- window.parent.location.reload();
+ $("#HInterID").val(data.HInterID);//鑾峰彇鎻愪氦鎴愬姛杩斿洖鐨勫崟鎹富ID
+ layer.confirm(data.Message, {
+ btn: ['纭']
+ }, function (index) {
+ if (data.Verify == "Y") //鑷姩瀹℃牳
+ {
+ SaveVerify(); //瀹℃牳
+ }
});
}
else {
@@ -879,6 +898,73 @@
}
})
}
+
+ //瀹℃牳鎻愪氦
+ function SaveVerify()
+ {
+ var HSourceID = $("#HSourceID").val(); //鐢熶骇璧勬簮ID
+ var HSourceInterID = $("#HSourceInterID").val(); //婧愬崟涓诲唴鐮�
+ var HSourceEntryID = $("#HSourceEntryID").val();//婧愬崟瀛愬唴鐮�
+ var HSourceBillNo = $("#HSourceBillNo").val();//婧愬崟鍗曞彿
+ var HICMOInterID = $("#HICMOInterID").val();//鐢熶骇璁㈠崟涓籌D
+ var HICMOEntryID = $("#HICMOEntryID").val();//鐢熶骇璁㈠崟瀛怚D
+ var HInterID = $("#HInterID").val();//浜ч噺姹囨姤涓存椂琛ㄤ富ID
+ if (!AllowLoadData())//鏁版嵁楠岃瘉
+ {
+ return false;
+ }
+ //閫昏緫瀹℃牳鏂规硶
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "/Sc_MESBeginWorkBill/AuditProcessReportList", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "HSourceID": HSourceID, "HSourceInterID": HSourceInterID, "HSourceEntryID": HSourceEntryID, "HSourceBillNo": HSourceBillNo, "HICMOInterID": HICMOInterID, "HICMOEntryID": HICMOEntryID, "HInterID": HInterID, "IsAudit": 0, "CurUserName": sessionStorage["HUserName"] },
+ success: function (result) {
+ if (result.count == 1) {
+ layer.msg(result.Message, { time: 1 * 2000, icon: 1 }, function () {
+
+ });
+
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
+ //鍙嶅鏍告彁浜�
+ function ReVerIfySaver()
+ {
+ var HSourceID = $("#HSourceID").val(); //鐢熶骇璧勬簮ID
+ var HSourceInterID = $("#HSourceInterID").val(); //婧愬崟涓诲唴鐮�
+ var HSourceEntryID = $("#HSourceEntryID").val();//婧愬崟瀛愬唴鐮�
+ var HSourceBillNo = $("#HSourceBillNo").val();//婧愬崟鍗曞彿
+ var HICMOInterID = $("#HICMOInterID").val();//鐢熶骇璁㈠崟涓籌D
+ var HICMOEntryID = $("#HICMOEntryID").val();//鐢熶骇璁㈠崟瀛怚D
+ var HInterID = $("#HInterID").val();//浜ч噺姹囨姤涓存椂琛ㄤ富ID
+ if (!AllowLoadData())//鏁版嵁楠岃瘉
+ {
+ return false;
+ }
+ //閫昏緫瀹℃牳鏂规硶
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "/Sc_MESBeginWorkBill/MESProductAuditProcessReportList", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "HSourceID": HSourceID, "HSourceInterID": HSourceInterID, "HSourceEntryID": HSourceEntryID, "HSourceBillNo": HSourceBillNo, "HICMOInterID": HICMOInterID, "HICMOEntryID": HICMOEntryID, "HInterID": HInterID, "IsAudit": 0, "CurUserName": sessionStorage["HUserName"] },
+ success: function (result) {
+ if (result.count == 1) {
+ layer.msg(result.Message, { time: 1 * 2000, icon: 1 }, function () {
+
+ });
+
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
//浠ヤ笂涓簂ayui妯″潡
});
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\344\272\247\351\207\217\346\261\207\346\212\245\345\215\225/Sc_ProductReportBillList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\344\272\247\351\207\217\346\261\207\346\212\245\345\215\225/Sc_ProductReportBillList.html"
index feefcd4..7e3adf8 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\344\272\247\351\207\217\346\261\207\346\212\245\345\215\225/Sc_ProductReportBillList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\344\272\247\351\207\217\346\261\207\346\212\245\345\215\225/Sc_ProductReportBillList.html"
@@ -201,6 +201,7 @@
, { field: 'HDate', title: '鏃ユ湡', width: 200, templet: "<div>{{d.HDate ==null ?'':layui.util.toDateString(d.HDate, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
, { field: 'HBillNo', title: '鍗曟嵁鍙�', width: 200 }
, { field: 'HBillType', title: '鍗曟嵁绫诲瀷', width: 200 }
+ , { field: 'HBillStatus', title: '鍗曟嵁鐘舵��', width: 200}
, { field: 'HICMOBillNo', title: '鐢熶骇璁㈠崟鍙�', width: 200 }
, { field: 'HICMOInterID', title: '鐢熶骇璁㈠崟涓籌D', width: 200, hide: true }
, { field: 'HICMOEntryID', title: '鐢熶骇璁㈠崟瀛怚D', width: 200, hide: true }
@@ -309,7 +310,8 @@
if (TabData.length <= 0) {
return layer.alert("鏃犱骇閲忔眹鎶ユ暟鎹紒", { icon: 5 })
}
-
+ //鍒ゆ柇鏄惁鏈夋湭瀹℃牳鏁版嵁
+
$.ajax(
{
type: "Get",
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\344\272\247\351\207\217\346\261\207\346\212\245\345\215\225/Sc_ProductReportBillList_Web.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\344\272\247\351\207\217\346\261\207\346\212\245\345\215\225/Sc_ProductReportBillList_Web.html"
index 8853067..34c6f75 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\344\272\247\351\207\217\346\261\207\346\212\245\345\215\225/Sc_ProductReportBillList_Web.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\344\272\247\351\207\217\346\261\207\346\212\245\345\215\225/Sc_ProductReportBillList_Web.html"
@@ -95,8 +95,8 @@
<button type="button" class="layui-btn layui-btn-sm layui-btn-disabled" lay-event="btn-Add" id="btn-Add" disabled><i class="layui-icon layui-icon-add-1"></i>鏂板</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit" id="btn-Edit"><i class="layui-icon layui-icon-edit"></i>缂栬緫</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete" id="btn-Delete"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Audit" style="display:none;"><i class="layui-icon layui-icon-radio"></i>瀹℃牳</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeAudit" style="display:none;"><i class="layui-icon layui-icon-circle"></i>鍙嶅鏍�</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Audit" id="btn-Audit"><i class="layui-icon layui-icon-radio"></i>瀹℃牳</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeAudit" id="btn-DeAudit"><i class="layui-icon layui-icon-circle"></i>鍙嶅鏍�</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-reload" style="display:none;"><i class="layui-icon layui-icon-refresh"></i>鍒锋柊</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-confirm" id="btn_confirm" style="display:none;"><i class="layui-icon layui-icon-ok-circle"></i>纭</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-back" id="btn_back" style="display:none;"><i class="layui-icon layui-icon-close-fill"></i>椹冲洖</button>
@@ -179,6 +179,12 @@
//鍒犻櫎鎸夐挳
case 'btn-Delete': set_DeleteBill();
break;
+ //瀹℃牳鎸夐挳
+ case 'btn-Audit': set_CheckBill();
+ break;
+ //鍙嶅鏍告寜閽�
+ case 'btn-DeAudit': set_AbandonCheck();
+ break;
//閫�鍑烘寜閽�
case 'get_Exit': Pub_Close(1);
break;
@@ -214,7 +220,6 @@
//鍒濆鍖栬〃鏍�
function set_InitGrid()
{
-
$("#top-title").css({ margin: "0 46%"});
$("#HDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
@@ -231,6 +236,7 @@
, { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 200 }
, { field: '鏃ユ湡', title: '鏃ユ湡', width: 200, templet: "<div>{{d.HDate ==null ?'':layui.util.toDateString(d.HDate, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
, { field: '鍗曟嵁绫诲瀷', title: '鍗曟嵁绫诲瀷', width: 200 }
+ , { field: 'HBillStatus', title: '鍗曟嵁鐘舵��', width: 200 }
, { field: 'HMaterID', title: '浜у搧ID', width: 200, hide: true }
, { field: '浜у搧浠g爜', title: '浜у搧浠g爜', width: 200 }
, { field: '浜у搧鍚嶇О', title: '浜у搧鍚嶇О', width: 200 }
@@ -423,7 +429,102 @@
layer.msg('璇烽�夋嫨涓�琛屾暟鎹垹闄わ紒');
}
}
-
+
+ //瀹℃牳
+ function set_CheckBill()
+ {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (checkStatus.data.length === 1) {
+ var HBillStatus = data[0].HBillStatus.toString(); //鍗曟嵁鐘舵��
+ var HSourceID = data[0].HSourceID.toString(); //鐢熶骇璧勬簮ID
+ var HSourceInterID = data[0].HSourceInterID.toString(); //婧愬崟涓诲唴鐮�
+ var HSourceEntryID = data[0].HSourceEntryID.toString();//婧愬崟瀛愬唴鐮�
+ var HSourceBillNo = data[0].婧愬崟鍗曞彿;//婧愬崟鍗曞彿
+ var HICMOInterID = data[0].HICMOInterID.toString();//鐢熶骇璁㈠崟涓籌D
+ var HICMOEntryID = data[0].HICMOEntryID.toString();//鐢熶骇璁㈠崟瀛怚D
+ var HInterID = data[0].HInterID.toString();//浜ч噺姹囨姤涓存椂琛ㄤ富ID
+ if (HBillStatus > 0)
+ {
+ layer.msg('鍗曟嵁涓嶄负鏈鏍哥姸鎬侊紒');
+ return false;
+ }
+ //閫昏緫瀹℃牳鏂规硶
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "/Sc_MESBeginWorkBill/AuditProcessReportList", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "HSourceID": HSourceID, "HSourceInterID": HSourceInterID, "HSourceEntryID": HSourceEntryID, "HSourceBillNo": HSourceBillNo, "HICMOInterID": HICMOInterID, "HICMOEntryID": HICMOEntryID, "HInterID": HInterID, "IsAudit": 0, "CurUserName": sessionStorage["HUserName"] },
+ success: function (result) {
+ if (result.count == 1) {
+ layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
+ // 寰楀埌frame绱㈠紩
+ var index = layer.getFrameIndex(window.name);
+ //鍏抽棴褰撳墠frame
+ layer.close(index);
+ //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ $("#btnSearch").trigger('click');
+ });
+
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
+ else {
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹鏍革紒');
+ }
+ }
+
+ //鍙嶅鏍�
+ function set_CheckBill()
+ {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (checkStatus.data.length === 1) {
+ var HBillStatus = data[0].HBillStatus.toString(); //鍗曟嵁鐘舵��
+ var HSourceID = data[0].HSourceID.toString(); //鐢熶骇璧勬簮ID
+ var HSourceInterID = data[0].HSourceInterID.toString(); //婧愬崟涓诲唴鐮�
+ var HSourceEntryID = data[0].HSourceEntryID.toString();//婧愬崟瀛愬唴鐮�
+ var HSourceBillNo = data[0].婧愬崟鍗曞彿;//婧愬崟鍗曞彿
+ var HICMOInterID = data[0].HICMOInterID.toString();//鐢熶骇璁㈠崟涓籌D
+ var HICMOEntryID = data[0].HICMOEntryID.toString();//鐢熶骇璁㈠崟瀛怚D
+ var HInterID = data[0].HInterID.toString();//浜ч噺姹囨姤涓存椂琛ㄤ富ID
+ if (HBillStatus = 0 || HBillStatus>2) {
+ layer.msg('鍗曟嵁鏈鏍革紝涓嶉渶瑕佸弽瀹℃牳鎴栬�呭崟鎹凡鐢熸晥涓嶅厑璁稿弽瀹℃牳锛�');
+ return false;
+ }
+ //閫昏緫瀹℃牳鏂规硶
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "/Sc_MESBeginWorkBill/AuditProcessReportList", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "HSourceID": HSourceID, "HSourceInterID": HSourceInterID, "HSourceEntryID": HSourceEntryID, "HSourceBillNo": HSourceBillNo, "HICMOInterID": HICMOInterID, "HICMOEntryID": HICMOEntryID, "HInterID": HInterID, "IsAudit": 0, "CurUserName": sessionStorage["HUserName"] },
+ success: function (result) {
+ if (result.count == 1) {
+ layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
+ // 寰楀埌frame绱㈠紩
+ var index = layer.getFrameIndex(window.name);
+ //鍏抽棴褰撳墠frame
+ layer.close(index);
+ //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ $("#btnSearch").trigger('click');
+ });
+
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
+ else {
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹鏍革紒');
+ }
+
+ }
// #endregion
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcessExchangeBillList.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcessExchangeBillList.html"
index ed42986..be1c312 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcessExchangeBillList.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcessExchangeBillList.html"
@@ -107,6 +107,7 @@
}).extend({
index: 'lib/index', //涓诲叆鍙fā鍧�
}).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () {
+ //#region 鍏叡鍙橀噺
var $ = layui.$
, admin = layui.admin
, layer = layui.layer
@@ -117,165 +118,19 @@
, laydate = layui.laydate
//var sWhere = " 浜у搧浠g爜 = 'BX0002'";
var sWhere = "";
+ var option = "";
+ var option2 = "";
var wybj = false;
+ //#endregion
- //涓昏〃鍒楄〃
- var option = {
- elem: '#mainTable'
- //, toolbar: '#toolbarDemo'
- ,page: true
- , height: 256
- , cellMinWidth: 90
- , cols: [[
- //{ field: 'hmainid', title: 'hmainid', width: 90 }
- { field: '鎵撳嵃娆℃暟', title: '鎵撳嵃娆℃暟' }
- , { field: '绫诲瀷', title: '绫诲瀷' }
- , { field: '鏃ユ湡', title: '鏃ユ湡', width: 120, sort:true }
- , { field: '璁㈠崟璺熻釜鍙�', title: '璁㈠崟璺熻釜鍙�', width: 120 }
- , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 190 }
- //, { field: 'hicmointerid', title: 'hicmointerid', width: 80 }
- , { field: '浠诲姟鍗曞彿', title: '浠诲姟鍗曞彿', width: 140 }
- //, { field: 'HWorkShopID', title: 'HWorkShopID', width: 80 }
- //, { field: 'HDeptID', title: 'HDeptID', width: 80 }
- , { field: '鐢熶骇杞﹂棿浠g爜', title: '鐢熶骇杞﹂棿浠g爜', width: 115 }
- , { field: '鐢熶骇杞﹂棿', title: '鐢熶骇杞﹂棿' }
- , { field: '濮斿鏍囪', title: '濮斿鏍囪' }
- //, { field: 'HMaterID', title: 'HMaterID', width: 80 }
- , { field: '瀛愪欢浠g爜', title: '瀛愪欢浠g爜' }
- , { field: '瀛愪欢鍚嶇О', title: '瀛愪欢鍚嶇О' }
- , { field: '瀛愪欢瑙勬牸', title: '瀛愪欢瑙勬牸' }
- , { field: '鎵瑰彿', title: '鎵瑰彿' }
- , { field: '鍘熸枡鎵规鍙�', title: '鍘熸枡鎵规鍙�' }
- //, { field: 'HMaterID2', title: 'HMaterID2', width: 80 }
- , { field: '浜у搧浠g爜', title: '浜у搧浠g爜' }
- , { field: '浜у搧鍚嶇О', title: '浜у搧鍚嶇О' }
- , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿' }
- //, { field: 'HUnitID', title: 'HUnitID', width: 80 }
- , { field: '鍗曚綅浠g爜', title: '鍗曚綅浠g爜' }
- , { field: '鍗曚綅', title: '鍗曚綅' }
- , { field: '璁惧妯″叿浠g爜', title: '璁惧妯″叿浠g爜' }
- , { field: '璁惧妯″叿', title: '璁惧妯″叿' }
- , { field: '鐢熶骇鏁伴噺', title: '鐢熶骇鏁伴噺' }
- , { field: '娴佽浆鍗℃暟閲�', title: '娴佽浆鍗℃暟閲�' }
- , { field: '璁″垝寮�宸ユ棩鏈�', title: '璁″垝寮�宸ユ棩鏈�' }
- , { field: '璁″垝瀹屽伐鏃ユ湡', title: '璁″垝瀹屽伐鏃ユ湡' }
- , { field: '鎽樿', title: '鎽樿' }
- , { field: '鍐呴儴鍗曟嵁鍙�', title: '鍐呴儴鍗曟嵁鍙�' }
- , { field: '琛ㄥご澶囨敞', title: '琛ㄥご澶囨敞' }
- , { field: '鍒跺崟浜�', title: '鍒跺崟浜�' }
- , { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡' }
- , { field: '瀹℃牳浜�', title: '瀹℃牳浜�' }
- , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡' }
- , { field: '淇敼浜�', title: '淇敼浜�' }
- , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡' }
- , { field: '鍏抽棴浜�', title: '鍏抽棴浜�' }
- , { field: '鍏抽棴鏃ユ湡', title: '鍏抽棴鏃ユ湡' }
- , { field: '浣滃簾浜�', title: '浣滃簾浜�' }
- , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡' }
- //, { field: 'HBillType', title: 'HBillType', width: 80 }
- //, { field: 'hsubid', title: 'hsubid', width: 80 }
- , { field: '鎷嗗垎鏁伴噺', title: '鎷嗗垎鏁伴噺' }
- ]]
- ,text:"鏃犳暟鎹�!"
- };
+ //#region 杩涘叆椤甸潰鍗冲姞杞�
- //浠庤〃鍒楄〃
- var option2 = {
- elem: '#mainTable2'
- //, toolbar: '#toolbarDemo'
- ,page: true
- , height: 226
- , cellMinWidth: 90
- , cols: [[
- //{ field: 'hsubid', title: 'hsubid' }
- { field: '娴佹按鍙�', title: '娴佹按鍙�' }
- //, { field: 'HProcID', title: 'HProcID' }
- , { field: '宸ュ簭浠g爜', title: '宸ュ簭浠g爜' }
- , { field: '宸ュ簭鍚嶇О', title: '宸ュ簭鍚嶇О' }
- , { field: '杩斿伐鏍囪', title: '杩斿伐鏍囪' }
- , { field: '鍔犲伐璇存槑', title: '鍔犲伐璇存槑' }
- , { field: '宸ヤ綔涓績浠g爜', title: '宸ヤ綔涓績浠g爜', width: 115 }
- , { field: '宸ヤ綔涓績', title: '宸ヤ綔涓績' }
- , { field: '璁″垝鏁伴噺', title: '璁″垝鏁伴噺' }
- //, { field: 'hmainid', title: 'hmainid' }
- , { field: '鏃ユ湡', title: '鏃ユ湡', sort: true }
- , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�' }
- //, { field: 'hicmointerid', title: 'hicmointerid' }
- , { field: '浠诲姟鍗曞彿', title: '浠诲姟鍗曞彿' }
- //, { field: 'HWorkShopID', title: 'HWorkShopID' }
- , { field: '鐢熶骇杞﹂棿浠g爜', title: '鐢熶骇杞﹂棿浠g爜', width: 115 }
- , { field: '鐢熶骇杞﹂棿', title: '鐢熶骇杞﹂棿' }
- //, { field: 'HMaterID', title: 'HMaterID' }
- , { field: '浜у搧浠g爜', title: '浜у搧浠g爜' }
- , { field: '浜у搧鍚嶇О', title: '浜у搧鍚嶇О' }
- , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿' }
- , { field: '鎵瑰彿', title: '鎵瑰彿' }
- //, { field: 'HUnitID', title: 'HUnitID' }
- , { field: '鍗曚綅浠g爜', title: '鍗曚綅浠g爜' }
- , { field: '鍗曚綅', title: '鍗曚綅' }
- , { field: '鐢熶骇鏁伴噺', title: '鐢熶骇鏁伴噺' }
- , { field: '璁″垝寮�宸ユ棩鏈�', title: '璁″垝寮�宸ユ棩鏈�' }
- , { field: '璁″垝瀹屽伐鏃ユ湡', title: '璁″垝瀹屽伐鏃ユ湡' }
- , { field: '鎽樿', title: '鎽樿' }
- , { field: '鍐呴儴鍗曟嵁鍙�', title: '鍐呴儴鍗曟嵁鍙�' }
- //, { field: 'HSupID', title: 'HSupID' }
- , { field: '濮斿鍔犲伐鍗曚綅浠g爜', title: '濮斿鍔犲伐鍗曚綅浠g爜' }
- , { field: '濮斿鍔犲伐鍗曚綅', title: '濮斿鍔犲伐鍗曚綅' }
- , { field: '琛ㄥご澶囨敞', title: '琛ㄥご澶囨敞' }
- //, { field: 'HBillType', title: 'HBillType' }
- , { field: '娴佽浆鍗℃暟閲�', title: '娴佽浆鍗℃暟閲�' }
- , { field: '杩涚珯鍏宠仈鏁伴噺', title: '杩涚珯鍏宠仈鏁伴噺' }
- , { field: '鍑虹珯鍏宠仈鏁伴噺', title: '鍑虹珯鍏宠仈鏁伴噺' }
- , { field: '鍑虹珯鎶ュ簾鍏宠仈鏁伴噺', title: '鍑虹珯鎶ュ簾鍏宠仈鏁伴噺' }
- , { field: '琛屽叧闂汉', title: '琛屽叧闂汉' }
- , { field: '鍏抽棴绫诲瀷', title: '鍏抽棴绫诲瀷' }
- , { field: '琛ㄤ綋澶囨敞', title: '琛ㄤ綋澶囨敞' }
- , { field: '婧愬崟涓诲唴鐮�', title: '婧愬崟涓诲唴鐮�' }
- , { field: '婧愬崟瀛愬唴鐮�', title: '婧愬崟瀛愬唴鐮�' }
- , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿' }
- , { field: '婧愬崟绫诲瀷', title: '婧愬崟绫诲瀷' }
- , { field: '姹囨姤鏁伴噺', title: '姹囨姤鏁伴噺' }
- , { field: '娴佽浆宸ュ簭', title: '娴佽浆宸ュ簭' }
- , { field: '鍑虹珯娴佽浆宸ュ簭', title: '鍑虹珯娴佽浆宸ュ簭' }
- , { field: '棣栭亾宸ュ簭', title: '棣栭亾宸ュ簭' }
- , { field: '鏈亾宸ュ簭', title: '鏈亾宸ュ簭' }
- , { field: '涓嬮亾宸ュ簭鍙�', title: '涓嬮亾宸ュ簭鍙�' }
- , { field: '涓嶈壇鍝佸叧鑱旀暟閲�', title: '涓嶈壇鍝佸叧鑱旀暟閲�' }
- ]]
- };
- table.render(option);
- table.render(option2);
- //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
- $.ajax({
- url: GetWEBURL() + '/LEMS/MES_Sc_ProcessExchangeBillQuery_Json',
- type: "GET",
- data: { "sWhere": sWhere },
- success: function (data1) {
- if (data1.count == 1) {
- option.data = data1.data;
- table.render(option);
- } else {
- layer.alert(data1.code + data1.Message, { icon: 5 });
- }
- }, error: function () {
- layer.alert("鎺ュ彛澶辨晥!", { icon: 5 });
- }
- });
+ //鍒濆鍖栫晫闈�
+ set_ClearBill();
- //閲嶇疆鎸夐挳
- form.on('submit(btnReSearch)', function (data) {
- $("#SHPrintQty").val("");//鎵撳嵃鐘舵��
- wybj = false;//濮斿鏍囪
- $("#HDate").val("");//寮�濮嬫棩鏈�
- $("#HDate1").val("");//缁撴潫鏃ユ湡
- $("#HOrderProcNO").val("");//璁㈠崟璺熻釜鍙�
- $("#SHname").val("");//鐗╂枡|瀛愪欢鍚嶇О|瀛愪欢瑙勬牸
- $("#btnSearch").click();
- });
+ //#endregion
- form.on('checkbox(wybj)', function (data) {
- wybj = data.elem.checked; //鏄惁琚�変腑锛宼rue鎴栬�協alse
- });
+ //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
//鏌ヨ鎸夐挳
form.on('submit(btnSearch)', function (data) {//閫夋嫨浠撲綅
@@ -330,7 +185,23 @@
sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
});
- //鐩戝惉宸ュ叿鏉″垹闄や簨浠�
+ //閲嶇疆鎸夐挳
+ form.on('submit(btnReSearch)', function (data) {
+ $("#SHPrintQty").val("");//鎵撳嵃鐘舵��
+ wybj = false;//濮斿鏍囪
+ $("#HDate").val("");//寮�濮嬫棩鏈�
+ $("#HDate1").val("");//缁撴潫鏃ユ湡
+ $("#HOrderProcNO").val("");//璁㈠崟璺熻釜鍙�
+ $("#SHname").val("");//鐗╂枡|瀛愪欢鍚嶇О|瀛愪欢瑙勬牸
+ $("#btnSearch").click();
+ });
+
+ //閫変腑鍒ゆ柇
+ form.on('checkbox(wybj)', function (data) {
+ wybj = data.elem.checked; //鏄惁琚�変腑锛宼rue鎴栬�協alse
+ });
+
+ //鐐瑰嚮涓昏〃甯﹀嚭浠庤〃鏁版嵁
table.on('row(mainTable)', function (obj) { //娉細tool 鏄伐鍏锋潯浜嬩欢鍚嶏紝test 鏄� table 鍘熷瀹瑰櫒鐨勫睘鎬� lay-filter="瀵瑰簲鐨勫��"
var datas = obj.data; //鑾峰緱褰撳墠琛屾暟鎹�
var HMainID = datas.hmainid;
@@ -351,7 +222,174 @@
});
});
+ //#endregion
+ //#region 鏈〉闈㈡墍鏈夎璋冪敤鐨勬柟娉�
+ function set_ClearBill()
+ {
+ //鍒濆鍖栦富琛ㄥ垪琛�
+ set_InitGrid();
+ //鍒濆鍖栦粠琛ㄥ垪琛�
+ set_InitGrid2();
+ //鏌ヨ
+ get_Display(sWhere);
+ }
+
+ //鍒濆鍖栦富琛ㄥ垪琛�
+ function set_InitGrid()
+ {
+ option = {
+ elem: '#mainTable'
+ //, toolbar: '#toolbarDemo'
+ , page: true
+ , height: 256
+ , cellMinWidth: 90
+ , cols: [[
+ //{ field: 'hmainid', title: 'hmainid', width: 90 }
+ { field: '鎵撳嵃娆℃暟', title: '鎵撳嵃娆℃暟' }
+ , { field: '绫诲瀷', title: '绫诲瀷' }
+ , { field: '鏃ユ湡', title: '鏃ユ湡', width: 120, sort: true }
+ , { field: '璁㈠崟璺熻釜鍙�', title: '璁㈠崟璺熻釜鍙�', width: 120 }
+ , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 190 }
+ //, { field: 'hicmointerid', title: 'hicmointerid', width: 80 }
+ , { field: '浠诲姟鍗曞彿', title: '浠诲姟鍗曞彿', width: 140 }
+ //, { field: 'HWorkShopID', title: 'HWorkShopID', width: 80 }
+ //, { field: 'HDeptID', title: 'HDeptID', width: 80 }
+ , { field: '鐢熶骇杞﹂棿浠g爜', title: '鐢熶骇杞﹂棿浠g爜', width: 115 }
+ , { field: '鐢熶骇杞﹂棿', title: '鐢熶骇杞﹂棿' }
+ , { field: '濮斿鏍囪', title: '濮斿鏍囪' }
+ //, { field: 'HMaterID', title: 'HMaterID', width: 80 }
+ , { field: '瀛愪欢浠g爜', title: '瀛愪欢浠g爜' }
+ , { field: '瀛愪欢鍚嶇О', title: '瀛愪欢鍚嶇О' }
+ , { field: '瀛愪欢瑙勬牸', title: '瀛愪欢瑙勬牸' }
+ , { field: '鎵瑰彿', title: '鎵瑰彿' }
+ , { field: '鍘熸枡鎵规鍙�', title: '鍘熸枡鎵规鍙�' }
+ //, { field: 'HMaterID2', title: 'HMaterID2', width: 80 }
+ , { field: '浜у搧浠g爜', title: '浜у搧浠g爜' }
+ , { field: '浜у搧鍚嶇О', title: '浜у搧鍚嶇О' }
+ , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿' }
+ //, { field: 'HUnitID', title: 'HUnitID', width: 80 }
+ , { field: '鍗曚綅浠g爜', title: '鍗曚綅浠g爜' }
+ , { field: '鍗曚綅', title: '鍗曚綅' }
+ , { field: '璁惧妯″叿浠g爜', title: '璁惧妯″叿浠g爜' }
+ , { field: '璁惧妯″叿', title: '璁惧妯″叿' }
+ , { field: '鐢熶骇鏁伴噺', title: '鐢熶骇鏁伴噺' }
+ , { field: '娴佽浆鍗℃暟閲�', title: '娴佽浆鍗℃暟閲�' }
+ , { field: '璁″垝寮�宸ユ棩鏈�', title: '璁″垝寮�宸ユ棩鏈�' }
+ , { field: '璁″垝瀹屽伐鏃ユ湡', title: '璁″垝瀹屽伐鏃ユ湡' }
+ , { field: '鎽樿', title: '鎽樿' }
+ , { field: '鍐呴儴鍗曟嵁鍙�', title: '鍐呴儴鍗曟嵁鍙�' }
+ , { field: '琛ㄥご澶囨敞', title: '琛ㄥご澶囨敞' }
+ , { field: '鍒跺崟浜�', title: '鍒跺崟浜�' }
+ , { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡' }
+ , { field: '瀹℃牳浜�', title: '瀹℃牳浜�' }
+ , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡' }
+ , { field: '淇敼浜�', title: '淇敼浜�' }
+ , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡' }
+ , { field: '鍏抽棴浜�', title: '鍏抽棴浜�' }
+ , { field: '鍏抽棴鏃ユ湡', title: '鍏抽棴鏃ユ湡' }
+ , { field: '浣滃簾浜�', title: '浣滃簾浜�' }
+ , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡' }
+ //, { field: 'HBillType', title: 'HBillType', width: 80 }
+ //, { field: 'hsubid', title: 'hsubid', width: 80 }
+ , { field: '鎷嗗垎鏁伴噺', title: '鎷嗗垎鏁伴噺' }
+ ]]
+ , text: "鏃犳暟鎹�!"
+ };
+ table.render(option);
+ }
+
+ //鍒濆鍖栦粠琛ㄥ垪琛�
+ function set_InitGrid2() {
+ option2 = {
+ elem: '#mainTable2'
+ //, toolbar: '#toolbarDemo'
+ , page: true
+ , height: 226
+ , cellMinWidth: 90
+ , cols: [[
+ //{ field: 'hsubid', title: 'hsubid' }
+ { field: '娴佹按鍙�', title: '娴佹按鍙�' }
+ //, { field: 'HProcID', title: 'HProcID' }
+ , { field: '宸ュ簭浠g爜', title: '宸ュ簭浠g爜' }
+ , { field: '宸ュ簭鍚嶇О', title: '宸ュ簭鍚嶇О' }
+ , { field: '杩斿伐鏍囪', title: '杩斿伐鏍囪' }
+ , { field: '鍔犲伐璇存槑', title: '鍔犲伐璇存槑' }
+ , { field: '宸ヤ綔涓績浠g爜', title: '宸ヤ綔涓績浠g爜', width: 115 }
+ , { field: '宸ヤ綔涓績', title: '宸ヤ綔涓績' }
+ , { field: '璁″垝鏁伴噺', title: '璁″垝鏁伴噺' }
+ //, { field: 'hmainid', title: 'hmainid' }
+ , { field: '鏃ユ湡', title: '鏃ユ湡', sort: true }
+ , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�' }
+ //, { field: 'hicmointerid', title: 'hicmointerid' }
+ , { field: '浠诲姟鍗曞彿', title: '浠诲姟鍗曞彿' }
+ //, { field: 'HWorkShopID', title: 'HWorkShopID' }
+ , { field: '鐢熶骇杞﹂棿浠g爜', title: '鐢熶骇杞﹂棿浠g爜', width: 115 }
+ , { field: '鐢熶骇杞﹂棿', title: '鐢熶骇杞﹂棿' }
+ //, { field: 'HMaterID', title: 'HMaterID' }
+ , { field: '浜у搧浠g爜', title: '浜у搧浠g爜' }
+ , { field: '浜у搧鍚嶇О', title: '浜у搧鍚嶇О' }
+ , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿' }
+ , { field: '鎵瑰彿', title: '鎵瑰彿' }
+ //, { field: 'HUnitID', title: 'HUnitID' }
+ , { field: '鍗曚綅浠g爜', title: '鍗曚綅浠g爜' }
+ , { field: '鍗曚綅', title: '鍗曚綅' }
+ , { field: '鐢熶骇鏁伴噺', title: '鐢熶骇鏁伴噺' }
+ , { field: '璁″垝寮�宸ユ棩鏈�', title: '璁″垝寮�宸ユ棩鏈�' }
+ , { field: '璁″垝瀹屽伐鏃ユ湡', title: '璁″垝瀹屽伐鏃ユ湡' }
+ , { field: '鎽樿', title: '鎽樿' }
+ , { field: '鍐呴儴鍗曟嵁鍙�', title: '鍐呴儴鍗曟嵁鍙�' }
+ //, { field: 'HSupID', title: 'HSupID' }
+ , { field: '濮斿鍔犲伐鍗曚綅浠g爜', title: '濮斿鍔犲伐鍗曚綅浠g爜' }
+ , { field: '濮斿鍔犲伐鍗曚綅', title: '濮斿鍔犲伐鍗曚綅' }
+ , { field: '琛ㄥご澶囨敞', title: '琛ㄥご澶囨敞' }
+ //, { field: 'HBillType', title: 'HBillType' }
+ , { field: '娴佽浆鍗℃暟閲�', title: '娴佽浆鍗℃暟閲�' }
+ , { field: '杩涚珯鍏宠仈鏁伴噺', title: '杩涚珯鍏宠仈鏁伴噺' }
+ , { field: '鍑虹珯鍏宠仈鏁伴噺', title: '鍑虹珯鍏宠仈鏁伴噺' }
+ , { field: '鍑虹珯鎶ュ簾鍏宠仈鏁伴噺', title: '鍑虹珯鎶ュ簾鍏宠仈鏁伴噺' }
+ , { field: '琛屽叧闂汉', title: '琛屽叧闂汉' }
+ , { field: '鍏抽棴绫诲瀷', title: '鍏抽棴绫诲瀷' }
+ , { field: '琛ㄤ綋澶囨敞', title: '琛ㄤ綋澶囨敞' }
+ , { field: '婧愬崟涓诲唴鐮�', title: '婧愬崟涓诲唴鐮�' }
+ , { field: '婧愬崟瀛愬唴鐮�', title: '婧愬崟瀛愬唴鐮�' }
+ , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿' }
+ , { field: '婧愬崟绫诲瀷', title: '婧愬崟绫诲瀷' }
+ , { field: '姹囨姤鏁伴噺', title: '姹囨姤鏁伴噺' }
+ , { field: '娴佽浆宸ュ簭', title: '娴佽浆宸ュ簭' }
+ , { field: '鍑虹珯娴佽浆宸ュ簭', title: '鍑虹珯娴佽浆宸ュ簭' }
+ , { field: '棣栭亾宸ュ簭', title: '棣栭亾宸ュ簭' }
+ , { field: '鏈亾宸ュ簭', title: '鏈亾宸ュ簭' }
+ , { field: '涓嬮亾宸ュ簭鍙�', title: '涓嬮亾宸ュ簭鍙�' }
+ , { field: '涓嶈壇鍝佸叧鑱旀暟閲�', title: '涓嶈壇鍝佸叧鑱旀暟閲�' }
+ ]]
+ };
+ table.render(option2);
+ }
+
+ //鏌ヨ
+ function get_Display(sWhere)
+ {
+ //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
+ $.ajax({
+ url: GetWEBURL() + '/LEMS/MES_Sc_ProcessExchangeBillQuery_Json',
+ type: "GET",
+ data: { "sWhere": sWhere },
+ success: function (data1) {
+ if (data1.count == 1) {
+ option.data = data1.data;
+ table.render(option);
+ } else {
+ layer.alert(data1.code + data1.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛澶辨晥!", { icon: 5 });
+ }
+ });
+ }
+
+ //#endregion
+
//浠ヤ笂鏄痩ayui妯″潡
});
--
Gitblit v1.9.1