Commit e74b6bb2f3c7fb930d529f93f7911da45b11ddc7
1 parent
82e7c8c4
修改了多数页面的不当显示问题
Showing
21 changed files
with
1113 additions
and
1385 deletions
src/api/config/InventoryInfo/bomdetail.js
... | ... | @@ -3,7 +3,7 @@ import request from '@/utils/request' |
3 | 3 | //查询商品明细项列表 |
4 | 4 | export function queryDetailList(bom) { |
5 | 5 | return request({ |
6 | - url: '/config/bomDetail/list', | |
6 | + url: '/config/bom', | |
7 | 7 | method: 'get', |
8 | 8 | params: bom |
9 | 9 | }) |
... | ... | @@ -12,7 +12,7 @@ export function queryDetailList(bom) { |
12 | 12 | //增加商品明细项 |
13 | 13 | export function addDetail(newBom) { |
14 | 14 | return request({ |
15 | - url: '/config/bomDetail', | |
15 | + url: '/config/bom', | |
16 | 16 | method: 'post', |
17 | 17 | data: newBom |
18 | 18 | }) |
... | ... | @@ -21,7 +21,7 @@ export function addDetail(newBom) { |
21 | 21 | //修改商品明细项 |
22 | 22 | export function editDetail(newBom) { |
23 | 23 | return request({ |
24 | - url: '/config/bomDetail', | |
24 | + url: '/config/bom', | |
25 | 25 | method: 'put', |
26 | 26 | data: newBom |
27 | 27 | }) |
... | ... | @@ -30,7 +30,7 @@ export function editDetail(newBom) { |
30 | 30 | //删除商品明细项 |
31 | 31 | export function removeDetail(ids) { |
32 | 32 | return request({ |
33 | - url: '/config/bomDetail', | |
33 | + url: '/config/bom', | |
34 | 34 | method: 'delete', |
35 | 35 | params: {ids} |
36 | 36 | }) |
... | ... |
src/api/config/InventoryInfo/bomheader.js
... | ... | @@ -4,7 +4,7 @@ import request from '@/utils/request' |
4 | 4 | export function queryHeaderList(bom) { |
5 | 5 | return request({ |
6 | 6 | url: '/config/bomHeader/list', |
7 | - method: 'get', | |
7 | + method: 'post', | |
8 | 8 | params: bom |
9 | 9 | }) |
10 | 10 | } |
... | ... | @@ -31,7 +31,7 @@ export function editHeader(newBom) { |
31 | 31 | export function removeHeader(ids) { |
32 | 32 | return request({ |
33 | 33 | url: '/config/bomHeader', |
34 | - method: 'delete', | |
35 | - params: {ids} | |
34 | + method: 'post', | |
35 | + data: ids | |
36 | 36 | }) |
37 | 37 | } |
... | ... |
src/api/config/InventoryInfo/wareHouseManage.js
src/views/config/inventoryInfo/area/zone/index.vue
1 | 1 | <template> |
2 | 2 | <div class="app-container"> |
3 | - <el-form ref="form" :model="queryParams" inline> | |
4 | - <el-form-item label="编码" > | |
3 | + <el-form ref="form" | |
4 | + :model="queryParams" | |
5 | + v-show="showSearch" | |
6 | + inline> | |
7 | + <el-form-item label="编码"> | |
5 | 8 | <el-input |
6 | 9 | v-model="queryParams.code" |
7 | 10 | clearable |
... | ... | @@ -9,7 +12,7 @@ |
9 | 12 | style="width: 240px" |
10 | 13 | @clear="handleQuery"></el-input> |
11 | 14 | </el-form-item> |
12 | - <el-form-item label="名称" > | |
15 | + <el-form-item label="名称"> | |
13 | 16 | <el-input |
14 | 17 | v-model="queryParams.name" |
15 | 18 | clearable |
... | ... | @@ -17,7 +20,7 @@ |
17 | 20 | style="width: 240px" |
18 | 21 | @clear="handleQuery"></el-input> |
19 | 22 | </el-form-item> |
20 | - <el-form-item > | |
23 | + <el-form-item> | |
21 | 24 | <el-button size="mini" icon="el-icon-search" type="cyan" @click="handleQuery">搜索</el-button> |
22 | 25 | <el-button size="mini" icon="el-icon-refresh" @click="resetParams('form')">重置</el-button> |
23 | 26 | </el-form-item> |
... | ... | @@ -56,16 +59,10 @@ |
56 | 59 | >删除 |
57 | 60 | </el-button> |
58 | 61 | </el-col> |
59 | - <div class="top-right-btn"> | |
60 | - <el-row> | |
61 | - <el-tooltip class="item" effect="dark" content="隐藏搜索" placement="top"> | |
62 | - <el-button icon="el-icon-search" circle></el-button> | |
63 | - </el-tooltip> | |
64 | - <el-tooltip class="item" effect="dark" content="刷新" placement="top"> | |
65 | - <el-button icon="el-icon-refresh" circle></el-button> | |
66 | - </el-tooltip> | |
67 | - </el-row> | |
68 | - </div> | |
62 | + <right-toolbar | |
63 | + :showSearch.sync="showSearch" | |
64 | + @queryTable="resetParams('form')" | |
65 | + ></right-toolbar> | |
69 | 66 | </el-row> |
70 | 67 | <el-table |
71 | 68 | ref="multipleTable" |
... | ... | @@ -131,24 +128,37 @@ |
131 | 128 | append-to-body |
132 | 129 | > |
133 | 130 | <el-form ref="diaForm" :title="title" :model="diaForm" :rules="rules" label-width="100px"> |
131 | + <el-row :gutter="20"> | |
132 | + <el-col :span="12"> | |
133 | + <el-form-item label="库区编码" prop="code"> | |
134 | + <el-input v-model="diaForm.code" placeholder="请输入库区编码"/> | |
135 | + </el-form-item> | |
136 | + </el-col> | |
134 | 137 | |
135 | - <el-form-item label="库区编码" prop="code"> | |
136 | - <el-input v-model="diaForm.code" placeholder="请输入库区编码"/> | |
137 | - </el-form-item> | |
138 | - | |
139 | - <el-form-item label="库区名称" prop="name"> | |
140 | - <el-input v-model="diaForm.name" placeholder="请输入库区名称"/> | |
141 | - </el-form-item> | |
138 | + <el-col :span="12"> | |
139 | + <el-form-item label="库区名称" prop="name"> | |
140 | + <el-input v-model="diaForm.name" placeholder="请输入库区名称"/> | |
141 | + </el-form-item> | |
142 | + </el-col> | |
143 | + </el-row> | |
142 | 144 | |
143 | - <el-form-item label="库位类型" prop="locationType"> | |
144 | - <el-input v-model="diaForm.locationType" placeholder="请输入库位类型"/> | |
145 | - </el-form-item> | |
145 | + <el-row :gutter="20"> | |
146 | + <el-col :span="12"> | |
147 | + <el-form-item label="库位类型" prop="locationType"> | |
148 | + <el-select v-model="diaForm.locationType" placeholder="请输入库位类型"> | |
149 | + <el-option v-for="item in selectionOptions.locationType" | |
150 | + :value="item.code" | |
151 | + :label="item.name"/> | |
152 | + </el-select> | |
153 | + </el-form-item> | |
154 | + </el-col> | |
146 | 155 | |
147 | - <el-col span="12"> | |
148 | - <el-form-item label="是否有效" prop="enable"> | |
149 | - <el-switch v-model="diaForm.enable"/> | |
150 | - </el-form-item> | |
151 | - </el-col> | |
156 | + <el-col :span="12"> | |
157 | + <el-form-item label="是否有效" prop="enable"> | |
158 | + <el-switch v-model="diaForm.enable"/> | |
159 | + </el-form-item> | |
160 | + </el-col> | |
161 | + </el-row> | |
152 | 162 | </el-form> |
153 | 163 | |
154 | 164 | <div slot="footer" class="dialog-footer"> |
... | ... | @@ -162,11 +172,11 @@ |
162 | 172 | </template> |
163 | 173 | |
164 | 174 | <script> |
165 | - import { queryList, edit, add, remove, getById } from '@/api/config/InventoryInfo/zone' | |
166 | - import { parseTime } from '@/utils/huaheng' | |
175 | + import {queryList, edit, add, remove, getById} from '@/api/config/InventoryInfo/zone' | |
176 | + import {queryList as queryType} from '@/api/config/InventoryInfo/locationType' | |
167 | 177 | |
168 | 178 | export default { |
169 | - name:'zone', | |
179 | + name: 'zone', | |
170 | 180 | data() { |
171 | 181 | return { |
172 | 182 | // 查询参数 |
... | ... | @@ -174,10 +184,14 @@ |
174 | 184 | pageNum: 1, |
175 | 185 | pageSize: 10, |
176 | 186 | }, |
187 | + // 显示搜索条件 | |
188 | + showSearch: true, | |
177 | 189 | //对话框表单 |
178 | 190 | diaForm: {}, |
179 | 191 | //表格数据 |
180 | 192 | tableData: [], |
193 | + //下拉框数据 | |
194 | + selectionOptions:{}, | |
181 | 195 | // 非单个禁用 |
182 | 196 | single: true, |
183 | 197 | //非多个禁用 |
... | ... | @@ -194,13 +208,13 @@ |
194 | 208 | ids: [], |
195 | 209 | rules: { |
196 | 210 | code: [ |
197 | - { required: true, message: '请输入库区编码', trigger: 'blur' } | |
211 | + {required: true, message: '请输入库区编码', trigger: 'blur'} | |
198 | 212 | ], |
199 | 213 | name: [ |
200 | - { required: true, message: '请输入库区名称', trigger: 'blur' } | |
214 | + {required: true, message: '请输入库区名称', trigger: 'blur'} | |
201 | 215 | ], |
202 | 216 | locationType: [ |
203 | - { required: true, message: '请输入库位类型', trigger: 'blur' } | |
217 | + {required: true, message: '请输入库位类型', trigger: 'blur'} | |
204 | 218 | ] |
205 | 219 | }, |
206 | 220 | tips: false |
... | ... | @@ -208,6 +222,9 @@ |
208 | 222 | }, |
209 | 223 | created() { |
210 | 224 | this.handleQuery() |
225 | + queryType().then(res=>{ | |
226 | + this.selectionOptions.locationType = res.rows | |
227 | + }) | |
211 | 228 | }, |
212 | 229 | methods: { |
213 | 230 | handleQuery() { |
... | ... | @@ -267,16 +284,16 @@ |
267 | 284 | confirmButtonText: '确定', |
268 | 285 | cancelButtonText: '取消', |
269 | 286 | type: 'warning' |
270 | - }).then(function() { | |
287 | + }).then(function () { | |
271 | 288 | return remove(id) |
272 | 289 | }).then(() => { |
273 | 290 | this.handleQuery() |
274 | 291 | this.msgSuccess('删除成功') |
275 | - }).catch(function() { | |
292 | + }).catch(function () { | |
276 | 293 | }) |
277 | 294 | }, |
278 | 295 | /** 提交按钮 */ |
279 | - submitForm: function() { | |
296 | + submitForm: function () { | |
280 | 297 | this.$refs['diaForm'].validate(valid => { |
281 | 298 | if (valid) { |
282 | 299 | if (this.switch1) { |
... | ... |
src/views/config/inventoryInfo/area/zoneCapacity/index.vue
1 | 1 | <template> |
2 | 2 | <div class="app-container"> |
3 | - <el-form ref="form" :model="queryParams" inline> | |
3 | + <el-form ref="form" | |
4 | + v-show="showSearch" | |
5 | + :model="queryParams" | |
6 | + inline> | |
4 | 7 | <el-form-item label="商品编码"> |
5 | 8 | <el-input |
6 | 9 | v-model="queryParams.materialCode" |
7 | 10 | clearable |
8 | 11 | size="small" |
9 | 12 | style="width: 240px" |
10 | - @clear="handleQuery" | |
11 | - ></el-input> | |
13 | + @clear="handleQuery"></el-input> | |
12 | 14 | </el-form-item> |
13 | 15 | <el-form-item label="商品名称"> |
14 | 16 | <el-input |
... | ... | @@ -16,8 +18,7 @@ |
16 | 18 | clearable |
17 | 19 | size="small" |
18 | 20 | style="width: 240px" |
19 | - @clear="handleQuery" | |
20 | - ></el-input> | |
21 | + @clear="handleQuery"></el-input> | |
21 | 22 | </el-form-item> |
22 | 23 | <el-form-item label="商品类别"> |
23 | 24 | <el-select |
... | ... | @@ -25,30 +26,17 @@ |
25 | 26 | size="small" |
26 | 27 | style="width: 240px" |
27 | 28 | > |
28 | - <el-option label="所有" value="" /> | |
29 | - <el-option | |
30 | - v-for="item in selectionData.materialType" | |
31 | - :label="item.name" | |
32 | - :key="item.id" | |
33 | - :value="item.code" | |
34 | - /> | |
29 | + <el-option label="所有" value=""/> | |
30 | + <el-option v-for="item in selectionData.materialType" | |
31 | + :label="item.name" | |
32 | + :key="item.id" | |
33 | + :value="item.code"/> | |
35 | 34 | </el-select> |
36 | 35 | </el-form-item> |
37 | 36 | |
38 | - <el-form-item> | |
39 | - <el-button | |
40 | - size="mini" | |
41 | - icon="el-icon-search" | |
42 | - type="cyan" | |
43 | - @click="handleQuery" | |
44 | - >搜索</el-button | |
45 | - > | |
46 | - <el-button | |
47 | - size="mini" | |
48 | - icon="el-icon-refresh" | |
49 | - @click="resetParams('form')" | |
50 | - >重置</el-button | |
51 | - > | |
37 | + <el-form-item > | |
38 | + <el-button size="mini" icon="el-icon-search" type="cyan" @click="handleQuery">搜索</el-button> | |
39 | + <el-button size="mini" icon="el-icon-refresh" @click="resetParams('form')">重置</el-button> | |
52 | 40 | </el-form-item> |
53 | 41 | </el-form> |
54 | 42 | |
... | ... | @@ -60,7 +48,7 @@ |
60 | 48 | size="mini" |
61 | 49 | @click="handleAdd" |
62 | 50 | v-hasPermi="['']" |
63 | - >新增 | |
51 | + >新增 | |
64 | 52 | </el-button> |
65 | 53 | </el-col> |
66 | 54 | <el-col :span="1.5"> |
... | ... | @@ -71,7 +59,7 @@ |
71 | 59 | :disabled="single" |
72 | 60 | @click="handleUpdate" |
73 | 61 | v-hasPermi="['']" |
74 | - >修改 | |
62 | + >修改 | |
75 | 63 | </el-button> |
76 | 64 | </el-col> |
77 | 65 | <el-col :span="1.5"> |
... | ... | @@ -82,34 +70,19 @@ |
82 | 70 | :disabled="single" |
83 | 71 | @click="handleDelete" |
84 | 72 | v-hasPermi="['']" |
85 | - >删除 | |
73 | + >删除 | |
86 | 74 | </el-button> |
87 | 75 | </el-col> |
88 | - <div class="top-right-btn"> | |
89 | - <el-row> | |
90 | - <el-tooltip | |
91 | - class="item" | |
92 | - effect="dark" | |
93 | - content="隐藏搜索" | |
94 | - placement="top" | |
95 | - > | |
96 | - <el-button icon="el-icon-search" circle></el-button> | |
97 | - </el-tooltip> | |
98 | - <el-tooltip class="item" effect="dark" content="刷新" placement="top"> | |
99 | - <el-button icon="el-icon-refresh" circle></el-button> | |
100 | - </el-tooltip> | |
101 | - </el-row> | |
102 | - </div> | |
76 | + <right-toolbar | |
77 | + :showSearch.sync="showSearch" | |
78 | + @queryTable="resetParams('form')" | |
79 | + ></right-toolbar> | |
103 | 80 | </el-row> |
104 | 81 | <el-table |
105 | 82 | ref="multipleTable" |
106 | 83 | :data="tableData" |
107 | - :header-cell-style="{ | |
108 | - 'text-align': 'center', | |
109 | - background: '#F8F8F9', | |
110 | - color: '#515A6E', | |
111 | - }" | |
112 | - :cell-style="{ 'text-align': 'center' }" | |
84 | + :header-cell-style="{'text-align':'center',background:'#F8F8F9',color:'#515A6E'}" | |
85 | + :cell-style="{'text-align':'center'}" | |
113 | 86 | tooltip-effect="dark" |
114 | 87 | style="width: 100%" |
115 | 88 | v-loading="loading" |
... | ... | @@ -123,17 +96,8 @@ |
123 | 96 | <el-table-column prop="materialName" label="物料名称"></el-table-column> |
124 | 97 | <el-table-column prop="materialSpec" label="物料规格"></el-table-column> |
125 | 98 | <el-table-column prop="materialUnit" label="物料单位"></el-table-column> |
126 | - <el-table-column | |
127 | - prop="filterCode" | |
128 | - label="货位过滤条件" | |
129 | - :show-overflow-tooltip="true" | |
130 | - min-width="100" | |
131 | - ></el-table-column> | |
132 | - <el-table-column | |
133 | - prop="maxQty" | |
134 | - label="最大数量" | |
135 | - min-width="100" | |
136 | - ></el-table-column> | |
99 | + <el-table-column prop="filterCode" label="货位过滤条件" :show-overflow-tooltip="true" min-width="100"></el-table-column> | |
100 | + <el-table-column prop="maxQty" label="最大数量" min-width="100"></el-table-column> | |
137 | 101 | <el-table-column prop="minQty" label="最小数量"></el-table-column> |
138 | 102 | <el-table-column prop="created" label="创建时间" min-width="165"> |
139 | 103 | <template slot-scope="scope"> |
... | ... | @@ -149,9 +113,7 @@ |
149 | 113 | <el-table-column prop="lastUpdateBy" label="更新用户"></el-table-column> |
150 | 114 | <el-table-column prop="enable" label="是否启用"> |
151 | 115 | <template slot-scope="scope"> |
152 | - <el-button :type="scope.row.enable | enableFilter">{{ | |
153 | - diaryFormat(scope.row.enable) | |
154 | - }}</el-button> | |
116 | + <el-button :type="scope.row.enable | enableFilter">{{diaryFormat(scope.row.enable)}}</el-button> | |
155 | 117 | </template> |
156 | 118 | </el-table-column> |
157 | 119 | <el-table-column label="操作"> |
... | ... | @@ -161,14 +123,14 @@ |
161 | 123 | type="text" |
162 | 124 | icon="el-icon-edit" |
163 | 125 | @click="handleUpdate(scope.row)" |
164 | - >编辑 | |
126 | + >编辑 | |
165 | 127 | </el-button> |
166 | 128 | <el-button |
167 | 129 | size="mini" |
168 | 130 | type="text" |
169 | 131 | icon="el-icon-delete" |
170 | 132 | @click="handleDelete(scope.row)" |
171 | - >删除 | |
133 | + >删除 | |
172 | 134 | </el-button> |
173 | 135 | </template> |
174 | 136 | </el-table-column> |
... | ... | @@ -182,6 +144,7 @@ |
182 | 144 | @pagination="handleQuery" |
183 | 145 | /> |
184 | 146 | |
147 | + | |
185 | 148 | <!--增加与编辑弹窗页面--> |
186 | 149 | <el-dialog |
187 | 150 | :title="title" |
... | ... | @@ -189,29 +152,17 @@ |
189 | 152 | width="700px" |
190 | 153 | append-to-body |
191 | 154 | > |
192 | - <el-form | |
193 | - ref="diaForm" | |
194 | - :title="title" | |
195 | - :model="diaForm" | |
196 | - :rules="rules" | |
197 | - label-width="100px" | |
198 | - > | |
155 | + <el-form ref="diaForm" :title="title" :model="diaForm" :rules="rules" label-width="100px"> | |
199 | 156 | <el-row :gutter="20"> |
200 | 157 | <el-col :span="12"> |
201 | 158 | <el-form-item label="物料编码" prop="materialCode"> |
202 | - <el-input | |
203 | - v-model="diaForm.materialCode" | |
204 | - placeholder="请输入物料编码" | |
205 | - /> | |
159 | + <el-input v-model="diaForm.materialCode" placeholder="请输入物料编码"/> | |
206 | 160 | </el-form-item> |
207 | 161 | </el-col> |
208 | 162 | |
209 | 163 | <el-col :span="12"> |
210 | 164 | <el-form-item label="货位过滤条件" prop="filterCode"> |
211 | - <el-input | |
212 | - v-model="diaForm.filterCode" | |
213 | - placeholder="请输入货位过滤条件" | |
214 | - /> | |
165 | + <el-input v-model="diaForm.filterCode" placeholder="请输入货位过滤条件"/> | |
215 | 166 | </el-form-item> |
216 | 167 | </el-col> |
217 | 168 | </el-row> |
... | ... | @@ -219,13 +170,13 @@ |
219 | 170 | <el-row :gutter="20"> |
220 | 171 | <el-col :span="12"> |
221 | 172 | <el-form-item label="最大数量" prop="maxQty"> |
222 | - <el-input v-model="diaForm.maxQty" placeholder="请输入最大数量" /> | |
173 | + <el-input v-model="diaForm.maxQty" placeholder="请输入最大数量"/> | |
223 | 174 | </el-form-item> |
224 | 175 | </el-col> |
225 | 176 | |
226 | 177 | <el-col :span="12"> |
227 | 178 | <el-form-item label="最小数量" prop="minQty"> |
228 | - <el-input v-model="diaForm.minQty" placeholder="请输最小数量" /> | |
179 | + <el-input v-model="diaForm.minQty" placeholder="请输最小数量"/> | |
229 | 180 | </el-form-item> |
230 | 181 | </el-col> |
231 | 182 | </el-row> |
... | ... | @@ -235,170 +186,168 @@ |
235 | 186 | <el-button type="primary" @click="submitForm">确 定</el-button> |
236 | 187 | <el-button @click="cancel">取 消</el-button> |
237 | 188 | </div> |
189 | + | |
238 | 190 | </el-dialog> |
191 | + | |
239 | 192 | </div> |
240 | 193 | </template> |
241 | 194 | |
242 | 195 | <script> |
243 | -import { | |
244 | - queryList, | |
245 | - edit, | |
246 | - add, | |
247 | - remove, | |
248 | - getById, | |
249 | -} from "@/api/config/InventoryInfo/zoneCapacity"; | |
250 | -import { getDicts } from "@/api/system/dict/data"; | |
251 | -import { queryList as queryType } from "@/api/config/InventoryInfo/materialType"; | |
196 | + import {queryList, edit, add, remove, getById} from '@/api/config/InventoryInfo/zoneCapacity' | |
197 | + import { getDicts } from '@/api/system/dict/data' | |
198 | + import {queryList as queryType} from '@/api/config/InventoryInfo/materialType' | |
252 | 199 | |
253 | -export default { | |
254 | - name: "zoneCapacity", | |
255 | - data() { | |
256 | - return { | |
257 | - // 查询参数 | |
258 | - queryParams: { | |
259 | - pageNum: 1, | |
260 | - pageSize: 10, | |
261 | - }, | |
262 | - totalSize: 0, | |
263 | - //对话框表单 | |
264 | - diaForm: {}, | |
265 | - //表格数据 | |
266 | - tableData: [], | |
267 | - //下拉框数据 | |
268 | - selectionData: {}, | |
269 | - //字典数据 | |
270 | - enableOptions: [], | |
271 | - // 非单个禁用 | |
272 | - single: true, | |
273 | - //非多个禁用 | |
274 | - multiple: true, | |
275 | - // 对话框标题 | |
276 | - title: "", | |
277 | - loading: true, | |
278 | - date: [], | |
279 | - //弹窗显示开关 | |
280 | - diaOpen: false, | |
281 | - //增加与修改转换开关 | |
282 | - switch1: "", | |
283 | - ids: [], | |
284 | - rules: { | |
285 | - materialCode: [ | |
286 | - { required: true, message: "请输入物料编码", trigger: "blur" }, | |
287 | - ], | |
288 | - filterCode: [ | |
289 | - { required: true, message: "请输入货位过滤条件", trigger: "blur" }, | |
290 | - ], | |
291 | - maxQty: [ | |
292 | - { required: true, message: "请输入最大数量", trigger: "blur" }, | |
293 | - ], | |
294 | - minQty: [ | |
295 | - { required: true, message: "请输入最小数量", trigger: "blur" }, | |
296 | - ], | |
297 | - }, | |
298 | - tips: false, | |
299 | - }; | |
300 | - }, | |
301 | - created() { | |
302 | - this.handleQuery(); | |
303 | - queryType().then((response) => { | |
304 | - this.selectionData.materialType = response.rows; | |
305 | - }); | |
306 | - }, | |
307 | - methods: { | |
308 | - handleQuery() { | |
309 | - this.loading = true; | |
310 | - queryList(this.queryParams).then((res) => { | |
311 | - this.tableData = res.rows; | |
312 | - this.totalSize = res.total; | |
313 | - this.loading = false; | |
314 | - }); | |
315 | - }, | |
316 | - // 清空查询列表 | |
317 | - resetParams(formName) { | |
318 | - this.queryParams.code = ""; | |
319 | - this.queryParams.name = ""; | |
320 | - this.$refs[formName].resetFields(); | |
321 | - this.handleQuery(); | |
322 | - }, | |
323 | - // 重置对话框表单 | |
324 | - reset() { | |
325 | - this.diaForm = {}; | |
326 | - this.resetForm("diaForm"); | |
327 | - }, | |
328 | - //关闭对话框 | |
329 | - cancel() { | |
330 | - this.diaOpen = false; | |
331 | - this.reset(); | |
200 | + export default { | |
201 | + name: 'zoneCapacity', | |
202 | + data() { | |
203 | + return { | |
204 | + // 查询参数 | |
205 | + queryParams: { | |
206 | + pageNum: 1, | |
207 | + pageSize: 10 | |
208 | + }, | |
209 | + totalSize :0, | |
210 | + //对话框表单 | |
211 | + diaForm: {}, | |
212 | + //表格数据 | |
213 | + tableData: [], | |
214 | + // 显示搜索条件 | |
215 | + showSearch: true, | |
216 | + //下拉框数据 | |
217 | + selectionData: {}, | |
218 | + //字典数据 | |
219 | + enableOptions:[], | |
220 | + // 非单个禁用 | |
221 | + single: true, | |
222 | + //非多个禁用 | |
223 | + multiple: true, | |
224 | + // 对话框标题 | |
225 | + title: '', | |
226 | + loading: true, | |
227 | + date: [], | |
228 | + //弹窗显示开关 | |
229 | + diaOpen: false, | |
230 | + //增加与修改转换开关 | |
231 | + switch1: '', | |
232 | + ids: [], | |
233 | + rules: { | |
234 | + materialCode: [ | |
235 | + { required: true, message: '请输入物料编码', trigger: 'blur' } | |
236 | + ], | |
237 | + filterCode: [ | |
238 | + { required: true, message: '请输入货位过滤条件', trigger: 'blur' } | |
239 | + ], | |
240 | + maxQty: [ | |
241 | + { required: true, message: '请输入最大数量', trigger: 'blur' } | |
242 | + ], | |
243 | + minQty: [ | |
244 | + { required: true, message: '请输入最小数量', trigger: 'blur' } | |
245 | + ], | |
246 | + }, | |
247 | + tips: false | |
248 | + } | |
332 | 249 | }, |
333 | - // 多选框选中数据 | |
334 | - handleSelectionChange(selection) { | |
335 | - this.ids = selection.map((item) => item.id); | |
336 | - this.single = selection.length != 1; | |
337 | - this.multiple = !selection.length; | |
250 | + created() { | |
251 | + this.handleQuery() | |
252 | + queryType().then(response => { | |
253 | + this.selectionData.materialType = response.rows | |
254 | + // console.log(response) | |
255 | + }) | |
338 | 256 | }, |
257 | + methods: { | |
258 | + handleQuery() { | |
259 | + this.loading = true | |
260 | + queryList(this.queryParams).then(res => { | |
261 | + this.tableData = res.rows | |
262 | + this.totalSize = res.total | |
263 | + this.loading = false | |
264 | + }) | |
265 | + }, | |
266 | + // 清空查询列表 | |
267 | + resetParams(formName) { | |
268 | + this.queryParams.code = '' | |
269 | + this.queryParams.name = '' | |
270 | + this.$refs[formName].resetFields() | |
271 | + this.handleQuery() | |
272 | + }, | |
273 | + // 重置对话框表单 | |
274 | + reset() { | |
275 | + this.diaForm = {} | |
276 | + this.resetForm('diaForm') | |
277 | + }, | |
278 | + //关闭对话框 | |
279 | + cancel() { | |
280 | + this.diaOpen = false | |
281 | + this.reset() | |
282 | + }, | |
283 | + // 多选框选中数据 | |
284 | + handleSelectionChange(selection) { | |
285 | + this.ids = selection.map(item => item.id) | |
286 | + this.single = selection.length != 1 | |
287 | + this.multiple = !selection.length | |
288 | + }, | |
339 | 289 | |
340 | - /** 新增按钮操作 */ | |
341 | - handleAdd() { | |
342 | - this.switch1 = false; | |
343 | - this.reset(); | |
344 | - this.title = "添加库区容量"; | |
345 | - this.diaOpen = true; | |
346 | - }, | |
347 | - /** 修改按钮操作 */ | |
348 | - handleUpdate(row) { | |
349 | - this.reset(); | |
350 | - this.switch1 = true; | |
351 | - const id = row.id || this.ids; | |
352 | - getTypeById(id).then((response) => { | |
353 | - this.diaForm = response.data; | |
354 | - this.title = "修改库区容量"; | |
355 | - this.diaOpen = true; | |
356 | - }); | |
357 | - }, | |
358 | - /** 删除按钮操作 */ | |
359 | - handleDelete(row) { | |
360 | - const id = row.id || this.ids; | |
361 | - this.$confirm('是否确认删除编号为"' + id + '"的数据项?', "警告", { | |
362 | - confirmButtonText: "确定", | |
363 | - cancelButtonText: "取消", | |
364 | - type: "warning", | |
365 | - }) | |
366 | - .then(function () { | |
367 | - return remove(id); | |
290 | + /** 新增按钮操作 */ | |
291 | + handleAdd() { | |
292 | + this.switch1 = false | |
293 | + this.reset() | |
294 | + this.title = '添加库区容量' | |
295 | + this.diaOpen = true | |
296 | + }, | |
297 | + /** 修改按钮操作 */ | |
298 | + handleUpdate(row) { | |
299 | + this.reset() | |
300 | + this.switch1 = true | |
301 | + const id = row.id || this.ids | |
302 | + getTypeById(id).then(response => { | |
303 | + this.diaForm = response.data | |
304 | + this.title = '修改库区容量' | |
305 | + this.diaOpen = true | |
368 | 306 | }) |
369 | - .then(() => { | |
370 | - this.handleQuery(); | |
371 | - this.msgSuccess("删除成功"); | |
307 | + }, | |
308 | + /** 删除按钮操作 */ | |
309 | + handleDelete(row) { | |
310 | + const id = row.id || this.ids | |
311 | + this.$confirm('是否确认删除编号为"' + id + '"的数据项?', '警告', { | |
312 | + confirmButtonText: '确定', | |
313 | + cancelButtonText: '取消', | |
314 | + type: 'warning' | |
315 | + }).then(function () { | |
316 | + return remove(id) | |
317 | + }).then(() => { | |
318 | + this.handleQuery() | |
319 | + this.msgSuccess('删除成功') | |
320 | + }).catch(function () { | |
372 | 321 | }) |
373 | - .catch(function () {}); | |
374 | - }, | |
375 | - /** 提交按钮 */ | |
376 | - submitForm: function () { | |
377 | - this.$refs["diaForm"].validate((valid) => { | |
378 | - if (valid) { | |
379 | - if (this.switch1) { | |
380 | - edit(this.diaForm).then((response) => { | |
381 | - if (response.code === 200) { | |
382 | - this.msgSuccess("修改成功"); | |
383 | - this.diaOpen = false; | |
384 | - this.handleQuery(); | |
385 | - } | |
386 | - }); | |
387 | - } else { | |
388 | - add(this.diaForm).then((response) => { | |
389 | - if (response.code === 200) { | |
390 | - this.msgSuccess("新增成功"); | |
391 | - this.diaOpen = false; | |
392 | - this.handleQuery(); | |
393 | - } | |
394 | - }); | |
322 | + }, | |
323 | + /** 提交按钮 */ | |
324 | + submitForm: function () { | |
325 | + this.$refs['diaForm'].validate(valid => { | |
326 | + if (valid) { | |
327 | + if (this.switch1) { | |
328 | + edit(this.diaForm).then(response => { | |
329 | + if (response.code === 200) { | |
330 | + this.msgSuccess('修改成功') | |
331 | + this.diaOpen = false | |
332 | + this.handleQuery() | |
333 | + } | |
334 | + }) | |
335 | + } else { | |
336 | + add(this.diaForm).then(response => { | |
337 | + if (response.code === 200) { | |
338 | + this.msgSuccess('新增成功') | |
339 | + this.diaOpen = false | |
340 | + this.handleQuery() | |
341 | + } | |
342 | + }) | |
343 | + } | |
395 | 344 | } |
396 | - } | |
397 | - }); | |
398 | - }, | |
399 | - }, | |
400 | -}; | |
345 | + }) | |
346 | + } | |
347 | + } | |
348 | + } | |
401 | 349 | </script> |
402 | 350 | |
403 | 351 | <style scoped> |
352 | + | |
404 | 353 | </style> |
... | ... |
src/views/config/inventoryInfo/bom/index.vue
... | ... | @@ -2,7 +2,11 @@ |
2 | 2 | <div class="app-container"> |
3 | 3 | <el-tabs v-model="activeName" @tab-click="handleClickTag"> |
4 | 4 | <el-tab-pane label="主表" name="header"> |
5 | - <el-form ref="form" :model="queryParams" inline> | |
5 | + <el-form | |
6 | + ref="form" | |
7 | + :model="queryParams" | |
8 | + v-show="showSearch" | |
9 | + inline> | |
6 | 10 | <el-form-item label="物料名称"> |
7 | 11 | <el-input |
8 | 12 | v-model="queryParams.materialName" |
... | ... | @@ -68,16 +72,10 @@ |
68 | 72 | >删除 |
69 | 73 | </el-button> |
70 | 74 | </el-col> |
71 | - <div class="top-right-btn"> | |
72 | - <el-row> | |
73 | - <el-tooltip class="item" effect="dark" content="隐藏搜索" placement="top"> | |
74 | - <el-button icon="el-icon-search" circle></el-button> | |
75 | - </el-tooltip> | |
76 | - <el-tooltip class="item" effect="dark" content="刷新" placement="top"> | |
77 | - <el-button icon="el-icon-refresh" circle></el-button> | |
78 | - </el-tooltip> | |
79 | - </el-row> | |
80 | - </div> | |
75 | + <right-toolbar | |
76 | + :showSearch.sync="showSearch" | |
77 | + @queryTable="resetParams('form')" | |
78 | + ></right-toolbar> | |
81 | 79 | </el-row> |
82 | 80 | <el-table |
83 | 81 | ref="multipleTable" |
... | ... | @@ -136,7 +134,7 @@ |
136 | 134 | <!--增加与编辑弹窗页面--> |
137 | 135 | <el-dialog |
138 | 136 | :title="title" |
139 | - :visible.sync="diaOpen" | |
137 | + :visible.sync="diaHeaderOpen" | |
140 | 138 | width="700px" |
141 | 139 | append-to-body |
142 | 140 | > |
... | ... | @@ -201,7 +199,11 @@ |
201 | 199 | </el-dialog> |
202 | 200 | </el-tab-pane> |
203 | 201 | <el-tab-pane lazy="true" label="明细" name="detail"> |
204 | - <el-form ref="form" :model="queryParams" inline> | |
202 | + <el-form | |
203 | + ref="form" | |
204 | + :model="queryParams" | |
205 | + v-show="showSearch" | |
206 | + inline> | |
205 | 207 | <el-form-item label="物料名称"> |
206 | 208 | <el-input |
207 | 209 | v-model="queryParams.materialName" |
... | ... | @@ -346,7 +348,7 @@ |
346 | 348 | <!--增加与编辑弹窗页面--> |
347 | 349 | <el-dialog |
348 | 350 | :title="title" |
349 | - :visible.sync="diaOpen" | |
351 | + :visible.sync="diaDetailOpen" | |
350 | 352 | width="700px" |
351 | 353 | append-to-body |
352 | 354 | > |
... | ... | @@ -414,6 +416,8 @@ |
414 | 416 | pageNum: 1, |
415 | 417 | pageSize: 10, |
416 | 418 | }, |
419 | + // 显示搜索条件 | |
420 | + showSearch: true, | |
417 | 421 | //日期范围 |
418 | 422 | dateRange:[], |
419 | 423 | //标签参数 |
... | ... | @@ -431,8 +435,10 @@ |
431 | 435 | totalSize: 10, |
432 | 436 | loading: true, |
433 | 437 | date: [], |
434 | - //弹窗显示开关 | |
435 | - diaOpen: false, | |
438 | + //头弹窗显示开关 | |
439 | + diaHeaderOpen: false, | |
440 | + //明细弹窗显示开关 | |
441 | + diaDetailOpen: false, | |
436 | 442 | //增加与修改转换开关 |
437 | 443 | switch1: '', |
438 | 444 | ids: [], |
... | ... | @@ -444,6 +450,9 @@ |
444 | 450 | tips: false |
445 | 451 | } |
446 | 452 | }, |
453 | + created() { | |
454 | + this.handleQuery() | |
455 | + }, | |
447 | 456 | methods: { |
448 | 457 | handleQuery() { |
449 | 458 | this.loading = true |
... | ... | @@ -484,7 +493,8 @@ |
484 | 493 | }, |
485 | 494 | //关闭对话框 |
486 | 495 | cancel() { |
487 | - this.diaOpen = false | |
496 | + this.diaDetailOpen = false | |
497 | + this.diaHeaderOpen = false | |
488 | 498 | this.reset() |
489 | 499 | }, |
490 | 500 | // 多选框选中数据 |
... | ... | @@ -498,7 +508,11 @@ |
498 | 508 | handleAdd() { |
499 | 509 | this.switch1 = false |
500 | 510 | this.reset() |
501 | - this.diaOpen = true | |
511 | + if (this.activeName==='header'){ | |
512 | + this.diaHeaderOpen = true | |
513 | + }else { | |
514 | + this.diaDetailOpen = true | |
515 | + } | |
502 | 516 | this.title = '添加商品' |
503 | 517 | }, |
504 | 518 | /** 修改按钮操作 */ |
... | ... | @@ -509,13 +523,13 @@ |
509 | 523 | if(this.activeName === 'header'){ |
510 | 524 | queryHeaderList(id).then(response => { |
511 | 525 | this.diaForm = response.rows[0] |
512 | - this.diaOpen = true | |
526 | + this.diaHeaderOpen = true | |
513 | 527 | this.title = '修改商品' |
514 | 528 | }) |
515 | 529 | }else { |
516 | 530 | queryDetailList(id).then(response => { |
517 | 531 | this.diaForm = response.rows[0] |
518 | - this.diaOpen = true | |
532 | + this.diaDetailOpen = true | |
519 | 533 | this.title = '修改商品' |
520 | 534 | }) |
521 | 535 | } |
... | ... | @@ -548,7 +562,7 @@ |
548 | 562 | editHeader(this.diaForm).then(response => { |
549 | 563 | if (response.code === 200) { |
550 | 564 | this.msgSuccess('修改成功') |
551 | - this.diaOpen = false | |
565 | + this.diaHeaderOpen = false | |
552 | 566 | this.handleQuery() |
553 | 567 | } |
554 | 568 | }) |
... | ... | @@ -556,7 +570,7 @@ |
556 | 570 | editDetail(this.diaForm).then(response => { |
557 | 571 | if (response.code === 200) { |
558 | 572 | this.msgSuccess('修改成功') |
559 | - this.diaOpen = false | |
573 | + this.diaDetailOpen = false | |
560 | 574 | this.handleQuery() |
561 | 575 | } |
562 | 576 | }) |
... | ... | @@ -566,7 +580,7 @@ |
566 | 580 | addHeader(this.diaForm).then(response => { |
567 | 581 | if (response.code === 200) { |
568 | 582 | this.msgSuccess('新增成功') |
569 | - this.diaOpen = false | |
583 | + this.diaHeaderOpen = false | |
570 | 584 | this.handleQuery() |
571 | 585 | } |
572 | 586 | }) |
... | ... | @@ -574,7 +588,7 @@ |
574 | 588 | addDetail(this.diaForm).then(response => { |
575 | 589 | if (response.code === 200) { |
576 | 590 | this.msgSuccess('新增成功') |
577 | - this.diaOpen = false | |
591 | + this.diaDetailOpen = false | |
578 | 592 | this.handleQuery() |
579 | 593 | } |
580 | 594 | }) |
... | ... |
src/views/config/inventoryInfo/company/index.vue
1 | 1 | <template> |
2 | 2 | <div class="app-container"> |
3 | - <el-form ref="form" :model="queryParams" inline> | |
3 | + <el-form ref="form" | |
4 | + :model="queryParams" | |
5 | + v-show="showSearch" | |
6 | + inline> | |
4 | 7 | <el-form-item label="仓库编码"> |
5 | 8 | <el-input |
6 | 9 | v-model="queryParams.code" |
... | ... | @@ -56,16 +59,10 @@ |
56 | 59 | >删除 |
57 | 60 | </el-button> |
58 | 61 | </el-col> |
59 | - <div class="top-right-btn"> | |
60 | - <el-row> | |
61 | - <el-tooltip class="item" effect="dark" content="隐藏搜索" placement="top"> | |
62 | - <el-button icon="el-icon-search" circle></el-button> | |
63 | - </el-tooltip> | |
64 | - <el-tooltip class="item" effect="dark" content="刷新" placement="top"> | |
65 | - <el-button icon="el-icon-refresh" circle></el-button> | |
66 | - </el-tooltip> | |
67 | - </el-row> | |
68 | - </div> | |
62 | + <right-toolbar | |
63 | + :showSearch.sync="showSearch" | |
64 | + @queryTable="resetParams('form')" | |
65 | + ></right-toolbar> | |
69 | 66 | </el-row> |
70 | 67 | <el-table |
71 | 68 | ref="multipleTable" |
... | ... | @@ -256,6 +253,8 @@ |
256 | 253 | }, |
257 | 254 | //对话框表单 |
258 | 255 | diaForm: {}, |
256 | + // 显示搜索条件 | |
257 | + showSearch: true, | |
259 | 258 | //表格数据 |
260 | 259 | tableData: [], |
261 | 260 | // 非单个禁用 |
... | ... |
src/views/config/inventoryInfo/position/location/index.vue
1 | 1 | <template> |
2 | 2 | <div class="app-container"> |
3 | - <el-form ref="form" :model="queryParams" inline> | |
3 | + <el-form ref="form" | |
4 | + :model="queryParams" | |
5 | + v-show="showSearch" | |
6 | + inline> | |
4 | 7 | <el-form-item label="库位编码" prop="code"> |
5 | 8 | <el-input |
6 | 9 | v-model="queryParams.code" |
... | ... | @@ -145,16 +148,10 @@ |
145 | 148 | >打印 |
146 | 149 | </el-button> |
147 | 150 | </el-col> |
148 | - <div class="top-right-btn"> | |
149 | - <el-row> | |
150 | - <el-tooltip class="item" effect="dark" content="隐藏搜索" placement="top"> | |
151 | - <el-button icon="el-icon-search" circle></el-button> | |
152 | - </el-tooltip> | |
153 | - <el-tooltip class="item" effect="dark" content="刷新" placement="top"> | |
154 | - <el-button icon="el-icon-refresh" circle></el-button> | |
155 | - </el-tooltip> | |
156 | - </el-row> | |
157 | - </div> | |
151 | + <right-toolbar | |
152 | + :showSearch.sync="showSearch" | |
153 | + @queryTable="resetParams('form')" | |
154 | + ></right-toolbar> | |
158 | 155 | </el-row> |
159 | 156 | <el-table |
160 | 157 | ref="multipleTable" |
... | ... | @@ -266,6 +263,8 @@ |
266 | 263 | pageNum: 1, |
267 | 264 | pageSize: 10 |
268 | 265 | }, |
266 | + // 显示搜索条件 | |
267 | + showSearch: true, | |
269 | 268 | //搜索下拉框与翻译回显 |
270 | 269 | locationType:[], |
271 | 270 | locationStatus:[], |
... | ... |
src/views/config/inventoryInfo/position/locationCapacity/index.vue
1 | 1 | <template> |
2 | 2 | <div class="app-container"> |
3 | - <el-form ref="form" :model="queryParams" inline> | |
3 | + <el-form ref="form" | |
4 | + :model="queryParams" | |
5 | + v-show="showSearch" | |
6 | + inline> | |
4 | 7 | <el-form-item label="仓库编码"> |
5 | 8 | <el-input |
6 | 9 | v-model="queryParams.code" |
... | ... | @@ -56,16 +59,10 @@ |
56 | 59 | >删除 |
57 | 60 | </el-button> |
58 | 61 | </el-col> |
59 | - <div class="top-right-btn"> | |
60 | - <el-row> | |
61 | - <el-tooltip class="item" effect="dark" content="隐藏搜索" placement="top"> | |
62 | - <el-button icon="el-icon-search" circle></el-button> | |
63 | - </el-tooltip> | |
64 | - <el-tooltip class="item" effect="dark" content="刷新" placement="top"> | |
65 | - <el-button icon="el-icon-refresh" circle></el-button> | |
66 | - </el-tooltip> | |
67 | - </el-row> | |
68 | - </div> | |
62 | + <right-toolbar | |
63 | + :showSearch.sync="showSearch" | |
64 | + @queryTable="resetParams('form')" | |
65 | + ></right-toolbar> | |
69 | 66 | </el-row> |
70 | 67 | <el-table |
71 | 68 | ref="multipleTable" |
... | ... | @@ -208,6 +205,8 @@ |
208 | 205 | pageNum: 1, |
209 | 206 | pageSize: 10, |
210 | 207 | }, |
208 | + // 显示搜索条件 | |
209 | + showSearch: true, | |
211 | 210 | //对话框表单 |
212 | 211 | diaForm: {}, |
213 | 212 | //对话框下拉数据 |
... | ... |
src/views/config/inventoryInfo/position/locationType/index.vue
1 | 1 | <template> |
2 | 2 | <div class="app-container"> |
3 | - <el-form ref="form" :model="queryParams" inline> | |
3 | + <el-form ref="form" | |
4 | + :model="queryParams" | |
5 | + v-show="showSearch" | |
6 | + inline> | |
4 | 7 | <el-form-item label="编码"> |
5 | 8 | <el-input |
6 | 9 | v-model="queryParams.code" |
7 | 10 | clearable |
8 | 11 | size="small" |
9 | 12 | style="width: 240px" |
10 | - @clear="handleQuery" | |
11 | - ></el-input> | |
13 | + @clear="handleQuery"></el-input> | |
12 | 14 | </el-form-item> |
13 | 15 | <el-form-item label="名称"> |
14 | 16 | <el-input |
... | ... | @@ -16,8 +18,7 @@ |
16 | 18 | clearable |
17 | 19 | size="small" |
18 | 20 | style="width: 240px" |
19 | - @clear="handleQuery" | |
20 | - ></el-input> | |
21 | + @clear="handleQuery"></el-input> | |
21 | 22 | </el-form-item> |
22 | 23 | <el-form-item label="区域"> |
23 | 24 | <el-select |
... | ... | @@ -25,30 +26,17 @@ |
25 | 26 | size="small" |
26 | 27 | style="width: 240px" |
27 | 28 | > |
28 | - <el-option label="所有" value="" /> | |
29 | - <el-option | |
30 | - v-for="item in selectionData.zone" | |
31 | - :label="item.name" | |
32 | - :key="item.id" | |
33 | - :value="item.code" | |
34 | - /> | |
29 | + <el-option label="所有" value=""/> | |
30 | + <el-option v-for="item in selectionData.zone" | |
31 | + :label="item.name" | |
32 | + :key="item.id" | |
33 | + :value="item.code"/> | |
35 | 34 | </el-select> |
36 | 35 | </el-form-item> |
37 | 36 | |
38 | 37 | <el-form-item> |
39 | - <el-button | |
40 | - size="mini" | |
41 | - icon="el-icon-search" | |
42 | - type="cyan" | |
43 | - @click="handleQuery" | |
44 | - >搜索</el-button | |
45 | - > | |
46 | - <el-button | |
47 | - size="mini" | |
48 | - icon="el-icon-refresh" | |
49 | - @click="resetParams('form')" | |
50 | - >重置</el-button | |
51 | - > | |
38 | + <el-button size="mini" icon="el-icon-search" type="cyan" @click="handleQuery">搜索</el-button> | |
39 | + <el-button size="mini" icon="el-icon-refresh" @click="resetParams('form')">重置</el-button> | |
52 | 40 | </el-form-item> |
53 | 41 | </el-form> |
54 | 42 | |
... | ... | @@ -60,7 +48,7 @@ |
60 | 48 | size="mini" |
61 | 49 | @click="handleAdd" |
62 | 50 | v-hasPermi="['']" |
63 | - >新增 | |
51 | + >新增 | |
64 | 52 | </el-button> |
65 | 53 | </el-col> |
66 | 54 | <el-col :span="1.5"> |
... | ... | @@ -71,7 +59,7 @@ |
71 | 59 | :disabled="single" |
72 | 60 | @click="handleUpdate" |
73 | 61 | v-hasPermi="['']" |
74 | - >修改 | |
62 | + >修改 | |
75 | 63 | </el-button> |
76 | 64 | </el-col> |
77 | 65 | <el-col :span="1.5"> |
... | ... | @@ -82,34 +70,19 @@ |
82 | 70 | :disabled="single" |
83 | 71 | @click="handleDelete" |
84 | 72 | v-hasPermi="['']" |
85 | - >删除 | |
73 | + >删除 | |
86 | 74 | </el-button> |
87 | 75 | </el-col> |
88 | - <div class="top-right-btn"> | |
89 | - <el-row> | |
90 | - <el-tooltip | |
91 | - class="item" | |
92 | - effect="dark" | |
93 | - content="隐藏搜索" | |
94 | - placement="top" | |
95 | - > | |
96 | - <el-button icon="el-icon-search" circle></el-button> | |
97 | - </el-tooltip> | |
98 | - <el-tooltip class="item" effect="dark" content="刷新" placement="top"> | |
99 | - <el-button icon="el-icon-refresh" circle></el-button> | |
100 | - </el-tooltip> | |
101 | - </el-row> | |
102 | - </div> | |
76 | + <right-toolbar | |
77 | + :showSearch.sync="showSearch" | |
78 | + @queryTable="resetParams('form')" | |
79 | + ></right-toolbar> | |
103 | 80 | </el-row> |
104 | 81 | <el-table |
105 | 82 | ref="multipleTable" |
106 | 83 | :data="tableData" |
107 | - :header-cell-style="{ | |
108 | - 'text-align': 'center', | |
109 | - background: '#F8F8F9', | |
110 | - color: '#515A6E', | |
111 | - }" | |
112 | - :cell-style="{ 'text-align': 'center' }" | |
84 | + :header-cell-style="{'text-align':'center',background:'#F8F8F9',color:'#515A6E'}" | |
85 | + :cell-style="{'text-align':'center'}" | |
113 | 86 | tooltip-effect="dark" |
114 | 87 | style="width: 100%" |
115 | 88 | v-loading="loading" |
... | ... | @@ -123,27 +96,11 @@ |
123 | 96 | <el-table-column prop="length" label="长(m)"></el-table-column> |
124 | 97 | <el-table-column prop="width" label="宽(m)"></el-table-column> |
125 | 98 | <el-table-column prop="height" label="高(m)"></el-table-column> |
126 | - <el-table-column | |
127 | - prop="maxWeight" | |
128 | - label="最大重量kg" | |
129 | - min-width="90" | |
130 | - ></el-table-column> | |
131 | - <el-table-column | |
132 | - prop="minQtyUm" | |
133 | - label="最小允许单位" | |
134 | - min-width="100" | |
135 | - ></el-table-column> | |
99 | + <el-table-column prop="maxWeight" label="最大重量kg" min-width="90"></el-table-column> | |
100 | + <el-table-column prop="minQtyUm" label="最小允许单位" min-width="100"></el-table-column> | |
136 | 101 | <el-table-column prop="checkDigit" label="校验位"></el-table-column> |
137 | - <el-table-column | |
138 | - prop="maxMaterials" | |
139 | - label="最多混放物料数" | |
140 | - min-width="115" | |
141 | - ></el-table-column> | |
142 | - <el-table-column | |
143 | - prop="maxContainers" | |
144 | - label="最大允许托盘数" | |
145 | - min-width="115" | |
146 | - ></el-table-column> | |
102 | + <el-table-column prop="maxMaterials" label="最多混放物料数" min-width="115"></el-table-column> | |
103 | + <el-table-column prop="maxContainers" label="最大允许托盘数" min-width="115"></el-table-column> | |
147 | 104 | <el-table-column prop="created" label="创建时间" min-width="165"> |
148 | 105 | <template slot-scope="scope"> |
149 | 106 | <span>{{ parseTime(scope.row.created) }}</span> |
... | ... | @@ -158,12 +115,7 @@ |
158 | 115 | <el-table-column prop="lastUpdateBy" label="更新用户"></el-table-column> |
159 | 116 | <el-table-column prop="enable" label="是否启用"> |
160 | 117 | <template slot-scope="scope"> |
161 | - <el-button | |
162 | - round | |
163 | - size="mini" | |
164 | - :type="scope.row.enable | enableFilter" | |
165 | - >{{ diaryFormat(scope.row.enable) }}</el-button | |
166 | - > | |
118 | + <el-button round size="mini" :type="scope.row.enable | enableFilter">{{diaryFormat(scope.row.enable)}}</el-button> | |
167 | 119 | </template> |
168 | 120 | </el-table-column> |
169 | 121 | <el-table-column label="操作"> |
... | ... | @@ -173,14 +125,14 @@ |
173 | 125 | type="text" |
174 | 126 | icon="el-icon-edit" |
175 | 127 | @click="handleUpdate(scope.row)" |
176 | - >编辑 | |
128 | + >编辑 | |
177 | 129 | </el-button> |
178 | 130 | <el-button |
179 | 131 | size="mini" |
180 | 132 | type="text" |
181 | 133 | icon="el-icon-delete" |
182 | 134 | @click="handleDelete(scope.row)" |
183 | - >删除 | |
135 | + >删除 | |
184 | 136 | </el-button> |
185 | 137 | </template> |
186 | 138 | </el-table-column> |
... | ... | @@ -194,6 +146,7 @@ |
194 | 146 | @pagination="handleQuery" |
195 | 147 | /> |
196 | 148 | |
149 | + | |
197 | 150 | <!--增加与编辑弹窗页面--> |
198 | 151 | <el-dialog |
199 | 152 | :title="title" |
... | ... | @@ -201,29 +154,17 @@ |
201 | 154 | width="700px" |
202 | 155 | append-to-body |
203 | 156 | > |
204 | - <el-form | |
205 | - ref="diaForm" | |
206 | - :title="title" | |
207 | - :model="diaForm" | |
208 | - :rules="rules" | |
209 | - label-width="100px" | |
210 | - > | |
157 | + <el-form ref="diaForm" :title="title" :model="diaForm" :rules="rules" label-width="100px"> | |
211 | 158 | <el-row :gutter="20"> |
212 | 159 | <el-col :span="12"> |
213 | 160 | <el-form-item label="库位类型编码" prop="code"> |
214 | - <el-input | |
215 | - v-model="diaForm.code" | |
216 | - placeholder="请输入库位类型编码" | |
217 | - /> | |
161 | + <el-input v-model="diaForm.code" placeholder="请输入库位类型编码"/> | |
218 | 162 | </el-form-item> |
219 | 163 | </el-col> |
220 | 164 | |
221 | 165 | <el-col :span="12"> |
222 | 166 | <el-form-item label="库位类型名称" prop="name"> |
223 | - <el-input | |
224 | - v-model="diaForm.name" | |
225 | - placeholder="请输入库位类型名称" | |
226 | - /> | |
167 | + <el-input v-model="diaForm.name" placeholder="请输入库位类型名称"/> | |
227 | 168 | </el-form-item> |
228 | 169 | </el-col> |
229 | 170 | </el-row> |
... | ... | @@ -231,13 +172,13 @@ |
231 | 172 | <el-row :gutter="20"> |
232 | 173 | <el-col :span="12"> |
233 | 174 | <el-form-item label="长(m)" prop="length"> |
234 | - <el-input v-model="diaForm.length" placeholder="请输入长(m)" /> | |
175 | + <el-input v-model="diaForm.length" placeholder="请输入长(m)"/> | |
235 | 176 | </el-form-item> |
236 | 177 | </el-col> |
237 | 178 | |
238 | 179 | <el-col :span="12"> |
239 | 180 | <el-form-item label="宽(m)" prop="width"> |
240 | - <el-input v-model="diaForm.width" placeholder="请输宽(m)" /> | |
181 | + <el-input v-model="diaForm.width" placeholder="请输宽(m)"/> | |
241 | 182 | </el-form-item> |
242 | 183 | </el-col> |
243 | 184 | </el-row> |
... | ... | @@ -245,16 +186,13 @@ |
245 | 186 | <el-row :gutter="20"> |
246 | 187 | <el-col :span="12"> |
247 | 188 | <el-form-item label="高(m)" prop="height"> |
248 | - <el-input v-model="diaForm.height" placeholder="请输入高(m)" /> | |
189 | + <el-input v-model="diaForm.height" placeholder="请输入高(m)"/> | |
249 | 190 | </el-form-item> |
250 | 191 | </el-col> |
251 | 192 | |
252 | 193 | <el-col :span="12"> |
253 | 194 | <el-form-item label="最大重量kg" prop="maxWeight"> |
254 | - <el-input | |
255 | - v-model="diaForm.maxWeight" | |
256 | - placeholder="请输入最大重量kg" | |
257 | - /> | |
195 | + <el-input v-model="diaForm.maxWeight" placeholder="请输入最大重量kg"/> | |
258 | 196 | </el-form-item> |
259 | 197 | </el-col> |
260 | 198 | </el-row> |
... | ... | @@ -262,10 +200,7 @@ |
262 | 200 | <el-row :gutter="20"> |
263 | 201 | <el-col :span="12"> |
264 | 202 | <el-form-item label="最小允许单位" prop="minQtyUm"> |
265 | - <el-input | |
266 | - v-model="diaForm.minQtyUm" | |
267 | - placeholder="请输入最小允许单位" | |
268 | - /> | |
203 | + <el-input v-model="diaForm.minQtyUm" placeholder="请输入最小允许单位"/> | |
269 | 204 | </el-form-item> |
270 | 205 | </el-col> |
271 | 206 | </el-row> |
... | ... | @@ -273,10 +208,7 @@ |
273 | 208 | <el-row> |
274 | 209 | <el-col :span="12"> |
275 | 210 | <el-form-item label="校验位" prop="checkDigit"> |
276 | - <el-input | |
277 | - v-model="diaForm.checkDigit" | |
278 | - placeholder="请输入校验位" | |
279 | - /> | |
211 | + <el-input v-model="diaForm.checkDigit" placeholder="请输入校验位"/> | |
280 | 212 | </el-form-item> |
281 | 213 | </el-col> |
282 | 214 | </el-row> |
... | ... | @@ -284,19 +216,13 @@ |
284 | 216 | <el-row :gutter="20"> |
285 | 217 | <el-col :span="12"> |
286 | 218 | <el-form-item label="最多混放物料数" prop="maxMaterials"> |
287 | - <el-input | |
288 | - v-model="diaForm.maxMaterials" | |
289 | - placeholder="请输入最多混放物料数" | |
290 | - /> | |
219 | + <el-input v-model="diaForm.maxMaterials" placeholder="请输入最多混放物料数"/> | |
291 | 220 | </el-form-item> |
292 | 221 | </el-col> |
293 | 222 | |
294 | 223 | <el-col :span="12"> |
295 | 224 | <el-form-item label="最大批号数量" prop="maxLots"> |
296 | - <el-input | |
297 | - v-model="diaForm.maxLots" | |
298 | - placeholder="请输入最大批号数量" | |
299 | - /> | |
225 | + <el-input v-model="diaForm.maxLots" placeholder="请输入最大批号数量"/> | |
300 | 226 | </el-form-item> |
301 | 227 | </el-col> |
302 | 228 | </el-row> |
... | ... | @@ -304,16 +230,15 @@ |
304 | 230 | <el-row :gutter="20"> |
305 | 231 | <el-col :span="12"> |
306 | 232 | <el-form-item label="最大允许托盘数" prop="maxContainers"> |
307 | - <el-input | |
308 | - v-model="diaForm.maxContainers" | |
309 | - placeholder="请输入最大允许托盘数" | |
310 | - /> | |
233 | + <el-input v-model="diaForm.maxContainers" placeholder="请输入最大允许托盘数"/> | |
311 | 234 | </el-form-item> |
312 | 235 | </el-col> |
313 | 236 | |
314 | 237 | <el-col :span="12"> |
315 | 238 | <el-form-item label="是否有效" prop="enable"> |
316 | - <el-switch v-model="diaForm.enable" /> | |
239 | + <el-switch v-model="diaForm.enable" | |
240 | + :active-value="0" | |
241 | + :inactive-value="1"/> | |
317 | 242 | </el-form-item> |
318 | 243 | </el-col> |
319 | 244 | </el-row> |
... | ... | @@ -323,167 +248,169 @@ |
323 | 248 | <el-button type="primary" @click="submitForm">确 定</el-button> |
324 | 249 | <el-button @click="cancel">取 消</el-button> |
325 | 250 | </div> |
251 | + | |
326 | 252 | </el-dialog> |
253 | + | |
327 | 254 | </div> |
328 | 255 | </template> |
329 | 256 | |
330 | 257 | <script> |
331 | -import { | |
332 | - queryList, | |
333 | - edit, | |
334 | - add, | |
335 | - remove, | |
336 | - getTypeById, | |
337 | -} from "@/api/config/InventoryInfo/locationType"; | |
338 | -import { getDicts } from "@/api/system/dict/data"; | |
339 | -import { queryList as queryZone } from "@/api/config/InventoryInfo/zone"; | |
258 | + import {queryList, edit, add, remove, getTypeById} from '@/api/config/InventoryInfo/locationType' | |
259 | + import { getDicts } from '@/api/system/dict/data' | |
260 | + import {queryList as queryZone} from '@/api/config/InventoryInfo/zone' | |
340 | 261 | |
341 | -export default { | |
342 | - name: "locationType", | |
343 | - data() { | |
344 | - return { | |
345 | - // 查询参数 | |
346 | - queryParams: { | |
347 | - pageNum: 1, | |
348 | - pageSize: 10, | |
349 | - }, | |
350 | - totalSize: 0, | |
351 | - //对话框表单 | |
352 | - diaForm: {}, | |
353 | - //表格数据 | |
354 | - tableData: [], | |
355 | - //下拉框数据 | |
356 | - selectionData: {}, | |
357 | - //字典数据 | |
358 | - enableOptions: [], | |
359 | - // 非单个禁用 | |
360 | - single: true, | |
361 | - //非多个禁用 | |
362 | - multiple: true, | |
363 | - // 对话框标题 | |
364 | - title: "", | |
365 | - loading: true, | |
366 | - date: [], | |
367 | - //弹窗显示开关 | |
368 | - diaOpen: false, | |
369 | - //增加与修改转换开关 | |
370 | - switch1: "", | |
371 | - ids: [], | |
372 | - rules: { | |
373 | - code: [{ required: true, message: "请输入类型编码", trigger: "blur" }], | |
374 | - name: [{ required: true, message: "请输入类型名称", trigger: "blur" }], | |
375 | - }, | |
376 | - tips: false, | |
377 | - }; | |
378 | - }, | |
379 | - created() { | |
380 | - this.handleQuery(); | |
381 | - getDicts("enable").then((response) => { | |
382 | - this.enableOptions = response.data; | |
383 | - }); | |
384 | - queryZone().then((response) => { | |
385 | - this.selectionData.zone = response.rows; | |
386 | - }); | |
387 | - }, | |
388 | - methods: { | |
389 | - handleQuery() { | |
390 | - this.loading = true; | |
391 | - queryList(this.queryParams).then((res) => { | |
392 | - this.tableData = res.rows; | |
393 | - this.totalSize = res.total; | |
394 | - this.loading = false; | |
395 | - }); | |
396 | - }, | |
397 | - //字典翻译 | |
398 | - diaryFormat(param) { | |
399 | - return this.selectDictLabel(this.enableOptions, param); | |
400 | - }, | |
401 | - // 清空查询列表 | |
402 | - resetParams(formName) { | |
403 | - this.queryParams.code = ""; | |
404 | - this.queryParams.name = ""; | |
405 | - this.$refs[formName].resetFields(); | |
406 | - this.handleQuery(); | |
407 | - }, | |
408 | - // 重置对话框表单 | |
409 | - reset() { | |
410 | - this.diaForm = {}; | |
411 | - this.resetForm("diaForm"); | |
262 | + export default { | |
263 | + name: 'locationType', | |
264 | + data() { | |
265 | + return { | |
266 | + // 查询参数 | |
267 | + queryParams: { | |
268 | + pageNum: 1, | |
269 | + pageSize: 10 | |
270 | + }, | |
271 | + // 显示搜索条件 | |
272 | + showSearch: true, | |
273 | + totalSize: 0, | |
274 | + //对话框表单 | |
275 | + diaForm: {}, | |
276 | + //表格数据 | |
277 | + tableData: [], | |
278 | + //下拉框数据 | |
279 | + selectionData: {}, | |
280 | + //字典数据 | |
281 | + enableOptions:[], | |
282 | + // 非单个禁用 | |
283 | + single: true, | |
284 | + //非多个禁用 | |
285 | + multiple: true, | |
286 | + // 对话框标题 | |
287 | + title: '', | |
288 | + loading: true, | |
289 | + date: [], | |
290 | + //弹窗显示开关 | |
291 | + diaOpen: false, | |
292 | + //增加与修改转换开关 | |
293 | + switch1: '', | |
294 | + ids: [], | |
295 | + rules: { | |
296 | + code: [ | |
297 | + { required: true, message: '请输入类型编码', trigger: 'blur' } | |
298 | + ], | |
299 | + name: [ | |
300 | + { required: true, message: '请输入类型名称', trigger: 'blur' } | |
301 | + ] | |
302 | + }, | |
303 | + tips: false | |
304 | + } | |
412 | 305 | }, |
413 | - //关闭对话框 | |
414 | - cancel() { | |
415 | - this.diaOpen = false; | |
416 | - this.reset(); | |
417 | - }, | |
418 | - // 多选框选中数据 | |
419 | - handleSelectionChange(selection) { | |
420 | - this.ids = selection.map((item) => item.id); | |
421 | - this.single = selection.length != 1; | |
422 | - this.multiple = !selection.length; | |
306 | + created() { | |
307 | + this.handleQuery() | |
308 | + getDicts('enable').then(response=>{ | |
309 | + this.enableOptions = response.data | |
310 | + }) | |
311 | + queryZone().then(response => { | |
312 | + this.selectionData.zone = response.rows | |
313 | + // console.log(response) | |
314 | + }) | |
423 | 315 | }, |
316 | + methods: { | |
317 | + handleQuery() { | |
318 | + this.loading = true | |
319 | + queryList(this.queryParams).then(res => { | |
320 | + this.tableData = res.rows | |
321 | + this.totalSize = res.total | |
322 | + this.loading = false | |
323 | + }) | |
324 | + }, | |
325 | + //字典翻译 | |
326 | + diaryFormat(param){ | |
327 | + return this.selectDictLabel(this.enableOptions,param) | |
328 | + }, | |
329 | + // 清空查询列表 | |
330 | + resetParams(formName) { | |
331 | + this.queryParams.code = '' | |
332 | + this.queryParams.name = '' | |
333 | + this.$refs[formName].resetFields() | |
334 | + this.handleQuery() | |
335 | + }, | |
336 | + // 重置对话框表单 | |
337 | + reset() { | |
338 | + this.diaForm = {} | |
339 | + this.resetForm('diaForm') | |
340 | + }, | |
341 | + //关闭对话框 | |
342 | + cancel() { | |
343 | + this.diaOpen = false | |
344 | + this.reset() | |
345 | + }, | |
346 | + // 多选框选中数据 | |
347 | + handleSelectionChange(selection) { | |
348 | + this.ids = selection.map(item => item.id) | |
349 | + this.single = selection.length != 1 | |
350 | + this.multiple = !selection.length | |
351 | + }, | |
424 | 352 | |
425 | - /** 新增按钮操作 */ | |
426 | - handleAdd() { | |
427 | - this.switch1 = false; | |
428 | - this.reset(); | |
429 | - this.title = "添加库位类型"; | |
430 | - this.diaOpen = true; | |
431 | - }, | |
432 | - /** 修改按钮操作 */ | |
433 | - handleUpdate(row) { | |
434 | - this.reset(); | |
435 | - this.switch1 = true; | |
436 | - const id = row.id || this.ids; | |
437 | - getTypeById(id).then((response) => { | |
438 | - this.diaForm = response.data; | |
439 | - this.title = "修改库位类型"; | |
440 | - this.diaOpen = true; | |
441 | - }); | |
442 | - }, | |
443 | - /** 删除按钮操作 */ | |
444 | - handleDelete(row) { | |
445 | - const id = row.id || this.ids; | |
446 | - this.$confirm('是否确认删除类型编号为"' + id + '"的数据项?', "警告", { | |
447 | - confirmButtonText: "确定", | |
448 | - cancelButtonText: "取消", | |
449 | - type: "warning", | |
450 | - }) | |
451 | - .then(function () { | |
452 | - return remove(id); | |
353 | + /** 新增按钮操作 */ | |
354 | + handleAdd() { | |
355 | + this.switch1 = false | |
356 | + this.reset() | |
357 | + this.title = '添加库位类型' | |
358 | + this.diaOpen = true | |
359 | + }, | |
360 | + /** 修改按钮操作 */ | |
361 | + handleUpdate(row) { | |
362 | + this.reset() | |
363 | + this.switch1 = true | |
364 | + const id = row.id || this.ids | |
365 | + getTypeById(id).then(response => { | |
366 | + this.diaForm = response.data | |
367 | + this.title = '修改库位类型' | |
368 | + this.diaOpen = true | |
453 | 369 | }) |
454 | - .then(() => { | |
455 | - this.handleQuery(); | |
456 | - this.msgSuccess("删除成功"); | |
370 | + }, | |
371 | + /** 删除按钮操作 */ | |
372 | + handleDelete(row) { | |
373 | + const id = row.id || this.ids | |
374 | + this.$confirm('是否确认删除类型编号为"' + id + '"的数据项?', '警告', { | |
375 | + confirmButtonText: '确定', | |
376 | + cancelButtonText: '取消', | |
377 | + type: 'warning' | |
378 | + }).then(function () { | |
379 | + return remove(id) | |
380 | + }).then(() => { | |
381 | + this.handleQuery() | |
382 | + this.msgSuccess('删除成功') | |
383 | + }).catch(function () { | |
457 | 384 | }) |
458 | - .catch(function () {}); | |
459 | - }, | |
460 | - /** 提交按钮 */ | |
461 | - submitForm: function () { | |
462 | - this.$refs["diaForm"].validate((valid) => { | |
463 | - if (valid) { | |
464 | - if (this.switch1) { | |
465 | - edit(this.diaForm).then((response) => { | |
466 | - if (response.code === 200) { | |
467 | - this.msgSuccess("修改成功"); | |
468 | - this.diaOpen = false; | |
469 | - this.handleQuery(); | |
470 | - } | |
471 | - }); | |
472 | - } else { | |
473 | - add(this.diaForm).then((response) => { | |
474 | - if (response.code === 200) { | |
475 | - this.msgSuccess("新增成功"); | |
476 | - this.diaOpen = false; | |
477 | - this.handleQuery(); | |
478 | - } | |
479 | - }); | |
385 | + }, | |
386 | + /** 提交按钮 */ | |
387 | + submitForm: function () { | |
388 | + this.$refs['diaForm'].validate(valid => { | |
389 | + if (valid) { | |
390 | + if (this.switch1) { | |
391 | + edit(this.diaForm).then(response => { | |
392 | + if (response.code === 200) { | |
393 | + this.msgSuccess('修改成功') | |
394 | + this.diaOpen = false | |
395 | + this.handleQuery() | |
396 | + } | |
397 | + }) | |
398 | + } else { | |
399 | + add(this.diaForm).then(response => { | |
400 | + if (response.code === 200) { | |
401 | + this.msgSuccess('新增成功') | |
402 | + this.diaOpen = false | |
403 | + this.handleQuery() | |
404 | + } | |
405 | + }) | |
406 | + } | |
480 | 407 | } |
481 | - } | |
482 | - }); | |
483 | - }, | |
484 | - }, | |
485 | -}; | |
408 | + }) | |
409 | + } | |
410 | + } | |
411 | + } | |
486 | 412 | </script> |
487 | 413 | |
488 | 414 | <style scoped> |
415 | + | |
489 | 416 | </style> |
... | ... |
src/views/config/inventoryInfo/station/index.vue
1 | 1 | <template> |
2 | 2 | <div class="app-container"> |
3 | - <el-form ref="form" :model="queryParams" inline> | |
3 | + <el-form ref="form" | |
4 | + :model="queryParams" | |
5 | + v-show="showSearch" | |
6 | + inline> | |
4 | 7 | <el-form-item label="站台编码"> |
5 | 8 | <el-input |
6 | 9 | v-model="queryParams.code" |
... | ... | @@ -67,16 +70,10 @@ |
67 | 70 | >删除 |
68 | 71 | </el-button> |
69 | 72 | </el-col> |
70 | - <div class="top-right-btn"> | |
71 | - <el-row> | |
72 | - <el-tooltip class="item" effect="dark" content="隐藏搜索" placement="top"> | |
73 | - <el-button icon="el-icon-search" circle></el-button> | |
74 | - </el-tooltip> | |
75 | - <el-tooltip class="item" effect="dark" content="刷新" placement="top"> | |
76 | - <el-button icon="el-icon-refresh" circle></el-button> | |
77 | - </el-tooltip> | |
78 | - </el-row> | |
79 | - </div> | |
73 | + <right-toolbar | |
74 | + :showSearch.sync="showSearch" | |
75 | + @queryTable="resetParams('form')" | |
76 | + ></right-toolbar> | |
80 | 77 | </el-row> |
81 | 78 | <el-table |
82 | 79 | ref="multipleTable" |
... | ... | @@ -195,6 +192,8 @@ |
195 | 192 | pageNum: 1, |
196 | 193 | pageSize: 10 |
197 | 194 | }, |
195 | + // 显示搜索条件 | |
196 | + showSearch: true, | |
198 | 197 | dateRange:[], |
199 | 198 | totalSize: 10, |
200 | 199 | //对话框表单 |
... | ... |
src/views/config/inventoryInfo/supplies/material/dialog/itemCRUDDialog.vue
... | ... | @@ -6,7 +6,12 @@ |
6 | 6 | append-to-body |
7 | 7 | @close="$emit('update:show', false)" |
8 | 8 | > |
9 | - <el-form ref="diaForm" :title="title" :model="data" :rules="rules" label-width="100px"> | |
9 | + <el-form ref="diaForm" | |
10 | + :title="title" | |
11 | + :model="data" | |
12 | + size="mini" | |
13 | + label-width="40%" | |
14 | + :rules="rules" > | |
10 | 15 | <el-row :gutter="20"> |
11 | 16 | <el-col :span="12"> |
12 | 17 | <el-form-item label="物料编码" prop="code"> |
... | ... | @@ -180,8 +185,8 @@ |
180 | 185 | <el-col :span="12"> |
181 | 186 | <el-form-item label="状态" prop="enable"> |
182 | 187 | <el-switch v-model="data.enable" |
183 | - active-value="1" | |
184 | - inactive-value="0" | |
188 | + :active-value="0" | |
189 | + :inactive-value="1" | |
185 | 190 | /> |
186 | 191 | </el-form-item> |
187 | 192 | </el-col> |
... | ... |
src/views/config/inventoryInfo/supplies/material/dialog/printDialog.vue
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | <el-dialog |
3 | 3 | title="打印" |
4 | 4 | :visible.sync="visible" |
5 | - width="500px" | |
5 | + width="1000px" | |
6 | 6 | append-to-body |
7 | 7 | @close="$emit('update:showP', false)" |
8 | 8 | > |
... | ... | @@ -37,7 +37,7 @@ |
37 | 37 | {{item.type}} |
38 | 38 | </th> |
39 | 39 | <th rowspan="3"> |
40 | - <el-image :src="item.qrcode" /> | |
40 | + <qrcode-vue :value="item" size="60" level="H" renderAs="svg"></qrcode-vue> | |
41 | 41 | </th> |
42 | 42 | </tr> |
43 | 43 | <tr> |
... | ... | @@ -45,7 +45,7 @@ |
45 | 45 | 物料名称 |
46 | 46 | </th> |
47 | 47 | <th> |
48 | - {{item.type}} | |
48 | + {{item.name}} | |
49 | 49 | </th> |
50 | 50 | </tr> |
51 | 51 | <tr> |
... | ... | @@ -63,10 +63,13 @@ |
63 | 63 | |
64 | 64 | <script> |
65 | 65 | import html2canvas from 'html2canvas' |
66 | - | |
66 | + import QrcodeVue from 'qrcode.vue' | |
67 | 67 | |
68 | 68 | export default { |
69 | 69 | name: 'printDialog', |
70 | + components: { | |
71 | + QrcodeVue, | |
72 | + }, | |
70 | 73 | props: { |
71 | 74 | tableData: { |
72 | 75 | type:Array, |
... | ... | @@ -132,6 +135,8 @@ |
132 | 135 | |
133 | 136 | <style scoped> |
134 | 137 | .table { |
135 | - | |
138 | + min-width:400px; | |
139 | + position:relative; | |
140 | + left:30%; | |
136 | 141 | } |
137 | 142 | </style> |
... | ... |
src/views/config/inventoryInfo/supplies/material/index.vue
1 | 1 | <template> |
2 | 2 | <div class="app-container"> |
3 | - <el-form ref="form" :model="queryParams" inline> | |
3 | + <el-form ref="form" | |
4 | + :model="queryParams" | |
5 | + v-show="showSearch" | |
6 | + inline> | |
4 | 7 | <el-form-item label="仓库编码"> |
5 | 8 | <el-input |
6 | 9 | v-model="queryParams.code" |
... | ... | @@ -77,16 +80,10 @@ |
77 | 80 | >打印 |
78 | 81 | </el-button> |
79 | 82 | </el-col> |
80 | - <div class="top-right-btn"> | |
81 | - <el-row> | |
82 | - <el-tooltip class="item" effect="dark" content="隐藏搜索" placement="top"> | |
83 | - <el-button icon="el-icon-search" circle></el-button> | |
84 | - </el-tooltip> | |
85 | - <el-tooltip class="item" effect="dark" content="刷新" placement="top"> | |
86 | - <el-button icon="el-icon-refresh" circle></el-button> | |
87 | - </el-tooltip> | |
88 | - </el-row> | |
89 | - </div> | |
83 | + <right-toolbar | |
84 | + :showSearch.sync="showSearch" | |
85 | + @queryTable="resetParams('form')" | |
86 | + ></right-toolbar> | |
90 | 87 | </el-row> |
91 | 88 | <el-table |
92 | 89 | ref="multipleTable" |
... | ... | @@ -176,7 +173,6 @@ |
176 | 173 | import { queryList, edit, add, remove } from '@/api/config/InventoryInfo/material' |
177 | 174 | import { queryList as queryType } from '@/api/config/InventoryInfo/materialType' |
178 | 175 | import { getDicts } from '@/api/system/dict/data' |
179 | - import { makeQRCode } from '@/api/utils/common' | |
180 | 176 | import itemCRUDDialog from '@/views/config/inventoryInfo/supplies/material/dialog/itemCRUDDialog' |
181 | 177 | import printDialog from '@/views/config/inventoryInfo/supplies/material/dialog/printDialog' |
182 | 178 | |
... | ... | @@ -265,6 +261,8 @@ |
265 | 261 | date: [], |
266 | 262 | //弹窗下拉框数据 |
267 | 263 | selectValue: [], |
264 | + // 显示搜索条件 | |
265 | + showSearch: true, | |
268 | 266 | //增加与修改转换开关 |
269 | 267 | switch1: '', |
270 | 268 | dict: [], |
... | ... | @@ -357,13 +355,11 @@ |
357 | 355 | handleSelectionChange(selection) { |
358 | 356 | this.ids = selection.map(item => item.id) |
359 | 357 | this.printData = selection.map(item => { |
360 | - let qrCode = makeQRCode(item.code+'/'+item.name+'/'+item.type+'/'+item.spec) | |
361 | 358 | return { |
362 | 359 | 'code':item.code, |
363 | 360 | 'name':item.name, |
364 | 361 | 'type':item.type, |
365 | - 'spec':item.spec, | |
366 | - 'qrcode':qrCode | |
362 | + 'spec':item.spec | |
367 | 363 | } |
368 | 364 | }) |
369 | 365 | this.single = selection.length != 1 |
... | ... |
src/views/config/inventoryInfo/supplies/materialMultiple/index.vue
1 | 1 | <template> |
2 | 2 | <div class="app-container"> |
3 | - <el-form ref="form" :model="queryParams" inline> | |
3 | + <el-form ref="form" | |
4 | + :model="queryParams" | |
5 | + v-show="showSearch" | |
6 | + inline> | |
4 | 7 | <el-form-item label="编码"> |
5 | 8 | <el-input |
6 | 9 | v-model="queryParams.code" |
... | ... | @@ -56,16 +59,10 @@ |
56 | 59 | >删除 |
57 | 60 | </el-button> |
58 | 61 | </el-col> |
59 | - <div class="top-right-btn"> | |
60 | - <el-row> | |
61 | - <el-tooltip class="item" effect="dark" content="隐藏搜索" placement="top"> | |
62 | - <el-button icon="el-icon-search" circle></el-button> | |
63 | - </el-tooltip> | |
64 | - <el-tooltip class="item" effect="dark" content="刷新" placement="top"> | |
65 | - <el-button icon="el-icon-refresh" circle></el-button> | |
66 | - </el-tooltip> | |
67 | - </el-row> | |
68 | - </div> | |
62 | + <right-toolbar | |
63 | + :showSearch.sync="showSearch" | |
64 | + @queryTable="resetParams('form')" | |
65 | + ></right-toolbar> | |
69 | 66 | </el-row> |
70 | 67 | <el-table |
71 | 68 | ref="multipleTable" |
... | ... | @@ -208,6 +205,8 @@ |
208 | 205 | diaForm: {}, |
209 | 206 | //表格数据 |
210 | 207 | tableData: [], |
208 | + // 显示搜索条件 | |
209 | + showSearch: true, | |
211 | 210 | // 非单个禁用 |
212 | 211 | single: true, |
213 | 212 | //非多个禁用 |
... | ... |
src/views/config/inventoryInfo/supplies/materialType/index.vue
1 | 1 | <template> |
2 | 2 | <div class="app-container"> |
3 | - <el-form ref="form" :model="queryParams" inline> | |
4 | - <el-form-item label="仓库编码"> | |
3 | + <el-form ref="form" | |
4 | + :model="queryParams" | |
5 | + v-show="showSearch" | |
6 | + inline> | |
7 | + <el-form-item label="仓库编码" > | |
5 | 8 | <el-input |
6 | 9 | v-model="queryParams.code" |
7 | 10 | clearable |
8 | 11 | size="small" |
9 | 12 | style="width: 240px" |
10 | - @clear="handleQuery" | |
11 | - ></el-input> | |
13 | + @clear="handleQuery"></el-input> | |
12 | 14 | </el-form-item> |
13 | - <el-form-item label="名称"> | |
15 | + <el-form-item label="名称" > | |
14 | 16 | <el-input |
15 | 17 | v-model="queryParams.name" |
16 | 18 | clearable |
17 | 19 | size="small" |
18 | 20 | style="width: 240px" |
19 | - @clear="handleQuery" | |
20 | - ></el-input> | |
21 | + @clear="handleQuery"></el-input> | |
21 | 22 | </el-form-item> |
22 | - <el-form-item> | |
23 | - <el-button | |
24 | - size="mini" | |
25 | - icon="el-icon-search" | |
26 | - type="cyan" | |
27 | - @click="handleQuery" | |
28 | - >搜索</el-button | |
29 | - > | |
30 | - <el-button | |
31 | - size="mini" | |
32 | - icon="el-icon-refresh" | |
33 | - @click="resetParams('form')" | |
34 | - >重置</el-button | |
35 | - > | |
23 | + <el-form-item > | |
24 | + <el-button size="mini" icon="el-icon-search" type="cyan" @click="handleQuery">搜索</el-button> | |
25 | + <el-button size="mini" icon="el-icon-refresh" @click="resetParams('form')">重置</el-button> | |
36 | 26 | </el-form-item> |
37 | 27 | </el-form> |
38 | 28 | |
... | ... | @@ -44,7 +34,7 @@ |
44 | 34 | size="mini" |
45 | 35 | @click="handleAdd" |
46 | 36 | v-hasPermi="['']" |
47 | - >新增 | |
37 | + >新增 | |
48 | 38 | </el-button> |
49 | 39 | </el-col> |
50 | 40 | <el-col :span="1.5"> |
... | ... | @@ -55,7 +45,7 @@ |
55 | 45 | :disabled="single" |
56 | 46 | @click="handleUpdate" |
57 | 47 | v-hasPermi="['']" |
58 | - >修改 | |
48 | + >修改 | |
59 | 49 | </el-button> |
60 | 50 | </el-col> |
61 | 51 | <el-col :span="1.5"> |
... | ... | @@ -66,34 +56,19 @@ |
66 | 56 | :disabled="single" |
67 | 57 | @click="handleDelete" |
68 | 58 | v-hasPermi="['']" |
69 | - >删除 | |
59 | + >删除 | |
70 | 60 | </el-button> |
71 | 61 | </el-col> |
72 | - <div class="top-right-btn"> | |
73 | - <el-row> | |
74 | - <el-tooltip | |
75 | - class="item" | |
76 | - effect="dark" | |
77 | - content="隐藏搜索" | |
78 | - placement="top" | |
79 | - > | |
80 | - <el-button icon="el-icon-search" circle></el-button> | |
81 | - </el-tooltip> | |
82 | - <el-tooltip class="item" effect="dark" content="刷新" placement="top"> | |
83 | - <el-button icon="el-icon-refresh" circle></el-button> | |
84 | - </el-tooltip> | |
85 | - </el-row> | |
86 | - </div> | |
62 | + <right-toolbar | |
63 | + :showSearch.sync="showSearch" | |
64 | + @queryTable="resetParams('form')" | |
65 | + ></right-toolbar> | |
87 | 66 | </el-row> |
88 | 67 | <el-table |
89 | 68 | ref="multipleTable" |
90 | 69 | :data="tableData" |
91 | - :header-cell-style="{ | |
92 | - 'text-align': 'center', | |
93 | - background: '#F8F8F9', | |
94 | - color: '#515A6E', | |
95 | - }" | |
96 | - :cell-style="{ 'text-align': 'center' }" | |
70 | + :header-cell-style="{'text-align':'center',background:'#F8F8F9',color:'#515A6E'}" | |
71 | + :cell-style="{'text-align':'center'}" | |
97 | 72 | tooltip-effect="dark" |
98 | 73 | style="width: 100%" |
99 | 74 | v-loading="loading" |
... | ... | @@ -106,67 +81,24 @@ |
106 | 81 | <el-table-column prop="companyCode" label="货主编码"></el-table-column> |
107 | 82 | <el-table-column prop="warehouseCode" label="仓库编码"></el-table-column> |
108 | 83 | <el-table-column prop="abcClass" label="ABC分类"></el-table-column> |
109 | - <el-table-column | |
110 | - prop="daysToExpire" | |
111 | - label="保质期(天)" | |
112 | - min-width="85" | |
113 | - ></el-table-column> | |
84 | + <el-table-column prop="daysToExpire" label="保质期(天)" min-width="85"></el-table-column> | |
114 | 85 | <el-table-column prop="receivingFlow" label="入库流程"></el-table-column> |
115 | 86 | <el-table-column prop="shippingFlow" label="出库流程"></el-table-column> |
116 | 87 | <el-table-column prop="locatingRule" label="定位规则"></el-table-column> |
117 | 88 | <el-table-column prop="allocationRule" label="分配规则"></el-table-column> |
118 | - <el-table-column | |
119 | - prop="replenishmentRule" | |
120 | - label="补货规则" | |
121 | - ></el-table-column> | |
122 | - <el-table-column | |
123 | - prop="emptyLocRule" | |
124 | - label="空货位规则" | |
125 | - min-width="85" | |
126 | - ></el-table-column> | |
89 | + <el-table-column prop="replenishmentRule" label="补货规则"></el-table-column> | |
90 | + <el-table-column prop="emptyLocRule" label="空货位规则" min-width="85"></el-table-column> | |
127 | 91 | <el-table-column prop="pickingRule" label="拣货规则"></el-table-column> |
128 | - <el-table-column | |
129 | - prop="attributeTemplateCode" | |
130 | - label="属性模版" | |
131 | - ></el-table-column> | |
132 | - <el-table-column | |
133 | - prop="trackSerialNum" | |
134 | - label="记录序列号" | |
135 | - min-width="85" | |
136 | - ></el-table-column> | |
137 | - <el-table-column | |
138 | - prop="autoGenSerialNum" | |
139 | - label="自动生成序列号" | |
140 | - min-width="120" | |
141 | - ></el-table-column> | |
142 | - <el-table-column | |
143 | - prop="snTemplateCode" | |
144 | - label="序列号模版" | |
145 | - min-width="85" | |
146 | - ></el-table-column> | |
147 | - <el-table-column | |
148 | - prop="expiringDays" | |
149 | - label="临期预警天数" | |
150 | - min-width="100" | |
151 | - ></el-table-column> | |
152 | - <el-table-column | |
153 | - prop="minShelfLifeDays" | |
154 | - label="收货预警天数" | |
155 | - min-width="100" | |
156 | - ></el-table-column> | |
157 | - <el-table-column | |
158 | - prop="userDef1" | |
159 | - label="是否AGV区域发货" | |
160 | - min-width="130" | |
161 | - ></el-table-column> | |
92 | + <el-table-column prop="attributeTemplateCode" label="属性模版"></el-table-column> | |
93 | + <el-table-column prop="trackSerialNum" label="记录序列号" min-width="85"></el-table-column> | |
94 | + <el-table-column prop="autoGenSerialNum" label="自动生成序列号" min-width="120"></el-table-column> | |
95 | + <el-table-column prop="snTemplateCode" label="序列号模版" min-width="85"></el-table-column> | |
96 | + <el-table-column prop="expiringDays" label="临期预警天数" min-width="100"></el-table-column> | |
97 | + <el-table-column prop="minShelfLifeDays" label="收货预警天数" min-width="100"></el-table-column> | |
98 | + <el-table-column prop="userDef1" label="是否AGV区域发货" min-width="130"></el-table-column> | |
162 | 99 | <el-table-column prop="enable" label="是否启用"> |
163 | 100 | <template slot-scope="scope"> |
164 | - <el-button | |
165 | - size="mini" | |
166 | - round | |
167 | - :type="scope.row.enable | enableFilter" | |
168 | - >{{ diaryFormat(scope.row.enable) }}</el-button | |
169 | - > | |
101 | + <el-button size="mini" round :type="scope.row.enable | enableFilter">{{diaryFormat(scope.row.enable)}}</el-button> | |
170 | 102 | </template> |
171 | 103 | </el-table-column> |
172 | 104 | <el-table-column prop="created" label="创建时间" min-width="165"> |
... | ... | @@ -188,14 +120,14 @@ |
188 | 120 | type="text" |
189 | 121 | icon="el-icon-edit" |
190 | 122 | @click="handleUpdate(scope.row)" |
191 | - >编辑 | |
123 | + >编辑 | |
192 | 124 | </el-button> |
193 | 125 | <el-button |
194 | 126 | size="mini" |
195 | 127 | type="text" |
196 | 128 | icon="el-icon-delete" |
197 | 129 | @click="handleDelete(scope.row)" |
198 | - >删除 | |
130 | + >删除 | |
199 | 131 | </el-button> |
200 | 132 | </template> |
201 | 133 | </el-table-column> |
... | ... | @@ -209,6 +141,7 @@ |
209 | 141 | @pagination="handleQuery" |
210 | 142 | /> |
211 | 143 | |
144 | + | |
212 | 145 | <!--增加与编辑弹窗页面--> |
213 | 146 | <el-dialog |
214 | 147 | :title="title" |
... | ... | @@ -216,23 +149,17 @@ |
216 | 149 | width="700px" |
217 | 150 | append-to-body |
218 | 151 | > |
219 | - <el-form | |
220 | - ref="diaForm" | |
221 | - :title="title" | |
222 | - :model="diaForm" | |
223 | - :rules="rules" | |
224 | - label-width="100px" | |
225 | - > | |
152 | + <el-form ref="diaForm" :title="title" :model="diaForm" :rules="rules" label-width="100px"> | |
226 | 153 | <el-row :gutter="20"> |
227 | 154 | <el-col :span="12"> |
228 | 155 | <el-form-item label="类型编码" prop="code"> |
229 | - <el-input v-model="diaForm.code" placeholder="请输入类型编码" /> | |
156 | + <el-input v-model="diaForm.code" placeholder="请输入类型编码"/> | |
230 | 157 | </el-form-item> |
231 | 158 | </el-col> |
232 | 159 | |
233 | 160 | <el-col :span="12"> |
234 | 161 | <el-form-item label="类型名称" prop="name"> |
235 | - <el-input v-model="diaForm.name" placeholder="请输入类型名称" /> | |
162 | + <el-input v-model="diaForm.name" placeholder="请输入类型名称"/> | |
236 | 163 | </el-form-item> |
237 | 164 | </el-col> |
238 | 165 | </el-row> |
... | ... | @@ -240,80 +167,59 @@ |
240 | 167 | <el-row :gutter="20"> |
241 | 168 | <el-col :span="12"> |
242 | 169 | <el-form-item label="货主编码" prop="companyCode"> |
243 | - <el-select | |
244 | - v-model="diaForm.companyCode" | |
245 | - placeholder="请选择货主编码" | |
246 | - > | |
247 | - <el-option | |
248 | - v-for="item in selectionData.company" | |
249 | - :label="item.name" | |
250 | - :value="item.code" | |
251 | - :key="item.id" | |
252 | - /> | |
170 | + <el-select v-model="diaForm.companyCode" placeholder="请选择货主编码"> | |
171 | + <el-option v-for="item in selectionData.company" | |
172 | + :label="item.name" | |
173 | + :value="item.code" | |
174 | + :key="item.id" /> | |
253 | 175 | </el-select> |
254 | 176 | </el-form-item> |
255 | 177 | </el-col> |
256 | 178 | |
257 | 179 | <el-col :span="12"> |
258 | 180 | <el-form-item label="ABC分类" prop="abcClass"> |
259 | - <el-input | |
260 | - v-model="diaForm.abcClass" | |
261 | - placeholder="请输入ABC分类" | |
262 | - /> | |
181 | + <el-input v-model="diaForm.abcClass" placeholder="请输入ABC分类"/> | |
263 | 182 | </el-form-item> |
264 | 183 | </el-col> |
265 | 184 | </el-row> |
266 | 185 | |
186 | + | |
267 | 187 | <el-row :gutter="20"> |
268 | 188 | <el-col :span="12"> |
269 | 189 | <el-form-item label="保质期(天)" prop="daysToExpire"> |
270 | - <el-input | |
271 | - v-model="diaForm.daysToExpire" | |
272 | - placeholder="请输入保质期(天)" | |
273 | - /> | |
190 | + <el-input v-model="diaForm.daysToExpire" placeholder="请输入保质期(天)"/> | |
274 | 191 | </el-form-item> |
275 | 192 | </el-col> |
276 | 193 | |
277 | 194 | <el-col :span="12"> |
278 | 195 | <el-form-item label="入库流程" prop="receivingFlow"> |
279 | - <el-select | |
280 | - v-model="diaForm.receivingFlow" | |
281 | - placeholder="请选择入库流程" | |
282 | - > | |
283 | - <el-option | |
284 | - v-for="item in selectionData.receiptFlow" | |
285 | - :label="item.name" | |
286 | - :value="item.code" | |
287 | - :key="item.id" | |
288 | - /> | |
196 | + <el-select v-model="diaForm.receivingFlow" placeholder="请选择入库流程"> | |
197 | + <el-option v-for="item in selectionData.receiptFlow" | |
198 | + :label="item.name" | |
199 | + :value="item.code" | |
200 | + :key="item.id" /> | |
289 | 201 | </el-select> |
290 | 202 | </el-form-item> |
291 | 203 | </el-col> |
292 | 204 | </el-row> |
293 | 205 | |
206 | + | |
294 | 207 | <el-row :gutter="20"> |
295 | 208 | <el-col :span="12"> |
296 | 209 | <el-form-item label="出库流程" prop="shippingFlow"> |
297 | - <el-select | |
298 | - v-model="diaForm.shippingFlow" | |
299 | - placeholder="请选择出库流程" | |
300 | - > | |
301 | - <el-option | |
302 | - v-for="item in selectionData.shipmentFlow" | |
303 | - :label="item.name" | |
304 | - :value="item.code" | |
305 | - :key="item.id" | |
306 | - /> | |
210 | + <el-select v-model="diaForm.shippingFlow" placeholder="请选择出库流程"> | |
211 | + <el-option v-for="item in selectionData.shipmentFlow" | |
212 | + :label="item.name" | |
213 | + :value="item.code" | |
214 | + :key="item.id" /> | |
307 | 215 | </el-select> |
308 | 216 | </el-form-item> |
309 | 217 | </el-col> |
310 | 218 | |
311 | 219 | <el-col :span="12"> |
312 | 220 | <el-form-item label="定位规则" prop="locatingRule"> |
313 | - <el-select | |
314 | - v-model="diaForm.locatingRule" | |
315 | - placeholder="请选择定位规则" | |
316 | - > | |
221 | + <el-select v-model="diaForm.locatingRule" placeholder="请选择定位规则"> | |
222 | + | |
317 | 223 | </el-select> |
318 | 224 | </el-form-item> |
319 | 225 | </el-col> |
... | ... | @@ -322,20 +228,17 @@ |
322 | 228 | <el-row :gutter="20"> |
323 | 229 | <el-col :span="12"> |
324 | 230 | <el-form-item label="分配规则" prop="allocationRule"> |
325 | - <el-select | |
326 | - v-model="diaForm.allocationRule" | |
327 | - placeholder="请选择分配规则" | |
328 | - > | |
231 | + <el-select v-model="diaForm.allocationRule" placeholder="请选择分配规则"> | |
232 | + | |
329 | 233 | </el-select> |
330 | 234 | </el-form-item> |
331 | 235 | </el-col> |
332 | 236 | |
237 | + | |
333 | 238 | <el-col :span="12"> |
334 | 239 | <el-form-item label="补货规则" prop="replenishmentRule"> |
335 | - <el-select | |
336 | - v-model="diaForm.replenishmentRule" | |
337 | - placeholder="请选择补货规则" | |
338 | - > | |
240 | + <el-select v-model="diaForm.replenishmentRule" placeholder="请选择补货规则"> | |
241 | + | |
339 | 242 | </el-select> |
340 | 243 | </el-form-item> |
341 | 244 | </el-col> |
... | ... | @@ -344,20 +247,16 @@ |
344 | 247 | <el-row :gutter="20"> |
345 | 248 | <el-col :span="12"> |
346 | 249 | <el-form-item label="空货位规则" prop="emptyLocRule"> |
347 | - <el-select | |
348 | - v-model="diaForm.emptyLocRule" | |
349 | - placeholder="请选择空货位规则" | |
350 | - > | |
250 | + <el-select v-model="diaForm.emptyLocRule" placeholder="请选择空货位规则"> | |
251 | + | |
351 | 252 | </el-select> |
352 | 253 | </el-form-item> |
353 | 254 | </el-col> |
354 | 255 | |
355 | 256 | <el-col :span="12"> |
356 | 257 | <el-form-item label="拣货规则" prop="pickingRule"> |
357 | - <el-select | |
358 | - v-model="diaForm.pickingRule" | |
359 | - placeholder="请选择拣货规则" | |
360 | - > | |
258 | + <el-select v-model="diaForm.pickingRule" placeholder="请选择拣货规则"> | |
259 | + | |
361 | 260 | </el-select> |
362 | 261 | </el-form-item> |
363 | 262 | </el-col> |
... | ... | @@ -366,19 +265,13 @@ |
366 | 265 | <el-row :gutter="20"> |
367 | 266 | <el-col :span="12"> |
368 | 267 | <el-form-item label="属性模版" prop="attributeTemplateCode"> |
369 | - <el-input | |
370 | - v-model="diaForm.attributeTemplateCode" | |
371 | - placeholder="请输入属性模版" | |
372 | - /> | |
268 | + <el-input v-model="diaForm.attributeTemplateCode" placeholder="请输入属性模版"/> | |
373 | 269 | </el-form-item> |
374 | 270 | </el-col> |
375 | 271 | |
376 | 272 | <el-col :span="12"> |
377 | 273 | <el-form-item label="记录序列号" prop="trackSerialNum"> |
378 | - <el-input | |
379 | - v-model="diaForm.trackSerialNum" | |
380 | - placeholder="请输入记录序列号" | |
381 | - /> | |
274 | + <el-input v-model="diaForm.trackSerialNum" placeholder="请输入记录序列号"/> | |
382 | 275 | </el-form-item> |
383 | 276 | </el-col> |
384 | 277 | </el-row> |
... | ... | @@ -386,22 +279,13 @@ |
386 | 279 | <el-row :gutter="20"> |
387 | 280 | <el-col :span="12"> |
388 | 281 | <el-form-item label="自动生成序列号" prop="autoGenSerialNum"> |
389 | - <el-input | |
390 | - v-model="diaForm.autoGenSerialNum" | |
391 | - placeholder="请输入自动生成序列号" | |
392 | - /> | |
282 | + <el-input v-model="diaForm.autoGenSerialNum" placeholder="请输入自动生成序列号"/> | |
393 | 283 | </el-form-item> |
394 | 284 | </el-col> |
395 | 285 | |
396 | 286 | <el-col :span="12"> |
397 | - <el-form-item | |
398 | - label="自动生成序列号表达式" | |
399 | - prop="autoGenSerialNumFormat" | |
400 | - > | |
401 | - <el-input | |
402 | - v-model="diaForm.autoGenSerialNumFormat" | |
403 | - placeholder="请输入自动生成序列号表达式" | |
404 | - /> | |
287 | + <el-form-item label="自动生成序列号表达式" prop="autoGenSerialNumFormat"> | |
288 | + <el-input v-model="diaForm.autoGenSerialNumFormat" placeholder="请输入自动生成序列号表达式"/> | |
405 | 289 | </el-form-item> |
406 | 290 | </el-col> |
407 | 291 | </el-row> |
... | ... | @@ -409,21 +293,13 @@ |
409 | 293 | <el-row :gutter="20"> |
410 | 294 | <el-col :span="12"> |
411 | 295 | <el-form-item label="序列号模版" prop="snTemplateCode"> |
412 | - <el-input | |
413 | - v-model="diaForm.snTemplateCode" | |
414 | - maxlength="11" | |
415 | - placeholder="请输入手机序列号模版" | |
416 | - /> | |
296 | + <el-input v-model="diaForm.snTemplateCode" maxlength="11" placeholder="请输入手机序列号模版"/> | |
417 | 297 | </el-form-item> |
418 | 298 | </el-col> |
419 | 299 | |
420 | 300 | <el-col :span="12"> |
421 | 301 | <el-form-item label="临期预警天数" prop="expiringDays"> |
422 | - <el-input | |
423 | - v-model="diaForm.expiringDays" | |
424 | - maxlength="11" | |
425 | - placeholder="请输入临期预警天数" | |
426 | - /> | |
302 | + <el-input v-model="diaForm.expiringDays" maxlength="11" placeholder="请输入临期预警天数"/> | |
427 | 303 | </el-form-item> |
428 | 304 | </el-col> |
429 | 305 | </el-row> |
... | ... | @@ -431,21 +307,14 @@ |
431 | 307 | <el-row :gutter="20"> |
432 | 308 | <el-col :span="12"> |
433 | 309 | <el-form-item label="收货预警天数" prop="minShelfLifeDays"> |
434 | - <el-input | |
435 | - v-model="diaForm.minShelfLifeDays" | |
436 | - maxlength="11" | |
437 | - placeholder="请输入收货预警天数" | |
438 | - /> | |
310 | + <el-input v-model="diaForm.minShelfLifeDays" maxlength="11" placeholder="请输入收货预警天数"/> | |
439 | 311 | </el-form-item> |
440 | 312 | </el-col> |
441 | 313 | |
442 | 314 | <el-col :span="12"> |
443 | 315 | <el-form-item label="是否AGV区域发货" prop="userDef1"> |
444 | - <el-select | |
445 | - v-model="diaForm.userDef1" | |
446 | - maxlength="11" | |
447 | - placeholder="请选择是否AGV区域发货" | |
448 | - > | |
316 | + <el-select v-model="diaForm.userDef1" maxlength="11" placeholder="请选择是否AGV区域发货"> | |
317 | + | |
449 | 318 | </el-select> |
450 | 319 | </el-form-item> |
451 | 320 | </el-col> |
... | ... | @@ -454,11 +323,9 @@ |
454 | 323 | <el-row :gutter="20"> |
455 | 324 | <el-col :span="12"> |
456 | 325 | <el-form-item label="是否有效" prop="enable"> |
457 | - <el-switch | |
458 | - v-model="diaForm.enable" | |
459 | - active-value="1" | |
460 | - inactive-value="0" | |
461 | - /> | |
326 | + <el-switch v-model="diaForm.enable" | |
327 | + :active-value="0" | |
328 | + :inactive-value="1"/> | |
462 | 329 | </el-form-item> |
463 | 330 | </el-col> |
464 | 331 | </el-row> |
... | ... | @@ -468,175 +335,177 @@ |
468 | 335 | <el-button type="primary" @click="submitForm">确 定</el-button> |
469 | 336 | <el-button @click="cancel">取 消</el-button> |
470 | 337 | </div> |
338 | + | |
471 | 339 | </el-dialog> |
340 | + | |
472 | 341 | </div> |
473 | 342 | </template> |
474 | 343 | |
475 | 344 | <script> |
476 | -import { | |
477 | - queryList, | |
478 | - edit, | |
479 | - add, | |
480 | - remove, | |
481 | - getById, | |
482 | -} from "@/api/config/InventoryInfo/materialType"; | |
483 | -import { getDicts } from "@/api/system/dict/data"; | |
484 | -import { queryList as queryCompany } from "@/api/config/InventoryInfo/company"; | |
485 | -import { listHeader as queryReceiptFlow } from "@/api/config/receipt/statusFlowHeader/header"; | |
486 | -import { listFlowHeader as queryShipmentFlow } from "@/api/config/shipment/statusFlowHeader/header"; | |
487 | - | |
488 | -export default { | |
489 | - name: "materialType", | |
490 | - data() { | |
491 | - return { | |
492 | - // 查询参数 | |
493 | - queryParams: { | |
494 | - pageNum: 1, | |
495 | - pageSize: 10, | |
496 | - }, | |
497 | - //对话框表单 | |
498 | - diaForm: {}, | |
499 | - //表格数据 | |
500 | - tableData: [], | |
501 | - //下拉框数据 | |
502 | - selectionData: {}, | |
503 | - //字典数据 | |
504 | - enableOptions: [], | |
505 | - // 非单个禁用 | |
506 | - single: true, | |
507 | - //非多个禁用 | |
508 | - multiple: true, | |
509 | - // 对话框标题 | |
510 | - title: "", | |
511 | - totalSize: 0, | |
512 | - loading: true, | |
513 | - date: [], | |
514 | - //弹窗显示开关 | |
515 | - diaOpen: false, | |
516 | - //增加与修改转换开关 | |
517 | - switch1: "", | |
518 | - ids: [], | |
519 | - rules: { | |
520 | - code: [{ required: true, message: "请输入物料编码", trigger: "blur" }], | |
521 | - name: [{ required: true, message: "请输入物料名称", trigger: "blur" }], | |
522 | - }, | |
523 | - tips: false, | |
524 | - }; | |
525 | - }, | |
526 | - created() { | |
527 | - this.handleQuery(); | |
528 | - getDicts("enable").then((response) => { | |
529 | - this.enableOptions = response.data; | |
530 | - }); | |
531 | - queryCompany().then((response) => { | |
532 | - this.selectionData.company = response.rows; | |
533 | - }); | |
534 | - queryReceiptFlow().then((response) => { | |
535 | - this.selectionData.receiptFlow = response.rows; | |
536 | - }); | |
537 | - queryShipmentFlow().then((response) => { | |
538 | - this.selectionData.shipmentFlow = response.rows; | |
539 | - }); | |
540 | - }, | |
541 | - methods: { | |
542 | - handleQuery() { | |
543 | - this.loading = true; | |
544 | - queryList(this.queryParams).then((res) => { | |
545 | - this.tableData = res.rows; | |
546 | - this.totalSize = res.total; | |
547 | - this.loading = false; | |
548 | - }); | |
549 | - }, | |
550 | - //字典翻译 | |
551 | - diaryFormat(param) { | |
552 | - return this.selectDictLabel(this.enableOptions, param); | |
553 | - }, | |
554 | - // 清空查询列表 | |
555 | - resetParams(formName) { | |
556 | - this.queryParams.code = ""; | |
557 | - this.queryParams.name = ""; | |
558 | - this.$refs[formName].resetFields(); | |
559 | - this.handleQuery(); | |
560 | - }, | |
561 | - // 重置对话框表单 | |
562 | - reset() { | |
563 | - this.diaForm = {}; | |
564 | - this.resetForm("diaForm"); | |
565 | - }, | |
566 | - //关闭对话框 | |
567 | - cancel() { | |
568 | - this.diaOpen = false; | |
569 | - this.reset(); | |
570 | - }, | |
571 | - // 多选框选中数据 | |
572 | - handleSelectionChange(selection) { | |
573 | - this.ids = selection.map((item) => item.id); | |
574 | - this.single = selection.length != 1; | |
575 | - this.multiple = !selection.length; | |
576 | - }, | |
345 | + import { queryList, edit, add, remove, getById } from '@/api/config/InventoryInfo/materialType' | |
346 | + import { getDicts } from '@/api/system/dict/data' | |
347 | + import { queryList as queryCompany } from '@/api/config/InventoryInfo/company' | |
348 | + import { listHeader as queryReceiptFlow} from '@/api/config/receipt/statusFlowHeader/header' | |
349 | + import { listFlowHeader as queryShipmentFlow} from '@/api/config/shipment/statusFlowHeader/header' | |
577 | 350 | |
578 | - /** 新增按钮操作 */ | |
579 | - handleAdd() { | |
580 | - this.switch1 = false; | |
581 | - this.reset(); | |
582 | - this.title = "添加物料类型"; | |
583 | - this.diaOpen = true; | |
584 | - }, | |
585 | - /** 修改按钮操作 */ | |
586 | - handleUpdate(row) { | |
587 | - this.reset(); | |
588 | - this.switch1 = true; | |
589 | - const id = row.id || this.ids; | |
590 | - getById(id).then((response) => { | |
591 | - this.diaForm = response.data; | |
592 | - this.title = "修改物料类型"; | |
593 | - this.diaOpen = true; | |
594 | - }); | |
351 | + export default { | |
352 | + name:'materialType', | |
353 | + data() { | |
354 | + return { | |
355 | + // 查询参数 | |
356 | + queryParams: { | |
357 | + pageNum: 1, | |
358 | + pageSize: 10 | |
359 | + }, | |
360 | + //对话框表单 | |
361 | + diaForm: {}, | |
362 | + //表格数据 | |
363 | + tableData: [], | |
364 | + //下拉框数据 | |
365 | + selectionData:{}, | |
366 | + //字典数据 | |
367 | + enableOptions:[], | |
368 | + // 显示搜索条件 | |
369 | + showSearch: true, | |
370 | + // 非单个禁用 | |
371 | + single: true, | |
372 | + //非多个禁用 | |
373 | + multiple: true, | |
374 | + // 对话框标题 | |
375 | + title: '', | |
376 | + totalSize: 0, | |
377 | + loading: true, | |
378 | + date: [], | |
379 | + //弹窗显示开关 | |
380 | + diaOpen: false, | |
381 | + //增加与修改转换开关 | |
382 | + switch1: '', | |
383 | + ids: [], | |
384 | + rules: { | |
385 | + code: [ | |
386 | + { required: true, message: '请输入物料编码', trigger: 'blur' } | |
387 | + ], | |
388 | + name: [ | |
389 | + { required: true, message: '请输入物料名称', trigger: 'blur' } | |
390 | + ] | |
391 | + }, | |
392 | + tips: false | |
393 | + } | |
595 | 394 | }, |
596 | - /** 删除按钮操作 */ | |
597 | - handleDelete(row) { | |
598 | - const code = row.code || this.ids; | |
599 | - this.$confirm('是否确认删除类型编号为"' + code + '"的数据项?', "警告", { | |
600 | - confirmButtonText: "确定", | |
601 | - cancelButtonText: "取消", | |
602 | - type: "warning", | |
395 | + created() { | |
396 | + this.handleQuery() | |
397 | + getDicts('enable').then(response => { | |
398 | + this.enableOptions = response.data | |
399 | + }) | |
400 | + queryCompany().then(response => { | |
401 | + this.selectionData.company = response.rows | |
603 | 402 | }) |
604 | - .then(function () { | |
605 | - return remove(code); | |
403 | + queryReceiptFlow().then(response => { | |
404 | + this.selectionData.receiptFlow = response.rows | |
405 | + }) | |
406 | + queryShipmentFlow().then(response => { | |
407 | + this.selectionData.shipmentFlow = response.rows | |
408 | + }) | |
409 | + console.log(this.selectionData) | |
410 | + }, | |
411 | + methods: { | |
412 | + handleQuery() { | |
413 | + this.loading = true | |
414 | + queryList(this.queryParams).then(res => { | |
415 | + this.tableData = res.rows | |
416 | + this.totalSize = res.total | |
417 | + this.loading = false | |
606 | 418 | }) |
607 | - .then(() => { | |
608 | - this.handleQuery(); | |
609 | - this.msgSuccess("删除成功"); | |
419 | + }, | |
420 | + //字典翻译 | |
421 | + diaryFormat(param){ | |
422 | + return this.selectDictLabel(this.enableOptions,param) | |
423 | + }, | |
424 | + // 清空查询列表 | |
425 | + resetParams(formName) { | |
426 | + this.queryParams.code = '' | |
427 | + this.queryParams.name = '' | |
428 | + this.$refs[formName].resetFields() | |
429 | + this.handleQuery() | |
430 | + }, | |
431 | + // 重置对话框表单 | |
432 | + reset() { | |
433 | + this.diaForm = {} | |
434 | + this.resetForm('diaForm') | |
435 | + }, | |
436 | + //关闭对话框 | |
437 | + cancel() { | |
438 | + this.diaOpen = false | |
439 | + this.reset() | |
440 | + }, | |
441 | + // 多选框选中数据 | |
442 | + handleSelectionChange(selection) { | |
443 | + this.ids = selection.map(item => item.id) | |
444 | + this.single = selection.length != 1 | |
445 | + this.multiple = !selection.length | |
446 | + }, | |
447 | + | |
448 | + /** 新增按钮操作 */ | |
449 | + handleAdd() { | |
450 | + this.switch1 = false | |
451 | + this.reset() | |
452 | + this.title = '添加物料类型' | |
453 | + this.diaOpen = true | |
454 | + }, | |
455 | + /** 修改按钮操作 */ | |
456 | + handleUpdate(row) { | |
457 | + this.reset() | |
458 | + this.switch1 = true | |
459 | + const id = row.id || this.ids | |
460 | + getById(id).then(response => { | |
461 | + this.diaForm = response.data | |
462 | + this.title = '修改物料类型' | |
463 | + this.diaOpen = true | |
610 | 464 | }) |
611 | - .catch(function () {}); | |
612 | - }, | |
613 | - /** 提交按钮 */ | |
614 | - submitForm: function () { | |
615 | - this.$refs["diaForm"].validate((valid) => { | |
616 | - if (valid) { | |
617 | - if (this.switch1) { | |
618 | - edit(this.diaForm).then((response) => { | |
619 | - if (response.code === 200) { | |
620 | - this.msgSuccess("修改成功"); | |
621 | - this.diaOpen = false; | |
622 | - this.handleQuery(); | |
623 | - } | |
624 | - }); | |
625 | - } else { | |
626 | - add(this.diaForm).then((response) => { | |
627 | - if (response.code === 200) { | |
628 | - this.msgSuccess("新增成功"); | |
629 | - this.diaOpen = false; | |
630 | - this.handleQuery(); | |
631 | - } | |
632 | - }); | |
465 | + }, | |
466 | + /** 删除按钮操作 */ | |
467 | + handleDelete(row) { | |
468 | + const code = row.code || this.ids | |
469 | + this.$confirm('是否确认删除类型编号为"' + code + '"的数据项?', '警告', { | |
470 | + confirmButtonText: '确定', | |
471 | + cancelButtonText: '取消', | |
472 | + type: 'warning' | |
473 | + }).then(function() { | |
474 | + return remove(code) | |
475 | + }).then(() => { | |
476 | + this.handleQuery() | |
477 | + this.msgSuccess('删除成功') | |
478 | + }).catch(function() { | |
479 | + }) | |
480 | + }, | |
481 | + /** 提交按钮 */ | |
482 | + submitForm: function() { | |
483 | + this.$refs['diaForm'].validate(valid => { | |
484 | + if (valid) { | |
485 | + if (this.switch1) { | |
486 | + edit(this.diaForm).then(response => { | |
487 | + if (response.code === 200) { | |
488 | + this.msgSuccess('修改成功') | |
489 | + this.diaOpen = false | |
490 | + this.handleQuery() | |
491 | + } | |
492 | + }) | |
493 | + } else { | |
494 | + add(this.diaForm).then(response => { | |
495 | + if (response.code === 200) { | |
496 | + this.msgSuccess('新增成功') | |
497 | + this.diaOpen = false | |
498 | + this.handleQuery() | |
499 | + } | |
500 | + }) | |
501 | + } | |
633 | 502 | } |
634 | - } | |
635 | - }); | |
636 | - }, | |
637 | - }, | |
638 | -}; | |
503 | + }) | |
504 | + } | |
505 | + } | |
506 | + } | |
639 | 507 | </script> |
640 | 508 | |
641 | 509 | <style scoped> |
510 | + | |
642 | 511 | </style> |
... | ... |
src/views/config/inventoryInfo/supplies/materialUnit/index.vue
1 | 1 | <template> |
2 | 2 | <div class="app-container"> |
3 | - <el-form ref="form" :model="queryParams" inline> | |
3 | + <el-form ref="form" | |
4 | + :model="queryParams" | |
5 | + v-show="showSearch" | |
6 | + inline> | |
4 | 7 | <el-form-item label="编码"> |
5 | 8 | <el-input |
6 | 9 | v-model="queryParams.code" |
... | ... | @@ -65,16 +68,10 @@ |
65 | 68 | >删除 |
66 | 69 | </el-button> |
67 | 70 | </el-col> |
68 | - <div class="top-right-btn"> | |
69 | - <el-row> | |
70 | - <el-tooltip class="item" effect="dark" content="隐藏搜索" placement="top"> | |
71 | - <el-button icon="el-icon-search" circle></el-button> | |
72 | - </el-tooltip> | |
73 | - <el-tooltip class="item" effect="dark" content="刷新" placement="top"> | |
74 | - <el-button icon="el-icon-refresh" circle></el-button> | |
75 | - </el-tooltip> | |
76 | - </el-row> | |
77 | - </div> | |
71 | + <right-toolbar | |
72 | + :showSearch.sync="showSearch" | |
73 | + @queryTable="resetParams('form')" | |
74 | + ></right-toolbar> | |
78 | 75 | </el-row> |
79 | 76 | <el-table |
80 | 77 | ref="multipleTable" |
... | ... | @@ -181,8 +178,8 @@ |
181 | 178 | <el-col :span="12"> |
182 | 179 | <el-form-item label="是否有效" prop="enable"> |
183 | 180 | <el-switch v-model="diaForm.enable" |
184 | - active-value="1" | |
185 | - inactive-value="0"/> | |
181 | + :active-value="0" | |
182 | + :inactive-value="1"/> | |
186 | 183 | </el-form-item> |
187 | 184 | </el-col> |
188 | 185 | </el-row> |
... | ... | @@ -213,6 +210,8 @@ |
213 | 210 | }, |
214 | 211 | //对话框表单 |
215 | 212 | diaForm: {}, |
213 | + // 显示搜索条件 | |
214 | + showSearch: true, | |
216 | 215 | //表格数据 |
217 | 216 | tableData: [], |
218 | 217 | //字典翻译数据 |
... | ... |
src/views/config/inventoryInfo/vessel/container/index.vue
1 | 1 | <template> |
2 | 2 | <div class="app-container"> |
3 | - <el-form ref="form" :model="queryParams" inline> | |
3 | + <el-form ref="form" | |
4 | + :model="queryParams" | |
5 | + v-show="showSearch" | |
6 | + inline> | |
4 | 7 | <el-form-item label="容器编号"> |
5 | 8 | <el-input |
6 | 9 | v-model="queryParams.code" |
... | ... | @@ -97,16 +100,10 @@ |
97 | 100 | >打印 |
98 | 101 | </el-button> |
99 | 102 | </el-col> |
100 | - <div class="top-right-btn"> | |
101 | - <el-row> | |
102 | - <el-tooltip class="item" effect="dark" content="隐藏搜索" placement="top"> | |
103 | - <el-button icon="el-icon-search" circle></el-button> | |
104 | - </el-tooltip> | |
105 | - <el-tooltip class="item" effect="dark" content="刷新" placement="top"> | |
106 | - <el-button icon="el-icon-refresh" circle></el-button> | |
107 | - </el-tooltip> | |
108 | - </el-row> | |
109 | - </div> | |
103 | + <right-toolbar | |
104 | + :showSearch.sync="showSearch" | |
105 | + @queryTable="resetParams('form')" | |
106 | + ></right-toolbar> | |
110 | 107 | </el-row> |
111 | 108 | <el-table |
112 | 109 | ref="multipleTable" |
... | ... | @@ -131,12 +128,12 @@ |
131 | 128 | {{diaryFormat(scope.row.status,'status')}}</el-button> |
132 | 129 | </template> |
133 | 130 | </el-table-column> |
134 | - <el-table-column prop="enable" label="是否有效"> | |
135 | - <template slot-scope="scope"> | |
136 | - <el-button :type="scope.row.enable | enableFilter" round size="mini"> | |
137 | - {{diaryFormat(scope.row.enable,'enable')}}</el-button> | |
138 | - </template> | |
139 | - </el-table-column> | |
131 | +<!-- <el-table-column prop="enable" label="是否有效">--> | |
132 | +<!-- <template slot-scope="scope">--> | |
133 | +<!-- <el-button :type="scope.row.enable | enableFilter" round size="mini">--> | |
134 | +<!-- {{diaryFormat(scope.row.enable,'enable')}}</el-button>--> | |
135 | +<!-- </template>--> | |
136 | +<!-- </el-table-column>--> | |
140 | 137 | <el-table-column prop="created" label="创建时间" min-width="165"> |
141 | 138 | <template slot-scope="scope"> |
142 | 139 | <span>{{parseTime(scope.row.created)}}</span> |
... | ... | @@ -197,11 +194,13 @@ |
197 | 194 | pageNum: 1, |
198 | 195 | pageSize: 10 |
199 | 196 | }, |
197 | + // 显示搜索条件 | |
198 | + showSearch: true, | |
200 | 199 | //搜索下拉框 |
201 | 200 | containerType:[], |
202 | 201 | containerStatus:[], |
203 | 202 | //有效字典数据 |
204 | - enableOptions:[], | |
203 | + // enableOptions:[], | |
205 | 204 | dateRange:[], |
206 | 205 | //表格数据 |
207 | 206 | tableData: [], |
... | ... | @@ -247,11 +246,11 @@ |
247 | 246 | this.containerType.push(item) |
248 | 247 | }) |
249 | 248 | }) |
250 | - getDicts("enable").then(response=>{ | |
251 | - response.data.forEach(item=>{ | |
252 | - this.enableOptions.push(item) | |
253 | - }) | |
254 | - }) | |
249 | + // getDicts("enable").then(response=>{ | |
250 | + // response.data.forEach(item=>{ | |
251 | + // this.enableOptions.push(item) | |
252 | + // }) | |
253 | + // }) | |
255 | 254 | getDicts('containerStatus').then(response=>{ |
256 | 255 | response.data.forEach(item=>{ |
257 | 256 | this.containerStatus.push(item) |
... | ... |
src/views/config/inventoryInfo/vessel/containerCapacity/index.vue
1 | 1 | <template> |
2 | 2 | <div class="app-container"> |
3 | - <el-form ref="form" :model="queryParams" inline> | |
3 | + <el-form ref="form" | |
4 | + :model="queryParams" | |
5 | + v-show="showSearch" | |
6 | + inline> | |
4 | 7 | <el-form-item label="容器类型编码"> |
5 | 8 | <el-input |
6 | 9 | v-model="queryParams.containerType" |
... | ... | @@ -75,16 +78,10 @@ |
75 | 78 | >删除 |
76 | 79 | </el-button> |
77 | 80 | </el-col> |
78 | - <div class="top-right-btn"> | |
79 | - <el-row> | |
80 | - <el-tooltip class="item" effect="dark" content="隐藏搜索" placement="top"> | |
81 | - <el-button icon="el-icon-search" circle></el-button> | |
82 | - </el-tooltip> | |
83 | - <el-tooltip class="item" effect="dark" content="刷新" placement="top"> | |
84 | - <el-button icon="el-icon-refresh" circle></el-button> | |
85 | - </el-tooltip> | |
86 | - </el-row> | |
87 | - </div> | |
81 | + <right-toolbar | |
82 | + :showSearch.sync="showSearch" | |
83 | + @queryTable="resetParams('form')" | |
84 | + ></right-toolbar> | |
88 | 85 | </el-row> |
89 | 86 | <el-table |
90 | 87 | ref="multipleTable" |
... | ... | @@ -204,6 +201,8 @@ |
204 | 201 | pageNum: 1, |
205 | 202 | pageSize: 10 |
206 | 203 | }, |
204 | + // 显示搜索条件 | |
205 | + showSearch: true, | |
207 | 206 | dateRange:[], |
208 | 207 | pageSize: 10, |
209 | 208 | //对话框表单 |
... | ... |
src/views/config/inventoryInfo/vessel/containerType/index.vue
1 | 1 | <template> |
2 | 2 | <div class="app-container"> |
3 | - <el-form ref="form" :model="queryParams" inline> | |
3 | + <el-form ref="form" | |
4 | + :model="queryParams" | |
5 | + v-show="showSearch" | |
6 | + inline> | |
4 | 7 | <el-form-item label="箱型"> |
5 | 8 | <el-input |
6 | 9 | v-model="queryParams.code" |
... | ... | @@ -57,16 +60,10 @@ |
57 | 60 | >删除 |
58 | 61 | </el-button> |
59 | 62 | </el-col> |
60 | - <div class="top-right-btn"> | |
61 | - <el-row> | |
62 | - <el-tooltip class="item" effect="dark" content="隐藏搜索" placement="top"> | |
63 | - <el-button icon="el-icon-search" circle></el-button> | |
64 | - </el-tooltip> | |
65 | - <el-tooltip class="item" effect="dark" content="刷新" placement="top"> | |
66 | - <el-button icon="el-icon-refresh" circle></el-button> | |
67 | - </el-tooltip> | |
68 | - </el-row> | |
69 | - </div> | |
63 | + <right-toolbar | |
64 | + :showSearch.sync="showSearch" | |
65 | + @queryTable="resetParams('form')" | |
66 | + ></right-toolbar> | |
70 | 67 | </el-row> |
71 | 68 | <el-table |
72 | 69 | ref="multipleTable" |
... | ... | @@ -92,11 +89,10 @@ |
92 | 89 | <el-table-column prop="maxWeight" label="最大重量kg" min-width="90"></el-table-column> |
93 | 90 | <el-table-column prop="fillPercent" label="装满度%"></el-table-column> |
94 | 91 | <el-table-column prop="useAsDefault" label="默认容器"> |
95 | - | |
96 | 92 | </el-table-column> |
97 | 93 | <el-table-column prop="enable" label="是否启用"> |
98 | 94 | <template slot-scope="scope"> |
99 | - <el-tag :type="scope.row.enable | enableFilter">{{dicForm(scope.row.enable)}}</el-tag> | |
95 | + <el-button size="mini" round :type="scope.row.enable | enableFilter">{{dicForm(scope.row.enable)}}</el-button> | |
100 | 96 | </template> |
101 | 97 | </el-table-column> |
102 | 98 | <el-table-column prop="created" label="创建时间" min-width="165"> |
... | ... | @@ -214,8 +210,8 @@ |
214 | 210 | <el-col :span="12"> |
215 | 211 | <el-form-item label="是否有效" prop="enable"> |
216 | 212 | <el-switch v-model="diaForm.enable" |
217 | - active-value="1" | |
218 | - inactive-value="0"/> | |
213 | + :active-value="0" | |
214 | + :inactive-value="1"/> | |
219 | 215 | </el-form-item> |
220 | 216 | </el-col> |
221 | 217 | </el-row> |
... | ... | @@ -246,6 +242,8 @@ |
246 | 242 | }, |
247 | 243 | totalSize: 10, |
248 | 244 | enableOptions:[], |
245 | + // 显示搜索条件 | |
246 | + showSearch: true, | |
249 | 247 | //对话框表单 |
250 | 248 | diaForm: {}, |
251 | 249 | //表格数据 |
... | ... |
src/views/config/inventoryInfo/wareHouseManage/index.vue
1 | 1 | <template> |
2 | 2 | <div class="app-container"> |
3 | - <el-form ref="form" :model="queryParams" inline> | |
3 | + <el-form ref="form" | |
4 | + :model="queryParams" | |
5 | + inline | |
6 | + v-show="showSearch"> | |
4 | 7 | <el-form-item label="仓库编码"> |
5 | 8 | <el-input |
6 | 9 | v-model="queryParams.code" |
7 | 10 | clearable |
8 | 11 | size="small" |
9 | 12 | style="width: 240px" |
10 | - @clear="handleQuery" | |
11 | - ></el-input> | |
13 | + @clear="handleQuery"></el-input> | |
12 | 14 | </el-form-item> |
13 | 15 | <el-form-item label="名称"> |
14 | 16 | <el-input |
... | ... | @@ -16,23 +18,16 @@ |
16 | 18 | clearable |
17 | 19 | size="small" |
18 | 20 | style="width: 240px" |
19 | - @clear="handleQuery" | |
20 | - ></el-input> | |
21 | + @clear="handleQuery"></el-input> | |
21 | 22 | </el-form-item> |
22 | 23 | <el-form-item> |
23 | - <el-button | |
24 | - size="mini" | |
25 | - icon="el-icon-search" | |
26 | - type="cyan" | |
27 | - @click="handleQuery" | |
28 | - >搜索</el-button | |
29 | - > | |
30 | - <el-button | |
31 | - size="mini" | |
32 | - icon="el-icon-refresh" | |
33 | - @click="resetParams('form')" | |
34 | - >重置</el-button | |
35 | - > | |
24 | + <el-button size="mini" | |
25 | + icon="el-icon-search" | |
26 | + type="cyan" | |
27 | + @click="handleQuery">搜索</el-button> | |
28 | + <el-button size="mini" | |
29 | + icon="el-icon-refresh" | |
30 | + @click="resetParams('form')">重置</el-button> | |
36 | 31 | </el-form-item> |
37 | 32 | </el-form> |
38 | 33 | |
... | ... | @@ -44,7 +39,7 @@ |
44 | 39 | size="mini" |
45 | 40 | @click="handleAdd" |
46 | 41 | v-hasPermi="['config:warehouse:add']" |
47 | - >新增 | |
42 | + >新增 | |
48 | 43 | </el-button> |
49 | 44 | </el-col> |
50 | 45 | <el-col :span="1.5"> |
... | ... | @@ -55,55 +50,40 @@ |
55 | 50 | :disabled="single" |
56 | 51 | @click="handleUpdate" |
57 | 52 | v-hasPermi="['']" |
58 | - >修改 | |
53 | + >修改 | |
59 | 54 | </el-button> |
60 | 55 | </el-col> |
61 | - <!-- <el-col :span="1.5">--> | |
62 | - <!-- <el-button--> | |
63 | - <!-- type="danger"--> | |
64 | - <!-- icon="el-icon-delete"--> | |
65 | - <!-- size="mini"--> | |
66 | - <!-- :disabled="multiple"--> | |
67 | - <!-- @click="handleDelete"--> | |
68 | - <!-- v-hasPermi="['']"--> | |
69 | - <!-- >删除--> | |
70 | - <!-- </el-button>--> | |
71 | - <!-- </el-col>--> | |
72 | - <!-- <el-col :span="1.5">--> | |
73 | - <!-- <el-button--> | |
74 | - <!-- type="warning"--> | |
75 | - <!-- icon="el-icon-copy"--> | |
76 | - <!-- size="mini"--> | |
77 | - <!-- @click="handleCopy"--> | |
78 | - <!-- v-hasPermi="['']"--> | |
79 | - <!-- >复制仓库--> | |
80 | - <!-- </el-button>--> | |
81 | - <!-- </el-col>--> | |
82 | - <div class="top-right-btn"> | |
83 | - <el-row> | |
84 | - <el-tooltip | |
85 | - class="item" | |
86 | - effect="dark" | |
87 | - content="隐藏搜索" | |
88 | - placement="top" | |
89 | - > | |
90 | - <el-button icon="el-icon-search" circle></el-button> | |
91 | - </el-tooltip> | |
92 | - <el-tooltip class="item" effect="dark" content="刷新" placement="top"> | |
93 | - <el-button icon="el-icon-refresh" circle></el-button> | |
94 | - </el-tooltip> | |
95 | - </el-row> | |
96 | - </div> | |
56 | +<!-- <el-col :span="1.5">--> | |
57 | +<!-- <el-button--> | |
58 | +<!-- type="danger"--> | |
59 | +<!-- icon="el-icon-delete"--> | |
60 | +<!-- size="mini"--> | |
61 | +<!-- :disabled="multiple"--> | |
62 | +<!-- @click="handleDelete"--> | |
63 | +<!-- v-hasPermi="['']"--> | |
64 | +<!-- >删除--> | |
65 | +<!-- </el-button>--> | |
66 | +<!-- </el-col>--> | |
67 | +<!-- <el-col :span="1.5">--> | |
68 | +<!-- <el-button--> | |
69 | +<!-- type="warning"--> | |
70 | +<!-- icon="el-icon-copy"--> | |
71 | +<!-- size="mini"--> | |
72 | +<!-- @click="handleCopy"--> | |
73 | +<!-- v-hasPermi="['']"--> | |
74 | +<!-- >复制仓库--> | |
75 | +<!-- </el-button>--> | |
76 | +<!-- </el-col>--> | |
77 | + <right-toolbar | |
78 | + :showSearch.sync="showSearch" | |
79 | + @queryTable="resetParams('form')" | |
80 | + ></right-toolbar> | |
97 | 81 | </el-row> |
98 | 82 | <el-table |
99 | 83 | ref="multipleTable" |
100 | 84 | :data="tableData" |
101 | - :header-cell-style="{ | |
102 | - 'text-align': 'center', | |
103 | - background: '#F8F8F9', | |
104 | - color: '#515A6E', | |
105 | - }" | |
106 | - :cell-style="{ 'text-align': 'center' }" | |
85 | + :header-cell-style="{'text-align':'center',background:'#F8F8F9',color:'#515A6E'}" | |
86 | + :cell-style="{'text-align':'center'}" | |
107 | 87 | tooltip-effect="dark" |
108 | 88 | style="width: 100%" |
109 | 89 | v-loading="loading" |
... | ... | @@ -111,7 +91,7 @@ |
111 | 91 | > |
112 | 92 | <el-table-column type="selection" width="55"></el-table-column> |
113 | 93 | <el-table-column prop="code" label="仓库编码"></el-table-column> |
114 | - <el-table-column prop="name" label="名称"></el-table-column> | |
94 | + <el-table-column prop="name" label="名称" :show-overflow-tooltip="true" min-width="100"></el-table-column> | |
115 | 95 | <el-table-column prop="orgCode" label="公司编码"></el-table-column> |
116 | 96 | <el-table-column prop="address" label="地址1"></el-table-column> |
117 | 97 | <el-table-column prop="city" label="城市"></el-table-column> |
... | ... | @@ -122,12 +102,7 @@ |
122 | 102 | <span>{{ parseTime(scope.row.created) }}</span> |
123 | 103 | </template> |
124 | 104 | </el-table-column> |
125 | - <el-table-column | |
126 | - prop="createdBy" | |
127 | - label="创建用户" | |
128 | - :show-overflow-tooltip="true" | |
129 | - min-width="100" | |
130 | - ></el-table-column> | |
105 | + <el-table-column prop="createdBy" label="创建用户" :show-overflow-tooltip="true" min-width="100"></el-table-column> | |
131 | 106 | <el-table-column prop="lastUpdated" label="更新时间" min-width="165"> |
132 | 107 | <template slot-scope="scope"> |
133 | 108 | <span>{{ parseTime(scope.row.lastUpdated) }}</span> |
... | ... | @@ -137,7 +112,7 @@ |
137 | 112 | <el-table-column prop="enable" label="是否有效"> |
138 | 113 | <template slot-scope="scope"> |
139 | 114 | <el-button size="mini" :type="scope.row.enable | enableFilter" round> |
140 | - {{ diaryFormat(scope.row.enable, "enable") }} | |
115 | + {{diaryFormat(scope.row.enable,'enable')}} | |
141 | 116 | </el-button> |
142 | 117 | </template> |
143 | 118 | </el-table-column> |
... | ... | @@ -148,14 +123,14 @@ |
148 | 123 | type="text" |
149 | 124 | icon="el-icon-edit" |
150 | 125 | @click="handleUpdate(scope.row)" |
151 | - >编辑 | |
126 | + >编辑 | |
152 | 127 | </el-button> |
153 | 128 | <el-button |
154 | 129 | size="mini" |
155 | 130 | type="text" |
156 | 131 | icon="el-icon-delete" |
157 | 132 | @click="handleDelete(scope.row)" |
158 | - >删除 | |
133 | + >删除 | |
159 | 134 | </el-button> |
160 | 135 | </template> |
161 | 136 | </el-table-column> |
... | ... | @@ -169,6 +144,7 @@ |
169 | 144 | @pagination="handleQuery" |
170 | 145 | /> |
171 | 146 | |
147 | + | |
172 | 148 | <!--增加与编辑弹窗页面--> |
173 | 149 | <el-dialog |
174 | 150 | :title="title" |
... | ... | @@ -176,23 +152,17 @@ |
176 | 152 | width="700px" |
177 | 153 | append-to-body |
178 | 154 | > |
179 | - <el-form | |
180 | - ref="diaForm" | |
181 | - :title="title" | |
182 | - :model="diaForm" | |
183 | - :rules="rules" | |
184 | - label-width="100px" | |
185 | - > | |
155 | + <el-form ref="diaForm" :title="title" :model="diaForm" :rules="rules" label-width="100px"> | |
186 | 156 | <el-row :gutter="20"> |
187 | 157 | <el-col :span="12"> |
188 | 158 | <el-form-item label="仓库编码" prop="code"> |
189 | - <el-input v-model="diaForm.code" placeholder="请输入仓库编码" /> | |
159 | + <el-input v-model="diaForm.code" placeholder="请输入仓库编码"/> | |
190 | 160 | </el-form-item> |
191 | 161 | </el-col> |
192 | 162 | |
193 | 163 | <el-col :span="12"> |
194 | 164 | <el-form-item label="名称" prop="name"> |
195 | - <el-input v-model="diaForm.name" placeholder="请输入名称" /> | |
165 | + <el-input v-model="diaForm.name" placeholder="请输入名称"/> | |
196 | 166 | </el-form-item> |
197 | 167 | </el-col> |
198 | 168 | </el-row> |
... | ... | @@ -200,16 +170,13 @@ |
200 | 170 | <el-row :gutter="20"> |
201 | 171 | <el-col :span="12"> |
202 | 172 | <el-form-item label="公司编码" prop="orgCode"> |
203 | - <el-input | |
204 | - v-model="diaForm.orgCode" | |
205 | - placeholder="请输入公司编码" | |
206 | - /> | |
173 | + <el-input v-model="diaForm.orgCode" placeholder="请输入公司编码"/> | |
207 | 174 | </el-form-item> |
208 | 175 | </el-col> |
209 | 176 | |
210 | 177 | <el-col :span="12"> |
211 | 178 | <el-form-item label="地址1" prop="address1"> |
212 | - <el-input v-model="diaForm.address1" placeholder="请输入地址1" /> | |
179 | + <el-input v-model="diaForm.address1" placeholder="请输入地址1"/> | |
213 | 180 | </el-form-item> |
214 | 181 | </el-col> |
215 | 182 | </el-row> |
... | ... | @@ -217,13 +184,13 @@ |
217 | 184 | <el-row :gutter="20"> |
218 | 185 | <el-col :span="12"> |
219 | 186 | <el-form-item label="地址2" prop="address2"> |
220 | - <el-input v-model="diaForm.address2" placeholder="请输入地址2" /> | |
187 | + <el-input v-model="diaForm.address2" placeholder="请输入地址2"/> | |
221 | 188 | </el-form-item> |
222 | 189 | </el-col> |
223 | 190 | |
224 | 191 | <el-col :span="12"> |
225 | 192 | <el-form-item label="城市" prop="city"> |
226 | - <el-input v-model="diaForm.city" placeholder="请输入城市" /> | |
193 | + <el-input v-model="diaForm.city" placeholder="请输入城市"/> | |
227 | 194 | </el-form-item> |
228 | 195 | </el-col> |
229 | 196 | </el-row> |
... | ... | @@ -231,13 +198,13 @@ |
231 | 198 | <el-row :gutter="20"> |
232 | 199 | <el-col :span="12"> |
233 | 200 | <el-form-item label="省份" prop="state"> |
234 | - <el-input v-model="diaForm.state" placeholder="请输入省份" /> | |
201 | + <el-input v-model="diaForm.state" placeholder="请输入省份"/> | |
235 | 202 | </el-form-item> |
236 | 203 | </el-col> |
237 | 204 | |
238 | 205 | <el-col :span="12"> |
239 | 206 | <el-form-item label="区/县" prop="district"> |
240 | - <el-input v-model="diaForm.district" placeholder="请输入区/县" /> | |
207 | + <el-input v-model="diaForm.district" placeholder="请输入区/县"/> | |
241 | 208 | </el-form-item> |
242 | 209 | </el-col> |
243 | 210 | </el-row> |
... | ... | @@ -245,13 +212,13 @@ |
245 | 212 | <el-row :gutter="20"> |
246 | 213 | <el-col :span="12"> |
247 | 214 | <el-form-item label="国家" prop="country"> |
248 | - <el-input v-model="diaForm.country" placeholder="请输入国家" /> | |
215 | + <el-input v-model="diaForm.country" placeholder="请输入国家"/> | |
249 | 216 | </el-form-item> |
250 | 217 | </el-col> |
251 | 218 | |
252 | 219 | <el-col :span="12"> |
253 | 220 | <el-form-item label="邮编" prop="postalCode"> |
254 | - <el-input v-model="diaForm.postalCode" placeholder="请输入邮编" /> | |
221 | + <el-input v-model="diaForm.postalCode" placeholder="请输入邮编"/> | |
255 | 222 | </el-form-item> |
256 | 223 | </el-col> |
257 | 224 | </el-row> |
... | ... | @@ -259,19 +226,13 @@ |
259 | 226 | <el-row :gutter="20"> |
260 | 227 | <el-col :span="12"> |
261 | 228 | <el-form-item label="联系人" prop="attentionTo"> |
262 | - <el-input | |
263 | - v-model="diaForm.attentionTo" | |
264 | - placeholder="请输入联系人" | |
265 | - /> | |
229 | + <el-input v-model="diaForm.attentionTo" placeholder="请输入联系人"/> | |
266 | 230 | </el-form-item> |
267 | 231 | </el-col> |
268 | 232 | |
269 | 233 | <el-col :span="12"> |
270 | 234 | <el-form-item label="联系电话" prop="phoneNum"> |
271 | - <el-input | |
272 | - v-model="diaForm.phoneNum" | |
273 | - placeholder="请输入联系电话" | |
274 | - /> | |
235 | + <el-input v-model="diaForm.phoneNum" placeholder="请输入联系电话"/> | |
275 | 236 | </el-form-item> |
276 | 237 | </el-col> |
277 | 238 | </el-row> |
... | ... | @@ -279,13 +240,13 @@ |
279 | 240 | <el-row :gutter="20"> |
280 | 241 | <el-col :span="12"> |
281 | 242 | <el-form-item label="传真号" prop="faxNum"> |
282 | - <el-input v-model="diaForm.faxNum" placeholder="请输入传真号" /> | |
243 | + <el-input v-model="diaForm.faxNum" placeholder="请输入传真号"/> | |
283 | 244 | </el-form-item> |
284 | 245 | </el-col> |
285 | 246 | |
286 | 247 | <el-col :span="12"> |
287 | 248 | <el-form-item label="邮件地址" prop="email"> |
288 | - <el-input v-model="diaForm.email" placeholder="请输入邮件地址" /> | |
249 | + <el-input v-model="diaForm.email" placeholder="请输入邮件地址"/> | |
289 | 250 | </el-form-item> |
290 | 251 | </el-col> |
291 | 252 | </el-row> |
... | ... | @@ -293,20 +254,15 @@ |
293 | 254 | <el-row :gutter="20"> |
294 | 255 | <el-col :span="12"> |
295 | 256 | <el-form-item label="上位系统url地址" prop="hostCode"> |
296 | - <el-input | |
297 | - v-model="diaForm.hostCode" | |
298 | - placeholder="请输入上位系统" | |
299 | - /> | |
257 | + <el-input v-model="diaForm.hostCode" placeholder="请输入上位系统"/> | |
300 | 258 | </el-form-item> |
301 | 259 | </el-col> |
302 | 260 | |
303 | 261 | <el-col :span="12"> |
304 | 262 | <el-form-item label="是否有效" prop="enable"> |
305 | - <el-switch | |
306 | - v-model="diaForm.enable" | |
307 | - active-value="1" | |
308 | - inactive-value="0" | |
309 | - /> | |
263 | + <el-switch v-model="diaForm.enable" | |
264 | + :active-value="0" | |
265 | + :inactive-value="1"/> | |
310 | 266 | </el-form-item> |
311 | 267 | </el-col> |
312 | 268 | </el-row> |
... | ... | @@ -317,210 +273,210 @@ |
317 | 273 | </div> |
318 | 274 | </el-dialog> |
319 | 275 | |
320 | - <!-- <el-dialog title="复制仓库"--> | |
321 | - <!-- :visible.sync="openCopy"--> | |
322 | - <!-- width="700px"--> | |
323 | - <!-- append-to-body>--> | |
324 | - <!-- <el-form ref="copyWarehouse">--> | |
325 | - <!-- <el-row :gutter="20">--> | |
326 | - <!-- <el-col :span="12">--> | |
327 | - <!-- <el-form-item label="待复制仓库">--> | |
328 | - <!-- <el-select>--> | |
329 | - <!-- <el-option v-for="item in tableData"--> | |
330 | - <!-- :label="item.name"--> | |
331 | - <!-- :value="item.code"--> | |
332 | - <!-- />--> | |
333 | - <!-- </el-select>--> | |
334 | - <!-- </el-form-item>--> | |
335 | - <!-- </el-col>--> | |
276 | +<!-- <el-dialog title="复制仓库"--> | |
277 | +<!-- :visible.sync="openCopy"--> | |
278 | +<!-- width="700px"--> | |
279 | +<!-- append-to-body>--> | |
280 | +<!-- <el-form ref="copyWarehouse">--> | |
281 | +<!-- <el-row :gutter="20">--> | |
282 | +<!-- <el-col :span="12">--> | |
283 | +<!-- <el-form-item label="待复制仓库">--> | |
284 | +<!-- <el-select>--> | |
285 | +<!-- <el-option v-for="item in tableData"--> | |
286 | +<!-- :label="item.name"--> | |
287 | +<!-- :value="item.code"--> | |
288 | +<!-- />--> | |
289 | +<!-- </el-select>--> | |
290 | +<!-- </el-form-item>--> | |
291 | +<!-- </el-col>--> | |
292 | + | |
293 | +<!-- <el-col :span="12">--> | |
294 | +<!-- <el-form-item label="新仓库">--> | |
295 | +<!-- <el-select>--> | |
296 | +<!-- <el-option v-for="item in tableData"--> | |
297 | +<!-- :label="item.name"--> | |
298 | +<!-- :value="item.code"--> | |
299 | +<!-- />--> | |
300 | +<!-- </el-select>--> | |
301 | +<!-- </el-form-item>--> | |
302 | +<!-- </el-col>--> | |
303 | +<!-- </el-row>--> | |
304 | +<!-- </el-form>--> | |
305 | +<!-- <div slot="footer" class="dialog-footer">--> | |
306 | +<!-- <el-button type="primary" @click="submitCopy">确 定</el-button>--> | |
307 | +<!-- <el-button @click="cancel">取 消</el-button>--> | |
308 | +<!-- </div>--> | |
309 | +<!-- </el-dialog>--> | |
336 | 310 | |
337 | - <!-- <el-col :span="12">--> | |
338 | - <!-- <el-form-item label="新仓库">--> | |
339 | - <!-- <el-select>--> | |
340 | - <!-- <el-option v-for="item in tableData"--> | |
341 | - <!-- :label="item.name"--> | |
342 | - <!-- :value="item.code"--> | |
343 | - <!-- />--> | |
344 | - <!-- </el-select>--> | |
345 | - <!-- </el-form-item>--> | |
346 | - <!-- </el-col>--> | |
347 | - <!-- </el-row>--> | |
348 | - <!-- </el-form>--> | |
349 | - <!-- <div slot="footer" class="dialog-footer">--> | |
350 | - <!-- <el-button type="primary" @click="submitCopy">确 定</el-button>--> | |
351 | - <!-- <el-button @click="cancel">取 消</el-button>--> | |
352 | - <!-- </div>--> | |
353 | - <!-- </el-dialog>--> | |
354 | 311 | </div> |
355 | 312 | </template> |
356 | 313 | |
357 | 314 | <script> |
358 | -import { | |
359 | - queryList, | |
360 | - edit, | |
361 | - add, | |
362 | - remove, | |
363 | - getByCode, | |
364 | -} from "@/api/config/InventoryInfo/wareHouseManage"; | |
365 | -import { getDicts } from "@/api/system/dict/data"; | |
315 | + import {queryList, edit, add, remove, getByCode} from '@/api/config/InventoryInfo/wareHouseManage' | |
316 | + import { getDicts } from '@/api/system/dict/data' | |
366 | 317 | |
367 | -export default { | |
368 | - name: "wareHouseManage", | |
369 | - data() { | |
370 | - return { | |
371 | - // 查询参数 | |
372 | - queryParams: { | |
373 | - pageNum: 1, | |
374 | - pageSize: 10, | |
375 | - }, | |
376 | - //对话框表单 | |
377 | - diaForm: {}, | |
378 | - //字典回显 | |
379 | - enableOptions: [], | |
380 | - //复制仓库表单 | |
381 | - // copyForm: {}, | |
382 | - //表格数据 | |
383 | - tableData: [], | |
384 | - // 非单个禁用 | |
385 | - single: true, | |
386 | - // 非复数禁用 | |
387 | - multiple: true, | |
388 | - // 对话框标题 | |
389 | - title: "", | |
390 | - totalSize: 0, | |
391 | - loading: true, | |
392 | - //多选框选中的数据 | |
393 | - ids: [], | |
394 | - date: [], | |
395 | - //弹窗显示开关 | |
396 | - diaOpen: false, | |
397 | - //复制仓库弹窗显示开关 | |
398 | - openCopy: false, | |
399 | - //增加与修改转换开关 | |
400 | - switch1: "", | |
401 | - rules: { | |
402 | - code: [{ required: true, message: "请输入仓库编码", trigger: "blur" }], | |
403 | - name: [{ required: true, message: "请输入仓库名称", trigger: "blur" }], | |
404 | - }, | |
405 | - tips: false, | |
406 | - }; | |
407 | - }, | |
408 | - created() { | |
409 | - this.handleQuery(); | |
410 | - getDicts("enable").then((response) => { | |
411 | - this.enableOptions = response.data; | |
412 | - }); | |
413 | - }, | |
414 | - methods: { | |
415 | - handleQuery() { | |
416 | - this.loading = true; | |
417 | - queryList(this.queryParams).then((res) => { | |
418 | - this.tableData = res.rows; | |
419 | - this.totalSize = res.total; | |
420 | - this.loading = false; | |
421 | - }); | |
422 | - }, | |
423 | - diaryFormat(item, type) { | |
424 | - return this.selectDictLabel(this.enableOptions, item); | |
425 | - }, | |
426 | - // 清空查询列表 | |
427 | - resetParams(formName) { | |
428 | - this.queryParams.code = ""; | |
429 | - this.queryParams.name = ""; | |
430 | - this.$refs[formName].resetFields(); | |
431 | - this.handleQuery(); | |
432 | - }, | |
433 | - // 重置对话框表单 | |
434 | - reset() { | |
435 | - this.diaForm = {}; | |
436 | - // this.resetForm("copyWarehouse") | |
437 | - this.resetForm("diaForm"); | |
438 | - }, | |
439 | - //关闭对话框 | |
440 | - cancel() { | |
441 | - this.diaOpen = false; | |
442 | - this.openCopy = false; | |
443 | - this.reset(); | |
444 | - }, | |
445 | - // 多选框选中数据 | |
446 | - handleSelectionChange(selection) { | |
447 | - this.ids = selection.map((item) => item.code); | |
448 | - this.single = selection.length != 1; | |
449 | - this.multiple = !selection.length; | |
450 | - }, | |
451 | - //复制仓库对话框打开 | |
452 | - handleCopy() { | |
453 | - this.openCopy = true; | |
454 | - }, | |
455 | - // test(){ | |
456 | - // alert(this.diaForm.enable) | |
457 | - // }, | |
458 | - /** 新增按钮操作 */ | |
459 | - handleAdd() { | |
460 | - this.switch1 = false; | |
461 | - this.reset(); | |
462 | - this.diaOpen = true; | |
463 | - this.title = "添加仓库"; | |
318 | + export default { | |
319 | + name: 'wareHouseManage', | |
320 | + data() { | |
321 | + return { | |
322 | + // 查询参数 | |
323 | + queryParams: { | |
324 | + pageNum: 1, | |
325 | + pageSize: 10 | |
326 | + }, | |
327 | + //对话框表单 | |
328 | + diaForm: {}, | |
329 | + // 显示搜索条件 | |
330 | + showSearch: true, | |
331 | + //字典回显 | |
332 | + enableOptions:[], | |
333 | + //复制仓库表单 | |
334 | + // copyForm: {}, | |
335 | + //表格数据 | |
336 | + tableData: [], | |
337 | + // 非单个禁用 | |
338 | + single: true, | |
339 | + // 非复数禁用 | |
340 | + multiple: true, | |
341 | + // 对话框标题 | |
342 | + title: '', | |
343 | + totalSize: 0, | |
344 | + loading: true, | |
345 | + //多选框选中的数据 | |
346 | + ids:[], | |
347 | + date: [], | |
348 | + //弹窗显示开关 | |
349 | + diaOpen: false, | |
350 | + //复制仓库弹窗显示开关 | |
351 | + openCopy: false, | |
352 | + //增加与修改转换开关 | |
353 | + switch1: '', | |
354 | + rules: { | |
355 | + code: [ | |
356 | + {required: true, message: '请输入仓库编码', trigger: 'blur'} | |
357 | + ], | |
358 | + name: [ | |
359 | + {required: true, message: '请输入仓库名称', trigger: 'blur'} | |
360 | + ] | |
361 | + }, | |
362 | + tips: false | |
363 | + } | |
464 | 364 | }, |
465 | - /** 表格修改按钮操作 */ | |
466 | - handleUpdate(row) { | |
467 | - this.reset(); | |
468 | - this.switch1 = true; | |
469 | - const code = row.code || this.ids; | |
470 | - getByCode(code).then((response) => { | |
471 | - this.diaForm = response.data; | |
472 | - this.diaOpen = true; | |
473 | - this.title = "修改仓库"; | |
474 | - }); | |
365 | + created() { | |
366 | + this.handleQuery() | |
367 | + getDicts("enable").then(response => { | |
368 | + this.enableOptions = response.data; | |
369 | + }) | |
475 | 370 | }, |
476 | - /** 删除按钮操作 */ | |
477 | - handleDelete(row) { | |
478 | - const warehouseCode = row.code; | |
479 | - this.$confirm( | |
480 | - '是否确认删除仓库编号为"' + warehouseCode + '"的数据项?', | |
481 | - "警告", | |
482 | - { | |
483 | - confirmButtonText: "确定", | |
484 | - cancelButtonText: "取消", | |
485 | - type: "warning", | |
486 | - } | |
487 | - ) | |
488 | - .then(function () { | |
489 | - return remove(warehouseCode); | |
371 | + methods: { | |
372 | + test(){ | |
373 | + console.log(this.diaForm.enable) | |
374 | + }, | |
375 | + handleQuery() { | |
376 | + this.loading = true | |
377 | + queryList(this.queryParams).then(res => { | |
378 | + this.tableData = res.rows | |
379 | + this.totalSize = res.total | |
380 | + this.loading = false | |
381 | + }) | |
382 | + }, | |
383 | + diaryFormat(item,type) { | |
384 | + return this.selectDictLabel(this.enableOptions, item); | |
385 | + }, | |
386 | + // 清空查询列表 | |
387 | + resetParams(formName) { | |
388 | + this.queryParams.code = '' | |
389 | + this.queryParams.name = '' | |
390 | + this.$refs[formName].resetFields() | |
391 | + this.handleQuery() | |
392 | + }, | |
393 | + // 重置对话框表单 | |
394 | + reset() { | |
395 | + this.diaForm = {} | |
396 | + // this.resetForm("copyWarehouse") | |
397 | + this.resetForm("diaForm"); | |
398 | + }, | |
399 | + //关闭对话框 | |
400 | + cancel() { | |
401 | + console.log(this.diaForm) | |
402 | + this.diaOpen = false | |
403 | + this.openCopy = false | |
404 | + this.reset() | |
405 | + }, | |
406 | + // 多选框选中数据 | |
407 | + handleSelectionChange(selection) { | |
408 | + this.ids = selection.map(item=>item.code) | |
409 | + this.single = selection.length != 1 | |
410 | + this.multiple = !selection.length | |
411 | + }, | |
412 | + //复制仓库对话框打开 | |
413 | + handleCopy(){ | |
414 | + this.openCopy = true | |
415 | + }, | |
416 | + // test(){ | |
417 | + // alert(this.diaForm.enable) | |
418 | + // }, | |
419 | + /** 新增按钮操作 */ | |
420 | + handleAdd() { | |
421 | + this.switch1 = false | |
422 | + this.reset() | |
423 | + this.diaOpen = true | |
424 | + this.title = '添加仓库' | |
425 | + }, | |
426 | + /** 表格修改按钮操作 */ | |
427 | + handleUpdate(row) { | |
428 | + this.reset() | |
429 | + this.switch1 = true | |
430 | + const code = row.code || this.ids | |
431 | + getByCode(code).then(response => { | |
432 | + this.diaForm = response.data | |
433 | + this.diaOpen = true | |
434 | + this.title = '修改仓库' | |
490 | 435 | }) |
491 | - .then(() => { | |
492 | - this.handleQuery(); | |
493 | - this.msgSuccess("删除成功"); | |
436 | + }, | |
437 | + /** 删除按钮操作 */ | |
438 | + handleDelete(row) { | |
439 | + const warehouseCode = row.code | |
440 | + this.$confirm('是否确认删除仓库编号为"' + warehouseCode + '"的数据项?', '警告', { | |
441 | + confirmButtonText: '确定', | |
442 | + cancelButtonText: '取消', | |
443 | + type: 'warning' | |
444 | + }).then(function () { | |
445 | + return remove(warehouseCode) | |
446 | + }).then(() => { | |
447 | + this.handleQuery() | |
448 | + this.msgSuccess('删除成功') | |
449 | + }).catch(function () { | |
494 | 450 | }) |
495 | - .catch(function () {}); | |
496 | - }, | |
497 | - /** 提交按钮 */ | |
498 | - submitForm: function () { | |
499 | - this.$refs["diaForm"].validate((valid) => { | |
500 | - if (valid) { | |
501 | - if (this.switch1) { | |
502 | - edit(this.diaForm).then((response) => { | |
503 | - if (response.code === 200) { | |
504 | - this.msgSuccess("修改成功"); | |
505 | - this.diaOpen = false; | |
506 | - this.handleQuery(); | |
507 | - } | |
508 | - }); | |
509 | - } else { | |
510 | - add(this.diaForm).then((response) => { | |
511 | - if (response.code === 200) { | |
512 | - this.msgSuccess("新增成功"); | |
513 | - this.diaOpen = false; | |
514 | - this.handleQuery(); | |
515 | - } | |
516 | - }); | |
451 | + }, | |
452 | + /** 提交按钮 */ | |
453 | + submitForm: function () { | |
454 | + this.$refs['diaForm'].validate(valid => { | |
455 | + if (valid) { | |
456 | + if (this.switch1) { | |
457 | + edit(this.diaForm).then(response => { | |
458 | + if (response.code === 200) { | |
459 | + this.msgSuccess('修改成功') | |
460 | + this.diaOpen = false | |
461 | + this.handleQuery() | |
462 | + } | |
463 | + }) | |
464 | + } else { | |
465 | + add(this.diaForm).then(response => { | |
466 | + if (response.code === 200) { | |
467 | + this.msgSuccess('新增成功') | |
468 | + this.diaOpen = false | |
469 | + this.handleQuery() | |
470 | + } | |
471 | + }) | |
472 | + } | |
517 | 473 | } |
518 | - } | |
519 | - }); | |
520 | - }, | |
521 | - }, | |
522 | -}; | |
474 | + }) | |
475 | + } | |
476 | + } | |
477 | + } | |
523 | 478 | </script> |
524 | 479 | |
525 | 480 | <style scoped> |
481 | + | |
526 | 482 | </style> |
... | ... |