From 272dbb0d656bcfe144b8ab049466a542ee2348d5 Mon Sep 17 00:00:00 2001
From: yuyou_x <2336760928@qq.com>
Date: 星期四, 01 二月 2024 14:48:56 +0800
Subject: [PATCH] 1
---
Pda/View/AsnSetting/productEnter1.html | 459 +++++++++++++++++++++++++++++---------------------------
1 files changed, 237 insertions(+), 222 deletions(-)
diff --git a/Pda/View/AsnSetting/productEnter1.html b/Pda/View/AsnSetting/productEnter1.html
index 1157f96..62b99be 100644
--- a/Pda/View/AsnSetting/productEnter1.html
+++ b/Pda/View/AsnSetting/productEnter1.html
@@ -215,8 +215,8 @@
<form class="layui-form" action="">
<div id="" class="layui-form-item layout-dropdownlist">
<label class="layui-form-label" lang>鍏ュ簱鍗曪細</label>
- <div class="layui-input-block" id="selectDivw">
- <select id="barw" lay-filter="getbar" lay-search>
+ <div class="layui-input-block" id="selectDiv1">
+ <select id="bar1" lay-filter="getbar" lay-search>
<option value=""></option>
</select>
<img src="/assets/down_arraw.png">
@@ -224,8 +224,8 @@
</div>
<div class="layui-form-item layout-dropdownlist" style="margin-top: 10px;">
<label class="layui-form-label">鐗╂枡-鎵规锛�</label>
- <div class="layui-input-block" id="goodDivw">
- <select id="goodSelectw" lay-filter="goodSelectw" lay-search>
+ <div class="layui-input-block" id="goodDiv">
+ <select id="goodSelect1" lay-filter="goodSelect1" lay-search>
<option value=""></option>
</select>
<img src="/assets/down_arraw.png">
@@ -235,7 +235,7 @@
<div id="" class="layui-form-item layout-input">
<label class="layui-form-label" lang>鎵樼洏鏉$爜锛�</label>
<div class="layui-input-block">
- <input id="STOCKCODEw" type="text" lay-verify="stock" lang langholder placeholder="璇锋壂鎻忔墭鐩樻潯鐮�"
+ <input id="STOCKCODE" type="text" lay-verify="stock" lang langholder placeholder="璇锋壂鎻忔墭鐩樻潯鐮�"
autocomplete="off" class="layui-input">
</div>
</div>
@@ -243,7 +243,7 @@
<div id="" class="layui-form-item layout-input">
<label class="layui-form-label" lang>鐗╂枡鏁伴噺锛�</label>
<div class="layui-input-block">
- <input id="SkuQtyw" type="text" lay-verify="stock" lang langholder placeholder="璇疯緭鍏ョ墿鏂欐暟閲�"
+ <input id="SkuQty" type="text" lay-verify="stock" lang langholder placeholder="璇疯緭鍏ョ墿鏂欐暟閲�"
autocomplete="off" class="layui-input">
</div>
</div>
@@ -254,7 +254,7 @@
<div id="" class="layui-form-item layout-boxinfo">
<label class="layui-form-label" lang>瑙勬牸/鍨嬪彿锛�</label>
<div class="layui-input-block">
- <input id="Standardw" type="text" disabled placeholder="" autocomplete="off"
+ <input id="Standard1" type="text" disabled placeholder="" autocomplete="off"
class="layui-input">
</div>
</div>
@@ -265,7 +265,7 @@
<div id="" class="layui-form-item layout-boxinfo">
<label class="layui-form-label" lang>璁″垝鏁伴噺锛�</label>
<div class="layui-input-block">
- <input id="ImportQuantityw" type="text" disabled placeholder=""
+ <input id="ImportQuantity1" type="text" disabled placeholder=""
autocomplete="off" class="layui-input">
</div>
</div>
@@ -277,7 +277,7 @@
<div id="" class="layui-form-item layout-boxinfo">
<label class="layui-form-label" lang>宸茬粍鏁伴噺锛�</label>
<div class="layui-input-block">
- <input id="ImportFactQuantityw" type="text" disabled placeholder=""
+ <input id="ImportFactQuantity1" type="text" disabled placeholder=""
autocomplete="off" class="layui-input">
</div>
</div>
@@ -402,18 +402,6 @@
checkPalletStat()
})
- // 鎵樼洏鐮佹枃鏈敼鍙樻椂瑙﹀彂-鏁伴噺
- $("#STOCKCODEw").on('input', function () {
-
- if ($("#STOCKCODEw").val() == "" || $("#STOCKCODEw").val().length < 8) {
- return
- }
- if ($("#STOCKCODEw").val().length >= 8) {
- $("#STOCKCODEw").val($("#STOCKCODEw").val().substr(-8))
- }
- checkPalletStat()
- })
-
//绠辩爜鍥炶溅浜嬩欢
$("#BOXCODE").keydown(function (e) {
if (e.keyCode === 13) {
@@ -434,26 +422,117 @@
}
});
+
+ /* 鍏ュ簱鍗曟嵁涓嬫媺妗� */
//鐐瑰嚮鍏ュ簱鍗曟嵁涓嬫媺妗嗕簨浠�
$("#selectDiv").click(function () {
- var input = $('select[id="bar"]').next().find('.layui-select-title input')
- var val = input.val()
- //鍏堟洿鏂颁竴涓嬪叆搴撳崟
- updateBillList(function (data) {
- $('select[id="bar"]').next().addClass('layui-form-selected')
- $('select[id="bar"]').next().find('.layui-select-title input').val(val)
- })
+ if (xianshiyemian == 0)
+ {
+ var input = $('select[id="bar"]').next().find('.layui-select-title input')
+ var val = input.val()
+ //鍏堟洿鏂颁竴涓嬪叆搴撳崟
+ updateBillList(function (data) {
+ $('select[id="bar"]').next().addClass('layui-form-selected')
+ $('select[id="bar"]').next().find('.layui-select-title input').val(val)
+ })
+ }
})
- //鐐瑰嚮鍏ュ簱鍗曟嵁涓嬫媺妗嗕簨浠�-鏁伴噺
- $("#selectDivw").click(function () {
- var input = $('select[id="barw"]').next().find('.layui-select-title input')
- var val = input.val()
- //鍏堟洿鏂颁竴涓嬪叆搴撳崟
- updateBillList(function (data) {
- $('select[id="barw"]').next().addClass('layui-form-selected')
- $('select[id="barw"]').next().find('.layui-select-title input').val(val)
- })
+ //鐐瑰嚮鍏ュ簱鍗曟嵁涓嬫媺妗嗕簨浠�
+ $("#selectDiv1").click(function () {
+ if (xianshiyemian == 1)
+ {
+ var input = $('select[id="bar1"]').next().find('.layui-select-title input')
+ var val = input.val()
+ //鍏堟洿鏂颁竴涓嬪叆搴撳崟
+ updateBillList(function (data) {
+ $('select[id="bar1"]').next().addClass('layui-form-selected')
+ $('select[id="bar1"]').next().find('.layui-select-title input').val(val)
+ })
+ }
})
+
+ /*鈥斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺��*/
+
+
+ /* 缁戝畾鍏ュ簱鍗曚俊鎭� */
+
+ function updateBillList(callback) {
+ if (xianshiyemian == 0)
+ {
+ var input = $('select[id="bar"]').next().find('.layui-select-title input')
+ var val = input.val()
+ $("#bar").empty()
+ $("#bar").append('<option value =>' + '</option>');
+ form.render('select');
+
+ var param = {
+ Type: "0,1"
+ };
+ sendData(IP + "/PdaAsn/GetArrivalNotices", param, 'post', function (res) {
+ if (res.code == 0) { //鎴愬姛
+ for (var i = 0; i < res.data.length; i++) {
+ $("#bar").append('<option value =' + res.data[i].ASNNo + '>' + res.data[i]
+ .ASNNo +
+ '</option>');
+ }
+ form.render('select');
+
+ if (!val) {
+ $('#bar').siblings("div.layui-form-select").find('dl').find('.layui-select-tips').addClass('layui-this')
+ } else {
+ var sel = 'dd[lay-value=' + val + ']';
+ $('#bar').siblings("div.layui-form-select").find('dl').find(sel).addClass('layui-this')
+ }
+
+ callback(res.data)
+ } else { //涓嶆垚鍔�
+ // layer.msg(res.msg, {
+ // icon: 2,
+ // time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ // }, function() {});
+ }
+ });
+ }
+ else if (xianshiyemian == 1)
+ {
+ var input = $('select[id="bar1"]').next().find('.layui-select-title input')
+ var val = input.val()
+ $("#bar1").empty()
+ $("#bar1").append('<option value =>' + '</option>');
+ form.render('select');
+
+ var param = {
+ Type: "0,1"
+ };
+ sendData(IP + "/PdaAsn/GetArrivalNotices", param, 'post', function (res) {
+ if (res.code == 0) { //鎴愬姛
+ for (var i = 0; i < res.data.length; i++) {
+ $("#bar1").append('<option value =' + res.data[i].ASNNo + '>' + res.data[i]
+ .ASNNo +
+ '</option>');
+ }
+ form.render('select');
+
+ if (!val) {
+ $('#bar1').siblings("div.layui-form-select").find('dl').find('.layui-select-tips').addClass('layui-this')
+ } else {
+ var sel = 'dd[lay-value=' + val + ']';
+ $('#bar1').siblings("div.layui-form-select").find('dl').find(sel).addClass('layui-this')
+ }
+
+ callback(res.data)
+ } else { //涓嶆垚鍔�
+ // layer.msg(res.msg, {
+ // icon: 2,
+ // time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ // }, function() {});
+ }
+ });
+ }
+
+ }
+
+ /*鈥斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺��*/
//鐐瑰嚮鐗╂枡涓嬫媺妗嗕簨浠�
$("#goodDiv").click(function () {
@@ -464,36 +543,20 @@
}, function () { });
}
})
- //鐐瑰嚮鐗╂枡涓嬫媺妗嗕簨浠�-鏁伴噺
- $("#goodDivw").click(function () {
- if ($("#barw").val() == null || $("#barw").val() == "" || $("#barw").val() == undefined) {
- layer.msg("璇峰厛閫夋嫨鍏ュ簱鍗�", {
- icon: 2,
- time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- }, function () { });
- }
- })
-
//閫変腑鍏ュ簱鍗曚簨浠�
form.on('select(getbar)', function (data) {
updateGoodList()
setOrderGoods();
});
- //閫変腑鍏ュ簱鍗曚簨浠�-鏁伴噺
- form.on('select(getbarw)', function (data) {
- updateGoodListw()
- setOrderGoodsw();
- });
-
+
//閫変腑鐗╂枡浜嬩欢
form.on('select(goodSelect)', function (data) {
setOrderGoods();
});
- //閫変腑鐗╂枡浜嬩欢-鏁伴噺
- form.on('select(goodSelectw)', function (data) {
+ //閫変腑鐗╂枡浜嬩欢-鏁伴噺
+ form.on('select(goodSelect1)', function (data) {
setOrderGoods();
});
-
//缁戝畾鍒版墭鐩樹簨浠�
form.on('submit(formBind)', function (data) {
@@ -564,163 +627,134 @@
// 鏍规嵁鍏ュ簱鏄庣粏ID 鑾峰彇璇︾粏淇℃伅
function setOrderGoods() {
- $("#ImportQuantity").val("");
- $("#Standard").val("");
- $("#ImportFactQuantity").val("");
+ if (xianshiyemian == 0)
+ {
+ $("#ImportQuantity").val("");
+ $("#Standard").val("");
+ $("#ImportFactQuantity").val("");
- var param = {
- Id: parseInt($("#goodSelect").val())
- };
+ var param = {
+ Id: parseInt($("#goodSelect").val())
+ };
- synData(IP + "/PdaAsn/GetArrivalNoticeDetail", param, 'post', function (res) {
- console.log(JSON.stringify(res))
- if (res.code == 0 && res.data != null) { //鎴愬姛
- $("#ImportQuantity").val(res.data.Qty);
- $("#Standard").val(res.data.Standard);
- $("#ImportFactQuantity").val(res.data.FactQty + "");
- }
- });
+ synData(IP + "/PdaAsn/GetArrivalNoticeDetail", param, 'post', function (res) {
+ console.log(JSON.stringify(res))
+ if (res.code == 0 && res.data != null) { //鎴愬姛
+ $("#ImportQuantity").val(res.data.Qty);
+ $("#Standard").val(res.data.Standard);
+ $("#ImportFactQuantity").val(res.data.FactQty + "");
+ }
+ });
+ }
+ else if (xianshiyemian == 1)
+ {
+ $("#ImportQuantity1").val("");
+ $("#Standard1").val("");
+ $("#ImportFactQuantity1").val("");
+
+ var param = {
+ Id: parseInt($("#goodSelect1").val())
+ };
+
+ synData(IP + "/PdaAsn/GetArrivalNoticeDetail", param, 'post', function (res) {
+ console.log(JSON.stringify(res))
+ if (res.code == 0 && res.data != null) { //鎴愬姛
+ $("#ImportQuantity1").val(res.data.Qty);
+ $("#Standard1").val(res.data.Standard);
+ $("#ImportFactQuantity1").val(res.data.FactQty + "");
+ }
+ });
+ }
+
}
- // 鏍规嵁鍏ュ簱鏄庣粏ID 鑾峰彇璇︾粏淇℃伅-鏁伴噺
- function setOrderGoodsw() {
- $("#ImportQuantity").val("");
- $("#Standard").val("");
- $("#ImportFactQuantity").val("");
-
- var param = {
- Id: parseInt($("#goodSelectw").val())
- };
-
- synData(IP + "/PdaAsn/GetArrivalNoticeDetail", param, 'post', function (res) {
- console.log(JSON.stringify(res))
- if (res.code == 0 && res.data != null) { //鎴愬姛
- $("#ImportQuantity").val(res.data.Qty);
- $("#Standard").val(res.data.Standard);
- $("#ImportFactQuantity").val(res.data.FactQty + "");
- }
- });
- }
-
- // 缁戝畾鍏ュ簱鍗曚俊鎭�
- function updateBillList(callback) {
- var input = $('select[id="bar"]').next().find('.layui-select-title input')
- var val = input.val()
- $("#bar").empty()
- $("#bar").append('<option value =>' + '</option>');
- form.render('select');
-
- var param = {
- Type: "0,1"
- };
- sendData(IP + "/PdaAsn/GetArrivalNotices", param, 'post', function (res) {
- if (res.code == 0) { //鎴愬姛
- for (var i = 0; i < res.data.length; i++) {
- $("#bar").append('<option value =' + res.data[i].ASNNo + '>' + res.data[i]
- .ASNNo +
- '</option>');
- }
- form.render('select');
-
- if (!val) {
- $('#bar').siblings("div.layui-form-select").find('dl').find('.layui-select-tips').addClass('layui-this')
- } else {
- var sel = 'dd[lay-value=' + val + ']';
- $('#bar').siblings("div.layui-form-select").find('dl').find(sel).addClass('layui-this')
- }
-
- callback(res.data)
- } else { //涓嶆垚鍔�
- // layer.msg(res.msg, {
- // icon: 2,
- // time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- // }, function() {});
- }
- });
- }
-
+
var asnDetails = "";
- // 缁戝畾鍏ュ簱鍗曠墿鏂欏強鎵规
+ /* 缁戝畾鍏ュ簱鍗曠墿鏂欏強鎵规 */
function updateGoodList() {
- console.log("aaaa");
- var input = $('select[id="goodSelect"]').next().find('.layui-select-title input')
- var val = input.val()
+ if (xianshiyemian == 0)
+ {
+ console.log("aaaa");
+ var input = $('select[id="goodSelect"]').next().find('.layui-select-title input')
+ var val = input.val()
- $("#goodSelect").empty()
- $("#goodSelect").append('<option value =>' + '</option>');
+ $("#goodSelect").empty()
+ $("#goodSelect").append('<option value =>' + '</option>');
- var param = {
- AsnNo: $("#bar").val(),
- };
- synData(IP + "/PdaAsn/GetArrivalNoticeDetails", param, 'post', function (res) {
- console.log("鍑哄簱鍙o細" + JSON.stringify(res))
- if (res.code == 0) { //鎴愬姛
- asnDetails = res.data;
- for (var i = 0; i < res.data.length; i++) {
- if (i == 0) {
- $("#goodSelect").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i]
- .SkuName + "-" + res.data[i].LotNo +
- '</option>');
- } else {
- $("#goodSelect").append('<option value =' + res.data[i].Id + '>' + res.data[i]
- .SkuName + "-" + res.data[i].LotNo +
- '</option>');
- }
+ var param = {
+ AsnNo: $("#bar").val(),
+ };
+ synData(IP + "/PdaAsn/GetArrivalNoticeDetails", param, 'post', function (res) {
+ console.log("鍑哄簱鍙o細" + JSON.stringify(res))
+ if (res.code == 0) { //鎴愬姛
+ asnDetails = res.data;
+ for (var i = 0; i < res.data.length; i++) {
+ if (i == 0) {
+ $("#goodSelect").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i]
+ .SkuName + "-" + res.data[i].LotNo +
+ '</option>');
+ } else {
+ $("#goodSelect").append('<option value =' + res.data[i].Id + '>' + res.data[i]
+ .SkuName + "-" + res.data[i].LotNo +
+ '</option>');
+ }
- }
- form.render('select');
+ }
+ form.render('select');
- if (!val) {
- $('#goodSelect').siblings("div.layui-form-select").find('dl').find('.layui-select-tips').addClass('layui-this')
- } else {
- var sel = 'dd[lay-value=' + val + ']';
- $('#goodSelect').siblings("div.layui-form-select").find('dl').find(sel).addClass('layui-this')
- }
- } else {
- }
- });
+ if (!val) {
+ $('#goodSelect').siblings("div.layui-form-select").find('dl').find('.layui-select-tips').addClass('layui-this')
+ } else {
+ var sel = 'dd[lay-value=' + val + ']';
+ $('#goodSelect').siblings("div.layui-form-select").find('dl').find(sel).addClass('layui-this')
+ }
+ } else {
+ }
+ });
+ }
+ else if (xianshiyemian == 1)
+ {
+ console.log("bbbb");
+ var input = $('select[id="goodSelect1"]').next().find('.layui-select-title input')
+ var val = input.val()
+
+ $("#goodSelect1").empty()
+ $("#goodSelect1").append('<option value =>' + '</option>');
+
+ var param = {
+ AsnNo: $("#bar1").val(),
+ };
+ synData(IP + "/PdaAsn/GetArrivalNoticeDetails", param, 'post', function (res) {
+ console.log("鍑哄簱鍙o細" + JSON.stringify(res))
+ if (res.code == 0) { //鎴愬姛
+ asnDetails = res.data;
+ for (var i = 0; i < res.data.length; i++) {
+ if (i == 0) {
+ $("#goodSelect1").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i]
+ .SkuName + "-" + res.data[i].LotNo +
+ '</option>');
+ } else {
+ $("#goodSelect1").append('<option value =' + res.data[i].Id + '>' + res.data[i]
+ .SkuName + "-" + res.data[i].LotNo +
+ '</option>');
+ }
+
+ }
+ form.render('select');
+
+ if (!val) {
+ $('#goodSelect1').siblings("div.layui-form-select").find('dl').find('.layui-select-tips').addClass('layui-this')
+ } else {
+ var sel = 'dd[lay-value=' + val + ']';
+ $('#goodSelect1').siblings("div.layui-form-select").find('dl').find(sel).addClass('layui-this')
+ }
+ } else {
+ }
+ });
+ }
+
}
- // 缁戝畾鍏ュ簱鍗曠墿鏂欏強鎵规-鏁伴噺
- function updateGoodList() {
- console.log("aaaa");
- var input = $('select[id="goodSelectw"]').next().find('.layui-select-title input')
- var val = input.val()
-
- $("#goodSelectw").empty()
- $("#goodSelectw").append('<option value =>' + '</option>');
-
- var param = {
- AsnNo: $("#bar").val(),
- };
- synData(IP + "/PdaAsn/GetArrivalNoticeDetails", param, 'post', function (res) {
- console.log("鍑哄簱鍙o細" + JSON.stringify(res))
- if (res.code == 0) { //鎴愬姛
- asnDetails = res.data;
- for (var i = 0; i < res.data.length; i++) {
- if (i == 0) {
- $("#goodSelectw").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i]
- .SkuName + "-" + res.data[i].LotNo +
- '</option>');
- } else {
- $("#goodSelectw").append('<option value =' + res.data[i].Id + '>' + res.data[i]
- .SkuName + "-" + res.data[i].LotNo +
- '</option>');
- }
-
- }
- form.render('select');
-
- if (!val) {
- $('#goodSelectw').siblings("div.layui-form-select").find('dl').find('.layui-select-tips').addClass('layui-this')
- } else {
- var sel = 'dd[lay-value=' + val + ']';
- $('#goodSelectw').siblings("div.layui-form-select").find('dl').find(sel).addClass('layui-this')
- }
- } else {
- }
- });
- }
-
+
// 娓叉煋绠辩爜淇℃伅
function refreshTable() {
//鍏堟竻绌轰竴涓嬬瀛愬垪琛�
@@ -823,26 +857,7 @@
}
});
}
- // 鍒ゆ柇鎵樼洏鐮佹槸鍚﹀彲鐢�
- function checkPalletStatw() {
- var param = {
- "PalletNo": $("#STOCKCODEw").val()
- }
- sendData(IP + "/PdaAsn/IsEnablePalletNo", param, 'post', function (res) {
- if (res.code == 0) {
-
- $.cookie('STOCKCODEw', $("#STOCKCODEw").val());
- refreshTable()
- // $("#BOXCODE").focus();
-
- } else {
- layer.msg(res.msg, {
- icon: 2,
- time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- }, function () { });
- }
- });
- }
+
function checkBoxInfo() {
var param = {
--
Gitblit v1.8.0