From 5e95479e1ec308172ff6f6e702d2851d3bddaf7e 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, 24 Sep 2021 15:35:47 +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=E4=BF=AE=E6=94=B9=E6=89=80=E5=B1=9E=E4=BB=93=E5=BA=93?= =?UTF-8?q?=E4=B8=8E=E4=BB=93=E5=BA=93=E4=BF=A1=E6=81=AF=E7=BB=91=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/static/ruoyi/js/ry-ui.js | 18 ++++++++++++++++++ .../baselocationinfo/baselocationinfo.html | 7 ++++++- 2 files changed, 24 insertions(+), 1 deletion(-) 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 579e37d..f077bbb 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 @@ -544,6 +544,7 @@ var table = { } var actions = []; $.each(datas, function(index, dict) { + 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.levelName)); @@ -552,6 +553,23 @@ var table = { }); return actions.join(''); }, + + selectStoreDictLabelLocation: function(datas, value) { + if ($.common.isEmpty(datas) || $.common.isEmpty(value)) { + return ''; + } + var actions = []; + $.each(datas, function(index, dict) { + + if (dict.storeCode == ('' + value)) { + + var listClass = $.common.equals("default", dict.listClass) || $.common.isEmpty(dict.listClass) ? "" : "badge badge-" + dict.listClass; + actions.push($.common.sprintf("%s", listClass, dict.storeName)); + return false; + } + }); + return actions.join(''); + }, // 回显数据字典(字符串数组) selectDictLabels: function(datas, value, separator) { if ($.common.isEmpty(datas) || $.common.isEmpty(value)) { 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 3816f26..ae7477a 100644 --- a/ruoyi-admin/src/main/resources/templates/system/baselocationinfo/baselocationinfo.html +++ b/ruoyi-admin/src/main/resources/templates/system/baselocationinfo/baselocationinfo.html @@ -82,6 +82,7 @@ var locationinfo = [[${@dict.getType('location_info')}]]; var efficiencyDatas = [[${@baseEfficiencyLevelService.selectBaseEfficiencyLevelList(null)}]]; + var storeInfoDatas = [[${@baseStoreInfoService.selectBaseStoreInfoList(null)}]]; var prefix = ctx + "system/baselocationinfo"; @@ -115,7 +116,11 @@ }, { field: 'storeCode', - title: '所属仓库' + title: '所属仓库', + formatter: function(value, row, index) { + console.log(storeInfoDatas); + return $.table.selectStoreDictLabelLocation(storeInfoDatas, value); + } }, { field: 'locationArea',