From fc69a1e9655df3e8a01dc36ea2742c99f4a651ed Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期三, 17 一月 2024 13:22:08 +0800
Subject: [PATCH] 特批申请单:数据校验 销售订单:维护页面增加字段 销售出库关联数量、销售出库未关联数量、生产关联数量、生产未关联数量
---
WebTM/views/生产管理/生产任务单/Sc_ICMOBillEdit_NoTable.html | 128 +++++++++++++++++++++++++++++++++++++++++-
1 files changed, 125 insertions(+), 3 deletions(-)
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillEdit_NoTable.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillEdit_NoTable.html"
index ff05e93..bde7ce5 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillEdit_NoTable.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillEdit_NoTable.html"
@@ -422,6 +422,18 @@
</div>
</div>
</div>
+
+ <!--闅愯棌瀛楁-->
+ <div class="layui-row" style="display:none;">
+ <div class="layui-inline">
+ <div class="layui-input-block" style="margin-left: 77px;">
+ <input type="hidden" name="HSourceInterID" id="HSourceInterID" lay-verify="HSourceInterID" value="0">
+ <input type="hidden" name="HSourceEntryID" id="HSourceEntryID" lay-verify="HSourceEntryID" value="0">
+ <input type="hidden" name="HSourceBillNo" id="HSourceBillNo" lay-verify="HSourceBillNo" value="">
+ <input type="hidden" name="HSourceBillType" id="HSourceBillType" lay-verify="HSourceBillType" value="">
+ </div>
+ </div>
+ </div>
</div>
</div>
</div>
@@ -563,6 +575,26 @@
//淇濆瓨鎻愪氦
form.on('submit(btnSave)', function (data) {//鎻愪氦
+ //#region 鍒ゆ柇婧愬崟鐘舵��
+ var HSourceBillData = "";
+ var HSourceBillData = getSourceBillStatus_SeOrderBill(); //鑾峰彇婧愬崟鏁版嵁
+ if (HSourceBillData != "none") {
+ if (HSourceBillData.length == 0) {
+ if ($("#HSourceInterID").val() != 0) {
+ layer.alert("淇濆瓨澶辫触!鏈煡璇㈠埌婧愬崟鍗曟嵁!", { icon: 5 });
+ return;
+ }
+ } else if (HSourceBillData[0]["鐘舵��"] != "宸插鏍�") {
+ layer.alert("淇濆瓨澶辫触!婧愬崟鍗曟嵁鐘舵�佹湭涓�'宸插鏍�'鐘舵��!", { icon: 5 });
+ return;
+ }
+ } else {
+ return;
+ }
+ //#endregion
+
+
+
if (AllowLoadData(data)) {
set_AddNew(data);
}
@@ -667,6 +699,11 @@
$("#HSeOrderBillNo").val(checkStatus.data[0].鍗曟嵁鍙�);
$("#HSeOrderEntryID").val(checkStatus.data[0].hsubid);
+ $("#HSourceInterID").val(checkStatus.data[0].hmainid);
+ $("#HSourceEntryID").val(checkStatus.data[0].hsubid);
+ $("#HSourceBillNo").val(checkStatus.data[0].鍗曟嵁鍙�);
+ $("#HSourceBillType").val("1401");
+
layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
}
, btn2: function (index, layero) { }
@@ -707,7 +744,7 @@
, area: ['90%', '90%']//澶у皬
, title: '瀹㈡埛'//鏍囬
, shift: 2//寮瑰嚭鍔ㄧ敾
- , content: ['../../鍩虹璧勬枡/閿�鍞熀纭�璧勬枡/Gy_Customer.html', 'yes']
+ , content: ['../../BaseSet/鍩虹璧勬枡/Gy_CustomerList.html', 'yes']
, btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰
@@ -716,8 +753,10 @@
return layer.msg('璇烽�夋嫨鏁版嵁');
}
//鑾峰彇鏁版嵁
- $("#HCusID").val(checkStatus.data[0].HItemID);
- $("#HCusName").val(checkStatus.data[0].瀹㈡埛鍚嶇О);
+ //$("#HCusID").val(checkStatus.data[0].HItemID);
+ //$("#HCusName").val(checkStatus.data[0].瀹㈡埛鍚嶇О);
+
+ getCustomerByCusID(checkStatus.data[0].HItemID);
layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
}
@@ -945,6 +984,12 @@
"HSeOrderBillNo": data.鍗曟嵁鍙�
, "HSeOrderInterID": data.hmainid
, "HSeOrderEntryID": data.hsubid
+
+ , "HSourceInterID": data.hmainid
+ , "HSourceEntryID": data.hsubid
+ , "HSourceBillNo": data.鍗曟嵁鍙�
+ , "HSourceBillType": "1401"
+
, "HEmpID": data.HEmpID
, "HEmpName": data.涓氬姟鍛�
, "HCusID": data.HCusID
@@ -1061,6 +1106,12 @@
, "HSeOrderBillNo": d.data[0].婧愬崟鍗曞彿
, "HSeOrderInterID": d.data[0].婧愬崟涓诲唴鐮�
, "HSeOrderEntryID": d.data[0].婧愬崟瀛愬唴鐮�
+
+ , "HSourceInterID": d.data[0].HSourceInterID
+ , "HSourceEntryID": d.data[0].HSourceEntryID
+ , "HSourceBillNo": d.data[0].HSourceBillNo
+ , "HSourceBillType": d.data[0].HSourceBillType
+
, "HEmpID": d.data[0].HEmpID
, "HEmpName": d.data[0].涓氬姟鍛�
, "HCusID": d.data[0].HEntryCusID
@@ -1338,6 +1389,11 @@
return false;
}
+ if ($("#HCusID").val() == "0" || $("#HCusName").val() == "") {
+ layer.msg("瀹㈡埛涓嶈兘涓虹┖!");
+ return false;
+ }
+
if ($("#HMaterNumber").val() == "") {
layer.msg("鐗╂枡缂栫爜娌℃湁閫夋嫨");
return false;
@@ -1418,10 +1474,76 @@
return vars;
}
+
+ //#region 鑾峰彇婧愬崟-閿�鍞鍗曞崟鎹姸鎬�
+ function getSourceBillStatus_SeOrderBill() {
+ var HSourceBillData = "none";
+ var sWhere = " and hmainid = " + $("#HSourceInterID").val();
+ $.ajax({
+ url: GetWEBURL() + '/Xs_SeOrderBill/list',
+ async: false,
+ type: "GET",
+ data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+ success: function (data1) {
+ if (data1.count == 1) {
+ HSourceBillData = data1.data;
+ } else {
+ layer.alert(data1.code + "婧愬崟鍗曟嵁鐘舵�佸垽鏂け璐ワ紒", { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ return HSourceBillData;
+ }
+ //#endregion
//#endregion
});
+ function GetHSupValue(obj) //杩斿洖瀹㈡埛
+ {
+ //$("#HCusName").val(obj[0].HName);
+ //$("#HCusID").val(obj[0].HItemID);
+ //鏍规嵁瀹㈡埛鑾峰彇鐩稿叧淇℃伅
+ getCustomerByCusID(obj[0].HItemID);
+ }
+
+ //#region 鏍规嵁瀹㈡埛鑾峰彇甯佸埆銆佹眹鐜囥�佺粨绠楁柟寮忋�佸鎴蜂俊鐢ㄩ搴︺�佽仈绯讳汉銆佽仈绯荤數璇�
+ function getCustomerByCusID(HCusID) {
+ $.ajax({
+ url: GetWEBURL() + "/Xs_SeOrderBill/getCustomerByCusID",
+ async: false,
+ type: "GET",
+ data: {
+ "HCusID": HCusID
+ },
+ success: function (result) {
+ if (result.code == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ var data = result.data[0];
+
+ $("#HCusID").val(data.HCusID);
+ $("#HCusName").val(data.HCusName);
+ //$("#HCurID").val(data.HCurID);
+ //$("#HCurName").val(data.HCurName);
+ //$("#HExRate").val(data.HExRate);
+ //$("#HSSID").val(data.HSSID);
+ //$("#HSSName").val(data.HSSName);
+ //$("#HCreditRating_Now").val(data.HCreditRating_Now);
+ //$("#HLinkMan").val(data.HLinkMan);
+ //$("#HLinkPhone").val(data.HLinkPhone);
+
+ //subHTaxRate = data.HTaxRate;
+
+ } else {
+ layer.alert(result.msg, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+ }
+ }, error: function () {
+ layer.alert("鍙戠敓閿欒!", { icon: 5 });
+ }
+ });
+ }
+ //#endregion
</script>
</body>
--
Gitblit v1.9.1