From 93c726c837be5eecadc040253cc6c24acd16efe0 Mon Sep 17 00:00:00 2001
From: ch <37327@LLOOCCY>
Date: 星期二, 25 十月 2022 23:46:20 +0800
Subject: [PATCH] 合并
---
WebTM/views/生产管理/生产叫料平台/JIT_ComplementGoodBillMain.html | 486 +++++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 405 insertions(+), 81 deletions(-)
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\345\217\253\346\226\231\345\271\263\345\217\260/JIT_ComplementGoodBillMain.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\345\217\253\346\226\231\345\271\263\345\217\260/JIT_ComplementGoodBillMain.html"
index c226e29..4359420 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\345\217\253\346\226\231\345\271\263\345\217\260/JIT_ComplementGoodBillMain.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\345\217\253\346\226\231\345\271\263\345\217\260/JIT_ComplementGoodBillMain.html"
@@ -26,50 +26,59 @@
<div class="layui-card-body" style="padding: 1px;">
<form class="layui-form" action="" lay-filter="formData" style="background-color:white;">
<div style="padding: 10px; ">
- <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="Bzjjl" id="Bzjjl">鏍囧噯浠跺彨鏂�</button>
+ <!--<button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="Bzjjl" id="Bzjjl">鏍囧噯浠跺彨鏂�</button>-->
<button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="Ptjl" id="Ptjl">閰嶅鍙枡</button>
<button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="Zxbzjl" id="Zxbzjl">鏈�灏忓寘瑁呭彨鏂�</button>
<button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="Yce" id="Yce">寮曞嚭Excel</button>
<button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="Xc" id="Xc">涓嬫煡</button>
- <button class="layui-btn layui-btn-normal" type="button" lay-submit="" lay-filter="Cx" id="Cx">鏌ヨ</button>
- <button class="layui-btn layui-btn-normal" type="button" lay-submit="" lay-filter="Jl" id="Jl">鍙枡</button>
- <button class="layui-btn layui-btn-normal" type="button" lay-submit="" lay-filter="Scjld" id="Scjld">鐢熸垚鎷f枡鍗�</button>
- <button class="layui-btn layui-btn-normal" type="button" lay-submit="" lay-filter="Blptl" id="Blptl">涓嶈壇鍝侀��鏂欑敵璇峰崟</button>
- <button class="layui-btn layui-btn-normal" type="button" lay-submit="" lay-filter="Yltl" id="Yltl">浣欓噺閫�鏂欑敵璇峰崟</button>
- <button class="layui-btn layui-btn-normal" type="button" lay-submit="" lay-filter="Bftl" id="Bftl">鎶ュ簾閫�鏂欑敵璇峰崟</button>
- <button class="layui-btn layui-btn-normal" type="button" lay-submit="" lay-filter="Sctld" id="Sctld">鐢熸垚閫�鏂欏崟</button>
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="Cx" id="Cx">鏌ヨ</button>
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="Jl" id="Jl">鍙枡</button>
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="Scjld" id="Scjld">鐢熸垚鎷f枡鍗�</button>
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="Blptl" id="Blptl">涓嶈壇鍝侀��鏂欑敵璇峰崟</button>
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="Yltl" id="Yltl">浣欓噺閫�鏂欑敵璇峰崟</button>
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="Bftl" id="Bftl">鎶ュ簾閫�鏂欑敵璇峰崟</button>
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="Sctld" id="Sctld">鐢熸垚閫�鏂欏崟</button>
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="HideColumn" id="HideColumn">闅愯棌鍒楄缃�</button>
+ <button class="layui-btn layui-btn-normal" type="button" lay-submit="" style="margin-left: 0px;" lay-filter="btnReSearch" id="btnReSearch">閲嶇疆</button>
</div>
<div class="layui-collapse">
<div class="layui-colla-item">
- <div class="layui-colla-title layui-inline">
- <div class="layui-inline">
- <span>鏇村</span>
- </div>
- </div>
+ <div class="layui-colla-title layui-inline">
<div class="layui-inline">
- <label class="layui-form-label" style="width: 85px;">閿�鍞鍗曞彿</label>
- <div class="layui-input-block" style="margin-left: 120px;">
- <input type="text" class="layui-input" name="HSeOrderBillNo" lay-verify="HSeOrderBillNo" id="HSeOrderBillNo">
- </div>
+ <span>鏇村</span>
</div>
- <div class="layui-inline">
- <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">鐢熶骇杞﹂棿</label>
- <div class="layui-input-block" style="margin-left: 77px;">
- <input type="hidden" class="layui-input" lay-verify="DepartmentID" name="DepartmentID" id="DepartmentID" value="0" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
- <input type="text" class="layui-input" lay-verify="DepartmentName" name="DepartmentName" id="DepartmentName" value="" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
- <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnDepartment" id="btnDepartment" style="padding: 0 10px;float: right;margin-right: 3px;">
- <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
- </button>
- </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;">閿�鍞鍗曞彿</label>
+ <div class="layui-input-block" style="margin-left: 120px;">
+ <input type="text" class="layui-input" name="HSeOrderBillNo" lay-verify="HSeOrderBillNo" id="HSeOrderBillNo">
</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="Organization" id="Organization" lay-verify="Organization">
- <!--鍔ㄦ�佹覆鏌撶粍缁�-->
- </select>
- </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">鐢熶骇杞﹂棿</label>
+ <div class="layui-input-block" style="margin-left: 77px;">
+ <input type="hidden" class="layui-input" lay-verify="DepartmentID" name="DepartmentID" id="DepartmentID" value="0" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
+ <input type="text" class="layui-input" lay-verify="DepartmentName" name="DepartmentName" id="DepartmentName" value="" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
+ <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnDepartment" id="btnDepartment" style="padding: 0 10px;float: right;margin-right: 3px;">
+ <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+ </button>
</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="Organization" id="Organization" lay-verify="Organization">
+ <!--鍔ㄦ�佹覆鏌撶粍缁�-->
+ </select>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px; font-size: 20px;">娑堟伅:</label>
+ <div style=" height:50px;">
+ <p id="wjlCount" style="width: 350px; color: red;"></p>
+ <p id="wtlCount" style="width: 350px; color: red;"></p>
+ </div>
+ </div>
<div class="layui-colla-content" style="padding: 0px; margin-left: 6%;">
<div class="layui-row" style="margin-top:10px;">
<div class="layui-inline">
@@ -91,7 +100,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="text" class="layui-input" name="MaterialModel" id="MaterialModel" onmouseover="this.title=this.value" readonly>
+ <input type="text" class="layui-input" name="MaterialModel" id="MaterialModel" readonly>
</div>
</div>
</div>
@@ -100,7 +109,6 @@
<label class="layui-form-label" style="width: 85px;padding: 9px 18px;">浜у搧浠g爜</label>
<div class="layui-input-block" style="margin-left: 77px;">
<input type="text" class="layui-input" name="CPNumber" lay-verify="CPNumber" id="CPNumber" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
- <input type="hidden" name="CPID" id="CPID" lay-verify="CPID" value="0">
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnCP" id="btnCP" style="padding: 0 10px;float: right;margin-right: 3px;">
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
</button>
@@ -115,34 +123,18 @@
<div class="layui-inline">
<label class="layui-form-label" style="width: 85px;">浜у搧瑙勬牸鍨嬪彿</label>
<div class="layui-input-block" style="margin-left: 120px;">
- <input type="text" class="layui-input" name="CPModel" lay-verify="CPModel" id="CPModel" value="" readonly onmouseover="this.title=this.value">
+ <input type="text" class="layui-input" name="CPModel" lay-verify="CPModel" id="CPModel" value="" readonly>
</div>
</div>
</div>
<div class="layui-row" style="margin-top:10px;">
<div class="layui-inline">
- <label class="layui-form-label" style="width: 85px;">鐢熶骇璁㈠崟鍙�</label>
- <div class="layui-input-block" style="margin-left: 120px;">
- <input type="text" class="layui-input" name="HICMOBillNo" lay-verify="HICMOBillNo" id="HICMOBillNo" value="" onmouseover="this.title=this.value">
- </div>
- </div>
- <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="HBeginDate" name="HBeginDate" id="HBeginDate" style="padding-left: 48px;">
- </div>
- </div>
- <div class="layui-inline">
- <label class="layui-form-label" style="width: 85px;text-align:center;">鈥�</label>
- <div class="layui-input-block" style="margin-left: 118px;">
- <input type="date" class="layui-input" lay-verify="HEndDate" name="HEndDate" id="HEndDate" style="padding-left: 48px;">
- </div>
- </div>
- </div>
- <div class="layui-row" style="margin-top:10px;">
- <div class="layui-inline">
- <div class="layui-input-block" style="margin-left: 90px;">
- <input type="checkbox" name="ps" id="ps" lay-skin="primary" lay-filter="ps" title="浠呮樉绀烘湭瀹屽叏閰嶉��">
+ <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">鐢熶骇璁㈠崟</label>
+ <div class="layui-input-block" style="margin-left: 77px;">
+ <input type="text" class="layui-input" name="HICMOBillNo" lay-verify="HICMOBillNo" id="HICMOBillNo" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
+ <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnICMOBill" id="btnICMOBill" style="padding: 0 10px;float: right;margin-right: 3px;">
+ <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+ </button>
</div>
</div>
</div>
@@ -154,7 +146,6 @@
<div class="layui-form-item" style="padding-top: 10px;">
<table class="" id="mainTable" lay-filter="mainTable"></table>
</div>
-
</div>
</div>
</form>
@@ -180,13 +171,15 @@
//鏌ヨ鏉′欢
var sWhere = "";
var option = [];
+ var HModName = "JIT_ComplementGoodBill";
//#endregion
//#region 杩涘叆椤甸潰鍗冲姞杞�
//鍒濆鍖栫晫闈�
set_ClearBill();
-
+ //瀹氭椂鏌ヨ 鍒锋柊 鏈嫞鏂� 鏈��鏂� 鏄剧ず鐨勬潯鏁�
+ setInterval(NotGeneratedMaterial, 30000);
//#endregion
//#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
@@ -194,6 +187,27 @@
//杩囨护鏌ヨ
form.on('submit(Cx)', function () {
get_FastQuery();
+ //闅愯棌鎸夐挳
+ var HICMOBillNo = $("#HICMOBillNo").val();
+ if (HICMOBillNo == "") {
+ $("#Ptjl").hide();
+ $("#Zxbzjl").hide();
+ $("#Jl").hide();
+ $("#Scjld").hide();
+ $("#Yltl").hide();
+ $("#Bftl").hide();
+ $("#Blptl").hide();
+ $("#Sctld").hide();
+ } else {
+ $("#Ptjl").show();
+ $("#Zxbzjl").show();
+ $("#Jl").show();
+ $("#Scjld").show();
+ $("#Yltl").show();
+ $("#Bftl").show();
+ $("#Blptl").show();
+ $("#Sctld").show();
+ }
})
//閫夋嫨鐢熶骇杞﹂棿
@@ -219,6 +233,11 @@
//鏂板鍙枡鍗�
form.on('submit(Jl)', function () {
set_AddNew_Jl();
+ })
+
+ //閰嶅鍙枡
+ form.on('submit(Ptjl)', function () {
+ set_Ptjl();
})
//鏂板涓嶈壇鍝侀��鏂欑敵璇峰崟
@@ -251,6 +270,22 @@
getXc();
})
+ //閲嶇疆鎸夐挳
+ form.on('submit(btnReSearch)', function (data) {
+ set_ClearQuery();
+ });
+
+ //鐢熶骇璁㈠崟
+ form.on('submit(btnICMOBill)', function (data) {
+ get_btnICMOBill();
+ })
+
+
+ //闅愯棌鍒楄缃�
+ form.on('submit(HideColumn)', function () {
+ get_HideColumn();
+ })
+
//#endregion
//#region 姝ら〉闈㈡墍鏈夌殑鏂规硶
@@ -258,12 +293,13 @@
//鍒濆鍖栫晫闈�
function set_ClearBill()
{
+ NotGeneratedMaterial();
set_InitGrid();
get_Display(sWhere);
Organ();
- //鏃堕棿鍒濆鍖�
- $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
- $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
+ DisPlay_HideColumn();
+ //璇诲彇杩囨护鏉′欢
+ get_ReadConfigFile();
}
//鑾峰彇缁勭粐
function Organ() {
@@ -278,8 +314,17 @@
for (var i = 0; i < data.length; i++) {
Organization += '<option style="color:blue;" value="' + data[i].ID + '">' + data[i].Name + '</option>';
}
+
$("#Organization").append(Organization);
+
+ //鑾峰彇瀛樺偍鏁版嵁
+ var dataG = localStorage.getItem("dataJL");
+ if (dataG != null) {
+ var data2 = JSON.parse(dataG);
+ $("#Organization").val(data2["Organization"]);
+ }
form.render('select');
+
}
layer.closeAll("loading");
}
@@ -314,13 +359,15 @@
, { field: '閫�鏂欏師鍥�', title: '閫�鏂欏師鍥�', width: 160, edit: 'text'}
, { field: '宸插彨鏂欐暟閲�', title: '宸插彨鏂欐暟閲�', width: 160}
, { field: '宸查厤閫佹暟閲�', title: '宸查厤閫佹暟閲�', width: 160 }
- , { field: '璋冨嚭浠撳簱', title: '璋冨嚭浠撳簱', width: 160, edit: 'text', event: 'Warehouse' }
+ , { field: '璋冨嚭浠撳簱', title: '璋冨嚭浠撳簱', width: 160, edit: 'text', event: 'OutWarehouse' }
, { field: '璋冨嚭浠撳簱id', title: '璋冨嚭浠撳簱id', width: 160, hide: true }
+ , { field: '璋冨叆浠撳簱', title: '璋冨叆浠撳簱', width: 160, edit: 'text', event: 'InWarehouse' }
+ , { field: '璋冨叆浠撳簱id', title: '璋冨叆浠撳簱id', width: 160, hide: true }
, { field: '搴撳瓨鏁伴噺', title: '搴撳瓨鏁伴噺', width: 160 }
, { field: '璋冨嚭浠撳簱搴撳瓨鏁伴噺', title: '璋冨嚭浠撳簱搴撳瓨鏁伴噺', width: 160 }
, { field: '璋冨嚭浠撳簱鍙敤搴撳瓨鏁伴噺', title: '璋冨嚭浠撳簱鍙敤搴撳瓨鏁伴噺', width: 160 }
, { field: '鍙敤搴撳瓨', title: '鍙敤搴撳瓨', width: 160 }
- , { field: '搴撳瓨缁勭粐', title: '搴撳瓨缁勭粐', width: 160}
+ , { field: '璋冨嚭缁勭粐', title: '璋冨嚭缁勭粐', width: 160}
, { field: 'HICMOBillNo', title: 'HICMOBillNo', width: 160 }
, { field: '婧愬崟涓诲唴鐮�', title: '婧愬崟涓诲唴鐮�', width: 160 }
, { field: '婧愬崟瀛愬唴鐮�', title: '婧愬崟瀛愬唴鐮�', width: 160 }
@@ -351,6 +398,8 @@
option.data = data1.data;
table.render(option);
layer.close(ajaxLoad);
+ //瀛樺偍杩囨护鏉′欢
+ get_WriteConfigFile();
//layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
} else {
layer.close(ajaxLoad);
@@ -454,9 +503,11 @@
var CPName = $("#CPName").val(); //浜у搧鍚嶇О
var CPModel = $("#CPModel").val(); //浜у搧瑙勬牸鍨嬪彿
var HICMOBillNo = $("#HICMOBillNo").val(); //鐢熶骇璁㈠崟鍙�
- var HBeginDate = $("#HBeginDate").val(); //寮�濮嬫棩鏈�
- var HEndDate = $("#HEndDate").val(); //缁撴潫鏃ユ湡
var ps = $("#ps").prop("checked"); //浠呮樉绀烘湭瀹屽叏閰嶉��
+
+ if (DepartmentName=="") {
+ return layer.msg("璇烽�夋嫨鐢熶骇杞﹂棿!");
+ }
if (ps) {
ps = 1; //浠呮樉绀烘湭瀹屽叏閰嶉��
}
@@ -475,10 +526,8 @@
CPName: CPName,
CPModel: CPModel,
HICMOBillNo: HICMOBillNo,
- HBeginDate: HBeginDate,
- HEndDate: HEndDate,
ps: ps,
- user: user
+ user: user,
};
get_Display(JSON.stringify(sWhere));
sWhere = "";
@@ -488,7 +537,44 @@
function set_GridCellCheck(obj) {
$(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
if (event.key == "F7") {
- if (obj.event == "Warehouse") {
+ if (obj.event == "OutWarehouse") {
+ var MaterNum = obj.data["鐗╂枡浠g爜"];
+ var HOrgID = $("#Organization").val();
+ //鎵撳紑缁翠慨椤圭洰灏忕獥浣�
+ layer.open({
+ type: 2
+ , skin: "layui-layer-rim" //鍔犱笂杈规
+ , title: "浠撳簱鍒楄〃" //鏍囬
+ , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+ , shift: 2 //寮瑰嚭鍔ㄧ敾
+ , area: ["90%", "90%"] //绐椾綋澶у皬
+ , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+ , content: ["../../Baseset/鍩虹璧勬枡/Gy_WarehouseList_JIT.html?MaterNum=" + MaterNum + "&HOrgID=" + HOrgID, "yes"]
+ , btn: ["纭畾", "鍙栨秷"]
+ , btn1: function (index, laero) {
+ //鎸夐挳涓� 鐨勫洖璋�
+ var iframeWindow = window["layui-layer-iframe" + index];//鑾峰彇寮规椤甸潰
+ var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//鑾峰彇閫変腑鐨勬暟鎹�
+
+ if (checkStatus.data.length != 1) {
+ return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�");
+ }
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ obj.update({
+ "璋冨嚭浠撳簱": checkStatus.data[0].浠撳簱鍚嶇О
+ , "璋冨嚭浠撳簱id": checkStatus.data[0].浠撳簱ID
+ , "璋冨嚭浠撳簱搴撳瓨鏁伴噺": checkStatus.data[0].璋冨嚭浠撳簱搴撳瓨鏁伴噺
+ , "璋冨嚭浠撳簱鍙敤搴撳瓨鏁伴噺": checkStatus.data[0].璋冨嚭浠撳簱鍙敤搴撳瓨鏁伴噺
+ , "HOutOrgID": checkStatus.data[0].搴撳瓨缁勭粐
+ , "璋冨嚭缁勭粐": checkStatus.data[0].缁勭粐鍚嶇О
+
+ })
+ layer.close(index);//鍏抽棴寮圭獥
+ }
+ })
+ }
+
+ if (obj.event == "InWarehouse") {
//鎵撳紑缁翠慨椤圭洰灏忕獥浣�
layer.open({
type: 2
@@ -510,10 +596,9 @@
}
//鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
obj.update({
- "璋冨嚭浠撳簱": checkStatus.data[0].HName
- , "璋冨嚭浠撳簱id": checkStatus.data[0].HItemID
+ "璋冨叆浠撳簱": checkStatus.data[0].HName
+ , "璋冨叆浠撳簱id": checkStatus.data[0].HItemID
})
- console.log(checkStatus.data[0].HItemID)
layer.close(index);//鍏抽棴寮圭獥
}
})
@@ -524,17 +609,18 @@
//鏂板鍙枡鍗�
function set_AddNew_Jl() {
-
- if (table.cache['mainTable'].length == 0) {
+ var data = table.cache['mainTable'];
+ if (data.length == 0) {
return layer.msg("鏃犳暟鎹�,鏃犳硶鍙枡!");
}
else {
+
var sMainStr = JSON.stringify(table.cache['mainTable']) + ";" + sessionStorage["HUserName"] + ";" + sessionStorage["OrganizationID"];//sessionStorage["HUserName"]
$.ajax(
{
type: "POST",
- url: GetWEBURL() + "Sc_ComplementGoodBill/InsertCallGoodsBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ url: GetWEBURL() + "/Sc_ComplementGoodBill/InsertCallGoodsBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
async: true,
data: { "msg": sMainStr },
dataType: "json",
@@ -546,15 +632,48 @@
}
else {
layer.alert(data.Message, { icon: 5 });
- console.log("Reason" + sMainStr + "sub:" + JSON.stringify(layui.table.cache.mainTable));
}
layer.closeAll("loading");
},
error: function (err) {
layer.alert("閿欒:" + err, { icon: 5 });
- console.log("Reason" + sMainStr);
}
});
+ }
+ }
+
+ //閰嶅鍙枡
+ function set_Ptjl() {
+ var CheckStatus = table.checkStatus("mainTable");
+ if (CheckStatus.data.length !=1) {
+ return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�!");
+ }
+ else {
+
+ var HICMOInterID = CheckStatus.data[0].HICMOInterID;
+ var HICMOEntryID = CheckStatus.data[0].HICMOEntryID;
+ var HDeptID = $("#DepartmentID").val();
+ var HOrgID = $("#Organization").val();
+
+ layer.open({
+ type: 2
+ , skin: "layui-layer-rim" //鍔犱笂杈规
+ , title: "閰嶅鍙枡" //鏍囬
+ , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+ , shift: 2 //寮瑰嚭鍔ㄧ敾
+ , area: ["90%", "90%"] //绐椾綋澶у皬
+ , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+ , content: ['../../鐢熶骇绠$悊/鐢熶骇鍙枡骞冲彴/JIT_ComplementGoodPT.html?OperationType=1&HICMOInterID=' + HICMOInterID + '&HICMOEntryID=' + HICMOEntryID + '&HDeptID=' + HDeptID + '&HOrgID=' + HOrgID, "yes"]
+ , btn: ["纭畾", "鍙栨秷"]
+ , btn1: function (index, laero) {
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ layer.close(index);//鍏抽棴寮圭獥
+ }
+ , end: function () {
+ //鍒锋柊椤甸潰,
+ get_FastQuery();
+ }
+ })
}
}
@@ -679,7 +798,7 @@
$.ajax(
{
type: "POST",
- url: GetWEBURL() + "Sc_ComplementGoodBill/Insert_JL_ICStockTuiBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ url: GetWEBURL() + "/Sc_ComplementGoodBill/Insert_JL_ICStockTuiBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
async: true,
data: { "msg": sMainStr },
dataType: "json",
@@ -761,10 +880,215 @@
, area: ['80%', '80%']
, title: '鍙枡鎷f枡淇℃伅鏌ヨ'
, shift: 0//寮瑰嚭鍔ㄧ敾
- , content: '../鐢熶骇鍙枡骞冲彴/JIT_HlpBillList.html?HSourceInterID=' + HSouceInterID + '&HSourceEntryID=' + HSourceEntryID
+ , content: '../鐢熶骇鍙枡骞冲彴/JIT_HlpBillList.html?HSourceInterID=' + HSouceInterID + '&HSourceEntryID=' + HSourceEntryID + '&Type=1'
})
}
}
+
+ //闅愯棌鍒楄缃�
+ function get_HideColumn() {
+ var colName = "";
+ for (var i = 1; i < option.cols[0].length - 1; i++) {
+ colName += option.cols[0][i]["title"] + ",";
+ }
+
+ colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
+ layer.open({
+ type: 2
+ , skin: "layui-layer-rim" //鍔犱笂杈规
+ , title: "闅愯棌鍒楄缃�" //鏍囬
+ , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+ , shift: 2 //寮瑰嚭鍔ㄧ敾
+ , area: ["50%", "90%"] //绐椾綋澶у皬
+ , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+ , content: ['../../鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName, "yes"]
+ , btn: ["纭畾", "鍙栨秷"]
+ , btn1: function (index, laero) {
+ //鍒锋柊琛ㄦ牸鏁版嵁
+ DisPlay_HideColumn();
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ layer.close(index);//鍏抽棴寮圭獥
+ }
+ })
+ }
+
+ //鏄剧ず鍒楁暟鎹�
+ function DisPlay_HideColumn() {
+ $.ajax({
+ url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+ type: "GET",
+ data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
+ success: function (data1) {
+ if (data1.data.length != 0) {
+
+ var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+ var titleData = ["璋冨嚭浠撳簱id", "璋冨叆浠撳簱id", "HDeptID", "HDeptNumber", "HMaterialID", "HWHID", "HOutOrgID", "HSouceInterID", "HSourceEntryID", "HSourceBillNo", "HICMOInterID", "HICMOEntryID","HSTOCKID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+
+ dataCol = data1.data[0].HGridString.split(',');
+
+ for (var i = 0; i < option.cols[0].length - 2; i++) {
+ var dataCols = dataCol[i].split('|');
+ //闅愯棌鍒�
+ if (dataCols[1] == 1) {
+ option.cols[0][i + 1]["hide"] = true;
+ }
+ //璁剧疆鍐呭瀛椾綋澶у皬
+ if (data1.data[0].HFontSize != 0) {
+ option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
+ } else {
+ option.cols[0][i + 1]["style"] = "font-size:100%";
+ }
+ //璁剧疆鍒楀
+ if (dataCols[3] > 0) {
+ option.cols[0][i + 1]["width"] = dataCols[3];
+ }
+ //鏄剧ず鍒�
+ if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["field"], titleData) == -1) {
+ option.cols[0][i + 1]["hide"] = false;
+ }
+ //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+ switch (dataCols[2]) {
+ case "L":
+ option.cols[0][i + 1]["align"] = "left";
+ break;
+ case "M":
+ option.cols[0][i + 1]["align"] = "center";
+ break;
+ case "R":
+ option.cols[0][i + 1]["align"] = "right";
+ break;
+ }
+ }
+
+ //鍙栨秷鍐荤粨鍒�
+ for (var i = 1; i < option.cols[0].length - 1; i++) {
+ if (option.cols[0][i]["fixed"] != null) {
+ option.cols[0][i]["fixed"] = null;
+ }
+ else {
+ break;
+ }
+ }
+ //鍐荤粨鍒�
+ if (data1.data[0].HFixCols != 0) {
+ for (var i = 0; i < data1.data[0].HFixCols; i++) {
+ if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
+ data1.data[0].HFixCols += 1;
+ }
+ option.cols[0][i + 1]["fixed"] = "left";
+ }
+ }
+ table.render(option);
+ } else {
+ table.render(option);
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ })
+ }
+
+ //鏈敓鎴愭嫞鏂欑敵璇峰崟 鏈敓鎴愰��鏂欏崟鐨� 鏁版嵁
+ function NotGeneratedMaterial() {
+ //var ajaxLoad = layer.load();
+ $.ajax({
+ url: GetWEBURL() + '/Sc_ComplementGoodBill/NotGeneratedMaterialList',
+ type: "GET",
+ data: { "sWhere": sessionStorage["OrganizationID"], "user": sessionStorage["HUserName"] },
+ success: function (data1) {
+ if (data1.count == 1) {
+ $("#wjlCount").text("宸插彨鏂�,鏈嫞鏂欑敵璇� " + data1.data[1]["鏈敓鎴�"]+" 鏉″崟鎹�");
+ $("#wtlCount").text("宸查��鏂欑敵璇�,鏈��鏂� " + data1.data[0]["鏈敓鎴�"]+" 鏉″崟鎹�");
+ //console.log(data1)
+ //layer.close(ajaxLoad);
+
+ } else {
+ //layer.close(ajaxLoad);
+ layer.alert(data1.code + data1.Message, { icon: 5 });
+ }
+ }, error: function () {
+ //layer.close(ajaxLoad);
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
+
+ //鐢熶骇璁㈠崟閫夊崟
+ function get_btnICMOBill() {
+ layer.open({
+ type: 2 //绫诲瀷
+ , skin: 'layui-layer-rim'//鍔犱笂杈规
+ , area: ['90%', '90%']//澶у皬
+ , title: '鐢熶骇璁㈠崟鍒楄〃'//鏍囬
+ , shift: 2//寮瑰嚭鍔ㄧ敾
+ , content: ['../../鐢熶骇绠$悊/鐢熶骇浠诲姟鍗�/Sc_ICMOBillList.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('璇烽�夋嫨鏁版嵁');
+ }
+ $("#HICMOBillNo").val(checkStatus.data[0].鍗曟嵁鍙�);//鐢熶骇璁㈠崟鍙�
+ layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ , btn2: function (index, layero) { }
+ })
+ }
+
+ //閲嶇疆杩囨护鏉′欢
+ function set_ClearQuery() {
+ $("#HSeOrderBillNo").val("");
+ $("#MaterialNumber").val("");
+ $("#MaterialName").val("");
+ $("#MaterialModel").val("");
+ $("#CPNumber").val("");
+ $("#CPName").val("");
+ $("#CPModel").val("");
+ $("#HICMOBillNo").val("");
+ sWhere = "";
+ }
+
+ //璇诲彇閰嶇疆鏂囦欢
+ function get_ReadConfigFile() {
+ //鑾峰彇鏈湴瀛樺偍鐨勬暟鎹�
+ var data = localStorage.getItem("dataJL");
+ if (data != null) {
+ var data2 = JSON.parse(data);
+ $("#HSeOrderBillNo").val(data2["HSeOrderBillNo"]);
+ $("#DepartmentID").val(data2["DepartmentID"]);
+ $("#DepartmentName").val(data2["DepartmentName"]);
+ $("#MaterialNumber").val(data2["MaterialNumber"]);
+ $("#MaterialName").val(data2["MaterialName"]);
+ $("#MaterialModel").val(data2["MaterialModel"]);
+ $("#CPNumber").val(data2["CPNumber"]);
+ $("#CPName").val(data2["CPName"]);
+ $("#CPModel").val(data2["CPModel"]);
+ $("#HICMOBillNo").val(data2["HICMOBillNo"]);
+ }
+ }
+
+ //瀛樺偍閰嶇疆鏂囦欢
+ function get_WriteConfigFile() {
+ //娓呯┖鏈湴瀛樺偍鐨勬暟鎹�
+ localStorage.removeItem("dataJL");
+ var data = {
+ HSeOrderBillNo: $("#HSeOrderBillNo").val()
+ , DepartmentID: $("#DepartmentID").val()
+ , DepartmentName: $("#DepartmentName").val()
+ , Organization: $("#Organization").val()
+ , MaterialNumber: $("#MaterialNumber").val()
+ , MaterialName: $("#MaterialName").val()
+ , MaterialModel: $("#MaterialModel").val()
+ , CPNumber: $("#CPNumber").val()
+ , CPName: $("#CPName").val()
+ , CPModel: $("#CPModel").val()
+ , HICMOBillNo: $("#HICMOBillNo").val()
+ }
+ //鏈湴瀛樺偍
+ localStorage.setItem("dataJL", JSON.stringify(data));
+ }
+
//#endregion
});
--
Gitblit v1.9.1