Commit 8002ecd12ac2baa8ff2b5ea76860710c35b37fbd
1 parent
ded8cb8d
前端代码格式化
Signed-off-by: TanYibin <5491541@qq.com>
Showing
5 changed files
with
186 additions
and
202 deletions
ant-design-vue-jeecg/src/components/jeecgbiz/JButtonBizComponent/JSelectBizComponentModal.vue
... | ... | @@ -7,26 +7,34 @@ |
7 | 7 | switchFullscreen |
8 | 8 | @ok="handleOk" |
9 | 9 | @cancel="close" |
10 | - cancelText="关闭"> | |
11 | - | |
10 | + cancelText="关闭" | |
11 | + > | |
12 | 12 | <a-row :gutter="18"> |
13 | 13 | <a-col :span="16"> |
14 | 14 | <!-- 查询区域 --> |
15 | 15 | <a-form layout="inline" class="j-inline-form"> |
16 | 16 | <!-- 固定条件 --> |
17 | - <a-form-item :label="(queryParamText||name)"> | |
18 | - <a-input v-model="queryParam[queryParamCode||valueKey]" :placeholder="'请输入' + (queryParamText||name)" | |
19 | - @pressEnter="searchQuery"/> | |
17 | + <a-form-item :label="queryParamText || name"> | |
18 | + <a-input | |
19 | + v-model="queryParam[queryParamCode || valueKey]" | |
20 | + :placeholder="'请输入' + (queryParamText || name)" | |
21 | + @pressEnter="searchQuery" | |
22 | + /> | |
20 | 23 | </a-form-item> |
21 | 24 | <!-- 动态生成的查询条件 --> |
22 | - <j-select-biz-query-item v-if="queryConfig.length>0" v-show="showMoreQueryItems" :queryParam="queryParam" | |
23 | - :queryConfig="queryConfig" @pressEnter="searchQuery"/> | |
25 | + <j-select-biz-query-item | |
26 | + v-if="queryConfig.length > 0" | |
27 | + v-show="showMoreQueryItems" | |
28 | + :queryParam="queryParam" | |
29 | + :queryConfig="queryConfig" | |
30 | + @pressEnter="searchQuery" | |
31 | + /> | |
24 | 32 | <!-- 按钮 --> |
25 | 33 | <a-button type="primary" @click="searchQuery" icon="search">查询</a-button> |
26 | 34 | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> |
27 | - <a v-if="queryConfig.length>0" @click="showMoreQueryItems=!showMoreQueryItems" style="margin-left: 8px"> | |
35 | + <a v-if="queryConfig.length > 0" @click="showMoreQueryItems = !showMoreQueryItems" style="margin-left: 8px"> | |
28 | 36 | {{ showMoreQueryItems ? '收起' : '展开' }} |
29 | - <a-icon :type="showMoreQueryItems ? 'up' : 'down'"/> | |
37 | + <a-icon :type="showMoreQueryItems ? 'up' : 'down'" /> | |
30 | 38 | </a> |
31 | 39 | </a-form> |
32 | 40 | |
... | ... | @@ -39,46 +47,46 @@ |
39 | 47 | :pagination="ipagination" |
40 | 48 | :loading="loading" |
41 | 49 | :scroll="{ y: 240 }" |
42 | - :rowSelection="{selectedRowKeys, onChange: onSelectChange, type: multiple ? 'checkbox':'radio'}" | |
50 | + :rowSelection="{ selectedRowKeys, onChange: onSelectChange, type: multiple ? 'checkbox' : 'radio' }" | |
43 | 51 | :customRow="customRowFn" |
44 | - @change="handleTableChange"> | |
52 | + @change="handleTableChange" | |
53 | + > | |
54 | + <span slot="zoneCode" slot-scope="zoneCode"> | |
55 | + <a-tag :key="zoneCode" color="blue"> | |
56 | + {{ solutionZoneCode(zoneCode) }} | |
57 | + </a-tag> | |
58 | + </span> | |
45 | 59 | </a-table> |
46 | - | |
47 | 60 | </a-col> |
48 | 61 | <a-col :span="8"> |
49 | - <a-card :title="'已选' + name" :bordered="false" :head-style="{padding:0}" :body-style="{padding:0}"> | |
50 | - | |
62 | + <a-card :title="'已选' + name" :bordered="false" :head-style="{ padding: 0 }" :body-style="{ padding: 0 }"> | |
51 | 63 | <a-table size="middle" :rowKey="rowKey" bordered v-bind="selectedTable"> |
52 | - | |
53 | - | |
54 | - <span slot="action" slot-scope="text, record, index"> | |
55 | - <a @click="handleDeleteSelected(record, index)">删除</a> | |
56 | - </span> | |
64 | + <span slot="action" slot-scope="text, record, index"> | |
65 | + <a @click="handleDeleteSelected(record, index)">删除</a> | |
66 | + </span> | |
57 | 67 | </a-table> |
58 | - | |
59 | 68 | </a-card> |
60 | 69 | </a-col> |
61 | 70 | </a-row> |
62 | - <InventoryDetailSelectList></InventoryDetailSelectList> | |
71 | + <InventoryDetailSelectList /> | |
63 | 72 | </j-modal> |
64 | 73 | </template> |
65 | 74 | |
66 | 75 | <script> |
67 | -import {getAction} from '@/api/manage' | |
76 | +import { getAction } from '@/api/manage' | |
68 | 77 | import Ellipsis from '@/components/Ellipsis' |
69 | -import {JeecgListMixin} from '@/mixins/JeecgListMixin' | |
70 | -import {pushIfNotExist} from '@/utils/util' | |
78 | +import { JeecgListMixin } from '@/mixins/JeecgListMixin' | |
79 | +import { pushIfNotExist } from '@/utils/util' | |
71 | 80 | import JSelectBizQueryItem from './JSelectBizQueryItem' |
72 | -import {cloneDeep} from 'lodash' | |
73 | -import {stockTakeTask} from "../../../api/api"; | |
74 | -import Utils from './util.js'; | |
75 | -import InventoryDetailSelectList from "../../../views/system/inventory/InventoryDetailSelectList"; | |
76 | - | |
81 | +import { cloneDeep } from 'lodash' | |
82 | +import { stockTakeTask } from '../../../api/api' | |
83 | +import Utils from './util.js' | |
84 | +import InventoryDetailSelectList from '../../../views/system/inventory/InventoryDetailSelectList' | |
77 | 85 | |
78 | 86 | export default { |
79 | 87 | name: 'JSelectBizComponentModal', |
80 | 88 | mixins: [JeecgListMixin], |
81 | - components: {Ellipsis, JSelectBizQueryItem,InventoryDetailSelectList}, | |
89 | + components: { Ellipsis, JSelectBizQueryItem, InventoryDetailSelectList }, | |
82 | 90 | props: { |
83 | 91 | value: { |
84 | 92 | type: Array, |
... | ... | @@ -139,8 +147,8 @@ export default { |
139 | 147 | type: Array, |
140 | 148 | default: () => [] |
141 | 149 | }, |
142 | - testConfig: "", | |
143 | - headerCode:"", | |
150 | + testConfig: '', | |
151 | + headerCode: '', | |
144 | 152 | rowKey: { |
145 | 153 | type: String, |
146 | 154 | default: 'id' |
... | ... | @@ -149,7 +157,7 @@ export default { |
149 | 157 | ellipsisLength: { |
150 | 158 | type: Number, |
151 | 159 | default: 12 |
152 | - }, | |
160 | + } | |
153 | 161 | }, |
154 | 162 | data() { |
155 | 163 | return { |
... | ... | @@ -157,18 +165,18 @@ export default { |
157 | 165 | // 已选择列表 |
158 | 166 | selectedTable: { |
159 | 167 | pagination: false, |
160 | - scroll: {y: 240}, | |
168 | + scroll: { y: 240 }, | |
161 | 169 | columns: [ |
162 | 170 | { |
163 | 171 | ...this.columns[3], |
164 | - width: this.columns[0].widthRight || this.columns[0].width, | |
172 | + width: this.columns[0].widthRight || this.columns[0].width | |
165 | 173 | }, |
166 | - {title: '操作', dataIndex: 'action', align: 'center', width: 60, scopedSlots: {customRender: 'action'},} | |
174 | + { title: '操作', dataIndex: 'action', align: 'center', width: 60, scopedSlots: { customRender: 'action' } } | |
167 | 175 | ], |
168 | - dataSource: [], | |
176 | + dataSource: [] | |
169 | 177 | }, |
170 | - renderEllipsis: (value) => (<ellipsis length={this.ellipsisLength}>{value}</ellipsis>), | |
171 | - url: {list: this.listUrl}, | |
178 | + renderEllipsis: value => <ellipsis length={this.ellipsisLength}>{value}</ellipsis>, | |
179 | + url: { list: this.listUrl }, | |
172 | 180 | /* 分页参数 */ |
173 | 181 | ipagination: { |
174 | 182 | current: 1, |
... | ... | @@ -183,14 +191,13 @@ export default { |
183 | 191 | }, |
184 | 192 | options: [], |
185 | 193 | dataSourceMap: {}, |
186 | - showMoreQueryItems: false, | |
194 | + showMoreQueryItems: false | |
187 | 195 | } |
188 | 196 | }, |
189 | 197 | computed: { |
190 | 198 | // 表头 |
191 | 199 | innerColumns() { |
192 | 200 | let columns = cloneDeep(this.columns) |
193 | - | |
194 | 201 | columns.forEach(column => { |
195 | 202 | // 给所有的列加上过长裁剪 |
196 | 203 | if (this.ellipsisLength !== -1) { |
... | ... | @@ -211,7 +218,7 @@ export default { |
211 | 218 | } |
212 | 219 | }) |
213 | 220 | return columns |
214 | - }, | |
221 | + } | |
215 | 222 | }, |
216 | 223 | watch: { |
217 | 224 | value: { |
... | ... | @@ -237,13 +244,13 @@ export default { |
237 | 244 | handler(val) { |
238 | 245 | //update--begin--autor:scott-----date:20200927------for:选取职务名称出现全选 #1753----- |
239 | 246 | if (this.innerValue) { |
240 | - this.innerValue.length = 0; | |
247 | + this.innerValue.length = 0 | |
241 | 248 | } |
242 | 249 | //update--end--autor:scott-----date:20200927------for:选取职务名称出现全选 #1753----- |
243 | 250 | this.selectedTable.dataSource = val.map(key => { |
244 | 251 | for (let data of this.dataSource) { |
245 | 252 | if (data[this.rowKey] === key) { |
246 | - Utils.$emit('methodA',data[this.valueKey]); | |
253 | + Utils.$emit('methodA', data[this.valueKey]) | |
247 | 254 | pushIfNotExist(this.innerValue, data[this.valueKey]) |
248 | 255 | return data |
249 | 256 | } |
... | ... | @@ -257,16 +264,25 @@ export default { |
257 | 264 | console.warn('未找到选择的行信息,key:' + key) |
258 | 265 | return {} |
259 | 266 | }) |
260 | - }, | |
267 | + } | |
261 | 268 | } |
262 | 269 | }, |
263 | 270 | |
264 | 271 | methods: { |
265 | - | |
272 | + solutionZoneCode(value) { | |
273 | + var actions = [] | |
274 | + Object.keys(this.zoneList).some(key => { | |
275 | + if (this.zoneList[key].code == '' + value) { | |
276 | + actions.push(this.zoneList[key].name) | |
277 | + return true | |
278 | + } | |
279 | + }) | |
280 | + return actions.join('') | |
281 | + }, | |
266 | 282 | /** 关闭弹窗 */ |
267 | 283 | close() { |
268 | 284 | this.$emit('update:visible', false) |
269 | - this.handleDeleteSelected(this.selectedTable.dataSource,0); | |
285 | + this.handleDeleteSelected(this.selectedTable.dataSource, 0) | |
270 | 286 | }, |
271 | 287 | |
272 | 288 | valueWatchHandler(val) { |
... | ... | @@ -298,32 +314,33 @@ export default { |
298 | 314 | break |
299 | 315 | } |
300 | 316 | } |
301 | - if (!notExist) return | |
302 | - getAction(this.valueUrl || this.listUrl, { | |
303 | - // 这里最后加一个 , 的原因是因为无论如何都要使用 in 查询,防止后台进行了模糊匹配,导致查询结果不准确 | |
304 | - [this.valueKey]: value.join(',') + ',', | |
305 | - pageNo: 1, | |
306 | - pageSize: value.length | |
307 | - }).then((res) => { | |
308 | - if (res.success) { | |
309 | - let dataSource = res.result | |
310 | - if (!(dataSource instanceof Array)) { | |
311 | - dataSource = res.result.records | |
317 | + if (!notExist) { | |
318 | + return getAction(this.valueUrl || this.listUrl, { | |
319 | + // 这里最后加一个 , 的原因是因为无论如何都要使用 in 查询,防止后台进行了模糊匹配,导致查询结果不准确 | |
320 | + [this.valueKey]: value.join(',') + ',', | |
321 | + pageNo: 1, | |
322 | + pageSize: value.length | |
323 | + }).then(res => { | |
324 | + if (res.success) { | |
325 | + let dataSource = res.result | |
326 | + if (!(dataSource instanceof Array)) { | |
327 | + dataSource = res.result.records | |
328 | + } | |
329 | + this.emitOptions(dataSource, data => { | |
330 | + pushIfNotExist(this.innerValue, data[this.valueKey]) | |
331 | + pushIfNotExist(this.selectedRowKeys, data[this.rowKey]) | |
332 | + pushIfNotExist(this.selectedTable.dataSource, data, this.rowKey) | |
333 | + }) | |
312 | 334 | } |
313 | - this.emitOptions(dataSource, (data) => { | |
314 | - pushIfNotExist(this.innerValue, data[this.valueKey]) | |
315 | - pushIfNotExist(this.selectedRowKeys, data[this.rowKey]) | |
316 | - pushIfNotExist(this.selectedTable.dataSource, data, this.rowKey) | |
317 | - }) | |
318 | - } | |
319 | - }) | |
335 | + }) | |
336 | + } | |
320 | 337 | }, |
321 | 338 | |
322 | 339 | emitOptions(dataSource, callback) { |
323 | 340 | dataSource.forEach(data => { |
324 | 341 | let key = data[this.valueKey] |
325 | 342 | this.dataSourceMap[key] = data |
326 | - pushIfNotExist(this.options, {label: data[this.displayKey || this.valueKey], value: key}, 'value') | |
343 | + pushIfNotExist(this.options, { label: data[this.displayKey || this.valueKey], value: key }, 'value') | |
327 | 344 | typeof callback === 'function' ? callback(data) : '' |
328 | 345 | }) |
329 | 346 | this.$emit('options', this.options, this.dataSourceMap) |
... | ... | @@ -332,36 +349,36 @@ export default { |
332 | 349 | /** 完成选择 */ |
333 | 350 | handleOk() { |
334 | 351 | let value = this.selectedTable.dataSource.map(data => data[this.valueKey]) |
335 | - if (value.length>=1) | |
336 | - { | |
337 | - stockTakeTask(value,this.testConfig,this.headerCode).then((res) => { | |
338 | - if (res.success) { | |
339 | - this.$message.success(res.message) | |
340 | - this.$emit('ok') | |
352 | + if (value.length >= 1) { | |
353 | + stockTakeTask(value, this.testConfig, this.headerCode) | |
354 | + .then(res => { | |
355 | + if (res.success) { | |
356 | + this.$message.success(res.message) | |
357 | + this.$emit('ok') | |
358 | + this.close() | |
359 | + Utils.$emit('methodB', res.result) | |
360 | + } else { | |
361 | + this.$message.warning(res.message) | |
362 | + } | |
363 | + }) | |
364 | + .finally(() => { | |
365 | + this.confirmLoading = false | |
341 | 366 | this.close() |
342 | - Utils.$emit('methodB',res.result); | |
343 | - } else { | |
344 | - this.$message.warning(res.message); | |
345 | - } | |
346 | - }).finally(() => { | |
347 | - this.confirmLoading = false; | |
348 | - this.close() | |
349 | - }) | |
350 | - }else | |
351 | - { | |
352 | - alert("至少选择一项") | |
367 | + }) | |
368 | + } else { | |
369 | + alert('至少选择一项') | |
353 | 370 | } |
354 | - this.handleDeleteSelected(this.selectedTable.dataSource,0); | |
371 | + this.handleDeleteSelected(this.selectedTable.dataSource, 0) | |
355 | 372 | }, |
356 | 373 | /** 删除已选择的 */ |
357 | 374 | handleDeleteSelected(record, index) { |
358 | - Utils.$emit('methodA',10); | |
375 | + Utils.$emit('methodA', 10) | |
359 | 376 | this.selectedRowKeys.splice(this.selectedRowKeys.indexOf(record[this.rowKey]), 1) |
360 | 377 | //update--begin--autor:wangshuai-----date:20200722------for:JSelectBizComponent组件切换页数值问题------ |
361 | 378 | this.selectedTable.dataSource.splice(this.selectedTable.dataSource.indexOf(record), 1) |
362 | 379 | this.innerValue.splice(this.innerValue.indexOf(record[this.valueKey]), 1) |
363 | - console.log("this.selectedRowKeys:", this.selectedRowKeys) | |
364 | - console.log("this.selectedTable.dataSource:", this.selectedTable.dataSource) | |
380 | + console.log('this.selectedRowKeys:', this.selectedRowKeys) | |
381 | + console.log('this.selectedTable.dataSource:', this.selectedTable.dataSource) | |
365 | 382 | //update--begin--autor:wangshuai-----date:20200722------for:JSelectBizComponent组件切换页数值问题------ |
366 | 383 | }, |
367 | 384 | |
... | ... | @@ -385,8 +402,7 @@ export default { |
385 | 402 | } |
386 | 403 | } |
387 | 404 | } |
388 | - }, | |
389 | - | |
405 | + } | |
390 | 406 | } |
391 | 407 | } |
392 | 408 | </script> |
... | ... |
ant-design-vue-jeecg/src/components/jeecgbiz/JSelectMultiCycleCount.vue
... | ... | @@ -14,6 +14,7 @@ |
14 | 14 | <script> |
15 | 15 | import JDate from '@comp/jeecg/JDate' |
16 | 16 | import JSelectBizComponent from './JButtonBizComponent' |
17 | +import {getZoneList} from '@/api/api' | |
17 | 18 | |
18 | 19 | export default { |
19 | 20 | name: 'JSelectMultiCycleCount', |
... | ... | @@ -29,6 +30,7 @@ export default { |
29 | 30 | }, |
30 | 31 | data() { |
31 | 32 | return { |
33 | + zoneList: [], | |
32 | 34 | url: {list: '/inventory/inventoryHeader/freeList'}, |
33 | 35 | columns: [ |
34 | 36 | {title: 'ID', align: 'center', width: '20%',widthRight: '70%', dataIndex: 'id'}, |
... | ... | @@ -36,7 +38,7 @@ export default { |
36 | 38 | {title: '容器状态', align: 'center', width: '20%', dataIndex: 'containerStatus'}, |
37 | 39 | {title: '库位编码', align: 'center', width: '20%', dataIndex: 'locationCode'}, |
38 | 40 | {title: '总数量', align: 'center', width: '20%', dataIndex: 'totalQty'}, |
39 | - {title: '库区', align: 'center', width: '20%', widthRight: '70%', dataIndex: 'zoneCode'}, | |
41 | + {title: '库区', align: 'center', width: '20%', widthRight: '70%', dataIndex: 'zoneCode', key: 'zoneCode', scopedSlots: {customRender: 'zoneCode'}}, | |
40 | 42 | {title: '状态', align: 'center', width: '20%', dataIndex: 'enable'}, |
41 | 43 | ], |
42 | 44 | // 定义在这里的参数都是可以在外部传递覆盖的,可以更灵活的定制化使用的组件 |
... | ... | @@ -66,6 +68,28 @@ export default { |
66 | 68 | headerCode : this.headerCode, |
67 | 69 | }) |
68 | 70 | } |
71 | + }, | |
72 | + created() { | |
73 | + this.loadFrom(); | |
74 | + }, | |
75 | + methods: { | |
76 | + loadFrom() { | |
77 | + getZoneList().then((res) => { | |
78 | + if (res.success) { | |
79 | + this.zoneList = res.result | |
80 | + } | |
81 | + }); | |
82 | + }, | |
83 | + solutionZoneCode(value) { | |
84 | + var actions = [] | |
85 | + Object.keys(this.zoneList).some((key) => { | |
86 | + if (this.zoneList[key].code == ('' + value)) { | |
87 | + actions.push(this.zoneList[key].name) | |
88 | + return true | |
89 | + } | |
90 | + }) | |
91 | + return actions.join('') | |
92 | + }, | |
69 | 93 | } |
70 | 94 | } |
71 | 95 | </script> |
... | ... |
ant-design-vue-jeecg/src/views/system/inventory/InventoryDetailSelectList.vue
... | ... | @@ -11,10 +11,10 @@ |
11 | 11 | :multiple="false" |
12 | 12 | :headers="tokenHeader" |
13 | 13 | :action="importExcelUrl" |
14 | - @change="handleImportExcel"> | |
14 | + @change="handleImportExcel" | |
15 | + > | |
15 | 16 | <a-button type="primary" icon="import">导入</a-button> |
16 | 17 | </a-upload> |
17 | - | |
18 | 18 | </div> |
19 | 19 | |
20 | 20 | <!-- table区域-begin --> |
... | ... | @@ -24,42 +24,18 @@ |
24 | 24 | size="middle" |
25 | 25 | bordered |
26 | 26 | rowKey="id" |
27 | - :scroll="{x:true}" | |
27 | + :scroll="{ x: true }" | |
28 | 28 | :columns="columns" |
29 | 29 | :dataSource="dataSource" |
30 | 30 | :pagination="ipagination" |
31 | 31 | :loading="loading" |
32 | - | |
33 | - @change="handleTableChange"> | |
34 | - | |
35 | - <span slot="companyCode" slot-scope="companyCode"> | |
36 | - <a-tag :key="companyCode" color=blue> | |
37 | - {{ solutionCompany(companyCode) }} | |
38 | - </a-tag> | |
39 | - </span> | |
40 | - | |
41 | - <template slot="htmlSlot" slot-scope="text"> | |
42 | - <div v-html="text"></div> | |
43 | - </template> | |
44 | - <template slot="imgSlot" slot-scope="text"> | |
45 | - <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> | |
46 | - <img v-else :src="getImgView(text)" height="25px" alt="" | |
47 | - style="max-width:80px;font-size: 12px;font-style: italic;"/> | |
48 | - </template> | |
49 | - <template slot="fileSlot" slot-scope="text"> | |
50 | - <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> | |
51 | - <a-button | |
52 | - v-else | |
53 | - :ghost="true" | |
54 | - type="primary" | |
55 | - icon="download" | |
56 | - size="small" | |
57 | - @click="downloadFile(text)"> | |
58 | - 下载 | |
59 | - </a-button> | |
60 | - </template> | |
61 | - | |
62 | - | |
32 | + @change="handleTableChange" | |
33 | + > | |
34 | + <span slot="companyCode" slot-scope="companyCode"> | |
35 | + <a-tag :key="companyCode" color="blue"> | |
36 | + {{ solutionCompany(companyCode) }} | |
37 | + </a-tag> | |
38 | + </span> | |
63 | 39 | </a-table> |
64 | 40 | </div> |
65 | 41 | <inventoryDetail-modal ref="modalForm" @ok="modalFormOk" :mainId="mainId"></inventoryDetail-modal> |
... | ... | @@ -67,17 +43,16 @@ |
67 | 43 | </template> |
68 | 44 | |
69 | 45 | <script> |
70 | - | |
71 | -import {JeecgListMixin} from '@/mixins/JeecgListMixin' | |
46 | +import { JeecgListMixin } from '@/mixins/JeecgListMixin' | |
72 | 47 | import InventoryDetailModal from './modules/InventoryDetailModal' |
73 | -import {getCompanyList} from '@/api/api' | |
74 | -import {getAction} from '@/api/manage' | |
75 | -import Utils from "../../../components/jeecgbiz/JButtonBizComponent/util"; | |
48 | +import { getCompanyList } from '@/api/api' | |
49 | +import { getAction } from '@/api/manage' | |
50 | +import Utils from '../../../components/jeecgbiz/JButtonBizComponent/util' | |
76 | 51 | |
77 | 52 | export default { |
78 | - name: "InventoryDetailSelectList", | |
53 | + name: 'InventoryDetailSelectList', | |
79 | 54 | mixins: [JeecgListMixin], |
80 | - components: {InventoryDetailModal}, | |
55 | + components: { InventoryDetailModal }, | |
81 | 56 | props: { |
82 | 57 | mainId: { |
83 | 58 | type: String, |
... | ... | @@ -93,7 +68,7 @@ export default { |
93 | 68 | this.clearList() |
94 | 69 | } else { |
95 | 70 | this.queryParam['inventoryHeaderId'] = val |
96 | - this.loadData(1); | |
71 | + this.loadData(1) | |
97 | 72 | } |
98 | 73 | } |
99 | 74 | } |
... | ... | @@ -107,76 +82,74 @@ export default { |
107 | 82 | columns: [ |
108 | 83 | { |
109 | 84 | title: '容器编码', |
110 | - align: "center", | |
85 | + align: 'center', | |
111 | 86 | dataIndex: 'containerCode' |
112 | 87 | }, |
113 | 88 | { |
114 | 89 | title: '库位编码', |
115 | - align: "center", | |
90 | + align: 'center', | |
116 | 91 | dataIndex: 'locationCode' |
117 | 92 | }, |
118 | 93 | { |
119 | 94 | title: '物料编码', |
120 | - align: "center", | |
95 | + align: 'center', | |
121 | 96 | dataIndex: 'materialCode' |
122 | 97 | }, |
123 | 98 | { |
124 | 99 | title: '物料名称', |
125 | - align: "center", | |
100 | + align: 'center', | |
126 | 101 | dataIndex: 'materialName' |
127 | 102 | }, |
128 | 103 | { |
129 | 104 | title: '物料规格', |
130 | - align: "center", | |
105 | + align: 'center', | |
131 | 106 | dataIndex: 'materialSpec' |
132 | 107 | }, |
133 | 108 | { |
134 | 109 | title: '物料单位', |
135 | - align: "center", | |
110 | + align: 'center', | |
136 | 111 | dataIndex: 'materialUnit' |
137 | 112 | }, |
138 | 113 | { |
139 | 114 | title: '数量', |
140 | - align: "center", | |
115 | + align: 'center', | |
141 | 116 | dataIndex: 'qty' |
142 | 117 | }, |
143 | 118 | { |
144 | 119 | title: '库存状态', |
145 | - align: "center", | |
146 | - dataIndex: 'inventoryStatus_dictText', | |
120 | + align: 'center', | |
121 | + dataIndex: 'inventoryStatus_dictText' | |
147 | 122 | }, |
148 | 123 | { |
149 | 124 | title: '批次', |
150 | - align: "center", | |
125 | + align: 'center', | |
151 | 126 | dataIndex: 'batch' |
152 | 127 | }, |
153 | 128 | { |
154 | 129 | title: '入库日期', |
155 | - align: "center", | |
130 | + align: 'center', | |
156 | 131 | dataIndex: 'receiptDate' |
157 | - }, | |
132 | + } | |
158 | 133 | ], |
159 | 134 | url: { |
160 | - list: "/inventory/inventoryHeader/listInventoryDetailByMainId", | |
161 | - }, | |
162 | - | |
135 | + list: '/inventory/inventoryHeader/listInventoryDetailByMainId' | |
136 | + } | |
163 | 137 | } |
164 | 138 | }, |
165 | 139 | created() { |
166 | - this.loadFrom(); | |
140 | + this.loadFrom() | |
167 | 141 | }, |
168 | 142 | mounted() { |
169 | - let _this = this; | |
170 | - Utils.$on('methodA',(data)=> { | |
171 | - _this.methodA(data); | |
143 | + let _this = this | |
144 | + Utils.$on('methodA', data => { | |
145 | + _this.methodA(data) | |
172 | 146 | }) |
173 | 147 | }, |
174 | 148 | |
175 | 149 | methods: { |
176 | - | |
177 | 150 | methodA(data) { |
178 | - var _this = this; | |
179 | - _this.loadDatas(data); | |
151 | + var _this = this | |
152 | + _this.loadDatas(data) | |
180 | 153 | }, |
181 | 154 | |
182 | 155 | loadDatas(record) { |
... | ... | @@ -184,25 +157,27 @@ export default { |
184 | 157 | this.dataSource = [] |
185 | 158 | getAction(this.url.list, { |
186 | 159 | inventoryHeaderId: record |
187 | - }).then((res) => { | |
188 | - if (res.success) { | |
189 | - this.dataSource = res.result.records | |
190 | - } | |
191 | - }).finally(() => { | |
192 | - this.loading = false | |
193 | 160 | }) |
161 | + .then(res => { | |
162 | + if (res.success) { | |
163 | + this.dataSource = res.result.records | |
164 | + } | |
165 | + }) | |
166 | + .finally(() => { | |
167 | + this.loading = false | |
168 | + }) | |
194 | 169 | }, |
195 | 170 | loadFrom() { |
196 | - getCompanyList().then((res) => { | |
171 | + getCompanyList().then(res => { | |
197 | 172 | if (res.success) { |
198 | 173 | this.companyList = res.result |
199 | 174 | } |
200 | - }); | |
175 | + }) | |
201 | 176 | }, |
202 | 177 | solutionCompany(value) { |
203 | 178 | var actions = [] |
204 | - Object.keys(this.companyList).some((key) => { | |
205 | - if (this.companyList[key].code == ('' + value)) { | |
179 | + Object.keys(this.companyList).some(key => { | |
180 | + if (this.companyList[key].code == '' + value) { | |
206 | 181 | actions.push(this.companyList[key].name) |
207 | 182 | return true |
208 | 183 | } |
... | ... | @@ -214,10 +189,9 @@ export default { |
214 | 189 | this.selectedRowKeys = [] |
215 | 190 | this.ipagination.current = 1 |
216 | 191 | } |
217 | - | |
218 | 192 | } |
219 | 193 | } |
220 | 194 | </script> |
221 | 195 | <style scoped> |
222 | -@import '~@assets/less/common.less' | |
196 | +@import '~@assets/less/common.less'; | |
223 | 197 | </style> |
... | ... |
ant-design-vue-jeecg/src/views/system/stocktaking/CycleCountDetailList.vue
... | ... | @@ -72,7 +72,6 @@ |
72 | 72 | <span>下载</span> |
73 | 73 | </a-button> |
74 | 74 | </template> |
75 | - CycleCountDetailChiIdModal | |
76 | 75 | <template slot="action" slot-scope="text, record"> |
77 | 76 | <cycle-count-detail-chi-id-modal ref="adjustmentModal" @ok="modalFormOk" :id="record.id"/> |
78 | 77 | <a @click="createMany()"><a-icon/>新增</a> |
... | ... |
ant-design-vue-jeecg/src/views/system/stocktaking/CycleCountHeaderList.vue
... | ... | @@ -31,8 +31,7 @@ |
31 | 31 | </a-button> |
32 | 32 | </a-dropdown> |
33 | 33 | |
34 | - <j-super-query :fieldList="superFieldList" v-has="'cycleCountHeader:superQuery'" | |
35 | - @handleSuperQuery="handleSuperQuery"/> | |
34 | + <j-super-query :fieldList="superFieldList" v-has="'cycleCountHeader:superQuery'" @handleSuperQuery="handleSuperQuery"/> | |
36 | 35 | </div> |
37 | 36 | |
38 | 37 | <!-- table区域-begin --> |
... | ... | @@ -56,7 +55,6 @@ |
56 | 55 | class="j-table-force-nowrap" |
57 | 56 | @change="handleTableChange"> |
58 | 57 | |
59 | - | |
60 | 58 | <!-- 内嵌table区域 begin --> |
61 | 59 | <template slot="expandedRowRender" slot-scope="record"> |
62 | 60 | <a-tabs tabPosition="top"> |
... | ... | @@ -67,56 +65,32 @@ |
67 | 65 | </template> |
68 | 66 | <!-- 内嵌table区域 end --> |
69 | 67 | |
70 | - | |
71 | 68 | <span slot="companyCode" slot-scope="companyCode"> |
72 | 69 | <a-tag :key="companyCode" color=blue> |
73 | 70 | {{ solutionCompany(companyCode) }} |
74 | 71 | </a-tag> |
75 | 72 | </span> |
76 | 73 | |
77 | - | |
78 | 74 | <span slot="countType" slot-scope="countType"> |
79 | 75 | <a-tag :key="countType" color=pink> |
80 | 76 | {{ solutionCountType(countType) }} |
81 | 77 | </a-tag> |
82 | 78 | </span> |
83 | 79 | |
84 | - <template slot="htmlSlot" slot-scope="text"> | |
85 | - <div v-html="text"></div> | |
86 | - </template> | |
87 | - <template slot="imgSlot" slot-scope="text"> | |
88 | - <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> | |
89 | - <img v-else :src="getImgView(text)" height="25px" alt="" | |
90 | - style="max-width:80px;font-size: 12px;font-style: italic;"/> | |
91 | - </template> | |
92 | - <template slot="fileSlot" slot-scope="text"> | |
93 | - <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> | |
94 | - <a-button | |
95 | - v-else | |
96 | - :ghost="true" | |
97 | - type="primary" | |
98 | - icon="download" | |
99 | - size="small" | |
100 | - @click="downloadFile(text)"> | |
101 | - 下载 | |
102 | - </a-button> | |
103 | - </template> | |
104 | 80 | <span slot="action" slot-scope="text, record"> |
105 | - <j-select-multi-cycle-count v-if="record.statusCyc!=100" :query-config="selectUserQueryConfig" | |
106 | - :test-config="record.id" :header-code="record.code"/> | |
81 | + <j-select-multi-cycle-count v-if="record.statusCyc!=100" :query-config="selectUserQueryConfig" :test-config="record.id" :header-code="record.code"/> | |
107 | 82 | <a-divider type="vertical" v-if="record.statusCyc!=100"/> |
108 | 83 | <a-dropdown> |
109 | 84 | <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> |
110 | 85 | <a-menu slot="overlay"> |
111 | - <a-menu-item> | |
112 | - <a v-has="'cycleCountHeader:edit'" @click="handleEdit(record)">编辑</a> | |
86 | + <a-menu-item v-has="'cycleCountHeader:edit'"> | |
87 | + <a @click="handleEdit(record)">编辑</a> | |
113 | 88 | </a-menu-item> |
114 | 89 | <a-menu-item> |
115 | 90 | <a @click="handleDetail(record)">详情</a> |
116 | 91 | </a-menu-item> |
117 | - <a-menu-item> | |
118 | - <a-popconfirm v-has="'cycleCountHeader:delete'" title="确定删除吗?" | |
119 | - @confirm="() => handleDelete(record.id)"> | |
92 | + <a-menu-item v-has="'cycleCountHeader:delete'"> | |
93 | + <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> | |
120 | 94 | <a>删除</a> |
121 | 95 | </a-popconfirm> |
122 | 96 | </a-menu-item> |
... | ... | @@ -125,9 +99,7 @@ |
125 | 99 | </span> |
126 | 100 | </a-table> |
127 | 101 | </div> |
128 | - | |
129 | 102 | <cycle-count-header-modal ref="modalForm" @ok="modalFormOk"></cycle-count-header-modal> |
130 | - | |
131 | 103 | </a-card> |
132 | 104 | </template> |
133 | 105 | |
... | ... | @@ -253,7 +225,6 @@ export default { |
253 | 225 | deleteBatch: "/cycleCountHeader/cycleCountHeader/deleteBatch", |
254 | 226 | exportXlsUrl: "/cycleCountHeader/cycleCountHeader/exportXls", |
255 | 227 | importExcelUrl: "cycleCountHeader/cycleCountHeader/importExcel", |
256 | - | |
257 | 228 | }, |
258 | 229 | dictOptions: { |
259 | 230 | status: [], |
... | ... |