From d9e1a4fe6e51958c4571efe2ced4d4172ed385db Mon Sep 17 00:00:00 2001 From: czt <czt18638530771@163.com> Date: 星期一, 12 六月 2023 21:49:53 +0800 Subject: [PATCH] 称重页面调整-增加化验信息 --- igds-inout/src/main/java/com/ld/igds/inout/view/InoutList.view.xml | 2 igds-web/src/main/resources/templates/admin/inout/in-weight.html | 43 +++++ igds-inout/src/main/java/com/ld/igds/inout/manager/InoutManager.java | 54 ++++++ igds-web/src/main/resources/static/admin/inout/in-weight.js | 132 ++++++++++++++++ igds-web/src/main/resources/templates/admin/inout/in-check.html | 23 +- igds-inout/src/main/java/com/ld/igds/inout/mapper/InoutCheckMapper.java | 8 + igds-inout/src/main/resources/mapper/InoutCheckMapper.xml | 27 +++ igds-inout/src/main/java/com/ld/igds/inout/service/impl/InoutServiceImpl.java | 11 + igds-web/src/main/resources/static/admin/inout/in-check.js | 84 +++++++-- igds-inout/src/main/java/com/ld/igds/inout/dto/InoutCheckParam.java | 3 igds-core/src/main/resources/mapper/CheckStandardMapper.xml | 5 igds-inout/src/main/java/com/ld/igds/inout/service/InoutService.java | 7 igds-inout/src/main/java/com/ld/igds/inout/controller/InoutController.java | 12 + igds-inout/src/main/java/com/ld/igds/m/view/InoutPrice.view.xml | 10 14 files changed, 375 insertions(+), 46 deletions(-) diff --git a/igds-core/src/main/resources/mapper/CheckStandardMapper.xml b/igds-core/src/main/resources/mapper/CheckStandardMapper.xml index 1caaed1..e061d49 100644 --- a/igds-core/src/main/resources/mapper/CheckStandardMapper.xml +++ b/igds-core/src/main/resources/mapper/CheckStandardMapper.xml @@ -61,6 +61,11 @@ <if test="data.upperLimit != null and data.upperLimit != '' ">UPPER_LIMIT_ = #{data.upperLimit},</if> <if test="data.unit != null and data.unit != '' ">UNIT_ = #{data.unit},</if> <if test="data.value != null and data.value != '' ">VALUE_ = #{data.value},</if> + <if test="data.addNum != null">ADD_NUM_ = #{data.addNum},</if> + <if test="data.deNum != null">DE_NUM_ = #{data.deNum},</if> + <if test="data.addPrice != null">ADD_PRICE_ = #{data.addPrice},</if> + <if test="data.dePrice != null">DE_PRICE_ = #{data.dePrice},</if> + <if test="data.result != null and data.result != '' ">RESULT_ = #{data.result},</if> <if test="data.remarks != null and data.remarks != '' ">REMARKS_ = #{data.remarks},</if> <if test="data.operaSymbol != null and data.operaSymbol != '' ">OPERA_SYMBOL_ = #{data.operaSymbol}</if> </set> diff --git a/igds-inout/src/main/java/com/ld/igds/inout/controller/InoutController.java b/igds-inout/src/main/java/com/ld/igds/inout/controller/InoutController.java index 558085c..af8e291 100644 --- a/igds-inout/src/main/java/com/ld/igds/inout/controller/InoutController.java +++ b/igds-inout/src/main/java/com/ld/igds/inout/controller/InoutController.java @@ -18,6 +18,7 @@ import com.ld.igds.models.Depot; import com.ld.igds.models.DicTrigger; import com.ld.igds.models.InoutConf; +import com.ld.igds.models.InoutPrice; import com.ld.igds.util.ContextUtil; import com.ld.igds.util.DateUtil; import lombok.extern.slf4j.Slf4j; @@ -866,4 +867,15 @@ return inoutManager.updateCheckData(data); } + + /** + * 鏍规嵁绮绛夌骇鍙婄伯椋熷搧绉嶈幏鍙栫伯椋熷畾浠� + * @param param + * @return + */ + @RequestMapping("/get-price") + public PageResponse<InoutPrice> getPrice(@RequestBody InoutCheckParam param) { + + return inoutManager.getPrice(param); + } } \ No newline at end of file diff --git a/igds-inout/src/main/java/com/ld/igds/inout/dto/InoutCheckParam.java b/igds-inout/src/main/java/com/ld/igds/inout/dto/InoutCheckParam.java index f80d0b6..deb328b 100644 --- a/igds-inout/src/main/java/com/ld/igds/inout/dto/InoutCheckParam.java +++ b/igds-inout/src/main/java/com/ld/igds/inout/dto/InoutCheckParam.java @@ -5,7 +5,7 @@ import lombok.EqualsAndHashCode; /** - * 鍑哄叆搴�-鎵︽牱鍙傛暟 + * 鍑哄叆搴�-鎵︽牱鍖栭獙鍙傛暟 * * @author czt * @date 2023-05-30 18:10 @@ -32,4 +32,5 @@ private String checkStatus; //鎵︽牱鐘舵�� private String depotId; private String foodVariety; + private String foodLevel; } diff --git a/igds-inout/src/main/java/com/ld/igds/inout/manager/InoutManager.java b/igds-inout/src/main/java/com/ld/igds/inout/manager/InoutManager.java index dd68d6f..6041858 100644 --- a/igds-inout/src/main/java/com/ld/igds/inout/manager/InoutManager.java +++ b/igds-inout/src/main/java/com/ld/igds/inout/manager/InoutManager.java @@ -16,6 +16,7 @@ import com.ld.igds.m.service.InoutCommonService; import com.ld.igds.models.Depot; import com.ld.igds.models.InoutConf; +import com.ld.igds.models.InoutPrice; import com.ld.igds.models.InoutSysConf; import com.ld.igds.util.ContextUtil; import com.ld.igds.util.DateUtil; @@ -450,12 +451,18 @@ data.setProgress(nextProgress); } + if (InoutConstant.PROGRESS_CHECK.equals(data.getProgress())) { + data.setCheckUser(ContextUtil.getLoginUserCName()); + data.setProgress(nextProgress); + return data; + } + if (InoutConstant.PROGRESS_WEIGHT_EMPTY.equals(curProgress)) { data.setEmptyWeightTime(new Date()); data.setEmptyWeightUser(ContextUtil.getLoginUserCName()); data.setProgress(nextProgress); - } + if (InoutConstant.PROGRESS_WEIGHT_FULL.equals(curProgress)) { data.setFullWeightTime(new Date()); data.setFullWeightUser(ContextUtil.getLoginUserCName()); @@ -469,14 +476,12 @@ data.setProgress(nextProgress); } - //濡傛灉涓嬩竴涓暟鎹姸鎬�=娴佺▼缁撴潫锛岀洿鎺ヨˉ鍏呭畬鏁翠俊鎭� if (InoutConstant.PROGRESS_RECORD.equals(nextProgress)) { data.setCompleteTime(DateUtils.addMinutes(new Date(), 2)); data.setCompleteUser(ContextUtil.getLoginUserCName()); data.setProgress(nextProgress); } - return data; } @@ -498,6 +503,14 @@ return data; } + + if (InoutConstant.PROGRESS_CHECK.equals(data.getProgress())) { + data.setCheckUser(ContextUtil.getLoginUserCName()); + data.setProgress(getNextProgress(data.getProgress(), + data.getType(), sysConf)); + return data; + } + if (InoutConstant.PROGRESS_WEIGHT_EMPTY.equals(data.getProgress())) { data.setEmptyWeightTime(new Date()); data.setEmptyWeightUser(ContextUtil.getLoginUserCName()); @@ -1217,7 +1230,7 @@ //鏇存柊鍖栭獙椤逛俊鎭� CheckUpdateResult checkResult = checkStandardManager.updateCheckItems(data.getCheckId(), data.getCompanyId(), data.getCheckItems()); - if (null == checkResult || null != checkResult.getMsg()) { + if (StringUtils.isNotEmpty(checkResult.getMsg())) { return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), "鍚庡彴鎵ц寮傚父锛�" + checkResult.getMsg(), data); } @@ -1233,17 +1246,25 @@ data.setCheckTime(new Date()); } curData.setCheckStatus(data.getCheckStatus()); + + //鑾峰彇绯荤粺鍙傛暟閰嶇疆 + InoutSysConf inoutSysConf = inoutCommonService.getCacheInoutSysConf(data.getCompanyId(), data.getDeptId()); + if (null == inoutSysConf) { + return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), + "鎻愮ず锛氬綋鍓嶅簱鍖烘湭閰嶇疆鍑哄叆搴撴祦绋嬩俊鎭紝璇疯仈绯荤鐞嗗憳", data); + } //鏇存柊涓嬩竴娴佺▼鐘舵�� if (InoutConstant.PROGRESS_CHECK.equals(curData.getProgress())) { - curData = updateBasicInfo(curData, null); + curData = updateBasicInfo(curData, inoutSysConf); // 鑻ュ寲楠岀粨鏋滀笉鍚堟牸锛屽垽鏂厤缃悗缁祦绋� if (InoutConstant.STATUS_UNPASS.equals(curData.getCheckStatus())) { curData = checkNoPass(curData); } } - data.setCheckStatus(curData.getCheckStatus()); //鍖栭獙浜恒�佸寲楠屾椂闂� + data.setCheckStatus(curData.getCheckStatus()); + data.setProgress(curData.getProgress()); if (StringUtils.isEmpty(data.getCheckUser())) { data.setCheckUser(ContextUtil.getLoginUserCName()); } @@ -1262,4 +1283,25 @@ "鍚庡彴寮傚父锛�" + e.getMessage(), null); } } + + /** + * 鑾峰彇鍗曚环淇℃伅 + * + * @param param + * @return + */ + public PageResponse<InoutPrice> getPrice(InoutCheckParam param) { + try { + + List<InoutPrice> price = inoutService.getPrice(param); + if(null == price || price.isEmpty()){ + return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), "鏈幏鍙栧埌绮瀹氫环閰嶇疆淇℃伅"); + } + return new PageResponse<>(RespCodeEnum.CODE_0000, price.get(0)); + + } catch (Exception e) { + return new PageResponse<>( + RespCodeEnum.CODE_1111.getCode(), "鍚庡彴寮傚父锛�" + e.getMessage(), null); + } + } } \ No newline at end of file diff --git a/igds-inout/src/main/java/com/ld/igds/inout/mapper/InoutCheckMapper.java b/igds-inout/src/main/java/com/ld/igds/inout/mapper/InoutCheckMapper.java index 32277b1..7cf20fc 100644 --- a/igds-inout/src/main/java/com/ld/igds/inout/mapper/InoutCheckMapper.java +++ b/igds-inout/src/main/java/com/ld/igds/inout/mapper/InoutCheckMapper.java @@ -3,6 +3,7 @@ import com.baomidou.mybatisplus.plugins.Page; import com.ld.igds.inout.dto.InoutCheckData; import com.ld.igds.inout.dto.InoutCheckParam; +import com.ld.igds.models.InoutPrice; import org.apache.ibatis.annotations.Param; import java.util.List; @@ -49,4 +50,11 @@ * @return */ int updateCheckData(@Param("data") InoutCheckData data); + + /** + * 鑾峰彇绮瀹氫环 + * @param param + * @return + */ + List<InoutPrice> getPrice(@Param("param") InoutCheckParam param); } diff --git a/igds-inout/src/main/java/com/ld/igds/inout/service/InoutService.java b/igds-inout/src/main/java/com/ld/igds/inout/service/InoutService.java index 82f981e..6997400 100644 --- a/igds-inout/src/main/java/com/ld/igds/inout/service/InoutService.java +++ b/igds-inout/src/main/java/com/ld/igds/inout/service/InoutService.java @@ -3,6 +3,7 @@ import com.ld.igds.check.dto.CheckItemData; import com.ld.igds.data.Page; import com.ld.igds.inout.dto.*; +import com.ld.igds.models.InoutPrice; import java.util.Date; import java.util.List; @@ -274,5 +275,11 @@ */ String updateCheckData(InoutCheckData data); + /** + * 鑾峰彇绮瀹氫环 + * @param param + * @return + */ + List<InoutPrice> getPrice(InoutCheckParam param); } diff --git a/igds-inout/src/main/java/com/ld/igds/inout/service/impl/InoutServiceImpl.java b/igds-inout/src/main/java/com/ld/igds/inout/service/impl/InoutServiceImpl.java index e5e34a6..263c996 100644 --- a/igds-inout/src/main/java/com/ld/igds/inout/service/impl/InoutServiceImpl.java +++ b/igds-inout/src/main/java/com/ld/igds/inout/service/impl/InoutServiceImpl.java @@ -18,6 +18,7 @@ import com.ld.igds.inout.service.InoutService; import com.ld.igds.io.constant.OrderRespEnum; import com.ld.igds.models.Depot; +import com.ld.igds.models.InoutPrice; import com.ld.igds.util.ContextUtil; import com.ld.igds.util.DateUtil; import com.ld.igds.util.RedisUtil; @@ -786,4 +787,14 @@ return null; } + @Override + public List<InoutPrice> getPrice(InoutCheckParam param) { + if(null == param.getStart()){ + param.setStart(new Date()); + } + if(null == param.getEnd()){ + param.setEnd(new Date()); + } + return inoutCheckMapper.getPrice(param); + } } diff --git a/igds-inout/src/main/java/com/ld/igds/inout/view/InoutList.view.xml b/igds-inout/src/main/java/com/ld/igds/inout/view/InoutList.view.xml index 1e4b29e..9f75b8f 100644 --- a/igds-inout/src/main/java/com/ld/igds/inout/view/InoutList.view.xml +++ b/igds-inout/src/main/java/com/ld/igds/inout/view/InoutList.view.xml @@ -1322,7 +1322,7 @@ <Property name="minWidth">500</Property> <Container layout="regionPadding:5"> <DataSet id="dsFoodOrigin"> - <Property name="dataProvider">dicTriggerPR#pagFoodLocationData</Property> + <Property name="dataProvider"></Property> <Property name="dataType">[dtFoodOrigin]</Property> <Property name="parameter"></Property> <Property name="pageSize">30</Property> diff --git a/igds-inout/src/main/java/com/ld/igds/m/view/InoutPrice.view.xml b/igds-inout/src/main/java/com/ld/igds/m/view/InoutPrice.view.xml index 43d57dd..b5e8a9f 100644 --- a/igds-inout/src/main/java/com/ld/igds/m/view/InoutPrice.view.xml +++ b/igds-inout/src/main/java/com/ld/igds/m/view/InoutPrice.view.xml @@ -41,13 +41,15 @@ </PropertyDef> <PropertyDef name="startTime"> <Property></Property> - <Property name="label">鏈夋晥寮�濮嬫椂闂�</Property> - <Property name="dataType">DateTime</Property> + <Property name="label">鏈夋晥寮�濮嬫棩鏈�</Property> + <Property name="dataType">Date</Property> + <Property name="required">true</Property> </PropertyDef> <PropertyDef name="endTime"> <Property></Property> - <Property name="label">鏈夋晥鎴嚦鏃堕棿</Property> - <Property name="dataType">DateTime</Property> + <Property name="label">鏈夋晥鎴嚦鏃ユ湡</Property> + <Property name="dataType">Date</Property> + <Property name="required">true</Property> </PropertyDef> <PropertyDef name="updateUser"> <Property></Property> diff --git a/igds-inout/src/main/resources/mapper/InoutCheckMapper.xml b/igds-inout/src/main/resources/mapper/InoutCheckMapper.xml index 31f28b3..c11d18a 100644 --- a/igds-inout/src/main/resources/mapper/InoutCheckMapper.xml +++ b/igds-inout/src/main/resources/mapper/InoutCheckMapper.xml @@ -105,6 +105,7 @@ <if test="data.depotId != null">DEPOT_ID_ = #{data.depotId},</if> <if test="data.checkUser != null">CHECK_USER_ = #{data.checkUser},</if> <if test="data.checkTime != null">CHECK_TIME_ = #{data.checkTime},</if> + <if test="data.progress != null">PROGRESS_ = #{data.progress},</if> <if test="data.checkStatus != null">CHECK_STATUS_ = #{data.checkStatus},</if> <if test="data.foodLevel != null">FOOD_LEVEL_ = #{data.foodLevel},</if> <if test="data.foodVariety != null">FOOD_VARIETY_ = #{data.foodVariety},</if> @@ -118,4 +119,30 @@ AND ID_ =#{data.id} </update> + <!--鑾峰彇绮瀹氫环淇℃伅--> + <select id="getPrice" resultType="com.ld.igds.models.InoutPrice" + parameterType="com.ld.igds.inout.dto.InoutCheckParam"> + select + ID_ as id, + COMPANY_ID_ as companyId, + FOOD_VARIETY_ as foodVariety, + FOOD_LEVEL_ as foodLevel, + PRICE_ as price, + START_TIME_ as startTime, + END_TIME_ as endTime, + UPDATE_USER_ as updateUser, + UPDATE_TIME_ as updateTime, + REMARKS_ as remarks + from + D_INOUT_PRICE + <where> + <if test="param.companyId != null and param.companyId != '' ">AND COMPANY_ID_ = #{param.companyId}</if> + <if test="param.foodLevel != null and param.foodLevel != '' ">AND FOOD_LEVEL_ = #{param.foodLevel}</if> + <if test="param.foodVariety != null and param.foodVariety != '' ">AND FOOD_VARIETY_ like #{param.foodVariety}</if> + <if test="param.end != null">AND END_TIME_ <![CDATA[ >= ]]>#{param.end,jdbcType=TIMESTAMP}</if> + <if test="param.start != null">AND START_TIME_ <![CDATA[ <= ]]>#{param.start,jdbcType=TIMESTAMP}</if> + </where> + ORDER BY UPDATE_TIME_ + </select> + </mapper> \ No newline at end of file diff --git a/igds-web/src/main/resources/static/admin/inout/in-check.js b/igds-web/src/main/resources/static/admin/inout/in-check.js index e2ba053..4157e94 100644 --- a/igds-web/src/main/resources/static/admin/inout/in-check.js +++ b/igds-web/src/main/resources/static/admin/inout/in-check.js @@ -47,9 +47,14 @@ } }); - //鐩戝惉绮鍝佺 + //鐩戝惉绮鍝佺锛岃幏鍙栧寲楠岄」 layui.form.on('select(select_foodVariety)', function (data) { updateFoodVariety(data.value); + }); + + //鐩戝惉绮绛夌骇锛岃幏鍙栫伯椋熷畾浠� + layui.form.on('select(select_foodLevel)', function (data) { + getPriceByFoodLevel(data.value); }); //鐩戝惉鍖栭獙缁撴灉鍗曞~鍐欐暟鎹�,骞剁粰鍑烘彁绀虹粨鏋� @@ -110,23 +115,23 @@ if (symbol && limit) { if (">=" == symbol) { if (newValue < limit) { - data.result = "涓嶅悎鏍�"; + data.result = "0"; } else { - data.result = "鍚堟牸"; + data.result = "1"; } } if ("<=" == symbol) { if (newValue > limit) { - data.result = "涓嶅悎鏍�"; + data.result = "0"; } else { - data.result = "鍚堟牸"; + data.result = "1"; } } if ("==" == symbol) { if (newValue != limit) { - data.result = "涓嶅悎鏍�"; + data.result = "0"; } else { - data.result = "鍚堟牸"; + data.result = "1"; } } } @@ -146,7 +151,7 @@ form.render('select'); } -//鏍规嵁閫夋嫨浠撳簱鏄剧ず绮鍝佺 +//鏍规嵁鍝佺鑾峰彇鍖栭獙椤� function updateFoodVariety(foodVariety) { if (null == foodVariety || "" == foodVariety) return; form.val("form-detail", { @@ -155,6 +160,34 @@ form.render(); flushCheckItem(foodVariety); +} + +//鏍规嵁閫夋嫨浠撳簱鏄剧ず绮鍝佺 +function getPriceByFoodLevel(foodLevel) { + if (null == foodLevel || "" == foodLevel) return; + form.val("form-detail", { + foodLevel: foodLevel + }); + form.render(); + var data = form.val("form-detail"); + + $.ajax({ + type: "POST", + url: "../../basic/inout/get-price", + dataType: "json", + contentType: "application/json;charset=UTF-8", + data: JSON.stringify(data), + success: function (result) { + if (result.code != "0000") { + layer.msg(result.msg); + } else { + $("#check-result-tip2").text("绮瀹氫环锛�" + result.data.price + "鍏�/鍏枻"); + } + }, + error: function () { + layer.msg("鍚庡彴寮傚父锛岃閲嶈瘯鎴栬�呰仈绯荤鐞嗗憳锛侊紒"); + } + }); } // 鏌ヨ @@ -303,10 +336,6 @@ curCheckData.checkTime = dateFtt("yyyy-MM-dd hh:mm:ss", new Date()); } curCheckData.checkUser = checkUser; - if (curCheckData.checkStatus == "NONE") { - //闅愯棌杞︾墝閮ㄥ垎淇℃伅 - curCheckData.plateNum = replaceStr(curCheckData.plateNum); - } // 璧嬪�� form.val("form-detail", curCheckData); @@ -336,6 +365,7 @@ // 鑾峰彇鍖栭獙椤逛俊鎭� flushCheckItem(curCheckData.foodVariety); + getPriceByFoodLevel(curCheckData.foodLevel); } /** @@ -344,7 +374,7 @@ function flushCheckItem(foodVariety) { curCheckItems = null; $("#check-result-tip").text("妫�楠岀粨鏋滐細#"); - $("#price-result-tip").text("绮鍗曚环锛�#鍏�/鍏枻"); + $("#price-result-tip2").text("绮瀹氫环锛�#鍏�/鍏枻"); curCheckData.foodVariety = foodVariety; var index = layer.load(); @@ -383,23 +413,23 @@ } var msg; $.each(curCheckItems, function (index, data) { - if (!data.remarks) { + if (!data.result) { return true; } - if (data.remarks == "涓嶅悎鏍�") { + if (data.result == "0") { msg = "涓嶅悎鏍�"; return false; } - if (data.remarks == "鍚堟牸") { + if (data.result == "1") { msg = "鍚堟牸"; } }); if (msg) { - $("#check-result-tip").text("妫�楠岀粨鏋滐細" + msg + "锛涚伯椋熷崟浠凤細#鍏�/鍏枻"); + $("#check-result-tip").text("璐ㄦ缁撴灉锛�" + msg); } else { - $("#check-result-tip").text("妫�楠岀粨鏋滐細鍚堟牸" + "锛涚伯椋熷崟浠凤細#鍏�/鍏枻"); + $("#check-result-tip").text("璐ㄦ缁撴灉锛�#"); } -}; +} /** * 娓叉煋琛ㄦ牸 @@ -463,7 +493,17 @@ title: '妫�楠岀粨鏋�', align: 'center', width: '10%', - edit: 'text' + templet: function (item) { + if (item.result == null) { + return ""; + } + if (item.result == '0') { + return "涓嶅悎鏍�"; + } + if (item.result == '1') { + return "鍚堟牸"; + } + } }, { field: 'remarks', title: '澶囨敞璇存槑', @@ -645,13 +685,13 @@ "border-bottom": "2px solid #53adce", "background": "#eff4f6" }); -}; +} // 琛ㄥ崟娓呯┖ function resetForm() { $("#form-param")[0].reset(); form.render(); -}; +} /** * 寮瑰嚭鎻愰啋妗� diff --git a/igds-web/src/main/resources/static/admin/inout/in-weight.js b/igds-web/src/main/resources/static/admin/inout/in-weight.js index 4577e0a..3f8b20e 100644 --- a/igds-web/src/main/resources/static/admin/inout/in-weight.js +++ b/igds-web/src/main/resources/static/admin/inout/in-weight.js @@ -7,6 +7,7 @@ var timerWeight; var paramIntelCard;//璁惧璇嗗埆缁撴灉 var paramIdCard;//璁惧璇嗗埆缁撴灉 +var curCheckItems = null;// 褰撳墠鏁版嵁鐨勬鏌ラ」淇℃伅 var step = 1; $(function () { @@ -491,5 +492,134 @@ //鏄剧ず璐ㄦ淇℃伅 function showCheck() { - alertError("璋冩暣"); + if(!recordData){ + alertError("娌℃湁涓氬姟鏁版嵁淇℃伅锛屾墽琛岃鎷掔粷"); + return; + } + + // 鑾峰彇鍖栭獙椤逛俊鎭� + flushCheckItem(); + + layer.open({ + type: 1, + title: "璐ㄦ璇︾粏", + offset: ['120px', '100px'], + area: ['1000px', '520px'], + shade: 0, + content: $('#checkDetail'), + btnAlign: 'c', + btn: ['鍙栨秷'], + yes: function () { + layer.closeAll(); + }, + closeBtn: 0 + }); +} + +/** + * 鍒锋柊鍖栭獙缁撴灉椤� + */ +function flushCheckItem() { + + curCheckItems = null; + $.ajax({ + type: "POST", + url: "../../basic/inout/get-check-item", + dataType: "json", + contentType: "application/json;charset=UTF-8", + data: JSON.stringify(recordData), + success: function (result) { + if (result.code != "0000") { + layer.msg(result.msg); + } else { + curCheckItems = result.data; + + // 椤甸潰娓叉煋妫�娴嬮」 + renderTableCheckItem(); + } + }, + error: function () { + layer.msg("鍚庡彴寮傚父锛岃閲嶈瘯鎴栬�呰仈绯荤鐞嗗憳锛侊紒"); + } + }); +} + +/** + * 娓叉煋琛ㄦ牸 + */ +function renderTableCheckItem() { + // 娓呯┖鏁版嵁 + $("#tableCheckItem").empty(); + table.render({ + elem: '#tableCheckItem', + data: curCheckItems, + page: false, + even: true, + cols: [[{ + field: 'standardName', + title: '妫�楠岄」鐩�', + align: 'center', + width: '13%' + }, { + field: 'value', + title: '妫�楠屽��', + align: 'center', + width: '9%' + }, { + field: 'operaSymbolValue', + title: '鏍囧噯鍊�', + align: 'center', + width: '10%' + }, { + field: 'unit', + title: '鍗曚綅', + align: 'center', + width: '10%' + }, { + field: 'deNum', + title: '鎵i噸', + align: 'center', + width: '9%' + }, { + field: 'addNum', + title: '澧為噸', + align: 'center', + width: '9%' + }, { + field: 'dePrice', + title: '鎵d环', + align: 'center', + width: '9%' + }, { + field: 'addPrice', + title: '澧炰环', + align: 'center', + width: '9%' + }, { + field: 'result', + title: '妫�楠岀粨鏋�', + align: 'center', + width: '10%', + templet: function (item) { + if (item.result == null) { + return ""; + } + if (item.result == '0') { + return "涓嶅悎鏍�"; + } + if (item.result == '1') { + return "鍚堟牸"; + } + } + }, { + field: 'remarks', + title: '澶囨敞璇存槑', + align: 'center' + }]] + }); + + $("thead tr").css({ + "border-bottom": "2px solid #53adce", + "background": "#eff4f6" + }); } \ No newline at end of file diff --git a/igds-web/src/main/resources/templates/admin/inout/in-check.html b/igds-web/src/main/resources/templates/admin/inout/in-check.html index a4ae6e7..8f962a6 100644 --- a/igds-web/src/main/resources/templates/admin/inout/in-check.html +++ b/igds-web/src/main/resources/templates/admin/inout/in-check.html @@ -464,7 +464,7 @@ <div class="layui-form-item"> <label class="layui-form-label red">绮绛夌骇</label> <div class="layui-input-block"> - <select id="foodLevel" name="foodLevel" lay-filter="foodLevel"> + <select id="foodLevel" name="foodLevel" lay-filter="select_foodLevel"> <option value=""></option> <option th:each="dic,dicSet:${listFoodLevel}" th:value="${dic.code}" th:text="${dic.name}"></option> @@ -498,16 +498,19 @@ <span style="font-weight: bold; margin-right: 10px;">澶囨敞璇存槑锛�1.缁撴灉鍒ゅ畾锛氱郴缁熸牴鎹悇鍖栭獙椤圭粨鏋滃垽瀹氾紝鏈�鍚庡寲楠岀粨鏋滈渶鎵嬪姩閫夋嫨纭锛�2.鏍哥畻瀹氫环锛氭牴鎹寲楠岄」閰嶇疆璁$畻鐩稿叧澧炴墸浠凤紝鏈�鍚庡崟浠烽渶鎵嬪姩纭銆�</span> </div> </div> - <div class="layui-col-xs12"> - <blockquote class="layui-elem-quote"> + <div class="layui-col-xs6"> + <blockquote class="layui-elem-quote" style="width: 95%;float: left;"> <div> - <span style="font-weight: bold; margin-right: 10px;">绯荤粺鍒ゅ畾锛�</span> - <span id="check-result-tip" style="margin-right: 25px;">鍖栭獙缁撴灉#锛� 鏀剁伯鍗曚环锛�#鍏�/鍏枻</span> - <span id="check-result-msg" style="margin-right: 25px;color: red;float: right;"> - <button style="margin-top: -6px;" class="rkbk-quick-btn layui-btn btn-blue" onclick="checkReset()"> - <i><img th:src="@{../../static/images/icon-fuwei.png}"/></i>鏍哥畻瀹氫环 - </button> - </span> + <span style="font-weight: bold; margin-right: 10px;">缁撴灉鍒ゅ畾锛�</span> + <span id="check-result-tip" style="margin-right: 25px;">鍖栭獙缁撴灉锛�</span> + </div> + </blockquote> + </div> + <div class="layui-col-xs6"> + <blockquote class="layui-elem-quote" style="width: 95%;float: right;"> + <div> + <span style="font-weight: bold; margin-right: 10px;">瀹氫环鍒ゅ畾锛�</span> + <span id="check-result-tip2" style="margin-right: 25px;">鏀剁伯鍗曚环锛�#鍏�/鍏枻</span> </div> </blockquote> </div> diff --git a/igds-web/src/main/resources/templates/admin/inout/in-weight.html b/igds-web/src/main/resources/templates/admin/inout/in-weight.html index 7350385..f09eabe 100644 --- a/igds-web/src/main/resources/templates/admin/inout/in-weight.html +++ b/igds-web/src/main/resources/templates/admin/inout/in-weight.html @@ -126,7 +126,12 @@ width: 130px; height: 28px; } - + .layui-table, .layui-table-view { + margin: 0 0; + } + .layui-table-body { + max-height: 350px; + } </style> </head> @@ -726,6 +731,42 @@ lay-filter="tableFoodLoaction" style="margin: 0px;"></table> </div> +<!-- 璐ㄦ淇℃伅 --> +<div class="layui-tab-content" id="checkDetail" style="display: none;"> + <!-- 鍖栭獙缁撴灉淇℃伅 --> + <table class="layui-table tableCheckItem" id="tableCheckItem" + lay-filter="tableCheckItem"> + <colgroup> + <col width="10%"> + <col width="10%"> + <col width="10%"> + <col width="10%"> + <col width="10%"> + <col width="10%"> + <col width="10%"> + <col width="10%"> + <col width="10%"> + <col width=""> + </colgroup> + <thead> + <tr class="qyzj-table-tit"> + <th>妫�楠岄」鐩�</th> + <th>妫�楠屽��</th> + <th>鏍囧噯鍊�</th> + <th>鍗曚綅</th> + <th>鎵i噸</th> + <th>澧為噸</th> + <th>鎵d环</th> + <th>澧炰环</th> + <th>妫�楠岀粨鏋�</th> + <th>澶囨敞</th> + </tr> + </thead> + <tbody> + </tbody> + </table> + +</div> <!-- 寮瑰嚭妗嗙殑淇℃伅 --> <div class="layui-tab-content" id="dialog-from-notify" style="display: none;"> -- Gitblit v1.9.3