From 7e5ddf17eed99f0992fba56bc5e6ef07d17aa94c Mon Sep 17 00:00:00 2001
From: yxj <yxj@hz-kingdee.com>
Date: 星期三, 27 八月 2025 09:15:31 +0800
Subject: [PATCH] 新增夏宝PDA直接调拨单免扫码模块,条码生成模块选源单采购入库单时界面过滤无效修复
---
WebTM/views/PublicPage/HSourceReportHtml.html | 17 +
WebTM/views/home/console_Mobile.html | 6
WebTM/views/WMS扫码模块/生产调拨/Kf_MoveStockBill_AutoBarCode_PDA.html | 745 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
WebTM/WebTM.csproj | 1
4 files changed, 768 insertions(+), 1 deletions(-)
diff --git a/WebTM/WebTM.csproj b/WebTM/WebTM.csproj
index 1d328bd..c689f40 100644
--- a/WebTM/WebTM.csproj
+++ b/WebTM/WebTM.csproj
@@ -365,6 +365,7 @@
<Content Include="views\WMS鎵爜妯″潡\鐢熶骇璋冩嫧\Kf_MoveStockBillList_PDA_XiaBao.html" />
<Content Include="views\WMS鎵爜妯″潡\鐢熶骇璋冩嫧\Kf_MoveStockBill_CusBar_PDA.html" />
<Content Include="views\WMS鎵爜妯″潡\鐢熶骇璋冩嫧\Kf_MoveStockBill_Mould_PDA.html" />
+ <Content Include="views\WMS鎵爜妯″潡\鐢熶骇璋冩嫧\Kf_MoveStockBill_AutoBarCode_PDA.html" />
<Content Include="views\WMS鎵爜妯″潡\鐢熶骇璋冩嫧\Kf_MoveStockBill_PDA_XiaBao.html" />
<Content Include="views\WMS鎵爜妯″潡\鐢熶骇璋冩嫧\Kf_MoveStockStepInBill_Mould_PDA.html" />
<Content Include="views\WMS鎵爜妯″潡\鐢熶骇璋冩嫧\Kf_MoveStockStepInBill_PDA.html" />
diff --git a/WebTM/views/PublicPage/HSourceReportHtml.html b/WebTM/views/PublicPage/HSourceReportHtml.html
index 8c3094c..0dc9a55 100644
--- a/WebTM/views/PublicPage/HSourceReportHtml.html
+++ b/WebTM/views/PublicPage/HSourceReportHtml.html
@@ -380,7 +380,7 @@
$("#HProcExchBillNoHidden").show();
HModName = "ProductInBill_1202";
break;
- case '閲囪喘鍏ュ簱':
+ case '閲囪喘鍏ュ簱鍗�':
HModName = "POStockInBill_1201";
break;
case '閿�鍞��璐�':
@@ -625,6 +625,21 @@
}
return sWhere;
break;
+ case "閲囪喘鍏ュ簱鍗�":
+ if (HBillNo) {
+ sWhere += " and 鍗曟嵁鍙� like '%" + HBillNo + "%'";
+ }
+ if (PartNumber) {
+ sWhere += " and 鐗╂枡浠g爜 like '%" + PartNumber + "%'";
+ }
+ if (PartName) {
+ sWhere += " and 鐗╂枡鍚嶇О like '%" + PartName + "%'";
+ }
+ if (HDeptName && HDeptName != 0) {
+ sWhere += " and HDeptID = '" + HDeptName + "'";
+ }
+ return sWhere;
+ break;
case '閫�璐ч�氱煡鍗�':
return sWhere;
break;
diff --git "a/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\347\224\237\344\272\247\350\260\203\346\213\250/Kf_MoveStockBill_AutoBarCode_PDA.html" "b/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\347\224\237\344\272\247\350\260\203\346\213\250/Kf_MoveStockBill_AutoBarCode_PDA.html"
new file mode 100644
index 0000000..8bf7348
--- /dev/null
+++ "b/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\347\224\237\344\272\247\350\260\203\346\213\250/Kf_MoveStockBill_AutoBarCode_PDA.html"
@@ -0,0 +1,745 @@
+锘�<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>鐩存帴璋冩嫧鍗�-鍏嶆壂鐮�</title>
+ <meta name="renderer" content="webkit">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+ <!--寮曠敤layui鏍峰紡鏂囦欢-->
+ <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
+ <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
+ <!--寮曠敤layui js鏂囦欢-->
+ <script src="../../../layuiadmin/layui/layui.js"></script>
+ <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/PubCustom.js"></script>
+ <style>
+ .layui-col-xs8 {
+ width: 55.666667%;
+ }
+ </style>
+</head>
+<body>
+ <div class="layui-fluid" style="padding:0">
+ <div class="layui-card" style="padding: 1px">
+ <div class="layui-card-body" style="padding: 0px; height:800px;">
+ <form class="layui-form" action="" lay-filter="component-form-group">
+ <div style="background-color:#0085E8;">
+ <span style="color: white;"><i class="layui-icon layui-icon-form"></i>鐩存帴璋冩嫧鍗�-鍏嶆壂鐮�</span>
+ </div>
+ <div class="layui-form-item" style="padding:15px;margin:0px">
+ <div class="layui-row">
+ <div class="layui-col-xs3">
+ <label class="layui-form-label" style="width:60px;padding-left:0px;">婧愬崟鍗曞彿</label>
+ </div>
+ <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: 45px; margin-left: 10px; padding-left: 12px">
+ <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: 45px; margin-left: -5px;padding-left:12px">OK</button>
+ </div>
+ </div>
+ </div>
+ <div class="layui-tab layui-col-xs12" style="margin-top:5px;" lay-filter="tab-Kf_MoveStockBill_AutoBarCode_PDA">
+ <ul class="layui-tab-title" lay-filter="tab-all">
+ <li lay-id="1" style="padding:1px;">琛ㄥご淇℃伅</li>
+ <li lay-id="2" style="padding:1px;">鐗╂枡淇℃伅</li>
+ </ul>
+ <div class="layui-tab-content">
+ <!--琛ㄥご淇℃伅-->
+ <div class="layui-tab-item">
+ <div class="layui-form-item" style="padding: 0px; margin: 0px">
+ <div class="layui-row">
+ <div class="layui-col-xs3">
+ <label class="layui-form-label" style="width:60px;padding-left:0px;">婧愬崟绫诲瀷</label>
+ </div>
+ <div class="layui-col-xs9">
+ <select name="HMainSourceBillType" id="HMainSourceBillType">
+ <option value="3720">鐢熶骇鐢ㄦ枡娓呭崟</option>
+ </select>
+ </div>
+ </div>
+ <div class="layui-row">
+ <div class="layui-col-xs3">
+ <label class="layui-form-label" style="width:60px;padding-left:0px;">璋冩嫧绫诲瀷</label>
+ </div>
+ <div class="layui-col-xs9">
+ <select lay-filter="HStockStyle" name=" HStockStyle" id="HStockStyle">
+ <option value="缁勭粐鍐呰皟鎷�">缁勭粐鍐呰皟鎷�</option>
+ </select>
+ </div>
+ </div>
+ <div class="layui-row">
+ <div class="layui-col-xs3">
+ <label class="layui-form-label" style="width:60px;padding-left:0px;">璋冨嚭缁勭粐</label>
+ </div>
+ <div class="layui-col-xs9">
+ <select lay-filter="HStockOutOrgID" name=" HStockOutOrgID" id="HStockOutOrgID" disabled>
+ <!--鍔ㄦ�佹覆鏌撶粍缁�-->
+ </select>
+ </div>
+ </div>
+ <div class="layui-row">
+ <div class="layui-col-xs3">
+ <label class="layui-form-label" style="width:60px;padding-left:0px;">璋冨叆缁勭粐</label>
+ </div>
+ <div class="layui-col-xs9">
+ <select lay-filter="HStockInOrgID" name=" HStockInOrgID" id="HStockInOrgID" disabled>
+ <!--鍔ㄦ�佹覆鏌撶粍缁�-->
+ </select>
+ </div>
+ </div>
+ <div class="layui-row">
+ <div class="layui-col-xs3">
+ <label class="layui-form-label" style="width:60px;padding-left:0px;">鏃ユ湡</label>
+ </div>
+ <div class="layui-col-xs9">
+ <input name="HDate" id="HDate" autocomplete="off" class="layui-input">
+ </div>
+ </div>
+ <div class="layui-row">
+ <div class="layui-col-xs3">
+ <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;" disabled>
+ </div>
+ </div>
+ <div class="layui-row">
+ <div class="layui-col-xs3">
+ <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;" disabled>
+ </div>
+ </div>
+ <div class="layui-row">
+ <div class="layui-col-xs3">
+ <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;" disabled>
+ </div>
+ </div>
+ </div>
+ </div>
+ <!--鐗╂枡淇℃伅-->
+ <div class="layui-tab-item">
+ <div class="layui-row">
+ <div class="layui-col-xs12">
+ <div class="layui-form-item" style="padding:0px;margin:0px"></div>
+ <table class="layui-hide" id="wl-table" lay-filter="wl-table"></table>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="layer-footer" style="z-index: 10; position: fixed; text-align: center; bottom: 0; width:100%; height:50px">
+ <button type="button" lay-submit="" lay-filter="cmdSaver" class="layui-btn" id="cmdSaver">鎻愪氦</button>
+ <button type="button" lay-submit="" lay-filter="cmdCancel" class="layui-btn" id="cmdCancel">閫�鍑�</button>
+ </div>
+ </div>
+
+ <!--闅愯棌瀛楁-->
+ <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>
+ <source src="../../video/jingbao.wav" type="audio/ogg">
+ </audio>
+ </div>
+ <!--鎴愬姛鎻愮ず闊�-->
+ <div id="" style="display:none;">
+ <audio id="cs2" hidden controls>
+ <source src="../../video/success.wav" type="audio/ogg">
+ </audio>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ <script>
+ layui.config({
+ base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+ }).extend({
+ index: 'lib/index' //涓诲叆鍙fā鍧�
+ }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
+
+ //#region 鍏叡鍙橀噺
+ var $ = layui.$
+ , admin = layui.admin
+ , layer = layui.layer
+ , table = layui.table
+ , form = layui.form
+ , laydate = layui.laydate
+ , element = layui.element;
+ var HInterID = $('#HInterID').val()
+ var HBillNo = $('#HBillNo').val()
+ var HBillType = '1207'
+ var HRedBlueFlag = false
+ var HMaker = sessionStorage["HUserName"]
+ var HBillerID = sessionStorage["HBillerID"]
+ var HStockInOrgID = sessionStorage["OrganizationID"] //璋冨叆缁勭粐ID
+ var HStockOutOrgID = sessionStorage["OrganizationID"] //璋冨嚭缁勭粐ID
+ var HStockOrgID = sessionStorage["OrganizationID"] //鐧诲叆缁勭粐ID
+ var OperationType = 1 //鎿嶄綔绫诲瀷锛�1鏂板銆�2浠庣紦瀛樺垪琛ㄤ腑杩斿洖锛�
+ var listOption = [];
+ var columns = "";
+ var HModName = "Kf_MoveStockBill_AutoBarCode_PDA";
+ var ModRightName = "CE_MoveStock3"; //妯″潡鏉冮檺鍙傛暟
+ 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
+
+ //鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
+ if (sessionStorage.login != "login") {
+ layer.confirm("鐧诲綍澶辨晥锛岃閲嶆柊鐧诲綍锛�", {
+ icon: 4, skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", closeBtn: 0, btn: ['閲嶆柊鐧诲綍']
+ }, 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: 'auto', 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 鍒濆鍖栫晫闈�
+
+ set_ClearBill();
+
+ function set_ClearBill() {
+ //琛ㄥご鍒濆鍖栬祴鍊�
+ $("#HMaker").val(sessionStorage["HUserName"]);
+ $("#HDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
+ $("#HBillerID").val(sessionStorage["HBillerID"]);
+ $("#HStockInOrgID").val(sessionStorage["OrganizationID"]);
+ $("#HStockOutOrgID").val(sessionStorage["OrganizationID"]);
+ $("#HBillType").val("1207");
+ $("#HRedBlueFlag").val("false");
+
+ //榛樿鏄剧ず椤甸潰
+ element.tabChange('tab-Kf_MoveStockBill_AutoBarCode_PDA', '1');
+ set_InitDate(); //鍒濆鍖栬〃鍗曟椂闂�
+ set_InitStockOrgID(); //鑾峰彇璋冨叆璋冨嚭缁勭粐
+ set_InitGrid(); //鍒濆鍖栬〃鏍�
+
+ var data = [];
+ listOption.cols = [[
+ { field: '鏁伴噺', title: '鏁伴噺', width: 100 }
+ , { field: '婧愬崟鏁伴噺', title: '婧愬崟鏁伴噺', width: 100 }
+ , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 100 }
+ , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 100 }
+ , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 100 }
+ , { field: '杈呭姪灞炴��', title: '杈呭姪灞炴��', width: 100 }
+ , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', width: 100 }
+ ]];
+ listOption.data = data;
+ table.render(listOption);
+
+ //鍏夋爣榛樿鍦ㄦ簮鍗曞崟鍙蜂綅缃笂
+ var pFocus = $("#HSourceBillNo");
+ pFocus.select();
+ pFocus.focus(); //鑾峰彇鍏夋爣
+ }
+
+ //鍒濆鍖栬〃鍗曟椂闂存彃浠�
+ function set_InitDate() {
+ //甯歌鐢ㄦ硶
+ laydate.render({
+ elem: '#HDate'
+ });
+ }
+ //鑾峰彇璋冨叆璋冨嚭缁勭粐
+ function set_InitStockOrgID() {
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "/Web/GetOrganizations",
+ async: false, //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
+ success: function (result) {
+ var Organization = "";
+ if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ var data = result.data;
+ for (var i = 0; i < data.length; i++) {
+ Organization += '<option style="color:blue;" value="' + data[i].ID + '">' + data[i].Name + '</option>';
+ }
+ $("#HStockInOrgID").append(Organization);
+ $("#HStockInOrgID").val(HStockInOrgID)
+ $("#HStockOutOrgID").append(Organization);
+ $("#HStockOutOrgID").val(HStockOutOrgID)
+ form.render('select');
+ }
+ layer.closeAll("loading");
+ },
+ complete: function (XHR, TS) { XHR = null }//鍥炴敹璧勬簮
+ })
+ }
+ //鍒濆鍖栬〃鏍�
+ function set_InitGrid() {
+ listOption = {
+ elem: '#wl-table'
+ //, toolbar: '#toolbarDemo'
+ , totalRow: true
+ , height: 'full-60'
+ , cellMinWidth: 90
+ , limit: 200
+ };
+ }
+
+ //#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
+
+ //鍒ゆ柇鏄惁鏂板锛岃幏鍙栨渶澶у崟鎹彿
+ if (HInterID != 0) {
+
+ }
+ else {
+ //鑾峰彇鏈�澶у崟鎹甀D銆佸崟鎹彿
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "/WEBSController/GetMaxBillNoAndID_Json",
+ async: false, //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
+ data: { "HBillType": HBillType },
+ success: function (d) {
+ if (d.count == 1) {
+ $("#HInterID").val(d.data[0].HInterID);
+ $("#HBillNo").val(d.data[0].HBillNo);
+ HInterID = $('#HInterID').val()
+ HBillNo = $('#HBillNo').val()
+ }
+ else {
+ layer.msg(d.Message, { icon: 0, btn: ['纭'], time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ }
+ },
+ complete: function (XHR, TS) { XHR = null }//鍥炴敹璧勬簮
+ });
+ $("#HSourceBillNo").select();
+ $("#HSourceBillNo").focus(); //鑾峰彇鍏夋爣
+ }
+
+ //#endregion
+
+
+ //#region 鍔熻兘鎺т欢
+
+ //#region 鎻愪氦
+ form.on('submit(cmdSaver)', function (data) {
+ var sMainStr = JSON.stringify(data.field);
+ var sSubStr = table.cache['wl-table'];
+ if (AllowLoadData(sSubStr) != false)//闈炵┖楠岃瘉
+ {
+ //鎷兼帴搴忓垪鍖栫殑鏁版嵁
+ var msg = sMainStr + ';' + JSON.stringify(sSubStr);
+
+ layer.load(3);
+ $.ajax(
+ {
+ type: "POST",
+ url: GetWEBURL() + "/WEBSController/set_SaveMoveStockBill_AutoBarCode_Json",
+ async: false, //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
+ data: { "oMain": msg },
+ dataType: "json",
+ success: function (data) {
+ if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜�
+ layer.confirm(data.Message, {
+ icon: 1, skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", closeBtn: 0, btn: ['鏂板','鍏抽棴'],
+ btn2: function () {
+ parent.location.href = "../../../views/index_Mobile.html";
+ }//鍏抽棴
+ }
+ , function () {
+ location.replace('Kf_MoveStockBill_AutoBarCode_PDA.html?OperationType=1&HInterID=0');
+ });//鏂板
+ }
+ else {
+ layer.msg(data.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ }
+ },
+ complete: function (XHR, TS) { XHR = null },//鍥炴敹璧勬簮
+ error: function (err) {
+ layer.msg("閿欒:" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ }
+ });
+ layer.closeAll("loading");
+ return;
+ }
+ });
+
+ //#endregion
+
+ //#region 閫�鍑�
+
+ form.on('submit(cmdCancel)', function () {
+ layer.confirm('鎮ㄧ‘瀹氳閫�鍑哄悧锛�', { icon: 3, title: '鎻愮ず' }, function (index) {
+ if (OperationType == 2) {
+ var index = parent.layer.getFrameIndex(window.name); //鍏堝緱鍒板綋鍓峣frame灞傜殑绱㈠紩
+ parent.location.reload(); //鍒锋柊鐖堕〉闈紝娉ㄦ剰涓�瀹氳鍦ㄥ叧闂綋鍓峣frame灞備箣鍓嶆墽琛屽埛鏂�
+ parent.layer.close(index); //鍐嶆墽琛屽叧闂�
+ }
+ else {
+ parent.location.href = "../../../views/index_Mobile.html";
+ }
+ });
+ })
+
+ //#endregion
+
+ //#endregion
+
+
+ //#region 婧愬崟閫夋嫨
+
+ form.on('submit(cmdHSourceBillNo)', function () {
+ var HSourceTitle = "";
+ var HSourceBillType = $("#HMainSourceBillType").val()
+ if (HSourceBillType == '3720') {
+ 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
+
+ //#region 鎵弿婧愬崟鏉$爜
+
+ //鎵弿婧愬崟鏉$爜
+ $('#HSourceBillNo').on('keydown', function (event) {
+ if (event.keyCode == 13) {
+ GetMeesageBySourceBillNo();
+ }
+ });
+
+ //婧愬崟鎸夐挳
+ form.on('submit(HSourceBillNo-BT)', function (data) {
+ GetMeesageBySourceBillNo();
+ });
+
+ //鎵弿婧愬崟鏉$爜
+ function GetMeesageBySourceBillNo(obj) {
+ var HSourceBillNo = $('#HSourceBillNo').val()
+ var HSourceBillType = $("#HMainSourceBillType").val()
+
+ layer.load(3)
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "/WEBSController/get_SourceBarCode_MoveStock_AutoBarCode_Json",
+ async: false, //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
+ data: { "HInterID": HInterID, "HBillNo": HBillNo, "HBillType": HBillType, "HSourceBillNo": HSourceBillNo, "HSourceBillType": HSourceBillType, "HMaker": HMaker, "HOWNERID": HStockOutOrgID },
+ success: function (result) {
+ if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ playSound_OK();
+ $("#HSourceBillNo").val(result.data[0].HSourceBillNo);
+ $("#HMainSourceBillType").attr("disabled", "disabled");
+ $("#HSourceBillNo").attr("disabled", "disabled");
+ $('#HSourceBillNo-BT').addClass("layui-btn-disabled").attr("disabled", true);//鎸夐挳绂佺敤
+ $('#cmdHSourceBillNo').addClass("layui-btn-disabled").attr("disabled", true);//鎸夐挳绂佺敤
+ $("#HStockStyle").val(result.data[0].HStockStyle);
+ $("#HStockStyle").attr("disabled", "disabled");
+ $("#HStockInOrgID").val(result.data[0].HStockInOrgID);
+ $("#HStockInOrgID").attr("disabled", "disabled");
+ $("#HStockOutOrgID").val(result.data[0].HStockOutOrgID);
+ $("#HStockOutOrgID").attr("disabled", "disabled");
+ form.render('select');
+ HStockInOrgID = $('#HStockInOrgID').val()
+ HStockOutOrgID = $('#HStockOutOrgID').val()
+ element.tabChange('tab-Kf_MoveStockBill_AutoBarCode_PDA', '2');
+ //鏄剧ず琛ㄤ綋鏄庣粏
+ DisBillEntryList();
+ }
+ else {
+ playSound();
+ layer.msg(result.Message, {
+ icon: 5, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", btn: ['纭']
+ }, function () {
+ element.tabChange('tab-Kf_MoveStockBill_AutoBarCode_PDA', '1');
+ $("#HSourceBillNo").select();
+ $("#HSourceBillNo").focus();
+ });
+ }
+ },
+ complete: function (XHR, TS) { XHR = null }//鍥炴敹璧勬簮
+ });
+ layer.closeAll("loading");
+ }
+
+ //#endregion
+
+
+ //#region 鏄剧ず鐗╂枡鍒楄〃淇℃伅
+
+ function DisBillEntryList() {
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + '/WEBSController/GetBillEntryTmpList_Json',
+ async: false, //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
+ data: { "HInterID": HInterID, "HBillNo": HBillNo, "HBillType": HBillType, "HStockOrgID": HStockOutOrgID },
+ success: function (result) {
+ var data = [];
+ var col = [];
+ if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ //缁欑┖鐨勬暟缁勮祴鍊�
+ for (var key in result.list) {
+ //鍔ㄦ�佽幏鍙栧垪琛ㄦ墍鏈夊垪鍚�
+ data.push({ "id": result.list[key].ColmCols, "name": result.list[key].ColmCols, "Type": result.list[key].ColmType });
+ //鑾峰彇涓嶉渶瑕佹樉绀虹殑鍒楋紙H寮�澶寸殑鍒椾笉鏄剧ず锛�
+ var patrn = new RegExp(/^h/i);
+ if (patrn.test(result.list[key].ColmCols)) {
+ titleData[key] = result.list[key].ColmCols;
+ }
+ }
+
+ //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+ 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鍒�
+ }
+ else {
+ switch (data[i].Type) {
+ //int
+ case 'DateTime':
+ col.push({ field: data[i].id, title: data[i].name, align: 'left', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 120 });
+ break;
+ default:
+
+ if (data[i].name == '鏁伴噺') {
+ col.push({ field: 'HQty', title: data[i].name, edit: 'text', align: 'left', totalRow: true });
+ }
+ else if (data[i].name == '婧愬崟鏁伴噺') {
+ col.push({ field: data[i].id, title: data[i].name, align: 'left', totalRow: true });
+ } else if (data[i].name == '鐗╂枡鍚嶇О' || data[i].name == '瑙勬牸鍨嬪彿') {
+ col.push({ field: data[i].id, title: data[i].name, align: 'left', width: 180 });
+ } else {
+ col.push({ field: data[i].id, title: data[i].name, align: 'left', width: 150 });
+ }
+ }
+ }
+ }
+ columns = col;
+ listOption.cols = [columns];
+ listOption.data = result.data.Materlist;
+ listOption.totalRow = true;
+ table.cache['wl-table'] = null; //娓呯┖琛ㄦ牸缂撳瓨鏁版嵁
+ table.render(listOption);
+ }
+ else {
+ listOption.cols = [[
+ { field: '鏁伴噺', title: '鏁伴噺', width: 100 }
+ , { field: '婧愬崟鏁伴噺', title: '婧愬崟鏁伴噺', width: 100 }
+ , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 100 }
+ , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 100 }
+ , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 100 }
+ , { field: '杈呭姪灞炴��', title: '杈呭姪灞炴��', width: 100 }
+ , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', width: 100 }
+ ]];
+ listOption.data = data;
+ table.render(listOption);
+ }
+ },
+ complete: function (XHR, TS) { XHR = null }//鍥炴敹璧勬簮
+ });
+ }
+
+ //#endregion
+
+
+ //#region 閫夋嫨璋冩嫧绫诲瀷
+ form.on('select(HStockStyle)', function (data) {
+ if ($("#HStockStyle").val() == '璺ㄧ粍缁囪皟鎷�') {
+ $("#HStockInOrgID").attr("disabled", false);
+ form.render('select');
+ }
+ else {
+ $("#HStockInOrgID").val(sessionStorage["OrganizationID"]);
+ $("#HStockInOrgID").attr("disabled", true);
+ form.render('select');
+ if (HStockInOrgID != $('#HStockInOrgID').val()) {
+ HStockInOrgID = $('#HStockInOrgID').val()
+ }
+ }
+ });
+
+ //#endregion
+
+
+ //#region 閫夋嫨璋冨叆缁勭粐
+ form.on('select(HStockInOrgID)', function (data) {
+ HStockInOrgID = $('#HStockInOrgID').val()
+ });
+
+ //#endregion
+
+
+ //#region 鐩戝惉鍗曞厓鏍肩紪杈� 鍗曞厓鏍肩紪杈戝悗 鍙樻洿
+ table.on('edit(wl-table)', function (obj) {
+ //鏁板�兼牸寮忔牎楠屽伐鍏�
+ var ref = /^\d+(\.\d+)?$/; //闈炶礋鏁版鍒欒〃杈惧紡
+ var temp = "";
+
+ var value = obj.value //寰楀埌淇敼鍚庣殑鍊�
+ , data = obj.data //寰楀埌鎵�鍦ㄨ鎵�鏈夐敭鍊�
+ , field = obj.field; //寰楀埌瀛楁
+
+ switch (field) {
+ case "HQty": //鏁伴噺
+ //鏁版嵁鏍煎紡鏍¢獙
+ temp = value + "";
+ if (!ref.test(temp)) {
+ //鎵�杈撳叆鏁版嵁涓嶄负鏁板瓧锛岄粯璁や负0
+ obj.update({
+ HQty: 0
+ });
+ table.render(listOption);
+ return;
+ }
+
+ //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
+ var HQty = isNaN(value) ? 0 : value; //鏁伴噺
+
+ //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+ obj.update({
+ HQty: HQty
+ });
+ table.render(listOption);
+ break;
+ default:
+ }
+ });
+ //#endregion
+
+ });
+
+ //浠ヤ笂涓簂ayui妯″潡
+ //姝ゅ鏂规硶娑夊強鍒拌澶栭儴椤甸潰parent.鏂规硶鍚嶈皟鐢ㄧ殑蹇呴』鏀惧湪Layui鏂规硶澶栭儴
+
+ //鐐瑰嚮鎸夐挳閫夋嫨鍚� 杩斿洖婧愬崟鍗曞彿
+ function GetHSourceBillValue(obj) {
+ if (obj.length > 0) {
+ $("#HSourceBillNo").val(obj[0].鍗曟嵁鍙�);
+ $("#HSourceBillListCtl").val("1");
+ }
+ }
+
+ //鍗曟嵁涓婁紶鍓嶅垽鏂�
+ function AllowLoadData(sSubStr) {
+ if (HInterID == 0) {
+ layer.msg("鍗曟嵁鍐呯爜鑾峰彇澶辫触锛岄敊璇殑鍗曟嵁鍐呯爜锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ return false;
+ }
+ if (HBillNo == '') {
+ layer.msg("鍗曟嵁鍙疯幏鍙栧け璐ワ紝閿欒鐨勫崟鎹彿锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ return false;
+ }
+ if (sSubStr.length == 0) {
+ layer.msg("娌℃湁鎵爜淇℃伅锛岃鍏堟壂鎻忔潯鐮侊紝纭鏃犺鍚庡啀鎻愪氦锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ return false;
+ }
+ else {
+ var s = 0;
+ for (var i = 0; i <= sSubStr.length - 1; i++) {
+ // 灏濊瘯灏� HQty 灞炴�цВ鏋愪负鏁板瓧
+ let quantity = parseFloat(sSubStr[i].HQty) || 0;
+
+ // 妫�鏌ヨВ鏋愬悗鐨勫�兼槸鍚︿负 NaN锛堜笉鏄竴涓暟瀛楋級
+ if (isNaN(quantity)) {
+ // 濡傛灉鏄� NaN锛屽垯灏嗗叾璁剧疆涓� 0
+ sSubStr[i].HQty = 0;
+ } else if (sSubStr[i].HQty > 0) {
+ s = 1;
+ }
+ }
+ if (s == 0) {
+ layer.msg("鑷冲皯闇�瑕佸瓨鍦ㄤ竴琛屾暟閲忓ぇ浜�0 鐨勬暟鎹紝璇风‘璁ゆ棤璇悗鍐嶆彁浜わ紒", { icon: 5, btn: ['纭'], time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ return false;
+ }
+ }
+ return true;
+ }
+ </script>
+
+</body>
+</html>
diff --git a/WebTM/views/home/console_Mobile.html b/WebTM/views/home/console_Mobile.html
index 787b2af..d0c42de 100644
--- a/WebTM/views/home/console_Mobile.html
+++ b/WebTM/views/home/console_Mobile.html
@@ -225,6 +225,12 @@
<cite style="white-space:pre-wrap">鏍峰搧閿�鍞嚭搴撳崟</cite>
</a>
</li>
+ <li class="layui-col-xs3">
+ <a href="../WMS鎵爜妯″潡/鐢熶骇璋冩嫧/Kf_MoveStockBill_AutoBarCode_PDA.html" target="main_self_frame">
+ <i class="layui-icon layui-icon-template-1"></i>
+ <cite style="white-space:pre-wrap">鍏嶆壂鐮佽皟鎷�</cite>
+ </a>
+ </li>
</ul>
</div>
</div>
--
Gitblit v1.9.1