From b742f00aac8e1e1bb628232383c35e67f4a41e4e Mon Sep 17 00:00:00 2001
From: cwjbxqmz <1134865194@qq.com>
Date: 星期五, 26 一月 2024 15:21:28 +0800
Subject: [PATCH] 1
---
WebTM/views/模治具管理/模治具仓库管理/Sc_Add_MouldLifeChangeBillList.html | 147 +++++++++++++++++++++++-------------------------
1 files changed, 71 insertions(+), 76 deletions(-)
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\344\273\223\345\272\223\347\256\241\347\220\206/Sc_Add_MouldLifeChangeBillList.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\344\273\223\345\272\223\347\256\241\347\220\206/Sc_Add_MouldLifeChangeBillList.html"
index ac5d3c1..13b3597 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\344\273\223\345\272\223\347\256\241\347\220\206/Sc_Add_MouldLifeChangeBillList.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\344\273\223\345\272\223\347\256\241\347\220\206/Sc_Add_MouldLifeChangeBillList.html"
@@ -62,7 +62,7 @@
</div>
</div>
<div class="layui-inline">
- <label class="layui-form-label">璋冩暣浜�</label>
+ <label class="layui-form-label">璋冩暣浜�<label style="color:red"> * </label></label>
<div class="layui-input-inline">
<input type="text" name="HEmpName" id="HEmpName" class="layui-input" value="" style="float:left;width:150px;">
<input type="hidden" name="HEmpID" id="HEmpID" class="layui-input" value="" style="float:left;width:150px;">
@@ -74,7 +74,7 @@
</div>
<div class="layui-form-item">
<div class="layui-inline">
- <label class="layui-form-label">璐熻矗浜�</label>
+ <label class="layui-form-label">璐熻矗浜�<label style="color:red"> * </label></label>
<div class="layui-input-inline">
<input type="text" name="HMangerName" id="HMangerName" class="layui-input" value="" style="float:left;width:150px;">
<input type="hidden" name="HMangerID" id="HMangerID" class="layui-input" value="" style="float:left;width:150px;">
@@ -84,7 +84,7 @@
</div>
</div>
<div class="layui-inline">
- <label class="layui-form-label">閮ㄩ棬</label>
+ <label class="layui-form-label">閮ㄩ棬<label style="color:red"> * </label></label>
<div class="layui-input-inline">
<input type="text" name="HDeptName" id="HDeptName" class="layui-input" value="" style="float:left;width:150px;">
<input type="hidden" name="HDeptID" id="HDeptID" class="layui-input" value="" style="float:left;width:150px;">
@@ -145,7 +145,10 @@
<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>//鑾峰彇鍙傛暟
+ <script src="../../../layuiadmin/PubCustom.js"></script>
+ <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
+ <script>
+ //鑾峰彇鍙傛暟
function getUrlVars() {
var vars = [], hash;
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
@@ -196,32 +199,32 @@
, page: true //寮�鍚垎椤�
, cols: [[ //琛ㄥご
{ type: 'checkbox', fixed: 'left' }
- , { templet: '#xuhao', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe" ,width: 100}
- , { field: 'HMaterID', title: 'HMaterID', edit: 'text', width: 100, hide: true}
+ , { templet: '#xuhao', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe", width: 100 }
+ , { field: 'HMaterID', title: 'HMaterID', edit: 'text', width: 100, hide: true }
, { field: 'HMaterCode', title: '鍣ㄥ叿浠g爜', edit: 'text', event: 'HMaterCode', width: 100 }
- , { field: 'HMaterName', title: '鍣ㄥ叿鍚嶇О', edit: 'text', width: 100}
- , { field: 'HMaterSpec', title: '瑙勬牸鍨嬪彿', edit: 'text', width: 100 }
- , { field: 'HPropertyID', title: 'HPropertyID', edit: 'text', width: 100, hide: true}
+ , { field: 'HMaterName', title: '鍣ㄥ叿鍚嶇О', width: 100 }
+ , { field: 'HMaterSpec', title: '瑙勬牸鍨嬪彿', width: 100 }
+ , { field: 'HPropertyID', title: 'HPropertyID', edit: 'text', width: 100, hide: true }
, { field: 'HPropertyCode', title: '杈呭姪灞炴�т唬鐮�', edit: 'text', event: 'HPropertyCode', width: 100 }
- , { field: 'HPropertyName', title: '杈呭姪灞炴��', edit: 'text', width: 100 }
- , { field: 'HSecUnitID', title: 'HSecUnitID', edit: 'text', width: 100, hide: true}
+ , { field: 'HPropertyName', title: '杈呭姪灞炴��', width: 100 }
+ , { field: 'HSecUnitID', title: 'HSecUnitID', edit: 'text', width: 100, hide: true }
, { field: 'HSecUnitCode', title: '杈呭姪璁¢噺鍗曚綅浠g爜', edit: 'text', event: 'HSecUnitCode', width: 100 }
- , { field: 'HSecUnitName', title: '杈呭姪璁¢噺鍗曚綅', edit: 'text', width: 100 }
+ , { field: 'HSecUnitName', title: '杈呭姪璁¢噺鍗曚綅', width: 100 }
, { field: 'HSecUnitRate', title: '鎹㈢畻鐜�', edit: 'text', width: 100 }
- , { field: 'HUnitID', title: 'HUnitID', edit: 'text', width: 100, hide: true}
+ , { field: 'HUnitID', title: 'HUnitID', edit: 'text', width: 100, hide: true }
, { field: 'HUnitCode', title: '璁¢噺鍗曚綅浠g爜', edit: 'text', event: 'HUnitCode', width: 100 }
- , { field: 'HUnitName', title: '璁¢噺鍗曚綅', edit: 'text', width: 100 }
- , { field: 'HDesignLife', title: '璁捐瀵垮懡', edit: 'text', width: 100}
- , { field: 'HLeaveLife', title: '鍘熷墿浣欏鍛�', edit: 'text', width: 100}
- , { field: 'HNewLife', title: '鏂板墿浣欏鍛�', edit: 'text', width: 100 }
- , { field: 'HRemark', title: '琛ㄤ綋澶囨敞', edit: 'text', width: 100}
+ , { field: 'HUnitName', title: '璁¢噺鍗曚綅', width: 100 }
+ , { field: 'HDesignLife', title: '璁捐瀵垮懡', edit: 'text', width: 100 }
+ , { field: 'HLeaveLife', title: '鍘熷墿浣欏鍛�', edit: 'text', width: 100 }
+ , { field: 'HNewLeaveLife', title: '鏂板墿浣欏鍛�', edit: 'text', width: 100 }
+ , { field: 'HRemark', title: '琛ㄤ綋澶囨敞', edit: 'text', width: 100 }
]]
, limit: 500 //姣忛〉榛樿鏄剧ず鐨勬暟閲�
};
//鍒ゆ柇鏄惁鏂板
if (hID == null || hID == 0) {
//鍒濆鍔犺浇琛ㄦ牸{ "ID": 0, "HWasterReasonName": " ","HBadReasonID":0,"HEmpName": " ", "HSQProcName": " ","HProcID":0, "HZRProcName": " ", "HMRBChecker": " ", "HRemark": " ", "HPSProcName": " ", "HCloseMan": " " }
- option.data = [{ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HPropertyID": 0, "HPropertyCode": "", "HPropertyName": "", "HSecUnitID": 0, "HSecUnitCode": "", "HSecUnitName": "", "HSecUnitRate": 0, "HUnitID": 0,"HUnitCode":"", "HUnitName": "", "HDesignLife": 0, "HLeaveLife": 0, "HNewLife": 0,"HRemark":""}];
+ option.data = [{ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HPropertyID": 0, "HPropertyCode": "", "HPropertyName": "", "HSecUnitID": 0, "HSecUnitCode": "", "HSecUnitName": "", "HSecUnitRate": 0, "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HDesignLife": 0, "HLeaveLife": 0, "HNewLeaveLife": 0, "HRemark": "" }];
table.render(option);
}
else {
@@ -257,7 +260,7 @@
var checkStatus = table.checkStatus('mainTable')
, data = checkStatus.data;;
var AddRow = table.cache['mainTable'];
- var NewRow = { "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HPropertyID": 0, "HPropertyCode": "", "HPropertyName": "", "HSecUnitID": 0, "HSecUnitCode": "", "HSecUnitName": "", "HSecUnitRate": 0, "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HDesignLife": 0, "HLeaveLife": 0, "HNewLife": 0, "HRemark": "" };
+ var NewRow = { "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HPropertyID": 0, "HPropertyCode": "", "HPropertyName": "", "HSecUnitID": 0, "HSecUnitCode": "", "HSecUnitName": "", "HSecUnitRate": 0, "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HDesignLife": 0, "HLeaveLife": 0, "HNewLeaveLife": 0, "HRemark": "" };
switch (obj.event) {
case 'btn-AddLine':
//table.cache["mainTable"].push(AddRow[rows]);
@@ -305,7 +308,7 @@
}
});
}
-
+
$(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
if (event.key == "F7") {
if (obj.event === 'HMaterCode') //妯″叿淇℃伅
@@ -336,9 +339,10 @@
HMaterCode: checkStatus.data[0].HNumber,
HMaterName: checkStatus.data[0].HName,
HMaterSpec: checkStatus.data[0].HModel,
+ HLeaveLife: checkStatus.data[0].HLeaveLife,
+ HNewLeaveLife: checkStatus.data[0].HNewLife,
+ HDesignLife: checkStatus.data[0].HDesignLife, //璁捐瀵垮懡
- HDesignLife: 0, //璁捐瀵垮懡
-
});
layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
@@ -476,7 +480,7 @@
return false;
}
- })
+ })
});
@@ -485,7 +489,7 @@
function RoadBillMain(hID)//鍔犺浇琛ㄥご
{
- alert(hID);
+
//鏌ヨ妫�楠屾柟妗堝崟鏄惁瀛樺湪
$.ajax({
url: GetWEBURL() + "Sc_MouldLifeChangeBill/Sc_GetMouldLifeChangeBillListCheckDetai",
@@ -597,7 +601,7 @@
layer.open({
type: 2,
skin: 'layui-layer-rim', //鍔犱笂杈规
- title: '浠撳簱鍒楄〃',
+ title: '璐熻矗浜哄垪琛�',
closeBtn: 1,
shift: 2,
area: ['80%', '80%'],
@@ -669,8 +673,14 @@
form.on('submit(Exit)', function (data) {//
- var index = parent.layer.getFrameIndex(window.name); //鍏堝緱鍒板綋鍓峣frame灞傜殑绱㈠紩
- parent.layer.close(index); //鍐嶆墽琛屽叧闂�
+ if (params[params[0]] == undefined) {
+ //鍏抽棴椤电
+ Pub_Close(2);
+ }
+ else {
+ //鍏抽棴寮圭獥
+ Pub_Close(1);
+ }
});
@@ -700,37 +710,39 @@
data.field.HMaker = sessionStorage["HUserName"];//鍒跺崟浜�
var sMainStr = JSON.stringify(data.field);
var sSubStr = JSON.stringify(table.cache['mainTable']);
- var sMainSub = sMainStr + ';' + sSubStr;
+ var sMainSub = sMainStr + ';' + sSubStr + ";" + sessionStorage["HUserName"];
+ if (AllowLoadData(sSubStr)) {
+ $.ajax(
+ {
+ type: "POST",
+ url: GetWEBURL() + "/Sc_MouldLifeChangeBill/SaveGetMouldLifeChangeBillList", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ async: true,
+ data: { "msg": sMainSub },
+ dataType: "json",
+ success: function (data) {
+ if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ layer.msg(data.Message, { time: 1 * 1000, icon: 1 }, function () {
+ $('#add-btn').addClass("layui-btn-disabled").attr("disabled", true);
+ var index = parent.layer.getFrameIndex(window.name); //鍏堝緱鍒板綋鍓峣frame灞傜殑绱㈠紩
+ parent.layer.close(index); //鍐嶆墽琛屽叧闂�
+ });
+ }
+ else {
- $.ajax(
- {
- type: "POST",
- url: GetWEBURL() + "/Sc_MouldLifeChangeBill/SaveGetMouldLifeChangeBillList", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
- async: true,
- data: { "msg": sMainSub },
- dataType: "json",
- success: function (data) {
- if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
- layer.msg(data.Message, { time: 1 * 1000, icon: 1 }, function () {
- $('#add-btn').addClass("layui-btn-disabled").attr("disabled", true);
- var index = parent.layer.getFrameIndex(window.name); //鍏堝緱鍒板綋鍓峣frame灞傜殑绱㈠紩
- parent.layer.close(index); //鍐嶆墽琛屽叧闂� 聽 聽 聽 聽 聽聽 聽聽聽 聽
- });
+ f_alert(data.Message);
+ console.log("Reason" + sMainStr + "sub:" + JSON.stringify(layui.table.cache.mainTable));
+ }
+ layer.closeAll("loading");
+ },
+ error: function (err) {
+
+ f_alert("閿欒:" + err);
+ console.log("Reason" + sMainStr);
}
- else {
+ });
+ }
- f_alert(data.Message);
- console.log("Reason" + sMainStr + "sub:" + JSON.stringify(layui.table.cache.mainTable));
- }
- layer.closeAll("loading");
- },
- error: function (err) {
-
- f_alert("閿欒:" + err);
- console.log("Reason" + sMainStr);
- }
- });
});
function f_alert(sMsg) {
layer.alert(sMsg, { icon: 5 });
@@ -806,26 +818,18 @@
//$("#HItemID").val(obj[0].HItemID);
}
function AllowLoadData(sSubStr) { //闈炵┖楠岃瘉
- //if ($("#HSourceBillNo").val() == '') {
- // layer.msg("璇峰厛鎵簮鍗�!", { icon: 5 });
- // return false;
- //}
if ($("#HDeptName").val() == '') {
layer.msg("閮ㄩ棬娌℃湁閫夋嫨", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
return false;
}
- if ($("#HSecManager").val() == '') {
- layer.msg("楠屾敹浜烘病鏈夐�夋嫨", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ if ($("#HEmpID").val() == '') {
+ layer.msg("璋冩暣浜烘病鏈夐�夋嫨", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
return false;
}
- if ($("#HKeeper").val() == '') {
- layer.msg("淇濈浜烘病鏈夐�夋嫨", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ if ($("#HMangerID").val() == '') {
+ layer.msg("璐熻矗浜烘病鏈夐�夋嫨", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
return false;
}
- //if ($("#HWHNAME").val() == '') {
- // layer.msg("浠撳簱娌℃湁閫夋嫨!", { icon: 5 });
- // return false;
- //}
if ($("#HBillNo").val() == '') {
layer.msg("閿欒鐨勫崟鎹彿", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
return false;
@@ -839,15 +843,6 @@
return false;
}
if (!typeof (sSubStr) == "undefined") {
- //for (var i = 0; i <= sSubStr.length - 1; i++) { //鍒ゆ柇鎵爜鏁伴噺涓嶈兘澶т簬搴旀敹鏁伴噺
- // if (parseFloat(sSubStr[i].HQtyMust) > 0) {
- // if (parseFloat(sSubStr[i].HQty) > parseFloat(sSubStr[i].HQtyMust))
- // {
- // layer.msg("鏁伴噺涓嶈兘澶т簬搴旀敹鏁伴噺", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
- // return false;
- // }
- // }
- //}
for (var i = 0; i <= sSubStr.length - 1; i++) { //鍒ゆ柇鎵爜鏁伴噺涓嶈兘涓�0
if (parseFloat(sSubStr[i].HQty) > 0) {
s = 1;
--
Gitblit v1.9.1