From 07cf94734c36d4eae6ddbc4dd338bf5af81a2193 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期一, 28 十月 2024 16:11:39 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-LayUI
---
WebTM/views/WMS扫码模块/其他入库/Kf_OtherInBill_PDA.html | 313 +++++++++++++++++++++++++++++++++++++---------------
1 files changed, 223 insertions(+), 90 deletions(-)
diff --git "a/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\345\205\266\344\273\226\345\205\245\345\272\223/Kf_OtherInBill_PDA.html" "b/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\345\205\266\344\273\226\345\205\245\345\272\223/Kf_OtherInBill_PDA.html"
index 63c113b..eae9eb4 100644
--- "a/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\345\205\266\344\273\226\345\205\245\345\272\223/Kf_OtherInBill_PDA.html"
+++ "b/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\345\205\266\344\273\226\345\205\245\345\272\223/Kf_OtherInBill_PDA.html"
@@ -14,7 +14,7 @@
<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 src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
+ <script src="../../../layuiadmin/PubCustom.js"></script>
<style>
.layui-col-xs8 {
width: 55.666667%;
@@ -75,11 +75,18 @@
<div class="layui-col-xs3">
<label class="layui-form-label" style="width:60px;padding-left:0px;">婧愬崟鍗曞彿</label>
</div>
- <div class="layui-col-xs7">
- <input type="text" name="HSourceBillNo" id="HSourceBillNo" lay-verify="HSourceBillNo" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
- </div>
- <div class="layui-col-xs2">
- <button type="button" lay-submit="" lay-filter="HSourceBillNo-BT" class="layui-btn" id="HSourceBillNo-BT">纭畾</button>
+ <div class="layui-col-xs9">
+ <div class="layui-col-xs8">
+ <input type="text" name="HSourceBillNo" id="HSourceBillNo" lay-verify="HSourceBillNo" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
+ </div>
+ <div class="layui-col-xs2">
+ <button type="button" lay-submit="" lay-filter="cmdHSourceBillNo" class="layui-btn" id="cmdHSourceBillNo" style="width:55px;">
+ <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-2px;"></i>
+ </button>
+ </div>
+ <div class="layui-col-xs2" style="float: right;">
+ <button type="button" lay-submit="" lay-filter="HSourceBillNo-BT" class="layui-btn" id="HSourceBillNo-BT" style="width: 40px; margin-left: 0px;padding-left:10px">OK</button>
+ </div>
</div>
</div>
<div class="layui-row">
@@ -105,7 +112,7 @@
<label class="layui-form-label" style="width:60px;padding-left:0px;">鍒跺崟浜�</label>
</div>
<div class="layui-col-xs9">
- <input type="text" name="HMaker" id="HMaker" lay-verify="HMaker" autocomplete="off" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" readonly>
+ <input type="text" name="HMaker" id="HMaker" lay-verify="HMaker" autocomplete="off" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" disabled>
</div>
</div>
<div class="layui-row">
@@ -113,7 +120,7 @@
<label class="layui-form-label" style="width:60px;padding-left:0px;">鍗曟嵁鍙�</label>
</div>
<div class="layui-col-xs9">
- <input type="text" name="HBillNo" id="HBillNo" lay-verify="HBillNo" autocomplete="off" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" readonly>
+ <input type="text" name="HBillNo" id="HBillNo" lay-verify="HBillNo" autocomplete="off" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" disabled>
</div>
</div>
<div class="layui-row">
@@ -121,7 +128,7 @@
<label class="layui-form-label" style="width:60px;padding-left:0px;">鍗曟嵁ID</label>
</div>
<div class="layui-col-xs9">
- <input type="text" name="HInterID" id="HInterID" lay-verify="HInterID" value="0" autocomplete="off" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" readonly>
+ <input type="text" name="HInterID" id="HInterID" lay-verify="HInterID" value="0" autocomplete="off" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" disabled>
</div>
</div>
</div>
@@ -230,7 +237,7 @@
<label class="layui-form-label" style="width:30px;padding-left:0px;">缁勭粐</label>
</div>
<div class="layui-col-xs10">
- <input type="text" name="HStockOrgName" id="HStockOrgName" lay-verify="HStockOrgName" autocomplete="off" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" readonly>
+ <input type="text" name="HStockOrgName" id="HStockOrgName" lay-verify="HStockOrgName" autocomplete="off" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" disabled>
<input type="hidden" name="HStockOrgID" id="HStockOrgID" lay-verify="HStockOrgID" value="0" autocomplete="off" class="layui-input">
</div>
</div>
@@ -253,7 +260,7 @@
<label class="layui-form-label" style="width:40px;padding-left:0px;">鏉$爜</label>
</div>
<div class="layui-col-xs10">
- <input type="text" name="HBarCode_B" id="HBarCode_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" readonly>
+ <input type="text" name="HBarCode_B" id="HBarCode_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" disabled>
</div>
</div>
</div>
@@ -263,7 +270,7 @@
<label class="layui-form-label" style="width:40px;padding-left:0px;">鐗╂枡</label>
</div>
<div class="layui-col-xs10">
- <input type="text" name="HMaterName_B" id="HMaterName_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" readonly>
+ <input type="text" name="HMaterName_B" id="HMaterName_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" disabled>
</div>
</div>
</div>
@@ -273,7 +280,7 @@
<label class="layui-form-label" style="width:40px;padding-left:0px;">瑙勬牸</label>
</div>
<div class="layui-col-xs10">
- <input type="text" name="HMaterModel_B" id="HMaterModel_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" readonly>
+ <input type="text" name="HMaterModel_B" id="HMaterModel_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" disabled>
</div>
</div>
</div>
@@ -283,7 +290,7 @@
<label class="layui-form-label" style="width:40px;padding-left:0px;">鎵规</label>
</div>
<div class="layui-col-xs10">
- <input type="text" name="HBatchNo_B" id="HBatchNo_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" readonly>
+ <input type="text" name="HBatchNo_B" id="HBatchNo_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" disabled>
</div>
</div>
</div>
@@ -293,7 +300,7 @@
<label class="layui-form-label" style="width:40px;padding-left:0px;">鍗曚綅</label>
</div>
<div class="layui-col-xs10">
- <input type="text" name="HUnitName_B" id="HUnitName_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" readonly>
+ <input type="text" name="HUnitName_B" id="HUnitName_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" disabled>
</div>
</div>
</div>
@@ -303,7 +310,7 @@
<label class="layui-form-label" style="width:40px;padding-left:0px;">鏁伴噺</label>
</div>
<div class="layui-col-xs10">
- <input type="text" name="HQty_B" id="HQty_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" readonly>
+ <input type="text" name="HQty_B" id="HQty_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" disabled>
</div>
</div>
</div>
@@ -313,7 +320,7 @@
<label class="layui-form-label" style="width:40px;padding-left:0px;">瀹归噺</label>
</div>
<div class="layui-col-xs10">
- <input type="text" name="HTMQty_B" id="HTMQty_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" readonly>
+ <input type="text" name="HTMQty_B" id="HTMQty_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" disabled>
</div>
</div>
</div>
@@ -323,7 +330,7 @@
<label class="layui-form-label" style="width:40px;padding-left:0px;">浠撳簱</label>
</div>
<div class="layui-col-xs10">
- <input type="text" name="HWHName_B" id="HWHName_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" readonly>
+ <input type="text" name="HWHName_B" id="HWHName_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" disabled>
</div>
</div>
</div>
@@ -333,7 +340,7 @@
<label class="layui-form-label" style="width:40px;padding-left:0px;">浠撲綅</label>
</div>
<div class="layui-col-xs10">
- <input type="text" name="HSPName_B" id="HSPName_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" readonly>
+ <input type="text" name="HSPName_B" id="HSPName_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" disabled>
</div>
</div>
</div>
@@ -353,6 +360,7 @@
<input type="hidden" name="HBillType" id="HBillType">
<input type="hidden" name="HBillerID" id="HBillerID">
<input type="hidden" name="HRedBlueFlag" id="HRedBlueFlag">
+ <input type="hidden" name="HSourceBillListCtl" id="HSourceBillListCtl">
<!--澶辫触鎻愮ず闊�-->
<div id="" style="display:none;">
<audio id="cs" hidden controls>
@@ -392,11 +400,15 @@
var HBillerID = sessionStorage["HBillerID"]
var HStockOrgID = sessionStorage["OrganizationID"] //缁勭粐ID
var HSourceFlag = false //鏄惁宸叉壂鐮佹爣蹇�
- var OperationType = 0 //鎿嶄綔绫诲瀷锛�1鏂板銆�2浠庣紦瀛樺垪琛ㄤ腑杩斿洖锛�
+ var OperationType = 1 //鎿嶄綔绫诲瀷锛�1鏂板銆�2浠庣紦瀛樺垪琛ㄤ腑杩斿洖锛�
var listOption = [];
var columns = "";
var HModName = "Kf_OtherInBill_PDA";
- var titleData = []; //涓嶉渶瑕佹樉绀虹殑瀛楁
+ var ModRightName = "CE_OtherIn"; //妯″潡鏉冮檺鍙傛暟
+ var titleData = []; //涓嶉渶瑕佹樉绀虹殑瀛楁
+ var params = get_UrlVars();
+ var OperationType = params[params[0]] == null ? 1 : params[params[0]]; //浠庣紦瀛樺垪琛ㄤ腑杩斿洖鏁版嵁绫诲瀷锛�1鏂板銆�2浠庣紦瀛樺垪琛ㄤ腑杩斿洖锛�
+ var HInterID_Temp = params[params[1]]; //浠庣紦瀛樺垪琛ㄤ腑杩斿洖鍗曟嵁ID
//#endregion
@@ -404,20 +416,57 @@
if (sessionStorage.login != "login") {
layer.confirm("鐧诲綍澶辨晥锛岃閲嶆柊鐧诲綍锛�", {
icon: 4, skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", closeBtn: 0, btn: ['閲嶆柊鐧诲綍']
- }, function () { window.location.href = "../../user/login.html"; });
+ }, function () { window.location.href = "../../user/login_pda.html"; });
}
+
+ //#region 鐢ㄦ埛妯″潡鏉冮檺鍒ゆ柇
+
+ //鐢ㄦ埛妯″潡鏉冮檺鍒ゆ柇
+ CheckModRight();
+
+ function CheckModRight() {
+ layer.load(3);
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "/WEBSController/CheckModRight_Json",
+ async: false, //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
+ data: { "ModRightName": ModRightName, "HUserName": HMaker },
+ success: function (d) {
+ if (d.count == 1) {
+ }
+ else {
+ layer.msg(d.Message, {
+ icon: 0, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", btn: ['纭']
+ }, function () { parent.location.href = "../../../views/index_Mobile.html"; });
+ }
+ },
+ complete: function (XHR, TS) { XHR = null }//鍥炴敹璧勬簮
+ });
+ layer.closeAll("loading");
+ }
+ //#endregion
//澶辫触鎻愮ず闊�
function playSound() {
console.log("playSound");
var audio = document.getElementById("cs");
audio.play();
+ audio.onended = function () {
+ // 褰撻煶棰戞挱鎶ュ畬鎴愭椂锛岃皟鐢� pause 鍜岃缃� currentTime 涓� 0 浠ュ仠姝㈡挱鎶ュ苟閲嶇疆
+ audio.pause();
+ audio.currentTime = 0;
+ };
}
//鎴愬姛鎻愮ず闊�
function playSound_OK() {
console.log("playSound_OK");
var audio = document.getElementById("cs2");
audio.play();
+ audio.onended = function () {
+ // 褰撻煶棰戞挱鎶ュ畬鎴愭椂锛岃皟鐢� pause 鍜岃缃� currentTime 涓� 0 浠ュ仠姝㈡挱鎶ュ苟閲嶇疆
+ audio.pause();
+ audio.currentTime = 0;
+ };
}
//#region 鍒濆鍖栫晫闈�
@@ -435,22 +484,22 @@
$("#HKeeperID").val(sessionStorage["HKeeperID"]);
$("#HKeeperName").val(sessionStorage["HKeeper"]);
$("#HMaker").val(sessionStorage["HUserName"]);
- $("#HDate").val(Format(new Date(), "yyyy-MM-dd"));
+ $("#HDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
$("#HBillerID").val(sessionStorage["HBillerID"]);
$("#HStockOrgID").val(sessionStorage["OrganizationID"]);
$("#HStockOrgName").val(sessionStorage["Organization"]);
$("#HBillType").val("1203");
$("#HRedBlueFlag").val("false");
- if (sessionStorage["HWhSPFlag"]) {
+ if (sessionStorage["HWHID"] != 0 && sessionStorage["HWhSPFlag"]) {
$("#HStockPlaceID").val("0");
$("#HStockPlaceName").val("");
- $("#HStockPlaceName").attr("readonly", "readonly");
+ $("#HStockPlaceName").attr("disabled", "disabled");
$('#HSpID-BT').addClass("layui-btn-disabled").attr("disabled", true);//鎸夐挳绂佺敤
}
else {
$("#HStockPlaceID").val(sessionStorage["HSPID"]);
$("#HStockPlaceName").val(sessionStorage["HSPName"]);
- $("#HStockPlaceName").removeAttr("readonly");
+ $("#HStockPlaceName").removeAttr("disabled");
$('#HSpID-BT').removeClass("layui-btn-disabled").attr("disabled", false);//鎸夐挳鎭㈠姝e父鐘舵��
}
@@ -505,7 +554,8 @@
form.render('select');
}
layer.closeAll("loading");
- }
+ },
+ complete: function (XHR, TS) { XHR = null }//鍥炴敹璧勬簮
})
}
//鍒濆鍖栬〃鏍�
@@ -517,24 +567,20 @@
, height: 'full-60'
, cellMinWidth: 90
, limit: 50
+ , done: function () {
+ layer.closeAll("loading");
+ }
};
}
- //#region 浠庣紦瀛樺垪琛ㄤ腑杩斿洖淇℃伅
- function getUrlVars() {
- var vars = [], hash;
- var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
- for (var i = 0; i < hashes.length; i++) {
- hash = hashes[i].split('=');
- vars.push(hash[0]);
- vars[hash[0]] = hash[1];
- }
- return vars;
- }
- var params = getUrlVars();
- var OperationType = params[params[0]]; //浠庣紦瀛樺垪琛ㄤ腑杩斿洖鏁版嵁绫诲瀷 1鏂板 2浠庣紦瀛樺垪琛ㄤ腑杩斿洖
- var HInterID_Temp = params[params[1]]; //浠庣紦瀛樺垪琛ㄤ腑杩斿洖鍗曟嵁ID
-
+ //#region 鐐瑰嚮琛岄�変腑楂樹寒
+ table.on('row(wl-table)', function (obj) {
+ //閫変腑琛屾敼鍙橀鑹�
+ $(".layui-table-body tr ").attr({ "style": "background:" }); //鍏朵粬tr鎭㈠鍘熸牱
+ obj.tr.addClass('layui-table-click').siblings().removeClass('layui-table-click'); //閫変腑琛屾牱寮�
+ obj.tr.find('i[class="layui-anim layui-icon"]').trigger("click"); //閫変腑radio鏍峰紡
+ $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" }); //鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹�
+ })
//#endregion
//鍒ゆ柇鏄惁鏂板锛岃幏鍙栨渶澶у崟鎹彿
@@ -552,7 +598,6 @@
element.tabChange('tab-Kf_OtherInBill_PDA', '2');
}
else {
- OperationType = 1;
//鑾峰彇鏈�澶у崟鎹甀D銆佸崟鎹彿
$.ajax({
type: "GET",
@@ -569,7 +614,8 @@
else {
layer.msg(d.Message, { icon: 0, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
}
- }
+ },
+ complete: function (XHR, TS) { XHR = null }//鍥炴敹璧勬簮
});
HSourceFlag = false;
}
@@ -586,15 +632,19 @@
$("#HBillNo").val(d.data[0].HBillNo);
HInterID = $('#HInterID').val()
HBillNo = $('#HBillNo').val()
- //$("#HMainSourceBillType").val(d.data[0].HSourceBillType == null ? "1241" : d.data[0].HSourceBillType);
//鑾峰彇婧愬崟绫诲瀷
if (d.data[0].HSourceBillType == "1241") {
$("#HMainSourceBillType").empty();
var optionHtml = '';
optionHtml += "<option value = '" + d.data[0].HSourceBillType + "' >" + '鍏ュ簱鐢宠鍗�' + "</option>";
$("#HMainSourceBillType").append(optionHtml);
+ $("#HMainSourceBillType").attr("disabled", "disabled");
+ $("#HBillSubType").val("QTRKD01_SYS"); //鏍囧噯鍏朵粬鍏ュ簱鍗�
+ $("#HBillSubType").attr("disabled", "disabled");
layui.form.render('select');
- $("#HMainSourceBillType").attr("readonly", "readonly");
+ //渚涘簲鍟嗕笉鍙紪杈�
+ $("#HSupName").attr("disabled", "disabled");
+ $('#HSupID-BT').addClass("layui-btn-disabled").attr("disabled", true);//鎸夐挳绂佺敤
}
else {
$("#HMainSourceBillType").empty();
@@ -602,21 +652,24 @@
optionHtml += "<option value = '" + d.data[0].HSourceBillType + "' >" + '鎵嬪伐褰曞叆' + "</option>";
$("#HMainSourceBillType").append(optionHtml);
layui.form.render('select');
- $("#HMainSourceBillType").attr("readonly", "readonly");
+ $("#HMainSourceBillType").attr("disabled", "disabled");
}
$("#HSourceBillNo").val(d.data[0].HSourceBillNo);
//闈炲婧愬崟妯″紡
if (d.data[0].HMulSourceBill == 0) {
- $("#HSourceBillNo").attr("readonly", "readonly");
+ $("#HSourceBillNo").attr("disabled", "disabled");
$('#HSourceBillNo-BT').addClass("layui-btn-disabled").attr("disabled", true);//鎸夐挳绂佺敤
}
if (d.data[0].HDeptID != 0) {
$("#HDeptID").val(d.data[0].HDeptID);
$("#HDeptName").val(d.data[0].HDeptName);
}
- $("#HDate").val(Format(new Date(), "yyyy-MM-dd"));
- }
+ $("#HSupID").val(d.data[0].HCusID);
+ $("#HSupName").val(d.data[0].HSupName);
+ $("#HDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
+ },
+ complete: function (XHR, TS) { XHR = null }//鍥炴敹璧勬簮
})
}
@@ -635,7 +688,7 @@
$("#HWHName").val("");
$("#HStockPlaceID").val("0");
$("#HStockPlaceName").val("");
- $("#HStockPlaceName").removeAttr("readonly");
+ $("#HStockPlaceName").removeAttr("disabled");
$('#HSpID-BT').removeClass("layui-btn-disabled").attr("disabled", false);//鎸夐挳鎭㈠姝e父鐘舵��
layer.msg("浠撳簱鏉$爜涓虹┖锛�", {
icon: 0, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", btn: ['纭']
@@ -659,11 +712,11 @@
$("#HStockPlaceID").val("0");
$("#HStockPlaceName").val("");
if (result.data[0].HSPFlag == 0) {
- $("#HStockPlaceName").attr("readonly", "readonly");
+ $("#HStockPlaceName").attr("disabled", "disabled");
$('#HSpID-BT').addClass("layui-btn-disabled").attr("disabled", true);//鎸夐挳绂佺敤
}
else {
- $("#HStockPlaceName").removeAttr("readonly");
+ $("#HStockPlaceName").removeAttr("disabled");
$('#HSpID-BT').removeClass("layui-btn-disabled").attr("disabled", false);//鎸夐挳鎭㈠姝e父鐘舵��
}
element.tabChange('tab-Kf_OtherInBill_PDA', '2');
@@ -677,7 +730,7 @@
$("#HWHName").val("");
$("#HStockPlaceID").val("0");
$("#HStockPlaceName").val("");
- $("#HStockPlaceName").removeAttr("readonly");
+ $("#HStockPlaceName").removeAttr("disabled");
$('#HSpID-BT').removeClass("layui-btn-disabled").attr("disabled", false);//鎸夐挳鎭㈠姝e父鐘舵��
layer.msg(result.Message, {
icon: 0, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", btn: ['纭']
@@ -687,7 +740,8 @@
});
}
layer.closeAll("loading");
- }
+ },
+ complete: function (XHR, TS) { XHR = null }//鍥炴敹璧勬簮
});
}
});
@@ -767,7 +821,8 @@
});
}
layer.closeAll("loading");
- }
+ },
+ complete: function (XHR, TS) { XHR = null }//鍥炴敹璧勬簮
});
}
});
@@ -840,7 +895,8 @@
});
}
layer.closeAll("loading");
- }
+ },
+ complete: function (XHR, TS) { XHR = null }//鍥炴敹璧勬簮
});
}
});
@@ -909,7 +965,8 @@
});
}
layer.closeAll("loading");
- }
+ },
+ complete: function (XHR, TS) { XHR = null }//鍥炴敹璧勬簮
});
}
});
@@ -978,7 +1035,8 @@
});
}
layer.closeAll("loading");
- }
+ },
+ complete: function (XHR, TS) { XHR = null }//鍥炴敹璧勬簮
});
}
});
@@ -1047,7 +1105,8 @@
});
}
layer.closeAll("loading");
- }
+ },
+ complete: function (XHR, TS) { XHR = null }//鍥炴敹璧勬簮
});
}
});
@@ -1137,6 +1196,7 @@
layer.msg(data.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
}
},
+ complete: function (XHR, TS) { XHR = null },//鍥炴敹璧勬簮
error: function (err) {
layer.msg("閿欒:" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
}
@@ -1213,6 +1273,7 @@
layer.msg(data.Message, { icon: 2, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
}
},
+ complete: function (XHR, TS) { XHR = null },//鍥炴敹璧勬簮
error: function (err) {
layer.msg('閿欒' + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
}
@@ -1243,6 +1304,39 @@
})
//#endregion
+
+ //#endregion
+
+
+ //#region 婧愬崟閫夋嫨
+
+ form.on('submit(cmdHSourceBillNo)', function () {
+ var HSourceTitle = "";
+ var HSourceBillType = $("#HMainSourceBillType").val()
+ if (HSourceBillType == '1241') {
+ HSourceTitle = "鍏ュ簱鐢宠鍗�";
+ }
+
+ layer.open({
+ type: 2
+ , area: ['100%', '100%']
+ , title: HSourceTitle + '鍒楄〃'//鏍囬
+ , shade: 0.6 //閬僵閫忔槑搴�
+ , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+ , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+ , content: ['../../../views/鍏叡椤甸潰/Kf_SourceBillEditDlg_PDA.html?HBillType =' + HBillType + '&HSourceBillType =' + HSourceBillType + '&HStockOrgID =' + HStockOrgID, 'yes']
+ , resize: false
+ , cancel: function () {
+ //$(".layui-btn").removeClass("layui-btn-disabled");
+ }
+ , end: function () {
+ if ($("#HSourceBillListCtl").val() == '1') {
+ GetMeesageBySourceBillNo();
+ $("#HSourceBillListCtl").val("0"); //鐢ㄤ簬鍖哄垎婧愬崟鍒楄〃鐣岄潰鍏抽棴鐘舵�侊紙1涓鸿繑鍥烇紝0涓洪��鍑猴級
+ }
+ }
+ })
+ });
//#endregion
@@ -1284,11 +1378,16 @@
$("#HSourceBillNo").val(result.data.hSourceBillNoField);
$("#HMainSourceBillType").attr("disabled", "disabled");
- form.render('select');
if (result.data.hMulSourceFlagField == 0) {
- $("#HSourceBillNo").attr("readonly", "readonly");
+ $("#HSourceBillNo").attr("disabled", "disabled");
$('#HSourceBillNo-BT').addClass("layui-btn-disabled").attr("disabled", true);//鎸夐挳绂佺敤
}
+ $("#HBillSubType").val("QTRKD01_SYS"); //鏍囧噯鍏朵粬鍏ュ簱鍗�
+ $("#HBillSubType").attr("disabled", "disabled");
+ form.render('select');
+ //渚涘簲鍟嗕笉鍙紪杈�
+ $("#HSupName").attr("disabled", "disabled");
+ $('#HSupID-BT').addClass("layui-btn-disabled").attr("disabled", true);//鎸夐挳绂佺敤
element.tabChange('tab-Kf_OtherInBill_PDA', '2');
$("#HBarCode").select();
$("#HBarCode").focus();
@@ -1305,7 +1404,8 @@
$("#HSourceBillNo").focus();
});
}
- }
+ },
+ complete: function (XHR, TS) { XHR = null }//鍥炴敹璧勬簮
});
layer.closeAll("loading");
}
@@ -1389,6 +1489,7 @@
});
}
},
+ complete: function (XHR, TS) { XHR = null },//鍥炴敹璧勬簮
error: function (err) {
playSound();
layer.msg('閿欒' + err, {
@@ -1434,11 +1535,11 @@
$("#HStockPlaceName").val("");
$("#HStockPlaceID").val("0");
if (result.data.hSPFlagField == 0) {
- $("#HStockPlaceName").attr("readonly", "readonly");
+ $("#HStockPlaceName").attr("disabled", "disabled");
$('#HSpID-BT').addClass("layui-btn-disabled").attr("disabled", true);//鎸夐挳绂佺敤
}
else {
- $("#HStockPlaceName").removeAttr("readonly");
+ $("#HStockPlaceName").removeAttr("disabled");
$('#HSpID-BT').removeClass("layui-btn-disabled").attr("disabled", false);//鎸夐挳鎭㈠姝e父鐘舵��
}
element.tabChange('tab-Kf_OtherInBill_PDA', '2'); //璺宠浆椤电
@@ -1474,7 +1575,7 @@
optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '鍏ュ簱鐢宠鍗�' + "</option>";
$("#HMainSourceBillType").append(optionHtml);
layui.form.render('select');
- $("#HMainSourceBillType").attr("readonly", "readonly");
+ $("#HMainSourceBillType").attr("disabled", "disabled");
}
else {
$("#HMainSourceBillType").empty();
@@ -1482,12 +1583,18 @@
optionHtml += "<option value = '-1' >" + '鎵嬪伐褰曞叆' + "</option>";
$("#HMainSourceBillType").append(optionHtml);
layui.form.render('select');
- $("#HMainSourceBillType").attr("readonly", "readonly");
+ $("#HMainSourceBillType").attr("disabled", "disabled");
}
if (result.data.hMulSourceFlagField == 0) {
- $("#HSourceBillNo").attr("readonly", "readonly");
+ $("#HSourceBillNo").attr("disabled", "disabled");
$('#HSourceBillNo-BT').addClass("layui-btn-disabled").attr("disabled", true);//鎸夐挳绂佺敤
}
+ $("#HBillSubType").val("QTRKD01_SYS"); //鏍囧噯鍏朵粬鍏ュ簱鍗�
+ $("#HBillSubType").attr("disabled", "disabled");
+ form.render('select');
+ //渚涘簲鍟嗕笉鍙紪杈�
+ $("#HSupName").attr("disabled", "disabled");
+ $('#HSupID-BT').addClass("layui-btn-disabled").attr("disabled", true);//鎸夐挳绂佺敤
element.tabChange('tab-Kf_OtherInBill_PDA', '3');
}
//鐗╂枡鏉$爜
@@ -1510,8 +1617,10 @@
var optionHtml = '';
optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '鍏ュ簱鐢宠鍗�' + "</option>";
$("#HMainSourceBillType").append(optionHtml);
+ $("#HMainSourceBillType").attr("disabled", "disabled");
+ $("#HBillSubType").val("QTRKD01_SYS"); //鏍囧噯鍏朵粬鍏ュ簱鍗�
+ $("#HBillSubType").attr("disabled", "disabled");
layui.form.render('select');
- $("#HMainSourceBillType").attr("readonly", "readonly");
}
else {
$("#HMainSourceBillType").empty();
@@ -1519,12 +1628,15 @@
optionHtml += "<option value = '-1' >" + '鎵嬪伐褰曞叆' + "</option>";
$("#HMainSourceBillType").append(optionHtml);
layui.form.render('select');
- $("#HMainSourceBillType").attr("readonly", "readonly");
+ $("#HMainSourceBillType").attr("disabled", "disabled");
}
if (result.data.hMulSourceFlagField == 0) {
- $("#HSourceBillNo").attr("readonly", "readonly");
+ $("#HSourceBillNo").attr("disabled", "disabled");
$('#HSourceBillNo-BT').addClass("layui-btn-disabled").attr("disabled", true);//鎸夐挳绂佺敤
}
+ //渚涘簲鍟嗕笉鍙紪杈�
+ $("#HSupName").attr("disabled", "disabled");
+ $('#HSupID-BT').addClass("layui-btn-disabled").attr("disabled", true);//鎸夐挳绂佺敤
element.tabChange('tab-Kf_OtherInBill_PDA', '3');
}
}
@@ -1543,6 +1655,7 @@
});
}
},
+ complete: function (XHR, TS) { XHR = null },//鍥炴敹璧勬簮
error: function (err) {
playSound();
layer.msg("閿欒锛�" + err, {
@@ -1584,7 +1697,7 @@
}
//鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
- col.push({ type: 'radio', fixed: 'left', totalRowText: '鍚堣' });
+ col.push({ type: 'radio', totalRowText: '鍚堣' });
for (var i = 0; i < data.length; i++) {
if ($.inArray(data[i].name, titleData) > -1) {
col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
@@ -1609,18 +1722,31 @@
listOption.cols = [columns];
listOption.data = result.data.Materlist;
listOption.totalRow = true;
+ table.cache['wl-table'] = null; //娓呯┖琛ㄦ牸缂撳瓨鏁版嵁
table.render(listOption);
//鏉$爜淇℃伅
$("#HBarCode_B").val(result.data.BarCodeDetailslist[0].HBarCode);
- $("#HMaterName_B").val(result.data.BarCodeDetailslist[0].HMaterName);
- $("#HMaterModel_B").val(result.data.BarCodeDetailslist[0].HMaterModel);
- $("#HBatchNo_B").val(result.data.BarCodeDetailslist[0].HBatchNo);
- $("#HUnitName_B").val(result.data.BarCodeDetailslist[0].HUnitName);
- $("#HQty_B").val(result.data.BarCodeDetailslist[0].HQty);
- $("#HTMQty_B").val(result.data.BarCodeDetailslist[0].HTMQty);
- $("#HWHName_B").val(result.data.BarCodeDetailslist[0].HWHName);
- $("#HSPName_B").val(result.data.BarCodeDetailslist[0].HSPName);
+ if ($("#HBarCode_B").val() == '') {
+ $("#HMaterName_B").val("");
+ $("#HMaterModel_B").val("");
+ $("#HBatchNo_B").val("");
+ $("#HUnitName_B").val("");
+ $("#HQty_B").val("");
+ $("#HTMQty_B").val("");
+ $("#HWHName_B").val("");
+ $("#HSPName_B").val("");
+ }
+ else {
+ $("#HMaterName_B").val(result.data.BarCodeDetailslist[0].HMaterName);
+ $("#HMaterModel_B").val(result.data.BarCodeDetailslist[0].HMaterModel);
+ $("#HBatchNo_B").val(result.data.BarCodeDetailslist[0].HBatchNo);
+ $("#HUnitName_B").val(result.data.BarCodeDetailslist[0].HUnitName);
+ $("#HQty_B").val(result.data.BarCodeDetailslist[0].HQty);
+ $("#HTMQty_B").val(result.data.BarCodeDetailslist[0].HTMQty);
+ $("#HWHName_B").val(result.data.BarCodeDetailslist[0].HWHName);
+ $("#HSPName_B").val(result.data.BarCodeDetailslist[0].HSPName);
+ }
}
else {
listOption.cols = [[
@@ -1647,7 +1773,8 @@
$("#HWHName_B").val("");
$("#HSPName_B").val("");
}
- }
+ },
+ complete: function (XHR, TS) { XHR = null }//鍥炴敹璧勬簮
});
}
@@ -1669,11 +1796,11 @@
$("#HStockPlaceName").val("");
$("#HStockPlaceID").val("0");
if (obj[0].HSPFlag == 0) {
- $("#HStockPlaceName").attr("readonly", "readonly");
+ $("#HStockPlaceName").attr("disabled", "disabled");
$('#HSpID-BT').addClass("layui-btn-disabled").attr("disabled", true);//鎸夐挳绂佺敤
}
else {
- $("#HStockPlaceName").removeAttr("readonly");
+ $("#HStockPlaceName").removeAttr("disabled");
$('#HSpID-BT').removeClass("layui-btn-disabled").attr("disabled", false);//鎸夐挳鎭㈠姝e父鐘舵��
}
}
@@ -1715,6 +1842,13 @@
$("#HSupID").val(obj[0].HItemID);
}
}
+ //鐐瑰嚮鎸夐挳閫夋嫨鍚� 杩斿洖婧愬崟鍗曞彿
+ function GetHSourceBillValue(obj) {
+ if (obj.length > 0) {
+ $("#HSourceBillNo").val(obj[0].鍗曟嵁鍙�);
+ $("#HSourceBillListCtl").val("1");
+ }
+ }
//鍗曟嵁涓婁紶鍓嶅垽鏂�
function AllowLoadData(sSubStr) {
@@ -1726,14 +1860,15 @@
layer.msg("鍗曟嵁鍙疯幏鍙栧け璐ワ紝閿欒鐨勫崟鎹彿锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
return false;
}
- if (typeof (sSubStr) == "undefined") {
+ if (sSubStr.length == 0) {
layer.msg("娌℃湁鎵爜淇℃伅锛岃鍏堟壂鎻忔潯鐮侊紝纭鏃犺鍚庡啀鎻愪氦锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
return false;
}
//鍒ゆ柇鏄惁宸叉壂鎻忕墿鏂欐潯鐮�
- if (!typeof (sSubStr) == "undefined") {
- for (var i = 0; i <= sSubStr.length - 1; i++) {
- if (parseFloat(sSubStr[i].HQty) > 0) {
+ else {
+ var s = 0;
+ for (var i = 0; i <= sSubStr.length - 1; i++) {
+ if (sSubStr[i].鏁伴噺 > 0) {
s = 1;
}
}
@@ -1742,9 +1877,7 @@
return false;
}
}
- else {
- return true;
- }
+ return true;
}
</script>
--
Gitblit v1.9.1