Bläddra i källkod

流程配置修改

andy 3 år sedan
förälder
incheckning
def8fd3939

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warewms/ams/FlowConfigHeaderController.java

@@ -75,7 +75,7 @@ public class FlowConfigHeaderController extends BaseController {
             flowConfigVO.setSkuType(headerVO.getSkuType().split(","));
         }
         if (!StringUtils.isEmpty(headerVO.getSupplier())) {
-            flowConfigVO.setSupplier(headerVO.getSupplier().split(","));
+            flowConfigVO.setSupplierRange(headerVO.getSupplier().split(","));
         }
         flowConfigVO.setLocationFrom(headerVO.getLocationFrom().split(","));
         flowConfigVO.setLocationTo(headerVO.getLocationTo().split(","));

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

@@ -25,7 +25,7 @@
       </el-form-item>
     </el-form>
 
-    <el-row :gutter="10" class="mb8">
+    <!--<el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
         <el-button
           type="primary"
@@ -69,7 +69,7 @@
         >导出</el-button>
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
-    </el-row>
+    </el-row>-->
 
     <el-table v-loading="loading" :data="configList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
@@ -114,7 +114,7 @@
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-form-item label="字段名称" prop="lotattId">
-          <el-input v-model="form.lotattId" placeholder="请输入字段名称" />
+          <el-input v-model="form.lotattId" placeholder="请输入字段名称" :disabled="true"/>
         </el-form-item>
         <el-form-item label="字段描述" prop="lotattName">
           <el-input v-model="form.lotattName" placeholder="请输入字段描述" />

+ 39 - 14
ruoyi-ui/src/views/ams/flowConfig/index.vue

@@ -109,7 +109,7 @@
 
     <!-- 添加或修改流程配置头对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+      <el-form ref="form" :model="form" :rules="rules" label-width="100px">
         <el-row>
           <el-col :span="12">
             <el-form-item label="流程名称" prop="flowName">
@@ -124,7 +124,7 @@
         </el-row>
         <el-row>
           <el-col :span="12">
-            <el-form-item label="物料种类" prop="skuType">
+            <el-form-item label="物料选择范围" prop="skuType">
               <el-select style="width: 100%" v-model="form.skuType" :multiple="true" placeholder="请选择物料种类" clearable size="small">
                 <el-option
                   v-for="dict in skuTypeCombo"
@@ -149,12 +149,12 @@
           </el-col>
         </el-row>
         <el-row>
-          <el-col :span="12">
-            <el-form-item label="数量" prop="qty">
-              <el-input v-model="form.qty" placeholder="请输入数量" type="number"/>
+          <el-col :span="8">
+            <el-form-item label="数量范围" prop="qtyRange">
+              <el-input v-model="form.qtyRange" placeholder="请输入数量范围"/>
             </el-form-item>
           </el-col>
-          <el-col :span="12">
+          <el-col :span="8">
             <el-form-item label="是否显示" prop="qtyFlag">
               <el-select style="width: 100%" v-model="form.qtyFlag" placeholder="是否显示" size="small">
                 <el-option
@@ -166,14 +166,19 @@
               </el-select>
             </el-form-item>
           </el-col>
+          <el-col :span="8">
+            <el-form-item label="默认值" prop="qty">
+              <el-input v-model="form.qty" placeholder="请输入数量" type="number"/>
+            </el-form-item>
+          </el-col>
         </el-row>
         <el-row>
-          <el-col :span="12">
-            <el-form-item label="重量" prop="weight">
-              <el-input v-model="form.weight" placeholder="请输入重量" type="number"/>
+          <el-col :span="8">
+            <el-form-item label="重量范围" prop="weightRange">
+              <el-input v-model="form.weightRange" placeholder="请输入重量范围"/>
             </el-form-item>
           </el-col>
-          <el-col :span="12">
+          <el-col :span="8">
             <el-form-item label="是否显示" prop="weightFlag">
               <el-select style="width: 100%" v-model="form.weightFlag" placeholder="是否显示" size="small">
                 <el-option
