Commit df60273341e270f1a662733eae4223c8d6404960
1 parent
10a82eaa
若干页面基础数据下拉匹配
Signed-off-by: TanYibin <5491541@qq.com>
Showing
8 changed files
with
163 additions
and
21 deletions
ant-design-vue-jeecg/src/views/system/config/ContainerTypeList.vue
... | ... | @@ -82,6 +82,18 @@ |
82 | 82 | class="j-table-force-nowrap" |
83 | 83 | @change="handleTableChange" |
84 | 84 | > |
85 | + <span slot="companyCode" slot-scope="companyCode"> | |
86 | + <a-tag :key="companyCode" color=blue> | |
87 | + {{ solutionCompany(companyCode) }} | |
88 | + </a-tag> | |
89 | + </span> | |
90 | + | |
91 | + <span slot="locationTypes" slot-scope="locationTypes" > | |
92 | + <a-tag v-for="locationType in locationTypes" :key="locationType" color=pink> | |
93 | + {{ solutionLocationType(locationType) }} | |
94 | + </a-tag> | |
95 | + </span> | |
96 | + | |
85 | 97 | <template slot="htmlSlot" slot-scope="text"> |
86 | 98 | <div v-html="text"></div> |
87 | 99 | </template> |
... | ... | @@ -130,6 +142,7 @@ import '@/assets/less/TableExpand.less' |
130 | 142 | import { mixinDevice } from '@/utils/mixin' |
131 | 143 | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
132 | 144 | import ContainerTypeModal from './modules/ContainerTypeModal' |
145 | +import {getCompanyList, getLocationTypeList } from '@/api/api' | |
133 | 146 | |
134 | 147 | export default { |
135 | 148 | name: 'ContainerTypeList', |
... | ... | @@ -139,6 +152,8 @@ export default { |
139 | 152 | }, |
140 | 153 | data() { |
141 | 154 | return { |
155 | + companyList: [], | |
156 | + locationTypeList: [], | |
142 | 157 | description: '容器类型管理页面', |
143 | 158 | // 表头 |
144 | 159 | columns: [ |
... | ... | @@ -163,14 +178,18 @@ export default { |
163 | 178 | dataIndex: 'name' |
164 | 179 | }, |
165 | 180 | { |
166 | - title: '货主编码', | |
181 | + title: '货主', | |
167 | 182 | align: 'center', |
168 | - dataIndex: 'companyCode' | |
183 | + dataIndex: 'companyCode', | |
184 | + key: 'companyCode', | |
185 | + scopedSlots: {customRender: 'companyCode'} | |
169 | 186 | }, |
170 | 187 | { |
171 | 188 | title: '绑定的库位类型', |
172 | 189 | align: 'center', |
173 | - dataIndex: 'locationType' | |
190 | + dataIndex: 'locationTypes', | |
191 | + key: 'locationTypes', | |
192 | + scopedSlots: {customRender: 'locationTypes'} | |
174 | 193 | }, |
175 | 194 | { |
176 | 195 | title: '长', |
... | ... | @@ -239,6 +258,7 @@ export default { |
239 | 258 | }, |
240 | 259 | created() { |
241 | 260 | this.getSuperFieldList() |
261 | + this.loadFrom() | |
242 | 262 | }, |
243 | 263 | computed: { |
244 | 264 | importExcelUrl: function() { |
... | ... | @@ -247,6 +267,38 @@ export default { |
247 | 267 | }, |
248 | 268 | methods: { |
249 | 269 | initDictConfig() {}, |
270 | + loadFrom() { | |
271 | + getCompanyList().then((res) => { | |
272 | + if (res.success) { | |
273 | + this.companyList = res.result | |
274 | + } | |
275 | + }); | |
276 | + getLocationTypeList().then(res => { | |
277 | + if (res.success) { | |
278 | + this.locationTypeList = res.result | |
279 | + } | |
280 | + }); | |
281 | + }, | |
282 | + solutionCompany(value) { | |
283 | + var actions = [] | |
284 | + Object.keys(this.companyList).some((key) => { | |
285 | + if (this.companyList[key].code == ('' + value)) { | |
286 | + actions.push(this.companyList[key].name) | |
287 | + return true | |
288 | + } | |
289 | + }) | |
290 | + return actions.join('') | |
291 | + }, | |
292 | + solutionLocationType(value) { | |
293 | + var actions = [] | |
294 | + Object.keys(this.locationTypeList).some(key => { | |
295 | + if (this.locationTypeList[key].code == '' + value) { | |
296 | + actions.push(this.locationTypeList[key].name) | |
297 | + return true | |
298 | + } | |
299 | + }) | |
300 | + return actions.join('') | |
301 | + }, | |
250 | 302 | getSuperFieldList() { |
251 | 303 | let fieldList = [] |
252 | 304 | fieldList.push({ type: 'string', value: 'code', text: '编码', dictCode: '' }) |
... | ... |
ant-design-vue-jeecg/src/views/system/config/ZoneList.vue
... | ... | @@ -82,8 +82,8 @@ |
82 | 82 | class="j-table-force-nowrap" |
83 | 83 | @change="handleTableChange" |
84 | 84 | > |
85 | - <span slot="locationTypeCode" slot-scope="locationTypeCode"> | |
86 | - <a-tag :key="locationTypeCode" color="pink"> | |
85 | + <span slot="locationTypeCodes" slot-scope="locationTypeCodes" > | |
86 | + <a-tag v-for="locationTypeCode in locationTypeCodes" :key="locationTypeCode" color=pink> | |
87 | 87 | {{ solutionLocationType(locationTypeCode) }} |
88 | 88 | </a-tag> |
89 | 89 | </span> |
... | ... | @@ -173,7 +173,9 @@ export default { |
173 | 173 | { |
174 | 174 | title: '包含库位类型', |
175 | 175 | align: 'center', |
176 | - dataIndex: 'locationTypeCode' | |
176 | + dataIndex: 'locationTypeCodes', | |
177 | + key: 'locationTypeCodes', | |
178 | + scopedSlots: {customRender: 'locationTypeCodes'} | |
177 | 179 | }, |
178 | 180 | { |
179 | 181 | title: '创建人', |
... | ... | @@ -254,7 +256,7 @@ export default { |
254 | 256 | } |
255 | 257 | }) |
256 | 258 | return actions.join('') |
257 | - } | |
259 | + }, | |
258 | 260 | } |
259 | 261 | } |
260 | 262 | </script> |
... | ... |
ant-design-vue-jeecg/src/views/system/config/modules/ContainerForm.vue
... | ... | @@ -9,11 +9,9 @@ |
9 | 9 | show-search |
10 | 10 | placeholder="请选择容器类型" |
11 | 11 | option-filter-prop="children" |
12 | - | |
13 | 12 | v-model="model.containerTypeCode"> |
14 | - <a-select-option v-for="item in containerTypeList" :key="item.name" :value="item.code">{{ | |
15 | - item.name | |
16 | - }} | |
13 | + <a-select-option v-for="item in containerTypeList" :key="item.name" :value="item.code"> | |
14 | + {{ item.name }} | |
17 | 15 | </a-select-option> |
18 | 16 | </a-select> |
19 | 17 | </a-form-model-item> |
... | ... |
ant-design-vue-jeecg/src/views/system/config/modules/ContainerTypeForm.vue
... | ... | @@ -14,13 +14,25 @@ |
14 | 14 | </a-form-model-item> |
15 | 15 | </a-col> |
16 | 16 | <a-col :span="24"> |
17 | - <a-form-model-item label="货主编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyCode"> | |
18 | - <a-input v-model="model.companyCode" placeholder="请输入货主编码"></a-input> | |
17 | + <a-form-model-item label="货主" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyCode"> | |
18 | + <a-select | |
19 | + show-search | |
20 | + placeholder="请选择货主编码" | |
21 | + option-filter-prop="children" | |
22 | + v-model="model.companyCode"> | |
23 | + <a-select-option v-for="item in companyList" :key="item.name" :value="item.code"> | |
24 | + {{ item.name }} | |
25 | + </a-select-option> | |
26 | + </a-select> | |
19 | 27 | </a-form-model-item> |
20 | 28 | </a-col> |
21 | 29 | <a-col :span="24"> |
22 | 30 | <a-form-model-item label="绑定的库位类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="locationType"> |
23 | - <a-input v-model="model.locationType" placeholder="请输入绑定的库位类型"></a-input> | |
31 | + <j-multi-select-tag | |
32 | + v-model="model.locationType" | |
33 | + :options="locationTypeOptions" | |
34 | + placeholder="请选择库位类型"> | |
35 | + </j-multi-select-tag> | |
24 | 36 | </a-form-model-item> |
25 | 37 | </a-col> |
26 | 38 | <a-col :span="24"> |
... | ... | @@ -58,6 +70,8 @@ |
58 | 70 | |
59 | 71 | import {httpAction, getAction} from '@/api/manage' |
60 | 72 | import {validateDuplicateValue} from '@/utils/util' |
73 | +import {getCompanyList, getLocationTypeList} from '@/api/api' | |
74 | +import {disabledAuthFilter} from "@/utils/authFilter" | |
61 | 75 | |
62 | 76 | export default { |
63 | 77 | name: 'ContainerTypeForm', |
... | ... | @@ -73,6 +87,8 @@ export default { |
73 | 87 | data() { |
74 | 88 | return { |
75 | 89 | model: {}, |
90 | + companyList: [], | |
91 | + locationTypeOptions: [], | |
76 | 92 | labelCol: { |
77 | 93 | xs: {span: 24}, |
78 | 94 | sm: {span: 5}, |
... | ... | @@ -107,9 +123,28 @@ export default { |
107 | 123 | }, |
108 | 124 | created() { |
109 | 125 | //备份model原始值 |
126 | + this.loadFrom(); | |
110 | 127 | this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
111 | 128 | }, |
112 | 129 | methods: { |
130 | + loadFrom() { | |
131 | + getCompanyList().then((res) => { | |
132 | + if (res.success) { | |
133 | + this.companyList = res.result | |
134 | + } | |
135 | + }); | |
136 | + getLocationTypeList().then((res) => { | |
137 | + if (res.success) { | |
138 | + this.locationTypeOptions = res.result.map((item, index, arr) => { | |
139 | + return {label: item.name, value: item.code} | |
140 | + }) | |
141 | + } | |
142 | + }); | |
143 | + }, | |
144 | + // 禁用异步获取API数据 | |
145 | + isDisabledAuth(code) { | |
146 | + return disabledAuthFilter(code); | |
147 | + }, | |
113 | 148 | add() { |
114 | 149 | this.edit(this.modelDefault); |
115 | 150 | }, |
... | ... |
ant-design-vue-jeecg/src/views/system/config/modules/ZoneForm.vue
... | ... | @@ -15,7 +15,7 @@ |
15 | 15 | </a-col> |
16 | 16 | <a-col :span="24"> |
17 | 17 | <a-form-model-item label="包含库位类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="locationTypeCode"> |
18 | - <a-input v-model="model.locationTypeCode" placeholder="请输入库位类型编码"></a-input> | |
18 | + <a-input v-model="model.locationTypeCode" placeholder="请输入包含库位类型编码,用英文逗号分割"></a-input> | |
19 | 19 | </a-form-model-item> |
20 | 20 | </a-col> |
21 | 21 | </a-row> |
... | ... |
ant-design-vue-jeecg/src/views/user/LoginSelectTenant.vue
... | ... | @@ -100,12 +100,12 @@ export default { |
100 | 100 | let multi_depart = loginResult.multi_depart |
101 | 101 | //0:无部门 1:一个部门 2:多个部门 |
102 | 102 | if (multi_depart == 0) { |
103 | - this.$notification.warn({ | |
104 | - message: '提示', | |
105 | - description: `您尚未归属部门,请确认账号信息`, | |
106 | - duration: 3 | |
107 | - }); | |
108 | - this.isMultiDepart = false | |
103 | + // this.$notification.warn({ | |
104 | + // message: '提示', | |
105 | + // description: `您尚未归属部门,请确认账号信息`, | |
106 | + // duration: 3 | |
107 | + // }); | |
108 | + // this.isMultiDepart = false | |
109 | 109 | } else if (multi_depart == 2) { |
110 | 110 | this.visible = true |
111 | 111 | this.isMultiDepart = true |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/containerType/entity/ContainerType.java
... | ... | @@ -2,9 +2,12 @@ package org.jeecg.modules.wms.config.containerType.entity; |
2 | 2 | |
3 | 3 | import java.io.Serializable; |
4 | 4 | import java.io.UnsupportedEncodingException; |
5 | +import java.util.Arrays; | |
5 | 6 | import java.util.Date; |
7 | +import java.util.List; | |
6 | 8 | import java.math.BigDecimal; |
7 | 9 | import com.baomidou.mybatisplus.annotation.IdType; |
10 | +import com.baomidou.mybatisplus.annotation.TableField; | |
8 | 11 | import com.baomidou.mybatisplus.annotation.TableId; |
9 | 12 | import com.baomidou.mybatisplus.annotation.TableName; |
10 | 13 | import lombok.Data; |
... | ... | @@ -35,67 +38,94 @@ public class ContainerType implements Serializable { |
35 | 38 | @TableId(type = IdType.AUTO) |
36 | 39 | @ApiModelProperty(value = "主键") |
37 | 40 | private Integer id; |
41 | + | |
38 | 42 | /** 编码 */ |
39 | 43 | @Excel(name = "编码", width = 15) |
40 | 44 | @ApiModelProperty(value = "编码") |
41 | 45 | private String code; |
46 | + | |
42 | 47 | /** 名称 */ |
43 | 48 | @Excel(name = "名称", width = 15) |
44 | 49 | @ApiModelProperty(value = "名称") |
45 | 50 | private String name; |
51 | + | |
46 | 52 | /** 仓库编码 */ |
47 | 53 | @Excel(name = "仓库编码", width = 15) |
48 | 54 | @ApiModelProperty(value = "仓库编码") |
49 | 55 | private String warehouseCode; |
56 | + | |
50 | 57 | /** 货主编码 */ |
51 | 58 | @Excel(name = "货主编码", width = 15) |
52 | 59 | @ApiModelProperty(value = "货主编码") |
53 | 60 | private String companyCode; |
61 | + | |
54 | 62 | /** 绑定的库位类型 */ |
55 | 63 | @Excel(name = "绑定的库位类型", width = 15) |
56 | 64 | @ApiModelProperty(value = "绑定的库位类型") |
57 | 65 | private String locationType; |
66 | + | |
67 | + public void setLocationType(String locationType) { | |
68 | + if (locationType != null) { | |
69 | + this.locationType = locationType; | |
70 | + this.locationTypes = Arrays.asList(locationType.split(",")); | |
71 | + } | |
72 | + } | |
73 | + | |
74 | + @TableField(exist = false) | |
75 | + private List<String> locationTypes; | |
76 | + | |
58 | 77 | /** 长 */ |
59 | 78 | @Excel(name = "长", width = 15) |
60 | 79 | @ApiModelProperty(value = "长") |
61 | 80 | private Integer length; |
81 | + | |
62 | 82 | /** 宽 */ |
63 | 83 | @Excel(name = "宽", width = 15) |
64 | 84 | @ApiModelProperty(value = "宽") |
65 | 85 | private Integer width; |
86 | + | |
66 | 87 | /** 高 */ |
67 | 88 | @Excel(name = "高", width = 15) |
68 | 89 | @ApiModelProperty(value = "高") |
69 | 90 | private Integer height; |
91 | + | |
70 | 92 | /** 空容器重量 */ |
71 | 93 | @Excel(name = "空容器重量", width = 15) |
72 | 94 | @ApiModelProperty(value = "空容器重量") |
73 | 95 | private Integer emptyweight; |
96 | + | |
74 | 97 | /** 容器最大承重 */ |
75 | 98 | @Excel(name = "容器最大承重", width = 15) |
76 | 99 | @ApiModelProperty(value = "容器最大承重") |
77 | 100 | private Integer maxweight; |
101 | + | |
78 | 102 | /** 备用字段1 */ |
79 | 103 | @Excel(name = "备用字段1", width = 15) |
80 | 104 | @ApiModelProperty(value = "备用字段1") |
81 | 105 | private String userdef1; |
106 | + | |
82 | 107 | /** 备用字段2 */ |
83 | 108 | @Excel(name = "备用字段2", width = 15) |
84 | 109 | @ApiModelProperty(value = "备用字段2") |
85 | 110 | private String userdef2; |
111 | + | |
86 | 112 | /** 备用字段3 */ |
87 | 113 | @Excel(name = "备用字段3", width = 15) |
88 | 114 | @ApiModelProperty(value = "备用字段3") |
89 | 115 | private String userdef3; |
116 | + | |
90 | 117 | /** 创建人 */ |
91 | 118 | @ApiModelProperty(value = "创建人") |
92 | 119 | private String createBy; |
120 | + | |
93 | 121 | /** 创建日期 */ |
94 | 122 | @ApiModelProperty(value = "创建日期") |
95 | 123 | private Date createTime; |
124 | + | |
96 | 125 | /** 更新人 */ |
97 | 126 | @ApiModelProperty(value = "更新人") |
98 | 127 | private String updateBy; |
128 | + | |
99 | 129 | /** 更新日期 */ |
100 | 130 | @ApiModelProperty(value = "更新日期") |
101 | 131 | private Date updateTime; |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/zone/entity/Zone.java
... | ... | @@ -2,9 +2,12 @@ package org.jeecg.modules.wms.config.zone.entity; |
2 | 2 | |
3 | 3 | import java.io.Serializable; |
4 | 4 | import java.io.UnsupportedEncodingException; |
5 | +import java.util.Arrays; | |
5 | 6 | import java.util.Date; |
7 | +import java.util.List; | |
6 | 8 | import java.math.BigDecimal; |
7 | 9 | import com.baomidou.mybatisplus.annotation.IdType; |
10 | +import com.baomidou.mybatisplus.annotation.TableField; | |
8 | 11 | import com.baomidou.mybatisplus.annotation.TableId; |
9 | 12 | import com.baomidou.mybatisplus.annotation.TableName; |
10 | 13 | import lombok.Data; |
... | ... | @@ -35,46 +38,68 @@ public class Zone implements Serializable { |
35 | 38 | @TableId(type = IdType.AUTO) |
36 | 39 | @ApiModelProperty(value = "主键") |
37 | 40 | private Integer id; |
41 | + | |
38 | 42 | /** 编码 */ |
39 | 43 | @Excel(name = "编码", width = 15) |
40 | 44 | @ApiModelProperty(value = "编码") |
41 | 45 | private String code; |
46 | + | |
42 | 47 | /** 名称 */ |
43 | 48 | @Excel(name = "名称", width = 15) |
44 | 49 | @ApiModelProperty(value = "名称") |
45 | 50 | private String name; |
51 | + | |
46 | 52 | /** 仓库编码 */ |
47 | 53 | @Excel(name = "仓库编码", width = 15) |
48 | 54 | @ApiModelProperty(value = "仓库编码") |
49 | 55 | private String warehouseCode; |
56 | + | |
50 | 57 | /** 货主编码 */ |
51 | 58 | @Excel(name = "货主编码", width = 15) |
52 | 59 | @ApiModelProperty(value = "货主编码") |
53 | 60 | private String companyCode; |
61 | + | |
54 | 62 | /** 库位类型 */ |
55 | 63 | @Excel(name = "库位类型", width = 15) |
56 | 64 | @ApiModelProperty(value = "库位类型") |
57 | 65 | private String locationTypeCode; |
66 | + | |
67 | + public void setLocationTypeCode(String locationTypeCode) { | |
68 | + if (locationTypeCode != null) { | |
69 | + this.locationTypeCode = locationTypeCode; | |
70 | + this.locationTypeCodes = Arrays.asList(locationTypeCode.split(",")); | |
71 | + } | |
72 | + } | |
73 | + | |
74 | + @TableField(exist = false) | |
75 | + private List<String> locationTypeCodes; | |
76 | + | |
58 | 77 | /** 创建人 */ |
59 | 78 | @ApiModelProperty(value = "创建人") |
60 | 79 | private String createBy; |
80 | + | |
61 | 81 | /** 创建日期 */ |
62 | 82 | @ApiModelProperty(value = "创建日期") |
63 | 83 | private Date createTime; |
84 | + | |
64 | 85 | /** 更新人 */ |
65 | 86 | @ApiModelProperty(value = "更新人") |
66 | 87 | private String updateBy; |
88 | + | |
67 | 89 | /** 更新日期 */ |
68 | 90 | @ApiModelProperty(value = "更新日期") |
69 | 91 | private Date updateTime; |
92 | + | |
70 | 93 | /** 自定义字段1 */ |
71 | 94 | @Excel(name = "自定义字段1", width = 15) |
72 | 95 | @ApiModelProperty(value = "自定义字段1") |
73 | 96 | private String userdef1; |
97 | + | |
74 | 98 | /** 自定义字段2 */ |
75 | 99 | @Excel(name = "自定义字段2", width = 15) |
76 | 100 | @ApiModelProperty(value = "自定义字段2") |
77 | 101 | private String userdef2; |
102 | + | |
78 | 103 | /** 自定义字段3 */ |
79 | 104 | @Excel(name = "自定义字段3", width = 15) |
80 | 105 | @ApiModelProperty(value = "自定义字段3") |
... | ... |