From e4fc4be3a162854c2acbd521c72bd1c8c7d39d01 Mon Sep 17 00:00:00 2001
From: zgq <519541279@qq.com>
Date: 星期四, 05 八月 2021 17:03:02 +0800
Subject: [PATCH] 扫码详情
---
WebTM/layuiadmin/Scripts/webConfig.js | 3
WebTM/views/领料发货/领料出库/Kf_MateOutBill_Fast.html | 1264 +++++++++++++++++++++++++++-------------------------
WebTM/views/Baseset/基础资料/WMSBarCodeDetailsList.html | 166 ++++++
WebTM/WebTM.csproj | 1
4 files changed, 833 insertions(+), 601 deletions(-)
diff --git a/WebTM/WebTM.csproj b/WebTM/WebTM.csproj
index 6afc8fc..1f343e9 100644
--- a/WebTM/WebTM.csproj
+++ b/WebTM/WebTM.csproj
@@ -300,6 +300,7 @@
<Content Include="views\Baseset\鍩虹璧勬枡\Gy_StockPlaceList.html" />
<Content Include="views\Baseset\鍩虹璧勬枡\Gy_SupplierList.html" />
<Content Include="views\Baseset\鍩虹璧勬枡\Gy_WarehouseList.html" />
+ <Content Include="views\Baseset\鍩虹璧勬枡\WMSBarCodeDetailsList.html" />
<Content Include="views\component\anim\index.html" />
<Content Include="views\component\auxiliar\index.html" />
<Content Include="views\component\badge\index.html" />
diff --git a/WebTM/layuiadmin/Scripts/webConfig.js b/WebTM/layuiadmin/Scripts/webConfig.js
index ff2571a..e0be535 100644
--- a/WebTM/layuiadmin/Scripts/webConfig.js
+++ b/WebTM/layuiadmin/Scripts/webConfig.js
@@ -1,9 +1,10 @@
锘縡unction GetWEBURL() {
- var WEBURL = "http://61.130.49.162:9090/WMSAPI//"; //寮�灞卞缃�
+ //var WEBURL = "http://61.130.49.162:9090/WMSAPI//"; //寮�灞卞缃�
//var WEBURL = "http://192.168.16.80:8011/"; //鍔炲叕瀹ゆ湇鍔″櫒
//var WEBURL = "http://192.168.235.1:8011/"; //闄堣埅
//var WEBURL = "http://192.168.3.7:8011/"; //瀹堕噷鏃犵嚎
//var WEBURL = "http://localhost:8086/API";
+ var WEBURL = "http://localhost:8085/API/"; //zgq鏈湴
//61.130.49.162:9090
//WEBURL = "";
return WEBURL
diff --git "a/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/WMSBarCodeDetailsList.html" "b/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/WMSBarCodeDetailsList.html"
new file mode 100644
index 0000000..173854a
--- /dev/null
+++ "b/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/WMSBarCodeDetailsList.html"
@@ -0,0 +1,166 @@
+锘�<!DOCTYPE html>
+<html>
+<head>
+ <meta 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.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
+ <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
+ <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
+ <style type="text/css">
+ .layui-form-label {
+ width: 85px;
+ }
+ </style>
+</head>
+<body>
+
+ <div id="layout1" class="layui-fluid">
+ <div class="layui-row layui-col-space15">
+ <div class="layui-col-md12">
+ <div class="layui-card">
+ <div class="layui-card-body" style="padding: 15px;">
+ <form class="layui-form" action="" lay-filter="component-form-group">
+ <div class="layui-form-item">
+ <div class="layui-inline">
+ <!--<button type="button" lay-submit="" class="layui-btn" lay-filter="FH">杩斿洖</button>-->
+ <button type="button" lay-submit="" class="layui-btn" lay-filter="Exit">閫�鍑�</button>
+ </div>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
+ <script type="text/html" id="barDemo">
+ <!--<a class="layui-btn layui-btn-xs" lay-event="edit">缂栬緫</a>-->
+ <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a>
+ </script>
+ <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>
+
+ layui.config({
+ base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+ }).extend({
+ index: 'lib/index' //涓诲叆鍙fā鍧�
+ }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
+ var $ = layui.$
+ , admin = layui.admin
+ , layer = layui.layer
+ , table = layui.table
+ , form = layui.form
+ , laydate = layui.laydate
+ , element = layui.element;
+
+ //鑾峰彇鍙傛暟
+ 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 HInterID = params[params[0]];
+ var HBillType = params[params[1]];
+ form.on('submit(FH)', function () {
+ var checkStatus = table.checkStatus('ck-table')
+ , data = checkStatus.data;
+ parent.GetHKeeperValue(data);
+ var index = parent.layer.getFrameIndex(window.name);
+ parent.layer.close(index);
+ });
+ form.on('submit(Exit)', function () {
+ var index = parent.layer.getFrameIndex(window.name);
+ parent.layer.close(index);
+ });
+ RoadQuery(HInterID, HBillType);
+ table.render({
+ elem: '#mainTable'
+ // , url: '/demo/table/user/'
+ //, toolbar: '#toolbarDemo'
+ , data: []
+ //, cellMinWidth: 80 //鍏ㄥ眬瀹氫箟甯歌鍗曞厓鏍肩殑鏈�灏忓搴︼紝layui 2.2.1 鏂板
+ , height: 'full-1000'
+ , cols: [[
+ { type: 'radio' }
+ , { field: 'HInterID', width: 150, title: 'HInterID', hide: true }//, hide: true
+ , { field: 'HBillType', width: 150, title: '鍗曟嵁绫诲瀷' }
+ , { field: 'HMaterID', width: 150, title: 'HMaterID', hide: true }
+ , { field: 'HMaterNumber', width: 150, title: '浜у搧缂栫爜' }
+ , { field: 'HMaterName', width: 150, title: '浜у搧鍚嶇О' }
+ , { field: 'HMaterModel', width: 150, title: '瑙勬牸鍨嬪彿' }
+ , { field: 'HQty', width: 150, title: '鏁伴噺' }
+ , { field: 'HQtyMust', width: 150, title: '搴旀敹鏁伴噺' }
+ , { field: 'HBatchNo', width: 150, title: '鎵规' }
+ , { field: 'HPieceQty', width: 150, title: '浠舵暟' }
+ , { fixed: 'right', width: 70, title: '鎿嶄綔', toolbar: '#barDemo' }
+ ]]
+ //, page: true
+ });
+ ///鍔犺浇鏄剧ず鏁版嵁
+ function RoadQuery(HInterID, HBillType) {
+ $.ajax({
+ type: "get",
+ url: GetWEBURL() + "/Web/GetWMSBarCodeDetailsList",
+ async: true,
+ data: { "HInterID": HInterID, "HBillType": HBillType },
+ success: function (result) {
+ ajaxReturnData = JSON.parse(JSON.stringify(result)).data;
+ table.reload('mainTable', {
+ data: ajaxReturnData
+ , height: 'full-1000'
+ , loading: false
+ , done: function (index, res) {
+
+ }
+ });
+ },
+ error: function (result) {
+ console.log(result);
+ //layer.msg('鑾峰彇閲囪喘璁㈠崟鍑虹幇寮傚父', { icon: 2, time: 2000 });
+ }
+ });
+ };
+
+ //琛屽唴浜嬩欢
+ table.on('tool(mainTable)', function (obj) {
+ var data = obj.data;
+ if (obj.event === 'del') {
+ layer.confirm('鐪熺殑鍒犻櫎琛屼箞', function (index) {
+ $.ajax({
+ url: GetWEBURL() + '/Web/DelCacheList',
+ type: "GET",
+ data: { "sHitemID": data.HitemID },
+ success: function (data) {
+ if (data.count == 1) {
+ layer.close(index);
+ obj.del(); //鍒犻櫎瀵瑰簲琛岋紙tr锛夌殑DOM缁撴瀯
+ layer.msg('鍒犻櫎鎴愬姛');
+ } else {
+ layer.alert(data.code + data.msg, { icon: 5 });
+ }
+ }, error: function () {
+ layer.msg("鎺ュ彛璇锋眰澶辫触!", {
+ icon: 5, btn: ['纭'], time: 100000, offset: 't',
+ skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず"
+ });
+ }
+ });
+ });
+ }
+ });
+ //浠ヤ笂涓簂ayui妯″潡
+ });
+ </script>
+</body>
+</html>
\ No newline at end of file
diff --git "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\242\206\346\226\231\345\207\272\345\272\223/Kf_MateOutBill_Fast.html" "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\242\206\346\226\231\345\207\272\345\272\223/Kf_MateOutBill_Fast.html"
index 8ca9a6b..49ea27b 100644
--- "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\242\206\346\226\231\345\207\272\345\272\223/Kf_MateOutBill_Fast.html"
+++ "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\242\206\346\226\231\345\207\272\345\272\223/Kf_MateOutBill_Fast.html"
@@ -8,6 +8,18 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
+ <style>
+ /*.layui-table-body{
+ height:auto;
+ }*/
+ .layui-table-fixed .layui-table-body {
+ height: auto !important;
+ }
+
+ .layui-table-fixed.layui-hide {
+ display: block !important;
+ }
+ </style>
</head>
<!--<style>
@media screen and (max-width: 450px) {
@@ -32,6 +44,7 @@
}
}
</style>-->
+
<body>
<div class="layui-fluid">
<div class="layui-card" style="padding: 1px">
@@ -79,7 +92,7 @@
<option value="-1">鎵嬪伐褰曞叆</option>
</select>
</div>
- </div>
+ </div>
</div>
<div class="layui-form-item">
<div class="layui-row">
@@ -89,10 +102,10 @@
<div class="layui-col-xs8">
<input type="text" name="HSourceBillNo" id="HSourceBillNo" lay-verify="HSourceBillNo" autocomplete="off" class="layui-input">
</div>
- </div>
+ </div>
</div>
</div>
- <div class="layui-tab-item" >
+ <div class="layui-tab-item">
<div class="layui-form-item" style="padding:0px;margin:0px">
<div class="layui-row">
<div class="layui-col-xs3">
@@ -210,13 +223,13 @@
</div>
</div>
</div>
- <table class="layui-hide" id="wl-table" lay-filter="wl-table" ></table>
+ <table class="layui-hide" id="wl-table" lay-filter="wl-table"></table>
</div>
<div class="layui-tab-item">
<table class="layui-hide" id="mx-table" lay-filter="mx-table"></table>
</div>
<div class="layui-tab-item">
- <table class="layui-hide" id="fj-table-qd" lay-filter="fj-table-qd" ></table>
+ <table class="layui-hide" id="fj-table-qd" lay-filter="fj-table-qd"></table>
</div>
</div>
<div class="layui-form-item" style="margin-bottom: 20px;">
@@ -244,236 +257,240 @@
<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 type="text/html" id="barDemo">
+ <a class="layui-btn layui-btn-xs" lay-event="edit">缂栬緫</a>
+ </script>
<script>
- layui.config({
- base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
- }).extend({
- index: 'lib/index' //涓诲叆鍙fā鍧�
- }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
- var $ = layui.$
- , admin = layui.admin
- , layer = layui.layer
- , table = layui.table
- , form = layui.form
- , element = layui.element;
+ layui.config({
+ base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+ }).extend({
+ index: 'lib/index' //涓诲叆鍙fā鍧�
+ }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
+ var $ = layui.$
+ , admin = layui.admin
+ , layer = layui.layer
+ , table = layui.table
+ , form = layui.form
+ , element = layui.element;
- $("#HWHID").val(sessionStorage["HWHID"]);
- $("#HWHNAME").val(sessionStorage["HWHName"]);
- $("#HStockPlaceID").val(sessionStorage["HSPID"]);
- $("#HStockPlaceName").val(sessionStorage["HSPName"]);
- //$("#HSupID").val(sessionStorage["HSupID"]);
- //$("#HSupName").val(sessionStorage["HSupName"]);
- $("#HDeptID").val(sessionStorage["HDeptID"]);
- $("#HDeptName").val(sessionStorage["HDept"]);
- $("#HSecManagerID").val(sessionStorage["HSecManagerID"]);
- $("#HSecManager").val(sessionStorage["HSecManager"]);
- $("#HKeeperID").val(sessionStorage["HKeeperID"]);
- $("#HKeeper").val(sessionStorage["HKeeper"]);
- $("#HMaker").val(sessionStorage["HUserName"]);
- $("#HMaker").hide();
- $("#HMakerID").hide();
- $("#HBillerID").val(sessionStorage["HBillerID"]);
- $("#HBillerID").hide();
+ $("#HWHID").val(sessionStorage["HWHID"]);
+ $("#HWHNAME").val(sessionStorage["HWHName"]);
+ $("#HStockPlaceID").val(sessionStorage["HSPID"]);
+ $("#HStockPlaceName").val(sessionStorage["HSPName"]);
+ //$("#HSupID").val(sessionStorage["HSupID"]);
+ //$("#HSupName").val(sessionStorage["HSupName"]);
+ $("#HDeptID").val(sessionStorage["HDeptID"]);
+ $("#HDeptName").val(sessionStorage["HDept"]);
+ $("#HSecManagerID").val(sessionStorage["HSecManagerID"]);
+ $("#HSecManager").val(sessionStorage["HSecManager"]);
+ $("#HKeeperID").val(sessionStorage["HKeeperID"]);
+ $("#HKeeper").val(sessionStorage["HKeeper"]);
+ $("#HMaker").val(sessionStorage["HUserName"]);
+ $("#HMaker").hide();
+ $("#HMakerID").hide();
+ $("#HBillerID").val(sessionStorage["HBillerID"]);
+ $("#HBillerID").hide();
- //鑾峰彇鍙傛暟
- 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];
+ //鑾峰彇鍙傛暟
+ 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;
}
- return vars;
- }
- var params = getUrlVars();
- var linterid = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鍗曟嵁鍐呯爜
- var lSourceBillType = params[params[2]]; //浠庡崟鎹幏鍙� 婧愬崟绫诲瀷
+ var params = getUrlVars();
+ var linterid = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鍗曟嵁鍐呯爜
+ var lSourceBillType = params[params[2]]; //浠庡崟鎹幏鍙� 婧愬崟绫诲瀷
- function RoadBillMain(linterid)//鍔犺浇琛ㄥご
- {
- $.ajax({
- url: GetWEBURL() + "/Web/GetPonderationBill",
- type: "GET",
- data: { "HInterID": linterid },
- success: function (d) {
- // console.log(d.data);
- $("#HInterID").val(d.data[0].HInterID);
- $("#HBillNo").val(d.data[0].HBillNo);
- $("#HBillType").val(d.data[0].HSourceBillType);
- $("#HSourceBillNo").val(d.data[0].HSourceBillNo);
- //$("#HWHID").val(d.data[0].HWhID);
- //$("#HKeeperID").val(d.data[0].HKeeperID);
- //$("#HSecManagerID").val(d.data[0].HSecManagerID);
- //$("#HDeptID").val(d.data[0].HDeptID);
- //$("#HBarCode").val(d.data[0].HBarCode);
- //$("#HQty").val(d.data[0].HQty);
- }
- })
- }
+ function RoadBillMain(linterid)//鍔犺浇琛ㄥご
+ {
+ $.ajax({
+ url: GetWEBURL() + "/Web/GetPonderationBill",
+ type: "GET",
+ data: { "HInterID": linterid },
+ success: function (d) {
+ // console.log(d.data);
+ $("#HInterID").val(d.data[0].HInterID);
+ $("#HBillNo").val(d.data[0].HBillNo);
+ $("#HBillType").val(d.data[0].HSourceBillType);
+ $("#HSourceBillNo").val(d.data[0].HSourceBillNo);
+ //$("#HWHID").val(d.data[0].HWhID);
+ //$("#HKeeperID").val(d.data[0].HKeeperID);
+ //$("#HSecManagerID").val(d.data[0].HSecManagerID);
+ //$("#HDeptID").val(d.data[0].HDeptID);
+ //$("#HBarCode").val(d.data[0].HBarCode);
+ //$("#HQty").val(d.data[0].HQty);
+ }
+ })
+ }
- function RoadBillSub(linterid)//鍔犺浇琛ㄤ綋
- {
- table.render({
- elem: '#wl-table'
- , url: GetWEBURL1() + '/MateOutBill/DisBillEntryList_Webs_New_Json'
- //, cellMinWidth: 80
- , toolbar: '#toolbarDemo'
- , where: { HBillID: linterid, HBillType: '1204', sWhere: '' }
- , cols: [[
- { type: 'radio' }
- , { field: 'HSNO', title: '搴忓彿', width: 60 }
- , { field: 'HQty', title: '鏁伴噺', width: 80 }
- , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 80 }
- , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 90 }
- , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 110 }
- , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 90 }
- , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 90 }
- , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 90 }
- , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 90 }
- , { field: 'HBatchNo', title: '鎵规', width: 90 }
- ]]
- // , data: [linterid]
- // , page: true
- , height: 500
- , done: function () {
- layer.closeAll("loading");
- }
+ function RoadBillSub(linterid)//鍔犺浇琛ㄤ綋
+ {
+ table.render({
+ elem: '#wl-table'
+ , url: GetWEBURL1() + '/MateOutBill/DisBillEntryList_Webs_New_Json'
+ //, cellMinWidth: 80
+ , toolbar: '#toolbarDemo'
+ , where: { HBillID: linterid, HBillType: '1204', sWhere: '' }
+ , cols: [[
+ { type: 'radio' }
+ , { field: 'HSNO', title: '搴忓彿', width: 60 }
+ , { field: 'HQty', title: '鏁伴噺', width: 80 }
+ , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 80 }
+ , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 90 }
+ , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 110 }
+ , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 90 }
+ , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 90 }
+ , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 90 }
+ , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 90 }
+ , { field: 'HBatchNo', title: '鎵规', width: 90 }
+ , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 }
+ ]]
+ // , data: [linterid]
+ // , page: true
+ , height: 500
+ , done: function () {
+ layer.closeAll("loading");
+ }
+ });
+ }
+
+
+
+ //鍔ㄦ�佸姞杞芥簮鍗曠被鍨嬪垪琛� new
+
+ //琛ㄥご鍒濆鍖栬祴鍊硷紙鏍规嵁鐧诲綍鐢ㄦ埛鑾峰彇 榛樿浠撳簱銆侀儴闂ㄣ�侀獙鏀躲�佷繚绠°�侀噾铦剁敤鎴凤級 new
+
+ //鑾峰彇鏈�澶у崟鎹彿 new
+
+ //榛樿甯﹀叆鐨勪粨搴擄紝濡傛灉鍚敤浠撲綅鍒欎粨浣嶆湁鏁堬紝濡傛灉娌℃湁鍚敤鍒欎粨浣嶇伆搴� new
+
+ //鍒ゆ柇鏄惁鏂板
+ if (linterid == null || linterid == 0) {
+ $("#HInterID").val("");
+ $("#HBillNo").val("");
+ $.ajax({
+ url: GetWEBURL() + "/Web/GetMAXNum",
+ type: "GET",
+ data: { "HBillType": '1204' },
+ success: function (d) {
+ //console.log(d.data);
+ $("#HInterID").val(d.data[0].HInterID);
+ $("#HBillNo").val(d.data[0].HBillNo);
+ }
+ });
+ }
+ else {//濡傛灉淇敼鍒欒蛋涓嬮潰 new
+ RoadBillMain(linterid);
+ RoadBillSub(linterid);
+ }
+
+ form.on('submit(HWHID-BT)', function () {//閫夋嫨浠撳簱
+ layer.open({
+ type: 2
+ , area: ['100%', '100%']
+ , title: '浠撳簱鍒楄〃'
+ , shade: 0.6 //閬僵閫忔槑搴�
+ , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+ , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+ , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_WarehouseList.html?Type=HWHID', 'yes']
+ , resize: false
+ , cancel: function () {
+ //$(".layui-btn").removeClass("layui-btn-disabled");
+ }
+ })
});
- }
-
-
-
- //鍔ㄦ�佸姞杞芥簮鍗曠被鍨嬪垪琛� new
-
- //琛ㄥご鍒濆鍖栬祴鍊硷紙鏍规嵁鐧诲綍鐢ㄦ埛鑾峰彇 榛樿浠撳簱銆侀儴闂ㄣ�侀獙鏀躲�佷繚绠°�侀噾铦剁敤鎴凤級 new
-
- //鑾峰彇鏈�澶у崟鎹彿 new
-
- //榛樿甯﹀叆鐨勪粨搴擄紝濡傛灉鍚敤浠撲綅鍒欎粨浣嶆湁鏁堬紝濡傛灉娌℃湁鍚敤鍒欎粨浣嶇伆搴� new
-
- //鍒ゆ柇鏄惁鏂板
- if (linterid == null || linterid == 0) {
- $("#HInterID").val("");
- $("#HBillNo").val("");
- $.ajax({
- url: GetWEBURL() + "/Web/GetMAXNum",
- type: "GET",
- data: { "HBillType": '1204' },
- success: function (d) {
- //console.log(d.data);
- $("#HInterID").val(d.data[0].HInterID);
- $("#HBillNo").val(d.data[0].HBillNo);
- }
+ form.on('submit(HSpID-BT)', function () {//閫夋嫨浠撲綅
+ layer.open({
+ type: 2
+ , area: ['100%', '100%']
+ , title: '浠撲綅鍒楄〃'
+ , shade: 0.6 //閬僵閫忔槑搴�
+ , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+ , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+ , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_StockPlaceList.html?HWhID=' + sessionStorage["HWHID"] + '&Type=HSpID', 'yes']
+ , resize: false
+ , cancel: function () {
+ //$(".layui-btn").removeClass("layui-btn-disabled");
+ }
+ })
});
- }
- else {//濡傛灉淇敼鍒欒蛋涓嬮潰 new
- RoadBillMain(linterid);
- RoadBillSub(linterid);
- }
+ form.on('submit(HSupID-BT)', function () {//閫夋嫨渚涘簲鍟�
+ layer.open({
+ type: 2
+ , area: ['100%', '100%']
+ , title: '渚涘簲鍟嗗垪琛�'
+ , shade: 0.6 //閬僵閫忔槑搴�
+ , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+ , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+ , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_SupplierList.html', 'yes']
+ , resize: false
+ , cancel: function () {
+ //$(".layui-btn").removeClass("layui-btn-disabled");
+ }
+ })
+ });
+ form.on('submit(HKeeperID-BT)', function () {//閫夋嫨淇濈
+ layer.open({
+ type: 2
+ , area: ['100%', '100%']
+ , title: '棰嗘枡浜哄垪琛�'
+ , shade: 0.6 //閬僵閫忔槑搴�
+ , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+ , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+ , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HKeeper', 'yes']
+ , resize: false
+ , cancel: function () {
+ //$(".layui-btn").removeClass("layui-btn-disabled");
+ }
+ })
+ });
+ form.on('submit(HSecManagerID-BT)', function (data) {//閫夋嫨楠屾敹
+ var sMainStr = JSON.stringify(data.field);
+ layer.open({
+ type: 2
+ , area: ['100%', '100%']
+ , title: '鍙戞枡浜哄垪琛�'
+ , shade: 0.6 //閬僵閫忔槑搴�
+ , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+ , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+ , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HSecManager', 'yes']
+ , resize: false
+ , cancel: function () {
+ //$(".layui-btn").removeClass("layui-btn-disabled");
+ }
+ })
+ });
+ form.on('submit(HDeptID-BT)', function () {//閫夋嫨閮ㄩ棬
+ layer.open({
+ type: 2
+ , area: ['100%', '100%']
+ , title: '閮ㄩ棬鍒楄〃'
+ , shade: 0.6 //閬僵閫忔槑搴�
+ , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+ , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+ , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_DepartmentList.html', 'yes']
+ , resize: false
+ , cancel: function () {
+ //$(".layui-btn").removeClass("layui-btn-disabled");
+ }
+ })
+ });
- form.on('submit(HWHID-BT)', function () {//閫夋嫨浠撳簱
- layer.open({
- type: 2
- , area: ['100%', '100%']
- , title: '浠撳簱鍒楄〃'
- , shade: 0.6 //閬僵閫忔槑搴�
- , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
- , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
- , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_WarehouseList.html?Type=HWHID', 'yes']
- , resize: false
- , cancel: function () {
- //$(".layui-btn").removeClass("layui-btn-disabled");
- }
+ form.on('submit(Cancel)', function () {
+ parent.location.href = "../../../views/index.html"
+ //window.close();//鍏抽棴褰撳墠椤�
})
- });
- form.on('submit(HSpID-BT)', function () {//閫夋嫨浠撲綅
- layer.open({
- type: 2
- , area: ['100%', '100%']
- , title: '浠撲綅鍒楄〃'
- , shade: 0.6 //閬僵閫忔槑搴�
- , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
- , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
- , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_StockPlaceList.html?HWhID=' + sessionStorage["HWHID"] + '&Type=HSpID', 'yes']
- , resize: false
- , cancel: function () {
- //$(".layui-btn").removeClass("layui-btn-disabled");
- }
- })
- });
- form.on('submit(HSupID-BT)', function () {//閫夋嫨渚涘簲鍟�
- layer.open({
- type: 2
- , area: ['100%', '100%']
- , title: '渚涘簲鍟嗗垪琛�'
- , shade: 0.6 //閬僵閫忔槑搴�
- , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
- , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
- , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_SupplierList.html', 'yes']
- , resize: false
- , cancel: function () {
- //$(".layui-btn").removeClass("layui-btn-disabled");
- }
- })
- });
- form.on('submit(HKeeperID-BT)', function () {//閫夋嫨淇濈
- layer.open({
- type: 2
- , area: ['100%', '100%']
- , title: '棰嗘枡浜哄垪琛�'
- , shade: 0.6 //閬僵閫忔槑搴�
- , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
- , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
- , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HKeeper', 'yes']
- , resize: false
- , cancel: function () {
- //$(".layui-btn").removeClass("layui-btn-disabled");
- }
- })
- });
- form.on('submit(HSecManagerID-BT)', function (data) {//閫夋嫨楠屾敹
- var sMainStr = JSON.stringify(data.field);
- layer.open({
- type: 2
- , area: ['100%', '100%']
- , title: '鍙戞枡浜哄垪琛�'
- , shade: 0.6 //閬僵閫忔槑搴�
- , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
- , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
- , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HSecManager', 'yes']
- , resize: false
- , cancel: function () {
- //$(".layui-btn").removeClass("layui-btn-disabled");
- }
- })
- });
- form.on('submit(HDeptID-BT)', function () {//閫夋嫨閮ㄩ棬
- layer.open({
- type: 2
- , area: ['100%', '100%']
- , title: '閮ㄩ棬鍒楄〃'
- , shade: 0.6 //閬僵閫忔槑搴�
- , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
- , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
- , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_DepartmentList.html', 'yes']
- , resize: false
- , cancel: function () {
- //$(".layui-btn").removeClass("layui-btn-disabled");
- }
- })
- });
- form.on('submit(Cancel)', function () {
- parent.location.href = "../../../views/index.html"
- //window.close();//鍏抽棴褰撳墠椤�
- })
-
- form.on('submit(cmdModify)', function () {//缂栬緫
- var sSubStr = table.cache['wl-table'];
- //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
+ form.on('submit(cmdModify)', function () {//缂栬緫
+ var sSubStr = table.cache['wl-table'];
+ //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
layer.open({
type: 2
, area: ['100%', '100%']
@@ -487,199 +504,176 @@
//$(".layui-btn").removeClass("layui-btn-disabled");
}
})
- // }
- });
+ // }
+ });
- form.on('submit(cmdDelete)', function () {//鍒犻櫎
- var checkStatus = table.checkStatus('wl-table')
- , data = checkStatus.data;
- // console.log(data);
- var sInterID = $('#HInterID').val()
- var sMaterID = data[0].HMaterID
- var sBillType = '1204'
- var sAuxPropID = data[0].HAuxPropID
- //var sMTONo = data[0].HMTONo
- var sMTONo = ''
- var sSourceInterID = data[0].HSourceInterID
- var sSourceEntryID = data[0].HSourceEntryID
- $.ajax(
- {
- type: "Get",
- url: GetWEBURL() + "/MateOutBill/Delete_Json",
- async: true,
- data: { "HInterID": sInterID, "HMaterID": sMaterID, "HAuxPropID": sAuxPropID, "HMTONo": sMTONo, "HSourceInterID": sSourceInterID, "HSourceEntryID": sSourceEntryID, "sHBillType": sBillType, },
- dataType: "json",
- success: function (data) {
- if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
- //layer.msg(data.Message, { icon: 1 });
- table.render({
- elem: '#wl-table'
- , url: GetWEBURL1() + '/MateOutBill/DisBillEntryList_Webs_New_Json'
- //, cellMinWidth: 80
- , toolbar: '#toolbarDemo'
- , where: { HBillID: sInterID, HBillType: '1204', sWhere: '' }
- , cols: [[
- { type: 'radio' }
- , { field: 'HSNO', title: '搴忓彿', width: 60 }
- , { field: 'HQty', title: '鏁伴噺', width: 80 }
- , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 80 }
- , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
- , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
- , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
- , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 100 }
- , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 100 }
- , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 100 }
- , { field: 'HBatchNo', title: '鎵规', width: 100 }
- , { field: 'HAuxPropID', title: '杈呭姪灞炴��', width: 100 }
- , { field: 'HMTONo', title: '璁″垝璺熻釜鍙�', width: 100 }
- ]]
- , height: 500
- })
- }
- else {
- layer.msg(data.Message, { icon: 2 });
- }
- },
- error: function (err) {
- layer.msg('閿欒' + err, {
- icon: 5,
- time: 20000
- }, function () {
- //do something
- });
- }
- });
- });
-
- form.on('submit(Saver)', function (data) {//鎻愪氦
- //debugger;
- var sMainStr = JSON.stringify(data.field);
- var sSubStr = table.cache['wl-table'];
- var sSourceType = $("#HBillType").val();
- if (AllowLoadData(sSubStr) != false)//闈炵┖楠岃瘉
- {
- layer.load(3);
+ form.on('submit(cmdDelete)', function () {//鍒犻櫎
+ var checkStatus = table.checkStatus('wl-table')
+ , data = checkStatus.data;
+ // console.log(data);
+ var sInterID = $('#HInterID').val()
+ var sMaterID = data[0].HMaterID
+ var sBillType = '1204'
+ var sAuxPropID = data[0].HAuxPropID
+ //var sMTONo = data[0].HMTONo
+ var sMTONo = ''
+ var sSourceInterID = data[0].HSourceInterID
+ var sSourceEntryID = data[0].HSourceEntryID
$.ajax(
- {
- type: "POST",
- url: GetWEBURL() + "/MateOut/set_SaveMateOutBill_Json",
- async: true,
- data: { "oMain": sMainStr },
- dataType: "json",
- success: function (data) {
- if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
- layer.msg(data.Message + $("#HBillNo").val(), { icon: 1 });
+ {
+ type: "Get",
+ url: GetWEBURL() + "/MateOutBill/Delete_Json",
+ async: true,
+ data: { "HInterID": sInterID, "HMaterID": sMaterID, "HAuxPropID": sAuxPropID, "HMTONo": sMTONo, "HSourceInterID": sSourceInterID, "HSourceEntryID": sSourceEntryID, "sHBillType": sBillType, },
+ dataType: "json",
+ success: function (data) {
+ if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ //layer.msg(data.Message, { icon: 1 });
+ table.render({
+ elem: '#wl-table'
+ , url: GetWEBURL1() + '/MateOutBill/DisBillEntryList_Webs_New_Json'
+ //, cellMinWidth: 80
+ //, toolbar: '#toolbarDemo'
+ , where: { HBillID: sInterID, HBillType: '1204', sWhere: '' }
+ , cols: [[
+ { type: 'radio' }
+ , { field: 'HSNO', title: '搴忓彿', width: 60 }
+ , { field: 'HQty', title: '鏁伴噺', width: 80 }
+ , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 80 }
+ , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
+ , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+ , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
+ , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 100 }
+ , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 100 }
+ , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 100 }
+ , { field: 'HBatchNo', title: '鎵规', width: 100 }
+ , { field: 'HAuxPropID', title: '杈呭姪灞炴��', width: 100 }
+ , { field: 'HMTONo', title: '璁″垝璺熻釜鍙�', width: 100 }
+ ]]
+ , height: 500
+ })
+ }
+ else {
+ layer.msg(data.Message, { icon: 2 });
+ }
+ },
+ error: function (err) {
+ layer.msg('閿欒' + err, {
+ icon: 5,
+ time: 20000
+ }, function () {
+ //do something
+ });
}
- else {
- layer.msg(data.Message, { icon: 1 });
- }
- layer.closeAll("loading");
- },
- error: function (err) {
+ });
+ });
- layer.msg('閿欒' + err, {
- icon: 5,
- time: 20000
- }, function () {
- //do something
+ form.on('submit(Saver)', function (data) {//鎻愪氦
+ //debugger;
+ var sMainStr = JSON.stringify(data.field);
+ var sSubStr = table.cache['wl-table'];
+ var sSourceType = $("#HBillType").val();
+ if (AllowLoadData(sSubStr) != false)//闈炵┖楠岃瘉
+ {
+ layer.load(3);
+ $.ajax(
+ {
+ type: "POST",
+ url: GetWEBURL() + "/MateOut/set_SaveMateOutBill_Json",
+ async: true,
+ data: { "oMain": sMainStr },
+ dataType: "json",
+ success: function (data) {
+ if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ layer.msg(data.Message + $("#HBillNo").val(), { icon: 1 });
+ }
+ else {
+ layer.msg(data.Message, { icon: 1 });
+ }
+ layer.closeAll("loading");
+ },
+ error: function (err) {
+
+ layer.msg('閿欒' + err, {
+ icon: 5,
+ time: 20000
+ }, function () {
+ //do something
+ });
+ }
});
- }
- });
- return false;
- }
- });
- //鐩戝惉鎻愪氦
- form.verify({
- numberOrEmpty: function (value, item) {
- // if (value != '') {
- if (!/^\d+$/.test(value)) {
- return '涓嶈兘涓虹┖鎴栨暟瀛楁垨鑰�0';
- }
- //}
- }
- });
- $('#HBarCode').on('keydown', function (event) {
- var sBarCode = $('#HBarCode').val()
- var sInterID = $("#HInterID").val()
- var sBillNo = $("#HBillNo").val()
- var sQty = $("#HQty").val()
- var sHBillType = $("#HBillType").val() //婧愬崟绫诲瀷
- var sBillType = '1204'
- var sHWHID = $("#HWHID").val()
- var sHSPID = $("#HStockPlaceID").val()
- var sSourceBillNo = $("#HSourceBillNo").val()
- if (sQty == "") {
- sQty = 0;
- }
- if (sHBillType == '-1')
- {
- sSourceBillNo=''
- }
- if (event.keyCode == 13) {
- if (sBarCode == '') {
- layer.msg("鏉$爜涓虹┖锛屼笉鑳芥壂鎻忥紒", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
return false;
}
- if (sBarCode != "") {
- $('#HBarCode').val("");
+ });
+ //鐩戝惉鎻愪氦
+ form.verify({
+ numberOrEmpty: function (value, item) {
+ // if (value != '') {
+ if (!/^\d+$/.test(value)) {
+ return '涓嶈兘涓虹┖鎴栨暟瀛楁垨鑰�0';
+ }
+ //}
}
+ });
+ $('#HBarCode').on('keydown', function (event) {
+ var sBarCode = $('#HBarCode').val()
+ var sInterID = $("#HInterID").val()
+ var sBillNo = $("#HBillNo").val()
+ var sQty = $("#HQty").val()
+ var sHBillType = $("#HBillType").val() //婧愬崟绫诲瀷
+ var sBillType = '1204'
+ var sHWHID = $("#HWHID").val()
+ var sHSPID = $("#HStockPlaceID").val()
+ var sSourceBillNo = $("#HSourceBillNo").val()
if (sQty == "") {
sQty = 0;
}
- $.ajax({
- url: GetWEBURL() + "/MateOutBill/get_CheckTypeByBarCode_Json",
- type: "GET",
- data: { "sCode": sBarCode, "sInterID": sInterID,"HBillType": sBillType,"sBillNo": sBillNo, "sMaker": sessionStorage["HUserName"], "WhID": sHWHID, "SPID": sHSPID, "sQty": sQty, "sRedBlue": false, "SourceFlag": sessionStorage["SourceFlag"], "sSourceBillNo": sSourceBillNo, "sSourceType": sHBillType, "HOWNERID": 0 },
- success: function (result) {
- if (result.count == 1) {
- if (result.data.HBarType == '浠撳簱鏉$爜') {
- $("#HWHNAME").val(result.data.HWhName);
- $("#HWHID").val(result.data.HWhID);
- $("#HStockPlaceName").val("");
- $("#HNote").val(";涓�閿壂鐮佷粨搴撴潯鐮�");
- element.tabChange('tab-Kf_MateOutBill', '3'); //璺宠浆椤电
- }
- else if (result.data.HBarType == '浠撲綅鏉$爜') {
- $("#HStockPlaceName").val(result.data.HSPName);
- $("#HStockPlaceID").val(result.data.HSPID);
- $("#HWHNAME").val(result.data.HWhName);
- $("#HWHID").val(result.data.HWhID);
- $("#HNote").val(";涓�閿壂鐮佷粨浣嶆潯鐮�");
- element.tabChange('tab-Kf_MateOutBill', '3');//璺宠浆椤电
- }
- else if (result.data.HBarType == '閮ㄩ棬鏉$爜') {
- $("#HDeptName").val(result.data.HDeptName);
- $("#HDeptID").val(result.data.HDeptID);
- $("#HNote").val(";涓�閿壂鐮侀儴闂ㄦ潯鐮�");
- element.tabChange('tab-Kf_MateOutBill', '3');//璺宠浆椤电
- }
- else if (result.data.HBarType == '婧愬崟鏉$爜') {
- $("#HSupName").val(result.data.HSupName);
- $("#HSupID").val(result.data.HSupID);
- $("#HDeptName").val(result.data.HDeptName);
- $("#HDeptID").val(result.data.HDeptID);
- $("#HSourceBillNo").val(result.data.HSourceBillNo);
- sessionStorage["SourceFlag"] = true;
- //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
- if (result.data.HSourceBillType == "3720") {
- $("#HBillType").val("3720");
-
+ if (sHBillType == '-1') {
+ sSourceBillNo = ''
+ }
+ if (event.keyCode == 13) {
+ if (sBarCode == '') {
+ layer.msg("鏉$爜涓虹┖锛屼笉鑳芥壂鎻忥紒", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
+ return false;
+ }
+ if (sBarCode != "") {
+ $('#HBarCode').val("");
+ }
+ if (sQty == "") {
+ sQty = 0;
+ }
+ $.ajax({
+ url: GetWEBURL() + "/MateOutBill/get_CheckTypeByBarCode_Json",
+ type: "GET",
+ data: { "sCode": sBarCode, "sInterID": sInterID, "HBillType": sBillType, "sBillNo": sBillNo, "sMaker": sessionStorage["HUserName"], "WhID": sHWHID, "SPID": sHSPID, "sQty": sQty, "sRedBlue": false, "SourceFlag": sessionStorage["SourceFlag"], "sSourceBillNo": sSourceBillNo, "sSourceType": sHBillType, "HOWNERID": 0 },
+ success: function (result) {
+ if (result.count == 1) {
+ if (result.data.HBarType == '浠撳簱鏉$爜') {
+ $("#HWHNAME").val(result.data.HWhName);
+ $("#HWHID").val(result.data.HWhID);
+ $("#HStockPlaceName").val("");
+ $("#HNote").val(";涓�閿壂鐮佷粨搴撴潯鐮�");
+ element.tabChange('tab-Kf_MateOutBill', '3'); //璺宠浆椤电
}
- else {
- $("#HBillType").val("鎵嬪伐褰曞叆");
+ else if (result.data.HBarType == '浠撲綅鏉$爜') {
+ $("#HStockPlaceName").val(result.data.HSPName);
+ $("#HStockPlaceID").val(result.data.HSPID);
+ $("#HWHNAME").val(result.data.HWhName);
+ $("#HWHID").val(result.data.HWhID);
+ $("#HNote").val(";涓�閿壂鐮佷粨浣嶆潯鐮�");
+ element.tabChange('tab-Kf_MateOutBill', '3');//璺宠浆椤电
}
- $("#HNote").val(";涓�閿壂鐮佹簮鍗曟潯鐮�");
- element.tabChange('tab-Kf_MateOutBill', '3');
- }
- else {
- if (sessionStorage["SourceFlag"] == "true") {
- element.tabChange('tab-Kf_MateOutBill', '3');
+ else if (result.data.HBarType == '閮ㄩ棬鏉$爜') {
+ $("#HDeptName").val(result.data.HDeptName);
+ $("#HDeptID").val(result.data.HDeptID);
+ $("#HNote").val(";涓�閿壂鐮侀儴闂ㄦ潯鐮�");
+ element.tabChange('tab-Kf_MateOutBill', '3');//璺宠浆椤电
}
- else {
- //$("#HSupName").val(result.data.HSupName);
- //$("#HSupID").val(result.data.HSupID);
- //$("#HDeptName").val(result.data.HDeptName);
- //$("#HDeptID").val(result.data.HDeptID);
+ else if (result.data.HBarType == '婧愬崟鏉$爜') {
+ $("#HSupName").val(result.data.HSupName);
+ $("#HSupID").val(result.data.HSupID);
+ $("#HDeptName").val(result.data.HDeptName);
+ $("#HDeptID").val(result.data.HDeptID);
$("#HSourceBillNo").val(result.data.HSourceBillNo);
sessionStorage["SourceFlag"] = true;
//鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
@@ -687,214 +681,284 @@
$("#HBillType").val("3720");
}
- //else if (result.data.HSourceBillType == "1601") {
- // $("#HBillType").val("1601");
- //}
- $("#HNote").val(";鐗╂枡鏉$爜");
+ else {
+ $("#HBillType").val("鎵嬪伐褰曞叆");
+ }
+ $("#HNote").val(";涓�閿壂鐮佹簮鍗曟潯鐮�");
element.tabChange('tab-Kf_MateOutBill', '3');
}
- }
- //$("#HSupID").val(result.data.HSupID);
- //$("#HSupName").val(result.data.HSupName);
- //$("#HDeptID").val(result.data.HDeptID);
- //$("#HDeptName").val(result.data.HDeptName);
- layer.load(3)
- table.render({
- elem: '#wl-table'
- , url: GetWEBURL1() + '/MateOutBill/DisBillEntryList_Webs_New_Json'
- , toolbar: '#toolbarDemo'
- , where: { HBillID: sInterID, HBillType: '1204', sWhere: '' }
- , cols: [[
- { type: 'radio' }
- , { field: 'HSNO', title: '搴忓彿', width: 60 }
- , { field: 'HQty', title: '鏁伴噺', width: 80 }
- , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 80 }
- , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
- , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
- , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
- , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
- , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
- , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
- , { field: 'HBatchNo', title: '鎵规', width: 150 }
- ]]
- // , data: [linterid]
- // , page: true
- , height: 500
- , done: function () {
- layer.closeAll("loading");
- }
- });
- }
- else {
- // $("#verifycode").click();
- //layer.msg(result.Message, { icon: 5 });
- layer.msg(result.Message, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
- }
- layer.closeAll("loading");
- }
- });
- }
- });
- $('#HSourceBillNo').on('keydown', function (event) {
- var HSourceBillNo = $('#HSourceBillNo').val()
- var sInterID = $("#HInterID").val()
- var sBillNo = $("#HBillNo").val()
- var HSourceBillType = $("#HBillType").val()
- if (event.keyCode == 13) {
- $.ajax({
- url: GetWEBURL() + "/MateOut/set_SavePonderationBillMain_Temp_Mate_Source_Fast_Json",
- type: "GET",
- data: { "HSourceBillType": HSourceBillType, "HSourceBillNo": HSourceBillNo, "sInterID": sInterID, "sBillNo": sBillNo },
- success: function (result) {
- sessionStorage["SourceFlag"] = true;
- element.tabChange('tab-MateOutBill', '2');
- if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
- layer.load(3)
- table.render({
- elem: '#wl-table'
- , url: GetWEBURL1() + '/MateOutBill/DisBillEntryList_Webs_New_Json'
- //, cellMinWidth: 80
- , toolbar: '#toolbarDemo'
- , where: { HBillID: sInterID, HBillType: '1204', sWhere: '' }
- , cols: [[
- { type: 'radio' }
- , { field: 'HSNO', title: '搴忓彿', width: 60 }
- , { field: 'HQty', title: '鏁伴噺', width: 80 }
- , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 80 }
- , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 90 }
- , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 90 }
- , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 90 }
- , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 90 }
- , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 90 }
- , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 90 }
- , { field: 'HBatchNo', title: '鎵规', width: 90 }
- ]]
- // , data: [linterid]
- // , page: true
- , height: 500
- , done: function () {
- layer.closeAll("loading");
- }
- });
- }
- else {
- // $("#verifycode").click();
- //layer.msg(result.Message, { icon: 5 });
- layer.msg(result.Message, { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
- }
- layer.closeAll("loading");
- }
- });
- // layer.msg($('#HSourceBillNo').val(), { icon: 1 });
- }
- });
+ else {
+ if (sessionStorage["SourceFlag"] == "true") {
+ element.tabChange('tab-Kf_MateOutBill', '3');
+ }
+ else {
+ //$("#HSupName").val(result.data.HSupName);
+ //$("#HSupID").val(result.data.HSupID);
+ //$("#HDeptName").val(result.data.HDeptName);
+ //$("#HDeptID").val(result.data.HDeptID);
+ $("#HSourceBillNo").val(result.data.HSourceBillNo);
+ sessionStorage["SourceFlag"] = true;
+ //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ if (result.data.HSourceBillType == "3720") {
+ $("#HBillType").val("3720");
- table.render({
- elem: '#mx-table'
- // , url: 'http://61.130.49.162:9090/WMSAPI///MateOut/GetHBarCodeShowBillSub'
- //, toolbar: '#toolbarDemo'
- // , where: { sMsg: linterid, sMsg2: lentryid }
- , cols: [[
- , { field: 'HMaterID', title: '鐗╂枡ID', width: 100, hide: true }
- ]]
- , page: true
- , height: 500
- , done: function () {
- }
+ }
+ //else if (result.data.HSourceBillType == "1601") {
+ // $("#HBillType").val("1601");
+ //}
+ $("#HNote").val(";鐗╂枡鏉$爜");
+ element.tabChange('tab-Kf_MateOutBill', '3');
+ }
+ }
+ //$("#HSupID").val(result.data.HSupID);
+ //$("#HSupName").val(result.data.HSupName);
+ //$("#HDeptID").val(result.data.HDeptID);
+ //$("#HDeptName").val(result.data.HDeptName);
+ layer.load(3)
+ table.render({
+ elem: '#wl-table'
+ , url: GetWEBURL1() + '/MateOutBill/DisBillEntryList_Webs_New_Json'
+ //, toolbar: '#toolbarDemo'
+ , where: { HBillID: sInterID, HBillType: '1204', sWhere: '' }
+ , cols: [[
+ { type: 'radio' }
+ , { field: 'HSNO', title: '搴忓彿', width: 60 }
+ , { field: 'HQty', title: '鏁伴噺', width: 80 }
+ , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 80 }
+ , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
+ , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+ , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
+ , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
+ , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
+ , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
+ , { field: 'HBatchNo', title: '鎵规', width: 150 }
+ , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 }
+ ]]
+ // , data: [linterid]
+ // , page: true
+ , height: 500
+ , done: function () {
+ layer.closeAll("loading");
+ }
+ });
+ }
+ else {
+ // $("#verifycode").click();
+ //layer.msg(result.Message, { icon: 5 });
+ layer.msg(result.Message, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+ }
+ layer.closeAll("loading");
+ }
+ });
+ }
+ });
+ $('#HSourceBillNo').on('keydown', function (event) {
+ var HSourceBillNo = $('#HSourceBillNo').val()
+ var sInterID = $("#HInterID").val()
+ var sBillNo = $("#HBillNo").val()
+ var HSourceBillType = $("#HBillType").val()
+ if (event.keyCode == 13) {
+ $.ajax({
+ url: GetWEBURL() + "/MateOut/set_SavePonderationBillMain_Temp_Mate_Source_Fast_Json",
+ type: "GET",
+ data: { "HSourceBillType": HSourceBillType, "HSourceBillNo": HSourceBillNo, "sInterID": sInterID, "sBillNo": sBillNo },
+ success: function (result) {
+ sessionStorage["SourceFlag"] = true;
+ element.tabChange('tab-MateOutBill', '2');
+ if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ layer.load(3)
+ table.render({
+ elem: '#wl-table'
+ , url: GetWEBURL1() + '/MateOutBill/DisBillEntryList_Webs_New_Json'
+ //, cellMinWidth: 80
+ //, toolbar: '#toolbarDemo'
+ , where: { HBillID: sInterID, HBillType: '1204', sWhere: '' }
+ , cols: [[
+ { type: 'radio' }
+ , { field: 'HSNO', title: '搴忓彿', width: 60 }
+ , { field: 'HQty', title: '鏁伴噺', width: 80 }
+ , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 80 }
+ , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 90 }
+ , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 90 }
+ , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 90 }
+ , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 90 }
+ , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 90 }
+ , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 90 }
+ , { field: 'HBatchNo', title: '鎵规', width: 90 }
+ , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 }
+ ]]
+ // , data: [linterid]
+ // , page: true
+ , height: 500
+ , done: function () {
+ layer.closeAll("loading");
+ }
+ });
+ }
+ else {
+ // $("#verifycode").click();
+ //layer.msg(result.Message, { icon: 5 });
+ layer.msg(result.Message, { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
+ }
+ layer.closeAll("loading");
+ }
+ });
+ // layer.msg($('#HSourceBillNo').val(), { icon: 1 });
+ }
+ });
+
+ table.render({
+ elem: '#mx-table'
+ // , url: 'http://61.130.49.162:9090/WMSAPI///MateOut/GetHBarCodeShowBillSub'
+ //, toolbar: '#toolbarDemo'
+ // , where: { sMsg: linterid, sMsg2: lentryid }
+ , cols: [[
+ , { field: 'HMaterID', title: '鐗╂枡ID', width: 100, hide: true }
+ ]]
+ , page: true
+ , height: 500
+ , done: function () {
+ }
+ });
+
+
+ //娴嬭瘯鏁版嵁begin
+ var rowdata = [{
+ "HSNO": "1", "HQty": "2", "HQtyMust": "3", "HMaterName": "4", "HMaterNumber": "5"
+ , "HMaterModel": "6"
+ , "HSourceInterID": "367", "HSourceEntryID": "7", "HSourceBillNo": "8", "HBatchNo": "9"
+ }];
+ var option = {
+ elem: '#wl-table'
+ , height: 'full-1000'
+ , cols: [[
+ { type: 'radio' }
+ , { field: 'HSNO', title: '搴忓彿', width: 60 }
+ , { field: 'HQty', title: '鏁伴噺', width: 80 }
+ , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 80 }
+ , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 90 }
+ , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 90 }
+ , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 90 }
+ , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 90 }
+ , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 90 }
+ , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 90 }
+ , { field: 'HBatchNo', title: '鎵规', width: 90 }
+ , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 }
+ ]]
+ //, page: true
+ };
+ option.data = rowdata;
+ table.render(option);
+ //娴嬭瘯鏁版嵁end
+
+ //琛屽唴浜嬩欢
+ table.on('tool(wl-table)', function (obj) {
+ var data = obj.data;
+ console.log(data.婧愬崟涓诲唴鐮�);
+ var rowIndex = $(obj.tr).attr("data-index");
+ if (obj.event === 'edit') {
+ var _obj = obj;
+ layer.open({
+ type: 2
+ , area: ['90%', '90%']
+ , title: '鎵爜璇︽儏鍒楄〃'
+ , content: ['../../../views/Baseset/鍩虹璧勬枡/WMSBarCodeDetailsList.html?HInterID=' + data.HSourceInterID + '&HBillType=3789', 'yes']
+ , end: function () {
+
+ }
+ })
+ }
+ });
+
});
- });
- function GetHWHValue(obj) //杩斿洖浠撳簱
- {
- $("#HWHNAME").val(obj[0].HName);
- sessionStorage["HWHID"] = obj[0].HItemID;
- $("#HWHID").val(obj[0].HItemID);
- }
- function GetHSpValue(obj) { //杩斿洖璋冨叆浠撲綅
- $("#HStockPlaceName").val(obj[0].HName);
- $("#HStockPlaceID").val(obj[0].HItemID);
- }
- function GetHSupValue(obj) { //杩斿洖渚涘簲鍟�
- $("#HSupName").val(obj[0].HName);
- $("#HSupID").val(obj[0].HItemID);
- }
- function GetHKeeperValue(obj) { //杩斿洖淇濈
- $("#HKeeper").val(obj[0].HName);
- $("#HKeeperID").val(obj[0].HItemID);
- }
- function GetHSecManagerValue(obj) { //杩斿洖楠屾敹
- $("#HSecManager").val(obj[0].HName);
- $("#HSecManagerID").val(obj[0].HItemID);
- }
- function GetHDeptNameValue(obj) { //杩斿洖閮ㄩ棬
- $("#HDeptName").val(obj[0].HName);
- $("#HDeptID").val(obj[0].HItemID);
- }
- function AllowLoadData(sSubStr) { //闈炵┖楠岃瘉
- //if ($("#HSourceBillNo").val() == '') {
- // layer.msg("璇峰厛鎵簮鍗�!", { icon: 5 });
- // return false;
- //}
- //if($("#HDeptName").val()=='')
- //{
- // layer.msg("閮ㄩ棬娌℃湁閫夋嫨!", { icon: 5 });
- // return false;
- //}
- //if ($("#HSecManager").val() == '') {
- // layer.msg("鍙戞枡浜烘病鏈夐�夋嫨!", { icon: 5 });
- // return false;
- //}
- //if ($("#HKeeper").val() == '') {
- // layer.msg("棰嗘枡浜烘病鏈夐�夋嫨!", { icon: 5 });
- // return false;
- //}
- //if ($("#HSupName").val() == '') {
- // layer.msg("渚涘簲鍟嗘病鏈夐�夋嫨!", { icon: 5 });
- // return false;
- //}
- //if ($("#HWHNAME").val() == '') {
- // layer.msg("浠撳簱娌℃湁閫夋嫨!", { icon: 5 });
- // return false;
- //}
- if ($("#HBillNo").val() == '') {
- layer.msg("閿欒鐨勫崟鎹彿!", { icon: 5 });
- return false;
- }
- if ($("#HInterID").val() == '') {
- layer.msg("閿欒鐨勫唴鐮�!", { icon: 5 });
- return false;
- }
- if(sSubStr=='')
+ function GetHWHValue(obj) //杩斿洖浠撳簱
{
- layer.msg("娌℃湁鐗╂枡鏄庣粏璁板綍!", { icon: 5 });
- return false;
+ $("#HWHNAME").val(obj[0].HName);
+ sessionStorage["HWHID"] = obj[0].HItemID;
+ $("#HWHID").val(obj[0].HItemID);
}
- var s = 0;
- if (sSubStr != '') {
- for (var i = 0; i <= sSubStr.length - 1; i++) { //鍒ゆ柇鎵爜鏁伴噺涓嶈兘澶т簬搴旀敹鏁伴噺
- if (parseFloat(sSubStr[i].HQtyMust) > 0) {
- if (parseFloat(sSubStr[i].HQty) > parseFloat(sSubStr[i].HQtyMust))
- {
- layer.msg("鏁伴噺涓嶈兘澶т簬搴斿彂鏁伴噺锛�", { icon: 5 });
- return false;
- }
- }
- }
- for (var i = 0; i <= sSubStr.length - 1; i++) { //鍒ゆ柇鎵爜鏁伴噺涓嶈兘涓�0
- if (parseFloat(sSubStr[i].HQty) > 0) {
- s = 1;
- }
- }
- if (s == 0)
- {
- layer.msg("鐢熶骇棰嗘枡鍑哄簱璁板綍鏈壂鐮侊紒", { icon: 5 });
+ function GetHSpValue(obj) { //杩斿洖璋冨叆浠撲綅
+ $("#HStockPlaceName").val(obj[0].HName);
+ $("#HStockPlaceID").val(obj[0].HItemID);
+ }
+ function GetHSupValue(obj) { //杩斿洖渚涘簲鍟�
+ $("#HSupName").val(obj[0].HName);
+ $("#HSupID").val(obj[0].HItemID);
+ }
+ function GetHKeeperValue(obj) { //杩斿洖淇濈
+ $("#HKeeper").val(obj[0].HName);
+ $("#HKeeperID").val(obj[0].HItemID);
+ }
+ function GetHSecManagerValue(obj) { //杩斿洖楠屾敹
+ $("#HSecManager").val(obj[0].HName);
+ $("#HSecManagerID").val(obj[0].HItemID);
+ }
+ function GetHDeptNameValue(obj) { //杩斿洖閮ㄩ棬
+ $("#HDeptName").val(obj[0].HName);
+ $("#HDeptID").val(obj[0].HItemID);
+ }
+ function AllowLoadData(sSubStr) { //闈炵┖楠岃瘉
+ //if ($("#HSourceBillNo").val() == '') {
+ // layer.msg("璇峰厛鎵簮鍗�!", { icon: 5 });
+ // return false;
+ //}
+ //if($("#HDeptName").val()=='')
+ //{
+ // layer.msg("閮ㄩ棬娌℃湁閫夋嫨!", { icon: 5 });
+ // return false;
+ //}
+ //if ($("#HSecManager").val() == '') {
+ // layer.msg("鍙戞枡浜烘病鏈夐�夋嫨!", { icon: 5 });
+ // return false;
+ //}
+ //if ($("#HKeeper").val() == '') {
+ // layer.msg("棰嗘枡浜烘病鏈夐�夋嫨!", { icon: 5 });
+ // return false;
+ //}
+ //if ($("#HSupName").val() == '') {
+ // layer.msg("渚涘簲鍟嗘病鏈夐�夋嫨!", { icon: 5 });
+ // return false;
+ //}
+ //if ($("#HWHNAME").val() == '') {
+ // layer.msg("浠撳簱娌℃湁閫夋嫨!", { icon: 5 });
+ // return false;
+ //}
+ if ($("#HBillNo").val() == '') {
+ layer.msg("閿欒鐨勫崟鎹彿!", { icon: 5 });
return false;
}
+ if ($("#HInterID").val() == '') {
+ layer.msg("閿欒鐨勫唴鐮�!", { icon: 5 });
+ return false;
+ }
+ if (sSubStr == '') {
+ layer.msg("娌℃湁鐗╂枡鏄庣粏璁板綍!", { icon: 5 });
+ return false;
+ }
+ var s = 0;
+ if (sSubStr != '') {
+ for (var i = 0; i <= sSubStr.length - 1; i++) { //鍒ゆ柇鎵爜鏁伴噺涓嶈兘澶т簬搴旀敹鏁伴噺
+ if (parseFloat(sSubStr[i].HQtyMust) > 0) {
+ if (parseFloat(sSubStr[i].HQty) > parseFloat(sSubStr[i].HQtyMust)) {
+ layer.msg("鏁伴噺涓嶈兘澶т簬搴斿彂鏁伴噺锛�", { icon: 5 });
+ return false;
+ }
+ }
+ }
+ for (var i = 0; i <= sSubStr.length - 1; i++) { //鍒ゆ柇鎵爜鏁伴噺涓嶈兘涓�0
+ if (parseFloat(sSubStr[i].HQty) > 0) {
+ s = 1;
+ }
+ }
+ if (s == 0) {
+ layer.msg("鐢熶骇棰嗘枡鍑哄簱璁板綍鏈壂鐮侊紒", { icon: 5 });
+ return false;
+ }
+ }
+ else {
+ return true;
+ }
}
- else
- {
- return true;
- }
- }
</script>
</body>
--
Gitblit v1.9.1