From abed1e1b52663b539ce88e613051cbab389b0f8a Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Thu, 15 Apr 2021 19:41:24 +0800 Subject: [PATCH] modify --- zq-erp/src/main/resources/templates/views/admin/hive/store/projServiceStartpl-list-bak.html | 105 +++++++++++++ zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yypb-form.html | 6 zq-erp/src/main/resources/templates/views/admin/hive/store/projServiceStartpl-list.html | 142 ++++++++++------- zq-erp/src/main/resources/config/application.properties | 12 zq-erp/src/main/resources/templates/views/admin/hive/instore/store-list-pl.html | 182 ++++++++++++++++++++++ 5 files changed, 377 insertions(+), 70 deletions(-) diff --git a/zq-erp/src/main/resources/config/application.properties b/zq-erp/src/main/resources/config/application.properties index 9d8a8ef..772d7de 100644 --- a/zq-erp/src/main/resources/config/application.properties +++ b/zq-erp/src/main/resources/config/application.properties @@ -4,13 +4,13 @@ #线上测试环境 -#spring.datasource.username=ct_test -#spring.datasource.password=123456 -#spring.datasource.url=jdbc:mysql://120.27.238.55:3306/hive_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 +spring.datasource.username=ct_test +spring.datasource.password=123456 +spring.datasource.url=jdbc:mysql://120.27.238.55:3306/hive_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 -spring.datasource.username=xc_shop -spring.datasource.password=xc_shop123!@# -spring.datasource.url=jdbc:mysql://124.70.222.34/xc_shop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 +#spring.datasource.username=xc_shop +#spring.datasource.password=xc_shop123!@# +#spring.datasource.url=jdbc:mysql://124.70.222.34/xc_shop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yypb-form.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yypb-form.html index ad8fde8..c549076 100644 --- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yypb-form.html +++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yypb-form.html @@ -451,12 +451,12 @@ }); } , - getFreedBeautyd: function (index) { + getFreedBeautyd: function () { console.log("获取美疗师"); let _this = this; let projService = _this.projService; - let beStates = projService.serviceItems[index]; - + let beStates = projService.serviceItems[0]; + console.log(beStates); if (beStates == null || MTools.isBlank(beStates.beginTimeForm) || MTools.isBlank(beStates.endTimeForm ) ){ return; } diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/instore/store-list-pl.html b/zq-erp/src/main/resources/templates/views/admin/hive/instore/store-list-pl.html new file mode 100644 index 0000000..6eeab8f --- /dev/null +++ b/zq-erp/src/main/resources/templates/views/admin/hive/instore/store-list-pl.html @@ -0,0 +1,182 @@ +<!DOCTYPE HTML> +<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml"> +<head> + <meta charset="utf-8"> + <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> + <meta name="renderer" content="webkit|ie-comp|ie-stand"> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> + <meta name="viewport" + content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/> + <meta http-equiv="Cache-Control" content="no-siteapp"/> + <!-- 本框架基本脚本和样式 --> + <script type="text/javascript" + th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script> + <script type="text/javascript" th:src="@{/js/systools/MBase.js}"></script> + +</head> +<body class=" container-fluid"> +<div class="pd-10"> + <!-- 搜索框部分start --> + <div class="row form-head"> + <form class="form-inline" id="serchform"> + <div class="form-group mr-20 "> + <div class="btn-group search-list " data-for="search-text"> + <button type="button" + class="btn btn-default dropdown-toggle searchlist" + data-toggle="dropdown"> + 产品名称 <span class="caret "></span> + </button> + <ul class="dropdown-menu" role="menu"> + <li data-field="goods.name"><a>产品名称</a></li> + <li data-field="goods.goodsNo"><a>产品编号 </a></li> + </ul> + </div> + <input autocomplete="off" id="search-text" name="goods.name" placeholder="输入查询关键词" + type="text" class="form-control"> + </div> + + <div class="form-group mr-20"> + <label for="goodsSortId">产品分类</label> <select + class=" form-control select2" size="1" + name="goods.goodsSortId" id="goodsSortId"> + <option value=''>--选择产品分类--</option> + </select> + </div> + <div class="form-group mr-20"> + <label for="isAlarm">库存报警状态</label> <select class="form-control" + name="isAlarm" id="isAlarm"> + <option value=''>--请选择库存报警状态--</option> + <option value='1'>是</option> + <option value='2'>否</option> + </select> + + </div> + <div class="form-group"> + <button onclick="myGrid.serchData(1)" type="button" + class="btn btn-sm btn-info"> + <i class="fa fa-search "></i> 搜索 + </button> + <button type="reset" class="btn btn-sm btn-info "> + <i class="fa fa-refresh "></i> 重置 + </button> + </div> + </form> + </div> + <div class="row mt-10"> + <div id="option-bar"> + <button onclick="savePl()" type="button" class="btn btn-info btn-sm"><i class="fa fa-download"></i>选择配料</button> + <!-- 功能按钮部分 --> + </div> + <!-- 数据表格部分 --> + <table id="mgrid"> + <thead> + <tr> + <th data-checkbox="true"></th> + <th data-formatter="MGrid.indexfn" data-align="center" + data-width="30px">序号 + </th> + <th data-field="goods.code">产品编号</th> + <th data-field="goods.name">产品名称</th> + <th data-field="goods.unit">产品单位</th> + <th data-field="storeTotal" data-formatter="overTime" + data-sortable="true">库存量 + </th> + <th data-field="goodsPrice">入库平均价</th> + <th data-field="batchCount">批次数</th> + <th data-field="goods.alarmNum">库存预警值</th> + <th data-field="storeName">所属仓库</th> +<!-- <th data-field="goods.goodType">产品用途</th>--> + <th data-field="goods.goodsSortName">分类</th> + </tr> + </thead> + </table> + <!-- 数据表格部分end --> + </div> +</div> + +<script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script> +<script type="text/javascript"> + + var myGrid; + $(function () { + $(".select2").select2(); + //初始化商品类型搜索列表 + initGoodsTypes(); + //初始化商品属性搜索列表 + MTools.autoFullSelect(); + + myGrid = MGrid.initGrid({ + url: basePath + "/admin/store/showCountList", + sortName: "c.goodsNo", + sortOrder: "asc", + mutexClick : false, + clickToSelect : true + + }); + }); + + function buidOperate(value, row, index) { + var html = []; + html[0] = '<a onClick="openStoreFlow(\'' + row.goods.code + + '\')" class="text-primary " >流向明细</a>' + return html.join(""); + } + + function openStoreFlow(productCode){ + layer.full(layer.open({ + type : 2, + title : "库存流向明细", + maxmin : true, + area : MUI.SIZE_M, + content : [ basePath + '/admin/redirect/hive/statistics/store-inout-list?productCode='+productCode ] + })); + } + + + + + /** + * 初始化产品列表 + */ + function initGoodsTypes() { + $.AjaxProxy({ + a: false, + c: false + }).invoke(basePath + "/admin/goodstype/all", function (loj) { + $("#goodsSortId").createSelectTree(loj.attr("result").rows, { + append: true, + value: "typeName" + }); + }); + + } + + /** + * 库存警戒 + */ + function overTime(value, row, index) { + var html = ""; + var alarmNum = 0; + if (row.sku != null) { + alarmNum = row.alarmNum; + } + var storeNum = parseInt(value); + console.log(alarmNum,storeNum); + if (alarmNum > storeNum) { + html = '<span class="label-danger" > ' + value + + ' </span>'; + } else { + html = '<span>' + value + '</span>'; + } + return html; + + } + + function savePl() { + var select = $("#mgrid").bootstrapTable('getAllSelections'); + parent.selectPl(select); + } +</script> + +</body> +</html> diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/store/projServiceStartpl-list-bak.html b/zq-erp/src/main/resources/templates/views/admin/hive/store/projServiceStartpl-list-bak.html new file mode 100644 index 0000000..f547d4c --- /dev/null +++ b/zq-erp/src/main/resources/templates/views/admin/hive/store/projServiceStartpl-list-bak.html @@ -0,0 +1,105 @@ +<!DOCTYPE HTML> +<html xmlns:th="http://www.thymeleaf.org"> +<head> +<meta charset="utf-8"> +<META HTTP-EQUIV="Pragma" CONTENT="no-cache"> +<meta name="renderer" content="webkit|ie-comp|ie-stand"> +<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> +<meta name="viewport" + content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" /> +<meta http-equiv="Cache-Control" content="no-siteapp" /> +<!-- 本框架基本脚本和样式 --> +<script type="text/javascript" + th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script> +<script type="text/javascript" th:src="@{/js/systools/MBase.js}"></script> +</head> +<body> + <div class="ibox-content"> + <form class="form-horizontal" id="dataform" + onsubmit="javascripr:return false;"> + + <input autocomplete="off" type="hidden" name="id" th:value="${serviceId} " > + + <table class="table table-bordered" id="waptable"> + <tbody th:each="projInfo,outList:${projInfoList}"> + + <tr class="success"> + <td colspan="6" th:text="'项目名称:'+${projInfo.name}"></td> + </tr> + <tr> + <td colspan="6"> + <table class="table"> + <thead> + <tr> + <th>序号</th> + <th>配料名称</th> + <th>推荐消耗</th> + <th>实际消耗</th> + <th>配料备注</th> + </tr> + </thead> + <tbody > + + <tr class="group" th:each="projGoods,list:${projInfo.assembleGoods}"> + <td th:text="${list.index+1}" ></td> + <td th:text="${projGoods.shoppingGoods.name}"></td> + <td > + <span th:text="${projGoods.total}+''+${projGoods.shoppingGoods.measure}"></span> + </td> + <td > + <input autocomplete="off" class="form-control" style="width: 200px;float: left;" type="text" name="amount" placeholder="实际用量" > + <span style="line-height: 30px;margin-left: 10px;" th:text="${projGoods.shoppingGoods.measure}"></span> + </td> + <td> + <input autocomplete="off" type="hidden" name="skuId" th:value="${projGoods.assembleGoodId} " > + + <input autocomplete="off" type="text" name="remark" class="form-control" placeholder="配料备注"></td> + + </tr> + </tbody> + </table> + </td> + </tr> + + </tbody> + </table> + <div class="form-group " style="position: fixed;bottom: 0px;left: 49%;z-index: 9999;background: #ffffff;text-align: center;"> + <div class="col-sm-12 text-center"> + <a href="javascript:;" onclick="myForm.submit()" + class="btn btn-success radius">配料完成</a> + </div> + </div> + </form> + </div> +</body> + + +<script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script> +<script th:inline="javascript"> + + var myForm=MForm.initForm({ + invokeUrl:basePath+"/admin/projService/endPl", + afterSubmit:function(){ + if (parent.myGrid) { + parent.myGrid.serchData(); + } + + if (parent.app) { + parent.app.serviceOrderQuery(); + } + }, + }); + + var index=0; + //设置namename + $(".group").each(function(){ + + var inputs=$(this).find("input"); + inputs.each(function(){ + $(this).attr("name","outStoreItem["+index+"]."+$(this).attr("name")); + }); + index++; + }); + </script> +</body> +</html> \ No newline at end of file diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/store/projServiceStartpl-list.html b/zq-erp/src/main/resources/templates/views/admin/hive/store/projServiceStartpl-list.html index f547d4c..2947628 100644 --- a/zq-erp/src/main/resources/templates/views/admin/hive/store/projServiceStartpl-list.html +++ b/zq-erp/src/main/resources/templates/views/admin/hive/store/projServiceStartpl-list.html @@ -1,82 +1,84 @@ <!DOCTYPE HTML> <html xmlns:th="http://www.thymeleaf.org"> <head> -<meta charset="utf-8"> -<META HTTP-EQUIV="Pragma" CONTENT="no-cache"> -<meta name="renderer" content="webkit|ie-comp|ie-stand"> -<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> -<meta name="viewport" - content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" /> -<meta http-equiv="Cache-Control" content="no-siteapp" /> -<!-- 本框架基本脚本和样式 --> -<script type="text/javascript" - th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script> -<script type="text/javascript" th:src="@{/js/systools/MBase.js}"></script> + <meta charset="utf-8"> + <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> + <meta name="renderer" content="webkit|ie-comp|ie-stand"> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> + <meta name="viewport" + content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" /> + <meta http-equiv="Cache-Control" content="no-siteapp" /> + <!-- 本框架基本脚本和样式 --> + <script type="text/javascript" + th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script> + <script type="text/javascript" th:src="@{/js/systools/MBase.js}"></script> </head> <body> - <div class="ibox-content"> - <form class="form-horizontal" id="dataform" - onsubmit="javascripr:return false;"> +<div class="ibox-content"> + <form class="form-horizontal" id="dataform" + onsubmit="javascripr:return false;"> - <input autocomplete="off" type="hidden" name="id" th:value="${serviceId} " > + <input autocomplete="off" type="hidden" name="id" th:value="${serviceId} " > - <table class="table table-bordered" id="waptable"> - <tbody th:each="projInfo,outList:${projInfoList}"> + <table class="table table-bordered" id="waptable"> + <tbody th:each="projInfo,outList:${projInfoList}"> - <tr class="success"> - <td colspan="6" th:text="'项目名称:'+${projInfo.name}"></td> - </tr> - <tr> - <td colspan="6"> - <table class="table"> - <thead> - <tr> - <th>序号</th> - <th>配料名称</th> - <th>推荐消耗</th> - <th>实际消耗</th> - <th>配料备注</th> - </tr> - </thead> - <tbody > + <tr class="success"> + <td colspan="5" th:text="'项目名称:'+${projInfo.name}"></td> + <td colspan="1" ><button type="button" class="btn btn-primary btn-xs" th:onclick="'javascript:openPlList('+ ${outList.index} +')'">添加配料</button></td> + </tr> + <tr> + <td colspan="6"> + <table class="table"> + <thead> + <tr> + <th>序号</th> + <th>配料名称</th> + <th>推荐消耗</th> + <th>实际消耗</th> + <th>配料备注</th> + </tr> + </thead> + <tbody th:attrappend="id=${outList.index}" > - <tr class="group" th:each="projGoods,list:${projInfo.assembleGoods}"> - <td th:text="${list.index+1}" ></td> - <td th:text="${projGoods.shoppingGoods.name}"></td> - <td > - <span th:text="${projGoods.total}+''+${projGoods.shoppingGoods.measure}"></span> - </td> - <td > - <input autocomplete="off" class="form-control" style="width: 200px;float: left;" type="text" name="amount" placeholder="实际用量" > - <span style="line-height: 30px;margin-left: 10px;" th:text="${projGoods.shoppingGoods.measure}"></span> - </td> - <td> - <input autocomplete="off" type="hidden" name="skuId" th:value="${projGoods.assembleGoodId} " > + <tr class="group" th:each="projGoods,list:${projInfo.assembleGoods}"> + <td th:text="${list.index+1}" ></td> + <td th:text="${projGoods.shoppingGoods.name}"></td> + <td > + <span th:text="${projGoods.total}+''+${projGoods.shoppingGoods.measure}"></span> + </td> + <td > + <input autocomplete="off" class="form-control" style="width: 200px;float: left;" type="text" name="amount" placeholder="实际用量" > + <span style="line-height: 30px;margin-left: 10px;" th:text="${projGoods.shoppingGoods.measure}"></span> + </td> + <td> + <input autocomplete="off" type="hidden" name="skuId" th:value="${projGoods.assembleGoodId} " > - <input autocomplete="off" type="text" name="remark" class="form-control" placeholder="配料备注"></td> + <input autocomplete="off" type="text" name="remark" class="form-control" placeholder="配料备注"></td> - </tr> - </tbody> - </table> - </td> - </tr> + </tr> + </tbody> + </table> + </td> + </tr> - </tbody> - </table> - <div class="form-group " style="position: fixed;bottom: 0px;left: 49%;z-index: 9999;background: #ffffff;text-align: center;"> - <div class="col-sm-12 text-center"> - <a href="javascript:;" onclick="myForm.submit()" - class="btn btn-success radius">配料完成</a> - </div> + </tbody> + </table> + <div class="form-group " style="position: fixed;bottom: 0px;left: 49%;z-index: 9999;background: #ffffff;text-align: center;"> + <div class="col-sm-12 text-center"> + <a href="javascript:;" onclick="myForm.submit()" + class="btn btn-success radius">配料完成</a> </div> - </form> - </div> + </div> + </form> +</div> </body> <script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script> <script th:inline="javascript"> + var plList = [[${projInfoList}]]; var myForm=MForm.initForm({ invokeUrl:basePath+"/admin/projService/endPl", afterSubmit:function(){ @@ -100,6 +102,24 @@ }); index++; }); - </script> + + function openPlList(value) { + console.log(value); + // layer.full(layer.open({ + // type: 2, + // title: "选择配料", + // maxmin: true, + // area: [MUI.SIZE_L, '450px'], + // content: [basePath + '/admin/redirect/hive/instore/store-list-pl'] + // })); + } + + function selectPl(value) { + if (value) { + + } + console.log(value); + } +</script> </body> </html> \ No newline at end of file -- Gitblit v1.9.1