From d27cd18610ef82671bc57151e86158d16877b5a3 Mon Sep 17 00:00:00 2001
From: cdk <2441919651@qq.com>
Date: 星期一, 16 六月 2025 13:59:36 +0800
Subject: [PATCH] 其他出库条码不出库问题修改,采购退货字段调整
---
js/CangKuManage_js/CGTH.js | 192 ++++++++++++++++++++++++-----------------------
1 files changed, 99 insertions(+), 93 deletions(-)
diff --git a/js/CangKuManage_js/CGTH.js b/js/CangKuManage_js/CGTH.js
index 3905a03..4e9fd34 100644
--- a/js/CangKuManage_js/CGTH.js
+++ b/js/CangKuManage_js/CGTH.js
@@ -222,8 +222,7 @@
// }
//var user_id = "admin";
$.ajax({
- //url: app.API_URL_HEADER + "/WARBAB/GetBarInfo_CGTH",
- url: app.API_URL_HEADER + "/WARBAB/GetErpInventoryTable",
+ url: app.API_URL_HEADER + "/WARBAB/GetBarInfo_CGTH",
data: {
DBNO:$("#QTNO").val(),
DAB001: $("#DAB001").val(),
@@ -247,13 +246,14 @@
$("#DAB002").val(data.data.DAB020);
$("#DAB003").val(data.data.txtSL);
$("#DAB004").val(data.data.FLSL);
+ $("#DAB005").val(data.data.FLSL);
//mui.toast("鎵弿鎴愬姛!");
//濡傛灉鏉$爜鏁伴噺澶т簬鍙戞枡鏁伴噺
if (data.data.txtSL > data.data.FLSL)
{
- mui("#DAB004")[0].focus();
- alert("鏉$爜鏁伴噺" +data.data.txtSL+"澶т簬閫�璐ф暟閲�"+data.data.FLSL+"锛岄��璐уけ璐�");
+ mui("#DAB005")[0].focus();
+ //alert("鏉$爜鏁伴噺" +data.data.txtSL+"澶т簬閫�璐ф暟閲�"+data.data.FLSL+"锛岄��璐уけ璐�");
}
else
{
@@ -274,116 +274,122 @@
}
};
- // function Is_PrintSplit() {
- // if (event.keyCode == 13) {
- // var txtSLValue = parseFloat($("#DAB003").val());
- // var FLSLValue = parseFloat($("#DAB004").val());
+ function Is_PrintSplit() {
+ if (event.keyCode == 13) {
+ var txtSLValue = parseFloat($("#DAB003").val());
+ var THValue = parseFloat($("#DAB004").val());
+ var FLSLValue = parseFloat($("#DAB005").val());
+ if(THValue < FLSLValue){
+ mui("#DAB005")[0].focus();
+ alert("瀹為��鏁伴噺" +FLSLValue+"澶т簬闇�閫�鏁伴噺"+THValue+"锛岄��璐уけ璐�");
+ }
- // // 姣旇緝鏁板�煎ぇ灏�
- // if (txtSLValue <= FLSLValue) {
- // // txtSL鐨勫�煎皬浜嶧LSL鐨勫��
- // console.log("鐢熸垚棰嗘枡鍗�");
- // // CreateSCLLD();
- // // GETGDINFO_SX();
- // } else if (txtSLValue > FLSLValue) {
- // // txtSL鐨勫�煎ぇ浜嶧LSL鐨勫��
- // //console.log("纭鏄惁鎷嗗垎棰嗘枡");
- // mui.confirm('鏄惁鎷嗗垎璇ユ潯鐮侊紵', '璇风‘璁�', ['纭', '鍙栨秷'], function(e) {
- // if (e.index === 0) {
- // console.log("鏉$爜鎷嗗垎");
- // GetZJDBCK_PrintSplit();
- // //GETGDINFO_SX();
- // console.log("鍒锋柊鎴愬姛锛�");
- // mui("#DAB001")[0].focus();
- // $("#DAB001").val("");//鍏堟竻绌轰竴涓嬫暟鎹簮
- // } else {
- // // 鐢ㄦ埛鐐瑰嚮浜嗗彇娑堟寜閽�
- // mui("#DAB004")[0].focus();
- // }
- // });
- // }
- // }
- // };
+
+ // 姣旇緝鏁板�煎ぇ灏�
+ if (txtSLValue <= FLSLValue) {
+ // txtSL鐨勫�煎皬浜嶧LSL鐨勫��
+ console.log("鐢熸垚棰嗘枡鍗�");
+ // CreateSCLLD();
+ // GETGDINFO_SX();
+ } else if (txtSLValue > FLSLValue) {
+ // txtSL鐨勫�煎ぇ浜嶧LSL鐨勫��
+ //console.log("纭鏄惁鎷嗗垎棰嗘枡");
+ mui.confirm('鏄惁鎷嗗垎璇ユ潯鐮侊紵', '璇风‘璁�', ['纭', '鍙栨秷'], function(e) {
+ if (e.index === 0) {
+ console.log("鏉$爜鎷嗗垎");
+ GetZJDBCK_PrintSplit();
+ //GETGDINFO_SX();
+ console.log("鍒锋柊鎴愬姛锛�");
+ mui("#DAB001")[0].focus();
+ $("#DAB001").val("");//鍏堟竻绌轰竴涓嬫暟鎹簮
+ } else {
+ // 鐢ㄦ埛鐐瑰嚮浜嗗彇娑堟寜閽�
+ mui("#DAB004")[0].focus();
+ }
+ });
+ }
+ }
+ };
-// function GetZJDBCK_PrintSplit() {
-// console.log("鏉$爜鎷嗗垎");
-// //濡傛灉鏈緭鍏ユ潯鐮侊紝璺冲嚭鏂规硶
-// if($("#DAB001").val() == "") {
-// return;
-// }
+ function GetZJDBCK_PrintSplit() {
+ console.log("鏉$爜鎷嗗垎");
+ //濡傛灉鏈緭鍏ユ潯鐮侊紝璺冲嚭鏂规硶
+ if($("#DAB001").val() == "") {
+ return;
+ }
-// //鐢ㄦ埛ID
-// var currentSession = app.loadconfig(app.CONFIG_CURRENT_SESSION);
-// //var user_id = currentSession.user_id;
-// // if($("#txtBillNo").val() == ""){
-// // var user_id =currentSession.user_id;
-// // }else{
-// // var user_id ="ADMIN";
-// // }
+ //鐢ㄦ埛ID
+ var currentSession = app.loadconfig(app.CONFIG_CURRENT_SESSION);
+ //var user_id = currentSession.user_id;
+ // if($("#txtBillNo").val() == ""){
+ // var user_id =currentSession.user_id;
+ // }else{
+ // var user_id ="ADMIN";
+ // }
-// //var user_id ="ADMIN";
+ //var user_id ="ADMIN";
-// var user_id = currentSession.user_id;
-// //var user_id ="ADMIN";
-// $.ajax({
-// url: app.API_URL_HEADER + "/XKYDHD/GetZJDBCK_PrintSplit",
+var user_id = currentSession.user_id;
+//var user_id ="ADMIN";
+ $.ajax({
+ url: app.API_URL_HEADER + "/WARBAB/GetCGTH_PrintSplit",
-// data: {
+ data: {
-// DBNO:$("#QTNO").val(),
-// DAB001: $("#DAB001").val(),
-// logID: user_id, //user_id,//Admin //鍏堝啓姝伙紝渚夸簬璋冭瘯
-// SL:$("#DAB004").val(),
+ DBNO:$("#QTNO").val(),
+ DAB001: $("#DAB001").val(),
+ logID: user_id, //user_id,//Admin //鍏堝啓姝伙紝渚夸簬璋冭瘯
+ SL:$("#DAB004").val(),
-// },
-// DataType: "json",
-// type: "post",
-// async: false,
-// //timeout: 15000,
-// success: function(data) {
-// console.log(JSON.stringify(data));
-// if(data.status != 0) {
-// playerAudio("NG");
-// mui.alert(data.message,"","",function(){
-// mui("#DAB001")[0].focus();
-// $("#DAB001").val("");
-// });
-// return;
-// } else {
+ },
+ DataType: "json",
+ type: "post",
+ async: false,
+ //timeout: 15000,
+ success: function(data) {
+ console.log(JSON.stringify(data));
+ if(data.status != 0) {
+ playerAudio("NG");
+ mui.alert(data.message,"","",function(){
+ mui("#DAB001")[0].focus();
+ $("#DAB001").val("");
+ });
+ return;
+ } else {
-// //console.log(data.data.BARID);
-// console.log("寮�濮嬫墦鍗帮紒锛�");
+ //console.log(data.data.BARID);
+ console.log("寮�濮嬫墦鍗帮紒锛�");
-// var str = data.data.BARID.toString();
-// console.log(str); // 灏咮ARID杞崲涓哄瓧绗︿覆骞舵墦鍗拌緭鍑�
+ var str = data.data.BARID.toString();
+ console.log(str); // 灏咮ARID杞崲涓哄瓧绗︿覆骞舵墦鍗拌緭鍑�
-// printByIds(str);
-// console.log("鎵撳嵃鎴愬姛锛侊紒");
+ printByIds(str);
+ console.log("鎵撳嵃鎴愬姛锛侊紒");
-// $("#DAB001").val("");
-// $("#DAB002").val("");
-// $("#DAB003").val("");
-// $("#DAB004").val("");
-// mui.toast("鎷嗗垎鍑哄簱鎴愬姛!");
-// mui("#DAB001")[0].focus();
+ $("#DAB001").val("");
+ $("#DAB002").val("");
+ $("#DAB003").val("");
+ $("#DAB004").val("");
+mui.toast("鎷嗗垎鍑哄簱鎴愬姛!");
+ mui("#DAB001")[0].focus();
-// playerAudio("OK");
-// GetInfoZJDB();
+ playerAudio("OK");
+ GetCGTH();
-// }
-// },
-// error: function(xhr, type, errorThrown) {
-// alert("鑾峰彇鏁版嵁寮傚父锛�" + JSON.stringify(errorThrown));
-// }
-// });
+ }
+ },
+ error: function(xhr, type, errorThrown) {
+ alert("鑾峰彇鏁版嵁寮傚父锛�" + JSON.stringify(errorThrown));
+ }
+ });
-// };
+ };
/* 褰撻〉闈㈢殑鏂囨湰澶卞幓鐒︾偣鏃讹紝璁╁叾鍐嶆鑾峰彇鐒︾偣 */
--
Gitblit v1.9.3