From 0dd158492d2dd62de471f3e5841c01bfeb1f34c6 Mon Sep 17 00:00:00 2001 From: LSH Date: 星期六, 09 九月 2023 11:17:00 +0800 Subject: [PATCH] #出库优化、显示优化、流程优化 --- src/main/webapp/static/js/pack/pack.js | 2 src/main/webapp/static/js/saas/locDetl.js | 2 src/main/webapp/static/js/orderDetl/orderDetl.js | 2 src/main/webapp/views/order/order.html | 41 +-- src/main/java/com/zy/asrs/utils/InitStaDesc.java | 2 src/main/resources/mapper/WrkDetlMapper.xml | 8 src/main/webapp/static/js/saas/stockAdjust.js | 30 +- src/main/webapp/static/js/order/out.js | 4 src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java | 18 + src/main/java/com/zy/asrs/entity/WrkDetl.java | 38 ++ src/main/java/com/zy/asrs/entity/param/StockOutParam.java | 5 src/main/webapp/static/js/adjDetl/adjDetl.js | 2 src/main/webapp/static/js/common.js | 10 src/main/webapp/static/js/pakStore/pakStore.js | 2 src/main/webapp/static/js/pakStore/stockOutOrder.js | 38 ++- src/main/java/com/zy/asrs/utils/OutboundAllocationUtil.java | 250 +++++++++++++++++++++++++ src/main/java/com/zy/asrs/entity/OrderDetl.java | 32 ++ src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java | 4 src/main/webapp/static/js/locDetlStatis/locDetlStatis.js | 2 src/main/webapp/static/js/pakStore/stockAdjust.js | 30 +- src/main/webapp/static/js/manLocDetl/manLocDetl.js | 2 src/main/webapp/static/js/pakStore/stockOut.js | 36 +- src/main/webapp/static/js/locDetl/locDetl.js | 8 src/main/java/com/zy/common/model/LocDetlDto.java | 13 + src/main/webapp/static/js/order/order.js | 18 + 25 files changed, 453 insertions(+), 146 deletions(-) diff --git a/src/main/java/com/zy/asrs/entity/OrderDetl.java b/src/main/java/com/zy/asrs/entity/OrderDetl.java index ef45851..18b1894 100644 --- a/src/main/java/com/zy/asrs/entity/OrderDetl.java +++ b/src/main/java/com/zy/asrs/entity/OrderDetl.java @@ -236,7 +236,7 @@ private Integer deadWarn; /** - * 鍒惰喘 1: 鍒堕�� 2: 閲囪喘 3: 澶栧崗 + * 鍒惰喘 1: 鍒堕�� 2: 閲囪喘 3: 澶栧崗 銆併�佹睙閾滐細鏄惁纭 1: 纭 2: 鏈‘璁� */ @ApiModelProperty(value= "鍒惰喘 1: 鍒堕�� 2: 閲囪喘 3: 澶栧崗 ") private Integer source; @@ -360,17 +360,26 @@ } } +// public String getSource$(){ +// if (null == this.source){ return null; } +// switch (this.source){ +// case 1: +// return "鍒堕��"; +// case 2: +// return "閲囪喘"; +// case 3: +// return "澶栧崗"; +// default: +// return String.valueOf(this.source); +// } +// } public String getSource$(){ - if (null == this.source){ return null; } + if (null == this.source){ return "鏈‘璁�"; } switch (this.source){ case 1: - return "鍒堕��"; - case 2: - return "閲囪喘"; - case 3: - return "澶栧崗"; + return "纭"; default: - return String.valueOf(this.source); + return "鏈‘璁�"; } } @@ -442,6 +451,13 @@ return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); } + public String getQty$(){ + if (getAnfme().equals(getQty())){ + return "宸插畬鎴�"; + } + return "鏈畬鎴�"; + } + public Double getEnableQty() { if (null != this.anfme && this.workQty != null) { return this.anfme - this.workQty; diff --git a/src/main/java/com/zy/asrs/entity/WrkDetl.java b/src/main/java/com/zy/asrs/entity/WrkDetl.java index 7e6a66f..858ca9b 100644 --- a/src/main/java/com/zy/asrs/entity/WrkDetl.java +++ b/src/main/java/com/zy/asrs/entity/WrkDetl.java @@ -204,7 +204,7 @@ private Integer beBatch; /** - * 淇濊川鏈� + * 淇濊川鏈� 銆併�佹睙閾滐細鏄惁纭 1: 纭 2: 鏈‘璁� */ @ApiModelProperty(value= "淇濊川鏈�") @TableField("dead_time") @@ -218,7 +218,7 @@ private Integer deadWarn; /** - * 鍒惰喘 1: 鍒堕�� 2: 閲囪喘 3: 澶栧崗 + * 鍒惰喘 1: 鍒堕�� 2: 閲囪喘 3: 澶栧崗 銆併�佹睙閾滐細鏄惁纭 1: 纭 2: 鏈‘璁� */ @ApiModelProperty(value= "鍒惰喘 1: 鍒堕�� 2: 閲囪喘 3: 澶栧崗 ") private Integer source; @@ -289,17 +289,37 @@ } } +// public String getSource$(){ +// if (null == this.source){ return null; } +// switch (this.source){ +// case 1: +// return "鍒堕��"; +// case 2: +// return "閲囪喘"; +// case 3: +// return "澶栧崗"; +// default: +// return String.valueOf(this.source); +// } +// } + public String getSource$(){ - if (null == this.source){ return null; } + if (null == this.source){ return "鏈‘璁�"; } switch (this.source){ case 1: - return "鍒堕��"; - case 2: - return "閲囪喘"; - case 3: - return "澶栧崗"; + return "纭"; default: - return String.valueOf(this.source); + return "鏈‘璁�"; + } + } + + public String getDeadTime(){ + if (null == this.source){ return "鏈‘璁�"; } + switch (this.source){ + case 1: + return "纭"; + default: + return "鏈‘璁�"; } } diff --git a/src/main/java/com/zy/asrs/entity/param/StockOutParam.java b/src/main/java/com/zy/asrs/entity/param/StockOutParam.java index f0c8819..9f99775 100644 --- a/src/main/java/com/zy/asrs/entity/param/StockOutParam.java +++ b/src/main/java/com/zy/asrs/entity/param/StockOutParam.java @@ -47,6 +47,11 @@ // 鏈ㄧ涓摐绠旀暟閲� private Double count; + public void setAnfme(Double anfme){ + this.anfme=anfme; + this.count=anfme; + } + } } diff --git a/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java index ab7d545..af8a1a9 100644 --- a/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java @@ -13,6 +13,7 @@ import com.zy.asrs.entity.param.LocDetlAdjustParam; import com.zy.asrs.entity.param.StockOutParam; import com.zy.asrs.service.*; +import com.zy.asrs.utils.OutboundAllocationUtil; import com.zy.asrs.utils.Utils; import com.zy.common.model.*; import com.zy.common.model.enums.IoWorkType; @@ -166,7 +167,7 @@ for (StockOutParam.LocDetl paramLocDetl : param.getLocDetls()) { if (!Cools.isEmpty(paramLocDetl.getLocNo(), paramLocDetl.getMatnr(), paramLocDetl.getCount())) { LocDetl one = locDetlService.selectItem(paramLocDetl.getLocNo(), paramLocDetl.getMatnr(), paramLocDetl.getBatch()); - if (null != one) locDetlDtos.add(new LocDetlDto(one, paramLocDetl.getCount())); + if (null != one) locDetlDtos.add(new LocDetlDto(one, paramLocDetl.getCount(), param.getOrderNo())); } } if (!locDetlDtos.isEmpty()) { @@ -219,7 +220,7 @@ null, // 鍙戣揣鏃堕棿 null, // 鐗╂祦鍚嶇О null, // 鐗╂祦鍗曞彿 - 1L, // 璁㈠崟鐘舵�� + 2L, // 璁㈠崟鐘舵�� 1, // 鐘舵�� userId, // 娣诲姞浜哄憳 now, // 娣诲姞鏃堕棿 @@ -245,10 +246,11 @@ orderDetl.setSuppCode(String.valueOf(i)); // 琛屽彿 orderDetl.setManu(locDetl.getLocNo()); //搴撲綅鍙� orderDetl.setBatch(locDetl.getBatch()); //鏈ㄧ缂栫爜 - orderDetl.setAnfme(locDetl.getCount());//鍑哄簱鏁伴噺 + orderDetl.setAnfme(locDetl.getAnfme());//鍑哄簱鏁伴噺 orderDetl.setModel(locDetl.getModel());//鎵规 orderDetl.setSpecs(locDetl.getSpecs());//瑙勬牸 orderDetl.setBrand(locDetl.getBrand());//鏈ㄧ绫诲瀷 + orderDetl.setWorkQty(locDetl.getAnfme()); orderDetl.setOrderId(order.getId()); orderDetl.setOrderNo(order.getOrderNo()); orderDetl.setCreateBy(userId); @@ -261,6 +263,12 @@ throw new CoolException("鐢熸垚鍗曟嵁鏄庣粏澶辫触锛岃鑱旂郴绠$悊鍛�"); } } + + List<StockOutParam> stockOutParams = OutboundAllocationUtil.OutboundClassification(param); + for (StockOutParam stockOutParam : stockOutParams){ + startupFullTakeStore(stockOutParam,userId); + } + } else { throw new CoolException("璁㈠崟鍙烽噸澶嶏紝璁㈠崟"+param.getOrderNo()+"宸插瓨鍦紒锛侊紒"); } @@ -341,7 +349,7 @@ if (detlDto.getCount()==null || detlDto.getCount() <= 0.0D) {continue;} WrkDetl wrkDetl = new WrkDetl(); wrkDetl.sync(detlDto.getLocDetl()); - wrkDetl.setOrderNo(""); // 鎵嬪姩鍑哄簱涓嶉渶瑕佸甫鍑哄簱瀛樹腑鐨勫崟鎹紪鍙� + wrkDetl.setOrderNo(detlDto.getOrderNo()); // 鎵嬪姩鍑哄簱涓嶉渶瑕佸甫鍑哄簱瀛樹腑鐨勫崟鎹紪鍙� wrkDetl.setWrkNo(workNo); wrkDetl.setIoTime(now); Double anfme = ioType==101?detlDto.getLocDetl().getAnfme():detlDto.getCount(); @@ -648,7 +656,7 @@ for (StockOutParam.LocDetl paramLocDetl : param.getLocDetls()) { if (!Cools.isEmpty(paramLocDetl.getLocNo(), paramLocDetl.getMatnr(), paramLocDetl.getCount())) { LocDetl one = locDetlService.selectItem(paramLocDetl.getLocNo(), paramLocDetl.getMatnr(), paramLocDetl.getBatch()); - if (null != one) locDetlDtos.add(new LocDetlDto(one, paramLocDetl.getCount())); + if (null != one) locDetlDtos.add(new LocDetlDto(one, paramLocDetl.getCount(),param.getOrderNo())); } } if (!locDetlDtos.isEmpty()) { diff --git a/src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java b/src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java index 03e1024..386cd70 100644 --- a/src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java +++ b/src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java @@ -117,7 +117,7 @@ // 鏇存柊璁㈠崟瀹屾垚鏁伴噺 OrderDetl orderDetl = orderDetlService.selectItem(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch()); if (orderDetl==null){ - orderDetl = orderDetlService.selectItem(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), null); + orderDetl = orderDetlService.selectItem(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch()); } try { if(!Cools.isEmpty(orderDetl)){ @@ -169,7 +169,7 @@ // 鏇存柊璁㈠崟瀹屾垚鏁伴噺 OrderDetl orderDetl = orderDetlService.selectItem(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch()); if (orderDetl==null){ - orderDetl = orderDetlService.selectItem(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), null); + orderDetl = orderDetlService.selectItem(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch()); } try { if(!Cools.isEmpty(orderDetl)){ diff --git a/src/main/java/com/zy/asrs/utils/InitStaDesc.java b/src/main/java/com/zy/asrs/utils/InitStaDesc.java index 934d92b..fd8980d 100644 --- a/src/main/java/com/zy/asrs/utils/InitStaDesc.java +++ b/src/main/java/com/zy/asrs/utils/InitStaDesc.java @@ -24,7 +24,7 @@ } public void in() { - // 鍏ㄧ彮鍏ュ簱 + // 鍏ㄦ澘鍏ュ簱 int[] stnNos = new int[] {305, 303, 301}; int[] crnStns = new int[] {321, 320, 319, 318, 317, 316, 315, 314, 313, 311, 309, 307}; for (int stnNo : stnNos) { diff --git a/src/main/java/com/zy/asrs/utils/OutboundAllocationUtil.java b/src/main/java/com/zy/asrs/utils/OutboundAllocationUtil.java new file mode 100644 index 0000000..b7992c7 --- /dev/null +++ b/src/main/java/com/zy/asrs/utils/OutboundAllocationUtil.java @@ -0,0 +1,250 @@ +package com.zy.asrs.utils; + +import com.zy.asrs.entity.param.StockOutParam; + +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + +public class OutboundAllocationUtil { + public static void main(String[] args) { + int numLanes = 3; + int numWarehouses = 2; + List<Integer> goods = new ArrayList<>(); + + // Generate random goods// 鐢熸垚闅忔満璐х墿鏁伴噺 + Random random = new Random(); + for (int i = 0; i < numLanes; i++) { + int goodsCount = random.nextInt(10) + 1; // Randomly generate goods count (1-10)// 闅忔満鐢熸垚璐х墿鏁伴噺 (1-10) + goods.add(goodsCount); + } + int[] warehouses = distributeGoods(numLanes, numWarehouses,goods); + + + System.out.println("Goods distribution:");//璐х墿鍒嗛厤鎯呭喌 + for (int i = 0; i < numWarehouses; i++) { + System.out.println("Warehouse " + (i + 1) + ": " + warehouses[i] + " goods"); + } + + int[] warehouses2 = distributeGoods2(numLanes, numWarehouses,goods); + + System.out.println("Goods distribution2:");//璐х墿鍒嗛厤鎯呭喌 + for (int i = 0; i < numWarehouses; i++) { + System.out.println("Warehouse " + (i + 1) + ": " + warehouses2[i] + " goods"); + } + + int totalItems = 1000; // 鏇挎崲涓哄疄闄呯殑鍑哄簱绠卞瓙鏁伴噺 + distributeItemsToTrucks(totalItems); + } + + public static int[] distributeGoods(int numLanes, int numWarehouses,List<Integer> goods) { + int[] warehouses = new int[numWarehouses]; + + // Calculate average goods per warehouse // 璁$畻姣忎釜浠撳簱搴斿垎閰嶇殑骞冲潎璐х墿鏁伴噺 + int totalGoods = goods.stream().mapToInt(Integer::intValue).sum(); + int averageGoods = totalGoods / numWarehouses; + + // Distribute goods to warehouses// 鐢熸垚闅忔満璐х墿鏁伴噺 + int currentWarehouse = 0; + for (int i = 0; i < numLanes; i++) { + int goodsCount = goods.get(i); + + if (warehouses[currentWarehouse] + goodsCount <= averageGoods) { + // Assign goods to current warehouse // 灏嗚揣鐗╁垎閰嶇粰褰撳墠浠撳簱 + warehouses[currentWarehouse] += goodsCount; + } else { + // Move to the next warehouse// 绉昏嚦涓嬩竴涓粨搴� + if (currentWarehouse==0){ + currentWarehouse++; + } + warehouses[currentWarehouse] += goodsCount; + } + } + + return warehouses; + } + + public static int[] distributeGoods2(int numLanes, int numWarehouses,List<Integer> goods) { + int[] warehouses = new int[numWarehouses]; + + // Calculate total goods// 璁$畻鎬昏揣鐗╂暟閲� + int totalGoods = goods.stream().mapToInt(Integer::intValue).sum(); + + // Distribute goods to warehouses// 灏嗚揣鐗╁垎閰嶇粰浠撳簱 + int currentWarehouse = 0; + for (int i = 0; i < numLanes; i++) { + int goodsCount = goods.get(i); + + while (goodsCount > 0) { + if (currentWarehouse >= numWarehouses) { + currentWarehouse = 0; // Wrap around to the first warehouse if all warehouses are filled// 濡傛灉鎵�鏈変粨搴撻兘宸茬粡瑁呮弧锛屽垯鍥炲埌绗竴涓粨搴� + } + + int spaceAvailable = totalGoods / numWarehouses - warehouses[currentWarehouse]; + int goodsToAssign = Math.min(spaceAvailable, goodsCount); + + warehouses[currentWarehouse] += goodsToAssign; + goodsCount -= goodsToAssign; + currentWarehouse++; + } + } + + return warehouses; + } + + public static void distributeItemsToTrucks(int totalItems) { + int totalSlots = 1200 * 3; // 鎬诲簱浣嶆暟閲� + int itemsPerTruck = totalItems / 2; // 姣忚締璐ц溅搴旇杞界殑绠卞瓙鏁伴噺 + + // 鍒濆鍑哄簱鏁伴噺 + int itemsInLane1 = totalItems / 6; + int itemsInLane2 = totalItems / 6; + int itemsInLane3 = totalItems / 6; + + int totalItemsInLanes = itemsInLane1 + itemsInLane2 + itemsInLane3; + + // 璋冩暣鍑哄簱鏁伴噺鐩村埌鎬绘暟绛変簬N + while (totalItemsInLanes - totalItems< 0|| totalItemsInLanes - totalItems>=3) { + if (totalItemsInLanes > totalItems) { + // 鍒濆鍊艰繃澶э紝鍑忓皯姣忎釜宸烽亾鐨勫嚭搴撴暟閲� + itemsInLane1--; + itemsInLane2--; + itemsInLane3--; + } else { + // 鍒濆鍊艰繃灏忥紝澧炲姞姣忎釜宸烽亾鐨勫嚭搴撴暟閲� + itemsInLane1++; + itemsInLane2++; + itemsInLane3++; + } + totalItemsInLanes = itemsInLane1 + itemsInLane2 + itemsInLane3; + } + + // 鍒嗛厤鍒�2涓揣杞� + int itemsPerTruckPerLane = itemsPerTruck / 3; // 姣忎釜宸烽亾姣忚締璐ц溅搴旇杞界殑绠卞瓙鏁伴噺 + + // 宸烽亾1鍒嗛厤 + int lane1Truck1Items = itemsPerTruckPerLane; + int lane1Truck2Items = itemsInLane1 - itemsPerTruckPerLane; + + // 宸烽亾2鍒嗛厤 + int lane2Truck1Items = itemsPerTruckPerLane; + int lane2Truck2Items = itemsInLane2 - itemsPerTruckPerLane; + + // 宸烽亾3鍒嗛厤 + int lane3Truck1Items = itemsPerTruckPerLane; + int lane3Truck2Items = itemsInLane3 - itemsPerTruckPerLane; + + // 鎵撳嵃缁撴灉 + System.out.println("宸烽亾1锛�"); + System.out.println("璐ц溅1瑁呰浇鏁伴噺锛�" + lane1Truck1Items); + System.out.println("璐ц溅2瑁呰浇鏁伴噺锛�" + lane1Truck2Items); + System.out.println("宸烽亾2锛�"); + System.out.println("璐ц溅1瑁呰浇鏁伴噺锛�" + lane2Truck1Items); + System.out.println("璐ц溅2瑁呰浇鏁伴噺锛�" + lane2Truck2Items); + System.out.println("宸烽亾3锛�"); + System.out.println("璐ц溅1瑁呰浇鏁伴噺锛�" + lane3Truck1Items); + System.out.println("璐ц溅2瑁呰浇鏁伴噺锛�" + lane3Truck2Items); + } + + + public static List<StockOutParam> OutboundClassification(StockOutParam param){ + List<StockOutParam> stockOutParams = new ArrayList<>(); + + List<StockOutParam.LocDetl> locDetls = param.getLocDetls(); + List<String> brands = new ArrayList<>(); + for (StockOutParam.LocDetl locDetl:locDetls){ + if (!brands.contains(locDetl.getBrand())){ + brands.add(locDetl.getBrand()); + } + } + + for (String brand : brands){ + List<StockOutParam.LocDetl> locDetls1 = new ArrayList<>(); + List<StockOutParam.LocDetl> locDetls2 = new ArrayList<>(); + List<StockOutParam.LocDetl> locDetls3 = new ArrayList<>(); + List<StockOutParam.LocDetl> locDetls4 = new ArrayList<>(); + List<StockOutParam.LocDetl> locDetls5 = new ArrayList<>(); + List<StockOutParam.LocDetl> locDetls6 = new ArrayList<>(); + for (StockOutParam.LocDetl locDetl:locDetls){ + if (locDetl.getBrand().equals(brand)){ + switch (Utils.getRow(locDetl.getLocNo())){ + case 1: case 2: case 3: case 4: + locDetls1.add(locDetl); + break; + case 5: case 6: case 7: case 8: + locDetls2.add(locDetl); + break; + case 9: case 10: case 11: case 12: + locDetls3.add(locDetl); + break; + case 13: case 14: case 15: case 16: + locDetls4.add(locDetl); + break; + case 17: case 18: case 19: case 20: + locDetls5.add(locDetl); + break; + case 21: case 22: case 23: case 24: + locDetls6.add(locDetl); + break; + default: + } + } + } + ArrayList<List<StockOutParam.LocDetl>> lists = new ArrayList<>(); + lists.add(locDetls1); + lists.add(locDetls2); + lists.add(locDetls3); + lists.add(locDetls4); + lists.add(locDetls5); + lists.add(locDetls6); + + int sign = 0; + int staA=118; + int staB=119; + for (List<StockOutParam.LocDetl> locDetlList:lists){ + sign++; + if (locDetlList.size()==0){ + continue; + } + if (sign>lists.size()/2) { + //120銆�121 + staA=120; + staB=121; + } + List<StockOutParam.LocDetl> locDetlsA = new ArrayList<>(); + List<StockOutParam.LocDetl> locDetlsB = new ArrayList<>(); + List<String> locNos = new ArrayList<>(); + for (StockOutParam.LocDetl locDetl:locDetlList){ + if (locDetlsA.size()<locDetlList.size()/2){ + locDetlsA.add(locDetl); + if (!locNos.contains(locDetl.getLocNo())){ + locNos.add(locDetl.getLocNo()); + } + }else { + if (locNos.contains(locDetl.getLocNo())){ + locDetlsA.add(locDetl); + }else { + locDetlsB.add(locDetl); + } + } + } + if (locDetlsA.size()!=0){ + StockOutParam stockOutParamA = new StockOutParam(); + stockOutParamA.setOutSite(staA); + stockOutParamA.setOrderNo(param.getOrderNo()); + stockOutParamA.setLocDetls(locDetlsA); + stockOutParams.add(stockOutParamA); + } + if (locDetlsB.size()!=0){ + StockOutParam stockOutParamB = new StockOutParam(); + stockOutParamB.setOutSite(staB); + stockOutParamB.setOrderNo(param.getOrderNo()); + stockOutParamB.setLocDetls(locDetlsB); + stockOutParams.add(stockOutParamB); + } + } + } + + return stockOutParams; + } +} diff --git a/src/main/java/com/zy/common/model/LocDetlDto.java b/src/main/java/com/zy/common/model/LocDetlDto.java index 98bfd25..78a41c3 100644 --- a/src/main/java/com/zy/common/model/LocDetlDto.java +++ b/src/main/java/com/zy/common/model/LocDetlDto.java @@ -9,14 +9,17 @@ private LocDetl locDetl; + private String orderNo; + private Double count; public LocDetlDto() { } - public LocDetlDto(LocDetl locDetl, Double count) { + public LocDetlDto(LocDetl locDetl, Double count ,String orderNo) { this.locDetl = locDetl; this.count = count; + this.orderNo = orderNo; } public LocDetl getLocDetl() { @@ -34,4 +37,12 @@ public void setCount(Double count) { this.count = count; } + + public String getOrderNo() { + return orderNo; + } + + public void setOrderNo(String orderNo) { + this.orderNo = orderNo; + } } diff --git a/src/main/resources/mapper/WrkDetlMapper.xml b/src/main/resources/mapper/WrkDetlMapper.xml index 0888893..44c2bcd 100644 --- a/src/main/resources/mapper/WrkDetlMapper.xml +++ b/src/main/resources/mapper/WrkDetlMapper.xml @@ -113,19 +113,19 @@ </select> <select id="selectAndLogByOrderNoGroupByMatnrOfSum" resultMap="BaseResultMap"> - select awd.wrk_no, awd.io_time, awd.matnr,awd.zpallet,awd.specs,awd.maktx, sum(awd.anfme) as anfme + select awd.wrk_no, awd.io_time, awd.matnr,awd.zpallet,awd.specs,awd.maktx,awd.batch,awd.source, sum(awd.anfme) as anfme from asr_wrk_detl awd left join asr_wrk_mast awm on awd.wrk_no = awm.wrk_no and awd.io_time = awm.io_time where order_no = #{orderNo} - group by awd.wrk_no, awd.io_time, awd.matnr ,awd.zpallet,awd.specs,awd.maktx + group by awd.wrk_no, awd.io_time, awd.matnr ,awd.zpallet,awd.specs,awd.maktx,awd.batch,awd.source union - select distinct awdl.wrk_no, awdl.io_time, awdl.matnr,awdl.zpallet,awdl.specs,awdl.maktx, sum(awdl.anfme) as anfme + select distinct awdl.wrk_no, awdl.io_time, awdl.matnr,awdl.zpallet,awdl.specs,awdl.maktx,awdl.batch,awdl.source, sum(awdl.anfme) as anfme from asr_wrk_detl_log awdl left join asr_wrk_mast_log awml on awdl.wrk_no = awml.wrk_no and awdl.io_time = awml.io_time where awdl.order_no = #{orderNo} and (awml.manu_type is null or awml.manu_type != '鎵嬪姩鍙栨秷') and awml.io_type != 103 - group by awdl.wrk_no, awdl.io_time, awdl.matnr ,awdl.zpallet,awdl.specs,awdl.maktx + group by awdl.wrk_no, awdl.io_time, awdl.matnr ,awdl.zpallet,awdl.specs,awdl.maktx,awdl.batch,awdl.source </select> </mapper> diff --git a/src/main/webapp/static/js/adjDetl/adjDetl.js b/src/main/webapp/static/js/adjDetl/adjDetl.js index 1fe7723..79d96a7 100644 --- a/src/main/webapp/static/js/adjDetl/adjDetl.js +++ b/src/main/webapp/static/js/adjDetl/adjDetl.js @@ -24,7 +24,7 @@ {field: 'locNo', align: 'center',title: '搴撲綅鍙�'} ,{field: 'matnrOld', align: 'center',title: '鍘熷搧鍙�'} ,{field: 'matnr', align: 'center',title: '褰撳墠鍝佸彿'} - ,{field: 'batch', align: 'center',title: '鎵瑰彿'} + ,{field: 'batch', align: 'center',title: '绠卞彿'} // ,{field: 'oriCtns', align: 'center',title: '鍘熺鏁�'} ,{field: 'oriQty', align: 'center',title: '鍘熸暟閲�'} // ,{field: 'oriWt', align: 'center',title: '鍘熼噸閲�'} diff --git a/src/main/webapp/static/js/common.js b/src/main/webapp/static/js/common.js index f0e437b..941f71b 100644 --- a/src/main/webapp/static/js/common.js +++ b/src/main/webapp/static/js/common.js @@ -225,17 +225,17 @@ {field: 'matnr', align: 'center',title: '鍟嗗搧缂栧彿锛堝搧鍙凤級', sort:true} ,{field: 'maktx', align: 'center',title: '鍟嗗搧鍚嶇О锛堝搧鍚嶏級', sort:true} ,{field: 'orderNo', align: 'center',title: '鍗曟嵁缂栧彿', hide: false} - ,{field: 'batch', align: 'center',title: '璐у搧鐗瑰緛', sort:true} - ,{field: 'anfme', align: 'center',title: '鏁伴噺', hide: false, sort:true} + ,{field: 'batch', align: 'center',title: '绠卞彿', hide: false, sort:true} + ,{field: 'brand', align: 'center',title: '鏈ㄧ绫诲瀷', hide: false, sort:true} + ,{field: 'anfme', align: 'center',title: '鏈ㄧ涓摐绠旀暟閲�', hide: false, sort:true} ,{field: 'zpallet', align: 'center',title: '鎵樼洏鏉$爜', hide: false} ,{field: 'specs', align: 'center',title: '瑙勬牸', hide: false} - ,{field: 'model', align: 'center',title: '浠g爜', hide: true} + ,{field: 'model', align: 'center',title: '鎵规', hide: false} ,{field: 'color', align: 'center',title: '棰滆壊', hide: true} - ,{field: 'brand', align: 'center',title: '鍝佺墝', hide: true} ,{field: 'unit', align: 'center',title: '鍗曚綅', hide: false} ,{field: 'price', align: 'center',title: '鍗曚环', hide: true} - ,{field: 'sku', align: 'center',title: '鏈ㄧ缂栫爜', hide: false} + ,{field: 'sku', align: 'center',title: 'sku', hide: true} ,{field: 'units', align: 'center',title: '鍗曚綅閲�', hide: true} ,{field: 'barcode', align: 'center',title: '鏉$爜', hide: true} ,{field: 'origin', align: 'center',title: '鏈ㄧ浣嶇疆', hide: false} diff --git a/src/main/webapp/static/js/locDetl/locDetl.js b/src/main/webapp/static/js/locDetl/locDetl.js index 325b459..fd6f248 100644 --- a/src/main/webapp/static/js/locDetl/locDetl.js +++ b/src/main/webapp/static/js/locDetl/locDetl.js @@ -5,16 +5,16 @@ {field: 'matnr', align: 'center',title: '鍟嗗搧缂栧彿', sort:true} ,{field: 'maktx', align: 'center',title: '鍟嗗搧鍚嶇О', sort:true} ,{field: 'orderNo', align: 'center',title: '鍗曟嵁缂栧彿', hide: false} - ,{field: 'batch', align: 'center',title: '鎵瑰彿', width: 300, sort:true} - ,{field: 'anfme', align: 'center',title: '鏁伴噺'} + ,{field: 'batch', align: 'center',title: '绠卞彿', width: 300, sort:true} + ,{field: 'anfme', align: 'center',title: '鏈ㄧ涓摐绠旀暟閲�'} ,{field: 'zpallet', align: 'center',title: '鎵樼洏鏉$爜'} ,{field: 'specs', align: 'center',title: '瑙勬牸'} - ,{field: 'model', align: 'center',title: '浠g爜', hide: true} + ,{field: 'model', align: 'center',title: '鎵瑰彿', hide: true} ,{field: 'color', align: 'center',title: '棰滆壊', hide: true} ,{field: 'brand', align: 'center',title: '鍝佺墝', hide: true} ,{field: 'unit', align: 'center',title: '鍗曚綅', hide: true} ,{field: 'price', align: 'center',title: '鍗曚环', hide: true} - ,{field: 'sku', align: 'center',title: '鏈ㄧ缂栫爜', hide: false} + ,{field: 'sku', align: 'center',title: 'sku', hide: true} ,{field: 'units', align: 'center',title: '鍗曚綅閲�', hide: true} ,{field: 'barcode', align: 'center',title: '鏉$爜', hide: true} ,{field: 'origin', align: 'center',title: '鏈ㄧ浣嶇疆', hide: false} diff --git a/src/main/webapp/static/js/locDetlStatis/locDetlStatis.js b/src/main/webapp/static/js/locDetlStatis/locDetlStatis.js index fd1da33..433a8f1 100644 --- a/src/main/webapp/static/js/locDetlStatis/locDetlStatis.js +++ b/src/main/webapp/static/js/locDetlStatis/locDetlStatis.js @@ -1,7 +1,7 @@ var pageCurr; function getCol() { var cols = [ - {field: 'anfme', align: 'center',title: '搴撳瓨鏁伴噺', style: 'font-weight: bold'} + {field: 'anfme', align: 'center',title: '鏈ㄧ涓摐绠旀暟閲�', style: 'font-weight: bold'} ]; arrRemove(detlCols, "field", "anfme") arrRemove(detlCols, "field", "zpallet") diff --git a/src/main/webapp/static/js/manLocDetl/manLocDetl.js b/src/main/webapp/static/js/manLocDetl/manLocDetl.js index 42a89ee..5f9f992 100644 --- a/src/main/webapp/static/js/manLocDetl/manLocDetl.js +++ b/src/main/webapp/static/js/manLocDetl/manLocDetl.js @@ -5,7 +5,7 @@ {field: 'matnr', align: 'center',title: '鍟嗗搧缂栧彿', sort:true} ,{field: 'maktx', align: 'center',title: '鍟嗗搧鍚嶇О', sort:true} ,{field: 'orderNo', align: 'center',title: '鍗曟嵁缂栧彿', hide: false} - ,{field: 'batch', align: 'center',title: '鎵瑰彿', width: 300, sort:true} + ,{field: 'batch', align: 'center',title: '绠卞彿', width: 300, sort:true} ,{field: 'anfme', align: 'center',title: '鏁伴噺'} //,{field: 'zpallet', align: 'center',title: '鎵樼洏鏉$爜'} ,{field: 'specs', align: 'center',title: '閰嶇疆'} diff --git a/src/main/webapp/static/js/order/order.js b/src/main/webapp/static/js/order/order.js index ad09170..467301f 100644 --- a/src/main/webapp/static/js/order/order.js +++ b/src/main/webapp/static/js/order/order.js @@ -104,7 +104,7 @@ layer.open({ type: 1, title: false, - area: '820px', + area: '1020px', offset: [top + 'px', (left - 530 + $a.outerWidth()) + 'px'], shade: .01, shadeClose: true, @@ -124,10 +124,10 @@ {type: 'numbers'}, {field: 'matnr', title: '鍟嗗搧缂栫爜', width: 160}, {field: 'maktx', title: '鍟嗗搧鍚嶇О', width: 160}, - {field: 'batch', title: '鎵瑰彿'}, - {field: 'anfme', title: '鏁伴噺'}, - {field: 'workQty', title: '浣滀笟鏁伴噺'}, - {field: 'qty', title: '瀹屾垚鏁伴噺', style: 'font-weight: bold'}, + {field: 'batch', title: '绠卞彿'}, + {field: 'anfme', title: '鏈ㄧ涓摐绠旀暟閲�'}, + // {field: 'workQty', title: '浣滀笟鏁伴噺'}, + // {field: 'unit', title: '鍗曚綅'}, // { // field: 'createTime$', title: '鍒涘缓鏃堕棿', sort: true, templet: function (d) { @@ -136,7 +136,9 @@ // }, // {field: 'inQty', title: '宸插叆搴撻噺'}, // {field: 'color', title: '棰滆壊'}, - {field: 'specs', title: '瑙勬牸'} + {field: 'specs', title: '瑙勬牸'}, + {field: 'qty$', title: '鐘舵��', style: 'font-weight: bold'}, + {field: 'source$', title: '鏄惁纭', style: 'font-weight: bold'} ]], request: { pageName: 'curr', @@ -236,7 +238,7 @@ {type: 'numbers', title: '#'}, {field: 'matnr', title: '鍟嗗搧缂栫爜', width: 160}, {field: 'maktx', title: '鍟嗗搧鍚嶇О', width: 200}, - {field: 'batch', title: '鎵瑰彿', edit: true}, + {field: 'batch', title: '绠卞彿', edit: true}, {field: 'specs', title: '瑙勬牸'}, {field: 'anfme', title: '鏁伴噺(淇敼)', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110}, {field: 'workQty', title: '浣滀笟鏁伴噺', minWidth: 100, width: 100}, @@ -508,7 +510,7 @@ }, color: ['#10B4E8', '#E0E0E0', '#FF0000'], tooltip: {trigger: 'item'}, - series: [{name: '鏁伴噺', type: 'pie', radius: ['75%', '80%'], label: {normal: {show: false}}}] + series: [{name: '绠卞瓙鏁伴噺', type: 'pie', radius: ['75%', '80%'], label: {normal: {show: false}}}] }; traceCharts.setOption(traceOptions); // 璧嬪�� diff --git a/src/main/webapp/static/js/order/out.js b/src/main/webapp/static/js/order/out.js index be85831..2237010 100644 --- a/src/main/webapp/static/js/order/out.js +++ b/src/main/webapp/static/js/order/out.js @@ -34,7 +34,7 @@ ,{field: 'orderNo', align: 'center',title: '鍗曟嵁缂栧彿', templet: '#orderNoTpl', width: 160} ,{field: 'matnr', align: 'center',title: '鍟嗗搧缂栫爜', width: 160} ,{field: 'maktx', align: 'center',title: '鍟嗗搧鍚嶇О', width: 200} - ,{field: 'batch', align: 'center',title: '搴忓垪鐮�'} + ,{field: 'batch', align: 'center',title: '绠卞彿'} ,{field: 'specs', align: 'center',title: '瑙勬牸'} // ,{field: 'anfme', align: 'center',title: '鏁伴噺'} // ,{field: 'qty', align: 'center',title: '浣滀笟鏁伴噺', style: 'font-weight: bold'} @@ -159,7 +159,7 @@ // {type: 'checkbox', merge: ['orderNo']}, {field: 'orderNo', title: '鍗曟嵁缂栧彿', merge: true, align: 'center'}, {field: 'title', title: '鍟嗗搧', merge: true, align: 'center', width: 350}, - {field: 'batch', title: '搴忓垪鐮�', align: 'center'}, + {field: 'batch', title: '绠卞彿', align: 'center'}, {field: 'anfme', title: '鏁伴噺', align: 'center', width: 90, style: 'font-weight: bold'}, {field: 'locNo', title: '璐т綅', align: 'center', width: 100, templet: '#locNoTpl'}, {field: 'staNos', align: 'center', title: '鍑哄簱绔�', merge: ['locNo'], templet: '#tbBasicTbStaNos'}, diff --git a/src/main/webapp/static/js/orderDetl/orderDetl.js b/src/main/webapp/static/js/orderDetl/orderDetl.js index caef270..0c6077a 100644 --- a/src/main/webapp/static/js/orderDetl/orderDetl.js +++ b/src/main/webapp/static/js/orderDetl/orderDetl.js @@ -30,7 +30,7 @@ ,{field: 'name', align: 'center',title: '鍚嶇О'} ,{field: 'specs', align: 'center',title: '瑙勬牸'} ,{field: 'model', align: 'center',title: '鍨嬪彿'} - ,{field: 'batch', align: 'center',title: '鎵瑰彿'} + ,{field: 'batch', align: 'center',title: '绠卞彿'} ,{field: 'unit', align: 'center',title: '鍗曚綅'} ,{field: 'barcode', align: 'center',title: '鍟嗗搧鏉$爜'} ,{field: 'supplier', align: 'center',title: '渚涘簲鍟�'} diff --git a/src/main/webapp/static/js/pack/pack.js b/src/main/webapp/static/js/pack/pack.js index 7236aae..23c33f7 100644 --- a/src/main/webapp/static/js/pack/pack.js +++ b/src/main/webapp/static/js/pack/pack.js @@ -25,7 +25,7 @@ // ,{field: 'id', align: 'center',title: 'ID'} ,{field: 'barcode',title: '鏉$爜'} ,{field: 'matnr', align: 'center',title: '鍟嗗搧缂栧彿', minWidth: 250, width: 250} - ,{field: 'batch', align: 'center',title: '鎵瑰彿', hide: true} + ,{field: 'batch', align: 'center',title: '绠卞彿', hide: true} ,{field: 'settle$', align: 'center',title: '鐘舵��', templet: '#settleTpl', minWidth: 160, width: 160} // ,{field: 'status$', align: 'center',title: '鐘舵��'} // ,{field: 'createTime$', align: 'center',title: '娣诲姞鏃堕棿'} diff --git a/src/main/webapp/static/js/pakStore/pakStore.js b/src/main/webapp/static/js/pakStore/pakStore.js index 863b89f..166c63e 100644 --- a/src/main/webapp/static/js/pakStore/pakStore.js +++ b/src/main/webapp/static/js/pakStore/pakStore.js @@ -4,7 +4,7 @@ function getCol() { var cols = [ {fixed: 'left', field: 'anfme', title: '鏁伴噺锛堝繀濉級', align: 'center', edit:'text', width: 120, style:'color: blue;font-weight: bold'}, - {field: 'batch', title: '鎵瑰彿锛堥�夊~锛�', align: 'center', edit:'text', width: 200, style:'color: block;font-weight: bold'} + {field: 'batch', title: '绠卞彿锛堥�夊~锛�', align: 'center', edit:'text', width: 200, style:'color: block;font-weight: bold'} ]; cols.push.apply(cols, matCols); cols.push({fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width: 80}) diff --git a/src/main/webapp/static/js/pakStore/stockAdjust.js b/src/main/webapp/static/js/pakStore/stockAdjust.js index 042a8b5..41c6a04 100644 --- a/src/main/webapp/static/js/pakStore/stockAdjust.js +++ b/src/main/webapp/static/js/pakStore/stockAdjust.js @@ -5,9 +5,9 @@ var matCodeLayerIdx; function getCol() { var cols = [ - {fixed: 'left', field: 'count', title: '瀹為檯鏁伴噺', align: 'center', edit:'text', width: 120, style:'color: blue;font-weight: bold'} - ,{field: 'anfme', align: 'center',title: '鏁伴噺'} - ,{field: 'batch', align: 'center',title: '鎵瑰彿锛堢紪杈戯級', edit: true, style: 'font-weight:bold'} + // {fixed: 'left', field: 'count', title: '瀹為檯鏁伴噺', align: 'center', edit:'text', width: 120, style:'color: blue;font-weight: bold'}, + {field: 'anfme', align: 'center',title: '鏁伴噺'} + ,{field: 'batch', align: 'center',title: '绠卞彿锛堢紪杈戯級', edit: true, style: 'font-weight:bold'} ]; arrRemove(detlCols, "field", "anfme"); arrRemove(detlCols, "field", "batch"); @@ -44,18 +44,18 @@ let index = obj.tr.attr("data-index"); let data = matCodeData[index]; let modify = true; - if (obj.field === 'count'){ - let vle = Number(obj.value); - if (isNaN(vle)) { - layer.msg("璇疯緭鍏ユ暟瀛�", {icon: 2}); - modify = false; - } else { - if (vle <= 0) { - layer.msg("鏁伴噺蹇呴』澶т簬闆�", {icon: 2}); - modify = false; - } - } - } + // if (obj.field === 'count'){ + // let vle = Number(obj.value); + // if (isNaN(vle)) { + // layer.msg("璇疯緭鍏ユ暟瀛�", {icon: 2}); + // modify = false; + // } else { + // if (vle <= 0) { + // layer.msg("鏁伴噺蹇呴』澶т簬闆�", {icon: 2}); + // modify = false; + // } + // } + // } if (modify) { data[obj.field] = obj.value; } diff --git a/src/main/webapp/static/js/pakStore/stockOut.js b/src/main/webapp/static/js/pakStore/stockOut.js index d9b2580..a514dc8 100644 --- a/src/main/webapp/static/js/pakStore/stockOut.js +++ b/src/main/webapp/static/js/pakStore/stockOut.js @@ -2,8 +2,8 @@ var locDetlData = []; function getCol() { var cols = [ - {field: 'count', align: 'center',title: '鍑哄簱鏁伴噺', edit:'text', width: 130, style:'color: blue;font-weight: bold'} - ,{field: 'anfme', align: 'center',title: '搴撳瓨鏁伴噺'} + // {field: 'count', align: 'center',title: '鍑哄簱鏁伴噺', edit:'text', width: 130, style:'color: blue;font-weight: bold'}, + {field: 'anfme', align: 'center',title: '鏈ㄧ涓摐绠旀暟閲�'} ,{field: 'locNo$', align: 'center',title: '搴撲綅鍙�'} ]; arrRemove(detlCols, 'field', 'anfme'); @@ -41,22 +41,22 @@ let index = obj.tr.attr("data-index"); let data = locDetlData[index]; let modify = true; - if (obj.field === 'count'){ - let vle = Number(obj.value); - if (isNaN(vle)) { - layer.msg("璇疯緭鍏ユ暟瀛�", {icon: 2}); - modify = false; - } else { - if (vle <= 0) { - layer.msg("鏁伴噺蹇呴』澶т簬闆�", {icon: 2}); - modify = false; - } - if (vle > Number(data.anfme)) { - layer.msg("鍑哄簱鏁伴噺涓嶅緱澶т簬搴撳瓨鏁伴噺", {icon: 2}); - modify = false; - } - } - } + // if (obj.field === 'count'){ + // let vle = Number(obj.value); + // if (isNaN(vle)) { + // layer.msg("璇疯緭鍏ユ暟瀛�", {icon: 2}); + // modify = false; + // } else { + // if (vle <= 0) { + // layer.msg("鏁伴噺蹇呴』澶т簬闆�", {icon: 2}); + // modify = false; + // } + // if (vle > Number(data.anfme)) { + // layer.msg("鍑哄簱鏁伴噺涓嶅緱澶т簬搴撳瓨鏁伴噺", {icon: 2}); + // modify = false; + // } + // } + // } if (modify) { data[obj.field] = obj.value; } diff --git a/src/main/webapp/static/js/pakStore/stockOutOrder.js b/src/main/webapp/static/js/pakStore/stockOutOrder.js index 527abe5..12a7b99 100644 --- a/src/main/webapp/static/js/pakStore/stockOutOrder.js +++ b/src/main/webapp/static/js/pakStore/stockOutOrder.js @@ -2,8 +2,8 @@ var locDetlData = []; function getCol() { var cols = [ - {field: 'count', align: 'center',title: '鍑哄簱鏁伴噺', edit:'text', width: 130, style:'color: blue;font-weight: bold'}, - {field: 'anfme', align: 'center',title: '搴撳瓨鏁伴噺'} + // {field: 'count', align: 'center',title: '鍑哄簱鏁伴噺', edit:'text', width: 130, style:'color: blue;font-weight: bold'}, + {field: 'anfme', align: 'center',title: '鏈ㄧ涓摐绠旀暟閲�'} ,{field: 'locNo$', align: 'center',title: '搴撲綅鍙�'} ]; arrRemove(detlCols, 'field', 'anfme'); @@ -41,22 +41,22 @@ let index = obj.tr.attr("data-index"); let data = locDetlData[index]; let modify = true; - if (obj.field === 'count'){ - let vle = Number(obj.value); - if (isNaN(vle)) { - layer.msg("璇疯緭鍏ユ暟瀛�", {icon: 2}); - modify = false; - } else { - if (vle <= 0) { - layer.msg("鏁伴噺蹇呴』澶т簬闆�", {icon: 2}); - modify = false; - } - if (vle > Number(data.anfme)) { - layer.msg("鍑哄簱鏁伴噺涓嶅緱澶т簬搴撳瓨鏁伴噺", {icon: 2}); - modify = false; - } - } - } + // if (obj.field === 'count'){ + // let vle = Number(obj.value); + // if (isNaN(vle)) { + // layer.msg("璇疯緭鍏ユ暟瀛�", {icon: 2}); + // modify = false; + // } else { + // if (vle <= 0) { + // layer.msg("鏁伴噺蹇呴』澶т簬闆�", {icon: 2}); + // modify = false; + // } + // if (vle > Number(data.anfme)) { + // layer.msg("鍑哄簱鏁伴噺涓嶅緱澶т簬搴撳瓨鏁伴噺", {icon: 2}); + // modify = false; + // } + // } + // } if (modify) { data[obj.field] = obj.value; } @@ -83,6 +83,8 @@ for (var i=0;i<locDetlData.length;i++){ locDetlData[i]["orderNo"]=orderNo } + console.log(locDetlData) + console.log(locDetlData[0]) let param = { orderNo: orderNo, locDetls: locDetlData diff --git a/src/main/webapp/static/js/saas/locDetl.js b/src/main/webapp/static/js/saas/locDetl.js index 08e9364..238083b 100644 --- a/src/main/webapp/static/js/saas/locDetl.js +++ b/src/main/webapp/static/js/saas/locDetl.js @@ -5,7 +5,7 @@ {field: 'matnr', align: 'center',title: '鍟嗗搧缂栧彿', sort:true} ,{field: 'maktx', align: 'center',title: '鍟嗗搧鍚嶇О', sort:true} ,{field: 'orderNo', align: 'center',title: '鍗曟嵁缂栧彿', hide: false} - ,{field: 'batch', align: 'center',title: '鎵瑰彿', width: 300, sort:true , hide: true} + ,{field: 'batch', align: 'center',title: '绠卞彿', width: 300, sort:true , hide: true} ,{field: 'anfme', align: 'center',title: '鏁伴噺'} ,{field: 'zpallet', align: 'center',title: '鎵樼洏鏉$爜', hide: true} ,{field: 'specs', align: 'center',title: '閰嶇疆' , hide: true} diff --git a/src/main/webapp/static/js/saas/stockAdjust.js b/src/main/webapp/static/js/saas/stockAdjust.js index cb68ae0..94f0ee1 100644 --- a/src/main/webapp/static/js/saas/stockAdjust.js +++ b/src/main/webapp/static/js/saas/stockAdjust.js @@ -5,9 +5,9 @@ var matCodeLayerIdx; function getCol() { var cols = [ - {fixed: 'left', field: 'count', title: '瀹為檯鏁伴噺', align: 'center', edit:'text', width: 120, style:'color: blue;font-weight: bold'} - ,{field: 'anfme', align: 'center',title: '鏁伴噺'} - ,{field: 'batch', align: 'center',title: '鎵瑰彿锛堢紪杈戯級', edit: true, style: 'font-weight:bold'} + // {fixed: 'left', field: 'count', title: '瀹為檯鏁伴噺', align: 'center', edit:'text', width: 120, style:'color: blue;font-weight: bold'}, + {field: 'anfme', align: 'center',title: '鏁伴噺'} + ,{field: 'batch', align: 'center',title: '绠卞彿锛堢紪杈戯級', edit: true, style: 'font-weight:bold'} ]; arrRemove(detlCols, "field", "anfme"); arrRemove(detlCols, "field", "batch"); @@ -44,18 +44,18 @@ let index = obj.tr.attr("data-index"); let data = matCodeData[index]; let modify = true; - if (obj.field === 'count'){ - let vle = Number(obj.value); - if (isNaN(vle)) { - layer.msg("璇疯緭鍏ユ暟瀛�", {icon: 2}); - modify = false; - } else { - if (vle <= 0) { - layer.msg("鏁伴噺蹇呴』澶т簬闆�", {icon: 2}); - modify = false; - } - } - } + // if (obj.field === 'count'){ + // let vle = Number(obj.value); + // if (isNaN(vle)) { + // layer.msg("璇疯緭鍏ユ暟瀛�", {icon: 2}); + // modify = false; + // } else { + // if (vle <= 0) { + // layer.msg("鏁伴噺蹇呴』澶т簬闆�", {icon: 2}); + // modify = false; + // } + // } + // } if (modify) { data[obj.field] = obj.value; } diff --git a/src/main/webapp/views/order/order.html b/src/main/webapp/views/order/order.html index 3e88192..b5903d5 100644 --- a/src/main/webapp/views/order/order.html +++ b/src/main/webapp/views/order/order.html @@ -79,8 +79,8 @@ <button class="layui-btn icon-btn" lay-filter="tbSearch" lay-submit> <i class="layui-icon"></i>鎼滅储 </button> - <button id="orderAddBtn" class="layui-btn icon-btn btn-add"><i class="layui-icon"></i>娣诲姞 - </button> +<!-- <button id="orderAddBtn" class="layui-btn icon-btn btn-add"><i class="layui-icon"></i>娣诲姞--> +<!-- </button>--> </div> </div> </div> @@ -97,7 +97,7 @@ <!-- 琛ㄦ牸鎿嶄綔鍒� --> <script type="text/html" id="operate"> {{# if (d.settle == 0 || d.settle == 1) { }} - <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">淇敼</a> +<!-- <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">淇敼</a>--> <a class="layui-btn layui-btn-danger layui-btn-xs btn-delete" lay-event="del">鍒犻櫎</a> {{# } }} {{# if (d.settle == 2) { }} @@ -256,31 +256,24 @@ </div> <table class="layui-table" lay-skin="nob" style="width: 80%"> - <tbody> - {{# layui.each(item.wrkDetls, function(idx, wrkDetl){ }} + <thead> <tr style="background: none"> <td>No.</td> + <td>鍟嗗搧缂栧彿</td> + <!-- <td>瑙勬牸</td>--> + <td>绠卞彿</td> +<!-- <td>绠卞瓙绫诲瀷</td>--> + <td>鏄惁纭</td> + </tr> + </thead> + <tbody> + {{# layui.each(item.wrkDetls, function(idx, wrkDetl){ }} + <tr> <td><span class="layui-badge layui-bg-cyan">{{ idx+1 }}</span></td> - </tr> - <tr style="background: none"> - <td>鍝佸彿锛�</td> <td>{{ wrkDetl.matnr }}</td> - </tr> - <tr style="background: none"> - <td>鍝佸悕锛�</td> - <td>{{ wrkDetl.maktx }}</td> - </tr> - <tr style="background: none"> - <td>瑙勬牸锛�</td> - <td>{{ wrkDetl.specs }}</td> - </tr> - <tr style="background: none"> - <td>鏁伴噺锛�</td> - <td style="font-weight: bold">{{ wrkDetl.anfme }}</td> - </tr> - <tr style="background: none"> - <td>鏉$爜锛�</td> - <td style="font-weight: bold">{{ wrkDetl.zpallet }}</td> + <!-- <td>{{ wrkDetl.specs }}</td>--> + <td style="font-weight: bold">{{ wrkDetl.batch }}</td> + <td style="font-weight: bold">{{ wrkDetl.source$ }}</td> </tr> {{# }); }} </tbody> -- Gitblit v1.9.1