From b5eec4dc738e4abc20c652c041fa7b17ba0e636f Mon Sep 17 00:00:00 2001 From: Demo <Demo@DESKTOP-CPA90BF> Date: 星期一, 19 二月 2024 09:37:46 +0800 Subject: [PATCH] Merge branch 'csc' --- HTML/views/WareHouseSetting/Locate.html | 49 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 46 insertions(+), 3 deletions(-) diff --git a/HTML/views/WareHouseSetting/Locate.html b/HTML/views/WareHouseSetting/Locate.html index efde3f6..e2adf60 100644 --- a/HTML/views/WareHouseSetting/Locate.html +++ b/HTML/views/WareHouseSetting/Locate.html @@ -157,10 +157,41 @@ if (checkData.length === 0) { return layer.msg('璇烽�夋嫨鏁版嵁'); } + else if(checkData.length > 1) + { + var li = 0; + var ping = 0; + var WareNo = "W01"; + checkData.forEach(item => { + if (item.WareHouseName == "鍔涜绔嬩綋搴�") + { + li += 1; + WareNo = "W01"; + if (ping > 0) + { + return; + } + } + if (item.WareHouseName == "鍔涜骞冲簱") + { + ping += 1; + WareNo = "W02"; + if (li > 0) + { + return; + } + } + }); + if (li != 0 && ping != 0) + { + return layer.msg('璇峰嬁閫夋嫨澶氱浠撳簱锛�'); + } + } + layer.open({ type: 2, title: '缂栬緫鍌ㄤ綅鐘舵�侀泦鍚�', - content: 'LocateFrom.html', + content: 'LocateFrom.html?WareHouseNo='+WareNo, maxmin: true, area: ['560px', '510px'], btn: ['纭畾', '鍙栨秷'], @@ -291,17 +322,29 @@ title: '鎵�灞炰粨搴�', align: 'center', width: 140, - fixed: 'left' + fixed: 'left', + templet: function(d) { + + return d.WareHouseNo + '-' + d.WareHouseName; + } }, { field: 'RoadwayNo', title: '鎵�灞炲贩閬�', align: 'center', width: 130, + templet: function(d) { + + return d.RoadwayNo + '-' + d.RoadwayName; + } }, { field: 'AreaName', title: '鎵�灞炲尯鍩�', align: 'center', width: 130, + templet: function(d) { + + return d.AreaNo + '-' + d.AreaName; + } }, { field: 'LocatNo', title: '鍌ㄤ綅缂栫爜', @@ -490,7 +533,7 @@ $("#AreaNo").append('<option value =""></option>'); if (res.code == 0) { //鎴愬姛 for (var i = 0; i < res.data.length; i++) { - $("#AreaNo").append('<option value =' + res.data[i].AreaNo + '>' + res.data[i].WareHouseNo + '-' + + $("#AreaNo").append('<option value =' + res.data[i].AreaNo + '>' + res.data[i].AreaNo + '-' + res.data[i].AreaName + '</option>'); } form.render('select'); -- Gitblit v1.8.0