From 4b76e1d370e1161dbb323ddff448d3c0ca3769ba Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Fri, 16 Apr 2021 10:57:02 +0800
Subject: [PATCH] finish add pl

---
 zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java |    2 ++
 zq-erp/src/main/resources/templates/views/admin/hive/store/projServiceStartpl-list.html |   19 +++++++++++++++----
 zq-erp/src/main/resources/templates/views/admin/hive/instore/store-list-pl.html         |    1 -
 3 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java
index 058970f..e57a138 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java
@@ -879,6 +879,8 @@
         if (skipServiceOrderStep(Dictionary.SERVICE_OVER_BEGIN_END)) {
             projServices.setStartTime(new Date());
             projServices.setState(Dictionary.SERVICE_STATU_FWWC);
+        } else {
+            projServices.setState(Dictionary.SERVICE_STATU_PLWC);
         }
         // 释放床位资源
 //        SysBedState checkBedState = sysBedStateDao.selectBySerIdAndBedId(projServices.getBedId(), projServices.getId());
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 1324d76..99e8c74 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
@@ -161,7 +161,6 @@
             alarmNum = row.alarmNum;
         }
         var storeNum = parseInt(value);
-        console.log(alarmNum,storeNum);
         if (alarmNum > storeNum) {
             html = '<span class="label-danger" >&nbsp;&nbsp;' + value
                 + '&nbsp;&nbsp;</span>';
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 62cf9f0..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
@@ -81,6 +81,10 @@
 	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();
@@ -119,20 +123,27 @@
 		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="amount" placeholder="实际用量" >'
+						+ '<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="skuId" value="'+ row.goods.id +'">'
-						+ '<input autocomplete="off" type="text" name="remark"  class="form-control" placeholder="配料备注"></td></tr>';
+						+ '<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>';
 
-				$(idSelect).children(':last').after(html);
+				if ($(idSelect).children(':last').length <= 0) {
+					$(idSelect).html(html);
+				} else {
+					$(idSelect).children(':last').after(html);
+				}
 			}
 		}
 	}

--
Gitblit v1.9.1