正在显示
7 个修改的文件
包含
706 行增加
和
55 行删除
package-lock.json
已删除
100644 → 0
此 diff 太大无法显示。
@@ -87,7 +87,7 @@ var axois_init = { | @@ -87,7 +87,7 @@ var axois_init = { | ||
87 | init_router: (router,axios) => { | 87 | init_router: (router,axios) => { |
88 | router.beforeEach((to, from, next) => { | 88 | router.beforeEach((to, from, next) => { |
89 | // NProgress.start(); | 89 | // NProgress.start(); |
90 | - if (to.path == '/login') { | 90 | + if (to.path === '/login') { |
91 | sessionStorage.removeItem('user'); | 91 | sessionStorage.removeItem('user'); |
92 | sessionStorage.removeItem('menu'); | 92 | sessionStorage.removeItem('menu'); |
93 | sessionStorage.removeItem('token'); | 93 | sessionStorage.removeItem('token'); |
@@ -99,7 +99,7 @@ var axois_init = { | @@ -99,7 +99,7 @@ var axois_init = { | ||
99 | axios.defaults.headers.common['Authorization'] = sessionStorage.getItem('token'); | 99 | axios.defaults.headers.common['Authorization'] = sessionStorage.getItem('token'); |
100 | } | 100 | } |
101 | 101 | ||
102 | - if (!jsutil.checkNull(user) && to.path != '/login' && !jsutil.checkNull(sessionStorage.getItem('token')) && !jsutil.checkNull(sessionStorage.getItem('menu'))) { | 102 | + if (!jsutil.checkNull(user) && to.path !== '/login' && !jsutil.checkNull(sessionStorage.getItem('token')) && !jsutil.checkNull(sessionStorage.getItem('menu'))) { |
103 | next({ path: '/login' }) | 103 | next({ path: '/login' }) |
104 | }else{ | 104 | }else{ |
105 | next() | 105 | next() |
@@ -112,6 +112,7 @@ import definition from './views/technological/definition.vue' | @@ -112,6 +112,7 @@ import definition from './views/technological/definition.vue' | ||
112 | import station from './views/deploy/station.vue' | 112 | import station from './views/deploy/station.vue' |
113 | import house from './views/deploy/house.vue' | 113 | import house from './views/deploy/house.vue' |
114 | import inventroyrecord from './views/deploy/inventroyrecord.vue' | 114 | import inventroyrecord from './views/deploy/inventroyrecord.vue' |
115 | +import houseRecord from './views/deploy/houseRecord.vue' | ||
115 | import locations from './views/deploy/locations.vue' | 116 | import locations from './views/deploy/locations.vue' |
116 | import inventroy from './views/deploy/inventroy.vue' | 117 | import inventroy from './views/deploy/inventroy.vue' |
117 | import area from './views/deploy/area.vue' | 118 | import area from './views/deploy/area.vue' |
@@ -532,6 +533,7 @@ let routes = [ | @@ -532,6 +533,7 @@ let routes = [ | ||
532 | {path:'/locations',component:locations,name:'库位管理'}, | 533 | {path:'/locations',component:locations,name:'库位管理'}, |
533 | {path:'/inventroy',component:inventroy,name:'库存管理'}, | 534 | {path:'/inventroy',component:inventroy,name:'库存管理'}, |
534 | {path:'/area',component:area,name:'库区管理'}, | 535 | {path:'/area',component:area,name:'库区管理'}, |
536 | + {path:'/houserecord',component:houseRecord,name:'出入库'}, | ||
535 | ] | 537 | ] |
536 | }, | 538 | }, |
537 | { | 539 | { |
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | <el-row> | 2 | <el-row> |
3 | <el-card style="background-color: #F5F7FA"> | 3 | <el-card style="background-color: #F5F7FA"> |
4 | <!-- 搜索区域--> | 4 | <!-- 搜索区域--> |
5 | - <el-row :gutter="10" class="toolbar"> | 5 | + <el-row :gutter="5" class="toolbar"> |
6 | <el-col :span="7"> | 6 | <el-col :span="7"> |
7 | <el-input v-model="queryInfo.areano" prefix-icon="el-icon-search" size="small" style="width: 280px" | 7 | <el-input v-model="queryInfo.areano" prefix-icon="el-icon-search" size="small" style="width: 280px" |
8 | placeholder="场站编号" clearable> | 8 | placeholder="场站编号" clearable> |
@@ -10,6 +10,12 @@ | @@ -10,6 +10,12 @@ | ||
10 | </el-input> | 10 | </el-input> |
11 | </el-col> | 11 | </el-col> |
12 | <el-col :span="6"> | 12 | <el-col :span="6"> |
13 | + <el-input v-model="queryInfo.houseid" prefix-icon="el-icon-search" size="small" style="width: 280px" | ||
14 | + placeholder="仓库编号" clearable> | ||
15 | + <template slot="prepend">仓库编号</template> | ||
16 | + </el-input> | ||
17 | + </el-col> | ||
18 | + <el-col :span="6"> | ||
13 | <el-button type="primary" icon="el-icon-search" size="small" @click="getList()"> | 19 | <el-button type="primary" icon="el-icon-search" size="small" @click="getList()"> |
14 | 查询 | 20 | 查询 |
15 | </el-button> | 21 | </el-button> |
@@ -33,7 +39,7 @@ | @@ -33,7 +39,7 @@ | ||
33 | width="140"> | 39 | width="140"> |
34 | </el-table-column> | 40 | </el-table-column> |
35 | <el-table-column | 41 | <el-table-column |
36 | - prop="stationname" | 42 | + prop="areaname" |
37 | label="库区名称" | 43 | label="库区名称" |
38 | width="140"> | 44 | width="140"> |
39 | </el-table-column> | 45 | </el-table-column> |
@@ -42,26 +48,26 @@ | @@ -42,26 +48,26 @@ | ||
42 | label="所属仓库" | 48 | label="所属仓库" |
43 | width="120"> | 49 | width="120"> |
44 | </el-table-column> | 50 | </el-table-column> |
45 | - <el-table-column | ||
46 | - prop="length" | ||
47 | - label="库区长度" | ||
48 | - width="80"> | ||
49 | - </el-table-column> | ||
50 | - <el-table-column | ||
51 | - prop="width" | ||
52 | - label="库区宽度" | ||
53 | - width="80"> | ||
54 | - </el-table-column> | 51 | +<!-- <el-table-column--> |
52 | +<!-- prop="length"--> | ||
53 | +<!-- label="库区长度"--> | ||
54 | +<!-- width="80">--> | ||
55 | +<!-- </el-table-column>--> | ||
56 | +<!-- <el-table-column--> | ||
57 | +<!-- prop="width"--> | ||
58 | +<!-- label="库区宽度"--> | ||
59 | +<!-- width="80">--> | ||
60 | +<!-- </el-table-column>--> | ||
55 | <el-table-column | 61 | <el-table-column |
56 | prop="areanum" | 62 | prop="areanum" |
57 | label="库区面积" | 63 | label="库区面积" |
58 | width="80"> | 64 | width="80"> |
59 | </el-table-column> | 65 | </el-table-column> |
60 | - <el-table-column | ||
61 | - prop="areavol" | ||
62 | - label="库区体积" | ||
63 | - width="80"> | ||
64 | - </el-table-column> | 66 | +<!-- <el-table-column--> |
67 | +<!-- prop="areavol"--> | ||
68 | +<!-- label="库区体积"--> | ||
69 | +<!-- width="80">--> | ||
70 | +<!-- </el-table-column>--> | ||
65 | <el-table-column | 71 | <el-table-column |
66 | prop=" owner" | 72 | prop=" owner" |
67 | label="分配货主" | 73 | label="分配货主" |
@@ -77,36 +83,36 @@ | @@ -77,36 +83,36 @@ | ||
77 | label="占用库位" | 83 | label="占用库位" |
78 | width="120"> | 84 | width="120"> |
79 | </el-table-column> | 85 | </el-table-column> |
80 | - <el-table-column | ||
81 | - prop="xstart" | ||
82 | - label="库区X起始位" | ||
83 | - width="90"> | ||
84 | - </el-table-column> | ||
85 | - <el-table-column | ||
86 | - prop="xend" | ||
87 | - label="库区X结束位" | ||
88 | - width="90"> | ||
89 | - </el-table-column> | ||
90 | - <el-table-column | ||
91 | - prop="ystart" | ||
92 | - label="库区Y起始位" | ||
93 | - width="90"> | ||
94 | - </el-table-column> | ||
95 | - <el-table-column | ||
96 | - prop="yend" | ||
97 | - label="库区Y结束位" | ||
98 | - width="90"> | ||
99 | - </el-table-column> | ||
100 | - <el-table-column | ||
101 | - prop="zstart" | ||
102 | - label="库区Z起始位" | ||
103 | - width="90"> | ||
104 | - </el-table-column> | ||
105 | - <el-table-column | ||
106 | - prop="zend" | ||
107 | - label="库区Z结束位" | ||
108 | - width="90"> | ||
109 | - </el-table-column> | 86 | +<!-- <el-table-column--> |
87 | +<!-- prop="xstart"--> | ||
88 | +<!-- label="库区X起始位"--> | ||
89 | +<!-- width="90">--> | ||
90 | +<!-- </el-table-column>--> | ||
91 | +<!-- <el-table-column--> | ||
92 | +<!-- prop="xend"--> | ||
93 | +<!-- label="库区X结束位"--> | ||
94 | +<!-- width="90">--> | ||
95 | +<!-- </el-table-column>--> | ||
96 | +<!-- <el-table-column--> | ||
97 | +<!-- prop="ystart"--> | ||
98 | +<!-- label="库区Y起始位"--> | ||
99 | +<!-- width="90">--> | ||
100 | +<!-- </el-table-column>--> | ||
101 | +<!-- <el-table-column--> | ||
102 | +<!-- prop="yend"--> | ||
103 | +<!-- label="库区Y结束位"--> | ||
104 | +<!-- width="90">--> | ||
105 | +<!-- </el-table-column>--> | ||
106 | +<!-- <el-table-column--> | ||
107 | +<!-- prop="zstart"--> | ||
108 | +<!-- label="库区Z起始位"--> | ||
109 | +<!-- width="90">--> | ||
110 | +<!-- </el-table-column>--> | ||
111 | +<!-- <el-table-column--> | ||
112 | +<!-- prop="zend"--> | ||
113 | +<!-- label="库区Z结束位"--> | ||
114 | +<!-- width="90">--> | ||
115 | +<!-- </el-table-column>--> | ||
110 | <el-table-column | 116 | <el-table-column |
111 | fixed="right" | 117 | fixed="right" |
112 | label="操作" | 118 | label="操作" |
@@ -149,8 +155,10 @@ | @@ -149,8 +155,10 @@ | ||
149 | <el-option | 155 | <el-option |
150 | v-for="item in houseids" | 156 | v-for="item in houseids" |
151 | :key="item.houseid" | 157 | :key="item.houseid" |
152 | - :label="item.houseid" | 158 | + :label="item.housename" |
153 | :value="item.houseid"> | 159 | :value="item.houseid"> |
160 | + <span style="float: left">{{ item.housename }}</span> | ||
161 | + <span style="float: right; color: #8492a6; font-size: 13px">{{ item.houseid }}</span> | ||
154 | </el-option> | 162 | </el-option> |
155 | </el-select> | 163 | </el-select> |
156 | </el-form-item> | 164 | </el-form-item> |
@@ -291,13 +299,17 @@ | @@ -291,13 +299,17 @@ | ||
291 | ediArea, | 299 | ediArea, |
292 | selectByHouseid | 300 | selectByHouseid |
293 | } from '../../api/consigner/station'; | 301 | } from '../../api/consigner/station'; |
302 | + import jsutil from "@/common/js/util"; | ||
294 | 303 | ||
295 | export default { | 304 | export default { |
296 | // name: "area", | 305 | // name: "area", |
306 | + props:['parentHouseId'], | ||
297 | data() { | 307 | data() { |
298 | return { | 308 | return { |
299 | queryInfo: { | 309 | queryInfo: { |
310 | + houseid:'', | ||
300 | areano:'', | 311 | areano:'', |
312 | + areaName:'', | ||
301 | // 当前页数 | 313 | // 当前页数 |
302 | pageNum: 1, | 314 | pageNum: 1, |
303 | // 每页大小 | 315 | // 每页大小 |
@@ -372,13 +384,14 @@ | @@ -372,13 +384,14 @@ | ||
372 | selectByHouseid({houseid:query}).then(res =>{ | 384 | selectByHouseid({houseid:query}).then(res =>{ |
373 | if (res !== '') { | 385 | if (res !== '') { |
374 | setTimeout(() => { | 386 | setTimeout(() => { |
375 | - this.loading = false; | ||
376 | this.houseids=res.data.data; | 387 | this.houseids=res.data.data; |
377 | }, 200); | 388 | }, 200); |
378 | } else { | 389 | } else { |
379 | this.houseids = []; | 390 | this.houseids = []; |
380 | } | 391 | } |
381 | 392 | ||
393 | + }).finally(() =>{ | ||
394 | + this.loading = false; | ||
382 | }); | 395 | }); |
383 | }, | 396 | }, |
384 | handleSizeChange(val) { | 397 | handleSizeChange(val) { |
@@ -393,7 +406,6 @@ | @@ -393,7 +406,6 @@ | ||
393 | const _this = this | 406 | const _this = this |
394 | selectAreas(this.queryInfo).then((response) => { | 407 | selectAreas(this.queryInfo).then((response) => { |
395 | const res = response.data | 408 | const res = response.data |
396 | - console.log(response.data) | ||
397 | if (res.code !== '200') { | 409 | if (res.code !== '200') { |
398 | return _this.$message.error('获取消息收发记录,失败!') | 410 | return _this.$message.error('获取消息收发记录,失败!') |
399 | } | 411 | } |
@@ -508,11 +520,20 @@ | @@ -508,11 +520,20 @@ | ||
508 | }, | 520 | }, |
509 | }, | 521 | }, |
510 | mounted() { | 522 | mounted() { |
523 | + if (jsutil.checkNull(this.parentHouseId)){ | ||
524 | + this.queryInfo.houseid = this.parentHouseId; | ||
525 | + } | ||
511 | this.getList(); | 526 | this.getList(); |
512 | - // this.getYardList(); | 527 | + }, |
513 | 528 | ||
529 | + watch: { | ||
530 | + parentHouseId(value) { | ||
531 | + if (jsutil.checkNull(this.parentHouseId)){ | ||
532 | + this.queryInfo.houseid = this.parentHouseId; | ||
533 | + } | ||
534 | + this.getList(); | ||
535 | + } | ||
514 | } | 536 | } |
515 | - | ||
516 | } | 537 | } |
517 | </script> | 538 | </script> |
518 | 539 |
@@ -31,6 +31,7 @@ | @@ -31,6 +31,7 @@ | ||
31 | :cell-style="{textAlign:'center'}" | 31 | :cell-style="{textAlign:'center'}" |
32 | style="border-radius: 10px 10px 0px 0px;line-height: 25px" | 32 | style="border-radius: 10px 10px 0px 0px;line-height: 25px" |
33 | :header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" size="small" | 33 | :header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" size="small" |
34 | + @row-dblclick="tableRowClick" | ||
34 | > | 35 | > |
35 | <el-table-column | 36 | <el-table-column |
36 | fixed | 37 | fixed |
@@ -256,14 +257,22 @@ | @@ -256,14 +257,22 @@ | ||
256 | </el-dialog> | 257 | </el-dialog> |
257 | </el-row> | 258 | </el-row> |
258 | </el-card> | 259 | </el-card> |
260 | + <el-dialog title="库区" :visible.sync="dialogVisible" fullscreen > | ||
261 | + <AREA :parent-house-id="selectedHouseId" /> | ||
262 | + <span slot="footer" class="dialog-footer"> | ||
263 | + <el-button type="info" @click="dialogVisible = false">关 闭</el-button> | ||
264 | + </span> | ||
265 | + </el-dialog> | ||
259 | </el-row> | 266 | </el-row> |
260 | </template> | 267 | </template> |
261 | 268 | ||
262 | <script> | 269 | <script> |
263 | import {selectHouses,delHouse,addHouse,ediHouse,selectByStationno} from '../../api/consigner/station'; | 270 | import {selectHouses,delHouse,addHouse,ediHouse,selectByStationno} from '../../api/consigner/station'; |
271 | + import AREA from "./area" | ||
264 | 272 | ||
265 | export default { | 273 | export default { |
266 | name: "house", | 274 | name: "house", |
275 | + components:{AREA}, | ||
267 | data() { | 276 | data() { |
268 | return { | 277 | return { |
269 | queryInfo: { | 278 | queryInfo: { |
@@ -308,6 +317,7 @@ | @@ -308,6 +317,7 @@ | ||
308 | stationno: '', | 317 | stationno: '', |
309 | loading:false, | 318 | loading:false, |
310 | formLabelWidth: '220px', | 319 | formLabelWidth: '220px', |
320 | + dialogVisible:false, | ||
311 | rules: { | 321 | rules: { |
312 | userName: [ | 322 | userName: [ |
313 | // { required: true, message: '请输入申请人', trigger: 'blur' }, | 323 | // { required: true, message: '请输入申请人', trigger: 'blur' }, |
@@ -327,6 +337,7 @@ | @@ -327,6 +337,7 @@ | ||
327 | // ], { required: true, message: '请选择申请状态', trigger: 'change' } | 337 | // ], { required: true, message: '请选择申请状态', trigger: 'change' } |
328 | ], | 338 | ], |
329 | }, | 339 | }, |
340 | + selectedHouseId:"" | ||
330 | } | 341 | } |
331 | }, | 342 | }, |
332 | methods: { | 343 | methods: { |
@@ -467,6 +478,12 @@ | @@ -467,6 +478,12 @@ | ||
467 | }).catch(() => { | 478 | }).catch(() => { |
468 | }) | 479 | }) |
469 | }, | 480 | }, |
481 | + //行点击事件 | ||
482 | + tableRowClick(row, column, event) { | ||
483 | + this.dialogVisible = true | ||
484 | + this.selectedHouseId = row.houseid | ||
485 | + // console.log(row+column,event); | ||
486 | + } | ||
470 | }, | 487 | }, |
471 | mounted() { | 488 | mounted() { |
472 | this.getList(); | 489 | this.getList(); |
src/views/deploy/houseRecord.vue
0 → 100644
1 | +<template> | ||
2 | + <el-row> | ||
3 | + <el-card style="background-color: #F5F7FA"> | ||
4 | + <!-- 搜索区域--> | ||
5 | + <el-row :gutter="10" class="toolbar"> | ||
6 | + <el-col :span="7"> | ||
7 | + <el-input v-model="queryInfo.waybill" prefix-icon="el-icon-search" size="small" style="width: 280px" | ||
8 | + placeholder="货物单号" clearable> | ||
9 | + <template slot="prepend">货物单号</template> | ||
10 | + </el-input> | ||
11 | + </el-col> | ||
12 | + <el-col :span="6"> | ||
13 | + <el-button type="primary" icon="el-icon-search" size="small" @click="getList()"> | ||
14 | + 查询 | ||
15 | + </el-button> | ||
16 | + <el-button type="success" icon="el-icon-edit" size="small" @click="applyAdd()">新增</el-button> | ||
17 | + </el-col> | ||
18 | + </el-row> | ||
19 | + <!-- 列表区域--> | ||
20 | + <el-row> | ||
21 | + <template> | ||
22 | + <el-table | ||
23 | + :data="tableData" | ||
24 | + border | ||
25 | + :cell-style="{textAlign:'center'}" | ||
26 | + style="border-radius: 10px 10px 0px 0px;line-height: 25px" | ||
27 | + :header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" size="small" | ||
28 | + > | ||
29 | + <el-table-column | ||
30 | + fixed | ||
31 | + prop="waybill" | ||
32 | + label="货物单号" | ||
33 | + width="120"> | ||
34 | + </el-table-column> | ||
35 | + <el-table-column | ||
36 | + prop="vol" | ||
37 | + label="体积" | ||
38 | + width="60"> | ||
39 | + </el-table-column> | ||
40 | + <el-table-column | ||
41 | + prop="weight" | ||
42 | + label="重量" | ||
43 | + width="60"> | ||
44 | + </el-table-column> | ||
45 | + <el-table-column | ||
46 | + prop="pcs" | ||
47 | + label="件数" | ||
48 | + width="60"> | ||
49 | + </el-table-column> | ||
50 | + <el-table-column | ||
51 | + prop="billweight" | ||
52 | + label="计费重量" | ||
53 | + width="70"> | ||
54 | + </el-table-column> | ||
55 | + <el-table-column | ||
56 | + prop="area" | ||
57 | + label="库区" | ||
58 | + width="60"> | ||
59 | + </el-table-column> | ||
60 | + <el-table-column | ||
61 | + prop="location" | ||
62 | + label="库位" | ||
63 | + width="60"> | ||
64 | + </el-table-column> | ||
65 | + <el-table-column | ||
66 | + prop="serialnumber" | ||
67 | + label="流水号" | ||
68 | + width="120"> | ||
69 | + </el-table-column> | ||
70 | + <el-table-column | ||
71 | + prop="station" | ||
72 | + label="出入库场站" | ||
73 | + width="100"> | ||
74 | + </el-table-column> | ||
75 | + <el-table-column | ||
76 | + prop="status" | ||
77 | + label="状态" | ||
78 | + width="80"> | ||
79 | + <template slot-scope="scope"> | ||
80 | + <span v-if="scope.row.status ==='0'">失败</span> | ||
81 | + <span v-if="scope.row.status ==='1'">成功</span> | ||
82 | + </template> | ||
83 | + </el-table-column> | ||
84 | + <el-table-column | ||
85 | + prop="transcar" | ||
86 | + label="运输车辆信息" | ||
87 | + width="100"> | ||
88 | + </el-table-column> | ||
89 | + <el-table-column | ||
90 | + prop="transtype" | ||
91 | + label="交易类型" | ||
92 | + width="100"> | ||
93 | + </el-table-column> | ||
94 | + <el-table-column | ||
95 | + prop="custel" | ||
96 | + label="客户联系电话" | ||
97 | + width="140"> | ||
98 | + </el-table-column> | ||
99 | + <el-table-column | ||
100 | + prop="customer" | ||
101 | + label="联系人姓名" | ||
102 | + width="100"> | ||
103 | + </el-table-column> | ||
104 | + <el-table-column | ||
105 | + prop="customername" | ||
106 | + label="客户名称" | ||
107 | + width="80"> | ||
108 | + </el-table-column> | ||
109 | + <el-table-column | ||
110 | + prop="goodstype" | ||
111 | + label="货物类型" | ||
112 | + width="80"> | ||
113 | + </el-table-column> | ||
114 | + <el-table-column | ||
115 | + prop="house" | ||
116 | + label="出入库仓库" | ||
117 | + width="100"> | ||
118 | + </el-table-column> | ||
119 | + <el-table-column | ||
120 | + prop="ietype" | ||
121 | + label="类型" | ||
122 | + width="60"> | ||
123 | + <template slot-scope="scope"> | ||
124 | + <span v-if="scope.row.ietype ==='I'">进</span> | ||
125 | + <span v-if="scope.row.ietype ==='E'">出</span> | ||
126 | + </template> | ||
127 | + </el-table-column> | ||
128 | + <el-table-column | ||
129 | + prop="opter" | ||
130 | + label="出入库经办人" | ||
131 | + width="100"> | ||
132 | + </el-table-column> | ||
133 | + <el-table-column | ||
134 | + prop="opttime" | ||
135 | + label="出入库时间" | ||
136 | + width="140"> | ||
137 | + </el-table-column> | ||
138 | + <el-table-column | ||
139 | + fixed="right" | ||
140 | + label="操作" | ||
141 | + width="160"> | ||
142 | + <template slot-scope="scope"> | ||
143 | + <el-button type="success" size="mini" @click="applyEdit(scope.row)">编辑</el-button> | ||
144 | + <el-button type="danger" size="mini" @click="applyDel(scope.$index,scope.row)">删除</el-button> | ||
145 | + </template> | ||
146 | + </el-table-column> | ||
147 | + </el-table> | ||
148 | + </template> | ||
149 | + </el-row> | ||
150 | + <el-row style="margin-top: 10px" class="toolbar"> | ||
151 | + <el-pagination | ||
152 | + @size-change="handleSizeChange" | ||
153 | + @current-change="handleCurrentChange" | ||
154 | + :current-page="queryInfo.pageNum" | ||
155 | + :page-size="queryInfo.pageSize" | ||
156 | + :page-sizes="[10, 50, 100, 500]" | ||
157 | + layout="total, sizes, prev, pager, next, jumper" | ||
158 | + :total="total"> | ||
159 | + </el-pagination> | ||
160 | + </el-row> | ||
161 | + <el-row> | ||
162 | + <el-dialog :title="dialogMap[dialogApply]" :visible.sync="apply_dialog.addDialog" width="80%" > | ||
163 | + <el-form :model="addForm" :rules="rules" ref="addForm" style="margin-top: 40px"> | ||
164 | + <el-row> | ||
165 | + <el-col :span="7"> | ||
166 | + <el-form-item label="" :label-width="formLabelWidth" prop="waybill"> | ||
167 | + <el-input v-model="addForm.waybill" autocomplete="off" size="small" style="width: 300px"> | ||
168 | + <template slot="prepend">货物单号</template> | ||
169 | + </el-input> | ||
170 | + </el-form-item> | ||
171 | + </el-col> | ||
172 | + <el-col :span="8"> | ||
173 | + <el-form-item label="" :label-width="formLabelWidth" prop="weight"> | ||
174 | + <el-input v-model="addForm.weight" autocomplete="off" size="small" style="width: 300px"> | ||
175 | + <template slot="prepend">重  量</template> | ||
176 | + </el-input> | ||
177 | + </el-form-item> | ||
178 | + </el-col> | ||
179 | + <el-col :span="8"> | ||
180 | + <el-form-item label="" :label-width="formLabelWidth" prop="vol"> | ||
181 | + <el-input v-model="addForm.vol" autocomplete="off" size="small" style="width: 300px"> | ||
182 | + <template slot="prepend">体  积</template> | ||
183 | + </el-input> | ||
184 | + </el-form-item> | ||
185 | + </el-col> | ||
186 | + </el-row> | ||
187 | + <el-row> | ||
188 | + <el-col :span="7"> | ||
189 | + <el-form-item label="" :label-width="formLabelWidth" prop="pcs"> | ||
190 | + <el-input v-model="addForm.pcs" autocomplete="off" size="small" style="width: 300px"> | ||
191 | + <template slot="prepend">件  数</template> | ||
192 | + </el-input> | ||
193 | + </el-form-item> | ||
194 | + </el-col> | ||
195 | + <el-col :span="8"> | ||
196 | + <el-form-item label="" :label-width="formLabelWidth" prop="billweight"> | ||
197 | + <el-input v-model="addForm.billweight" autocomplete="off" size="small" style="width: 300px"> | ||
198 | + <template slot="prepend">计费重量</template> | ||
199 | + </el-input> | ||
200 | + </el-form-item> | ||
201 | + </el-col> | ||
202 | + <el-col :span="8"> | ||
203 | + <el-form-item label="" :label-width="formLabelWidth" prop="area"> | ||
204 | + <el-input v-model="addForm.area" autocomplete="off" size="small" style="width: 300px"> | ||
205 | + <template slot="prepend">库  区</template> | ||
206 | + </el-input> | ||
207 | + </el-form-item> | ||
208 | + </el-col> | ||
209 | + </el-row> | ||
210 | + <el-row> | ||
211 | + <el-col :span="7"> | ||
212 | + <el-form-item label="" :label-width="formLabelWidth" prop="location"> | ||
213 | + <el-input v-model="addForm.location" autocomplete="off" size="small" style="width: 300px"> | ||
214 | + <template slot="prepend">库  位</template> | ||
215 | + </el-input> | ||
216 | + </el-form-item> | ||
217 | + </el-col> | ||
218 | + <el-col :span="8"> | ||
219 | + <el-form-item label="" :label-width="formLabelWidth" prop="serialnumber"> | ||
220 | + <el-input v-model="addForm.serialnumber" autocomplete="off" size="small" style="width: 300px"> | ||
221 | + <template slot="prepend">流水 号</template> | ||
222 | + </el-input> | ||
223 | + </el-form-item> | ||
224 | + </el-col> | ||
225 | + <el-col :span="8"> | ||
226 | + <el-form-item label="" :label-width="formLabelWidth" prop="transtype"> | ||
227 | +<!-- <el-input v-model="addForm.transtype" autocomplete="off" size="small" style="width: 300px">--> | ||
228 | +<!-- <template slot="prepend">交易类型</template>--> | ||
229 | +<!-- </el-input>--> | ||
230 | + <el-select v-model="addForm.transtype" placeholder="请选择交易类型" autocomplete="off" size="small" style="width: 300px"> | ||
231 | + <el-option | ||
232 | + v-for="item in options1" | ||
233 | + :key="item.value" | ||
234 | + :label="item.label" | ||
235 | + :value="item.value"> | ||
236 | + </el-option> | ||
237 | + </el-select> | ||
238 | + </el-form-item> | ||
239 | + </el-col> | ||
240 | + </el-row> | ||
241 | + <el-row> | ||
242 | + <el-col :span="7"> | ||
243 | + <el-form-item label="" :label-width="formLabelWidth" prop="house"> | ||
244 | + <el-input v-model="addForm.house" autocomplete="off" size="small" style="width: 300px"> | ||
245 | + <template slot="prepend">出入库仓库</template> | ||
246 | + </el-input> | ||
247 | + </el-form-item> | ||
248 | + </el-col> | ||
249 | + <el-col :span="8"> | ||
250 | + <el-form-item label="" :label-width="formLabelWidth" prop="opttime"> | ||
251 | +<!-- <el-input v-model="addForm.opttime" autocomplete="off" size="small" style="width: 300px">--> | ||
252 | +<!-- <template slot="prepend">出入库时间</template>--> | ||
253 | +<!-- </el-input>--> | ||
254 | + <el-date-picker | ||
255 | + v-model="addForm.opttime" | ||
256 | + type="datetime" size="mini" | ||
257 | + value-format="yyyy-MM-dd HH:mm:ss" | ||
258 | + format="yyyy-MM-dd HH:mm:ss" | ||
259 | + style="width:300px" | ||
260 | + placeholder="选择出入库时间"> | ||
261 | + </el-date-picker> | ||
262 | + </el-form-item> | ||
263 | + </el-col> | ||
264 | + | ||
265 | + <el-col :span="8"> | ||
266 | + <el-form-item label="" :label-width="formLabelWidth" prop="station"> | ||
267 | + <el-input v-model="addForm.station" autocomplete="off" size="small" style="width: 300px"> | ||
268 | + <template slot="prepend">出入库场站</template> | ||
269 | + </el-input> | ||
270 | + </el-form-item> | ||
271 | + </el-col> | ||
272 | + </el-row> | ||
273 | + <el-row> | ||
274 | + <el-col :span="7"> | ||
275 | + <el-form-item label="" :label-width="formLabelWidth" prop="transcar"> | ||
276 | + <el-input v-model="addForm.transcar" autocomplete="off" size="small" style="width: 300px"> | ||
277 | + <template slot="prepend">运输车辆信息</template> | ||
278 | + </el-input> | ||
279 | + </el-form-item> | ||
280 | + </el-col> | ||
281 | + <el-col :span="8"> | ||
282 | + <el-form-item label="" :label-width="formLabelWidth" prop="opter"> | ||
283 | + <el-input v-model="addForm.opter" autocomplete="off" size="small" style="width: 300px"> | ||
284 | + <template slot="prepend">出入库经办人</template> | ||
285 | + </el-input> | ||
286 | + </el-form-item> | ||
287 | + </el-col> | ||
288 | + <el-col :span="8"> | ||
289 | + <el-form-item label="" :label-width="formLabelWidth" prop="customername"> | ||
290 | + <el-input v-model="addForm.customername" autocomplete="off" size="small" style="width: 300px"> | ||
291 | + <template slot="prepend">出入库客户名称</template> | ||
292 | + </el-input> | ||
293 | + </el-form-item> | ||
294 | + </el-col> | ||
295 | + </el-row> | ||
296 | + <el-row> | ||
297 | + <el-col :span="7"> | ||
298 | + <el-form-item label="" :label-width="formLabelWidth" prop="goodstype"> | ||
299 | + <!-- <el-input v-model="addForm.goodstype" autocomplete="off" size="small" style="width: 300px">--> | ||
300 | + <!-- <template slot="prepend">出入库货物类型</template>--> | ||
301 | + <!-- </el-input>--> | ||
302 | + <el-select v-model="addForm.goodstype" placeholder="请选择出入库货物类型" autocomplete="off" size="small" style="width: 300px"> | ||
303 | + <el-option | ||
304 | + v-for="item in options" | ||
305 | + :key="item.value" | ||
306 | + :label="item.label" | ||
307 | + :value="item.value"> | ||
308 | + </el-option> | ||
309 | + </el-select> | ||
310 | + </el-form-item> | ||
311 | + </el-col> | ||
312 | + <el-col :span="8"> | ||
313 | + <el-form-item label="" :label-width="formLabelWidth" prop="ietype"> | ||
314 | + <el-select v-model="addForm.ietype" placeholder="出入库类型" size="mini" style="width: 300px"> | ||
315 | + <el-option label="出入库类型-进" value="I"></el-option> | ||
316 | + <el-option label="出入库类型-出" value="E"></el-option> | ||
317 | + </el-select> | ||
318 | + </el-form-item> | ||
319 | + </el-col> | ||
320 | + <el-col :span="8"> | ||
321 | + <!-- <el-form-item label="" :label-width="formLabelWidth" prop="status">--> | ||
322 | + <!-- <el-input v-model="addForm.status" autocomplete="off" size="small" style="width: 300px">--> | ||
323 | + <!-- <template slot="prepend">状  态</template>--> | ||
324 | + <!-- </el-input>--> | ||
325 | + <!-- </el-form-item>--> | ||
326 | + <el-form-item label="" :label-width="formLabelWidth" prop="status"> | ||
327 | + <el-select v-model="addForm.status" placeholder="请选择状态" size="mini" style="width: 300px"> | ||
328 | + <el-option label="状态-失败" value="0"></el-option> | ||
329 | + <el-option label="状态-成功" value="1"></el-option> | ||
330 | + </el-select> | ||
331 | + </el-form-item> | ||
332 | + </el-col> | ||
333 | + </el-row> | ||
334 | + <el-row> | ||
335 | + <el-col :span="7"> | ||
336 | + <el-form-item label="" :label-width="formLabelWidth" prop="custel"> | ||
337 | + <el-input v-model="addForm.custel" autocomplete="off" size="small" style="width: 300px"> | ||
338 | + <template slot="prepend">出入库客户联系电话</template> | ||
339 | + </el-input> | ||
340 | + </el-form-item> | ||
341 | + </el-col> | ||
342 | + <el-col :span="10"> | ||
343 | + <el-form-item label="" :label-width="formLabelWidth" prop="customer"> | ||
344 | + <el-input v-model="addForm.customer" autocomplete="off" size="small" style="width: 300px"> | ||
345 | + <template slot="prepend">出入库客户联系人姓名</template> | ||
346 | + </el-input> | ||
347 | + </el-form-item> | ||
348 | + </el-col> | ||
349 | + </el-row> | ||
350 | + </el-form> | ||
351 | + <div slot="footer" class="dialog-footer"> | ||
352 | + <el-button @click="apply_dialog.addDialog = false" size="small">取 消</el-button> | ||
353 | + <el-button type="primary" @click="dialogApply==='create'?add():edit()" size="small">提 交</el-button> | ||
354 | + </div> | ||
355 | + </el-dialog> | ||
356 | + </el-row> | ||
357 | + </el-card> | ||
358 | + </el-row> | ||
359 | +</template> | ||
360 | + | ||
361 | +<script> | ||
362 | + import {selectInventroyrecords,delInventoryrecord,addInventoryrecord,ediInventroyrecord} from '../../api/consigner/station'; | ||
363 | + | ||
364 | + export default { | ||
365 | + name: "inventroyrecord", | ||
366 | + data() { | ||
367 | + return { | ||
368 | + queryInfo: { | ||
369 | + waybill:'', | ||
370 | + // 当前页数 | ||
371 | + pageNum: 1, | ||
372 | + // 每页大小 | ||
373 | + pageSize: 10, | ||
374 | + }, | ||
375 | + total: 0, | ||
376 | + tableData:[], | ||
377 | + dialogMap: { | ||
378 | + update: '编辑', | ||
379 | + create: '新增' | ||
380 | + }, | ||
381 | + dialogApply: 'create', | ||
382 | + apply_dialog: { | ||
383 | + // 添加对话框 | ||
384 | + addDialog: false, | ||
385 | + // 编辑对话框 | ||
386 | + editDialog: false | ||
387 | + }, | ||
388 | + addForm: { | ||
389 | + area: '', | ||
390 | + billweight: '', | ||
391 | + custel: '', | ||
392 | + customer: '', | ||
393 | + customername: '', | ||
394 | + goodstype: '', | ||
395 | + house:'', | ||
396 | + ietype:'', | ||
397 | + location:'', | ||
398 | + opter:'', | ||
399 | + opttime: '', | ||
400 | + pcs: '', | ||
401 | + serialnumber: '', | ||
402 | + station: '', | ||
403 | + status: '', | ||
404 | + transcar: '', | ||
405 | + transtype:'', | ||
406 | + vol:'', | ||
407 | + waybill:'', | ||
408 | + weight:'', | ||
409 | + remark:'', | ||
410 | + remark1:'', | ||
411 | + remark2:'', | ||
412 | + remark3:'', | ||
413 | + remark4:'', | ||
414 | + remark5:'', | ||
415 | + }, | ||
416 | + options: [{ | ||
417 | + value: '板箱', | ||
418 | + label: '货物类型-板箱' | ||
419 | + }, { | ||
420 | + value: '运单', | ||
421 | + label: '货物类型-运单' | ||
422 | + }, { | ||
423 | + value: '托盘', | ||
424 | + label: '货物类型-托盘' | ||
425 | + }], | ||
426 | + options1: [{ | ||
427 | + value: '采购入库', | ||
428 | + label: '交易类型-采购入库' | ||
429 | + }, { | ||
430 | + value: '生产入库', | ||
431 | + label: '交易类型-生产入库' | ||
432 | + }, { | ||
433 | + value: '销售入库', | ||
434 | + label: '交易类型-销售入库' | ||
435 | + }], | ||
436 | + formLabelWidth: '80px', | ||
437 | + rules: { | ||
438 | + userName: [ | ||
439 | + // { required: true, message: '请输入申请人', trigger: 'blur' }, | ||
440 | + // // { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' } | ||
441 | + // ], | ||
442 | + // applyTime: [ | ||
443 | + // { required: true, message: '请选择时间', trigger: 'change' } | ||
444 | + // ], | ||
445 | + // needCount: [ | ||
446 | + // { required: true, message: '请输入需要车辆数量', trigger: 'blur' }, | ||
447 | + // ], | ||
448 | + // orginStation: [ | ||
449 | + // { required: true, message: '请输入起始场站', trigger: 'blur' }, | ||
450 | + // ], | ||
451 | + // endStation: [ | ||
452 | + // { required: true, message: '请输入目的场站', trigger: 'blur' }, | ||
453 | + // ], | ||
454 | + ], | ||
455 | + }, | ||
456 | + } | ||
457 | + }, | ||
458 | + methods: { | ||
459 | + handleSizeChange(val) { | ||
460 | + this.queryInfo.pageSize = val | ||
461 | + this.getList() | ||
462 | + }, | ||
463 | + handleCurrentChange(val) { | ||
464 | + this.queryInfo.pageNum = val | ||
465 | + this.getList() | ||
466 | + }, | ||
467 | + getList() { | ||
468 | + const _this = this | ||
469 | + selectInventroyrecords(this.queryInfo).then((response) => { | ||
470 | + const res = response.data | ||
471 | + console.log(response.data) | ||
472 | + if (res.code !== '200') { | ||
473 | + return _this.$message.error('获取消息收发记录,失败!') | ||
474 | + } | ||
475 | + // 获取列表数据 | ||
476 | + _this.tableData = res.data.list | ||
477 | + // 获取列表的总记录数 | ||
478 | + _this.total = res.data.total | ||
479 | + _this.$message.success('获取消息收发记录,成功!') | ||
480 | + }).catch(error => { | ||
481 | + // 关闭加载 | ||
482 | + _this.$message.error(error.toString()) | ||
483 | + }) | ||
484 | + }, | ||
485 | + // 添加对话框,打开事件 | ||
486 | + applyAdd() { | ||
487 | + this.addForm = { | ||
488 | + area: '', | ||
489 | + billweight: '', | ||
490 | + custel: '', | ||
491 | + customer: '', | ||
492 | + customername: '', | ||
493 | + goodstype: '', | ||
494 | + house:'', | ||
495 | + ietype:'', | ||
496 | + location:'', | ||
497 | + opter:'', | ||
498 | + opttime: '', | ||
499 | + pcs: '', | ||
500 | + serialnumber: '', | ||
501 | + station: '', | ||
502 | + status: '', | ||
503 | + transcar: '', | ||
504 | + transtype:'', | ||
505 | + vol:'', | ||
506 | + waybill:'', | ||
507 | + weight:'', | ||
508 | + remark:'', | ||
509 | + remark1:'', | ||
510 | + remark2:'', | ||
511 | + remark3:'', | ||
512 | + remark4:'', | ||
513 | + remark5:'', | ||
514 | + uuid:'' | ||
515 | + }; | ||
516 | + this.dialogApply= 'create'; | ||
517 | + this.apply_dialog.addDialog = true; | ||
518 | + }, | ||
519 | + // 添加功能 | ||
520 | + add() { | ||
521 | + this.$refs.addForm.validate(valid => { | ||
522 | + // 未通过,表单预校验 | ||
523 | + if (!valid) return; | ||
524 | + addInventoryrecord(this.addForm).then((response) => { | ||
525 | + let res = response.data; | ||
526 | + // 添加失败 | ||
527 | + if (res.code !== '200') { | ||
528 | + return this.$message.error(res.msg); | ||
529 | + } | ||
530 | + // 添加,成功 | ||
531 | + this.$message.success(res.msg); | ||
532 | + // 隐藏对话框 | ||
533 | + this.apply_dialog.addDialog = false; | ||
534 | + // 刷新列表 | ||
535 | + this.getList(); | ||
536 | + }).catch(error => { | ||
537 | + this.$message.error(error.toString()); | ||
538 | + }); | ||
539 | + }) | ||
540 | + }, | ||
541 | +// 打开编辑 | ||
542 | + applyEdit(row) { | ||
543 | + this.apply_dialog.addDialog = true; | ||
544 | + this.dialogApply = 'update'; | ||
545 | + this.addForm=row; | ||
546 | + }, | ||
547 | + // 编辑功能 | ||
548 | + edit() { | ||
549 | + // 进行表单的预验证 | ||
550 | + this.$refs.addForm.validate(valid => { | ||
551 | + // 未通过,表单预校验 | ||
552 | + if (!valid) return | ||
553 | + ediInventroyrecord(this.addForm).then((response) => { | ||
554 | + // console.log(row) | ||
555 | + const res = response.data | ||
556 | + if (res.code != '200') { | ||
557 | + return this.$message.error(res.msg) | ||
558 | + } | ||
559 | + this.$message.success(res.msg) | ||
560 | + // 隐藏对话框 | ||
561 | + this.apply_dialog.addDialog = false | ||
562 | + // 刷新列表 | ||
563 | + this.getList() | ||
564 | + }).catch(error => { | ||
565 | + this.$message.error(error.toString()) | ||
566 | + }) | ||
567 | + }) | ||
568 | + }, | ||
569 | + // 删除 | ||
570 | + applyDel(index, row) { | ||
571 | + // 弹框询问是否删除? | ||
572 | + this.$confirm('此操作永久删除该消息收发记录, 是否继续?', '警告', { | ||
573 | + confirmButtonText: '确定删除', | ||
574 | + cancelButtonText: '取消', | ||
575 | + type: 'warning' | ||
576 | + } | ||
577 | + ).then(() => { | ||
578 | + // console.log(row); | ||
579 | + delInventoryrecord({uuid:row.uuid}).then((response) => { | ||
580 | + // console.log(row) | ||
581 | + const res = response.data | ||
582 | + this.$message.success(res.msg) | ||
583 | + this.getList() | ||
584 | + }).catch(error => { | ||
585 | + this.$message.error(res.msg) | ||
586 | + }) | ||
587 | + }).catch(() => { | ||
588 | + }) | ||
589 | + }, | ||
590 | + }, | ||
591 | + mounted() { | ||
592 | + this.getList(); | ||
593 | + // this.getYardList(); | ||
594 | + | ||
595 | + } | ||
596 | + | ||
597 | + } | ||
598 | +</script> | ||
599 | + | ||
600 | +<style scoped> | ||
601 | + .toolbar{ | ||
602 | + height: 60px; | ||
603 | + background-color: white; | ||
604 | + /*line-height: 60px;*/ | ||
605 | + vertical-align: middle; | ||
606 | + border-radius: 5px 5px 5px 5px; | ||
607 | + padding: 15px 0 0 20px; | ||
608 | + box-shadow: 0px 5px 5px #e5e8eb; | ||
609 | + } | ||
610 | +</style> | ||
611 | + |
-
请 注册 或 登录 后发表评论