@@ -185,11 +190,16 @@
               </el-select>
             </el-form-item>
           </el-col>
+          <el-col :span="8">
+            <el-form-item label="默认值" prop="weight">
+              <el-input v-model="form.weight" placeholder="请输入重量" type="number"/>
+            </el-form-item>
+          </el-col>
         </el-row>
         <el-row>
-          <el-col :span="12">
-            <el-form-item label="供应商" prop="supplier">
-              <el-select style="width: 100%" v-model="form.supplier" :multiple="true" placeholder="请选择供应商" clearable size="small">
+          <el-col :span="8">
+            <el-form-item label="供应商范围" prop="supplierRange">
+              <el-select style="width: 100%" v-model="form.supplierRange" :multiple="true" placeholder="请选择供应商范围" clearable size="small">
                 <el-option
                   v-for="dict in supplierCombo"
                   :key="dict.supplierId"
@@ -199,7 +209,7 @@
               </el-select>
             </el-form-item>
           </el-col>
-          <el-col :span="12">
+          <el-col :span="8">
             <el-form-item label="是否显示" prop="supplierFlag">
               <el-select style="width: 100%" v-model="form.supplierFlag" placeholder="是否显示" size="small">
                 <el-option
@@ -211,6 +221,18 @@
               </el-select>
             </el-form-item>
           </el-col>
+          <el-col :span="8">
+            <el-form-item label="默认值" prop="supplier">
+              <el-select style="width: 100%" v-model="form.supplier" placeholder="请选择供应商" clearable size="small">
+                <el-option
+                  v-for="dict in supplierCombo"
+                  :key="dict.supplierId"
+                  :label="dict.supplierName"
+                  :value="dict.supplierId"
+                />
+              </el-select>
+            </el-form-item>
+          </el-col>
         </el-row>
         <el-row>
           <el-col :span="12">
@@ -393,10 +415,13 @@ export default {
         skuType: null,
         skuTypeFlag: 'Choice',
         qty: null,
+        qtyRange: null,
         qtyFlag: 'Choice',
         weight: null,
+        weightRange: null,
         weightFlag: 'Choice',
         supplier: null,
+        supplierRange: null,
         supplierFlag: 'Choice',
         locationFrom: null,
         locationFromFlag: 'Choice',

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

@@ -342,7 +342,7 @@
           this.form.locationToFlag = response.locationToFlag
           this.skuTypeCombo = response.skuList;
           this.open = true;
-          this.title = "线边呼叫";
+          this.title = row.flowName;
         });
       },
       /** 提交按钮 */

+ 33 - 0
warewms-ams/src/main/java/com/ruoyi/ams/config/domain/FlowConfigHeader.java

@@ -35,6 +35,9 @@ public class FlowConfigHeader extends BaseEntity
     @Excel(name = "数量")
     private Long qty;
 
+    @Excel(name = "数量范围")
+    private String qtyRange;
+
     /** 数量是否显示 */
     @Excel(name = "数量是否显示")
     private String qtyFlag;
@@ -43,6 +46,9 @@ public class FlowConfigHeader extends BaseEntity
     @Excel(name = "重量")
     private Long weight;
 
+    @Excel(name = "重量范围")
+    private String weightRange;
+
     /** 重量是否显示 */
     @Excel(name = "重量是否显示")
     private String weightFlag;
@@ -51,6 +57,9 @@ public class FlowConfigHeader extends BaseEntity
     @Excel(name = "供应商")
     private String supplier;
 
+    @Excel(name = "供应商范围")
+    private String supplierRange;
+
     /** 供应商是否显示 */
     @Excel(name = "供应商是否显示")
     private String supplierFlag;
@@ -231,6 +240,30 @@ public class FlowConfigHeader extends BaseEntity
         this.locationToFlag = locationToFlag;
     }
 
