From 33199d25de9589e07d9c76b82e3fc217dabda682 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期三, 08 六月 2022 17:09:03 +0800
Subject: [PATCH] 工艺路线 和 工序流转卡 新增功能与维护
---
WebTM/views/计划管理/工艺路线/Gy_RoutingBill.html | 38 ++++++
WebTM/views/Baseset/基础资料/Gy_RoutingBillList.html | 130 +++++++++++++++++++++
WebTM/views/车间管理/工序流转卡/Sc_ProcessExchangeBill.html | 114 +++++++++++++++---
WebTM/views/计划管理/工艺路线/Gy_RoutingBillList.html | 52 ++++++++
WebTM/views/车间管理/工序出站汇报单/Cj_StationOutBillList.html | 4
WebTM/views/生产管理/日计划报表/ReportPODemandPlanBillList.html | 2
WebTM/WebTM.csproj | 1
7 files changed, 310 insertions(+), 31 deletions(-)
diff --git a/WebTM/WebTM.csproj b/WebTM/WebTM.csproj
index ceac276..45b7569 100644
--- a/WebTM/WebTM.csproj
+++ b/WebTM/WebTM.csproj
@@ -97,6 +97,7 @@
<Content Include="views\Baseset\鍩虹璧勬枡\Gy_LineCenter.html" />
<Content Include="views\Baseset\鍩虹璧勬枡\Gy_OrganizationtList.html" />
<Content Include="views\Baseset\鍩虹璧勬枡\Gy_QCCheckProjectListView.html" />
+ <Content Include="views\Baseset\鍩虹璧勬枡\Gy_RoutingBillList.html" />
<Content Include="views\Baseset\鍩虹璧勬枡\Gy_RoutingGroup.html" />
<Content Include="views\Baseset\鍩虹璧勬枡\Gy_WarehouseListNew.html" />
<Content Include="views\Baseset\鍩虹璧勬枡\Sc_ICMOBillListView2.html" />
diff --git "a/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RoutingBillList.html" "b/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RoutingBillList.html"
new file mode 100644
index 0000000..ee43c5f
--- /dev/null
+++ "b/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RoutingBillList.html"
@@ -0,0 +1,130 @@
+锘�<!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.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
+ <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
+ <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
+</head>
+<body>
+ <div class="layui-fluid">
+ <div class="layui-card">
+ <!--<div class="layui-card-header"></div>-->
+ <div class="layui-card-body" style="padding: 15px;">
+ <form class="layui-form" action="" lay-filter="component-form-group">
+ <div class="layui-form-item">
+ <div class="layui-inline">
+ <label class="layui-form-label">鍗曟嵁鍙�</label>
+ <div class="layui-input-block">
+ <input type="text" class="layui-input" name="Value" id="Value">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <button type="button" lay-submit="" class="layui-btn" lay-filter="HQuery">蹇�熸煡璇�</button>
+ <button type="button" lay-submit="" class="layui-btn" lay-filter="FH">杩斿洖</button>
+ </div>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ <table class="layui-hide" id="mainTable"></table>
+ <script src="../../../layuiadmin/layui/layui.js"></script>
+ <script src="../../../layuiadmin/Scripts/json2.js" type="text/javascript"></script>
+ <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js" type="text/javascript"></script>
+ <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
+ <script>
+ layui.use(['table', 'form', 'layer'], function () {
+ var table = layui.table
+ , form = layui.form
+ , layer = layui.layer;
+
+ form.on('submit(HQuery)', function () {
+ RoadQuery($('#Value').val());
+ });
+ form.on('submit(FH)', function () {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ parent.GetHMaterNameValue(data);
+ var index = parent.layer.getFrameIndex(window.name);
+ parent.layer.close(index);
+ });
+
+
+ //鑾峰彇鍙傛暟
+ function getUrlVars() {
+ var vars = [], hash;
+ var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
+ for (var i = 0; i < hashes.length; i++) {
+ hash = hashes[i].split('=');
+ vars.push(hash[0]);
+ vars[hash[0]] = hash[1];
+ }
+ return vars;
+ }
+
+ var HMaterID = "";
+ var params = getUrlVars();
+ if (params[params[0]] != "undefined") {
+ HMaterID = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇
+ }
+
+ RoadQuery($('#Value').val());
+
+ table.render({
+ elem: '#mainTable'
+ // , url: '/demo/table/user/'
+ , data: []
+ , cellMinWidth: 80 //鍏ㄥ眬瀹氫箟甯歌鍗曞厓鏍肩殑鏈�灏忓搴︼紝layui 2.2.1 鏂板
+ , cols: [[
+ { type: 'radio' }
+ , { field: 'hmainid', title: '宸ヨ壓璺嚎ID', hide: true }
+ , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�' }
+ , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜' }
+ , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', sort: true }
+ , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿' }
+ , { field: '缁勭粐', title: '缁勭粐' }
+ ]]
+ , page: true
+ });
+ ///鍔犺浇鏄剧ず鏁版嵁
+ function RoadQuery(Where) {
+ var Value = Where;
+ if (Value == null) {
+ Value = " and HMaterID=" + HMaterID + " and HOrgID = " + sessionStorage["OrganizationID"];
+ } else {
+ Value = " and HMaterID=" + HMaterID + " and HOrgID = " + sessionStorage["OrganizationID"] + " and ( 鍗曟嵁鍙� like '%" + Where + "%' or 鍗曟嵁鍙� like '%" + Where + "%' ) "
+ }
+ var index = layer.load();
+ $.ajax({
+ type: "get",
+ url: GetWEBURL() + "LEMS/Gy_RoutingBillList",
+ async: true,
+ data: { "sWhere": Value, "user": sessionStorage["HUserName"] },
+ success: function (result) {
+ ajaxReturnData = JSON.parse(JSON.stringify(result)).data;
+ table.reload('mainTable', {
+ data: ajaxReturnData
+ , height: 'full-10'
+ , loading: false
+ , done: function (index, res) {
+
+ }
+ });
+ layer.close(index);
+ },
+ error: function (result) {
+ layer.close(index);
+ console.log(result);
+ //layer.msg('鑾峰彇閲囪喘璁㈠崟鍑虹幇寮傚父', { icon: 2, time: 2000 });
+ }
+ });
+ };
+ });
+ </script>
+
+</body>
+</html>
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\227\245\350\256\241\345\210\222\346\212\245\350\241\250/ReportPODemandPlanBillList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\227\245\350\256\241\345\210\222\346\212\245\350\241\250/ReportPODemandPlanBillList.html"
index 2eb724f..6861064 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\227\245\350\256\241\345\210\222\346\212\245\350\241\250/ReportPODemandPlanBillList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\227\245\350\256\241\345\210\222\346\212\245\350\241\250/ReportPODemandPlanBillList.html"
@@ -245,7 +245,7 @@
function get_Display(sWhere) {
var ajaxLoad = layer.load();
$.ajax({
- url: GetWEBURL() + '/Sc_WorkBillSortBill/Sc_WorkBillSortBillList',
+ url: GetWEBURL() + '/JIT_Cg_PODemandPlanBill/ReportPODemandPlanBillList',
type: "GET",
data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
success: function (result) {
diff --git "a/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBill.html" "b/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBill.html"
index 2752d5c..d6adf71 100644
--- "a/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBill.html"
+++ "b/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBill.html"
@@ -79,7 +79,7 @@
<div class="layui-inline">
<label class="layui-form-label" style="width: 85px;">鏃ユ湡</label>
<div class="layui-input-block" style="margin-left: 120px;">
- <input type="date" class="layui-input" lay-verify="HDate" name="HDate" id="HDate" style="padding-left: 48px;">
+ <input type="date" class="layui-input" lay-verify="HDate" name="HDate" id="HDate" style="padding-left: 80px;">
</div>
</div>
<div class="layui-inline">
@@ -244,6 +244,14 @@
<label class="layui-form-label" style="width: 85px;">鍑忚祫婧愬噺閲�</label>
<div class="layui-input-block" style="margin-left: 120px;">
<input type="text" class="layui-input" lay-verify="HDelSourceRate" name="HDelSourceRate" id="HDelSourceRate" value="0"> <!--style="background-color:#efefef4d;"-->
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;">缁勭粐</label>
+ <div class="layui-input-block" style="margin-left: 120px; width: 185px;">
+ <select name="HOrgID" id="HOrgID" lay-verify="HOrgID">
+ <!--鍔ㄦ�佹覆鏌撶粍缁�-->
+ </select>
</div>
</div>
</div>
@@ -457,6 +465,8 @@
//鍒跺崟浜�
$("#HMaker").val(sessionStorage["HUserName"]);
+ //缁勭粐
+ Organ();
//鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
//if (sessionStorage.login != "login") {
@@ -488,10 +498,11 @@
});
}
else {//濡傛灉淇敼鍒欒蛋涓嬮潰 new
+ //绂佺敤缁勭粐閫夐」
+ $("#HOrgID").attr("disabled", true);
RoadBillMain(linterid, linteridSub);
//RoadBillSub(linterid);
}
-
var option = {
elem: '#mainTable'
@@ -971,6 +982,28 @@
//#region 姝ら〉闈㈡墍鏈夌殑鏂规硶
+ //鑾峰彇缁勭粐
+ function Organ() {
+ //鑾峰彇鐧诲綍椤电粍缁囧垪
+ var Organization = '';
+ $.ajax({
+ type: "get",
+ url: GetWEBURL() + "/Web/GetOrganizations",
+ success: function (result) {
+ if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ var data = result.data;
+ for (var i = 0; i < data.length; i++) {
+ Organization += '<option style="color:blue;" value="' + data[i].ID + '">' + data[i].Name + '</option>';
+ }
+ $("#HOrgID").append(Organization);
+ $("#HOrgID").val(sessionStorage["OrganizationID"])
+ form.render('select');
+ }
+ layer.closeAll("loading");
+ }
+ })
+ }
+
//浜у搧閫夋嫨椤甸潰
function get_checkSearchMater() {
layer.open({
@@ -1341,6 +1374,7 @@
, "HMaterTexture": d.data[0].鏉愯川
, "HProductNum": d.data[0].鎴愬搧缂栧彿
, "HVerNum": d.data[0].鐗堟湰
+ , "HOrgID": d.data[0].HOrgID
});
//瀛愯〃 璧嬪��
diff --git "a/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBillList.html" "b/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBillList.html"
index c32ae56..b39da7d 100644
--- "a/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBillList.html"
+++ "b/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBillList.html"
@@ -41,6 +41,14 @@
<input type="text" class="layui-input" name="HOrderProcNO" id="HOrderProcNO">
</div>
</div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;">鐢熶骇璁㈠崟缁勭粐</label>
+ <div class="layui-input-block" style="margin-left: 120px; width: 185px;">
+ <select name="HOrgID" id="HOrgID" lay-verify="HOrgID">
+ <!--鍔ㄦ�佹覆鏌撶粍缁�-->
+ </select>
+ </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>
@@ -127,7 +135,7 @@
//#region 鏌ヨ鎸夐挳
form.on('submit(btnSearch)', function (data) {//閫夋嫨浠撲綅
- get_FastQuery();
+ get_FastQuery(2);
});
//#endregion
@@ -139,12 +147,37 @@
//#endregion
//#region 姝ら〉闈㈡墍鏈夌殑鏂规硶
+
+ //鑾峰彇缁勭粐
+ function Organ() {
+ //鑾峰彇鐧诲綍椤电粍缁囧垪
+ $.ajax({
+ type: "get",
+ url: GetWEBURL() + "/Web/GetOrganizations",
+ success: function (result) {
+ var Organization = "";
+ if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ var data = result.data;
+ for (var i = 0; i < data.length; i++) {
+ Organization += '<option style="color:blue;" value="' + data[i].ID + '">' + data[i].Name + '</option>';
+ }
+ $("#HOrgID").append(Organization);
+ $("#HOrgID").val(sessionStorage["OrganizationID"])
+ form.render('select');
+ }
+ layer.closeAll("loading");
+ }
+ })
+ }
+
+
//#region 鍒濆鍖栫晫闈�
function set_ClearBill() {
//鍒濆鍖栬〃鏍�
set_InitGrid();
+ Organ();
//鏌ヨ
- get_Display(sWhere);
+ get_FastQuery(1);
}
//#endregion
@@ -171,6 +204,7 @@
, { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅' }
, { field: '榛樿宸ヨ壓', title: '榛樿宸ヨ壓' }
, { field: '琛ㄥご澶囨敞', title: '琛ㄥご澶囨敞' }
+ , { field: '缁勭粐', title: '缁勭粐' }
//, { field: 'hsubid', title: 'hsubid', width: 80 }
, { field: '宸ュ簭鍙�', title: '宸ュ簭鍙�' }
, { field: '濮斿鏍囪', title: '濮斿鏍囪' }
@@ -251,11 +285,20 @@
//#endregion
//#region 蹇�熻繃婊�
- function get_FastQuery() {
+ function get_FastQuery(number) {
+ var HOrgID = "";
var HOrderProcNO = $("#HOrderProcNO").val();//鍗曟嵁绫诲瀷
var hnumber = $("#hnumber").val();
//var HName = $("#HName").val();
var WorkCenter = $("#WorkCenter").val();//鍗曟嵁鍙�
+
+ if (number == 1) {
+ HOrgID = sessionStorage["OrganizationID"];
+ }
+ else {
+ HOrgID = $("#HOrgID").val();//缁勭粐
+ }
+
if (HOrderProcNO) {
sWhere += " and 鍗曟嵁绫诲瀷 like '%" + HOrderProcNO + "%'";
}
@@ -265,6 +308,9 @@
if (WorkCenter) {
sWhere += " and 鍗曟嵁鍙� like '%" + WorkCenter + "%'";
}
+ if (HOrgID) {
+ sWhere += " and HOrgID = '" + HOrgID + "'";
+ }
get_Display(sWhere);
sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
}
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBillList.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBillList.html"
index dd2487b..ae3c428 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBillList.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBillList.html"
@@ -405,7 +405,7 @@
, shade: 0.6
, maxmin: false
, anim: 0
- , content: ['Cj_StationOutBill.html?OperationType=4&linterid=' + data[0].HInterID + '&HSouceBillType=&HBillNo=' + data[0].鍗曟嵁鍙�, 'yes']
+ , content: ['Cj_StationOutBill.html?OperationType=4&linterid=' + data[0].hmainid + '&HSouceBillType=&HBillNo=' + data[0].鍗曟嵁鍙�, 'yes']
, resize: false
, cancel: function () {
btnIs();
@@ -505,7 +505,7 @@
$.ajax({
url: GetWEBURL() + '/Cj_StationOutBill/del_StationOutBill',
type: "GET",
- data: { "HInterID": data[0].HInterID, "HDeleteMan": sessionStorage["HUserName"] },
+ data: { "HInterID": data[0].hmainid, "HDeleteMan": sessionStorage["HUserName"] },
success: function (result) {
if (result.count == 1) {
get_FastQuery();
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_ProcessExchangeBill.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_ProcessExchangeBill.html"
index 3651e83..78ffc8b 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_ProcessExchangeBill.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_ProcessExchangeBill.html"
@@ -337,6 +337,17 @@
</div>
</div>-->
</div>
+ <div class="layui-row">
+ <div class="layui-col-xs3 layui-inline">
+ <label class="layui-form-label">宸ヨ壓璺嚎</label>
+ <div class="layui-input-inline">
+ <input type="text" class="layui-input" name="RoutingBill" id="RoutingBill" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly>
+ <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnRoutingBill" id="btnRoutingBill" style="width: 40px;">
+ <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+ </button>
+ </div>
+ </div>
+ </div>
</div>
</div>
<!--妫�绉荤エ淇℃伅-->
@@ -550,6 +561,7 @@
</div>
</div>
<table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
+
<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>
@@ -562,7 +574,6 @@
</div>
</div>
</div>
-
<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>
@@ -589,6 +600,7 @@
, laydate = layui.laydate
, element = layui.element;
var option;
+ var btnHMaterID="";
//鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
//if (sessionStorage.login != "login") {
// layer.confirm("鐧诲綍澶辨晥锛岃閲嶆柊鐧诲綍锛�", {
@@ -603,12 +615,12 @@
} else {
var OperationType = params[params[0]];//鎿嶄綔绫诲瀷
var linterid = params[params[1]];//婧愬崟id
- var HEntryID=params[params[2]];//婧愬崟瀛恑d
+ var HEntryID = params[params[2]];//婧愬崟瀛恑d
var HSouceBillType = params[params[3]];//婧愬崟绫诲瀷
}
//#region 杩涘叆椤甸潰鍗冲姞杞�
-
+
//鍒濆鍖栬〃鏍�
set_InitGrid();
@@ -654,7 +666,7 @@
$("#HMaker").val(sessionStorage["HUserName"]);
}
});
-
+
$.ajax({
url: GetWEBURL() + "/Sc_WorkBillSortBill/Sc_WorkBillSortBillList",
type: "GET",
@@ -665,15 +677,15 @@
}
}
})
-
-
-
+
+
+
GetICMOBillValue(linterid, HEntryID);
option.data = [{
"HProcNo": "", "HProcID": 0, "HProcNumber": "", "HProcName": "", "HWorkRemark": "",
"HCenterID": 0, "HCenterNumber": "", "HCenterName": "",
"HDeptID": 0, "HDeptNumber": "", "HDeptName": "",
- "HSupID": 0,"HSupNumber": "", "HSupName": "", "isEntrust": "false",
+ "HSupID": 0, "HSupNumber": "", "HSupName": "", "isEntrust": "false",
"HQty": 0, "HOutPrice": 0, "HRemark": "", "HRelationQty_In": 0, "HRelationQty_Out": 0,
"HRelationQty_WWOrder": 0, "HRelationQty_Bad": 0, "HOverRate": 0, "HMaxQty": 0,
"HPassRate": "", "HSumPassRate": "", "HTechnologyParameter": "", "HPicNum": "", "HProcCheckNote": ""
@@ -689,7 +701,7 @@
layer.alert("鏈煡鎿嶄綔绫诲瀷锛�", { icon: 5 });
}
//#endregion
-
+
//鍒濆鍖栬〃鏍�
function set_InitGrid() {
@@ -758,13 +770,12 @@
}
-
//澶村伐鍏锋爮浜嬩欢
table.on('toolbar(mainTable)', function (obj) {
var checkStatus = table.checkStatus('mainTable')
, data = checkStatus.data;
//鏂板琛岃〃鏍兼暟鎹�
- var NewRow ={
+ var NewRow = {
"HProcNo": "", "HProcID": 0, "HProcNumber": "", "HProcName": "", "HWorkRemark": "",
"HCenterID": 0, "HCenterNumber": "", "HCenterName": "",
"HDeptID": 0, "HDeptNumber": "", "HDeptName": "",
@@ -812,7 +823,6 @@
var rowIndex = $(obj.tr).attr("data-index");
if (obj.event === 'del') {
layer.confirm('鐪熺殑鍒犻櫎琛屽悧锛�', function (index) {
- console.log("绱㈠紩涓�:" + rowIndex);
if (rowIndex === '0') {
layer.msg('棣栬鏃犳硶鍒犻櫎锛侊紒锛�');
} else {
@@ -922,7 +932,7 @@
}
});
- }
+ }
if (obj.event === 'HDeptCheck') {//閮ㄩ棬
layer.open({
type: 2,
@@ -987,7 +997,7 @@
// 鍗曞厓鏍肩紪杈戜箣鍓嶇殑鍊�
//绗竴琛岃鍒掓暟閲�=娴佽浆鍗℃暟閲忥紱涔嬪悗鐨勮鍒掓暟閲�=涓婁竴琛屾暟閲�*鑹巼/ 100
//鏈�楂樹笂闄�=娴佽浆鍗℃暟閲�*(100+瓒呴姣斾緥)/100
-
+
var oldText = $(this).prev().text();
var value = obj.value //寰楀埌淇敼鍚庣殑鍊�
@@ -995,12 +1005,12 @@
, field = obj.field; //寰楀埌瀛楁
switch (field) {
- case "HOverRate":
+ case "HOverRate":
var HQty = parseInt(isNaN(data.HQty) ? 0 : data.HQty);
var HOverRate = parseFloat(isNaN(data.HOverRate) ? 0 : data.HOverRate);
//鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
obj.update({
- HMaxQty: HQty * (100 + HOverRate)/100 //鏈�灏忓寘瑁呮暟
+ HMaxQty: HQty * (100 + HOverRate) / 100 //鏈�灏忓寘瑁呮暟
});
break;
default:
@@ -1064,7 +1074,7 @@
});
});
- //妯″叿璁惧寮圭獥
+ //妯″叿璁惧寮圭獥
form.on('submit(btnHEquipMent)', function () {
//椤甸潰灞�-鑷畾涔�
layer.open({
@@ -1140,7 +1150,7 @@
});
});
- //濮斿鍔犲伐鍗曚綅寮圭獥
+ //濮斿鍔犲伐鍗曚綅寮圭獥
form.on('submit(btnSearchHSup)', function () {
//椤甸潰灞�-鑷畾涔�
layer.open({
@@ -1194,7 +1204,7 @@
if (checkStatus.data.length === 0) {
return layer.msg('璇烽�夋嫨鏁版嵁');
}
-
+
GetICMOBillValue(checkStatus.data[0].hmainid, checkStatus.data[0].HEntryID)
layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
}
@@ -1220,6 +1230,63 @@
}
$("#WorkBillSortNo").val(checkStatus.data[0].鍗曟嵁鍙�);
GetICMOBillValue(checkStatus.data[0].婧愬崟涓诲唴鐮�, checkStatus.data[0].婧愬崟瀛愬唴鐮�)
+ layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ , btn2: function (index, layero) { }
+ })
+ });
+
+ //閫夋嫨宸ヨ壓璺嚎
+ form.on('submit(btnRoutingBill)', function () {
+ layer.open({
+ type: 2//寮圭獥绫诲瀷
+ , skin: 'layui-layer-rim' //鍔犱笂杈规
+ , area: ['90%', '70%']//澶у皬
+ , title: '宸ヨ壓璺嚎鍒楄〃'//鏍囬
+ , shift: 2//寮瑰嚭鍔ㄧ敾
+ , content: ['../../Baseset/鍩虹璧勬枡/Gy_RoutingBillList.html?HMaterID=' + btnHMaterID, '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('璇烽�夋嫨鏁版嵁');
+ }
+
+ $.ajax({
+ type: "get",
+ url: GetWEBURL() + "LEMS/MES_Gy_RoutingBillList_Json",
+ async: true,
+ data: { "sWhere": " and 鍗曟嵁鍙�='" + checkStatus.data[0].鍗曟嵁鍙� + "'", "user": sessionStorage["HUserName"] },
+ success: function (result) {
+ var data = result.data;
+ var Tablerow = [];
+
+ $("#RoutingBill").val(data[0].鍗曟嵁鍙�)
+ for (var i = 0; i < data.length; i++) {
+ Tablerow.push({
+ "HProcNo": data[i].宸ュ簭鍙�, "HProcID": data[i].hprocid, "HProcNumber": data[i].宸ュ簭浠g爜, "HProcName": data[i].宸ュ簭, "HWorkRemark": data[i].琛ㄤ綋澶囨敞,
+ "HCenterID": data[i].HCenterID, "HCenterNumber": data[i].宸ヤ綔涓績浠g爜, "HCenterName": data[i].宸ヤ綔涓績鍚嶇О,
+ "HDeptID": 0, "HDeptNumber": "", "HDeptName": "",
+ "HSupID": data[i].HSupID, "HSupNumber": data[i].渚涘簲鍟嗕唬鐮�, "HSupName": data[i].渚涘簲鍟�, "isEntrust": data[i].濮斿鏍囪 == 0 ? "false" : "true",
+ "HQty": data[i].鍔犲伐鏁伴噺, "HOutPrice": 0, "HRemark": "", "HRelationQty_In": 0, "HRelationQty_Out": 0,
+ "HRelationQty_WWOrder": 0, "HRelationQty_Bad": 0, "HOverRate": 0, "HMaxQty": 0,
+ "HPassRate": "", "HSumPassRate": "", "HTechnologyParameter": data[i].宸ヨ壓鍙傛暟, "HPicNum": data[i].鍥剧焊缂栧彿, "HProcCheckNote": data[i].鏈伐搴忕‘璁よ褰�
+ });
+ }
+ option.data = Tablerow;
+ table.render(option);
+ for (var i = 1; i <= data.length; i++) {
+ $('#isEntrust' + i + '').find("option[value='" + (checkStatus.data[i - 1].濮斿鏍囪 == 0 ? "false" : "true") + "']").attr("selected", true);
+ }
+ form.render('select');
+ },
+ error: function (result) {
+ layer.close(index);
+ console.log(result);
+ //layer.msg('鑾峰彇閲囪喘璁㈠崟鍑虹幇寮傚父', { icon: 2, time: 2000 });
+ }
+ })
layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
}
, btn2: function (index, layero) { }
@@ -1294,7 +1361,7 @@
}
var sMainSub = sMainStr + ';' + sSubStr + ";" + sessionStorage["HUserName"] + ";" + flag;
var index = layer.load();
-
+
$.ajax({
type: "POST",
url: GetWEBURL() + "/Sc_ProcessExchangeBill/AddBill",
@@ -1418,7 +1485,7 @@
, "HMaterNumber_A": data.鍘熸潗鏂欑紪鍙稟
, "HMaterNumber_B": data.鍘熸潗鏂欑紪鍙稡
, "HMaterNumber_C": data.鍘熸潗鏂欑紪鍙稢
- , "HMaterNumber_D":data.鍘熸潗鏂欑紪鍙稤
+ , "HMaterNumber_D": data.鍘熸潗鏂欑紪鍙稤
, "HProdType": data.鐢熶骇绫诲瀷
, "HMaterShortName": data.鍘熸潗鏂欑畝绉�
, "HMaterIDA": data.鍘熸潗鏂欏唴鐮丄
@@ -1499,7 +1566,7 @@
$("#HOrderProcNO").val(data.璁㈠崟璺熻釜鍙�);
$("#HMaterID").val(data.hmaterid);
$("#HMaterName").val(data.鐗╂枡鍚嶇О);
- $("#HMaterID2").val(data.hmaterid);
+ $("#HMaterID2").val(data.HMaterID);
$("#HMaterName2").val(data.鐗╂枡鍚嶇О);
$("#HMaterNumber").val(data.鐗╂枡浠g爜);
$("#HMaterNumber2").val(data.鐗╂枡浠g爜);
@@ -1530,6 +1597,7 @@
$("#HProductNum").val(data.鎴愬搧缂栧彿);
$("#HVerNum").val(data.鐗堟湰);
$("input[name='HBLFlag']").prop("checked", result.data[0].HBLFlag == 0 ? false : true);//true:閫変腑 false:涓嶉�変腑
+ btnHMaterID= data.hmaterid;
}
else {
layer.msg(result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
@@ -1544,7 +1612,7 @@
$.ajax({
url: GetWEBURL() + "/Sc_ProcessExchangeBill/GetICMOBillList",
type: "GET",
- data: { "hmainid": hmainid, "HEntryID":HEntryID, "OrganizationID": sessionStorage["OrganizationID"] },
+ data: { "hmainid": hmainid, "HEntryID": HEntryID, "OrganizationID": sessionStorage["OrganizationID"] },
success: function (result) {
if (result.count == 1) {
option.data = result.data;
--
Gitblit v1.9.1