From a1fa84b13ffdf8f9ba9f474466bbe915d27522c7 Mon Sep 17 00:00:00 2001
From: wzy <wzy19931122ai@163.com>
Date: Thu, 15 Apr 2021 23:20:24 +0800
Subject: [PATCH] modify
---
zq-erp/src/main/resources/mybatis/mapper/hive/SysStoreInfoDao.xml | 1 +
zq-erp/src/main/resources/templates/views/admin/hive/store/projServiceStartpl-list.html | 42 +++++++++++++++++++++++++++++-------------
zq-erp/src/main/resources/config/application.properties | 6 +++---
zq-erp/src/main/resources/templates/views/admin/hive/instore/store-list-pl.html | 5 +++--
4 files changed, 36 insertions(+), 18 deletions(-)
diff --git a/zq-erp/src/main/resources/config/application.properties b/zq-erp/src/main/resources/config/application.properties
index 9668a14..3480aab 100644
--- a/zq-erp/src/main/resources/config/application.properties
+++ b/zq-erp/src/main/resources/config/application.properties
@@ -13,9 +13,9 @@
#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=hive
-spring.datasource.password=hive123!@#
-spring.datasource.url=jdbc:mysql://124.70.222.34/hive_prd?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8
+#spring.datasource.username=hive
+#spring.datasource.password=hive123!@#
+#spring.datasource.url=jdbc:mysql://124.70.222.34/hive_prd?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysStoreInfoDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysStoreInfoDao.xml
index 7c421b5..6bafe6f 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysStoreInfoDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysStoreInfoDao.xml
@@ -380,6 +380,7 @@
c.NAME as gs_NAME,
c.UNIT as gs_UNIT,
c.good_type as gs_good_type,
+ c.measure as gs_measure,
c.GOODS_SORT_ID as gs_GOODS_SORT_ID,
c.SUPPLIER_ID as gs_SUPPLIER_ID,
(select TYPE_NAME from sys_goods_type t where t.id=c.GOODS_SORT_ID) gs_goodsSortName,
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
index 6eeab8f..1324d76 100644
--- 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
@@ -173,8 +173,9 @@
}
function savePl() {
- var select = $("#mgrid").bootstrapTable('getAllSelections');
- parent.selectPl(select);
+ var rows = $("#mgrid").bootstrapTable('getAllSelections');
+ parent.selectPl(rows);
+ parent.layer.close(parent.layer.getFrameIndex(window.name));
}
</script>
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 2947628..62cf9f0 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
@@ -51,8 +51,7 @@
<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} " >
+ <td><input autocomplete="off" type="hidden" name="skuId" th:value="${projGoods.assembleGoodId} " >
<input autocomplete="off" type="text" name="remark" class="form-control" placeholder="配料备注"></td>
@@ -79,6 +78,7 @@
<script th:inline="javascript">
var plList = [[${projInfoList}]];
+ var projIndex = 0;
var myForm=MForm.initForm({
invokeUrl:basePath+"/admin/projService/endPl",
afterSubmit:function(){
@@ -104,21 +104,37 @@
});
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']
- // }));
+ projIndex = 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) {
+ function selectPl(rows) {
+ console.log(rows);
+ if (rows) {
+ var projInfo = plList[projIndex];
+ var idSelect = "#"+projIndex;
+ var groupLength = $(idSelect + " .group").length;
+ for(var i = 0; i < rows.length; i++) {
+ var row = rows[i];
+ var nextIndex = groupLength + i + 1;
+ var html = '<tr class="group">'
+ + '<td>'+ nextIndex +'</td>'
+ + '<td>'+ row.goods.name +'</td>'
+ + '<td><span></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;">'+ row.goods.measure +'</span></td>'
+ + '<td><input autocomplete="off" type="hidden" name="skuId" value="'+ row.goods.id +'">'
+ + '<input autocomplete="off" type="text" name="remark" class="form-control" placeholder="配料备注"></td></tr>';
+ $(idSelect).children(':last').after(html);
+ }
}
- console.log(value);
}
</script>
</body>
--
Gitblit v1.9.1