Commit 2d5294d075ccb380892ac2d759e0218e3e37897a

Authored by 曾湘平
1 parent 365393f7

锁定站台页面优化

ant-design-vue-jeecg/src/views/system/lockStation/LockStationList.vue
@@ -162,7 +162,7 @@ @@ -162,7 +162,7 @@
162 { 162 {
163 title:'状态', 163 title:'状态',
164 align:"center", 164 align:"center",
165 - dataIndex: 'status' 165 + dataIndex: 'status_dictText'
166 }, 166 },
167 { 167 {
168 title:'库区', 168 title:'库区',
ant-design-vue-jeecg/src/views/system/lockStation/modules/LockStationForm.vue
@@ -10,22 +10,32 @@ @@ -10,22 +10,32 @@
10 </a-col> 10 </a-col>
11 <a-col :span="24"> 11 <a-col :span="24">
12 <a-form-model-item label="站台" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="code"> 12 <a-form-model-item label="站台" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="code">
13 - <a-input v-model="model.code" placeholder="请输入站台" ></a-input>  
14 - </a-form-model-item>  
15 - </a-col>  
16 - <a-col :span="24">  
17 - <a-form-model-item label="任务ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="taskId">  
18 - <a-input v-model="model.taskId" placeholder="请输入任务ID" ></a-input> 13 + <j-search-select-tag
  14 + placeholder="请选择入库口"
  15 + v-model="model.fromPort"
  16 + dict="port,name,code,type !='2'"
  17 + :pageSize="5"
  18 + :async="true">
  19 + </j-search-select-tag>
19 </a-form-model-item> 20 </a-form-model-item>
20 </a-col> 21 </a-col>
21 <a-col :span="24"> 22 <a-col :span="24">
22 <a-form-model-item label="状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status"> 23 <a-form-model-item label="状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status">
23 - <a-input-number v-model="model.status" placeholder="请输入状态" style="width: 100%" /> 24 + <j-dict-select-tag v-model="model.status" title="状态" dictCode="port_lock_status" placeholder="请选择状态"/>
24 </a-form-model-item> 25 </a-form-model-item>
25 </a-col> 26 </a-col>
26 <a-col :span="24"> 27 <a-col :span="24">
27 <a-form-model-item label="库区" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="zoneCode"> 28 <a-form-model-item label="库区" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="zoneCode">
28 - <a-input v-model="model.zoneCode" placeholder="请输入库区" ></a-input> 29 + <a-select
  30 + show-search
  31 + placeholder="请选择库区"
  32 + option-filter-prop="children"
  33 + v-model="model.zoneCode">
  34 + <a-select-option v-for="item in zoneList" :key="item.name" :value="item.code">{{
  35 + item.name
  36 + }}
  37 + </a-select-option>
  38 + </a-select>
29 </a-form-model-item> 39 </a-form-model-item>
30 </a-col> 40 </a-col>
31 </a-row> 41 </a-row>
@@ -38,6 +48,7 @@ @@ -38,6 +48,7 @@
38 48
39 import { httpAction, getAction } from '@/api/manage' 49 import { httpAction, getAction } from '@/api/manage'
40 import { validateDuplicateValue } from '@/utils/util' 50 import { validateDuplicateValue } from '@/utils/util'
  51 + import {getZoneList} from '@/api/api'
41 52
42 export default { 53 export default {
43 name: 'LockStationForm', 54 name: 'LockStationForm',
@@ -64,13 +75,20 @@ @@ -64,13 +75,20 @@
64 sm: { span: 16 }, 75 sm: { span: 16 },
65 }, 76 },
66 confirmLoading: false, 77 confirmLoading: false,
67 -validatorRules: {  
68 -}, 78 + validatorRules: {
  79 + code: [
  80 + {required: true, message: '请选择站台!'},
  81 + ],
  82 + status: [
  83 + {required: true, message: '请选择状态!'},
  84 + ],
  85 + },
69 url: { 86 url: {
70 add: "/lock/lockStation/add", 87 add: "/lock/lockStation/add",
71 edit: "/lock/lockStation/edit", 88 edit: "/lock/lockStation/edit",
72 queryById: "/lock/lockStation/queryById" 89 queryById: "/lock/lockStation/queryById"
73 - } 90 + },
  91 + zoneList: []
74 } 92 }
75 }, 93 },
76 computed: { 94 computed: {
@@ -81,6 +99,7 @@ validatorRules: { @@ -81,6 +99,7 @@ validatorRules: {
81 created () { 99 created () {
82 //备份model原始值 100 //备份model原始值
83 this.modelDefault = JSON.parse(JSON.stringify(this.model)); 101 this.modelDefault = JSON.parse(JSON.stringify(this.model));
  102 + this.loadFrom();
84 }, 103 },
85 methods: { 104 methods: {
86 add () { 105 add () {
@@ -90,6 +109,13 @@ validatorRules: { @@ -90,6 +109,13 @@ validatorRules: {
90 this.model = Object.assign({}, record); 109 this.model = Object.assign({}, record);
91 this.visible = true; 110 this.visible = true;
92 }, 111 },
  112 + loadFrom() {
  113 + getZoneList().then((res) => {
  114 + if (res.success) {
  115 + this.zoneList = res.result
  116 + }
  117 + });
  118 + },
93 submitForm () { 119 submitForm () {
94 const that = this; 120 const that = this;
95 // 触发表单验证 121 // 触发表单验证
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/lockStation/entity/LockStation.java
@@ -44,7 +44,7 @@ public class LockStation implements Serializable { @@ -44,7 +44,7 @@ public class LockStation implements Serializable {
44 @ApiModelProperty(value = "任务ID") 44 @ApiModelProperty(value = "任务ID")
45 private String taskId; 45 private String taskId;
46 /**状态*/ 46 /**状态*/
47 - @Excel(name = "状态", width = 15) 47 + @Excel(name = "状态", width = 15, dicCode = "port_lock_status")
48 @Dict(dicCode = "port_lock_status") 48 @Dict(dicCode = "port_lock_status")
49 @ApiModelProperty(value = "状态") 49 @ApiModelProperty(value = "状态")
50 private Integer status; 50 private Integer status;