From fa791f7796c1546b1329b52a3de8d753915cb4d5 Mon Sep 17 00:00:00 2001
From: jyy <935090232@qq.com>
Date: Tue, 20 Apr 2021 00:24:01 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/score_shop' into score_shop
---
zq-erp/src/main/resources/templates/views/admin/hive/store/projServiceStartpl-list.html | 53 ++++++++++++++++++++++++++++++++++++++++-------------
1 files changed, 40 insertions(+), 13 deletions(-)
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..71c4cae 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,8 +78,13 @@
<script th:inline="javascript">
var plList = [[${projInfoList}]];
+ var projIndex = 0;
var myForm=MForm.initForm({
invokeUrl:basePath+"/admin/projService/endPl",
+ beforeSubmit : function() {
+ var fieldArray = $("#dataform").serializeArray();
+ console.log(fieldArray);
+ },
afterSubmit:function(){
if (parent.myGrid) {
parent.myGrid.serchData();
@@ -104,21 +108,44 @@
});
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 allGroup = $(".group").length;
+ console.log(idSelect);
+ var groupLength = $(idSelect + " .group").length;
+ for(var i = 0; i < rows.length; i++) {
+ var row = rows[i];
+ var nextIndex = groupLength + i + 1;
+ var outItemIndex = allGroup + i;
+ 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="outStoreItem['+ outItemIndex +'].amount" placeholder="实际用量" >'
+ + '<span style="line-height: 30px;margin-left: 10px;">'+ row.goods.measure +'</span></td>'
+ + '<td><input autocomplete="off" type="hidden" name="outStoreItem['+ outItemIndex +'].skuId" value="'+ row.goods.id +'">'
+ + '<input autocomplete="off" type="text" name="outStoreItem['+ outItemIndex +'].remark" class="form-control" placeholder="配料备注"></td></tr>';
+ if ($(idSelect).children(':last').length <= 0) {
+ $(idSelect).html(html);
+ } else {
+ $(idSelect).children(':last').after(html);
+ }
+ }
}
- console.log(value);
}
</script>
</body>
--
Gitblit v1.9.1