From ec0faa25ea2f4f7a7585ea70afd0e5207d6ba916 Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期二, 12 三月 2024 10:07:56 +0800
Subject: [PATCH] 发货通知单,退货通知单,选择框改为基础资料
---
WebTM/views/验收入库/产品入库/Kf_ProductInBackBill.html | 1350 +++++++++++++++++++++++++++++-----------------------------
1 files changed, 682 insertions(+), 668 deletions(-)
diff --git "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\344\272\247\345\223\201\345\205\245\345\272\223/Kf_ProductInBackBill.html" "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\344\272\247\345\223\201\345\205\245\345\272\223/Kf_ProductInBackBill.html"
index 807283e..34c6954 100644
--- "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\344\272\247\345\223\201\345\205\245\345\272\223/Kf_ProductInBackBill.html"
+++ "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\344\272\247\345\223\201\345\205\245\345\272\223/Kf_ProductInBackBill.html"
@@ -25,17 +25,20 @@
}
</style>-->
<body>
- <div class="layui-fluid">
- <div class="layui-card" style="padding: 1px">
- <div class="layui-card-body" style="padding: 1px;">
+ <div class="layui-fluid" style="padding: 0px">
+ <div class="layui-card">
+ <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-tab" lay-filter="tab-ProductlnBackBill">
<ul class="layui-tab-title" lay-filter="tab-all">
- <li lay-id="1">婧愬崟淇℃伅</li>
- <li lay-id="2">鍗曟嵁淇℃伅</li>
- <li lay-id="3">鐗╂枡娓呭崟</li>
- <li lay-id="4">鏄庣粏娓呭崟</li>
- <li lay-id="5">鏃ュ織</li>
+ <li lay-id="1" style="padding:1px;">婧愬崟淇℃伅</li>
+ <li lay-id="2" style="padding:1px;">鍗曟嵁淇℃伅</li>
+ <li lay-id="3" style="padding:1px;">鐗╂枡娓呭崟</li>
+ <li lay-id="4" style="padding:1px;">鏄庣粏娓呭崟</li>
+ <li lay-id="5" style="padding:1px;">鏃ュ織</li>
</ul>
<div class="layui-tab-content">
<div class="layui-tab-item layui-show">
@@ -46,7 +49,7 @@
</div>
<div class="layui-col-xs8">
<select name=" HBillType" id="HBillType">
- <!-- <option value="3710">鐢熶骇浠诲姟鍗�-閫�搴�</option>-->
+ <!-- <option value="3710">鐢熶骇浠诲姟鍗�-閫�搴�</option>-->
<option value="1202">浜у搧鍏ュ簱鍗�-钃濆瓧</option>
</select>
<!--<input type="text" name="cmbSourceType" id="cmbSourceType" lay-verify="cmbSourceType" autocomplete="off" class="layui-input">-->
@@ -178,7 +181,7 @@
<label class="layui-form-label" style="width:40px;padding-left:0px;">鏁伴噺</label>
</div>
<div class="layui-col-xs8">
- <input type="text" name="HQty" id="HQty" lay-verify="HQty" autocomplete="off" class="layui-input">
+ <input type="text" name="HQty" id="HQty" lay-verify="HQty" onkeyup="if(!this.value.match(/^[\+\-]?\d*?\.?\d*?$/)){if(!this.t_value>0){this.value=''}else{this.value=this.t_value;}}else this.t_value=this.value;if(this.value.match(/^(?:[\+\-]?\d+(?:\.\d+)?)?$/))this.o_value=this.value" autocomplete="off" class="layui-input" onfocus="this.select();">
</div>
</div>
</div>
@@ -207,484 +210,460 @@
<script src="../../../layuiadmin/Scripts/jquery-1.4.1.js" type="text/javascript"></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
- , 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;
- //琛ㄥご鍒濆鍖栬祴鍊硷紙鏍规嵁鐧诲綍鐢ㄦ埛鑾峰彇 榛樿浠撳簱銆侀儴闂ㄣ�侀獙鏀躲�佷繚绠°�侀噾铦剁敤鎴凤級 new
- $("#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();
+ //琛ㄥご鍒濆鍖栬祴鍊硷紙鏍规嵁鐧诲綍鐢ㄦ埛鑾峰彇 榛樿浠撳簱銆侀儴闂ㄣ�侀獙鏀躲�佷繚绠°�侀噾铦剁敤鎴凤級 new
+ $("#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();
- //榛樿甯﹀叆鐨勪粨搴擄紝濡傛灉鍚敤浠撲綅鍒欎粨浣嶆湁鏁堬紝濡傛灉娌℃湁鍚敤鍒欎粨浣嶇伆搴� new
+ //榛樿甯﹀叆鐨勪粨搴擄紝濡傛灉鍚敤浠撲綅鍒欎粨浣嶆湁鏁堬紝濡傛灉娌℃湁鍚敤鍒欎粨浣嶇伆搴� new
- //鑾峰彇鍙傛暟
- 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 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 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 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 RoadBillSub(linterid)//鍔犺浇琛ㄤ綋
- {
- table.render({
- elem: '#wl-table'
+ function RoadBillSub(linterid)//鍔犺浇琛ㄤ綋
+ {
+ table.render({
+ elem: '#wl-table'
, url: GetWEBURL() + '/ProductIn/DisBillEntryList_Webs_Json'
, toolbar: '#toolbarDemo'
, where: { HBillID: linterid, HBillType: '1245', sWhere: '' }
, cols: [[
- { type: 'radio' }
- , { field: 'HQty', title: '鏁伴噺', width: 150 }
- , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150 }
- , { 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 }
+ { type: 'radio' }
+ , { field: 'HQty', title: '鏁伴噺', width: 150 }
+ , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150 }
+ , { 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 }
]]
, height: 500
, done: function () {
layer.closeAll("loading");
}
- });
- }
-
- //鍔ㄦ�佸姞杞芥簮鍗曠被鍨嬪垪琛� new
+ });
+ }
-
-
-
-
-
-
- //鍒ゆ柇鏄惁鏂板
- if (linterid == null || linterid == 0) {
- //鑾峰彇鏈�澶у崟鎹彿 new
- $("#HInterID").val("");
- $("#HBillNo").val("");
- $.ajax({
- url: GetWEBURL() + "/Web/GetMAXNumPDA",
- type: "GET",
- data: { "HBillType": '1245' },
- 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);
- }
+ //鍔ㄦ�佸姞杞芥簮鍗曠被鍨嬪垪琛� new
- 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(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(HKeeperID-BT)', function () {//閫夋嫨淇濈
- layer.open({
- type: 2//寮圭獥绫诲瀷
- , skin: 'layui-layer-rim' //鍔犱笂杈规
- , area: ['90%', '90%']//澶у皬
- , title: '鑱屽憳鍒楄〃'//鏍囬
- , shift: 2//寮瑰嚭鍔ㄧ敾
- , content: ['../../PublicPage/UserInformation.html', 'yes']
- , btn: ['纭畾', '鍙栨秷']
- , btn1: function (index, layero) {//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
- var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰
- var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
- if (checkStatus.data.length === 0) {
- return layer.msg('璇烽�夋嫨鏁版嵁');
- }
- $("#HKeeper").val(checkStatus.data[0].HName);
- $("#HKeeperID").val(checkStatus.data[0].HItemID);
- layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
- }
- , btn2: function (index, layero) { }
- })
- });
-
-
- form.on('submit(HSecManagerID-BT)', function (data) {//閫夋嫨楠屾敹
- layer.open({
- type: 2//寮圭獥绫诲瀷
- , skin: 'layui-layer-rim' //鍔犱笂杈规
- , area: ['90%', '90%']//澶у皬
- , title: '鑱屽憳鍒楄〃'//鏍囬
- , shift: 2//寮瑰嚭鍔ㄧ敾
- , content: ['../../PublicPage/UserInformation.html', 'yes']
- , btn: ['纭畾', '鍙栨秷']
- , btn1: function (index, layero) {//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
- var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰
- var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
- if (checkStatus.data.length === 0) {
- return layer.msg('璇烽�夋嫨鏁版嵁');
- }
- $("#HSecManager").val(checkStatus.data[0].HName);
- $("#HSecManagerID").val(checkStatus.data[0].HItemID);
- layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
- }
- , btn2: function (index, layero) { }
- })
- });
- 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(cmdDelete)', function () {//鍒犻櫎
- var checkStatus = table.checkStatus('wl-table')
- , data = checkStatus.data;
- var sInterID = $('#HInterID').val()
- var sMaterID = data[0].HMaterID
- var sBillType = '1245'
- 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() + "/ProductIn/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: GetWEBURL() + '/ProductIn/DisBillEntryList_Webs_Json'
- , toolbar: '#toolbarDemo'
- , where: { HBillID: sInterID, HBillType: '1245', sWhere: '' }
- , cols: [[
- { type: 'radio' }
- , { field: 'HQty', title: '鏁伴噺', width: 150 }
- , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150 }
- , { 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 }
- ]]
- , 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(Cancel)', function () {
- sessionStorage["SourceFlag"] = false;
- //parent.location.href = "../../../views/index.html"
- //window.close();//鍏抽棴褰撳墠椤�
- layer.confirm('鎮ㄧ‘瀹氳閫�鍑哄悧锛�', { icon: 3, title: '鎻愮ず' }, function (index) {
- window.close();
- });
- })
-
- 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() + "/ProductInBack/set_SaveProductInBackBill_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: 5 });
- }
- layer.closeAll("loading");
- },
- error: function (err) {
- layer.msg("閿欒:" + err, { icon: 5 });
+ //鍒ゆ柇鏄惁鏂板
+ if (linterid == null || linterid == 0) {
+ //鑾峰彇鏈�澶у崟鎹彿 new
+ $("#HInterID").val("");
+ $("#HBillNo").val("");
+ $.ajax({
+ url: GetWEBURL() + "/Web/GetMAXNumPDA",
+ type: "GET",
+ data: { "HBillType": '1245' },
+ success: function (d) {
+ //console.log(d.data);
+ $("#HInterID").val(d.data[0].HInterID);
+ $("#HBillNo").val(d.data[0].HBillNo);
}
});
- return false;
}
- });
+ else {//濡傛灉淇敼鍒欒蛋涓嬮潰 new
+ RoadBillMain(linterid);
+ RoadBillSub(linterid);
+ }
- //鐩戝惉鎻愪氦
- form.verify({
- numberOrEmpty: function (value, item) {
- // if (value != '') {
- if (!/^\d+$/.test(value)) {
- return '涓嶈兘涓虹┖鎴栨暟瀛楁垨鑰�0';
- }
- //}
- }
- });
- $('#HBarCode').on('keydown', function (event) { //鎵潯鐮�
- var sSubStr = table.cache['wl-table'];
- var sBarCode = $('#HBarCode').val()
- var sInterID = $("#HInterID").val()
- var sBillNo = $("#HBillNo").val()
- var sQty = $("#HQty").val()
- var sHBillType = $("#HBillType").val()
- var sHWHID = $("#HWHID").val()
- var sHSPID = $("#HStockPlaceID").val()
- var sSourceBillNo = $("#HSourceBillNo").val()
- var sBillType = '1245'
- if (sQty == "") {
- sQty = 0;
- }
- //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 });
- //}
- //if ($("#HSupName").val() == '') {
- // return false;
- // layer.msg("渚涘簲鍟嗘病鏈夐�夋嫨!", { icon: 5 });
- // return false;
- //}
- //if ($("#HWHNAME").val() == '') {
- // layer.msg("浠撳簱娌℃湁閫夋嫨!", { icon: 5 });
- // return false;
- //}
- if (event.keyCode == 13) {
- if (sBarCode == '') {
- layer.msg("鏉$爜涓虹┖锛屼笉鑳芥壂鎻忥紒", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
- return false;
- }
- if (sBarCode != "") {
- $('#HBarCode').val("");
- }
- if (sQty != "") {
- $('#HQty').val("");
- }
- //if (AllowLoadData(sSubStr, 'HBarCode') != false) {//闈炵┖楠岃瘉
- $.ajax({
- //url: "http://61.130.49.162:9090/WMSAPI///ProductIn/get_CheckTypeByBarCode_All_Json",
- url: GetWEBURL() + "/ProductInBack/get_CheckTypeByBarCode_All_Json",
- type: "GET",
- data: { "sCode": sBarCode, "sInterID": sInterID, "HBillType": sBillType, "sBillNo": sBillNo, "sMaker": sessionStorage["HUserName"], "WhID": sHWHID, "SPID": sHSPID, "sQty": sQty, "sRedBlue": true, "SourceFlag": sessionStorage["SourceFlag"], "sSourceBillNo": sSourceBillNo, "sSourceType": sHBillType, "HOWNERID": sessionStorage["OrganizationID"], "sExpressNumber": ""},
- 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-ProductlnBackBill', '2'); //璺宠浆椤电
- }
- 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-ProductlnBackBill', '2');//璺宠浆椤电
- }
- else if (result.data.HBarType == '閮ㄩ棬鏉$爜') {
- $("#HDeptName").val(result.data.HDeptName);
- $("#HDeptID").val(result.data.HDeptID);
- $("#HNote").val(";涓�閿壂鐮侀儴闂ㄦ潯鐮�");
- element.tabChange('tab-ProductlnBackBill', '2');//璺宠浆椤电
- }
- 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 == "3710") {
- $("#HBillType").val("3710");
- }
- else if (result.data.HSourceBillType == "1202") {
- $("#HBillType").val("1202");
- }
- else {
- $("#HBillType").val("鎵嬪伐褰曞叆");
- }
- $("#HNote").val(";涓�閿壂鐮佹簮鍗曟潯鐮�");
- element.tabChange('tab-ProductlnBackBill', '3');
+
+
+ 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(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(HKeeperID-BT)', function () {//閫夋嫨淇濈
+ layer.open({
+ type: 2//寮圭獥绫诲瀷
+ , skin: 'layui-layer-rim' //鍔犱笂杈规
+ , area: ['90%', '90%']//澶у皬
+ , title: '鑱屽憳鍒楄〃'//鏍囬
+ , shift: 2//寮瑰嚭鍔ㄧ敾
+ , content: ['../../PublicPage/UserInformation.html', 'yes']
+ , btn: ['纭畾', '鍙栨秷']
+ , btn1: function (index, layero) {//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+ var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰
+ var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+ if (checkStatus.data.length === 0) {
+ return layer.msg('璇烽�夋嫨鏁版嵁');
+ }
+ $("#HKeeper").val(checkStatus.data[0].HName);
+ $("#HKeeperID").val(checkStatus.data[0].HItemID);
+ layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ , btn2: function (index, layero) { }
+ })
+ });
+
+
+ form.on('submit(HSecManagerID-BT)', function (data) {//閫夋嫨楠屾敹
+ layer.open({
+ type: 2//寮圭獥绫诲瀷
+ , skin: 'layui-layer-rim' //鍔犱笂杈规
+ , area: ['90%', '90%']//澶у皬
+ , title: '鑱屽憳鍒楄〃'//鏍囬
+ , shift: 2//寮瑰嚭鍔ㄧ敾
+ , content: ['../../PublicPage/UserInformation.html', 'yes']
+ , btn: ['纭畾', '鍙栨秷']
+ , btn1: function (index, layero) {//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+ var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰
+ var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+ if (checkStatus.data.length === 0) {
+ return layer.msg('璇烽�夋嫨鏁版嵁');
+ }
+ $("#HSecManager").val(checkStatus.data[0].HName);
+ $("#HSecManagerID").val(checkStatus.data[0].HItemID);
+ layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ , btn2: function (index, layero) { }
+ })
+ });
+ 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(cmdDelete)', function () {//鍒犻櫎
+ var checkStatus = table.checkStatus('wl-table')
+ , data = checkStatus.data;
+ var sInterID = $('#HInterID').val()
+ var sMaterID = data[0].HMaterID
+ var sBillType = '1245'
+ 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() + "/ProductIn/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: GetWEBURL() + '/ProductIn/DisBillEntryList_Webs_Json'
+ , toolbar: '#toolbarDemo'
+ , where: { HBillID: sInterID, HBillType: '1245', sWhere: '' }
+ , cols: [[
+ { type: 'radio' }
+ , { field: 'HQty', title: '鏁伴噺', width: 150 }
+ , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150 }
+ , { 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 }
+ ]]
+ , height: 500
+ })
}
else {
- if (sessionStorage["SourceFlag"] == "true") {
- element.tabChange('tab-ProductlnBackBill', '3');
+ layer.msg(data.Message, { icon: 2 });
+ }
+ },
+ error: function (err) {
+ layer.msg('閿欒' + err, {
+ icon: 5,
+ time: 20000
+ }, function () {
+ //do something
+ });
+ }
+ });
+ });
+
+
+
+ form.on('submit(Cancel)', function () {
+ sessionStorage["SourceFlag"] = false;
+ //parent.location.href = "../../../views/index.html"
+ //window.close();//鍏抽棴褰撳墠椤�
+ layer.confirm('鎮ㄧ‘瀹氳閫�鍑哄悧锛�', { icon: 3, title: '鎻愮ず' }, function (index) {
+ parent.location.href = "../../../views/index_Mobile.html";
+ });
+ })
+
+ 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() + "/ProductInBack/set_SaveProductInBackBill_Json",
+ async: true,
+ data: { "oMain": sMainStr },
+ dataType: "json",
+ success: function (data) {
+ if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ layer.msg(data.Message, { icon: 1 });
}
else {
+ layer.msg(data.Message, { icon: 5 });
+ }
+ layer.closeAll("loading");
+ },
+ error: function (err) {
+ layer.msg("閿欒:" + err, { icon: 5 });
+ }
+ });
+ return false;
+ }
+ });
+
+ //鐩戝惉鎻愪氦
+ form.verify({
+ numberOrEmpty: function (value, item) {
+ // if (value != '') {
+ if (!/^\d+$/.test(value)) {
+ return '涓嶈兘涓虹┖鎴栨暟瀛楁垨鑰�0';
+ }
+ //}
+ }
+ });
+
+ $('#HBarCode').on('keydown', function (event) { //鎵潯鐮�
+ var sSubStr = table.cache['wl-table'];
+ var sBarCode = $('#HBarCode').val()
+ var sInterID = $("#HInterID").val()
+ var sBillNo = $("#HBillNo").val()
+ var sQty = $("#HQty").val()
+ var sHBillType = $("#HBillType").val()
+ var sHWHID = $("#HWHID").val()
+ var sHSPID = $("#HStockPlaceID").val()
+ var sSourceBillNo = $("#HSourceBillNo").val()
+ var sBillType = '1245'
+ if (sQty == "") {
+ sQty = 0;
+ }
+ //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 });
+ //}
+ //if ($("#HSupName").val() == '') {
+ // return false;
+ // layer.msg("渚涘簲鍟嗘病鏈夐�夋嫨!", { icon: 5 });
+ // return false;
+ //}
+ //if ($("#HWHNAME").val() == '') {
+ // layer.msg("浠撳簱娌℃湁閫夋嫨!", { icon: 5 });
+ // return false;
+ //}
+ if (event.keyCode == 13) {
+ if (sBarCode == '') {
+ layer.msg("鏉$爜涓虹┖锛屼笉鑳芥壂鎻忥紒", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
+ return false;
+ }
+ if (sBarCode != "") {
+ $('#HBarCode').val("");
+ }
+ if (sQty != "") {
+ $('#HQty').val("");
+ }
+ //if (AllowLoadData(sSubStr, 'HBarCode') != false) {//闈炵┖楠岃瘉
+ $.ajax({
+ //url: "http://61.130.49.162:9090/WMSAPI///ProductIn/get_CheckTypeByBarCode_All_Json",
+ url: GetWEBURL() + "/ProductInBack/get_CheckTypeByBarCode_All_Json",
+ type: "GET",
+ data: { "sCode": sBarCode, "sInterID": sInterID, "HBillType": sBillType, "sBillNo": sBillNo, "sMaker": sessionStorage["HUserName"], "WhID": sHWHID, "SPID": sHSPID, "sQty": sQty, "sRedBlue": true, "SourceFlag": sessionStorage["SourceFlag"], "sSourceBillNo": sSourceBillNo, "sSourceType": sHBillType, "HOWNERID": sessionStorage["OrganizationID"], "sExpressNumber": "" },
+ 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-ProductlnBackBill', '2'); //璺宠浆椤电
+ }
+ 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-ProductlnBackBill', '2');//璺宠浆椤电
+ }
+ else if (result.data.HBarType == '閮ㄩ棬鏉$爜') {
+ $("#HDeptName").val(result.data.HDeptName);
+ $("#HDeptID").val(result.data.HDeptID);
+ $("#HNote").val(";涓�閿壂鐮侀儴闂ㄦ潯鐮�");
+ element.tabChange('tab-ProductlnBackBill', '2');//璺宠浆椤电
+ }
+ 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);
+ $("#HDeptName").val(result.data.HDeptName);
+ $("#HDeptID").val(result.data.HDeptID);
+ $("#HSourceBillNo").val(result.data.HSourceBillNo);
sessionStorage["SourceFlag"] = true;
//鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
if (result.data.HSourceBillType == "3710") {
@@ -696,236 +675,271 @@
else {
$("#HBillType").val("鎵嬪伐褰曞叆");
}
- $("#HNote").val(";鐗╂枡鏉$爜");
+ $("#HNote").val(";涓�閿壂鐮佹簮鍗曟潯鐮�");
element.tabChange('tab-ProductlnBackBill', '3');
}
- }
- layer.load(3)
- table.render({
- elem: '#wl-table'
- , url: GetWEBURL() + '/ProductIn/DisBillEntryList_Webs_Json'
- , toolbar: '#toolbarDemo'
- , where: { HBillID: sInterID, HBillType: '1245', sWhere: '' }
- , cols: [[
+ else {
+ if (sessionStorage["SourceFlag"] == "true") {
+ element.tabChange('tab-ProductlnBackBill', '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 == "3710") {
+ $("#HBillType").val("3710");
+ }
+ else if (result.data.HSourceBillType == "1202") {
+ $("#HBillType").val("1202");
+ }
+ else {
+ $("#HBillType").val("鎵嬪伐褰曞叆");
+ }
+ $("#HNote").val(";鐗╂枡鏉$爜");
+ element.tabChange('tab-ProductlnBackBill', '3');
+ }
+ }
+ layer.load(3)
+ table.render({
+ elem: '#wl-table'
+ , url: GetWEBURL() + '/ProductIn/DisBillEntryList_Webs_Json'
+ , toolbar: '#toolbarDemo'
+ , totalRow: true
+ , where: { HBillID: sInterID, HBillType: '1245', sWhere: '' }
+ , cols: [[
{ type: 'radio' }
- , { field: 'HQty', title: '鏁伴噺', width: 150 }
- , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150 }
- , { 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 }
- ]]
- , height: 500
- , done: function () {
- layer.closeAll("loading");
- }
- });
+ , { field: 'HQty', title: '鏁伴噺', width: 150, totalRow: true }
+ , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150, totalRow: true }
+ , { 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 }
+ ]]
+ , 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");
}
- else {
- // $("#verifycode").click();
- //layer.msg(result.Message, { icon: 5 });
- layer.msg(result.Message, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+ });
+ }
+ //else
+ //{
+ // layer.msg(result.Message, { icon: 5 });
+ //}
+ //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() + "/ProductInBackBill/set_SavePonderationBillMain_Temp_Source_Fast_Json",
+ type: "GET",
+ data: { "HSourceBillType": HSourceBillType, "HSourceBillNo": HSourceBillNo, "sInterID": sInterID, "sBillNo": sBillNo },
+ success: function (result) {
+ if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ sessionStorage["SourceFlag"] = true;
+ layer.load(3)
+ element.tabChange('tab-ProductlnBackBill', '2');
+ table.render({
+ elem: '#wl-table'
+ , totalRow: true
+ //, url: 'http://61.130.49.162:9090/WMSAPI///ProductIn/DisBillEntryList_Webs_Json'
+ , url: GetWEBURL() + '/ProductInBackBill/DisBillEntryList_Webs_Json'
+ , toolbar: '#toolbarDemo'
+ , where: { HBillID: sInterID, HBillType: '1245', sWhere: '' }
+ , cols: [[
+ { type: 'radio' }
+ , { field: 'HQty', title: '鏁伴噺', width: 150, totalRow: true }
+ , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150, totalRow: true }
+ , { 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 }
+ , { field: 'HPieceQty', 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");
}
- layer.closeAll("loading");
- }
- });
- }
- //else
- //{
- // layer.msg(result.Message, { icon: 5 });
- //}
- //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() + "/ProductInBackBill/set_SavePonderationBillMain_Temp_Source_Fast_Json",
- type: "GET",
- data: { "HSourceBillType": HSourceBillType, "HSourceBillNo": HSourceBillNo, "sInterID": sInterID, "sBillNo": sBillNo },
- success: function (result) {
- if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
- sessionStorage["SourceFlag"] = true;
- layer.load(3)
- element.tabChange('tab-ProductlnBackBill', '2');
- table.render({
- elem: '#wl-table'
- //, url: 'http://61.130.49.162:9090/WMSAPI///ProductIn/DisBillEntryList_Webs_Json'
- , url: GetWEBURL() + '/ProductInBackBill/DisBillEntryList_Webs_Json'
- , toolbar: '#toolbarDemo'
- , where: { HBillID: sInterID, HBillType: '1245', sWhere: '' }
- , cols: [[
- { type: 'radio' }
- , { field: 'HQty', title: '鏁伴噺', width: 150 }
- , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150 }
- , { 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");
- }
- });
- // layer.msg($('#HSourceBillNo').val(), { icon: 1 });
- }
- });
+ });
+ // layer.msg($('#HSourceBillNo').val(), { icon: 1 });
+ }
+ });
-
- //layer.load(3)
- table.render({
- elem: '#wl-table'
- // , url: 'http://localhost:8083/Web/GetHBarCodeShowBillSub'
- , toolbar: '#toolbarDemo'
- // , where: { sMsg: linterid, sMsg2: lentryid }
- , cols: [[
- // , { field: 'HMTONO', title: '璁″垝璺熻釜鍗曞彿', width: 100,, sort: true, fixed: true edit: 'text', hide: true }
- { field: 'HQty', title: '鏁伴噺', width: 150 }
- , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150 }
- , { 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 }
- //, { field: 'HPieceQty', title: '鏈鏀粯閲戦', width: 150 }
- ]]
- // , data: [linterid]
- , text: {
- none:'鏆傛棤鐩稿叧鏁版嵁'
- }
- , page: true
- , height: 500
- , done: function () {
- //layer.closeAll("loading");
- }
- });
- table.render({
- elem: '#mx-table'
- // , url: 'http://localhost:8083/Web/GetHBarCodeShowBillSub'
- //, toolbar: '#toolbarDemo'
- // , where: { sMsg: linterid, sMsg2: lentryid }
- , cols: [[
- // , { field: 'HMTONO', title: '璁″垝璺熻釜鍗曞彿', width: 100,, sort: true, fixed: true edit: 'text', hide: true }
- , { field: 'HMaterID', title: '鐗╂枡ID', width: 100, hide: true }
- ]]
- // , data: [linterid]
- , page: true
- , height: 500
- , done: function () {
- //layer.closeAll("loading");
- }
- });
- });
- 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 == '') {
- layer.msg("娌℃湁鐗╂枡鏄庣粏璁板綍!", { icon: 5 });
- return false;
- }
- 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;
- }
+
+ //layer.load(3)
+ table.render({
+ elem: '#wl-table'
+ // , url: 'http://localhost:8083/Web/GetHBarCodeShowBillSub'
+ , toolbar: '#toolbarDemo'
+ // , where: { sMsg: linterid, sMsg2: lentryid }
+ , cols: [[
+ // , { field: 'HMTONO', title: '璁″垝璺熻釜鍗曞彿', width: 100,, sort: true, fixed: true edit: 'text', hide: true }
+ { field: 'HQty', title: '鏁伴噺', width: 150 }
+ , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150 }
+ , { 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 }
+ //, { field: 'HPieceQty', title: '鏈鏀粯閲戦', width: 150 }
+ ]]
+ // , data: [linterid]
+ , text: {
+ none: '鏆傛棤鐩稿叧鏁版嵁'
}
- }
- for (var i = 0; i <= sSubStr.length - 1; i++) { //鍒ゆ柇鎵爜鏁伴噺涓嶈兘涓�0
- if (parseFloat(sSubStr[i].HQty) > 0) {
- s = 1;
+ , page: true
+ , height: 500
+ , done: function () {
+ //layer.closeAll("loading");
}
- }
- if (s == 0) {
- layer.msg("浜у搧閫�搴撹褰曟湭鎵爜锛�", { icon: 5 });
+ });
+ table.render({
+ elem: '#mx-table'
+ // , url: 'http://localhost:8083/Web/GetHBarCodeShowBillSub'
+ //, toolbar: '#toolbarDemo'
+ // , where: { sMsg: linterid, sMsg2: lentryid }
+ , cols: [[
+ // , { field: 'HMTONO', title: '璁″垝璺熻釜鍗曞彿', width: 100,, sort: true, fixed: true edit: 'text', hide: true }
+ , { field: 'HMaterID', title: '鐗╂枡ID', width: 100, hide: true }
+ ]]
+ // , data: [linterid]
+ , page: true
+ , height: 500
+ , done: function () {
+ //layer.closeAll("loading");
+ }
+ });
+ });
+ 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);
+ $("#HWHNAME").val(obj[0].HWhName);
+ $("#HWHID").val(obj[0].HWHID);
+ }
+ 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) { //闈炵┖楠岃瘉
+ //鏁板瓧姝e垯(鍖呭惈灏忔暟)
+ var reg = /^\d+(\.\d+)?$/;
+ //if (reg.test($("#HQty").val()) == false || $("#HQty").val() == '') {
+ // layer.msg("鏁伴噺蹇呴』涓烘暟閲忔垨灏忔暟", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ // return false;
+ //}
+ //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;
+ }
+ 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