From 1b201ef1ff8a098b6c2fa31d89e7c53650012af9 Mon Sep 17 00:00:00 2001 From: zhang <zc857179121@qq.com> Date: 星期一, 04 八月 2025 17:31:45 +0800 Subject: [PATCH] 1 --- src/main/java/com/zy/asrs/task/handler/OrderMoveHistoryHandler.java | 2 src/main/java/com/zy/asrs/controller/ReviewController.java | 38 +++ src/main/java/com/zy/asrs/entity/ReviewDetl.java | 49 ++++ src/main/java/com/zy/asrs/task/OrderSyncScheduler.java | 36 +++ src/main/webapp/views/review/review.html | 119 ++++++----- src/main/java/com/zy/asrs/controller/MobileController.java | 2 src/main/webapp/static/js/review/review.js | 304 +++++++++++++++++------------ 7 files changed, 368 insertions(+), 182 deletions(-) diff --git a/src/main/java/com/zy/asrs/controller/MobileController.java b/src/main/java/com/zy/asrs/controller/MobileController.java index c33a054..7c6f77d 100644 --- a/src/main/java/com/zy/asrs/controller/MobileController.java +++ b/src/main/java/com/zy/asrs/controller/MobileController.java @@ -652,7 +652,7 @@ @GetMapping("/getReviewList/{orderNo}") public synchronized R getReviewList(@PathVariable("orderNo") String orderNo) { - List<Review> reviewList = reviewService.selectList(new EntityWrapper<Review>().like("order_no", orderNo)); + List<Review> reviewList = reviewService.selectList(new EntityWrapper<Review>().like("order_no", orderNo).in("settle", 1, 2)); List<String> collect = reviewList.stream().map(Review::getOrderNo).collect(Collectors.toList()); return R.ok(collect); diff --git a/src/main/java/com/zy/asrs/controller/ReviewController.java b/src/main/java/com/zy/asrs/controller/ReviewController.java index f2af395..c5cff58 100644 --- a/src/main/java/com/zy/asrs/controller/ReviewController.java +++ b/src/main/java/com/zy/asrs/controller/ReviewController.java @@ -1,6 +1,7 @@ package com.zy.asrs.controller; import com.alibaba.excel.EasyExcel; +import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.baomidou.mybatisplus.plugins.Page; import com.core.annotations.ManagerAuth; @@ -29,9 +30,10 @@ import org.springframework.web.multipart.MultipartFile; import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; import java.io.IOException; -import java.util.Date; -import java.util.Map; +import java.net.URLEncoder; +import java.util.*; @RestController public class ReviewController extends BaseController { @@ -48,6 +50,34 @@ @Resource private ReviewDetlMapper reviewDetlMapper; + + @Resource + private HttpServletResponse response; + + + @RequestMapping("/exportReview") + public synchronized void exportReview(String ids) throws IOException { + if (Cools.isEmpty(ids)) { + return; + } + String[] idsArr = ids.split(","); + Set set = new HashSet<Long>(); + for (String id : idsArr) { + if (!Cools.isEmpty(id)) { + set.add(Long.parseLong(id)); + } + } + List<ReviewDetl> reviewDetls = reviewDetlService.selectList(new EntityWrapper<ReviewDetl>().in("order_id", set)); + + response.setContentType("application/vnd.ms-excel"); + response.setCharacterEncoding("utf-8"); + String fileName = URLEncoder.encode("鍗曟嵁澶嶆牳鏄庣粏琛�", "UTF-8"); + response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); + EasyExcel.write(response.getOutputStream(), ReviewDetl.class) + .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) + .sheet("琛�1") + .doWrite(reviewDetls); + } @PostMapping("/importReview") @ManagerAuth(memo = "鍗曟嵁瀵煎叆") @@ -66,7 +96,7 @@ public void importOrder(MultipartFile multipartFile) throws IOException { // 鑰冩牳鏁版嵁鐨勫垽閲嶄娇鐢╫rder_id,check_type鐨勭粍鍚堝敮涓�绱㈠紩瑙e喅 EasyExcel.read(multipartFile.getInputStream(), ImportReviewDto.class, - new ImportReviewListener(transactionManager,reviewService, reviewDetlService, snowflakeIdWorker, getUserId())).sheet().doReadSync(); + new ImportReviewListener(transactionManager, reviewService, reviewDetlService, snowflakeIdWorker, getUserId())).sheet().doReadSync(); } @@ -122,7 +152,7 @@ @RequestMapping(value = "/review/delete/auth") @ManagerAuth(memo = "鎵嬪姩鍒犻櫎璁㈠崟") @Transactional - public R delete(@RequestParam Long orderId){ + public R delete(@RequestParam Long orderId) { Review review = reviewService.selectById(orderId); reviewDetlService.delete(new EntityWrapper<ReviewDetl>().eq("order_id", orderId)); reviewService.deleteById(orderId); diff --git a/src/main/java/com/zy/asrs/entity/ReviewDetl.java b/src/main/java/com/zy/asrs/entity/ReviewDetl.java index 5d3aab7..d036dda 100644 --- a/src/main/java/com/zy/asrs/entity/ReviewDetl.java +++ b/src/main/java/com/zy/asrs/entity/ReviewDetl.java @@ -1,5 +1,7 @@ package com.zy.asrs.entity; +import com.alibaba.excel.annotation.ExcelIgnore; +import com.alibaba.excel.annotation.ExcelProperty; import com.baomidou.mybatisplus.annotations.TableField; import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableName; @@ -30,12 +32,14 @@ */ @ApiModelProperty(value = "ID") @TableId(value = "id", type = IdType.AUTO) + @ExcelIgnore private Long id; /** * 璁㈠崟鍐呯爜 */ @ApiModelProperty(value = "璁㈠崟鍐呯爜") + @ExcelIgnore @TableField("order_id") private Long orderId; @@ -44,6 +48,7 @@ */ @ApiModelProperty(value = "鍗曟嵁缂栧彿") @TableField("order_no") + @ExcelProperty("鍗曟嵁缂栧彿") private String orderNo; @@ -51,6 +56,7 @@ * 鏁伴噺 */ @ApiModelProperty(value = "鏁伴噺") + @ExcelProperty("鍑�閲�") private Double anfme; /** @@ -61,6 +67,7 @@ */ @ApiModelProperty(value = "浣滀笟鏁伴噺") @TableField("work_qty") + @ExcelIgnore private Double workQty; /** @@ -70,96 +77,112 @@ * 鍑哄簱 : qty 馃憜 */ @ApiModelProperty(value = "瀹屾垚鏁伴噺") + @ExcelIgnore private Double qty; /** * 鍟嗗搧缂栫爜 */ @ApiModelProperty(value = "鍟嗗搧缂栫爜") + @ExcelProperty("鐗╂枡缂栫爜") private String matnr; /** * 鍟嗗搧鍚嶇О */ @ApiModelProperty(value = "鍟嗗搧鍚嶇О") + @ExcelProperty("鐗╂枡鍚嶇О") private String maktx; /** * 鎵瑰彿 */ @ApiModelProperty(value = "鎵瑰彿") + @ExcelProperty("鎵规鍙�") private String batch; /** * 瑙勬牸 */ @ApiModelProperty(value = "瑙勬牸") + @ExcelProperty("瑙勬牸鍨嬪彿") private String specs; /** * 鍨嬪彿 */ @ApiModelProperty(value = "鍨嬪彿") + @ExcelProperty("鍗峰彿") private String model; /** * 棰滆壊 */ @ApiModelProperty(value = "棰滆壊") + @ExcelIgnore private String color; /** * 鍝佺墝 */ @ApiModelProperty(value = "鍝佺墝") + @ExcelIgnore private String brand; /** * 鍗曚綅 */ @ApiModelProperty(value = "鍗曚綅") + @ExcelIgnore private String unit; /** * 鍗曚环 */ @ApiModelProperty(value = "鍗曚环") + @ExcelIgnore private Double price; /** * sku */ @ApiModelProperty(value = "sku") + @ExcelIgnore private String sku; /** * 鍗曚綅閲� */ @ApiModelProperty(value = "鍗曚綅閲�") + @ExcelIgnore private Double units; /** * 鏉$爜 */ @ApiModelProperty(value = "鏉$爜") + @ExcelIgnore private String barcode; /** * 浜у湴 */ @ApiModelProperty(value = "浜у湴") + @ExcelIgnore private String origin; /** * 鍘傚 銆併�佹睙閾滐細鏆傚瓨搴撲綅鍙� */ @ApiModelProperty(value = "鍘傚") + @ExcelIgnore private String manu; /** * 鐢熶骇鏃ユ湡 */ @ApiModelProperty(value = "鐢熶骇鏃ユ湡") + @ExcelIgnore @TableField("manu_date") private String manuDate; @@ -167,6 +190,7 @@ * 鍝侀」鏁� */ @ApiModelProperty(value = "鍝侀」鏁�") + @ExcelIgnore @TableField("item_num") private String itemNum; @@ -174,6 +198,7 @@ * 瀹夊叏搴撳瓨閲� */ @ApiModelProperty(value = "瀹夊叏搴撳瓨閲�") + @ExcelIgnore @TableField("safe_qty") private Double safeQty; @@ -181,18 +206,21 @@ * 閲嶉噺 */ @ApiModelProperty(value = "閲嶉噺") + @ExcelIgnore private Double weight; /** * 闀垮害 */ @ApiModelProperty(value = "闀垮害") + @ExcelIgnore private Double length; /** * 浣撶Н */ @ApiModelProperty(value = "浣撶Н") + @ExcelIgnore private Double volume; /** @@ -200,18 +228,21 @@ */ @ApiModelProperty(value = "涓夋柟缂栫爜") @TableField("three_code") + @ExcelProperty("澶嶆牳浜�") private String threeCode; /** * 渚涘簲鍟� */ @ApiModelProperty(value = "渚涘簲鍟�") + @ExcelIgnore private String supp; /** * 渚涘簲鍟嗙紪鐮� */ @ApiModelProperty(value = "渚涘簲鍟嗙紪鐮�") + @ExcelIgnore @TableField("supp_code") private String suppCode; @@ -220,6 +251,7 @@ */ @ApiModelProperty(value = "鏄惁鎵规 1: 鏄� 0: 鍚� ") @TableField("be_batch") + @ExcelIgnore private Integer beBatch; /** @@ -227,12 +259,14 @@ */ @ApiModelProperty(value = "淇濊川鏈�") @TableField("dead_time") + @ExcelProperty("鍑哄簱鏃ユ湡") private String deadTime; /** * 棰勮澶╂暟 */ @ApiModelProperty(value = "棰勮澶╂暟") + @ExcelIgnore @TableField("dead_warn") private Integer deadWarn; @@ -240,30 +274,39 @@ * 鍒惰喘 1: 鍒堕�� 2: 閲囪喘 3: 澶栧崗 銆併�佹睙閾滐細鏄惁纭 1: 纭 2: 鏈‘璁� */ @ApiModelProperty(value = "鍒惰喘 1: 鍒堕�� 2: 閲囪喘 3: 澶栧崗 ") + @ExcelIgnore private Integer source; /** * 瑕佹眰妫�楠� 1: 鏄� 0: 鍚� */ @ApiModelProperty(value = "瑕佹眰妫�楠� 1: 鏄� 0: 鍚� ") + @ExcelIgnore private Integer inspect; + + @ExcelProperty("鏄惁澶嶆牳") + @TableField(exist = false) + private String inspect$; /** * 鍗遍櫓鍝� 1: 鏄� 0: 鍚� */ @ApiModelProperty(value = "鍗遍櫓鍝� 1: 鏄� 0: 鍚� ") + @ExcelIgnore private Integer danger; /** * 鐘舵�� 1: 姝e父 0: 绂佺敤 */ @ApiModelProperty(value = "鐘舵�� 1: 姝e父 0: 绂佺敤 ") + @ExcelIgnore private Integer status; /** * 娣诲姞浜哄憳 */ @ApiModelProperty(value = "娣诲姞浜哄憳") + @ExcelIgnore @TableField("create_by") private Long createBy; @@ -271,6 +314,7 @@ * 娣诲姞鏃堕棿 */ @ApiModelProperty(value = "娣诲姞鏃堕棿") + @ExcelIgnore @TableField("create_time") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date createTime; @@ -279,6 +323,7 @@ * 淇敼浜哄憳 */ @ApiModelProperty(value = "淇敼浜哄憳") + @ExcelIgnore @TableField("update_by") private Long updateBy; @@ -288,15 +333,18 @@ @ApiModelProperty(value = "淇敼鏃堕棿") @TableField("update_time") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ExcelProperty("澶嶆牳鏃堕棿") private Date updateTime; /** * 澶囨敞 */ @ApiModelProperty(value = "澶囨敞") + @ExcelProperty("澶嶆牳澶囨敞") private String memo; @ApiModelProperty(value = "閫�搴撴爣璁�") + @ExcelIgnore @TableField("tk_type") private Integer tkType; @@ -304,6 +352,7 @@ * 鍗蜂俊鎭疘D */ @ApiModelProperty(value = "鍗蜂俊鎭疘D") + @ExcelIgnore @TableField("roll_up") private Long rollUp; diff --git a/src/main/java/com/zy/asrs/task/OrderSyncScheduler.java b/src/main/java/com/zy/asrs/task/OrderSyncScheduler.java index a461c16..10d0ebb 100644 --- a/src/main/java/com/zy/asrs/task/OrderSyncScheduler.java +++ b/src/main/java/com/zy/asrs/task/OrderSyncScheduler.java @@ -1,8 +1,14 @@ package com.zy.asrs.task; +import com.baomidou.mybatisplus.mapper.EntityWrapper; +import com.core.common.Cools; import com.zy.asrs.entity.Order; +import com.zy.asrs.entity.Review; +import com.zy.asrs.entity.ReviewDetl; import com.zy.asrs.service.ApiLogService; import com.zy.asrs.service.OrderService; +import com.zy.asrs.service.ReviewDetlService; +import com.zy.asrs.service.ReviewService; import com.zy.asrs.task.core.ReturnT; import com.zy.asrs.task.handler.OrderSyncHandler; import com.zy.system.entity.Config; @@ -28,12 +34,16 @@ @Autowired private OrderService orderService; @Autowired + private ReviewService reviewService; + @Autowired + private ReviewDetlService reviewDetlService; + @Autowired private ApiLogService apiLogService; @Resource private ConfigMapper configMapper; @Scheduled(cron = "0 0 1 * * ? ") - public void clearApiLog(){ + public void clearApiLog() { try { apiLogService.clearWeekBefore(); } catch (Exception e) { @@ -64,4 +74,28 @@ } + + @Scheduled(cron = "0/30 * * * * ? ") + public void complete() { + List<Review> orders = reviewService.selectList(new EntityWrapper<Review>().eq("settle", 2)); + for (Review order : orders) { + try { + boolean flag = true; + List<ReviewDetl> reviewDetls = reviewDetlService.selectList(new EntityWrapper<ReviewDetl>().eq("order_no", order.getOrderNo())); + for (ReviewDetl reviewDetl : reviewDetls) { + if (Cools.isEmpty(reviewDetl.getInspect()) || reviewDetl.getInspect() == 0) { + flag = false; + break; + } + } + if (flag) { + order.setSettle(4L); + reviewService.updateById(order); + } + log.info("鍗曟嵁[orderNo={}]澶勭悊瀹屾垚", order.getOrderNo()); + } catch (Exception e) { + log.error("鍗曟嵁[orderNo={}]澶勭悊澶辫触锛屽紓甯镐俊鎭細" + e, order.getOrderNo()); + } + } + } } diff --git a/src/main/java/com/zy/asrs/task/handler/OrderMoveHistoryHandler.java b/src/main/java/com/zy/asrs/task/handler/OrderMoveHistoryHandler.java index 4baef0c..b18c58f 100644 --- a/src/main/java/com/zy/asrs/task/handler/OrderMoveHistoryHandler.java +++ b/src/main/java/com/zy/asrs/task/handler/OrderMoveHistoryHandler.java @@ -46,7 +46,7 @@ public ReturnT<String> start2() { List<Review> settleEqual6 = reviewService.selectList(new EntityWrapper<Review>() - .in("settle", 4,6)); + .eq("settle", 6)); for (Review order : settleEqual6) { List<ReviewDetl> orderDetls = reviewDetlService.selectList(new EntityWrapper<ReviewDetl>() .eq("order_no", order.getOrderNo())); diff --git a/src/main/webapp/static/js/review/review.js b/src/main/webapp/static/js/review/review.js index 34e90b9..cd2d075 100644 --- a/src/main/webapp/static/js/review/review.js +++ b/src/main/webapp/static/js/review/review.js @@ -4,7 +4,7 @@ base: baseUrl + "/static/layui/lay/modules/" }).extend({ notice: 'notice/notice', -}).use(['layer', 'form', 'table','upload','element', 'util', 'admin', 'xmSelect', 'laydate', 'tableMerge', 'notice'], function () { +}).use(['layer', 'form', 'table', 'upload', 'element', 'util', 'admin', 'xmSelect', 'laydate', 'tableMerge', 'notice'], function () { var $ = layui.jquery; var layer = layui.layer; var form = layui.form; @@ -20,21 +20,21 @@ var element = layui.element; - // 娓叉煋琛ㄦ牸 var insTb = table.render({ elem: '#order', - url: baseUrl+'/review/head/page/auth', + url: baseUrl + '/review/head/page/auth', headers: {token: localStorage.getItem('token')}, page: true, cellMinWidth: 100, + toolbar: '#toolbar', cols: [[ - {type: 'numbers'}, + {type: 'checkbox', fixed: 'left'}, {field: 'orderNo', title: '鍗曟嵁缂栧彿'}, - {field: 'cstmrName', align: 'center',title: '瀹㈡埛鍚嶇О'}, + {field: 'cstmrName', align: 'center', title: '瀹㈡埛鍚嶇О'}, {align: 'center', title: '鏄庣粏', toolbar: '#tbLook', minWidth: 250, width: 250}, {field: 'createTime$', title: '鍒涘缓鏃堕棿', minWidth: 200, width: 200}, - {field: 'settle$', align: 'center', title: '鐘舵��', templet: '#settleTpl', minWidth: 160, width: 160}, + {field: 'settle$', align: 'center', title: '鐘舵��', templet: '#settleTpl', minWidth: 160, width: 160}, //{field: 'memo', align: 'center',title: '澶囨敞'}, {align: 'center', title: '鎿嶄綔', toolbar: '#operate', width: 240} ]], @@ -56,11 +56,31 @@ done: function (res, curr, count) { limit(); if (res.code === 403) { - top.location.href = baseUrl+"/"; + top.location.href = baseUrl + "/"; } insTbCount = count; } }); + + + // + table.on('toolbar(order)', function (obj) { + console.info("121211") + var checkStatus = table.checkStatus(obj.config.id); + console.info(obj) + console.info(checkStatus) + layer.confirm('纭畾瀵煎嚭Excel鍚�', {shadeClose: true}, function () { + var ids = ''; + for (const o in checkStatus.data) { + console.info(o) + //ids.push(checkStatus.data[o].id) + ids =ids + checkStatus.data[o].id + "," + } + location.href = baseUrl + "/exportReview?ids=" + ids; + layer.closeAll(); + }); + }); + // 鎼滅储 form.on('submit(tbSearch)', function (data) { @@ -70,37 +90,37 @@ //澶氭枃浠跺垪琛� var uploadListIns = upload.render({ elem: '#data-btn-file2' - ,elemList: $('#data-btn-file3') //鍒楄〃鍏冪礌瀵硅薄 - ,url: baseUrl+'/review/insert/labelUp/file/auth' - ,accept: 'file' - ,multiple: true - ,number: 10 - ,auto: false - ,bindAction: '#testListAction' - ,choose: function(obj){ + , elemList: $('#data-btn-file3') //鍒楄〃鍏冪礌瀵硅薄 + , url: baseUrl + '/review/insert/labelUp/file/auth' + , accept: 'file' + , multiple: true + , number: 10 + , auto: false + , bindAction: '#testListAction' + , choose: function (obj) { // 璧嬪�� - this.data.orderId=$('.layui-layer-title').text() + this.data.orderId = $('.layui-layer-title').text() var that = this; var files = this.files = obj.pushFile(); //灏嗘瘡娆¢�夋嫨鐨勬枃浠惰拷鍔犲埌鏂囦欢闃熷垪 //璇诲彇鏈湴鏂囦欢 - obj.preview(function(index, file, result){ - var tr = $(['<tr id="upload-'+ index +'">' - ,'<td>'+ file.name +'</td>' - ,'<td>'+ (file.size/1014).toFixed(1) +'kb</td>' - ,'<td><div class="layui-progress" lay-filter="progress-demo-'+ index +'"><div class="layui-progress-bar" lay-percent=""></div></div></td>' - ,'<td>' - ,'<button class="layui-btn layui-btn-xs demo-reload layui-hide">閲嶄紶</button>' + obj.preview(function (index, file, result) { + var tr = $(['<tr id="upload-' + index + '">' + , '<td>' + file.name + '</td>' + , '<td>' + (file.size / 1014).toFixed(1) + 'kb</td>' + , '<td><div class="layui-progress" lay-filter="progress-demo-' + index + '"><div class="layui-progress-bar" lay-percent=""></div></div></td>' + , '<td>' + , '<button class="layui-btn layui-btn-xs demo-reload layui-hide">閲嶄紶</button>' // ,'<button class="layui-btn layui-btn-xs layui-btn-danger demo-delete">鍒犻櫎</button>' - ,'</td>' - ,'</tr>'].join('')); + , '</td>' + , '</tr>'].join('')); //鍗曚釜閲嶄紶 - tr.find('.demo-reload').on('click', function(){ + tr.find('.demo-reload').on('click', function () { obj.upload(index, file); }); //鍒犻櫎 - tr.find('.demo-delete').on('click', function(){ + tr.find('.demo-delete').on('click', function () { delete files[index]; //鍒犻櫎瀵瑰簲鐨勬枃浠� tr.remove(); uploadListIns.config.elem.next()[0].value = ''; //娓呯┖ input file 鍊硷紝浠ュ厤鍒犻櫎鍚庡嚭鐜板悓鍚嶆枃浠朵笉鍙�� @@ -110,28 +130,28 @@ element.render('progress'); //娓叉煋鏂板姞鐨勮繘搴︽潯缁勪欢 }); } - ,done: function(res, index, upload){ //鎴愬姛鐨勫洖璋� + , done: function (res, index, upload) { //鎴愬姛鐨勫洖璋� var that = this; //if(res.code == 0){ //涓婁紶鎴愬姛 - var tr = that.elemList.find('tr#upload-'+ index) - ,tds = tr.children(); + var tr = that.elemList.find('tr#upload-' + index) + , tds = tr.children(); tds.eq(3).html(''); //娓呯┖鎿嶄綔 delete this.files[index]; //鍒犻櫎鏂囦欢闃熷垪宸茬粡涓婁紶鎴愬姛鐨勬枃浠� return; //} this.error(index, upload); } - ,allDone: function(obj){ //澶氭枃浠朵笂浼犲畬姣曞悗鐨勭姸鎬佸洖璋� + , allDone: function (obj) { //澶氭枃浠朵笂浼犲畬姣曞悗鐨勭姸鎬佸洖璋� console.log(obj) } - ,error: function(index, upload){ //閿欒鍥炶皟 + , error: function (index, upload) { //閿欒鍥炶皟 var that = this; - var tr = that.elemList.find('tr#upload-'+ index) - ,tds = tr.children(); + var tr = that.elemList.find('tr#upload-' + index) + , tds = tr.children(); tds.eq(3).find('.demo-reload').removeClass('layui-hide'); //鏄剧ず閲嶄紶 } - ,progress: function(n, elem, e, index){ //娉ㄦ剰锛歩ndex 鍙傛暟涓� layui 2.6.6 鏂板 - element.progress('progress-demo-'+ index, n + '%'); //鎵ц杩涘害鏉°�俷 鍗充负杩斿洖鐨勮繘搴︾櫨鍒嗘瘮 + , progress: function (n, elem, e, index) { //娉ㄦ剰锛歩ndex 鍙傛暟涓� layui 2.6.6 鏂板 + element.progress('progress-demo-' + index, n + '%'); //鎵ц杩涘害鏉°�俷 鍗充负杩斿洖鐨勮繘搴︾櫨鍒嗘瘮 } }); @@ -157,24 +177,24 @@ layer.open({ area: '1020px', type: 1, - title: '涓婁紶鏂囦欢-'+data.id, + title: '涓婁紶鏂囦欢-' + data.id, content: $('#myModal') }); // 鑾峰彇璺緞涓嬬殑鏂囦欢鍒楄〃锛屼娇鐢� jQuery 鐨� ajax 鏂规硶 $.ajax({ - url: baseUrl+'/review/view/labelUp/file/auth', - data:{ - orderId:data.id + url: baseUrl + '/review/view/labelUp/file/auth', + data: { + orderId: data.id }, - success: function(response) { - if (response.code==200){ + success: function (response) { + if (response.code == 200) { var targetTable = document.getElementById("data-btn-file3"); targetTable.innerHTML = ''; // 灏嗚幏鍙栧埌鐨勬枃浠跺垪琛ㄦ坊鍔犲埌鏂囦欢闃熷垪涓繘琛屾樉绀� - response.data.forEach(function(file,index) { + response.data.forEach(function (file, index) { // 鍒涘缓tr鍏冪礌 var tr = document.createElement("tr"); - tr.id = "upload-"+index; + tr.id = "upload-" + index; tr.innerHTML = '<td>' + file.name + '</td>' + '<td>' + (file.size / 1024).toFixed(1) + 'kb</td>' + '<td><div class="layui-progress" lay-filter="progress-demo-' + index + '"><div class="layui-progress-bar" lay-percent=""></div></div></td>' @@ -186,11 +206,11 @@ // 灏唗r鍏冪礌娣诲姞鍒扮洰鏍噒able涓� targetTable.appendChild(tr); }); - }else { + } else { console.log('Failed to get file list error.'); } }, - error: function() { + error: function () { console.log('Failed to get file list.'); } }); @@ -217,14 +237,13 @@ table.render({ elem: '#lookSSXMTable', headers: {token: localStorage.getItem('token')}, - url: baseUrl+'/reviewDetl/list/auth', + url: baseUrl + '/reviewDetl/list/auth', where: { order_id: data.id }, page: true, cellMinWidth: 100, cols: [[ - {type: 'numbers'}, {field: 'matnr', title: '鐗╄川缂栫爜'}, {field: 'maktx', title: '浜у搧鍚嶇О'}, {field: 'specs', title: '瑙勬牸鍨嬪彿'}, @@ -285,18 +304,18 @@ } let nList = admin.util.deepClone(xxDataList); for (let xi = 0; xi < nList.length; xi++) { - if (nList[xi].anfme <= 0){ + if (nList[xi].anfme <= 0) { layer.msg('鏄庣粏淇敼鏁伴噺涓嶅悎娉�', {icon: 2}); return false; } - if (nList[xi].anfme < nList[xi].workQty){ + if (nList[xi].anfme < nList[xi].workQty) { layer.msg('鏁伴噺涓嶈兘灏忎簬宸蹭綔涓氭暟閲�', {icon: 2}); return false; } } layer.load(2); $.ajax({ - url: baseUrl+"/review/form/" + (isExpAdd?"add":"modify") + "/auth", + url: baseUrl + "/review/form/" + (isExpAdd ? "add" : "modify") + "/auth", headers: {'token': localStorage.getItem('token')}, data: JSON.stringify({ orderId: Number(data.field.id), @@ -304,17 +323,17 @@ orderNo: data.field.orderNo, orderDetlList: nList }), - contentType:'application/json;charset=UTF-8', + contentType: 'application/json;charset=UTF-8', method: 'POST', success: function (res) { layer.closeAll('loading'); - if (res.code === 200){ + if (res.code === 200) { layer.close(dIndex); $(".layui-laypage-btn")[0].click(); layer.msg(res.msg, {icon: 1}); - } else if (res.code === 403){ - top.location.href = baseUrl+"/"; - }else { + } else if (res.code === 403) { + top.location.href = baseUrl + "/"; + } else { layer.msg(res.msg, {icon: 2}); } } @@ -336,11 +355,25 @@ {field: 'maktx', title: '鍟嗗搧鍚嶇О', width: 200}, {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}, + { + field: 'anfme', + title: '鏁伴噺(淇敼)', + style: 'color: blue;font-weight: bold', + edit: true, + minWidth: 110, + width: 110 + }, + {field: 'workQty', title: '浣滀笟鏁伴噺', minWidth: 100, width: 100}, // {field: 'unit', title: '鍗曚綅', width: 80}, - {field: 'memo', title: '澶囨敞' , edit: true}, - {align: 'center', title: '鎿嶄綔', toolbar: '#formSSXMTableBar', minWidth: 80, width: 80, fixed: 'right'} + {field: 'memo', title: '澶囨敞', edit: true}, + { + align: 'center', + title: '鎿嶄綔', + toolbar: '#formSSXMTableBar', + minWidth: 80, + width: 80, + fixed: 'right' + } ]], done: function (res) { $(layero).find('.layui-table-view').css('margin', '0'); @@ -349,17 +382,17 @@ }; if (!isExpAdd) { $.ajax({ - url: baseUrl+"/review/detl/all/auth?orderId=" + expTpe.id, + url: baseUrl + "/review/detl/all/auth?orderId=" + expTpe.id, headers: {'token': localStorage.getItem('token')}, method: 'GET', async: false, success: function (res) { - if (res.code === 200){ + if (res.code === 200) { xxDataList = res.data; tbOptions.data = xxDataList; - } else if (res.code === 403){ - top.location.href = baseUrl+"/"; - }else { + } else if (res.code === 403) { + top.location.href = baseUrl + "/"; + } else { layer.msg(res.msg, {icon: 2}) } } @@ -373,7 +406,7 @@ if (layEvent === 'edit') { showEditModel2(data); } else if (layEvent === 'del') { - if(data.workQty > 0){ + if (data.workQty > 0) { layer.msg("宸插瓨鍦ㄤ綔涓氭暟閲忥紝涓嶈兘鍒犻櫎", {icon: 2}); return; } @@ -396,7 +429,7 @@ table.on('edit(formSSXMTable)', function (obj) { let index = obj.tr.attr("data-index"); let data = xxDataList[index]; - if (obj.field === 'anfme'){ + if (obj.field === 'anfme') { let vle = Number(obj.value); if (isNaN(vle)) { layer.msg("璇疯緭鍏ユ暟瀛�", {icon: 2}); @@ -408,7 +441,7 @@ // insTbSSXM.reload({data: xxDataList}); return false; } - if(obj.value < data.workQty){ + if (obj.value < data.workQty) { layer.msg("杈撳叆鏁伴噺涓嶈兘灏忎簬浣滀笟涓暟閲�", {icon: 2}); // data[obj.field] = 0; // insTbSSXM.reload({data: xxDataList}); @@ -438,21 +471,21 @@ // 琛ㄥ崟鎻愪氦浜嬩欢 form.on('submit(matEditSubmit)', function (data) { let selectList = matXmSelect.getValue(); - for (let i = 0; i<selectList.length; i++) { + for (let i = 0; i < selectList.length; i++) { let item = selectList[i]; // 鏌ヨ鐗╂枡璇︽儏 $.ajax({ - url: baseUrl+"/mat/covert/"+item.value+"/auth", + url: baseUrl + "/mat/covert/" + item.value + "/auth", headers: {'token': localStorage.getItem('token')}, method: 'GET', async: false, success: function (res) { - if (res.code === 200){ + if (res.code === 200) { xxDataList.push(res.data); insTbSSXM.reload({data: xxDataList, page: {curr: 1}}); - } else if (res.code === 403){ - top.location.href = baseUrl+"/"; - }else { + } else if (res.code === 403) { + top.location.href = baseUrl + "/"; + } else { layer.msg(res.msg, {icon: 2}) } } @@ -468,19 +501,19 @@ width: '340px', }, autoRow: true, - toolbar: { show: true }, + toolbar: {show: true}, filterable: true, remoteSearch: true, - remoteMethod: function(val, cb, show){ + remoteMethod: function (val, cb, show) { $.ajax({ - url: baseUrl+"/mat/all/get/kv", + url: baseUrl + "/mat/all/get/kv", headers: {'token': localStorage.getItem('token')}, data: { condition: val }, method: 'POST', success: function (res) { - if (res.code === 200){ + if (res.code === 200) { cb(res.data) } else { cb([]); @@ -510,7 +543,7 @@ layer.close(i); layer.load(2); $.ajax({ - url: baseUrl+"/review/delete/auth", + url: baseUrl + "/review/delete/auth", headers: {'token': localStorage.getItem('token')}, data: { orderId: orderId @@ -518,16 +551,16 @@ method: 'POST', success: function (res) { layer.closeAll('loading'); - if (res.code === 200){ + if (res.code === 200) { if (insTbCount === 0) { insTb.reload({page: {curr: 1}}); } else { $(".layui-laypage-btn")[0].click(); } layer.msg(res.msg, {icon: 1}); - } else if (res.code === 403){ - top.location.href = baseUrl+"/"; - }else { + } else if (res.code === 403) { + top.location.href = baseUrl + "/"; + } else { layer.msg(res.msg, {icon: 2}); } } @@ -546,7 +579,7 @@ console.log(orderId); console.log(settle); $.ajax({ - url: baseUrl+"/review/update/auth", + url: baseUrl + "/review/update/auth", headers: {'token': localStorage.getItem('token')}, data: { id: orderId, @@ -556,16 +589,16 @@ method: 'POST', success: function (res) { layer.closeAll('loading'); - if (res.code === 200){ + if (res.code === 200) { if (insTbCount === 0) { insTb.reload({page: {curr: 1}}); } else { $(".layui-laypage-btn")[0].click(); } layer.msg(res.msg, {icon: 1}); - } else if (res.code === 403){ - top.location.href = baseUrl+"/"; - }else { + } else if (res.code === 403) { + top.location.href = baseUrl + "/"; + } else { layer.msg(res.msg, {icon: 2}); } } @@ -577,7 +610,7 @@ function showWrkTrace(orderId) { let loadIndex = layer.msg('璇锋眰涓�...', {icon: 16, shade: 0.01, time: false}); $.ajax({ - url: baseUrl+"/review/wrk/trace/auth", + url: baseUrl + "/review/wrk/trace/auth", headers: {'token': localStorage.getItem('token')}, data: { orderId: orderId @@ -585,7 +618,7 @@ method: 'POST', success: function (res) { layer.close(loadIndex); - if (res.code === 200){ + if (res.code === 200) { laytpl(wrkTraceDialog.innerHTML).render(res.data, function (html) { admin.open({ type: 1, @@ -606,19 +639,27 @@ }, 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); // 璧嬪�� traceCharts.setOption({ title: { - subtext: res.data.totalQty+"/"+res.data.wrkQty+"/"+res.data.endQty + subtext: res.data.totalQty + "/" + res.data.wrkQty + "/" + res.data.endQty }, series: [ { data: [ {name: '宸蹭綔涓�', value: res.data.wrkQty}, - {name: '鏈綔涓�', value: res.data.totalQty-res.data.wrkQty-res.data.lackQty}, + { + name: '鏈綔涓�', + value: res.data.totalQty - res.data.wrkQty - res.data.lackQty + }, {name: '搴撳瓨涓嶈冻', value: res.data.lackQty}, ] } @@ -627,9 +668,9 @@ } }); }); - } else if (res.code === 403){ - top.location.href = baseUrl+"/"; - }else { + } else if (res.code === 403) { + top.location.href = baseUrl + "/"; + } else { layer.msg(res.msg, {icon: 2}); } } @@ -638,8 +679,8 @@ layDate.render({ elem: '.layui-laydate-range' - ,type: 'datetime' - ,range: true + , type: 'datetime' + , range: true }); function pakoutPreview(ids) { @@ -653,20 +694,20 @@ success: function (res) { layer.close(loadIndex); var tableCache; - if (res.code === 200){ + if (res.code === 200) { layer.open({ type: 1 - ,title: false - ,closeBtn: false - ,offset: '50px' - ,area: ['1500px', '700px'] - ,shade: 0.5 - ,shadeClose: false - ,btn: ['鐢熸垚閫�搴撳崟', '绋嶅悗澶勭悊'] - ,btnAlign: 'c' - ,moveType: 1 //鎷栨嫿妯″紡锛�0鎴栬��1 - ,content: $('#pakoutPreviewBox').html() - ,success: function(layero, index){ + , title: false + , closeBtn: false + , offset: '50px' + , area: ['1500px', '700px'] + , shade: 0.5 + , shadeClose: false + , btn: ['鐢熸垚閫�搴撳崟', '绋嶅悗澶勭悊'] + , btnAlign: 'c' + , moveType: 1 //鎷栨嫿妯″紡锛�0鎴栬��1 + , content: $('#pakoutPreviewBox').html() + , success: function (layero, index) { stoPreTabIdx = table.render({ elem: '#stoPreTab', data: res.data, @@ -687,8 +728,20 @@ // {field: 'brand', title: '鏈ㄧ绫诲瀷', align: 'center'}, {field: 'brand$', title: '鏈ㄧ绫诲瀷', align: 'center'}, {field: 'zpallet', title: '鎵樼洏鐮�', align: 'center'}, - {field: 'anfme', title: '鏁伴噺', align: 'center', width: 90, style: 'font-weight: bold'}, - {field: 'count', title: '鏁伴噺', align: 'center', width: 90, style: 'font-weight: bold'}, + { + field: 'anfme', + title: '鏁伴噺', + align: 'center', + width: 90, + style: 'font-weight: bold' + }, + { + field: 'count', + title: '鏁伴噺', + align: 'center', + width: 90, + style: 'font-weight: bold' + }, {field: 'locNo', title: '璐т綅', align: 'center', width: 100, templet: '#locNoTpl'}, {field: 'tkType$', title: 'TK鏍囪', align: 'center', width: 100}, // {field: 'staNos', align: 'center', title: '鍑哄簱绔�', merge: ['locNo'], templet: '#tbBasicTbStaNos'}, @@ -702,9 +755,9 @@ }); // 淇敼鍑哄簱绔� form.on('select(tbBasicTbStaNos)', function (obj) { - let index = obj.othis.parents('tr').attr("data-index"); + let index = obj.othis.parents('tr').attr("data-index"); let data = tableCache[index]; - for (let i = 0; i<tableCache.length; i++) { + for (let i = 0; i < tableCache.length; i++) { if (tableCache[i].locNo === data.locNo) { tableCache[i]['staNo'] = Number(obj.elem.value); } @@ -721,18 +774,18 @@ } modifySta(stoPreTabData); }); + // 鎵归噺淇敼鍑哄簱绔� - 绔欑偣閫夋嫨 function modifySta(stoPreTabData) { // 鍑哄簱绔欏彇浜ら泦 let staBatchSelectVal = []; - for(let i = 0; i<stoPreTabData.length; i++) { + for (let i = 0; i < stoPreTabData.length; i++) { let staNos = stoPreTabData[i].staNos; if (staNos !== null) { if (staBatchSelectVal.length === 0) { staBatchSelectVal = staNos; } else { - staBatchSelectVal = staBatchSelectVal.filter(val => - { + staBatchSelectVal = staBatchSelectVal.filter(val => { return new Set(staNos).has(val) } ) @@ -758,8 +811,8 @@ let loadIdx = layer.load(2); let batchSta = Number(obj.field.batchSta); let arr = []; - for (let j = 0; j<stoPreTabData.length; j++) { - for (let i = 0; i<tableCache.length; i++) { + for (let j = 0; j < stoPreTabData.length; j++) { + for (let i = 0; i < tableCache.length; i++) { if (tableCache[i].orderNo === stoPreTabData[j].orderNo && tableCache[i].matnr === stoPreTabData[j].matnr && tableCache[i].locNo === stoPreTabData[j].locNo) { @@ -776,7 +829,8 @@ arr.forEach(item => { $('div[lay-id=stoPreTab] tr[data-index="' + item + '"] .layui-select-title').find("input").css("color", "blue"); }); - layer.close(loadIdx); layer.close(ddIndex); + layer.close(loadIdx); + layer.close(ddIndex); return false; }); // 寮圭獥涓嶅嚭鐜版粴鍔ㄦ潯 @@ -787,20 +841,20 @@ } } - ,yes: function(index, layero){ + , yes: function (index, layero) { //鎸夐挳銆愰��搴撱�戠殑鍥炶皟 pakout(tableCache2, index); tableCache2 = [] } - ,btn2: function(index, layero){ + , btn2: function (index, layero) { //鎸夐挳銆愮◢鍚庡鐞嗐�戠殑鍥炶皟 layer.close(index) tableCache2 = [] //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴 } }); - } else if (res.code === 403){ - top.location.href = baseUrl+"/"; + } else if (res.code === 403) { + top.location.href = baseUrl + "/"; } else { layer.msg(res.msg, {icon: 2}) } @@ -808,7 +862,7 @@ }) // 澶嶉�夋浜嬩欢 - table.on('checkbox(stoPreTab)', function(obj){ + table.on('checkbox(stoPreTab)', function (obj) { tableCache2.push(obj.data) }); } diff --git a/src/main/webapp/views/review/review.html b/src/main/webapp/views/review/review.html index 51dadcc..db4ad66 100644 --- a/src/main/webapp/views/review/review.html +++ b/src/main/webapp/views/review/review.html @@ -26,15 +26,19 @@ .layui-timeline:first-child .layui-timeline-item { margin-top: 30px; } + .btn-add { display: none; } + .btn-edit { display: none; } + .btn-complete { display: none; } + .btn-delete { display: none; } @@ -61,7 +65,8 @@ </div> <div class="layui-inline" style="width: 300px"> <div class="layui-input-inline"> - <input class="layui-input layui-laydate-range" name="create_time" type="text" placeholder="璧峰鏃堕棿 - 缁堟鏃堕棿" autocomplete="off" style="width: 300px"> + <input class="layui-input layui-laydate-range" name="create_time" type="text" + placeholder="璧峰鏃堕棿 - 缁堟鏃堕棿" autocomplete="off" style="width: 300px"> </div> </div> <div class="layui-inline"> @@ -85,10 +90,9 @@ <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>--> - <input type="file" id="fileInput" accept=".xlsx, .xls"> - <button onclick="exportExc()">瀵煎叆璁㈠崟</button> + <input class="layui-btn icon-btn" type="file" id="fileInput" accept=".xlsx, .xls"> + <button class="layui-btn icon-btn" onclick="exportExc()">瀵煎叆璁㈠崟</button> + </div> </div> </div> @@ -97,12 +101,17 @@ </div> <div class="layui-card"> <div class="layui-card-body"> -<!-- 鍏ュ簱閫氱煡鍗曪細鐢盓RP鎻愪緵鍗曟嵁缂栧彿銆佺被鍨嬨�佸崟鎹椂闂村強鐗╂枡鏄庣粏锛岀敓鎴愬叆搴撲綔涓氬崟锛屼负缁存姢绯荤粺楂樺彲鐢紝鐢ㄦ埛鍙嚜琛屾坊鍔犲叆搴撻�氱煡鍗曟暟鎹紝瀹屾垚鐙珛鐨勫叆搴撲綔涓氥��--> -<!-- <span class="text-danger">鎵嬪姩娣诲姞鏃讹紝璇锋鏌ュ崟鎹紪鍙锋槸鍚﹀湪ERP绯荤粺涓凡瀛樺湪锛岄伩鍏嶅彂鐢熸暟鎹敊璇棶棰樸��</span>--> + <!-- 鍏ュ簱閫氱煡鍗曪細鐢盓RP鎻愪緵鍗曟嵁缂栧彿銆佺被鍨嬨�佸崟鎹椂闂村強鐗╂枡鏄庣粏锛岀敓鎴愬叆搴撲綔涓氬崟锛屼负缁存姢绯荤粺楂樺彲鐢紝鐢ㄦ埛鍙嚜琛屾坊鍔犲叆搴撻�氱煡鍗曟暟鎹紝瀹屾垚鐙珛鐨勫叆搴撲綔涓氥��--> + <!-- <span class="text-danger">鎵嬪姩娣诲姞鏃讹紝璇锋鏌ュ崟鎹紪鍙锋槸鍚﹀湪ERP绯荤粺涓凡瀛樺湪锛岄伩鍏嶅彂鐢熸暟鎹敊璇棶棰樸��</span>--> <span class="text-danger">鍑哄簱鏃讹紝璇锋鏌ュ崟鎹紪鍙锋槸鍚﹀湪绯荤粺涓凡瀛樺湪锛岄伩鍏嶅彂鐢熸暟鎹敊璇棶棰樸��</span> </div> </div> </div> +<script type="text/html" id="toolbar"> + <div class="layui-btn-container"> + <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData">瀵煎嚭</button> + </div> +</script> <script> function exportExc() { var fileInput = document.getElementById('fileInput'); @@ -114,7 +123,7 @@ var formData = new FormData(); formData.append('file', file); - fetch(baseUrl+'/importReview', { + fetch(baseUrl + '/importReview', { method: 'POST', headers: {'token': localStorage.getItem('token')}, body: formData @@ -128,10 +137,11 @@ }); } </script> -<div id="myModal" style="display: none"> +<div id="myModal" style="display: none"> <div style="padding: 10px"> <div class="layui-upload"> - <button type="button" class="layui-btn layui-btn-normal" id="data-btn-file2">閫夋嫨鏂囦欢</button><input id="data-btn-upload" class="layui-upload-file" type="file" accept="" name="file" multiple=""> + <button type="button" class="layui-btn layui-btn-normal" id="data-btn-file2">閫夋嫨鏂囦欢</button> + <input id="data-btn-upload" class="layui-upload-file" type="file" accept="" name="file" multiple=""> <div class="layui-upload-list" style="max-width: 1000px;height:400px;overflow: scroll"> <table class="layui-table"> <colgroup> @@ -141,11 +151,13 @@ <col width="150"> </colgroup> <thead> - <tr><th>鏂囦欢鍚�</th> + <tr> + <th>鏂囦欢鍚�</th> <th>澶у皬</th> <th>涓婁紶杩涘害</th> <th>鎿嶄綔</th> - </tr></thead> + </tr> + </thead> <tbody id="data-btn-file3"></tbody> </table> </div> @@ -156,10 +168,10 @@ <!-- 琛ㄦ牸鎿嶄綔鍒� --> <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-danger layui-btn-xs btn-edit" lay-event="del">鍒犻櫎</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-edit" lay-event="del">鍒犻櫎</a> <a class="layui-btn layui-btn-primary layui-border-blue layui-btn-xs btn-edit" lay-event="complete">瀹岀粨</a> -<!-- <a class="layui-btn layui-btn-primary layui-border-blue layui-btn-xs btn-complete" lay-event="labelUp">涓婁紶鏍囩</a>--> + <!-- <a class="layui-btn layui-btn-primary layui-border-blue layui-btn-xs btn-complete" lay-event="labelUp">涓婁紶鏍囩</a>--> {{# } }} {{# if (d.settle == 2) { }} <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">鍒犻櫎</a> @@ -167,7 +179,7 @@ <a class="layui-btn layui-btn-primary layui-border-blue layui-btn-xs btn-edit" lay-event="complete">瀹岀粨</a> {{# } }} {{# if (d.settle == 4 && d.tkType=='1') { }} -<!-- <a class="layui-btn layui-btn-danger layui-btn-xs btn-delete" lay-event="refundLoc">閫�搴�</a>--> + <!-- <a class="layui-btn layui-btn-danger layui-btn-xs btn-delete" lay-event="refundLoc">閫�搴�</a>--> {{# } }} </script> <!-- 琛ㄦ牸鎿嶄綔鍒� --> @@ -183,7 +195,8 @@ {{# if(d.settle > 1 && d.settle !== 3){ }} {{# } }} - <i class="layui-icon layui-icon-about wrk-trace" lay-tips="鏌ョ湅浠诲姟杩芥函" lay-direction="2" lay-offset="-10px,0px" lay-event="wrkTrace"></i> + <i class="layui-icon layui-icon-about wrk-trace" lay-tips="鏌ョ湅浠诲姟杩芥函" lay-direction="2" lay-offset="-10px,0px" + lay-event="wrkTrace"></i> </script> <!--<script type="text/html" id="settleTpl">--> @@ -191,17 +204,17 @@ <!--</script>--> <script type="text/html" id="settleTpl"> <span name="settle" - {{# if( d.settle === 1){ }} + {{# if( d.settle=== 1){ }} class="layui-badge layui-badge-red" - {{# }else if(d.settle === 2){ }} + {{# }else if(d.settle=== 2){ }} class="layui-badge layui-badge-green" - {{# }else if(d.settle === 3){ }} + {{# }else if(d.settle=== 3){ }} class="layui-badge layui-badge-gray" - {{# }else if(d.settle === 4){ }} + {{# }else if(d.settle=== 4){ }} class="layui-badge layui-badge-blue" - {{# }else if(d.settle === 5){ }} + {{# }else if(d.settle=== 5){ }} class="layui-badge layui-badge-gray" - {{# }else if(d.settle === 6){ }} + {{# }else if(d.settle=== 6){ }} class="layui-badge layui-badge-gray" {{# } }} >{{d.settle$}}</span> @@ -214,10 +227,14 @@ <label class="layui-form-label">鍗曟嵁绫诲瀷锛�</label> <div class="layui-input-block cool-auto-complete"> <input class="layui-input" name="docType" placeholder="璇疯緭鍏ュ崟鎹被鍨�" style="display: none"> - <input id="docType$" name="docType$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="璇疯緭鍏ュ崟鎹被鍨�" onfocus=this.blur() lay-verType="tips" lay-verify="required"> + <input id="docType$" name="docType$" class="layui-input cool-auto-complete-div" + onclick="autoShow(this.id)" type="text" placeholder="璇疯緭鍏ュ崟鎹被鍨�" onfocus=this.blur() + lay-verType="tips" lay-verify="required"> <div class="cool-auto-complete-window"> - <input class="cool-auto-complete-window-input" data-key="docTypeQueryBydocType" onkeyup="autoLoad(this.getAttribute('data-key'))"> - <select class="cool-auto-complete-window-select" data-key="docTypeQueryBydocTypeSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> + <input class="cool-auto-complete-window-input" data-key="docTypeQueryBydocType" + onkeyup="autoLoad(this.getAttribute('data-key'))"> + <select class="cool-auto-complete-window-select" data-key="docTypeQueryBydocTypeSelect" + onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> </select> </div> </div> @@ -225,8 +242,9 @@ <div class="layui-form-item"> <label class="layui-form-label">鍗曟嵁缂栧彿锛�</label> <div class="layui-input-block"> - <input id="orderNo" name="orderNo" placeholder="杈撳叆鍗曟嵁缂栧彿" type="text" class="layui-input" maxlength="20" lay-verType="tips" /> -<!-- lay-verify="required"--> + <input id="orderNo" name="orderNo" placeholder="杈撳叆鍗曟嵁缂栧彿" type="text" class="layui-input" + maxlength="20" lay-verType="tips"/> + <!-- lay-verify="required"--> </div> </div> <div class="layui-form-item" style="position: relative;"> @@ -271,20 +289,22 @@ <script id="wrkTraceDialog" type="text/html" style="position: relative"> <div style="position: absolute; top: 0; left: 0;"> <div class="layui-card" style="overflow: hidden;"> - <div class="layui-card-header" style="text-align: center;width: 80%;font-weight: inherit;font-size: 18px">{{ d.orderNo }}</div> + <div class="layui-card-header" style="text-align: center;width: 80%;font-weight: inherit;font-size: 18px">{{ + d.orderNo }} + </div> <div class="layui-card-body"> <div id="wrkTraceCharts" style="height: 300px;width: 400px;transform: translateX(-10%);"></div> </div> </div> </div> - <div class="layui-row" > + <div class="layui-row"> <div class="layui-col-md5"> <h1 style="opacity: 0;">Hello World</h1> </div> - <div class="layui-col-md7" style=""> - {{# if(d.list.length > 0){ }} + <div class="layui-col-md7" style=""> + {{# if(d.list.length > 0){ }} <ul class="layui-timeline" style="height: 400px; overflow: scroll;"> - {{# layui.each(d.list, function(index, item){ }} + {{# layui.each(d.list, function(index, item){ }} <li class="layui-timeline-item"> <i class="layui-icon layui-timeline-axis"></i> <div class="layui-timeline-content layui-text"> @@ -292,30 +312,30 @@ <h3 class="inline-block"> {{ item.wrkNo }} - {{# if(item.wrkMast.ioType < 100){ }} + {{# if(item.wrkMast.ioType < 100){ }} <span class="layui-badge layui-bg-blue" style="line-height: 20px;"> {{ item.wrkMast.ioType$ }} </span> - {{# } }} + {{# } }} - {{# if(item.wrkMast.ioType > 100){ }} + {{# if(item.wrkMast.ioType > 100){ }} <span class="layui-badge layui-bg-orange" style="line-height: 20px;"> {{ item.wrkMast.ioType$ }} </span> - {{# } }} + {{# } }} - {{# if(item.wrkMast.wrkSts < 14){ }} + {{# if(item.wrkMast.wrkSts < 14){ }} <span class="layui-badge layui-bg-red" style="line-height: 20px;"> {{ item.wrkMast.wrkSts$ }} </span> - {{# } }} + {{# } }} - {{# if(item.wrkMast.wrkSts >= 14){ }} + {{# if(item.wrkMast.wrkSts >= 14){ }} <span class="layui-badge layui-bg-green" style="line-height: 20px;"> {{ item.wrkMast.wrkSts$ }} </span> - {{# } }} + {{# } }} </h3>  {{ item.wrkMast.ioTime$ }} @@ -328,12 +348,12 @@ <td>瑙勬牸</td> <!-- <td>瑙勬牸</td>--> <td>绠卞彿</td> -<!-- <td>绠卞瓙绫诲瀷</td>--> + <!-- <td>绠卞瓙绫诲瀷</td>--> <td>鏄惁纭</td> </tr> </thead> <tbody> - {{# layui.each(item.wrkDetls, function(idx, wrkDetl){ }} + {{# layui.each(item.wrkDetls, function(idx, wrkDetl){ }} <tr> <td><span class="layui-badge layui-bg-cyan">{{ idx+1 }}</span></td> <td>{{ wrkDetl.matnr }}</td> @@ -341,20 +361,20 @@ <td style="font-weight: bold">{{ wrkDetl.batch }}</td> <td style="font-weight: bold">{{ wrkDetl.source$ }}</td> </tr> - {{# }); }} + {{# }); }} </tbody> </table> <hr class="layui-border-cyan" style="width: 90%; opacity: .6;"> </div> </li> - {{# }); }} + {{# }); }} </ul> - {{# } else { }} + {{# } else { }} <div style="height: 350px;display: flex;justify-content: center;align-items: center;"> <h2 style="font-weight: bold;letter-spacing: 2px">鏆傛棤浠诲姟</h2> </div> - {{# } }} + {{# } }} </div> </div> @@ -366,7 +386,8 @@ <form class="layui-form" style="padding: 25px 50px 30px 50px;text-align: center"> <select id="batchSelectStaBox" name="batchSta" lay-vertype="tips" lay-verify="required" required=""> </select> - <button style="margin-top: 30px" class="layui-btn" lay-filter="staBatchSelectConfirm" lay-submit="">纭畾</button> + <button style="margin-top: 30px" class="layui-btn" lay-filter="staBatchSelectConfirm" lay-submit="">纭畾 + </button> </form> </script> @@ -382,8 +403,6 @@ </body> - - </html> -- Gitblit v1.9.1