From e6d5b88ce459fe8414aa7a96678820cc0246326c Mon Sep 17 00:00:00 2001 From: Administrator <Administrator@DESKTOP-5BIMHQ3> Date: 星期五, 01 三月 2024 16:19:30 +0800 Subject: [PATCH] Merge branch 'wxw' --- HTML/views/ASNSetting/ArrivalNoticeDetail.html | 116 +++++++++++++++++++++++++++++++++++++++++----------------- 1 files changed, 82 insertions(+), 34 deletions(-) diff --git a/HTML/views/ASNSetting/ArrivalNoticeDetail.html b/HTML/views/ASNSetting/ArrivalNoticeDetail.html index 7d53f60..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" style="width: 70px;"><p id="CustomerNamep">瀹㈡埛鍚嶇О</p></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> @@ -144,10 +153,6 @@ var arr = []; var TypeValue=$("#Type").val(); - var type0 = [3]; //瀹㈡埛 - var type1 = [1,5]; //渚涘簲鍟� - var type2 = [0,2,4,6]; //璐т富 - // 鍔犺浇涓嬫媺淇℃伅 getCustomerList(); @@ -164,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}, @@ -561,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(); }); @@ -605,45 +623,52 @@ $("#CustomerName").empty(); $("#CustomerName").append('<option value =""></option>'); for (var i = 0; i < res.data.length; i++) { - //鍒ゆ柇鍗曟嵁绫诲瀷 - if (type0[0] == $("#Type").val()) + var TypeNum = 0; + + switch($("#Type").val()) { - /* - 0锛氬鎴� - 閫�璐у叆搴� - 3 - */ + 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("瀹㈡埛閫夋嫨"); + $("#CustomerNamep").html("瀹㈡埛"); $("#CustomerName").append('<option value =' + res.data[i].CustomerNo + '>' + res.data[i].CustomerName + '</option>'); } } - else if (type1[0] == $("#Type").val() || type1[1] == $("#Type").val()) + else if (TypeNum == 1) { - /* - 1锛氫緵搴斿晢 - 閲囪喘鍏ュ簱銆佸叾瀹冨叆搴� - 1銆�5 - */ if (res.data[i].Type == 1) { - $("#CustomerNamep").html("渚涘簲鍟嗛�夋嫨"); + $("#CustomerNamep").html("渚涘簲鍟�"); $("#CustomerName").append('<option value =' + res.data[i].CustomerNo + '>' + res.data[i].CustomerName + '</option>'); } } - else if (type2[0] == $("#Type").val() || type2[1] == $("#Type").val() || type2[2] == $("#Type").val() || type2[3] == $("#Type").val()) + else if (TypeNum == 2) { - /* - 2锛氳揣涓� - 鎴愬搧鍏ュ簱銆佷腑闂村搧鍏ュ簱銆佽溅闂翠綑鏂欏叆搴撱�佷唬鍌ㄥ叆搴� - 0銆�2銆�4銆�6 - */ if (res.data[i].Type == 2) { - $("#CustomerNamep").html("璐т富閫夋嫨"); + $("#CustomerNamep").html("璐т富"); $("#CustomerName").append('<option value =' + res.data[i].CustomerNo + '>' + res.data[i].CustomerName + '</option>'); } @@ -677,12 +702,14 @@ } arr.push(data[i]); //灞炴�� } + $.extend(infoOptions, { data: arr }); infoOptions.page = { curr: 1 } + console.log(infoOptions) table.render(infoOptions); } @@ -762,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