andy 3 éve
szülő
commit
aeafa6c8be

+ 16 - 18
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warewms/ams/LotattConfigController.java

@@ -2,6 +2,7 @@ package com.ruoyi.web.controller.warewms.ams;
 
 import java.util.List;
 import javax.servlet.http.HttpServletResponse;
+
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -23,14 +24,13 @@ import com.ruoyi.common.core.page.TableDataInfo;
 
 /**
  * lotattConfigController
- * 
+ *
  * @author andy
  * @date 2022-02-15
  */
 @RestController
 @RequestMapping("/ams/config")
-public class LotattConfigController extends BaseController
-{
+public class LotattConfigController extends BaseController {
     @Autowired
     private ILotattConfigService lotattConfigService;
 
@@ -39,8 +39,7 @@ public class LotattConfigController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('ams:config:list')")
     @GetMapping("/list")
-    public TableDataInfo list(LotattConfig lotattConfig)
-    {
+    public TableDataInfo list(LotattConfig lotattConfig) {
         startPage();
         List<LotattConfig> list = lotattConfigService.selectLotattConfigList(lotattConfig);
         return getDataTable(list);
@@ -52,8 +51,7 @@ public class LotattConfigController extends BaseController
     @PreAuthorize("@ss.hasPermi('ams:config:export')")
     @Log(title = "lotattConfig", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
-    public void export(HttpServletResponse response, LotattConfig lotattConfig)
-    {
+    public void export(HttpServletResponse response, LotattConfig lotattConfig) {
         List<LotattConfig> list = lotattConfigService.selectLotattConfigList(lotattConfig);
         ExcelUtil<LotattConfig> util = new ExcelUtil<LotattConfig>(LotattConfig.class);
         util.exportExcel(response, list, "lotattConfig数据");
@@ -64,8 +62,7 @@ public class LotattConfigController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('ams:config:query')")
     @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
-    {
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
         return AjaxResult.success(lotattConfigService.selectLotattConfigById(id));
     }
 
@@ -75,8 +72,7 @@ public class LotattConfigController extends BaseController
     @PreAuthorize("@ss.hasPermi('ams:config:add')")
     @Log(title = "lotattConfig", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody LotattConfig lotattConfig)
-    {
+    public AjaxResult add(@RequestBody LotattConfig lotattConfig) {
         return toAjax(lotattConfigService.insertLotattConfig(lotattConfig));
     }
 
@@ -86,8 +82,7 @@ public class LotattConfigController extends BaseController
     @PreAuthorize("@ss.hasPermi('ams:config:edit')")
     @Log(title = "lotattConfig", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@RequestBody LotattConfig lotattConfig)
-    {
+    public AjaxResult edit(@RequestBody LotattConfig lotattConfig) {
         return toAjax(lotattConfigService.updateLotattConfig(lotattConfig));
     }
 
@@ -96,15 +91,18 @@ public class LotattConfigController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('ams:config:remove')")
     @Log(title = "lotattConfig", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
-    {
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
         return toAjax(lotattConfigService.deleteLotattConfigByIds(ids));
     }
 
     @GetMapping("/lotattConfigList")
-    public AjaxResult lotattConfigList()
-    {
+    public AjaxResult lotattConfigList() {
         return AjaxResult.success(lotattConfigService.queryLotattConfigList());
     }
+
+    @GetMapping("/lotattConfigComboDict")
+    public AjaxResult lotattConfigComboDict() {
+        return AjaxResult.success(lotattConfigService.lotattConfigComboDict());
+    }
 }

+ 7 - 0
ruoyi-ui/src/api/ams/config.js

@@ -49,3 +49,10 @@ export function lotattConfigList() {
     method: 'get'
   })
 }
+
+export function lotattConfigComboDict() {
+  return request({
+    url: '/ams/config/lotattConfigComboDict',
+    method: 'get'
+  })
+}

+ 7 - 1
ruoyi-ui/src/views/ams/config/index.vue

@@ -146,7 +146,7 @@
           <el-input v-model="form.defaultValue" placeholder="请输入默认值" />
         </el-form-item>
         <el-form-item label="备注" prop="remark">
-          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
+          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容"/>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -157,6 +157,12 @@
   </div>
 </template>
 
+<style>
+  .noteCss {
+    color: red;
+  }
+</style>
+
 <script>
 import { listConfig, getConfig, delConfig, addConfig, updateConfig } from "@/api/ams/config";
 import { inputType, requiredTag } from "@/utils/combo/dict";

+ 2 - 2
ruoyi-ui/src/views/ams/lineCall/index.vue

@@ -162,10 +162,10 @@
               <div v-if="scope.row.inputType === 'Text'">
                 <el-input v-model="scope.row.lotattValue" placeholder=""/>
               </div>
-              <div v-if="scope.row.inputType === 'Datebox'">
+              <div v-if="scope.row.inputType === 'DateBox'">
                 <el-date-picker v-model="scope.row.lotattValue" type="date" placeholder="" style="width: 100%" value-format="yyyy-MM-dd"/>
               </div>
-              <div v-if="scope.row.inputType === 'Combobox'">
+              <div v-if="scope.row.inputType === 'ComboBox'">
                 <el-select v-model="scope.row.lotattValue" placeholder="请选择" clearable size="small" style="width: 100%">
                   <el-option
                     v-for="dict in dict.type[scope.row.inputScope]"

+ 25 - 15
warewms-ams/src/main/java/com/ruoyi/ams/config/mapper/LotattConfigMapper.java

@@ -1,64 +1,74 @@
 package com.ruoyi.ams.config.mapper;
 
 import java.util.List;
+
 import com.ruoyi.ams.config.domain.LotattConfig;
 import com.ruoyi.ams.config.domain.vo.LotattConfigVO;
 
 /**
  * lotattConfigMapper接口
- * 
+ *
  * @author andy
  * @date 2022-02-15
  */
-public interface LotattConfigMapper 
-{
+public interface LotattConfigMapper {
     /**
      * 查询lotattConfig
-     * 
+     *
      * @param id lotattConfig主键
      * @return lotattConfig
      */
-     LotattConfig selectLotattConfigById(Long id);
+    LotattConfig selectLotattConfigById(Long id);
 
     /**
      * 查询lotattConfig列表
-     * 
+     *
      * @param lotattConfig lotattConfig
      * @return lotattConfig集合
      */
-     List<LotattConfig> selectLotattConfigList(LotattConfig lotattConfig);
+    List<LotattConfig> selectLotattConfigList(LotattConfig lotattConfig);
 
     /**
      * 新增lotattConfig
-     * 
+     *
      * @param lotattConfig lotattConfig
      * @return 结果
      */
-     int insertLotattConfig(LotattConfig lotattConfig);
+    int insertLotattConfig(LotattConfig lotattConfig);
 
     /**
      * 修改lotattConfig
-     * 
+     *
      * @param lotattConfig lotattConfig
      * @return 结果
      */
-     int updateLotattConfig(LotattConfig lotattConfig);
+    int updateLotattConfig(LotattConfig lotattConfig);
 
     /**
      * 删除lotattConfig
-     * 
+     *
      * @param id lotattConfig主键
      * @return 结果
      */
-     int deleteLotattConfigById(Long id);
+    int deleteLotattConfigById(Long id);
 
     /**
      * 批量删除lotattConfig
-     * 
+     *
      * @param ids 需要删除的数据主键集合
      * @return 结果
      */
-     int deleteLotattConfigByIds(Long[] ids);
+    int deleteLotattConfigByIds(Long[] ids);
 
+    /**
+     * 查询启用的批次属性
+     * @return
+     */
     List<LotattConfigVO> queryLotattConfigList();
+
+    /**
+     * 查询自定义批次属性所用到的字典表
+     * @return
+     */
+    List<String> lotattConfigComboDict();
 }

+ 11 - 1
warewms-ams/src/main/java/com/ruoyi/ams/config/service/ILotattConfigService.java

@@ -60,5 +60,15 @@ public interface ILotattConfigService
      */
      int deleteLotattConfigById(Long id);
 
-     List<LotattConfigVO> queryLotattConfigList();
+    /**
+     * 查询启用的批次属性
+     * @return
+     */
+    List<LotattConfigVO> queryLotattConfigList();
+
+    /**
+     * 查询自定义批次属性用到的字典表
+     * @return
+     */
+    List<String> lotattConfigComboDict();
 }

+ 5 - 0
warewms-ams/src/main/java/com/ruoyi/ams/config/service/impl/LotattConfigServiceImpl.java

@@ -100,4 +100,9 @@ public class LotattConfigServiceImpl implements ILotattConfigService
     public List<LotattConfigVO> queryLotattConfigList() {
         return lotattConfigMapper.queryLotattConfigList();
     }
+
+    @Override
+    public List<String> lotattConfigComboDict() {
+        return lotattConfigMapper.lotattConfigComboDict();
+    }
 }

+ 4 - 0
warewms-ams/src/main/resources/mapper/ams/LotattConfigMapper.xml

@@ -113,4 +113,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         select lotatt_id,lotatt_name,required_tag lotatt_flag, input_type, input_scope, default_value from lotatt_config
         where status = '0'
     </select>
+
+    <select id="lotattConfigComboDict" resultType="string">
+        select input_scope from lotatt_config where input_type = 'ComboBox' and input_scope is not null group by input_scope
+    </select>
 </mapper>