From fe50d723e5d050113c4ecc493220e264f39d8e5f Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期三, 02 七月 2025 17:00:29 +0800
Subject: [PATCH] 1
---
WebTM/views/WMS扫码模块/客户条码扫描/Gy_getCusBarCodeBill_PDA.html | 125 ++++++++++++++++++++++++++++++++++++++++-
1 files changed, 122 insertions(+), 3 deletions(-)
diff --git "a/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\345\256\242\346\210\267\346\235\241\347\240\201\346\211\253\346\217\217/Gy_getCusBarCodeBill_PDA.html" "b/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\345\256\242\346\210\267\346\235\241\347\240\201\346\211\253\346\217\217/Gy_getCusBarCodeBill_PDA.html"
index fee1f97..b660c1d 100644
--- "a/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\345\256\242\346\210\267\346\235\241\347\240\201\346\211\253\346\217\217/Gy_getCusBarCodeBill_PDA.html"
+++ "b/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\345\256\242\346\210\267\346\235\241\347\240\201\346\211\253\346\217\217/Gy_getCusBarCodeBill_PDA.html"
@@ -56,6 +56,14 @@
<button type="button" lay-submit="" class="layui-btn" lay-filter="cmdHBarCode">纭畾</button>
</div>
</div>
+ <div class="layui-row">
+ <div class="layui-col-xs3">
+ <label class="layui-form-label" style="width:50px;padding-left:0px;">鍚堣 鏁伴噺</label>
+ </div>
+ <div class="layui-col-xs8">
+ <input type="text" name="HQty_Total" id="HQty_Total" lay-verify="HQty_Total" autocomplete="off" class="layui-input" readonly>
+ </div>
+ </div>
</div>
<div class="layui-tab" lay-filter="tab-Sc_PackUnionBill_PDA">
<ul class="layui-tab-title" lay-filter="tab-all">
@@ -83,6 +91,9 @@
</div>
<div class="layui-col-xs8 layui-input-inline mobile">
<input type="text" name="HBillNo" id="HBillNo" lay-verify="HBillNo" autocomplete="off" class="layui-input">
+ </div>
+ <div class="layui-col-xs2">
+ <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdHBillNoChange">淇敼</button>
</div>
</div>
<div class="layui-row">
@@ -147,6 +158,8 @@
var HStockOrgID = sessionStorage["OrganizationID"]
var option = [];
+ var HLength_BarCode = 0; //鏉$爜闀垮害楠岃瘉锛屽彇鎵爜鐨勭涓�涓潯鐮佺殑闀垮害浣滀负鏉$爜闀垮害
+
//鏉$爜缁熶竴鍓嶇紑璁剧疆鏍囪
var HBarCode_Pre_Flag = 0; //缁熶竴鍓嶇紑璁剧疆鏍囪[0:鏈缃�,1宸茶缃甝
@@ -156,6 +169,7 @@
var params = getBillTemp();
var HInterID_Temp = params[params[0]]; //浠庣紦瀛樺垪琛ㄤ腑杩斿洖鍗曟嵁ID
var HBillNo_Temp = params[params[1]]; //浠庣紦瀛樺垪琛ㄤ腑杩斿洖鍗曟嵁鍙�
+ var HModName_Temp = params[params[2]]; //浠庣淮鎶ら〉闈㈣繑鍥炴ā鍧楀悕
//#endregion
//#region 鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
@@ -244,15 +258,25 @@
layer.msg("鏉$爜涓嶈兘涓虹┖锛岃鎵弿鏉$爜锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
return false;
}
+
+ if (HLength_BarCode != 0 && HLength_BarCode != sBarCode.length) {
+ playSound();
+ layer.msg("鏉$爜闀垮害涓嶄竴鑷达紝璇烽噸鏂版壂鎻忔潯鐮侊紒", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ $('#HBarCode').val("");
+ return false;
+ }
+
if (HBarCode_Pre == "" || HBarCode_Pre_Flag != 1) {
playSound();
layer.msg("缁熶竴鍓嶇紑涓嶈兘涓虹┖锛岃璁剧疆缁熶竴鍓嶇紑骞剁‘璁わ紒", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ $('#HBarCode').val("");
return false;
}
if (sBarCode.indexOf(HBarCode_Pre) != 0) {
playSound();
layer.msg("鏉$爜鍓嶇紑涓嶄负缁熶竴鍓嶇紑锛岃妫�鏌ユ潯鐮侊紒", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ $('#HBarCode').val("");
return false;
}
@@ -331,10 +355,37 @@
}
}
}
+
+ //for (var i = 0; i < data1.data.length; i++) {
+ // data1.data[i]["HQty"] = 1;
+ //}
+
+ $("#HQty_Total").val(data1.data.length);
+
+ var data_Temp = []; //瀛樻斁瀛愯〃闇�瑕佹樉绀虹殑鏁版嵁
+ var data_temp_length = 10; //閫氳繃缂撳瓨鍒楄〃鎴栨柊澧炶繘鍏ラ〉闈㈡椂锛屽瓙琛ㄦ樉绀虹殑鏈�澶ц褰曟暟
+ if (data1.data.length < data_temp_length) {
+ data_temp_length = data1.data.length;
+ }
+ for (var i = 0; i < data_temp_length; i++) {
+ data_Temp.push(data1.data[i]);
+ }
+
+ if (HModName_Temp == "Gy_getCusBarCodeBillList") {
+ data_Temp = data1.data;
+ }
+
+
//option.cols = [col];
- option.data = data1.data;
+ option.data = data_Temp;
table.cache['wl-table'] = null; //娓呯┖琛ㄦ牸缂撳瓨鏁版嵁
ins = table.render(option);
+
+ //鑾峰彇褰撳墠鍗曟嵁绗竴涓壂鐮佹垚鍔熺殑鏉$爜鐨勯暱搴�
+ if (data1.data.length > 0) {
+ HLength_BarCode = data1.data[0]["HBarCode"].length;
+ }
+
layer.close(ajaxLoad);
} else {
layer.close(ajaxLoad);
@@ -367,6 +418,73 @@
//绂佺敤 缁熶竴鍓嶇紑 鏂囨湰妗�
$('#HBarCode_Pre').prop('disabled', true); //缁熶竴鍓嶇紑 鏂囨湰妗嗕笉鍙紪杈�
});
+ //#endregion
+ //#endregion
+
+ //#region 淇敼鍗曟嵁鍙�
+ //#region 淇敼鍗曟嵁鍙�
+ form.on('submit(cmdHBillNoChange)', function (data) {
+ layer.prompt({ formType: 2, title: "璇疯緭鍏ュ崟鎹彿锛�", value: HBillNo },
+ function (value, index) {
+ if (option.data!=null&& option.data.length > 0) {
+ layer.msg("褰撳墠鍗曟嵁宸茬粡瀛樺湪鎵爜璁板綍锛屼笉鍙互淇敼鍗曟嵁鍙�!", { icon: 5, btn: ['纭'], time: 100000, offset: 't' });
+ return;
+ }
+
+ if (value == "") {
+ layer.msg("鍗曟嵁鍙蜂笉鍙互涓虹┖!", { icon: 5, btn: ['纭'], time: 100000, offset: 't' });
+ return;
+ }
+
+ if (judgeHBillNoIsInTempList(value)) {
+ HBillNo = value;
+ $("#HBillNo").val(HBillNo);
+ }
+ layer.close(index);
+ });
+ });
+ //#endregion
+
+ //#region 鍒ゆ柇鍗曟嵁鍙锋槸鍚︿负缂撳瓨鍒楄〃涓殑鍗曟嵁鍙凤紝鏄垯淇敼鎴愬姛骞惰缃粺涓�鍓嶇紑锛屽惁鍒欎慨鏀瑰け璐ャ��
+ function judgeHBillNoIsInTempList(value) {
+ //鍒ゆ柇缁撴灉
+ var judgeFlag = false;
+
+ $.ajax({
+ type: "GET",
+ async: false,
+ url: GetWEBURL() + "/WEBSController/Gy_getCusBarCodeBill_judgeHBillNoIsInTempList",
+ data: { "HInterID": HInterID, "HBillType": HBillType, "HBillNo": value, "HMaker": HMaker, "HStockOrgID": HStockOrgID },
+ success: function (result) {
+ if (result.count == 1) {
+ if (result.data == null) {
+
+ } else {
+ var data = result.data;
+ $("#HBarCode_Pre").val(data[0]["HBarCode_Pre"]);
+
+ HBarCode_Pre_Flag = 1;
+
+ //绂佺敤纭鎸夐挳
+ $('#cmdHBarCode_Pre').addClass("layui-btn-disabled").attr("disabled", true);//鎸夐挳鍙樹负涓嶅彲缂栬緫鐘舵��
+ //绂佺敤 缁熶竴鍓嶇紑 鏂囨湰妗�
+ $('#HBarCode_Pre').prop('disabled', true); //缁熶竴鍓嶇紑 鏂囨湰妗嗕笉鍙紪杈�
+ }
+
+ judgeFlag = true;
+ }
+ else {
+ layer.msg(result.Message, { icon: 5, time: 100000, offset: 't', btn: ['纭'] }, function () { $("#HBarCode").focus(); });
+
+ judgeFlag = false;
+ }
+ layer.closeAll("loading");
+ },
+ complete: function (XHR, TS) { XHR = null }//鍥炴敹璧勬簮
+ });
+
+ return judgeFlag;
+ }
//#endregion
//#endregion
@@ -504,9 +622,10 @@
, height: 'full-50'
//, page: true
, cellMinWidth: 90
- , limit: 1000
+ , limit: 100000
//, limits: [50, 500, 5000, 20000]
, toolbar: '#toolbarDemo'
+ , totalRow: true
, cols: [[
{ type: 'checkbox', fixed: 'left' }
, { field: 'HItemID', title: 'HItemID', hide: true }
@@ -514,7 +633,7 @@
, { field: 'HBillNo', title: '鍗曟嵁鍙�', width: 125, sort: true }
, { field: 'HBillType', title: '鍗曟嵁绫诲瀷', width: 125, sort: true, hide: true }
, { field: 'HBarCode', title: '鏉$爜缂栧彿', width: 125, sort: true }
- , { field: 'HQty', title: '鏁伴噺', width: 125, sort: true, hide: true }
+ , { field: 'HQty', title: '鏁伴噺', width: 125, sort: true, totalRow: true, hide: true }
, { field: 'HOrgID', title: 'HOrgID', sort: true, hide: true }
, { field: 'HDate', title: '鏃ユ湡', width: 125, sort: true }
, { field: 'HRelationInterID', title: 'HRelationInterID', width: 125, sort: true, hide: true }
--
Gitblit v1.9.1