From cb81854468aeb2431846648f59fba0fe5de01e6c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=A3=AE=E5=B1=BF=E6=B5=B7=E5=B7=B7?= <15711450175@163.com>
Date: Fri, 10 Sep 2021 17:29:58 +0800
Subject: [PATCH] =?UTF-8?q?=E5=B7=B2=E7=BB=8F=E5=AE=8C=E6=88=90=20=20=20?=
=?UTF-8?q?=20=20=E6=95=88=E7=8E=87=E7=BA=A7=E5=88=AB=E5=B1=95=E7=A4=BA?=
=?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js | 7 ++++---
.../system/baselocationinfo/baselocationinfo.html | 9 ++++++++-
.../system/service/impl/BaseLocationInfoServiceImpl.java | 2 +-
.../resources/mapper/system/BaseLocationInfoMapper.xml | 8 ++++++--
4 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js
index 2250685..579e37d 100644
--- a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js
+++ b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js
@@ -537,15 +537,16 @@ var table = {
});
return actions.join('');
},
- selectDictLabelss: function(datas, value) {
+
+ selectDictLabelLocation: function(datas, value) {
if ($.common.isEmpty(datas) || $.common.isEmpty(value)) {
return '';
}
var actions = [];
$.each(datas, function(index, dict) {
- if (dict.dictValue == ('' + value)) {
+ if (dict.efficiencyLevel == ('' + value)) {
var listClass = $.common.equals("default", dict.listClass) || $.common.isEmpty(dict.listClass) ? "" : "badge badge-" + dict.listClass;
- actions.push($.common.sprintf("%s", listClass, dict.dictLabel));
+ actions.push($.common.sprintf("%s", listClass, dict.levelName));
return false;
}
});
diff --git a/ruoyi-admin/src/main/resources/templates/system/baselocationinfo/baselocationinfo.html b/ruoyi-admin/src/main/resources/templates/system/baselocationinfo/baselocationinfo.html
index 592bea1..7385120 100644
--- a/ruoyi-admin/src/main/resources/templates/system/baselocationinfo/baselocationinfo.html
+++ b/ruoyi-admin/src/main/resources/templates/system/baselocationinfo/baselocationinfo.html
@@ -60,6 +60,9 @@
var locationStatusDatas = [[${@dict.getType('location_status')}]];
+
+ var efficiencyDatas = [[${@baseEfficiencyLevelService.selectBaseEfficiencyLevelList(null)}]];
+
var prefix = ctx + "system/baselocationinfo";
$(function() {
@@ -119,7 +122,11 @@
},
{
field: 'efficiency',
- title: '效率级别'
+ title: '效率级别',
+ formatter: function(value, row, index) {
+ console.log(efficiencyDatas)
+ return $.table.selectDictLabelLocation(efficiencyDatas, value);
+ }
},
{
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BaseLocationInfoServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BaseLocationInfoServiceImpl.java
index 1879e2e..21f6cfd 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BaseLocationInfoServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BaseLocationInfoServiceImpl.java
@@ -14,7 +14,7 @@ import com.ruoyi.common.core.text.Convert;
* @author Frank zhou
* @date 2021-09-10
*/
-@Service
+@Service("BaseLocationInfoService")
public class BaseLocationInfoServiceImpl implements IBaseLocationInfoService
{
@Autowired
diff --git a/ruoyi-system/src/main/resources/mapper/system/BaseLocationInfoMapper.xml b/ruoyi-system/src/main/resources/mapper/system/BaseLocationInfoMapper.xml
index 3891184..ae2900f 100644
--- a/ruoyi-system/src/main/resources/mapper/system/BaseLocationInfoMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/BaseLocationInfoMapper.xml
@@ -22,7 +22,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- select objid, location_code, location_name, material_type, store_code, location_area, location_row, location_line, location_tier, location_status, efficiency, remark, delete_flag, record_time from base_location_info
+ select objid, location_code, location_name, material_type, store_code,
+ location_area, location_row, location_line, location_tier,
+ location_status, efficiency, remark, delete_flag, record_time
+ from base_location_info
@@ -37,9 +40,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and delete_flag = '0'
-
+