+    public String getQtyRange() {
+        return qtyRange;
+    }
+
+    public void setQtyRange(String qtyRange) {
+        this.qtyRange = qtyRange;
+    }
+
+    public String getWeightRange() {
+        return weightRange;
+    }
+
+    public void setWeightRange(String weightRange) {
+        this.weightRange = weightRange;
+    }
+
+    public String getSupplierRange() {
+        return supplierRange;
+    }
+
+    public void setSupplierRange(String supplierRange) {
+        this.supplierRange = supplierRange;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 33 - 3
warewms-ams/src/main/java/com/ruoyi/ams/config/domain/form/FlowConfigForm.java

@@ -36,6 +36,8 @@ public class FlowConfigForm {
      */
     private Long qty;
 
+    private String qtyRange;
+
     /**
      * 数量是否显示
      */
@@ -46,6 +48,8 @@ public class FlowConfigForm {
      */
     private Long weight;
 
+    private String weightRange;
+
     /**
      * 重量是否显示
      */
@@ -54,7 +58,9 @@ public class FlowConfigForm {
     /**
      * 供应商
      */
-    private String[] supplier;
+    private String supplier;
+
+    private String[] supplierRange;
 
     /**
      * 供应商是否显示
@@ -154,14 +160,18 @@ public class FlowConfigForm {
         this.weightFlag = weightFlag;
     }
 
-    public String[] getSupplier() {
+    public String getSupplier() {
         return supplier;
     }
 
-    public void setSupplier(String[] supplier) {
+    public void setSupplier(String supplier) {
         this.supplier = supplier;
     }
 
+    public void setSupplierRange(String[] supplierRange) {
+        this.supplierRange = supplierRange;
+    }
+
     public String getSupplierFlag() {
         return supplierFlag;
     }
@@ -225,4 +235,24 @@ public class FlowConfigForm {
     public void setLocationToFlag(String locationToFlag) {
         this.locationToFlag = locationToFlag;
     }
+
+    public String getQtyRange() {
+        return qtyRange;
+    }
+
+    public void setQtyRange(String qtyRange) {
+        this.qtyRange = qtyRange;
+    }
+
+    public String getWeightRange() {
+        return weightRange;
+    }
+
+    public void setWeightRange(String weightRange) {
+        this.weightRange = weightRange;
+    }
+
+    public String[] getSupplierRange() {
+        return supplierRange;
+    }
 }

+ 30 - 0
warewms-ams/src/main/java/com/ruoyi/ams/config/domain/vo/FlowConfigHeaderVO.java

@@ -34,6 +34,8 @@ public class FlowConfigHeaderVO extends BaseEntity {
     @Excel(name = "数量")
     private Long qty;
 
+    private String qtyRange;
+
     /** 数量是否显示 */
     @Excel(name = "数量是否显示")
     private String qtyFlag;
@@ -42,6 +44,8 @@ public class FlowConfigHeaderVO extends BaseEntity {
     @Excel(name = "重量")
     private Long weight;
 
+    private String weightRange;
+
     /** 重量是否显示 */
     @Excel(name = "重量是否显示")
     private String weightFlag;
@@ -50,6 +54,8 @@ public class FlowConfigHeaderVO extends BaseEntity {
     @Excel(name = "供应商")
     private String supplier;
 
+    private String supplierRange;
+
     /** 供应商是否显示 */
     @Excel(name = "供应商是否显示")
     private String supplierFlag;
@@ -230,6 +236,30 @@ public class FlowConfigHeaderVO extends BaseEntity {
         this.locationToFlag = locationToFlag;
     }
 
+    public String getQtyRange() {
+        return qtyRange;
+    }
+
+    public void setQtyRange(String qtyRange) {
+        this.qtyRange = qtyRange;
+    }
+
+    public String getWeightRange() {
+        return weightRange;
+    }
+
+    public void setWeightRange(String weightRange) {
+        this.weightRange = weightRange;
+    }
+
+    public String getSupplierRange() {
+        return supplierRange;
+    }
+
+    public void setSupplierRange(String supplierRange) {
+        this.supplierRange = supplierRange;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)

+ 39 - 9
warewms-ams/src/main/java/com/ruoyi/ams/config/domain/vo/FlowConfigVO.java

@@ -29,17 +29,23 @@ public class FlowConfigVO extends BaseEntity {
     /** 数量 */
     private Long qty;
 
+    private String qtyRange;
+
     /** 数量是否显示 */
     private String qtyFlag;
 
     /** 重量 */
     private Long weight;
 
+    private String weightRange;
+
     /** 重量是否显示 */
     private String weightFlag;
 
     /** 供应商 */
-    private String[] supplier;
+    private String supplier;
+
+    private String[] supplierRange;
 
     /** 供应商是否显示 */
     private String supplierFlag;
@@ -127,14 +133,6 @@ public class FlowConfigVO extends BaseEntity {
         this.weightFlag = weightFlag;
     }
 
-    public String[] getSupplier() {
-        return supplier;
-    }
-
-    public void setSupplier(String[] supplier) {
-        this.supplier = supplier;
-    }
-
     public String getSupplierFlag() {
         return supplierFlag;
     }
@@ -198,4 +196,36 @@ public class FlowConfigVO extends BaseEntity {
     public void setLocationToFlag(String locationToFlag) {
         this.locationToFlag = locationToFlag;
     }
+
+    public String getQtyRange() {
+        return qtyRange;
+    }
+
+    public void setQtyRange(String qtyRange) {
+        this.qtyRange = qtyRange;
+    }
+
+    public String getWeightRange() {
+        return weightRange;
+    }
+
+    public void setWeightRange(String weightRange) {
+        this.weightRange = weightRange;
+    }
+
+    public String getSupplier() {
+        return supplier;
+    }
+
+    public void setSupplier(String supplier) {
+        this.supplier = supplier;
+    }
+
+    public String[] getSupplierRange() {
+        return supplierRange;
+    }
+
+    public void setSupplierRange(String[] supplierRange) {
+        this.supplierRange = supplierRange;
+    }
 }

+ 4 - 4
warewms-ams/src/main/java/com/ruoyi/ams/config/service/impl/FlowConfigHeaderServiceImpl.java

@@ -184,8 +184,8 @@ public class FlowConfigHeaderServiceImpl implements IFlowConfigHeaderService {
         if (flowConfigForm.getSkuType() != null) {
             flowConfigHeader.setSkuType(String.join(",", flowConfigForm.getSkuType()));
         }
-        if (flowConfigForm.getSupplier() != null) {
-            flowConfigHeader.setSupplier(String.join(",", flowConfigForm.getSupplier()));
+        if (flowConfigForm.getSupplierRange() != null) {
+            flowConfigHeader.setSupplierRange(String.join(",", flowConfigForm.getSupplier()));
         }
         if (flowConfigForm.getLocationFrom() != null) {
             flowConfigHeader.setLocationFrom(String.join(",", flowConfigForm.getLocationFrom()));
@@ -212,7 +212,7 @@ public class FlowConfigHeaderServiceImpl implements IFlowConfigHeaderService {
                 headerLocationTo.add(header.getLocationTo() + ",");
             }
         }
-        if (headerLocationFrom.size() > 0) {
+        /*if (headerLocationFrom.size() > 0) {
             List<String> currentLocationFrom = Arrays.asList(flowConfigForm.getLocationFrom());
             if (headerLocationFrom.containsAll(currentLocationFrom)) {
                 return AjaxResult.error("起始区域不能重复");
@@ -223,7 +223,7 @@ public class FlowConfigHeaderServiceImpl implements IFlowConfigHeaderService {
             if (headerLocationTo.containsAll(currentLocationTo)) {
                 return AjaxResult.error("目标区域不能重复");
             }
-        }
+        }*/
         flowConfigHeader.setCreateBy(loginUser.getUsername());
         flowConfigHeader.setCreateTime(new Date());
         flowConfigHeaderMapper.insertFlowConfigHeader(flowConfigHeader);

+ 13 - 0
warewms-ams/src/main/resources/mapper/ams/FlowConfigHeaderMapper.xml

@@ -10,10 +10,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="skuType"    column="sku_type"    />
         <result property="skuTypeFlag"    column="sku_type_flag"    />
         <result property="qty"    column="qty"    />
+        <result property="qtyRange"    column="qty_range"    />
         <result property="qtyFlag"    column="qty_flag"    />
         <result property="weight"    column="weight"    />
+        <result property="weightRange"    column="weight_range"    />
         <result property="weightFlag"    column="weight_flag"    />
         <result property="supplier"    column="supplier"    />
+        <result property="supplierRange"    column="supplier_range"    />
         <result property="supplierFlag"    column="supplier_flag"    />
         <result property="locationFrom"    column="location_from"    />
         <result property="locationFromFlag"    column="location_from_flag"    />
@@ -34,10 +37,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="skuType"    column="sku_type"    />
         <result property="skuTypeFlag"    column="sku_type_flag"    />
         <result property="qty"    column="qty"    />
+        <result property="qtyRange"    column="qty_range"    />
         <result property="qtyFlag"    column="qty_flag"    />
         <result property="weight"    column="weight"    />
+        <result property="weightRange"    column="weight_range"    />
         <result property="weightFlag"    column="weight_flag"    />
         <result property="supplier"    column="supplier"    />
+        <result property="supplierRange"    column="supplier_range"    />
         <result property="supplierFlag"    column="supplier_flag"    />
         <result property="locationFrom"    column="location_from"    />
         <result property="locationFromFlag"    column="location_from_flag"    />
@@ -99,6 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     
     <select id="selectFlowConfigHeaderById" parameterType="Long" resultMap="FlowConfigHeaderFlowConfigDetailsResult">
         select a.id, a.flow_name, a.sku_type, a.sku_type_flag, a.qty, a.qty_flag, a.weight, a.weight_flag, a.supplier, a.supplier_flag, a.location_from,a.location_from_flag, a.location_from_device, a.location_to,a.location_to_flag, a.location_to_device, a.create_by, a.create_time, a.update_by, a.update_time, a.remark,
+        a.qty_range,a.weight_range,a.supplier_range,
  b.id as sub_id, b.header_id as sub_header_id, b.lotatt_id as sub_lotatt_id,cf.lotatt_name as sub_lotatt_name, b.lotatt_flag as sub_lotatt_flag, b.create_by as sub_create_by, b.create_time as sub_create_time, b.update_by as sub_update_by, b.update_time as sub_update_time, b.remark as sub_remark
         from flow_config_header a
         left join flow_config_details b on b.header_id = a.id
@@ -113,10 +120,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="skuType != null">sku_type,</if>
             <if test="skuTypeFlag != null">sku_type_flag,</if>
             <if test="qty != null">qty,</if>
+            <if test="qtyRange != null">qty_range,</if>
             <if test="qtyFlag != null">qty_flag,</if>
             <if test="weight != null">weight,</if>
+            <if test="weightRange != null">weight_range,</if>
             <if test="weightFlag != null">weight_flag,</if>
             <if test="supplier != null">supplier,</if>
+            <if test="supplierRange != null">supplier_range,</if>
             <if test="supplierFlag != null">supplier_flag,</if>
             <if test="locationFrom != null">location_from,</if>
             <if test="locationFromFlag != null">location_from_flag,</if>
@@ -135,10 +145,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="skuType != null">#{skuType},</if>
             <if test="skuTypeFlag != null">#{skuTypeFlag},</if>
             <if test="qty != null">#{qty},</if>
+            <if test="qtyRange != null">#{qtyRange},</if>
             <if test="qtyFlag != null">#{qtyFlag},</if>
             <if test="weight != null">#{weight},</if>
+            <if test="weightRange != null">#{weightRange},</if>
             <if test="weightFlag != null">#{weightFlag},</if>
             <if test="supplier != null">#{supplier},</if>
+            <if test="supplierRange != null">#{supplierRange},</if>
             <if test="supplierFlag != null">#{supplierFlag},</if>
             <if test="locationFrom != null">#{locationFrom},</if>
             <if test="locationFromFlag != null">#{locationFromFlag},</if>