Commit 2d5294d075ccb380892ac2d759e0218e3e37897a

Authored by 曾湘平
1 parent 365393f7

锁定站台页面优化

ant-design-vue-jeecg/src/views/system/lockStation/LockStationList.vue
... ... @@ -162,7 +162,7 @@
162 162 {
163 163 title:'状态',
164 164 align:"center",
165   - dataIndex: 'status'
  165 + dataIndex: 'status_dictText'
166 166 },
167 167 {
168 168 title:'库区',
... ...
ant-design-vue-jeecg/src/views/system/lockStation/modules/LockStationForm.vue
... ... @@ -10,22 +10,32 @@
10 10 </a-col>
11 11 <a-col :span="24">
12 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 20 </a-form-model-item>
20 21 </a-col>
21 22 <a-col :span="24">
22 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 25 </a-form-model-item>
25 26 </a-col>
26 27 <a-col :span="24">
27 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 39 </a-form-model-item>
30 40 </a-col>
31 41 </a-row>
... ... @@ -38,6 +48,7 @@
38 48  
39 49 import { httpAction, getAction } from '@/api/manage'
40 50 import { validateDuplicateValue } from '@/utils/util'
  51 + import {getZoneList} from '@/api/api'
41 52  
42 53 export default {
43 54 name: 'LockStationForm',
... ... @@ -64,13 +75,20 @@
64 75 sm: { span: 16 },
65 76 },
66 77 confirmLoading: false,
67   -validatorRules: {
68   -},
  78 + validatorRules: {
  79 + code: [
  80 + {required: true, message: '请选择站台!'},
  81 + ],
  82 + status: [
  83 + {required: true, message: '请选择状态!'},
  84 + ],
  85 + },
69 86 url: {
70 87 add: "/lock/lockStation/add",
71 88 edit: "/lock/lockStation/edit",
72 89 queryById: "/lock/lockStation/queryById"
73   - }
  90 + },
  91 + zoneList: []
74 92 }
75 93 },
76 94 computed: {
... ... @@ -81,6 +99,7 @@ validatorRules: {
81 99 created () {
82 100 //备份model原始值
83 101 this.modelDefault = JSON.parse(JSON.stringify(this.model));
  102 + this.loadFrom();
84 103 },
85 104 methods: {
86 105 add () {
... ... @@ -90,6 +109,13 @@ validatorRules: {
90 109 this.model = Object.assign({}, record);
91 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 119 submitForm () {
94 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 44 @ApiModelProperty(value = "任务ID")
45 45 private String taskId;
46 46 /**状态*/
47   - @Excel(name = "状态", width = 15)
  47 + @Excel(name = "状态", width = 15, dicCode = "port_lock_status")
48 48 @Dict(dicCode = "port_lock_status")
49 49 @ApiModelProperty(value = "状态")
50 50 private Integer status;
... ...