|
1
2
3
4
5
6
7
8
9
10
|
<template>
<!-- 定义在这里的参数都是不可在外部覆盖的,防止出现问题 -->
<j-select-biz-component
:value="value"
:ellipsisLength="25"
:listUrl="url.list"
:columns="columns"
v-on="$listeners"
v-bind="attrs"
/>
|
|
11
|
|
|
12
13
14
15
16
|
</template>
<script>
import JDate from '@comp/jeecg/JDate'
import JSelectBizComponent from './JButtonBizComponent'
|
谭毅彬
authored
|
17
|
import {getZoneList} from '@/api/api'
|
|
18
19
20
21
22
23
|
export default {
name: 'JSelectMultiCycleCount',
components: {JDate, JSelectBizComponent},
props: {
value: null, // any type
|
|
24
25
|
testConfig: "",
headerCode:"",
|
|
26
27
28
29
30
31
32
|
queryConfig: {
type: Array,
default: () => []
},
},
data() {
return {
|
谭毅彬
authored
|
33
|
zoneList: [],
|
|
34
|
url: {list: '/inventory/inventoryHeader/freeList'},
|
|
35
|
columns: [
|
|
36
|
{title: 'ID', align: 'center', width: '20%',widthRight: '70%', dataIndex: 'id'},
|
|
37
|
{title: '容器编码', align: 'center', width: '25%', dataIndex: 'containerCode'},
|
|
38
|
{title: '容器状态', align: 'center', width: '20%', dataIndex: 'containerStatus'},
|
|
39
|
{title: '库位编码', align: 'center', width: '20%', dataIndex: 'locationCode'},
|
|
40
|
{title: '总数量', align: 'center', width: '20%', dataIndex: 'totalQty'},
|
谭毅彬
authored
|
41
|
{title: '库区', align: 'center', width: '20%', widthRight: '70%', dataIndex: 'zoneCode', key: 'zoneCode', scopedSlots: {customRender: 'zoneCode'}},
|
|
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
{title: '状态', align: 'center', width: '20%', dataIndex: 'enable'},
],
// 定义在这里的参数都是可以在外部传递覆盖的,可以更灵活的定制化使用的组件
default: {
name: '库存',
width: 1200,
displayKey: 'id',
returnKeys: ['id','id'],
queryParamText: 'ID',
},
// 多条件查询配置queryConfigDefault
queryConfigDefault: [
// {
// key: 'containerCode',
|
|
56
|
// label: '容器编码',
|
|
57
58
59
60
61
62
63
64
65
|
// // 如果包含 dictCode,那么就会显示成下拉框
// dictCode: 'sex',
// },
],
}
},
computed: {
attrs() {
return Object.assign(this.default, this.$attrs, {
|
|
66
67
68
|
queryConfig: this.queryConfigDefault.concat(this.queryConfig),
testConfig : this.testConfig,
headerCode : this.headerCode,
|
|
69
70
|
})
}
|
谭毅彬
authored
|
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
},
created() {
this.loadFrom();
},
methods: {
loadFrom() {
getZoneList().then((res) => {
if (res.success) {
this.zoneList = res.result
}
});
},
solutionZoneCode(value) {
var actions = []
Object.keys(this.zoneList).some((key) => {
if (this.zoneList[key].code == ('' + value)) {
actions.push(this.zoneList[key].name)
return true
}
})
return actions.join('')
},
|
|
93
94
95
96
97
|
}
}
</script>
<style lang="less" scoped></style>
|