From f09d9da82fa9f4e8dc9081be3d415c8e1a5f2c92 Mon Sep 17 00:00:00 2001
From: Administrator <Administrator@DESKTOP-5BIMHQ3>
Date: 星期四, 22 二月 2024 15:43:30 +0800
Subject: [PATCH] 库存总量和库存明细新增维护货主编码和货主名称字段;修改库存统计-库存总量分组方式
---
HTML/views/ASNSetting/ArrivalNoticeDetail.html | 125 ++++++++++++++++++++++++++++++++++++++---
1 files changed, 115 insertions(+), 10 deletions(-)
diff --git a/HTML/views/ASNSetting/ArrivalNoticeDetail.html b/HTML/views/ASNSetting/ArrivalNoticeDetail.html
index 11938fc..068f453 100644
--- a/HTML/views/ASNSetting/ArrivalNoticeDetail.html
+++ b/HTML/views/ASNSetting/ArrivalNoticeDetail.html
@@ -55,6 +55,7 @@
<option value="4">杞﹂棿浣欐枡閫�鍥炲叆搴�</option>
<option value="5">鍏跺畠鍏ュ簱</option>
<option value="6">浠e偍鍏ュ簱</option>
+ <option value="7">瀵勫瓨鍏ュ簱</option>
<!-- JC08 -->
<!-- <option value="0">鎴愬搧鍏ュ簱</option>
<option value="1">鍘熸枡鍏ュ簱</option>
@@ -62,7 +63,7 @@
</select>
</div>
- <label class="layui-form-label">瀹㈡埛鍚嶇О</label>
+ <label class="layui-form-label" style="width: 70px;"><p id="CustomerNamep">瀹㈡埛</p></label>
<div class="layui-input-inline">
<select name="CustomerName" id="CustomerName" lay-verify="" lay-search>
<option value=""></option>
@@ -115,7 +116,15 @@
</script>
<script type="text/html" id="table-content-list">
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"> <i class="layui-icon layui-icon-delete"></i>鍒犻櫎</a>
- </script>
+ </script>
+ <script type="text/html" id="table-content-Packlist">
+ {{#
+ function GetPack(d){
+ return d.PackagNo + '-' + d.PackagName;
+ }
+ }}
+ {{ GetPack(d) }}
+ </script>
</div>
</div>
</div>
@@ -160,7 +169,7 @@
{field: 'UnitName',title: '璁¢噺鍗曚綅',align: 'center',width: 70},
{field: 'Standard',title: '瑙勬牸',width: 160,align: 'center'},
{field: 'LotText',title: '鎵规鎻忚堪',align: 'center',edit: 'text',width: 160},
- {field: 'PackagNo',title: '鍖呰鍚嶇О',width: 160},
+ {field: 'PackagNo',title: '鍖呰鍚嶇О',width: 160, templet: "#table-content-Packlist"},
{field: 'Price',title: '鍗曚环',align: 'center',width: 80},
{field: 'Money',title: '閲戦',align: 'center',width: 100},
{field: 'UDF1',title: '鑷畾涔夊垪1',align: 'center',edit: 'text',width: 140},
@@ -463,6 +472,7 @@
var value = data.value;
if(value!=TypeValue){
console.log(value);
+ getCustomerList();
arr = [];
// 娓叉煋Table
refreshTable(null);
@@ -556,6 +566,19 @@
});
return;
}
+ var type= $("#Type").val();
+ if(type=='6'){
+ var customerName=$("#CustomerName").val();
+ if(customerName==''){
+ layer.msg("浠e偍鍗曟嵁璇烽�夋嫨璐т富锛�", {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () {
+
+ });
+ return;
+ }
+ }
SetArrivalNotice();
});
@@ -584,13 +607,72 @@
// 缁戝畾涓嬫媺淇℃伅
function getCustomerList() {
+ /*
+ 0锛氬鎴�
+ 閫�璐у叆搴�
+ 3
+ 1锛氫緵搴斿晢
+ 閲囪喘鍏ュ簱銆佸叾瀹冨叆搴�
+ 1銆�5
+ 2锛氳揣涓�
+ 鎴愬搧鍏ュ簱銆佷腑闂村搧鍏ュ簱銆佽溅闂翠綑鏂欏叆搴撱�佷唬鍌ㄥ叆搴�
+ 0銆�2銆�4銆�6
+ */
sendData(IP + "/Basis/GetCustomerSelect", {}, 'get', function (res) {
if (res.code == 0) { //鎴愬姛
$("#CustomerName").empty();
$("#CustomerName").append('<option value =""></option>');
for (var i = 0; i < res.data.length; i++) {
- $("#CustomerName").append('<option value =' + res.data[i].CustomerNo + '>' +
- res.data[i].CustomerName + '</option>');
+ var TypeNum = 0;
+
+ switch($("#Type").val())
+ {
+ case "3": //閫�璐у叆搴�
+ TypeNum = 0;
+ console.log(TypeNum)
+ break;
+ case "1": //閲囪喘鍏ュ簱
+ case "5": //鍏跺畠鍏ュ簱
+ TypeNum = 1;
+ console.log(TypeNum)
+ break;
+ case "0": //鎴愬搧鍏ュ簱
+ case "2": //涓棿鍝佸叆搴�
+ case "4": //杞﹂棿浣欐枡鍏ュ簱
+ case "6": //浠e偍鍏ュ簱
+ case "7": //瀵勫瓨鍏ュ簱
+ TypeNum = 2;
+ console.log(TypeNum)
+ break;
+ }
+ //鍒ゆ柇鍗曟嵁绫诲瀷
+ if (TypeNum == 0)
+ {
+ if (res.data[i].Type == 0)
+ {
+ $("#CustomerNamep").html("瀹㈡埛");
+ $("#CustomerName").append('<option value =' + res.data[i].CustomerNo + '>' +
+ res.data[i].CustomerName + '</option>');
+ }
+ }
+ else if (TypeNum == 1)
+ {
+ if (res.data[i].Type == 1)
+ {
+ $("#CustomerNamep").html("渚涘簲鍟�");
+ $("#CustomerName").append('<option value =' + res.data[i].CustomerNo + '>' +
+ res.data[i].CustomerName + '</option>');
+ }
+ }
+ else if (TypeNum == 2)
+ {
+ if (res.data[i].Type == 2)
+ {
+ $("#CustomerNamep").html("璐т富");
+ $("#CustomerName").append('<option value =' + res.data[i].CustomerNo + '>' +
+ res.data[i].CustomerName + '</option>');
+ }
+ }
}
form.render('select');
} else { //涓嶆垚鍔�
@@ -620,12 +702,14 @@
}
arr.push(data[i]); //灞炴��
}
+
$.extend(infoOptions, {
data: arr
});
infoOptions.page = {
curr: 1
}
+ console.log(infoOptions)
table.render(infoOptions);
}
@@ -705,11 +789,32 @@
return -1;
}
if (arr[i].LotNo == "" || arr[i].LotNo ==undefined) {
- layer.msg("璇疯緭鍏ユ壒娆★紒", {
- icon: 2,
- time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- });
- return -1;
+ //鍒ゆ柇鏄惁涓哄搴斾笉闇�瑕佹壒娆$殑鍗曟嵁
+ var TypeNum = 0;
+
+ switch($("#Type").val())
+ {
+ //1锛氶噰璐叆搴� 2锛氫腑闂村搧鍏ュ簱 5锛氬叾瀹冨叆搴� 6锛氫唬鍌ㄥ叆搴� 7锛氬瘎瀛樺叆搴�
+ case "1" :
+ case "2" :
+ case "5" :
+ case "6" :
+ case "7" :
+ console.log($("#Type").val())
+ TypeNum = 1;
+ break;
+ }
+ console.log(TypeNum)
+
+ if (TypeNum == 0)
+ {
+ layer.msg("璇疯緭鍏ユ壒娆★紒1", {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ });
+ return -1;
+ }
+
}
if (!reg.test(arr[i].Qty)) {
--
Gitblit v1.8.0