From 7ae052d141e69fe9e19392172fc2960134a03232 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期一, 01 十二月 2025 15:54:52 +0800
Subject: [PATCH] 1.采购入库单列表、直接调拨单列表、其他出库单列表、生产入库列表、销售出库单列表:layui中开发 查看包装明细
---
WebTM/views/质量管理/PNL检验信息/QC_CheckNote_PNL_TempEdit.html | 198 ++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 185 insertions(+), 13 deletions(-)
diff --git "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/PNL\346\243\200\351\252\214\344\277\241\346\201\257/QC_CheckNote_PNL_TempEdit.html" "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/PNL\346\243\200\351\252\214\344\277\241\346\201\257/QC_CheckNote_PNL_TempEdit.html"
index baa62cf..987905b 100644
--- "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/PNL\346\243\200\351\252\214\344\277\241\346\201\257/QC_CheckNote_PNL_TempEdit.html"
+++ "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/PNL\346\243\200\351\252\214\344\277\241\346\201\257/QC_CheckNote_PNL_TempEdit.html"
@@ -97,12 +97,11 @@
<div class="layui-inline">
<label class="layui-form-label">妫�楠屽伐搴�<label style="color:red"> * </label></label>
<div class="layui-input-inline">
- <select name="HCheckProc" lay-filter="HCheckProc"
- id="HCheckProc">
- <option value="鐐.VRS鍐呭眰" selected="selected">鐐.VRS鍐呭眰
- </option>
+ <select name="HCheckProc" lay-filter="HCheckProc" id="HCheckProc">
+ <option value="鐐.VRS鍐呭眰" selected="selected">鐐.VRS鍐呭眰</option>
<option value="鐐.VRS澶栧眰">鐐.VRS澶栧眰</option>
<option value="AVI">AVI</option>
+ <option value="MRB">MRB</option>
<option value="鐢垫祴">鐢垫祴</option>
</select>
</div>
@@ -112,10 +111,15 @@
<label class="layui-form-label">姝e弽闈�<label style="color:red"> * </label></label>
<div class="layui-input-inline">
<select name="HPageIndex" lay-filter="HPageIndex"
- id="HPageIndex">
- <option value="姝i潰" data-value="1" selected="selected">姝i潰
- </option>
- <option value="鍙嶉潰" data-value="0">鍙嶉潰</option>
+ id="HPageIndex">
+ <option value="L4" data-value="L4" selected="selected">L4</option>
+ <option value="L5" data-value="L5">L5</option>
+ <option value="L3" data-value="L3">L3</option>
+ <option value="L6" data-value="L6">L6</option>
+ <option value="L2" data-value="L2">L2</option>
+ <option value="L7" data-value="L7">L7</option>
+ <option value="LT" data-value="LT">LT</option>
+ <option value="LB" data-value="LT">LB</option>
</select>
</div>
</div>
@@ -125,8 +129,8 @@
<div class="layui-inline">
<label class="layui-form-label">涓嶈壇鍘熷洜:</label>
<div class="layui-input-inline">
- <textarea name="HPNLPosition_y" id="HPNLPosition_y"
- class="layui-textarea"></textarea>
+ <select name="HBadReason" lay-filter="HBadReason" id="HBadReason">
+ </select>
</div>
</div>
</div>
@@ -211,6 +215,7 @@
var HBarCode_PNL = params[params[3]]; //PNL鏉$爜缂栧彿
var HSetNo = params[params[4]]; //set鍙�
var HPCSNo = params[params[5]]; //PCS鍙�
+ var HBadReason_Params = decodeURIComponent(params[params[6]]) ; //涓嶈壇鍘熷洜
}
layui.config({
@@ -241,6 +246,7 @@
//#region 杩涘叆椤甸潰鍗冲姞杞�
//鍒濆鍖栫晫闈�
+ setInitSelect_BadReason();
set_ClearBill();
//鍒ゆ柇鎿嶄綔绫诲瀷
if (OperationType == 1) {//鏃犳簮鍗�
@@ -255,7 +261,8 @@
}
else if (OperationType == 3) {//缂栬緫
roadBillMain();
- } else if (OperationType == 4) {//鐩存柟鍥炬柊澧�
+ }
+ else if (OperationType == 4) {//鐩存柟鍥炬柊澧�
set_AddFNew();
$("#HBarCode").val(HBarCode_PNL);
$("#HSetNo").val(HSetNo);
@@ -264,11 +271,55 @@
document.getElementById("HBarCode").setAttribute("disabled", "disabled");
document.getElementById("HSetNo").setAttribute("disabled", "disabled");
document.getElementById("HPCSNo").setAttribute("disabled", "disabled");
- } else if (OperationType == 5) {//鐩存柟鍥剧紪杈�
+ }
+ else if (OperationType == 5) {//鐩存柟鍥剧紪杈�
roadBillMain();
document.getElementById("HBarCode").setAttribute("disabled", "disabled");
document.getElementById("HSetNo").setAttribute("disabled", "disabled");
document.getElementById("HPCSNo").setAttribute("disabled", "disabled");
+ }
+ else if (OperationType == 6) {//鐩存柟鍥�-avi 鏂板
+ set_AddFNew();
+ $("#HBarCode").val(HBarCode_PNL);
+ $("#HSetNo").val(HSetNo);
+ $("#HPCSNo").val(HPCSNo);
+ $("#HCheckProc").val("AVI");
+
+ document.getElementById("HBarCode").setAttribute("disabled", "disabled");
+ document.getElementById("HSetNo").setAttribute("disabled", "disabled");
+ document.getElementById("HPCSNo").setAttribute("disabled", "disabled");
+ document.getElementById("HCheckProc").setAttribute("disabled", "disabled");
+ form.render('select');
+ }
+ else if (OperationType == 7) {//鐩存柟鍥�-avi 鍙冲嚮鏂板
+ set_AddFNew();
+ $("#HBarCode").val(HBarCode_PNL);
+ $("#HSetNo").val(HSetNo);
+ $("#HPCSNo").val(HPCSNo);
+ $("#HCheckProc").val("AVI");
+ $("#HBadReason").val(HBadReason_Params);
+ document.getElementById("HBarCode").setAttribute("disabled", "disabled");
+ document.getElementById("HSetNo").setAttribute("disabled", "disabled");
+ document.getElementById("HPCSNo").setAttribute("disabled", "disabled");
+ document.getElementById("HCheckProc").setAttribute("disabled", "disabled");
+ form.render('select');
+
+ saver();
+ }
+ else if (OperationType == 8) {//鐩存柟鍥�-avi 鍙冲嚮鏂板
+ set_AddFNew();
+ $("#HBarCode").val(HBarCode_PNL);
+ $("#HSetNo").val(HSetNo);
+ $("#HPCSNo").val(HPCSNo);
+ $("#HCheckProc").val("MRB");
+ $("#HBadReason").val(HBadReason_Params);
+ document.getElementById("HBarCode").setAttribute("disabled", "disabled");
+ document.getElementById("HSetNo").setAttribute("disabled", "disabled");
+ document.getElementById("HPCSNo").setAttribute("disabled", "disabled");
+ document.getElementById("HCheckProc").setAttribute("disabled", "disabled");
+ form.render('select');
+
+ saver();
}
else {
layer.alert("鏈煡鎿嶄綔绫诲瀷锛�", { icon: 5 });
@@ -289,8 +340,13 @@
let url = GetWEBURL()
if (OperationType == 3 || OperationType == 5) {
url += "/QC_CheckNote_PNL_TempController/EditBill"
- } else if (OperationType == 1 || OperationType == 2 || OperationType == 4) {
+ } else if (OperationType == 1 || OperationType == 2 || OperationType == 4 || OperationType == 6 || OperationType == 7 || OperationType == 8) {
url += "/QC_CheckNote_PNL_TempController/AddBill"
+
+ if (!judgeRepeatDataByPNLAndPCS()) {
+ layer.msg("璇CS宸茬粡瀛樺湪涓嶈壇璁板綍锛岀姝㈤噸澶嶆爣璁帮紒锛�", { icon: 5 });
+ return;
+ }
}
$.ajax(
{
@@ -386,6 +442,34 @@
$("#HMaker").val(sessionStorage["HUserName"]);; //鏍规嵁鐧诲綍鐢ㄦ埛甯﹀嚭鍒涘缓浜�
$("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd"));
}
+
+ //#region 涓嶈壇鍘熷洜涓嬫媺鍒楄〃鍒濆鍖�
+ function setInitSelect_BadReason() {
+ //鑾峰彇鐧诲綍椤电粍缁囧垪
+ var ModRightNameCheck = "";
+ var sql = "select * from Gy_BadReason where HCheckEmp <> '' and ISNULL(HStopEmp,'') = '' ";
+ $.ajax({
+ url: GetWEBURL() + '/CommonModel/searchMethod',
+ async: false,
+ type: "GET",
+ data: { "sql": sql, "user": sessionStorage["HUserName"], "ModRightNameCheck": ModRightNameCheck },
+ success: function (result) {
+ if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ var data = result.data;
+
+ var Organization = "";
+ for (var i = 0; i < data.length; i++) {
+ Organization += '<option style="color:blue;" value="' + data[i].HName + '">' + data[i].HName + '</option>';
+ }
+ $("#HBadReason").append(Organization);
+ form.render('select');
+ }
+ layer.closeAll("loading");
+ }
+ });
+ }
+ //#endregion
+
//鏃犳簮鍗曟柊澧�
function set_AddFNew() {
$("#HItemID").val(0)
@@ -447,12 +531,100 @@
});
}
+ //#region 淇濆瓨鏂规硶
+ function saver() {
+ //鑾峰彇琛ㄥ崟鏁版嵁
+ var data = {};
+ var form = document.getElementById('form');
+ for (var i = 0; i < form.elements.length; i++) {
+ var element = form.elements[i];
+ if (element.id) { // 纭繚鍏冪礌鏈塶ame灞炴��
+ data[element.id] = element.value;
+ }
+ }
+ data['HPageIndex'] = $("#HPageIndex option:selected").data('value');
+
+
+ var sMainStr = JSON.stringify(data) + ';' + sessionStorage["HUserName"]
+ let url = GetWEBURL()
+ if (OperationType == 3 || OperationType == 5) {
+ url += "/QC_CheckNote_PNL_TempController/EditBill"
+ } else if (OperationType == 1 || OperationType == 2 || OperationType == 4 || OperationType == 6 || OperationType == 7 || OperationType == 8) {
+ url += "/QC_CheckNote_PNL_TempController/AddBill"
+ }
+ $.ajax({
+ type: "POST",
+ url: url, //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ async: false,
+ data: { "oMain": sMainStr },
+ dataType: "json",
+ success: function (data) {
+ if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ layer.msg(data.Message, { icon: 1 });
+ $('#add-btn').addClass("layui-btn-disabled").attr("disabled", true);
+ }
+ else {
+ f_alert(data.Message);
+ console.log("Reason" + sMainStr);
+ }
+ layer.closeAll("loading");
+ },
+ error: function (err) {
+ f_alert("閿欒:" + err);
+ console.log("Reason" + sMainStr);
+ }
+ });
+
+ if (OperationType == 7 || OperationType == 8) {
+ if (linterid == undefined) {
+ //鍏抽棴椤电
+ Pub_Close(2);
+ }
+ else {
+ //鍏抽棴椤电
+ Pub_Close(1);
+ }
+ }
+ }
+ //#endregion
+
//
function f_alert(sMsg) {
layer.alert(sMsg, { icon: 5 });
}
+
+ //#region 鍒ゆ柇璇NL涓嬬殑璇CS鏄惁宸茬粡瀛樺湪涓嶈壇璁板綍銆傝嫢瀛樺湪锛屽垯涓嶅厑璁哥户缁敓鎴愩��
+ function judgeRepeatDataByPNLAndPCS() {
+ var flag = true;
+
+ var HBarCode_Temp = $("#HBarCode").val();
+ var HPCSNo_Temp = $("#HPCSNo").val();
+
+ var sql = "select HBarCode from QC_CheckNote_PNL_Temp where HBarCode = '" + HBarCode_Temp + "' and HPCSNo = '" + HPCSNo_Temp + "' ";
+ sql += " union select HBarCode from QC_CheckNote_PNL_His where HBarCode = '" + HBarCode_Temp + "' and HPCSNo = '" + HPCSNo_Temp + "' ";
+ var ModRightNameCheck = "";
+ $.ajax({
+ url: GetWEBURL() + '/CommonModel/searchMethod',
+ async: false,
+ type: "GET",
+ data: { "sql": sql, "user": sessionStorage["HUserName"], "ModRightNameCheck": ModRightNameCheck },
+ success: function (data1) {
+ if (data1.count == 1) {
+ if (data1.data.length > 0) {
+ flag = false;
+ }
+ } else {
+ flag = false;
+ }
+ }, error: function (e) {
+ flag = false;
+ }
+ });
+ return flag;
+ }
+ //#endregion
});
//#endregion
--
Gitblit v1.9.1