Merge remote-tracking branch 'origin/master'
正在显示
15 个修改的文件
包含
2234 行增加
和
394 行删除
| @@ -35,7 +35,7 @@ module.exports = { | @@ -35,7 +35,7 @@ module.exports = { | ||
| 35 | // target: 'http://localhost:12343',//设置你调用的接口域名和端口号 别忘了加http | 35 | // target: 'http://localhost:12343',//设置你调用的接口域名和端口号 别忘了加http |
| 36 | changeOrigin: true, | 36 | changeOrigin: true, |
| 37 | pathRewrite: { | 37 | pathRewrite: { |
| 38 | - '^/api/': '/'//这里理解成用‘/api’代替target里面的地址,后面组件中我们掉接口时直接用api代替 比如我要调用'http://40.00.100.100:3002/user/add',直接写‘/api/user/add’即可 | 38 | + '^/api/': '/', //这里理解成用‘/api’代替target里面的地址,后面组件中我们掉接口时直接用api代替 比如我要调用'http://40.00.100.100:3002/user/add',直接写‘/api/user/add’即可 |
| 39 | } | 39 | } |
| 40 | } | 40 | } |
| 41 | }, | 41 | }, |
| @@ -47,6 +47,7 @@ export default { | @@ -47,6 +47,7 @@ export default { | ||
| 47 | return axios({ | 47 | return axios({ |
| 48 | method: 'POST', // 请求协议 | 48 | method: 'POST', // 请求协议 |
| 49 | url: 'cloud-user-center/login', // 请求的地址 | 49 | url: 'cloud-user-center/login', // 请求的地址 |
| 50 | + // url: 'cloud-kako-user-center/login', // 请求的地址 | ||
| 50 | data: qs.stringify(data), // post 请求的数据 | 51 | data: qs.stringify(data), // post 请求的数据 |
| 51 | timeout: 30000, // 超时时间, 单位毫秒 | 52 | timeout: 30000, // 超时时间, 单位毫秒 |
| 52 | headers: { | 53 | headers: { |
| 1 | import axios from 'axios' | 1 | import axios from 'axios' |
| 2 | 2 | ||
| 3 | -let base = '/wlpt-flight-scheduling-interface/inquiry'; | 3 | +let base = '/wltp-flight-scheduling-interface/inquiry'; |
| 4 | 4 | ||
| 5 | +export const portList = params => { return axios.get(`${base}/portList`, { params: params }); }; | ||
| 5 | 6 | ||
| 7 | +export const exportList = params => { return axios.get(`${base}/exportList`, { params: params }); }; | ||
| 6 | 8 | ||
| 7 | -export const getList = params => { return axios.get(`${base}/list`, { params: params }); }; | 9 | +export const nternationaiiImportList = params => { return axios.get(`${base}/nternationaiiImportList`, { params: params }); }; |
| 10 | + | ||
| 11 | +export const nternationaiiExportList = params => { return axios.get(`${base}/nternationaiiExportList`, { params: params }); }; | ||
| 8 | 12 |
| 1 | import axios from 'axios' | 1 | import axios from 'axios' |
| 2 | 2 | ||
| 3 | let base = '/cloud-user-center/perm'; | 3 | let base = '/cloud-user-center/perm'; |
| 4 | +// let base = '/cloud-kako-user-center/perm'; | ||
| 4 | 5 | ||
| 5 | 6 | ||
| 6 | export const getList = params => { return axios.get(`${base}/list`, { params: params }); }; | 7 | export const getList = params => { return axios.get(`${base}/list`, { params: params }); }; |
src/api/remote_interface/byont_import.js
0 → 100644
| 1 | +import axios from 'axios' | ||
| 2 | +import http from "../http"; | ||
| 3 | + | ||
| 4 | +let base = 'byonet-import'; | ||
| 5 | + | ||
| 6 | +export const trailerFrameNoSuccess = params => {return axios.post(`${base}/businesstype/trailerFrameNoSuccess`, params);}; | ||
| 7 | + | ||
| 8 | +export const list = params => {return http.get(`${base}/businesstype/list`, params);}; | ||
| 9 | + | ||
| 10 | +export const aisleList = params => {return http.get(`${base}/businesstype/aisleList`, params);}; | ||
| 11 | + | ||
| 12 | +export const save = params => {return axios.post(`${base}/businesstype/save`, params);}; | ||
| 13 | + | ||
| 14 | + | ||
| 15 | + |
| 1 | import axios from 'axios' | 1 | import axios from 'axios' |
| 2 | 2 | ||
| 3 | let base = '/cloud-user-center/role'; | 3 | let base = '/cloud-user-center/role'; |
| 4 | +// let baseUrl = '/cloud-kako-user-center/role' | ||
| 4 | 5 | ||
| 5 | 6 | ||
| 6 | export const getList = params => { return axios.get(`${base}/list`, { params: params }); }; | 7 | export const getList = params => { return axios.get(`${base}/list`, { params: params }); }; |
src/api/station_dispatch.js
0 → 100644
| 1 | +import http from './http.js' | ||
| 2 | + | ||
| 3 | +let baseUrl = 'station-manage' | ||
| 4 | + | ||
| 5 | +// 场站信息,分页查询 | ||
| 6 | +export const selectYardList = params =>{return http.get(`${baseUrl}/yard/page`, params);}; | ||
| 7 | +export const getYardList = params =>{return http.get(`${baseUrl}/yard/list`, params);}; | ||
| 8 | +// 场站信息,新增 | ||
| 9 | +export const insertYard = params =>{return http.post(`${baseUrl}/yard/insert`, params);}; | ||
| 10 | +// 场站信息,编辑 | ||
| 11 | +export const updateYard = params =>{return http.put(`${baseUrl}/yard/update`, params);}; | ||
| 12 | +// 场站信息,删除 | ||
| 13 | +export const deleteYard = params =>{return http.del(`${baseUrl}/yard/delete`, params);}; | ||
| 14 | + | ||
| 15 | +// 卡口信息,分页查询 | ||
| 16 | +export const selectBayonetList = params =>{return http.get(`${baseUrl}/bayonet/page`, params);}; | ||
| 17 | +// 卡口信息,新增 | ||
| 18 | +export const insertBayonet = params =>{return http.post(`${baseUrl}/bayonet/insert`, params);}; | ||
| 19 | +// 卡口信息,编辑 | ||
| 20 | +export const updateBayonet = params =>{return http.put(`${baseUrl}/bayonet/update`, params);}; | ||
| 21 | +// 卡口信息,删除 | ||
| 22 | +export const deleteBayonet = params =>{return http.del(`${baseUrl}/bayonet/delete`, params);}; | ||
| 23 | + | ||
| 24 | + | ||
| 25 | +// 仓库信息,分页查询 | ||
| 26 | +export const selectWarehouseList = params =>{return http.get(`${baseUrl}/warehouse/page`, params);}; | ||
| 27 | +// 仓库信息,新增 | ||
| 28 | +export const insertWarehouse = params =>{return http.post(`${baseUrl}/warehouse/insert`, params);}; | ||
| 29 | +// 仓库信息,编辑 | ||
| 30 | +export const updateWarehouse = params =>{return http.put(`${baseUrl}/warehouse/update`, params);}; | ||
| 31 | +// 仓库信息,删除 | ||
| 32 | +export const deleteWarehouse = params =>{return http.del(`${baseUrl}/warehouse/delete`, params);}; | ||
| 33 | + |
| 1 | import http from './http.js' | 1 | import http from './http.js' |
| 2 | let baseUrl = '/cloud-user-center/user' | 2 | let baseUrl = '/cloud-user-center/user' |
| 3 | +// let baseUrl = '/cloud-kako-user-center/user' | ||
| 3 | export const getUserList = params => { return http.get(`${baseUrl}/list`, params); }; | 4 | export const getUserList = params => { return http.get(`${baseUrl}/list`, params); }; |
| 4 | 5 | ||
| 5 | export const getUserListPage = params => { return http.get(`/user/list`,params) }; | 6 | export const getUserListPage = params => { return http.get(`/user/list`,params) }; |
| @@ -91,6 +91,12 @@ import Consignee from './views/consigner/consignee.vue' | @@ -91,6 +91,12 @@ import Consignee from './views/consigner/consignee.vue' | ||
| 91 | import Security from './views/security/security.vue' | 91 | import Security from './views/security/security.vue' |
| 92 | 92 | ||
| 93 | 93 | ||
| 94 | +// 场站管理 | ||
| 95 | +import Yard from './views/station_manage/Yard.vue' | ||
| 96 | +import Bayonet from './views/station_manage/Bayonet.vue' | ||
| 97 | +import Warehouse from './views/station_manage/Warehouse.vue' | ||
| 98 | + | ||
| 99 | + | ||
| 94 | 100 | ||
| 95 | let routes = [ | 101 | let routes = [ |
| 96 | { | 102 | { |
| @@ -316,6 +322,17 @@ let routes = [ | @@ -316,6 +322,17 @@ let routes = [ | ||
| 316 | {path:'/queryFlightConfigure',component:queryFlightConfigure,name:'航班配置查询'}, | 322 | {path:'/queryFlightConfigure',component:queryFlightConfigure,name:'航班配置查询'}, |
| 317 | ] | 323 | ] |
| 318 | }, | 324 | }, |
| 325 | + { | ||
| 326 | + path: '/', | ||
| 327 | + component: Home, | ||
| 328 | + name: '场站管理', | ||
| 329 | + iconCls: 'el-icon-setting',//图标样式class | ||
| 330 | + children: [ | ||
| 331 | + {path: '/yard', component: Yard, name: '场站管理'}, | ||
| 332 | + {path: '/bayonet', component: Bayonet, name: '卡口管理'}, | ||
| 333 | + {path: '/warehouse', component: Warehouse, name: '仓库管理'}, | ||
| 334 | + ] | ||
| 335 | + }, | ||
| 319 | 336 | ||
| 320 | { | 337 | { |
| 321 | path: '/empt', | 338 | path: '/empt', |
| @@ -2,38 +2,45 @@ | @@ -2,38 +2,45 @@ | ||
| 2 | <section> | 2 | <section> |
| 3 | <!-- 工具条--> | 3 | <!-- 工具条--> |
| 4 | <el-row class="toolbar" style="padding-bottom: 0px;"> | 4 | <el-row class="toolbar" style="padding-bottom: 0px;"> |
| 5 | - <el-form :inline="true" ref="form" :model="form"> | 5 | + <el-form :inline="true" ref="form" :model="filters"> |
| 6 | <el-row> | 6 | <el-row> |
| 7 | - <el-col span="5"> | 7 | + <el-col :span="5"> |
| 8 | <el-form-item label="车牌号:"> | 8 | <el-form-item label="车牌号:"> |
| 9 | - <el-input v-model="form.input" placeholder="" size="small"style="width: 120px"></el-input> | 9 | + <el-input v-model="filters.trailerFrameNo" placeholder="" size="small"style="width: 120px"></el-input> |
| 10 | </el-form-item> | 10 | </el-form-item> |
| 11 | </el-col> | 11 | </el-col> |
| 12 | - <el-col span="5"> | 12 | + <el-col :span="5"> |
| 13 | <el-form-item label="挂靠名称:"> | 13 | <el-form-item label="挂靠名称:"> |
| 14 | - <el-input v-model="form.input" placeholder="" size="small" style="width: 120px"></el-input> | 14 | + <el-input v-model="filters.agentname" placeholder="" size="small" style="width: 120px"></el-input> |
| 15 | </el-form-item> | 15 | </el-form-item> |
| 16 | </el-col> | 16 | </el-col> |
| 17 | - <el-col span="5"> | 17 | + <el-col :span="5"> |
| 18 | <el-form-item label="目的场站:"> | 18 | <el-form-item label="目的场站:"> |
| 19 | - <el-select v-model="form.region" placeholder="请选择" size="small" style="width: 120px"> | ||
| 20 | - <el-option label="综保区货站" value="zongbaoqu"></el-option> | ||
| 21 | - <el-option label="三号货站" value="sanhao"></el-option> | ||
| 22 | - <el-option label="冷链货站" value="lenglian"></el-option> | ||
| 23 | - <el-option label="快邮货站" value="kuaiyou"></el-option> | ||
| 24 | - <el-option label="西货站" value="xi"></el-option> | 19 | + <el-select v-model="filters.endstation" @change="aisleOption(filters.endstation)" clearable placeholder="请选择"> |
| 20 | + <el-option | ||
| 21 | + v-for="item in options" | ||
| 22 | + :key="item.stationId" | ||
| 23 | + :label="item.name" | ||
| 24 | + :value="item.stationId"> | ||
| 25 | + </el-option> | ||
| 25 | </el-select> | 26 | </el-select> |
| 26 | </el-form-item> | 27 | </el-form-item> |
| 27 | </el-col> | 28 | </el-col> |
| 28 | - <el-col span="5"> | ||
| 29 | - <el-form-item label="卡 口:" style="margin-left: 10px"> | ||
| 30 | - <el-select v-model="form.region" placeholder="请选择" size="small" style="width: 120px"> | 29 | + <el-col :span="5"> |
| 30 | + <el-form-item label="卡口:" style="margin-left: 10px"> | ||
| 31 | + <el-select v-model="filters.aisle" :disabled="disabled" placeholder="先选择目的场站" size="small" style="width: 150px"> | ||
| 32 | + <el-option | ||
| 33 | + v-for="item in aisleOptions" | ||
| 34 | + :key="item.channel" | ||
| 35 | + :label="item.name" | ||
| 36 | + :value="item.channel"> | ||
| 37 | + </el-option> | ||
| 31 | </el-select> | 38 | </el-select> |
| 32 | </el-form-item> | 39 | </el-form-item> |
| 33 | </el-col> | 40 | </el-col> |
| 34 | - <el-col span="2"> | 41 | + <el-col :span="2"> |
| 35 | <el-form-item> | 42 | <el-form-item> |
| 36 | - <el-button type="primary" @click="" size="small">查 询</el-button> | 43 | + <el-button type="primary" @click="getList()" size="small">查询</el-button> |
| 37 | </el-form-item> | 44 | </el-form-item> |
| 38 | </el-col> | 45 | </el-col> |
| 39 | </el-row> | 46 | </el-row> |
| @@ -42,81 +49,44 @@ | @@ -42,81 +49,44 @@ | ||
| 42 | <!-- 列表--> | 49 | <!-- 列表--> |
| 43 | <el-row> | 50 | <el-row> |
| 44 | <el-table | 51 | <el-table |
| 45 | - :data="tableData" | 52 | + :data="businesstypeList" |
| 46 | border | 53 | border |
| 54 | + v-loading="businesstypeListLoading" | ||
| 47 | style="width: 100%"> | 55 | style="width: 100%"> |
| 48 | - <el-table-column | ||
| 49 | - fixed | ||
| 50 | - prop="date" | ||
| 51 | - label="操作"> | 56 | + <el-table-column fixed prop="date" label="操作"> |
| 52 | <el-button @click="handleClick(scope.row)" type="primary" size="small">查看</el-button> | 57 | <el-button @click="handleClick(scope.row)" type="primary" size="small">查看</el-button> |
| 53 | </el-table-column> | 58 | </el-table-column> |
| 54 | - <el-table-column | ||
| 55 | - prop="name" | ||
| 56 | - label="是否失效"> | 59 | + <el-table-column prop="isvalid" :formatter="isvalidFormatter" label="是否失效"> |
| 57 | </el-table-column> | 60 | </el-table-column> |
| 58 | - <el-table-column | ||
| 59 | - prop="province" | ||
| 60 | - label="车牌号" | ||
| 61 | - width="100"> | 61 | + <el-table-column prop="trailerFrameNo" label="车牌号" width="100"> |
| 62 | </el-table-column> | 62 | </el-table-column> |
| 63 | - <el-table-column | ||
| 64 | - prop="city" | ||
| 65 | - label="挂靠单位"> | 63 | + <el-table-column prop="agentname" label="挂靠单位"> |
| 66 | </el-table-column> | 64 | </el-table-column> |
| 67 | - <el-table-column | ||
| 68 | - prop="zip" | ||
| 69 | - label="目的关区"> | 65 | + <el-table-column prop="endport" label="目的关区"> |
| 70 | </el-table-column> | 66 | </el-table-column> |
| 71 | - <el-table-column | ||
| 72 | - prop="name" | ||
| 73 | - label="卡口"> | 67 | + <el-table-column prop="aisle" label="卡口" width="100"> |
| 74 | </el-table-column> | 68 | </el-table-column> |
| 75 | - <el-table-column | ||
| 76 | - prop="province" | ||
| 77 | - label="地磅称重"> | 69 | + <el-table-column prop="aislewt" label="地磅称重"> |
| 78 | </el-table-column> | 70 | </el-table-column> |
| 79 | - <el-table-column | ||
| 80 | - prop="city" | ||
| 81 | - label="总货重"> | 71 | + <el-table-column prop="remark" label="总货重"> |
| 82 | </el-table-column> | 72 | </el-table-column> |
| 83 | - <el-table-column | ||
| 84 | - prop="address" | ||
| 85 | - label="进出差值"> | 73 | + <el-table-column prop="remark1" label="进出差值"> |
| 86 | </el-table-column> | 74 | </el-table-column> |
| 87 | - <el-table-column | ||
| 88 | - prop="zip" | ||
| 89 | - label="备案车重"> | 75 | + <el-table-column prop="remark2" label="备案车重"> |
| 90 | </el-table-column> | 76 | </el-table-column> |
| 91 | - <el-table-column | ||
| 92 | - prop="name" | ||
| 93 | - label="业务类型"> | 77 | + <el-table-column prop="businesstype" label="业务类型"> |
| 94 | </el-table-column> | 78 | </el-table-column> |
| 95 | - <el-table-column | ||
| 96 | - prop="province" | ||
| 97 | - label="货物类型"> | 79 | + <el-table-column prop="cocode" label="货物类型"> |
| 98 | </el-table-column> | 80 | </el-table-column> |
| 99 | - <el-table-column | ||
| 100 | - prop="city" | ||
| 101 | - label="二维码编号" | ||
| 102 | - width="110"> | 81 | + <el-table-column prop="barcode" label="二维码编号" width="110"> |
| 103 | </el-table-column> | 82 | </el-table-column> |
| 104 | - <el-table-column | ||
| 105 | - prop="address" | ||
| 106 | - label="进出场站"> | 83 | + <el-table-column prop="turnoverflag" :formatter="turnoverflagFormatter" label="进出场站"> |
| 107 | </el-table-column> | 84 | </el-table-column> |
| 108 | - <el-table-column | ||
| 109 | - prop="zip" | ||
| 110 | - label="已进已出"> | 85 | + <el-table-column prop="contrastflag" label="已进已出"> |
| 111 | </el-table-column> | 86 | </el-table-column> |
| 112 | - <el-table-column | ||
| 113 | - prop="zip" | ||
| 114 | - label="更新时间"> | 87 | + <el-table-column prop="updateDate" label="更新时间" width="155"> |
| 115 | </el-table-column> | 88 | </el-table-column> |
| 116 | - <el-table-column | ||
| 117 | - fixed="right" | ||
| 118 | - label="操作" | ||
| 119 | - width="150"> | 89 | + <el-table-column fixed="right" label="操作" width="150"> |
| 120 | <template slot-scope="scope"> | 90 | <template slot-scope="scope"> |
| 121 | <el-button type="success" size="mini">修改</el-button> | 91 | <el-button type="success" size="mini">修改</el-button> |
| 122 | <el-button type="danger" size="mini">删除</el-button> | 92 | <el-button type="danger" size="mini">删除</el-button> |
| @@ -131,53 +101,134 @@ | @@ -131,53 +101,134 @@ | ||
| 131 | <el-pagination | 101 | <el-pagination |
| 132 | @size-change="handleSizeChange" | 102 | @size-change="handleSizeChange" |
| 133 | @current-change="handleCurrentChange" | 103 | @current-change="handleCurrentChange" |
| 134 | - :current-page="currentPage4" | ||
| 135 | - :page-sizes="[100, 200, 300, 400]" | ||
| 136 | - :page-size="100" | 104 | + :current-page="pageSize" |
| 105 | + :page-sizes="[10, 100, 200, 300]" | ||
| 106 | + :page-size="10" | ||
| 137 | layout="total, sizes, prev, pager, next, jumper" | 107 | layout="total, sizes, prev, pager, next, jumper" |
| 138 | - :total="400"> | 108 | + :total="this.total"> |
| 139 | </el-pagination> | 109 | </el-pagination> |
| 140 | </div> | 110 | </div> |
| 141 | </section> | 111 | </section> |
| 142 | </template> | 112 | </template> |
| 143 | - | ||
| 144 | <script> | 113 | <script> |
| 114 | + import {list, aisleList} from '../../api/remote_interface/byont_import'; | ||
| 115 | + import {getYardList as yartList} from "../../api/station_dispatch"; | ||
| 145 | export default { | 116 | export default { |
| 146 | data() { | 117 | data() { |
| 147 | return { | 118 | return { |
| 148 | - tableData:[ | ||
| 149 | - { | ||
| 150 | - date: '', | ||
| 151 | - name: '未失效', | ||
| 152 | - province: '晋A5ES6', | ||
| 153 | - city: '河南诺畅', | ||
| 154 | - address: '4604', | ||
| 155 | - zip: '西货站' | 119 | + businesstypeList: [], |
| 120 | + pageSize: 1, | ||
| 121 | + limitSize: 10, | ||
| 122 | + total: 1, | ||
| 123 | + options: [], | ||
| 124 | + aisleOptions: [], | ||
| 125 | + disabled: true, | ||
| 126 | + filters: { | ||
| 127 | + trailerFrameNo: '', | ||
| 128 | + agentname: '', | ||
| 129 | + endstation: '', | ||
| 130 | + aisle: '', | ||
| 131 | + }, | ||
| 132 | + businesstypeListLoading: false | ||
| 156 | } | 133 | } |
| 157 | - ], | ||
| 158 | - currentPage4: 4, | ||
| 159 | - form: { | ||
| 160 | - name: '', | ||
| 161 | - region: '', | ||
| 162 | - date1: '', | ||
| 163 | - date2: '', | ||
| 164 | - delivery: false, | ||
| 165 | - type: [], | ||
| 166 | - resource: '', | ||
| 167 | - desc: '' | 134 | + }, |
| 135 | + methods: { | ||
| 136 | + | ||
| 137 | + isvalidFormatter: function(row, column){ | ||
| 138 | + if (row.isvalid == '0'){ | ||
| 139 | + return "未失效" | ||
| 140 | + }else { | ||
| 141 | + return "失效" | ||
| 168 | } | 142 | } |
| 143 | + }, | ||
| 144 | + turnoverflagFormatter: function(row, column){ | ||
| 145 | + if (row.turnoverflag == 'I'){ | ||
| 146 | + return "进场站" | ||
| 147 | + }else { | ||
| 148 | + return "出场站" | ||
| 169 | } | 149 | } |
| 170 | }, | 150 | }, |
| 171 | - methods: { | 151 | + // 获取列表 |
| 152 | + getList() { | ||
| 153 | + let para = { | ||
| 154 | + pageSize: this.pageSize, | ||
| 155 | + limitSize: this.limitSize, | ||
| 156 | + trailerFrameNo: this.filters.trailerFrameNo, | ||
| 157 | + agentname: this.filters.agentname, | ||
| 158 | + endstation: this.filters.endstation, | ||
| 159 | + aisle: this.filters.aisle | ||
| 160 | + }; | ||
| 161 | + this.businesstypeListLoading = true; | ||
| 162 | + console.log(para); | ||
| 163 | + list(para).then((res) => { | ||
| 164 | + this.total = res.data.data.total; | ||
| 165 | + this.businesstypeList = res.data.data.list; | ||
| 166 | + this.businesstypeListLoading = false; | ||
| 167 | + }).catch((error) => { | ||
| 168 | + this.businesstypeListLoading = false; | ||
| 169 | + if(null!= error.response && error.response!==undefined){ | ||
| 170 | + let status= error.response.status; | ||
| 171 | + let msg = error.response.statusText; | ||
| 172 | + alert(status+msg); | ||
| 173 | + }else { | ||
| 174 | + alert(error); | ||
| 175 | + } | ||
| 176 | + | ||
| 177 | + }); | ||
| 178 | + | ||
| 179 | + }, | ||
| 180 | + | ||
| 181 | + // 获取场站 | ||
| 182 | + getYardList(){ | ||
| 183 | + yartList().then((res) =>{ | ||
| 184 | + this.options = res.data.data; | ||
| 185 | + }).catch((error) => { | ||
| 186 | + if(null!= error.response && error.response!==undefined){ | ||
| 187 | + let status= error.response.status; | ||
| 188 | + let msg = error.response.statusText; | ||
| 189 | + alert(status+msg); | ||
| 190 | + }else { | ||
| 191 | + alert(error); | ||
| 192 | + } | ||
| 193 | + | ||
| 194 | + }); | ||
| 195 | + }, | ||
| 196 | + // 获取卡口名称 | ||
| 197 | + aisleOption(value){ | ||
| 198 | + let para = { | ||
| 199 | + yardId: value | ||
| 200 | + } | ||
| 201 | + this.filters.aisle = ''; | ||
| 202 | + aisleList(para).then((res) =>{ | ||
| 203 | + this.aisleOptions = res.data.data; | ||
| 204 | + this.disabled = false; | ||
| 205 | + }).catch((error) => { | ||
| 206 | + if(null!= error.response && error.response!==undefined){ | ||
| 207 | + let status= error.response.status; | ||
| 208 | + let msg = error.response.statusText; | ||
| 209 | + alert(status+msg); | ||
| 210 | + }else { | ||
| 211 | + alert(error); | ||
| 212 | + } | ||
| 213 | + | ||
| 214 | + }); | ||
| 215 | + }, | ||
| 172 | onSubmit() { | 216 | onSubmit() { |
| 173 | console.log('submit!'); | 217 | console.log('submit!'); |
| 174 | }, | 218 | }, |
| 175 | handleSizeChange(val) { | 219 | handleSizeChange(val) { |
| 176 | - console.log(`每页 ${val} 条`); | 220 | + this.limitSize = val; |
| 221 | + this.getList(); | ||
| 177 | }, | 222 | }, |
| 178 | handleCurrentChange(val) { | 223 | handleCurrentChange(val) { |
| 179 | - console.log(`当前页: ${val}`); | 224 | + this.pageSize = val; |
| 225 | + this.getList(); | ||
| 226 | + | ||
| 180 | } | 227 | } |
| 228 | + }, | ||
| 229 | + mounted() { | ||
| 230 | + this.getYardList(); | ||
| 231 | + this.getList(); | ||
| 181 | } | 232 | } |
| 182 | } | 233 | } |
| 183 | </script> | 234 | </script> |
| @@ -2,16 +2,16 @@ | @@ -2,16 +2,16 @@ | ||
| 2 | <section> | 2 | <section> |
| 3 | <!-- 工具条--> | 3 | <!-- 工具条--> |
| 4 | <el-row class="toolbar" style="padding-bottom: 0px;"> | 4 | <el-row class="toolbar" style="padding-bottom: 0px;"> |
| 5 | - <el-form :inline="true" ref="form" :model="form" > | 5 | + <el-form :inline="true" ref="filters" :model="filters" :rules="rules" > |
| 6 | <el-row> | 6 | <el-row> |
| 7 | - <el-col span="8"> | ||
| 8 | - <el-form-item label="主单号:"> | ||
| 9 | - <el-input v-model="form.input" placeholder="" size="small" style="width: 240px"></el-input> | 7 | + <el-col :span="8"> |
| 8 | + <el-form-item label="主单号:" prop="waybill"> | ||
| 9 | + <el-input v-model="filters.waybill" placeholder="" size="small" style="width: 240px"></el-input> | ||
| 10 | </el-form-item> | 10 | </el-form-item> |
| 11 | </el-col> | 11 | </el-col> |
| 12 | - <el-col span="8"> | 12 | + <el-col :span="8"> |
| 13 | <el-form-item> | 13 | <el-form-item> |
| 14 | - <el-button type="primary" @click="" size="small" style="margin-left: 40px">查 询</el-button> | 14 | + <el-button type="primary" @click="getWaybillList('filters')" size="small" style="margin-left: 40px">查询</el-button> |
| 15 | <span style="color: red;margin-left: 10px">查询单号前请先选定业务类型</span> | 15 | <span style="color: red;margin-left: 10px">查询单号前请先选定业务类型</span> |
| 16 | </el-form-item> | 16 | </el-form-item> |
| 17 | </el-col> | 17 | </el-col> |
| @@ -20,64 +20,42 @@ | @@ -20,64 +20,42 @@ | ||
| 20 | </el-row> | 20 | </el-row> |
| 21 | <!-- 列表--> | 21 | <!-- 列表--> |
| 22 | <el-row> | 22 | <el-row> |
| 23 | - <el-table | ||
| 24 | - :data="tableData" | ||
| 25 | - style="width: 100%"> | ||
| 26 | - <el-table-column | ||
| 27 | - fixed | ||
| 28 | - prop="date" | ||
| 29 | - label="操作"> | ||
| 30 | - <el-button @click="handleClick(scope.row)" type="primary" size="small">查看</el-button> | 23 | + <el-table :data="awbaList" v-loading="commonLoading" style="width: 100%"> |
| 24 | + <el-table-column fixed label="操作"> | ||
| 25 | + <template slot-scope="scope"> | ||
| 26 | + <el-button @click="addWaybill(scope.$index, scope.row)" type="primary" size="small">添加</el-button> | ||
| 27 | + </template> | ||
| 31 | </el-table-column> | 28 | </el-table-column> |
| 32 | - <el-table-column | ||
| 33 | - prop="date" | ||
| 34 | - label="航班号"> | 29 | + <el-table-column prop="flightno" label="航班号"> |
| 35 | </el-table-column> | 30 | </el-table-column> |
| 36 | - <el-table-column | ||
| 37 | - prop="name" | ||
| 38 | - label="航班日期"> | 31 | + <el-table-column prop="flightDate" :formatter="flightDate" label="航班日期"> |
| 39 | </el-table-column> | 32 | </el-table-column> |
| 40 | - <el-table-column | ||
| 41 | - prop="address" | ||
| 42 | - label="航段"> | 33 | + <el-table-column prop="segment" label="航段"> |
| 43 | </el-table-column> | 34 | </el-table-column> |
| 44 | - <el-table-column | ||
| 45 | - prop="date" | ||
| 46 | - label="主单号"> | 35 | + <el-table-column prop="waybillnomaster" label="主单号"> |
| 47 | </el-table-column> | 36 | </el-table-column> |
| 48 | - <el-table-column | ||
| 49 | - prop="name" | ||
| 50 | - label="件数"> | 37 | + <el-table-column prop="totalpiece" label="件数"> |
| 51 | </el-table-column> | 38 | </el-table-column> |
| 52 | - <el-table-column | ||
| 53 | - prop="address" | ||
| 54 | - label="重量"> | 39 | + <el-table-column prop="totalweight" label="重量"> |
| 55 | </el-table-column> | 40 | </el-table-column> |
| 56 | - <el-table-column | ||
| 57 | - prop="date" | ||
| 58 | - label="关区"> | 41 | + <el-table-column prop="customscode" label="关区"> |
| 59 | </el-table-column> | 42 | </el-table-column> |
| 60 | - <el-table-column | ||
| 61 | - prop="name" | ||
| 62 | - label="时间"> | 43 | + <el-table-column prop="createdate" :formatter="formatDate" label="时间"> |
| 63 | </el-table-column> | 44 | </el-table-column> |
| 64 | - <el-table-column | ||
| 65 | - prop="address" | ||
| 66 | - label="回执内容"> | 45 | + <el-table-column prop="receiptinformation" label="回执内容" width="280px"> |
| 67 | </el-table-column> | 46 | </el-table-column> |
| 68 | </el-table> | 47 | </el-table> |
| 69 | </el-row> | 48 | </el-row> |
| 70 | <!-- 申请表单信息--> | 49 | <!-- 申请表单信息--> |
| 71 | <el-row style="padding-bottom: 0px;"> | 50 | <el-row style="padding-bottom: 0px;"> |
| 72 | - <el-form ref="form" :model="form"> | 51 | + <el-form ref="addForm" :model="addForm" :rules="addFormRules"> |
| 73 | <el-row> | 52 | <el-row> |
| 74 | - <el-col span="8"> | 53 | + <el-col :span="10"> |
| 75 | <el-row> | 54 | <el-row> |
| 76 | <el-form-item label="输入备注:"> | 55 | <el-form-item label="输入备注:"> |
| 77 | <el-input | 56 | <el-input |
| 78 | type="text" | 57 | type="text" |
| 79 | - placeholder="" | ||
| 80 | - v-model="form.text" | 58 | + v-model="addForm.remark3" |
| 81 | maxlength="10" | 59 | maxlength="10" |
| 82 | show-word-limit | 60 | show-word-limit |
| 83 | size="small" style="width: 180px"> | 61 | size="small" style="width: 180px"> |
| @@ -85,58 +63,64 @@ | @@ -85,58 +63,64 @@ | ||
| 85 | </el-form-item> | 63 | </el-form-item> |
| 86 | </el-row> | 64 | </el-row> |
| 87 | <el-row> | 65 | <el-row> |
| 88 | - <el-form-item label="车牌号码:"> | ||
| 89 | - <el-input v-model="form.input" placeholder="" size="small" style="width: 180px"></el-input> | 66 | + <el-form-item label="车牌号码:" prop="trailerFrameNo"> |
| 67 | + <el-input v-model="addForm.trailerFrameNo" placeholder="请输入车牌号" @change="trailerFrameNo(addForm.trailerFrameNo)" size="small" style="width: 180px"></el-input> | ||
| 90 | </el-form-item> | 68 | </el-form-item> |
| 91 | </el-row> | 69 | </el-row> |
| 92 | <el-row> | 70 | <el-row> |
| 93 | - <el-form-item label="货物类型:"> | ||
| 94 | - <el-select v-model="form.region" placeholder="请选择" size="small" style="width: 180px"> | ||
| 95 | - <el-option label="转关货" value="zongbaoqu"></el-option> | ||
| 96 | - <el-option label="换单货" value="sanhao"></el-option> | ||
| 97 | - <el-option label="普通货" value="lenglian"></el-option> | ||
| 98 | - <el-option label="退库货" value="kuaiyou"></el-option> | ||
| 99 | - <el-option label="查验货" value="xi"></el-option> | 71 | + <el-form-item label="货物类型:" prop="cocode"> |
| 72 | + <el-select v-model="addForm.cocode" placeholder="请选择" size="small" style="width: 180px"> | ||
| 73 | + <el-option label="转关货" value="转关货"></el-option> | ||
| 74 | + <el-option label="换单货" value="换单货"></el-option> | ||
| 75 | + <el-option label="普通货" value="普通货"></el-option> | ||
| 76 | + <el-option label="退库货" value="退库货"></el-option> | ||
| 77 | + <el-option label="查验货" value="查验货"></el-option> | ||
| 100 | </el-select> | 78 | </el-select> |
| 101 | </el-form-item> | 79 | </el-form-item> |
| 102 | </el-row> | 80 | </el-row> |
| 103 | <el-row> | 81 | <el-row> |
| 104 | - <el-form-item label="运输公司:"> | ||
| 105 | - <el-input v-model="form.input" placeholder="" size="small" style="width: 180px"></el-input> | 82 | + <el-form-item label="场站选择:" prop="endstationList"> |
| 83 | + <el-select v-model="addForm.endstationList" multiple placeholder="请选择"> | ||
| 84 | + <el-option | ||
| 85 | + v-for="item in options" | ||
| 86 | + :key="item.stationId" | ||
| 87 | + :label="item.name" | ||
| 88 | + :value="item.stationId"> | ||
| 89 | + </el-option> | ||
| 90 | + </el-select> | ||
| 106 | </el-form-item> | 91 | </el-form-item> |
| 107 | </el-row> | 92 | </el-row> |
| 108 | <el-row> | 93 | <el-row> |
| 109 | - <el-form-item label="挂靠单位:"> | ||
| 110 | - <el-input v-model="form.input" placeholder="" size="small" style="width: 180px"></el-input> | 94 | + <el-form-item label="运输公司:"> |
| 95 | + <el-input v-model="addForm.agentno" placeholder="" size="small" style="width: 180px"></el-input> | ||
| 111 | </el-form-item> | 96 | </el-form-item> |
| 112 | </el-row> | 97 | </el-row> |
| 113 | - </el-col> | ||
| 114 | - <el-col span="7"> | ||
| 115 | <el-row> | 98 | <el-row> |
| 116 | - <el-form-item label="是否空车:"> | ||
| 117 | - <el-radio v-model="radio" label="1" style="margin-left: 20px">是</el-radio> | ||
| 118 | - <el-radio v-model="radio" label="2">否</el-radio> | 99 | + <el-form-item label="挂靠单位:"> |
| 100 | + <el-input v-model="addForm.agentname" placeholder="" size="small" style="width: 180px"></el-input> | ||
| 119 | </el-form-item> | 101 | </el-form-item> |
| 120 | </el-row> | 102 | </el-row> |
| 103 | + </el-col> | ||
| 104 | + <el-col :span="7"> | ||
| 121 | <el-row> | 105 | <el-row> |
| 122 | - <el-form-item label="业务类型:"> | ||
| 123 | - <el-select v-model="form.region" placeholder="请选择" size="small" style="width: 180px"> | ||
| 124 | - <el-option label="进口提货" value="zongbaoqu"></el-option> | ||
| 125 | - <el-option label="出口送货" value="sanhao"></el-option> | ||
| 126 | - <el-option label="分拨业务" value="lenglian"></el-option> | ||
| 127 | - <el-option label="调拨业务" value="kuaiyou"></el-option> | 106 | + <el-form-item label="业务类型:" prop="businesstype"> |
| 107 | + <el-select v-model="addForm.businesstype" clearable placeholder="请选择" size="small" style="width: 180px"> | ||
| 108 | + <el-option label="进口提货" value="进口提货"></el-option> | ||
| 109 | + <el-option label="出口送货" value="出口送货"></el-option> | ||
| 110 | + <el-option label="分拨业务" value="分拨业务"></el-option> | ||
| 111 | + <el-option label="调拨业务" value="调拨业务"></el-option> | ||
| 128 | </el-select> | 112 | </el-select> |
| 129 | </el-form-item> | 113 | </el-form-item> |
| 130 | 114 | ||
| 131 | </el-row> | 115 | </el-row> |
| 132 | <el-row> | 116 | <el-row> |
| 133 | <el-form-item label="申请单位:"> | 117 | <el-form-item label="申请单位:"> |
| 134 | - <el-input v-model="form.input" placeholder="" size="small" style="width: 180px"></el-input> | 118 | + <el-input v-model="addForm.veProperty" disabled size="small" style="width: 180px"></el-input> |
| 135 | </el-form-item> | 119 | </el-form-item> |
| 136 | </el-row> | 120 | </el-row> |
| 137 | <el-row> | 121 | <el-row> |
| 138 | <el-form-item label="备案单位:"> | 122 | <el-form-item label="备案单位:"> |
| 139 | - <el-input v-model="form.input" placeholder="" size="small" style="width: 180px"></el-input> | 123 | + <el-input v-model="addForm.trailerLicenseNo" disabled size="small" style="width: 180px"></el-input> |
| 140 | </el-form-item> | 124 | </el-form-item> |
| 141 | 125 | ||
| 142 | </el-row> | 126 | </el-row> |
| @@ -146,114 +130,313 @@ | @@ -146,114 +130,313 @@ | ||
| 146 | type="textarea" | 130 | type="textarea" |
| 147 | :rows="4" | 131 | :rows="4" |
| 148 | placeholder="请输入主单号,例如17212341234,多个单号以‘,’(英文)分割" | 132 | placeholder="请输入主单号,例如17212341234,多个单号以‘,’(英文)分割" |
| 149 | - v-model="textarea" | 133 | + v-model="addForm.masterList" |
| 150 | style="width: 180px"> | 134 | style="width: 180px"> |
| 151 | </el-input> | 135 | </el-input> |
| 152 | </el-form-item> | 136 | </el-form-item> |
| 153 | </el-row> | 137 | </el-row> |
| 154 | - | ||
| 155 | - </el-col> | ||
| 156 | - <el-col span="3"> | ||
| 157 | - <el-row> | ||
| 158 | - <el-form-item label="选择场站信息:" > | ||
| 159 | - </el-form-item> | ||
| 160 | - </el-row> | ||
| 161 | - </el-col> | ||
| 162 | - <el-col span="4"> | ||
| 163 | - <el-row> | ||
| 164 | - <el-tree | ||
| 165 | - :data="data" | ||
| 166 | - show-checkbox | ||
| 167 | - node-key="id" | ||
| 168 | - :default-expanded-keys="[2, 3]"> | ||
| 169 | - </el-tree> | ||
| 170 | - </el-row> | ||
| 171 | </el-col> | 138 | </el-col> |
| 172 | </el-row> | 139 | </el-row> |
| 173 | <el-row style="margin-left: 320px"> | 140 | <el-row style="margin-left: 320px"> |
| 174 | - <el-button type="success">保 存</el-button> | ||
| 175 | - <el-button type="info">返 回</el-button> | 141 | +<!-- <el-button type="primary" @click="saveSubmit()" :disabled="disabledStr">保存</el-button>--> |
| 142 | + <el-button type="primary" @click="saveSubmit()" :disabledStr="disabledStr" >保存</el-button> | ||
| 176 | </el-row> | 143 | </el-row> |
| 177 | </el-form> | 144 | </el-form> |
| 178 | </el-row> | 145 | </el-row> |
| 179 | </section> | 146 | </section> |
| 180 | 147 | ||
| 181 | </template> | 148 | </template> |
| 182 | - | ||
| 183 | <script> | 149 | <script> |
| 150 | + import {getYardList as yartList} from '../../api/station_dispatch' | ||
| 151 | + import {trailerFrameNoSuccess, save} from '../../api/remote_interface/byont_import' | ||
| 152 | + import loginUserInfo from "../../api/base"; | ||
| 153 | + import {add} from "../../api/security/security"; | ||
| 184 | export default { | 154 | export default { |
| 185 | data() { | 155 | data() { |
| 186 | return { | 156 | return { |
| 187 | - form: { | ||
| 188 | - input: '', | 157 | + rules:{ |
| 158 | + waybill: [ | ||
| 159 | + { required: true, message: '请输入运单号', trigger: 'change' } | ||
| 160 | + ] | ||
| 189 | }, | 161 | }, |
| 190 | - radio:'', | ||
| 191 | - tableData:[], | ||
| 192 | - data: [{ | ||
| 193 | - id: 1, | ||
| 194 | - label: '4604', | ||
| 195 | - children: [{ | ||
| 196 | - id: 3, | ||
| 197 | - label: '西货站', | ||
| 198 | - children: [{ | ||
| 199 | - id: 4, | ||
| 200 | - label: '一号卡口进' | ||
| 201 | - }, { | ||
| 202 | - id: 5, | ||
| 203 | - label: '一号卡口出', | ||
| 204 | - }] | ||
| 205 | - }, { | ||
| 206 | - id: 2, | ||
| 207 | - label: '军投货站', | ||
| 208 | - children: [{ | ||
| 209 | - id: 6, | ||
| 210 | - label: '一号卡口进' | ||
| 211 | - }, { | ||
| 212 | - id: 7, | ||
| 213 | - label: '一号卡口出', | ||
| 214 | - }] | ||
| 215 | - }] | 162 | + addFormRules:{ |
| 163 | + businesstype: [ | ||
| 164 | + {required: true, message: '请输入运单号', trigger: 'blur'} | ||
| 165 | + ], | ||
| 166 | + trailerFrameNo: [ | ||
| 167 | + {required: true, message: '请输入车牌号', trigger: 'blur'} | ||
| 168 | + ], | ||
| 169 | + cocode: [ | ||
| 170 | + {required: true, message: '请选择货务类型', trigger: 'blur'} | ||
| 171 | + ], | ||
| 172 | + endstationList: [ | ||
| 173 | + {required: true, message: '请选择场站', trigger: 'blur'} | ||
| 174 | + ] | ||
| 216 | }, | 175 | }, |
| 217 | - { | ||
| 218 | - id: 1, | ||
| 219 | - label: '4620', | ||
| 220 | - children: [{ | ||
| 221 | - id: 3, | ||
| 222 | - label: '综保区货站仓库', | ||
| 223 | - children: [{ | ||
| 224 | - id: 4, | ||
| 225 | - label: '内三卡口进' | ||
| 226 | - }, { | ||
| 227 | - id: 5, | ||
| 228 | - label: '内三卡口出', | ||
| 229 | - }] | ||
| 230 | - }] | 176 | + options:[], |
| 177 | + filters: { | ||
| 178 | + waybill: '828-12161085', | ||
| 231 | }, | 179 | }, |
| 232 | - { | ||
| 233 | - id: 1, | ||
| 234 | - label: '4612', | ||
| 235 | - children: [{ | ||
| 236 | - id: 3, | ||
| 237 | - label: '综保区', | ||
| 238 | - children: [{ | ||
| 239 | - id: 4, | ||
| 240 | - label: '六号主卡口进' | ||
| 241 | - }, { | ||
| 242 | - id: 5, | ||
| 243 | - label: '六号主卡口出', | ||
| 244 | - }] | ||
| 245 | - }] | ||
| 246 | - }], | ||
| 247 | - defaultProps: { | ||
| 248 | - children: 'children', | ||
| 249 | - label: 'label' | 180 | + radio:'', |
| 181 | + awbaList:[], | ||
| 182 | + yardList: [], | ||
| 183 | + commonLoading: false, | ||
| 184 | + textarea: '', | ||
| 185 | + disabledStr: true, | ||
| 186 | + addForm: { | ||
| 187 | + // 备注 | ||
| 188 | + remark3: '', | ||
| 189 | + // 业务类型 | ||
| 190 | + businesstype: '', | ||
| 191 | + // 车牌号 | ||
| 192 | + trailerFrameNo: '', | ||
| 193 | + //备案单位 | ||
| 194 | + trailerLicenseNo: '', | ||
| 195 | + // 主单列表 | ||
| 196 | + masterList: '', | ||
| 197 | + // 场站编号 | ||
| 198 | + endstation: '', | ||
| 199 | + endstationList: '', | ||
| 200 | + // 运输公司 | ||
| 201 | + agentno: '', | ||
| 202 | + // 挂靠单位 | ||
| 203 | + agentname: '', | ||
| 204 | + //申请单位 | ||
| 205 | + veProperty: '', | ||
| 206 | + // 货物类型 | ||
| 207 | + cocode:'', | ||
| 208 | + // 货物重量 | ||
| 209 | + remark: '' | ||
| 250 | }, | 210 | }, |
| 251 | - textarea: '' | 211 | + |
| 252 | } | 212 | } |
| 253 | }, | 213 | }, |
| 254 | methods: { | 214 | methods: { |
| 215 | + // 运单查询 | ||
| 216 | + getWaybillList(filters){ | ||
| 217 | + let businesstype = this.addForm.businesstype; | ||
| 218 | + if (businesstype != undefined && businesstype != null && businesstype != ''){ | ||
| 219 | + this.$refs[filters].validate((valid) => { | ||
| 220 | + if (valid) { | ||
| 221 | + this.commonLoading = true; | ||
| 222 | + if (businesstype == '进口提货'){ | ||
| 223 | + businesstype = 'I'; | ||
| 224 | + }else if (businesstype == '出口送货'){ | ||
| 225 | + businesstype = 'E'; | ||
| 226 | + }else if (businesstype == '分拨业务'){ | ||
| 227 | + businesstype = 'I'; | ||
| 228 | + }else if (businesstype == '调拨业务'){ | ||
| 229 | + businesstype = 'E'; | ||
| 230 | + } | ||
| 231 | + let _this = this; | ||
| 232 | + var url = "http://tjfx.15miaoo.com:8003/orig/orig"; | ||
| 233 | + var xhr = new XMLHttpRequest(); | ||
| 234 | + // 访问nginx中的代理服务器 | ||
| 235 | + xhr.open('get', url+'?waybill='+this.filters.waybill+'&imp='+businesstype, true); | ||
| 236 | + xhr.send(); | ||
| 237 | + xhr.onreadystatechange = function(){ | ||
| 238 | + if(xhr.readyState == 4){ | ||
| 239 | + if(xhr.status ==200){ | ||
| 240 | + var data = JSON.parse(xhr.responseText); | ||
| 241 | + _this.awbaList=data; | ||
| 242 | + //console.log(data); | ||
| 243 | + _this.commonLoading = false; | ||
| 244 | + } | ||
| 245 | + } | ||
| 246 | + } | ||
| 247 | + } else { | ||
| 248 | + console.log('error submit!!'); | ||
| 249 | + return false; | ||
| 250 | + } | ||
| 251 | + }); | ||
| 252 | + }else { | ||
| 253 | + this.$message({ | ||
| 254 | + message: '请在下列选择业务类型', | ||
| 255 | + type: "error" | ||
| 256 | + }) | ||
| 257 | + } | ||
| 258 | + }, | ||
| 259 | + // 获取场站 | ||
| 260 | + getYardList(){ | ||
| 261 | + yartList().then((res) =>{ | ||
| 262 | + this.options = res.data.data; | ||
| 263 | + }).catch((error) => { | ||
| 264 | + if(null!= error.response && error.response!==undefined){ | ||
| 265 | + let status= error.response.status; | ||
| 266 | + let msg = error.response.statusText; | ||
| 267 | + alert(status+msg); | ||
| 268 | + }else { | ||
| 269 | + alert(error); | ||
| 270 | + } | ||
| 271 | + | ||
| 272 | + }); | ||
| 273 | + }, | ||
| 274 | + // 校验车牌号是否合格 | ||
| 275 | + trailerFrameNo(value){ | ||
| 276 | + let params = { | ||
| 277 | + 'trailerFrameNo': value, | ||
| 278 | + } | ||
| 279 | + trailerFrameNoSuccess(params).then((res) =>{ | ||
| 280 | + if (res.data.code == 200){ | ||
| 281 | + this.$message({ | ||
| 282 | + message: res.data.msg, | ||
| 283 | + type: "success" | ||
| 284 | + }) | ||
| 285 | + this.addForm.agentno = res.data.data.coCode; | ||
| 286 | + this.addForm.trailerLicenseNo = res.data.data.veTargetNo; | ||
| 287 | + this.addForm.agentname = res.data.data.proposer; | ||
| 288 | + | ||
| 289 | + this.disabledStr = false; | ||
| 290 | + }else if(res.data.code == 201) { | ||
| 291 | + this.$message({ | ||
| 292 | + message: res.data.msg, | ||
| 293 | + type: "warning" | ||
| 294 | + }) | ||
| 295 | + this.disabledStr = true; | ||
| 296 | + }else if (res.data.code == 202){ | ||
| 297 | + this.$message({ | ||
| 298 | + message: res.data.msg, | ||
| 299 | + type: "warning" | ||
| 300 | + }) | ||
| 301 | + this.addForm.agentno = res.data.data.coCode; | ||
| 302 | + this.addForm.trailerLicenseNo = res.data.data.veTargetNo; | ||
| 303 | + this.addForm.agentname = res.data.data.proposer; | ||
| 304 | + this.addForm.veProperty = res.data.data.veProperty; | ||
| 305 | + this.disabledStr = true; | ||
| 306 | + } | ||
| 307 | + }).catch((error) => { | ||
| 308 | + if(null!= error.response && error.response!==undefined){ | ||
| 309 | + let status= error.response.status; | ||
| 310 | + let msg = error.response.statusText; | ||
| 311 | + alert(status+msg); | ||
| 312 | + }else { | ||
| 313 | + alert(error); | ||
| 314 | + } | ||
| 315 | + | ||
| 316 | + }); | ||
| 317 | + }, | ||
| 318 | + // 日期格式转换 | ||
| 319 | + flightDate: function (row, column) { | ||
| 320 | + // 获取单元格数据 | ||
| 321 | + let data = row.flightDate | ||
| 322 | + if(data == null) { | ||
| 323 | + return null | ||
| 324 | + } | ||
| 325 | + let dt = new Date(data) | ||
| 326 | + return dt.getFullYear() + '-' + (dt.getMonth() + 1) + '-' + dt.getDate(); | ||
| 327 | + }, | ||
| 328 | + formatDate: function (row, column) { | ||
| 329 | + // 获取单元格数据 | ||
| 330 | + let data = row.createdate; | ||
| 331 | + if(data == null) { | ||
| 332 | + return null | ||
| 333 | + } | ||
| 334 | + let dt = new Date(data) | ||
| 335 | + return dt.getFullYear() + '-' + (dt.getMonth() + 1) + '-' + dt.getDate()+ ' ' + dt.getHours() + ':' + dt.getMinutes() + ':' + dt.getSeconds(); | ||
| 336 | + }, | ||
| 337 | + // 添加主单号到主单列表 | ||
| 338 | + addWaybill: function(index, row){ | ||
| 339 | + this.addForm.masterList += row.waybillnomaster+',' | ||
| 340 | + }, | ||
| 341 | + addweight(businesstype){ | ||
| 342 | + let _this = this; | ||
| 343 | + let addweight = ""; | ||
| 344 | + // 运单重量累加 | ||
| 345 | + this.addForm.masterList=this.addForm.masterList.substring(0,this.addForm.masterList.length-1); | ||
| 346 | + var split = this.addForm.masterList.split(","); | ||
| 347 | + split.forEach((item) =>{ | ||
| 348 | + var url = "http://tjfx.15miaoo.com:8003/orig/orig"; | ||
| 349 | + var xhr = new XMLHttpRequest(); | ||
| 350 | + // 访问nginx中的代理服务器 | ||
| 351 | + xhr.open('get', url+'?waybill='+item+'&imp='+businesstype, true); | ||
| 352 | + xhr.send(); | ||
| 353 | + xhr.onreadystatechange = function(){ | ||
| 354 | + if(xhr.readyState == 4){ | ||
| 355 | + if(xhr.status ==200){ | ||
| 356 | + var data = JSON.parse(xhr.responseText); | ||
| 357 | + data.forEach((itmeData => { | ||
| 358 | + addweight += itmeData.manifesttotalweight+","; | ||
| 359 | + })); | ||
| 360 | + } | ||
| 361 | + } | ||
| 362 | + } | ||
| 363 | + }); | ||
| 364 | + return addweight; | ||
| 365 | + }, | ||
| 366 | + addsubmit(){ | ||
| 367 | + let para = Object.assign({}, _this.addForm); | ||
| 368 | + save(para).then((res) => { | ||
| 369 | + if (res.data.code == 200){ | ||
| 370 | + this.$message({ | ||
| 371 | + message: '提交成功', | ||
| 372 | + type: 'success' | ||
| 373 | + }); | ||
| 374 | + this.$refs['addForm'].resetFields(); | ||
| 375 | + }else { | ||
| 376 | + this.$message({ | ||
| 377 | + message: '提交失败', | ||
| 378 | + type: 'error' | ||
| 379 | + }); | ||
| 380 | + } | ||
| 381 | + }).catch(error => alert(error)); | ||
| 382 | + }, | ||
| 383 | + // 申请添加 | ||
| 384 | + saveSubmit (){ | ||
| 385 | + let _this = this; | ||
| 386 | + this.$refs.addForm.validate((valid) => { | ||
| 387 | + if (valid) { | ||
| 388 | + this.$confirm('确认提交吗?', '提示', {}).then(() => { | ||
| 389 | + let businesstype = this.addForm.businesstype; | ||
| 390 | + if (businesstype == '进口提货'){ | ||
| 391 | + businesstype = 'I'; | ||
| 392 | + }else if (businesstype == '出口送货'){ | ||
| 393 | + businesstype = 'E'; | ||
| 394 | + }else if (businesstype == '分拨业务'){ | ||
| 395 | + businesstype = 'I'; | ||
| 396 | + }else if (businesstype == '调拨业务'){ | ||
| 397 | + businesstype = 'E'; | ||
| 398 | + } | ||
| 399 | + if (this.addForm.masterList.indexOf(",") !== -1){ | ||
| 400 | + _this.addForm.remark = _this.addweight(businesstype); | ||
| 401 | + _this.nextTick(function(){ | ||
| 402 | + _this.addsubmit(); | ||
| 403 | + }); | ||
| 404 | + | ||
| 405 | + }else { | ||
| 406 | + console.log("进入远程调用"); | ||
| 407 | + let sum = 0; | ||
| 408 | + var url = "http://tjfx.15miaoo.com:8003/orig/orig"; | ||
| 409 | + var xhr = new XMLHttpRequest(); | ||
| 410 | + // 访问nginx中的代理服务器 | ||
| 411 | + xhr.open('get', url+'?waybill='+this.addForm.masterList+'&imp='+businesstype, true); | ||
| 412 | + xhr.send(); | ||
| 413 | + xhr.onreadystatechange = function(){ | ||
| 414 | + if(xhr.readyState == 4){ | ||
| 415 | + if(xhr.status ==200){ | ||
| 416 | + var data = JSON.parse(xhr.responseText); | ||
| 417 | + data.forEach((itme => { | ||
| 418 | + _this.addForm.remark += parseInt(itme.manifesttotalweight); | ||
| 419 | + })); | ||
| 420 | + | ||
| 421 | + } | ||
| 422 | + } | ||
| 423 | + } | ||
| 424 | + } | ||
| 425 | + console.log(_this.addForm.remark); | ||
| 426 | + console.log(_this.addForm); | ||
| 427 | + }).catch(() =>{ | ||
| 255 | 428 | ||
| 429 | + }); | ||
| 430 | + } else { | ||
| 431 | + console.log('error submit!!'); | ||
| 432 | + return false; | ||
| 433 | + } | ||
| 434 | + }); | ||
| 435 | + } | ||
| 256 | }, | 436 | }, |
| 437 | + mounted() { | ||
| 438 | + this.getYardList(); | ||
| 439 | + } | ||
| 257 | } | 440 | } |
| 258 | </script> | 441 | </script> |
| 259 | 442 |
| @@ -27,20 +27,20 @@ | @@ -27,20 +27,20 @@ | ||
| 27 | <p style="font-size: 28px">条件查询</p> | 27 | <p style="font-size: 28px">条件查询</p> |
| 28 | </el-row> | 28 | </el-row> |
| 29 | <el-row> | 29 | <el-row> |
| 30 | - <el-tabs v-model="activeName" @tab-click="getDomesticClearance()" style="width: 100%"> | 30 | + <el-tabs v-model="activeName" @tab-click="getDomesticClearance" style="width: 100%"> |
| 31 | <el-tab-pane label="国内出港" name="first"> | 31 | <el-tab-pane label="国内出港" name="first"> |
| 32 | <div style=";margin-top: 15px"> | 32 | <div style=";margin-top: 15px"> |
| 33 | <el-time-picker | 33 | <el-time-picker |
| 34 | - v-model="value1" | 34 | + v-model="filters.flightDate" |
| 35 | placeholder="任意时间点" | 35 | placeholder="任意时间点" |
| 36 | style="width: 140px"> | 36 | style="width: 140px"> |
| 37 | </el-time-picker> | 37 | </el-time-picker> |
| 38 | <el-time-picker | 38 | <el-time-picker |
| 39 | - v-model="value2" | 39 | + v-model="filters.flightDate" |
| 40 | placeholder="任意时间点" | 40 | placeholder="任意时间点" |
| 41 | style="width: 140px"> | 41 | style="width: 140px"> |
| 42 | </el-time-picker> | 42 | </el-time-picker> |
| 43 | - <el-select v-model="value" placeholder="目的地" style="width: 140px"> | 43 | + <el-select v-model="filters.destination" placeholder="目的地" style="width: 140px"> |
| 44 | <el-option | 44 | <el-option |
| 45 | v-for="item in options" | 45 | v-for="item in options" |
| 46 | :key="item.value" | 46 | :key="item.value" |
| @@ -48,7 +48,7 @@ | @@ -48,7 +48,7 @@ | ||
| 48 | :value="item.value"> | 48 | :value="item.value"> |
| 49 | </el-option> | 49 | </el-option> |
| 50 | </el-select> | 50 | </el-select> |
| 51 | - <el-select v-model="value" placeholder="航空公司" style="width: 140px"> | 51 | + <el-select v-model="filters.carrier" placeholder="航空公司" style="width: 140px"> |
| 52 | <el-option | 52 | <el-option |
| 53 | v-for="item in options" | 53 | v-for="item in options" |
| 54 | :key="item.value" | 54 | :key="item.value" |
| @@ -61,35 +61,24 @@ | @@ -61,35 +61,24 @@ | ||
| 61 | <el-row style="margin-top: 15px"> | 61 | <el-row style="margin-top: 15px"> |
| 62 | <el-col :span="23"> | 62 | <el-col :span="23"> |
| 63 | <el-table | 63 | <el-table |
| 64 | - :data="tableData" | 64 | + :data="listDate" |
| 65 | style="width: 100%"> | 65 | style="width: 100%"> |
| 66 | - <el-table-column | ||
| 67 | - prop="" | ||
| 68 | - label="计划离港"> | 66 | + <el-table-column prop="fplt" label="计划离港"> |
| 69 | </el-table-column> | 67 | </el-table-column> |
| 70 | - <el-table-column | ||
| 71 | - prop="" | ||
| 72 | - label="航班号"> | 68 | + <el-table-column label="航班号"> |
| 69 | + <template slot-scope="scope"> | ||
| 70 | + {{scope.row.carrier}}{{scope.row.flightno}} | ||
| 71 | + </template> | ||
| 73 | </el-table-column> | 72 | </el-table-column> |
| 74 | - <el-table-column | ||
| 75 | - prop="" | ||
| 76 | - label="航空公司"> | 73 | + <el-table-column prop="carrier" label="航空公司"> |
| 77 | </el-table-column> | 74 | </el-table-column> |
| 78 | - <el-table-column | ||
| 79 | - prop="" | ||
| 80 | - label="目的地"> | 75 | + <el-table-column prop="apcd" label="目的地"> |
| 81 | </el-table-column> | 76 | </el-table-column> |
| 82 | - <el-table-column | ||
| 83 | - prop="" | ||
| 84 | - label="预计/实际离港"> | 77 | + <el-table-column prop="frlt" label="预计/实际离港"> |
| 85 | </el-table-column> | 78 | </el-table-column> |
| 86 | - <el-table-column | ||
| 87 | - prop="" | ||
| 88 | - label="状态"> | 79 | + <el-table-column prop="" label="状态"> |
| 89 | </el-table-column> | 80 | </el-table-column> |
| 90 | - <el-table-column | ||
| 91 | - prop="" | ||
| 92 | - label="航站楼"> | 81 | + <el-table-column prop="btsc" label="航站楼"> |
| 93 | </el-table-column> | 82 | </el-table-column> |
| 94 | </el-table> | 83 | </el-table> |
| 95 | </el-col> | 84 | </el-col> |
| @@ -98,18 +87,17 @@ | @@ -98,18 +87,17 @@ | ||
| 98 | <el-tab-pane label="国际/地区出港" name="second"> | 87 | <el-tab-pane label="国际/地区出港" name="second"> |
| 99 | <div style=";margin-top: 15px"> | 88 | <div style=";margin-top: 15px"> |
| 100 | <el-time-picker | 89 | <el-time-picker |
| 101 | - v-model="value1" | ||
| 102 | - | 90 | + v-model="filters.flightDate" |
| 103 | placeholder="任意时间点" | 91 | placeholder="任意时间点" |
| 104 | style="width: 140px"> | 92 | style="width: 140px"> |
| 105 | </el-time-picker> | 93 | </el-time-picker> |
| 106 | <el-time-picker | 94 | <el-time-picker |
| 107 | arrow-control | 95 | arrow-control |
| 108 | - v-model="value2" | 96 | + v-model="filters.flightDate" |
| 109 | placeholder="任意时间点" | 97 | placeholder="任意时间点" |
| 110 | style="width: 140px"> | 98 | style="width: 140px"> |
| 111 | </el-time-picker> | 99 | </el-time-picker> |
| 112 | - <el-select v-model="value" placeholder="目的地" style="width: 140px"> | 100 | + <el-select v-model="filters.destination" placeholder="目的地" style="width: 140px"> |
| 113 | <el-option | 101 | <el-option |
| 114 | v-for="item in options" | 102 | v-for="item in options" |
| 115 | :key="item.value" | 103 | :key="item.value" |
| @@ -117,7 +105,7 @@ | @@ -117,7 +105,7 @@ | ||
| 117 | :value="item.value"> | 105 | :value="item.value"> |
| 118 | </el-option> | 106 | </el-option> |
| 119 | </el-select> | 107 | </el-select> |
| 120 | - <el-select v-model="value" placeholder="航空公司" style="width: 140px"> | 108 | + <el-select v-model="filters.carrier" placeholder="航空公司" style="width: 140px"> |
| 121 | <el-option | 109 | <el-option |
| 122 | v-for="item in options" | 110 | v-for="item in options" |
| 123 | :key="item.value" | 111 | :key="item.value" |
| @@ -130,54 +118,48 @@ | @@ -130,54 +118,48 @@ | ||
| 130 | <el-row style="margin-top: 15px"> | 118 | <el-row style="margin-top: 15px"> |
| 131 | <el-col :span="23"> | 119 | <el-col :span="23"> |
| 132 | <el-table | 120 | <el-table |
| 133 | - :data="tableData" | 121 | + :data="listDate" |
| 134 | style="width: 100%"> | 122 | style="width: 100%"> |
| 135 | - <el-table-column | ||
| 136 | - prop="" | ||
| 137 | - label="计划离港"> | 123 | + <el-table-column prop="fplt" label="计划离港"> |
| 138 | </el-table-column> | 124 | </el-table-column> |
| 139 | - <el-table-column | ||
| 140 | - prop="" | ||
| 141 | - label="航班号"> | 125 | + <el-table-column label="航班号"> |
| 126 | + <template slot-scope="scope"> | ||
| 127 | + {{scope.row.carrier}}{{scope.row.flightno}} | ||
| 128 | + </template> | ||
| 142 | </el-table-column> | 129 | </el-table-column> |
| 143 | - <el-table-column | ||
| 144 | - prop="" | ||
| 145 | - label="航空公司"> | 130 | + <el-table-column prop="carrier" label="航空公司"> |
| 146 | </el-table-column> | 131 | </el-table-column> |
| 147 | - <el-table-column | ||
| 148 | - prop="" | ||
| 149 | - label="目的地"> | 132 | + <el-table-column prop="apcd" label="目的地"> |
| 150 | </el-table-column> | 133 | </el-table-column> |
| 151 | - <el-table-column | ||
| 152 | - prop="" | ||
| 153 | - label="预计/实际离港"> | 134 | + <el-table-column prop="frlt" label="预计/实际离港"> |
| 154 | </el-table-column> | 135 | </el-table-column> |
| 155 | - <el-table-column | ||
| 156 | - prop="" | ||
| 157 | - label="状态"> | 136 | + <el-table-column prop="" label="状态"> |
| 158 | </el-table-column> | 137 | </el-table-column> |
| 159 | - <el-table-column | ||
| 160 | - prop="" | ||
| 161 | - label="航站楼"> | 138 | + <el-table-column prop="btsc" label="航站楼"> |
| 162 | </el-table-column> | 139 | </el-table-column> |
| 163 | </el-table> | 140 | </el-table> |
| 164 | </el-col> | 141 | </el-col> |
| 165 | </el-row> | 142 | </el-row> |
| 166 | </el-tab-pane> | 143 | </el-tab-pane> |
| 167 | - <el-tab-pane label="国内到港" name="third"> | 144 | + <el-tab-pane label="国内进港" name="third"> |
| 168 | <div style=";margin-top: 15px"> | 145 | <div style=";margin-top: 15px"> |
| 169 | - <el-time-picker | ||
| 170 | - v-model="value1" | 146 | + <el-time-select |
| 147 | + v-model="filters.flightDate" | ||
| 148 | + :picker-options="{ | ||
| 149 | + start: '00:00', | ||
| 150 | + step: '01:00', | ||
| 151 | + end: '23:00' | ||
| 152 | + }" | ||
| 171 | placeholder="任意时间点" | 153 | placeholder="任意时间点" |
| 172 | style="width: 140px"> | 154 | style="width: 140px"> |
| 173 | - </el-time-picker> | 155 | + </el-time-select> |
| 174 | <el-time-picker | 156 | <el-time-picker |
| 175 | arrow-control | 157 | arrow-control |
| 176 | - v-model="value2" | 158 | + v-model="filters.flightDate" |
| 177 | placeholder="任意时间点" | 159 | placeholder="任意时间点" |
| 178 | style="width: 140px"> | 160 | style="width: 140px"> |
| 179 | </el-time-picker> | 161 | </el-time-picker> |
| 180 | - <el-select v-model="value" placeholder="目的地" style="width: 140px"> | 162 | + <el-select v-model="filters.destination" placeholder="目的地" style="width: 140px"> |
| 181 | <el-option | 163 | <el-option |
| 182 | v-for="item in options" | 164 | v-for="item in options" |
| 183 | :key="item.value" | 165 | :key="item.value" |
| @@ -185,7 +167,7 @@ | @@ -185,7 +167,7 @@ | ||
| 185 | :value="item.value"> | 167 | :value="item.value"> |
| 186 | </el-option> | 168 | </el-option> |
| 187 | </el-select> | 169 | </el-select> |
| 188 | - <el-select v-model="value" placeholder="航空公司" style="width: 140px"> | 170 | + <el-select v-model="filters.carrier" placeholder="航空公司" style="width: 140px"> |
| 189 | <el-option | 171 | <el-option |
| 190 | v-for="item in options" | 172 | v-for="item in options" |
| 191 | :key="item.value" | 173 | :key="item.value" |
| @@ -198,54 +180,43 @@ | @@ -198,54 +180,43 @@ | ||
| 198 | <el-row style="margin-top: 15px"> | 180 | <el-row style="margin-top: 15px"> |
| 199 | <el-col :span="23"> | 181 | <el-col :span="23"> |
| 200 | <el-table | 182 | <el-table |
| 201 | - :data="tableData" | 183 | + :data="listDate" |
| 202 | style="width: 100%"> | 184 | style="width: 100%"> |
| 203 | - <el-table-column | ||
| 204 | - prop="" | ||
| 205 | - label="计划离港"> | 185 | + <el-table-column prop="fplt" label="计划离港"> |
| 206 | </el-table-column> | 186 | </el-table-column> |
| 207 | - <el-table-column | ||
| 208 | - prop="" | ||
| 209 | - label="航班号"> | 187 | + <el-table-column label="航班号"> |
| 188 | + <template slot-scope="scope"> | ||
| 189 | + {{scope.row.carrier}}{{scope.row.flightno}} | ||
| 190 | + </template> | ||
| 210 | </el-table-column> | 191 | </el-table-column> |
| 211 | - <el-table-column | ||
| 212 | - prop="" | ||
| 213 | - label="航空公司"> | 192 | + <el-table-column prop="carrier" label="航空公司"> |
| 214 | </el-table-column> | 193 | </el-table-column> |
| 215 | - <el-table-column | ||
| 216 | - prop="" | ||
| 217 | - label="目的地"> | 194 | + <el-table-column prop="apcd" label="目的地"> |
| 218 | </el-table-column> | 195 | </el-table-column> |
| 219 | - <el-table-column | ||
| 220 | - prop="" | ||
| 221 | - label="预计/实际离港"> | 196 | + <el-table-column prop="frlt" label="预计/实际离港"> |
| 222 | </el-table-column> | 197 | </el-table-column> |
| 223 | - <el-table-column | ||
| 224 | - prop="" | ||
| 225 | - label="状态"> | 198 | + <el-table-column prop="" label="状态"> |
| 226 | </el-table-column> | 199 | </el-table-column> |
| 227 | - <el-table-column | ||
| 228 | - prop="" | ||
| 229 | - label="航站楼"> | 200 | + <el-table-column prop="btsc" label="航站楼"> |
| 230 | </el-table-column> | 201 | </el-table-column> |
| 231 | </el-table> | 202 | </el-table> |
| 232 | </el-col> | 203 | </el-col> |
| 233 | </el-row> | 204 | </el-row> |
| 234 | </el-tab-pane> | 205 | </el-tab-pane> |
| 235 | - <el-tab-pane label="国际/地区到港" name="fourth"> | 206 | + <el-tab-pane label="国际/地区进港" name="fourth"> |
| 236 | <div style=";margin-top: 15px"> | 207 | <div style=";margin-top: 15px"> |
| 237 | <el-time-picker | 208 | <el-time-picker |
| 238 | - v-model="value1" | 209 | + v-model="filters.flightDate" |
| 239 | placeholder="任意时间点" | 210 | placeholder="任意时间点" |
| 240 | style="width: 140px"> | 211 | style="width: 140px"> |
| 241 | </el-time-picker> | 212 | </el-time-picker> |
| 242 | <el-time-picker | 213 | <el-time-picker |
| 243 | arrow-control | 214 | arrow-control |
| 244 | - v-model="value2" | 215 | + v-model="filters.flightDate" |
| 245 | placeholder="任意时间点" | 216 | placeholder="任意时间点" |
| 246 | style="width: 140px"> | 217 | style="width: 140px"> |
| 247 | </el-time-picker> | 218 | </el-time-picker> |
| 248 | - <el-select v-model="value" placeholder="目的地" style="width: 140px"> | 219 | + <el-select v-model="filters.destination" placeholder="目的地" style="width: 140px"> |
| 249 | <el-option | 220 | <el-option |
| 250 | v-for="item in options" | 221 | v-for="item in options" |
| 251 | :key="item.value" | 222 | :key="item.value" |
| @@ -253,7 +224,7 @@ | @@ -253,7 +224,7 @@ | ||
| 253 | :value="item.value"> | 224 | :value="item.value"> |
| 254 | </el-option> | 225 | </el-option> |
| 255 | </el-select> | 226 | </el-select> |
| 256 | - <el-select v-model="value" placeholder="航空公司" style="width: 140px"> | 227 | + <el-select v-model="filters.carrier" placeholder="航空公司" style="width: 140px"> |
| 257 | <el-option | 228 | <el-option |
| 258 | v-for="item in options" | 229 | v-for="item in options" |
| 259 | :key="item.value" | 230 | :key="item.value" |
| @@ -266,35 +237,24 @@ | @@ -266,35 +237,24 @@ | ||
| 266 | <el-row style="margin-top: 15px"> | 237 | <el-row style="margin-top: 15px"> |
| 267 | <el-col :span="23"> | 238 | <el-col :span="23"> |
| 268 | <el-table | 239 | <el-table |
| 269 | - :data="tableData" | 240 | + :data="listDate" |
| 270 | style="width: 100%"> | 241 | style="width: 100%"> |
| 271 | - <el-table-column | ||
| 272 | - prop="" | ||
| 273 | - label="计划离港"> | 242 | + <el-table-column prop="fplt" label="计划离港"> |
| 274 | </el-table-column> | 243 | </el-table-column> |
| 275 | - <el-table-column | ||
| 276 | - prop="" | ||
| 277 | - label="航班号"> | 244 | + <el-table-column label="航班号"> |
| 245 | + <template slot-scope="scope"> | ||
| 246 | + {{scope.row.carrier}}{{scope.row.flightno}} | ||
| 247 | + </template> | ||
| 278 | </el-table-column> | 248 | </el-table-column> |
| 279 | - <el-table-column | ||
| 280 | - prop="" | ||
| 281 | - label="航空公司"> | 249 | + <el-table-column prop="carrier" label="航空公司"> |
| 282 | </el-table-column> | 250 | </el-table-column> |
| 283 | - <el-table-column | ||
| 284 | - prop="" | ||
| 285 | - label="目的地"> | 251 | + <el-table-column prop="apcd" label="目的地"> |
| 286 | </el-table-column> | 252 | </el-table-column> |
| 287 | - <el-table-column | ||
| 288 | - prop="" | ||
| 289 | - label="预计/实际离港"> | 253 | + <el-table-column prop="frlt" label="预计/实际离港"> |
| 290 | </el-table-column> | 254 | </el-table-column> |
| 291 | - <el-table-column | ||
| 292 | - prop="" | ||
| 293 | - label="状态"> | 255 | + <el-table-column prop="" label="状态"> |
| 294 | </el-table-column> | 256 | </el-table-column> |
| 295 | - <el-table-column | ||
| 296 | - prop="" | ||
| 297 | - label="航站楼"> | 257 | + <el-table-column prop="btsc" label="航站楼"> |
| 298 | </el-table-column> | 258 | </el-table-column> |
| 299 | </el-table> | 259 | </el-table> |
| 300 | </el-col> | 260 | </el-col> |
| @@ -304,10 +264,9 @@ | @@ -304,10 +264,9 @@ | ||
| 304 | </el-row> | 264 | </el-row> |
| 305 | <el-row> | 265 | <el-row> |
| 306 | <div> | 266 | <div> |
| 307 | - <pagination background layout="total, prev, pager, next" v-show="total>0" :total="total" :page.sync="pageSize" :limit.sync="pageNum" | ||
| 308 | - @pagination="getDomesticClearance"/> | 267 | + <el-pagination background layout="total, prev, pager, next" v-show="this.total>0" :total="total" :page.sync="this.pageSize" :limit.sync="this.pageSize" |
| 268 | + @pagination="getDomesticClearance()"/> | ||
| 309 | </div> | 269 | </div> |
| 310 | - | ||
| 311 | </el-row> | 270 | </el-row> |
| 312 | </el-col> | 271 | </el-col> |
| 313 | </el-row> | 272 | </el-row> |
| @@ -316,47 +275,100 @@ | @@ -316,47 +275,100 @@ | ||
| 316 | </template> | 275 | </template> |
| 317 | 276 | ||
| 318 | <script> | 277 | <script> |
| 319 | - import {getList} from '../../api/inquiry/inquiry' | 278 | + import {portList, exportList, nternationaiiImportList, nternationaiiExportList} from '../../api/inquiry/inquiry' |
| 320 | export default { | 279 | export default { |
| 321 | data() { | 280 | data() { |
| 322 | return { | 281 | return { |
| 323 | currentPage4: 4, | 282 | currentPage4: 4, |
| 324 | activeName: 'first', | 283 | activeName: 'first', |
| 325 | filters: { | 284 | filters: { |
| 326 | - flightNo: '' | 285 | + flightNo: '', |
| 286 | + flightDate: '', | ||
| 287 | + destination: '', | ||
| 288 | + carrier: '' | ||
| 327 | }, | 289 | }, |
| 290 | + options:[], | ||
| 291 | + listDate: [], | ||
| 328 | total: 1, | 292 | total: 1, |
| 329 | pageSize: 1, | 293 | pageSize: 1, |
| 330 | - pageNum: 30, | ||
| 331 | - domesticClearanceList: [], | 294 | + limitSize: 30, |
| 332 | }; | 295 | }; |
| 333 | }, | 296 | }, |
| 334 | methods: { | 297 | methods: { |
| 335 | - | ||
| 336 | //获取列表集合 | 298 | //获取列表集合 |
| 337 | - getDomesticClearance() { | 299 | + getDomesticClearance(tab, event) { |
| 300 | + let label = tab.label; | ||
| 301 | + this.listLoading = true; | ||
| 302 | + if (label == '国内出港'){ | ||
| 303 | + exportList().then((res) =>{ | ||
| 304 | + this.total = res.data.total; | ||
| 305 | + this.listDate = res.data.data.list; | ||
| 306 | + this.listLoading = false; | ||
| 307 | + }).catch((error) => { | ||
| 308 | + this.listLoading = false; | ||
| 309 | + if(null!= error.response && error.response!==undefined){ | ||
| 310 | + let status= error.response.status; | ||
| 311 | + let msg = error.response.statusText; | ||
| 312 | + alert(status+msg); | ||
| 313 | + }else { | ||
| 314 | + alert(error); | ||
| 315 | + } | ||
| 316 | + | ||
| 317 | + }); | ||
| 318 | + }else if(label == '国际/地区出港'){ | ||
| 319 | + nternationaiiExportList().then((res) =>{ | ||
| 320 | + this.total = res.data.total; | ||
| 321 | + this.listDate = res.data.data.list; | ||
| 322 | + this.listLoading = false; | ||
| 323 | + }).catch((error) => { | ||
| 324 | + this.listLoading = false; | ||
| 325 | + if(null!= error.response && error.response!==undefined){ | ||
| 326 | + let status= error.response.status; | ||
| 327 | + let msg = error.response.statusText; | ||
| 328 | + alert(status+msg); | ||
| 329 | + }else { | ||
| 330 | + alert(error); | ||
| 331 | + } | ||
| 338 | 332 | ||
| 339 | - // this.listLoading = true; | ||
| 340 | - // //NProgress.start(); | ||
| 341 | - // getList().then((res) => { | ||
| 342 | - // this.total = res.data.total; | ||
| 343 | - // this.domesticClearanceList = res.data.list; | ||
| 344 | - // this.listLoading = false; | ||
| 345 | - // //NProgress.done(); | ||
| 346 | - // }).catch((error) => { | ||
| 347 | - // | ||
| 348 | - // this.listLoading = false; | ||
| 349 | - // if(null!= error.response && error.response!==undefined){ | ||
| 350 | - // let status= error.response.status; | ||
| 351 | - // let msg = error.response.statusText; | ||
| 352 | - // alert(status+msg); | ||
| 353 | - // }else { | ||
| 354 | - // alert(error); | ||
| 355 | - // } | ||
| 356 | - // | ||
| 357 | - // }); | 333 | + }); |
| 334 | + }else if(label == '国内进港'){ | ||
| 335 | + portList().then((res) =>{ | ||
| 336 | + this.total = res.data.total; | ||
| 337 | + this.listDate = res.data.data.list; | ||
| 338 | + this.listLoading = false; | ||
| 339 | + }).catch((error) => { | ||
| 340 | + this.listLoading = false; | ||
| 341 | + if(null!= error.response && error.response!==undefined){ | ||
| 342 | + let status= error.response.status; | ||
| 343 | + let msg = error.response.statusText; | ||
| 344 | + alert(status+msg); | ||
| 345 | + }else { | ||
| 346 | + alert(error); | ||
| 347 | + } | ||
| 348 | + | ||
| 349 | + }); | ||
| 350 | + }else if(label == '国际/地区进港'){ | ||
| 351 | + nternationaiiImportList().then((res) =>{ | ||
| 352 | + this.total = res.data.total; | ||
| 353 | + this.listDate = res.data.data.list; | ||
| 354 | + this.listLoading = false; | ||
| 355 | + }).catch((error) => { | ||
| 356 | + this.listLoading = false; | ||
| 357 | + if(null!= error.response && error.response!==undefined){ | ||
| 358 | + let status= error.response.status; | ||
| 359 | + let msg = error.response.statusText; | ||
| 360 | + alert(status+msg); | ||
| 361 | + }else { | ||
| 362 | + alert(error); | ||
| 363 | + } | ||
| 364 | + | ||
| 365 | + }); | ||
| 366 | + } | ||
| 358 | } | 367 | } |
| 359 | }, | 368 | }, |
| 369 | + mounted() { | ||
| 370 | + | ||
| 371 | + } | ||
| 360 | 372 | ||
| 361 | } | 373 | } |
| 362 | </script> | 374 | </script> |
src/views/station_manage/Bayonet.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <div> | ||
| 3 | + <el-card style="background-color: #F5F7FA"> | ||
| 4 | + <!-- 搜素区域 --> | ||
| 5 | + <div> | ||
| 6 | + <el-row :gutter="10"> | ||
| 7 | + <el-col :span="4"> | ||
| 8 | + <el-input v-model="bayonet_queryInfo.stationName" prefix-icon="el-icon-search" size="small" | ||
| 9 | + placeholder="场站名称" clearable></el-input> | ||
| 10 | + </el-col> | ||
| 11 | + <el-col :span="4"> | ||
| 12 | + <el-input v-model="bayonet_queryInfo.name" prefix-icon="el-icon-search" size="small" | ||
| 13 | + placeholder="卡口名称" clearable></el-input> | ||
| 14 | + </el-col> | ||
| 15 | + <el-col :span="4"> | ||
| 16 | + <el-input v-model="bayonet_queryInfo.channel" prefix-icon="el-icon-search" size="small" | ||
| 17 | + placeholder="通道编号" clearable></el-input> | ||
| 18 | + </el-col> | ||
| 19 | + <el-col :span="8"> | ||
| 20 | + <el-button type="success" style="width:120px" size="small" @click="bayonet_getList"> | ||
| 21 | + 查询 | ||
| 22 | + </el-button> | ||
| 23 | + <el-button type="primary" style="width:120px" size="small" @click="bayonet_toAddDialog"> | ||
| 24 | + 卡口添加 | ||
| 25 | + </el-button> | ||
| 26 | + </el-col> | ||
| 27 | + </el-row> | ||
| 28 | + </div> | ||
| 29 | + | ||
| 30 | + <!-- 列表区域 --> | ||
| 31 | + <div style="margin-top: 20px;"> | ||
| 32 | + <el-table :data="bayonet_page.bayonetList" border size="mini" | ||
| 33 | + v-loading="bayonet_loading.listLoading" element-loading-text="获取卡口列表,拼命加载中"> | ||
| 34 | + <el-table-column type="index" align="center"></el-table-column> | ||
| 35 | + <el-table-column label="场站名称" prop="yard.name" align="center" width="120"></el-table-column> | ||
| 36 | + <el-table-column label="卡口名称" prop="name" align="center" width="200"></el-table-column> | ||
| 37 | + <el-table-column label="通道编号" prop="channel" align="center" width="200"></el-table-column> | ||
| 38 | + <el-table-column label="卡口类型" prop="type" align="center" width="200"> | ||
| 39 | + <template slot-scope="scope"> | ||
| 40 | + <span v-if="scope.row.type ==='1'">进</span> | ||
| 41 | + <span v-if="scope.row.type ==='2'">出</span> | ||
| 42 | + <span v-if="scope.row.type ==='3'">进出共用</span> | ||
| 43 | + </template> | ||
| 44 | + </el-table-column> | ||
| 45 | + <el-table-column label="备注信息" prop="remarks" align="center" width="200"></el-table-column> | ||
| 46 | + <el-table-column label="操作" width="140px" align="center"> | ||
| 47 | + <template slot-scope="scope"> | ||
| 48 | + <el-tooltip effect="dark" content="编辑" placement="top-start" :enterable="false"> | ||
| 49 | + <el-button type="text" icon="el-icon-edit" size="mini" | ||
| 50 | + @click="bayonet_toEditDialog(scope.$index,scope.row)">编辑 | ||
| 51 | + </el-button> | ||
| 52 | + </el-tooltip> | ||
| 53 | + <el-tooltip effect="dark" content="删除" placement="top-start" :enterable="false"> | ||
| 54 | + <el-button type="text" icon="el-icon-delete" size="mini" | ||
| 55 | + :loading="bayonet_loading.delLoading" | ||
| 56 | + @click="bayonet_delete(scope.$index,scope.row)">删除 | ||
| 57 | + </el-button> | ||
| 58 | + </el-tooltip> | ||
| 59 | + </template> | ||
| 60 | + </el-table-column> | ||
| 61 | + </el-table> | ||
| 62 | + </div> | ||
| 63 | + | ||
| 64 | + <!-- 分页区域 --> | ||
| 65 | + <div style="margin-top: 10px"> | ||
| 66 | + <el-row :gutter="24"> | ||
| 67 | + <el-col :span="10" style="margin-top: 5px"> | ||
| 68 | + <el-pagination | ||
| 69 | + @size-change="bayonet_handleSizeChange" | ||
| 70 | + @current-change="bayonet_handleCurrentChange" | ||
| 71 | + :current-page="bayonet_queryInfo.pageNum" | ||
| 72 | + :page-sizes="[10,30,50,100]" | ||
| 73 | + :page-size="bayonet_queryInfo.pageSize" | ||
| 74 | + layout="total, sizes, prev, pager, next, jumper" | ||
| 75 | + :total="bayonet_page.total"> | ||
| 76 | + </el-pagination> | ||
| 77 | + </el-col> | ||
| 78 | + </el-row> | ||
| 79 | + </div> | ||
| 80 | + </el-card> | ||
| 81 | + <!-- 卡口添加 --> | ||
| 82 | + <div> | ||
| 83 | + <el-dialog title="卡口添加:" | ||
| 84 | + :visible.sync="bayonet_dialog.addDialog" | ||
| 85 | + style="margin-top: -80px" text-align="center" width="60%" | ||
| 86 | + @close="bayonet_addDialogClosed"> | ||
| 87 | + <el-form :inline="true" label-width="150px" status-icon style="margin-top: -10px;" align="center" | ||
| 88 | + :model="bayonet_addForm" :rules="bayonet_addFormRules" ref="bayonet_addFormRef"> | ||
| 89 | + <el-form-item label="场站名称:" prop="yardId"> | ||
| 90 | + <el-select v-model="bayonet_addForm.yardId" style="width: 300px" clearable size="small" | ||
| 91 | + placeholder="请选择场站名称"> | ||
| 92 | + <el-option | ||
| 93 | + v-for="item in stationNameList" | ||
| 94 | + :key="item.name" | ||
| 95 | + :label="item.name" | ||
| 96 | + :value="item.id"> | ||
| 97 | + </el-option> | ||
| 98 | + </el-select> | ||
| 99 | + </el-form-item> | ||
| 100 | + <el-form-item label="卡口名称:" prop="name"> | ||
| 101 | + <el-input v-model="bayonet_addForm.name" style="width:300px" size="mini" clearable | ||
| 102 | + placeholder="请输入卡口名称"> | ||
| 103 | + </el-input> | ||
| 104 | + </el-form-item> | ||
| 105 | + <el-form-item label="通道编号:" prop="channel"> | ||
| 106 | + <el-input v-model="bayonet_addForm.channel" style="width:300px" size="mini" clearable | ||
| 107 | + placeholder="请输入通道编号"> | ||
| 108 | + </el-input> | ||
| 109 | + </el-form-item> | ||
| 110 | + | ||
| 111 | + <el-form-item label="卡口类型:" prop="type"> | ||
| 112 | + <el-select v-model="bayonet_addForm.type" style="width: 300px" clearable size="small" | ||
| 113 | + placeholder="请选择卡口类型"> | ||
| 114 | + <el-option | ||
| 115 | + v-for="item in bayonetTypeList" | ||
| 116 | + :key="item.label" | ||
| 117 | + :label="item.label" | ||
| 118 | + :value="item.value"> | ||
| 119 | + </el-option> | ||
| 120 | + </el-select> | ||
| 121 | + </el-form-item> | ||
| 122 | + | ||
| 123 | + | ||
| 124 | + <el-form-item label="备注信息:" prop="remarks"> | ||
| 125 | + <el-input v-model="bayonet_addForm.remarks" style="width:300px" clearable size="mini" | ||
| 126 | + type="textarea" :rows="5"> | ||
| 127 | + </el-input> | ||
| 128 | + </el-form-item> | ||
| 129 | + </el-form> | ||
| 130 | + <div slot="footer" class="dialog-footer" style="text-align: center;margin-top: -30px"> | ||
| 131 | + <el-button type="info" @click="bayonet_dialog.addDialog = false" size="medium" | ||
| 132 | + style="width: 100px">取消 | ||
| 133 | + </el-button> | ||
| 134 | + <el-button type="primary" @click="bayonet_add" :loading="bayonet_loading.addLoading" | ||
| 135 | + size="medium" style="width: 100px">保存 | ||
| 136 | + </el-button> | ||
| 137 | + </div> | ||
| 138 | + </el-dialog> | ||
| 139 | + </div> | ||
| 140 | + <!-- 卡口修改 --> | ||
| 141 | + <div> | ||
| 142 | + <el-dialog title="卡口修改:" | ||
| 143 | + :visible.sync="bayonet_dialog.editDialog" | ||
| 144 | + style="margin-top: -80px" text-align="center" width="60%" | ||
| 145 | + @close="bayonet_editDialogClosed"> | ||
| 146 | + <el-form :inline="true" label-width="150px" status-icon style="margin-top: -10px;" align="center" | ||
| 147 | + :model="bayonet_editForm" :rules="bayonet_editFormRules" ref="bayonet_editFormRef"> | ||
| 148 | + <el-form-item label="场站名称:" prop="yardId"> | ||
| 149 | + <el-select v-model="bayonet_editForm.yardId" style="width: 300px" clearable size="small" | ||
| 150 | + placeholder="请选择场站名称"> | ||
| 151 | + <el-option | ||
| 152 | + v-for="item in stationNameList" | ||
| 153 | + :key="item.name" | ||
| 154 | + :label="item.name" | ||
| 155 | + :value="item.id"> | ||
| 156 | + </el-option> | ||
| 157 | + </el-select> | ||
| 158 | + </el-form-item> | ||
| 159 | + <el-form-item label="卡口名称:" prop="name"> | ||
| 160 | + <el-input v-model="bayonet_editForm.name" style="width:300px" size="mini" clearable | ||
| 161 | + placeholder="请输入卡口名称"> | ||
| 162 | + </el-input> | ||
| 163 | + </el-form-item> | ||
| 164 | + <el-form-item label="通道编号:" prop="channel"> | ||
| 165 | + <el-input v-model="bayonet_editForm.channel" style="width:300px" size="mini" clearable | ||
| 166 | + placeholder="请输入通道编号"> | ||
| 167 | + </el-input> | ||
| 168 | + </el-form-item> | ||
| 169 | + <el-form-item label="卡口类型:" prop="type"> | ||
| 170 | + <el-select v-model="bayonet_editForm.type" style="width: 300px" clearable size="small" | ||
| 171 | + placeholder="请选择卡口类型"> | ||
| 172 | + <el-option | ||
| 173 | + v-for="item in bayonetTypeList" | ||
| 174 | + :key="item.label" | ||
| 175 | + :label="item.label" | ||
| 176 | + :value="item.value"> | ||
| 177 | + </el-option> | ||
| 178 | + </el-select> | ||
| 179 | + </el-form-item> | ||
| 180 | + | ||
| 181 | + <el-form-item label="备注信息:" prop="remarks"> | ||
| 182 | + <el-input v-model="bayonet_editForm.remarks" style="width:300px" clearable size="mini" | ||
| 183 | + type="textarea" :rows="5"> | ||
| 184 | + </el-input> | ||
| 185 | + </el-form-item> | ||
| 186 | + </el-form> | ||
| 187 | + <div slot="footer" class="dialog-footer" style="text-align: center;margin-top: -30px"> | ||
| 188 | + <el-button type="info" @click="bayonet_dialog.editDialog = false" size="medium" | ||
| 189 | + style="width: 100px">取消 | ||
| 190 | + </el-button> | ||
| 191 | + <el-button type="primary" @click="bayonet_edit" :loading="bayonet_loading.editLoading" | ||
| 192 | + size="medium" style="width: 100px">保存 | ||
| 193 | + </el-button> | ||
| 194 | + </div> | ||
| 195 | + </el-dialog> | ||
| 196 | + </div> | ||
| 197 | + </div> | ||
| 198 | +</template> | ||
| 199 | + | ||
| 200 | +<script> | ||
| 201 | + import {selectBayonetList, getYardList, insertBayonet, updateBayonet, deleteBayonet} from "../../api/station_dispatch"; | ||
| 202 | + | ||
| 203 | + export default { | ||
| 204 | + name: "Bayonet", | ||
| 205 | + data() { | ||
| 206 | + return { | ||
| 207 | + /** | ||
| 208 | + * 搜索参数 | ||
| 209 | + */ | ||
| 210 | + bayonet_queryInfo: { | ||
| 211 | + // 场站名称 | ||
| 212 | + stationName: '', | ||
| 213 | + // 卡口名称 | ||
| 214 | + name: '', | ||
| 215 | + // 通道编号 | ||
| 216 | + channel: '', | ||
| 217 | + // 当前页数 | ||
| 218 | + pageNum: 1, | ||
| 219 | + // 每页大小 | ||
| 220 | + pageSize: 10, | ||
| 221 | + }, | ||
| 222 | + | ||
| 223 | + /** | ||
| 224 | + * 分页 | ||
| 225 | + */ | ||
| 226 | + bayonet_page: { | ||
| 227 | + bayonetList: [], | ||
| 228 | + total: 0, | ||
| 229 | + selectList: [], | ||
| 230 | + }, | ||
| 231 | + | ||
| 232 | + /** | ||
| 233 | + * 场站列表 | ||
| 234 | + */ | ||
| 235 | + stationNameList: [], | ||
| 236 | + | ||
| 237 | + /** | ||
| 238 | + * 卡口类型列表 | ||
| 239 | + */ | ||
| 240 | + bayonetTypeList: [ | ||
| 241 | + { | ||
| 242 | + value: '1', | ||
| 243 | + label: '进' | ||
| 244 | + }, | ||
| 245 | + { | ||
| 246 | + value: '2', | ||
| 247 | + label: '出' | ||
| 248 | + }, | ||
| 249 | + { | ||
| 250 | + value: '3', | ||
| 251 | + label: '进出共用' | ||
| 252 | + }, | ||
| 253 | + ], | ||
| 254 | + /** | ||
| 255 | + * 加载 | ||
| 256 | + */ | ||
| 257 | + bayonet_loading: { | ||
| 258 | + listLoading: false, | ||
| 259 | + addLoading: false, | ||
| 260 | + editLoading: false, | ||
| 261 | + delLoading: false, | ||
| 262 | + batchDelLoading: false, | ||
| 263 | + }, | ||
| 264 | + | ||
| 265 | + /** | ||
| 266 | + * 对话框 | ||
| 267 | + */ | ||
| 268 | + bayonet_dialog: { | ||
| 269 | + addDialog: false, | ||
| 270 | + editDialog: false, | ||
| 271 | + }, | ||
| 272 | + | ||
| 273 | + /** | ||
| 274 | + * 备案添加,表单 | ||
| 275 | + */ | ||
| 276 | + bayonet_addForm: { | ||
| 277 | + // 场站名称 | ||
| 278 | + stationName: '', | ||
| 279 | + // 卡口名称 | ||
| 280 | + name: '', | ||
| 281 | + // 通道编号 | ||
| 282 | + channel: '', | ||
| 283 | + // 备注信息 | ||
| 284 | + remarks: '', | ||
| 285 | + }, | ||
| 286 | + | ||
| 287 | + /** | ||
| 288 | + * 备案添加,表单验证规则 | ||
| 289 | + */ | ||
| 290 | + bayonet_addFormRules: { | ||
| 291 | + // 场站名称 | ||
| 292 | + stationName: [ | ||
| 293 | + {required: true, message: '请输入场站名称', trigger: ['blur', 'change']}, | ||
| 294 | + ], | ||
| 295 | + // 卡口名称 | ||
| 296 | + name: [ | ||
| 297 | + {required: true, message: '请输入卡口名称', trigger: ['blur', 'change']}, | ||
| 298 | + ], | ||
| 299 | + // 通道编号 | ||
| 300 | + channel: [ | ||
| 301 | + {required: true, message: '请输入通道编号', trigger: ['blur', 'change']}, | ||
| 302 | + ], | ||
| 303 | + type: [ | ||
| 304 | + {required: true, message: '请选择卡口类型', trigger: ['blur', 'change']}, | ||
| 305 | + ], | ||
| 306 | + }, | ||
| 307 | + | ||
| 308 | + /** | ||
| 309 | + * 备案修改,表单 | ||
| 310 | + */ | ||
| 311 | + bayonet_editForm: {}, | ||
| 312 | + | ||
| 313 | + /** | ||
| 314 | + * 备案修改,表单验证规则 | ||
| 315 | + */ | ||
| 316 | + bayonet_editFormRules: { | ||
| 317 | + // 场站名称 | ||
| 318 | + stationName: [ | ||
| 319 | + {required: true, message: '请输入场站名称', trigger: ['blur', 'change']}, | ||
| 320 | + ], | ||
| 321 | + // 卡口名称 | ||
| 322 | + name: [ | ||
| 323 | + {required: true, message: '请输入卡口名称', trigger: ['blur', 'change']}, | ||
| 324 | + ], | ||
| 325 | + // 通道编号 | ||
| 326 | + channel: [ | ||
| 327 | + {required: true, message: '请输入通道编号', trigger: ['blur', 'change']}, | ||
| 328 | + ], | ||
| 329 | + type: [ | ||
| 330 | + {required: true, message: '请选择卡口类型', trigger: ['blur', 'change']}, | ||
| 331 | + ], | ||
| 332 | + }, | ||
| 333 | + } | ||
| 334 | + }, | ||
| 335 | + methods: { | ||
| 336 | + /** | ||
| 337 | + * 分页查询,监听 pageSize 改变的事件 | ||
| 338 | + * 刷新列表 | ||
| 339 | + */ | ||
| 340 | + bayonet_handleSizeChange(newSize) { | ||
| 341 | + this.bayonet_queryInfo.pageSize = newSize; | ||
| 342 | + this.bayonet_getList(); | ||
| 343 | + }, | ||
| 344 | + /** | ||
| 345 | + * 分页查询,监听 pageNum 改变的事件 | ||
| 346 | + * 刷新列表 | ||
| 347 | + */ | ||
| 348 | + bayonet_handleCurrentChange(newPage) { | ||
| 349 | + this.bayonet_queryInfo.pageNum = newPage; | ||
| 350 | + this.bayonet_getList(); | ||
| 351 | + }, | ||
| 352 | + | ||
| 353 | + /** | ||
| 354 | + * 列表查询 | ||
| 355 | + */ | ||
| 356 | + bayonet_getList() { | ||
| 357 | + this.bayonet_loading.listLoading = true; | ||
| 358 | + selectBayonetList(this.bayonet_queryInfo).then((response) => { | ||
| 359 | + let res = response.data; | ||
| 360 | + if (res.code !== '200') { | ||
| 361 | + this.bayonet_loading.listLoading = false; | ||
| 362 | + return this.$message.error(res.msg); | ||
| 363 | + } | ||
| 364 | + this.bayonet_page.bayonetList = res.data.list; | ||
| 365 | + this.bayonet_page.total = res.data.total; | ||
| 366 | + this.bayonet_loading.listLoading = false; | ||
| 367 | + }).catch(error => { | ||
| 368 | + this.bayonet_loading.listLoading = false; | ||
| 369 | + this.$message.error(error.toString()); | ||
| 370 | + }); | ||
| 371 | + }, | ||
| 372 | + | ||
| 373 | + /** | ||
| 374 | + * 对话框,备案添加,打开事件 | ||
| 375 | + */ | ||
| 376 | + bayonet_toAddDialog() { | ||
| 377 | + this.getYards(); | ||
| 378 | + this.bayonet_dialog.addDialog = true; | ||
| 379 | + }, | ||
| 380 | + | ||
| 381 | + /** | ||
| 382 | + * 对话框,备案添加,关闭事件 | ||
| 383 | + */ | ||
| 384 | + bayonet_addDialogClosed() { | ||
| 385 | + this.$refs.bayonet_addFormRef.resetFields(); | ||
| 386 | + }, | ||
| 387 | + | ||
| 388 | + /** | ||
| 389 | + * 备案添加 | ||
| 390 | + */ | ||
| 391 | + bayonet_add() { | ||
| 392 | + this.$refs.bayonet_addFormRef.validate(valid => { | ||
| 393 | + // 未通过,表单预校验 | ||
| 394 | + if (!valid) return; | ||
| 395 | + | ||
| 396 | + this.bayonet_loading.addLoading = true; | ||
| 397 | + insertBayonet(this.bayonet_addForm).then((response) => { | ||
| 398 | + let res = response.data; | ||
| 399 | + if (res.code !== '200') { | ||
| 400 | + this.bayonet_loading.addLoading = false; | ||
| 401 | + return this.$message.error(res.msg); | ||
| 402 | + } | ||
| 403 | + this.$message.success(res.msg); | ||
| 404 | + this.bayonet_loading.addLoading = false; | ||
| 405 | + this.bayonet_dialog.addDialog = false; | ||
| 406 | + this.bayonet_getList(); | ||
| 407 | + }).catch(error => { | ||
| 408 | + this.bayonet_loading.addLoading = false; | ||
| 409 | + this.$message.error(error.toString()); | ||
| 410 | + }); | ||
| 411 | + }) | ||
| 412 | + }, | ||
| 413 | + | ||
| 414 | + /** | ||
| 415 | + * 备案修改,对话框,打开事件 | ||
| 416 | + */ | ||
| 417 | + bayonet_toEditDialog(index, row) { | ||
| 418 | + this.getYards(); | ||
| 419 | + this.bayonet_editForm = Object.assign({}, row); | ||
| 420 | + this.bayonet_dialog.editDialog = true; | ||
| 421 | + }, | ||
| 422 | + | ||
| 423 | + /** | ||
| 424 | + * 备案修改,对话框,关闭事件 | ||
| 425 | + */ | ||
| 426 | + bayonet_editDialogClosed() { | ||
| 427 | + this.$refs.bayonet_editFormRef.resetFields(); | ||
| 428 | + }, | ||
| 429 | + /** | ||
| 430 | + * 备案修改 | ||
| 431 | + */ | ||
| 432 | + bayonet_edit() { | ||
| 433 | + this.$refs.bayonet_editFormRef.validate(valid => { | ||
| 434 | + // 未通过,表单预校验 | ||
| 435 | + if (!valid) return; | ||
| 436 | + | ||
| 437 | + this.bayonet_loading.editLoading = true; | ||
| 438 | + updateBayonet(this.bayonet_editForm).then((response) => { | ||
| 439 | + let res = response.data; | ||
| 440 | + if (res.code !== '200') { | ||
| 441 | + this.bayonet_loading.editLoading = false; | ||
| 442 | + return this.$message.error(res.msg); | ||
| 443 | + } | ||
| 444 | + this.$message.success(res.msg); | ||
| 445 | + this.bayonet_loading.editLoading = false; | ||
| 446 | + this.bayonet_dialog.editDialog = false; | ||
| 447 | + this.bayonet_getList(); | ||
| 448 | + }).catch(error => { | ||
| 449 | + this.bayonet_loading.editLoading = false; | ||
| 450 | + this.$message.error(error.toString()); | ||
| 451 | + }); | ||
| 452 | + }) | ||
| 453 | + }, | ||
| 454 | + | ||
| 455 | + /** | ||
| 456 | + * 删除功能 | ||
| 457 | + */ | ||
| 458 | + bayonet_delete(index, row) { | ||
| 459 | + this.$confirm('此操作永久删除该卡口信息, 是否继续?', '警告', { | ||
| 460 | + confirmButtonText: '确定删除', | ||
| 461 | + cancelButtonText: '取消', | ||
| 462 | + type: 'warning' | ||
| 463 | + } | ||
| 464 | + ).then(() => { | ||
| 465 | + this.bayonet_loading.delLoading = true; | ||
| 466 | + deleteBayonet(row).then((response) => { | ||
| 467 | + let res = response.data; | ||
| 468 | + if (res.code !== '200') { | ||
| 469 | + this.bayonet_loading.delLoading = false; | ||
| 470 | + return this.$message.error(res.msg); | ||
| 471 | + } | ||
| 472 | + this.bayonet_loading.delLoading = false; | ||
| 473 | + this.$message.success(res.msg); | ||
| 474 | + this.bayonet_getList(); | ||
| 475 | + }).catch(error => { | ||
| 476 | + this.bayonet_loading.delLoading = false; | ||
| 477 | + this.$message.error(error.toString()); | ||
| 478 | + }); | ||
| 479 | + }).catch(() => { | ||
| 480 | + }); | ||
| 481 | + }, | ||
| 482 | + | ||
| 483 | + /** | ||
| 484 | + * 获取所有场站列表 | ||
| 485 | + */ | ||
| 486 | + getYards() { | ||
| 487 | + getYardList().then((response) => { | ||
| 488 | + let res = response.data; | ||
| 489 | + if (res.code !== '200') { | ||
| 490 | + return this.$message.error(res.msg); | ||
| 491 | + } | ||
| 492 | + this.stationNameList = res.data; | ||
| 493 | + }).catch(error => { | ||
| 494 | + this.$message.error(error.toString()); | ||
| 495 | + }); | ||
| 496 | + } | ||
| 497 | + }, | ||
| 498 | + } | ||
| 499 | +</script> | ||
| 500 | + | ||
| 501 | +<style scoped> | ||
| 502 | + | ||
| 503 | +</style> |
src/views/station_manage/Warehouse.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <div> | ||
| 3 | + <el-card style="background-color: #F5F7FA"> | ||
| 4 | + <!-- 搜素区域 --> | ||
| 5 | + <div> | ||
| 6 | + <el-row :gutter="10"> | ||
| 7 | + <el-col :span="4"> | ||
| 8 | + <el-input v-model="warehouse_queryInfo.stationName" prefix-icon="el-icon-search" size="small" | ||
| 9 | + placeholder="场站名称" clearable></el-input> | ||
| 10 | + </el-col> | ||
| 11 | + <el-col :span="4"> | ||
| 12 | + <el-input v-model="warehouse_queryInfo.name" prefix-icon="el-icon-search" size="small" | ||
| 13 | + placeholder="仓库名称" clearable></el-input> | ||
| 14 | + </el-col> | ||
| 15 | + | ||
| 16 | + <el-col :span="8"> | ||
| 17 | + <el-button type="success" style="width:120px" size="small" @click="warehouse_getList"> | ||
| 18 | + 查询 | ||
| 19 | + </el-button> | ||
| 20 | + <el-button type="primary" style="width:120px" size="small" @click="warehouse_toAddDialog"> | ||
| 21 | + 仓库添加 | ||
| 22 | + </el-button> | ||
| 23 | + </el-col> | ||
| 24 | + </el-row> | ||
| 25 | + </div> | ||
| 26 | + | ||
| 27 | + <!-- 列表区域 --> | ||
| 28 | + <div style="margin-top: 20px;"> | ||
| 29 | + <el-table :data="warehouse_page.warehouseList" border size="mini" | ||
| 30 | + v-loading="warehouse_loading.listLoading" element-loading-text="获取仓库列表,拼命加载中"> | ||
| 31 | + <el-table-column type="index" align="center"></el-table-column> | ||
| 32 | + <el-table-column label="场站名称" prop="yard.name" align="center" width="120"></el-table-column> | ||
| 33 | + <el-table-column label="仓库名称" prop="name" align="center" width="130"></el-table-column> | ||
| 34 | + <el-table-column label="仓库类型" prop="warehouseType" align="center" width="120"> | ||
| 35 | + <template slot-scope="scope"> | ||
| 36 | + <span v-if="scope.row.warehouseType ==='001'">进港仓库</span> | ||
| 37 | + <span v-if="scope.row.warehouseType ==='002'">出港仓库</span> | ||
| 38 | + <span v-if="scope.row.warehouseType ==='003'">查验仓库</span> | ||
| 39 | + <span v-if="scope.row.warehouseType ==='004'">危险品仓库</span> | ||
| 40 | + </template> | ||
| 41 | + </el-table-column> | ||
| 42 | + <el-table-column label="仓库长度(米)" prop="warehouseLength" align="center" width="120"></el-table-column> | ||
| 43 | + <el-table-column label="仓库宽度(米)" prop="warehouseWidth" align="center" width="120"></el-table-column> | ||
| 44 | + <el-table-column label="仓库高度(米)" prop="warehouseHeight" align="center" width="120"></el-table-column> | ||
| 45 | + <el-table-column label="仓库面积(平方米)" prop="warehouseArea" align="center" width="140"></el-table-column> | ||
| 46 | + <el-table-column label="仓库体积(立方米)" prop="warehouseVolume" align="center" width="140"></el-table-column> | ||
| 47 | + <el-table-column label="备注信息" prop="remarks" align="center" width="200"></el-table-column> | ||
| 48 | + <el-table-column label="操作" width="160px" align="center" fixed="right"> | ||
| 49 | + <template slot-scope="scope"> | ||
| 50 | + <el-tooltip effect="dark" content="编辑" placement="top-start" :enterable="false"> | ||
| 51 | + <el-button type="text" icon="el-icon-edit" size="mini" | ||
| 52 | + @click="warehouse_toEditDialog(scope.$index,scope.row)">编辑 | ||
| 53 | + </el-button> | ||
| 54 | + </el-tooltip> | ||
| 55 | + <el-tooltip effect="dark" content="删除" placement="top-start" :enterable="false"> | ||
| 56 | + <el-button type="text" icon="el-icon-delete" size="mini" | ||
| 57 | + :loading="warehouse_loading.delLoading" | ||
| 58 | + @click="warehouse_delete(scope.$index,scope.row)">删除 | ||
| 59 | + </el-button> | ||
| 60 | + </el-tooltip> | ||
| 61 | + </template> | ||
| 62 | + </el-table-column> | ||
| 63 | + </el-table> | ||
| 64 | + </div> | ||
| 65 | + | ||
| 66 | + <!-- 分页区域 --> | ||
| 67 | + <div style="margin-top: 10px"> | ||
| 68 | + <el-row :gutter="24"> | ||
| 69 | + <el-col :span="10" style="margin-top: 5px"> | ||
| 70 | + <el-pagination | ||
| 71 | + @size-change="warehouse_handleSizeChange" | ||
| 72 | + @current-change="warehouse_handleCurrentChange" | ||
| 73 | + :current-page="warehouse_queryInfo.pageNum" | ||
| 74 | + :page-sizes="[10,30,50,100]" | ||
| 75 | + :page-size="warehouse_queryInfo.pageSize" | ||
| 76 | + layout="total, sizes, prev, pager, next, jumper" | ||
| 77 | + :total="warehouse_page.total"> | ||
| 78 | + </el-pagination> | ||
| 79 | + </el-col> | ||
| 80 | + </el-row> | ||
| 81 | + </div> | ||
| 82 | + </el-card> | ||
| 83 | + <!-- 仓库添加 --> | ||
| 84 | + <div> | ||
| 85 | + <el-dialog title="仓库添加:" | ||
| 86 | + :visible.sync="warehouse_dialog.addDialog" | ||
| 87 | + style="margin-top: -100px" text-align="center" width="60%" | ||
| 88 | + @close="warehouse_addDialogClosed"> | ||
| 89 | + <el-form :inline="true" label-width="165px" status-icon style="margin-top: -20px;" align="center" | ||
| 90 | + :model="warehouse_addForm" :rules="warehouse_addFormRules" ref="warehouse_addFormRef"> | ||
| 91 | + <el-form-item label="场站名称:" prop="yardId"> | ||
| 92 | + <el-select v-model="warehouse_addForm.yardId" style="width: 300px" clearable size="mini" | ||
| 93 | + placeholder="请选择场站名称"> | ||
| 94 | + <el-option | ||
| 95 | + v-for="item in stationNameList" | ||
| 96 | + :key="item.name" | ||
| 97 | + :label="item.name" | ||
| 98 | + :value="item.id"> | ||
| 99 | + </el-option> | ||
| 100 | + </el-select> | ||
| 101 | + </el-form-item> | ||
| 102 | + <el-form-item label="仓库名称:" prop="name"> | ||
| 103 | + <el-input v-model="warehouse_addForm.name" style="width:300px" size="mini" clearable | ||
| 104 | + placeholder="请输入仓库名称"> | ||
| 105 | + </el-input> | ||
| 106 | + </el-form-item> | ||
| 107 | + <el-form-item label="仓库类型:" prop="warehouseType"> | ||
| 108 | + <el-select v-model="warehouse_addForm.warehouseType" style="width: 300px" clearable size="mini" | ||
| 109 | + placeholder="请选择仓库类型"> | ||
| 110 | + <el-option | ||
| 111 | + v-for="item in warehouseTypeList" | ||
| 112 | + :key="item.label" | ||
| 113 | + :label="item.label" | ||
| 114 | + :value="item.value"> | ||
| 115 | + </el-option> | ||
| 116 | + </el-select> | ||
| 117 | + </el-form-item> | ||
| 118 | + | ||
| 119 | + <el-form-item label="仓库长度(米):" prop="warehouseLength"> | ||
| 120 | + <el-input-number :precision="2" :step="0.1" style="width:300px" clearable | ||
| 121 | + @blur="calculationAreaAndVolume" | ||
| 122 | + v-model="warehouse_addForm.warehouseLength" placeholder="请输入仓库长度"> | ||
| 123 | + </el-input-number> | ||
| 124 | + </el-form-item> | ||
| 125 | + <el-form-item label="仓库宽度(米):" prop="warehouseWidth"> | ||
| 126 | + <el-input-number :precision="2" :step="0.1" style="width:300px" clearable | ||
| 127 | + @blur="calculationAreaAndVolume" | ||
| 128 | + v-model="warehouse_addForm.warehouseWidth" placeholder="请输入仓库宽度"> | ||
| 129 | + </el-input-number> | ||
| 130 | + </el-form-item> | ||
| 131 | + <el-form-item label="仓库高度(米):" prop="warehouseHeight"> | ||
| 132 | + <el-input-number :precision="2" :step="0.1" style="width:300px" clearable | ||
| 133 | + @blur="calculationAreaAndVolume" | ||
| 134 | + v-model="warehouse_addForm.warehouseHeight" placeholder="请输入仓库宽度"> | ||
| 135 | + </el-input-number> | ||
| 136 | + </el-form-item> | ||
| 137 | + <el-form-item label="仓库面积(平方米):" prop="warehouseArea"> | ||
| 138 | + <el-input-number :precision="2" :step="0.1" style="width:300px" clearable | ||
| 139 | + :disabled="warehouse_addForm.warehouseLength === undefined || warehouse_addForm.warehouseWidth === undefined" | ||
| 140 | + v-model="warehouse_addForm.warehouseArea" placeholder="请输入仓库面积"> | ||
| 141 | + </el-input-number> | ||
| 142 | + </el-form-item> | ||
| 143 | + <el-form-item label="仓库体积(立方米):" prop="warehouseVolume"> | ||
| 144 | + <el-input-number :precision="2" :step="0.1" style="width:300px" clearable | ||
| 145 | + :disabled="warehouse_addForm.warehouseLength === undefined || warehouse_addForm.warehouseWidth === undefined | ||
| 146 | + || warehouse_addForm.warehouseHeight === undefined" | ||
| 147 | + v-model="warehouse_addForm.warehouseVolume" placeholder="请输入仓库体积"> | ||
| 148 | + </el-input-number> | ||
| 149 | + </el-form-item> | ||
| 150 | + | ||
| 151 | + <el-form-item label="备注信息:" prop="remarks"> | ||
| 152 | + <el-input v-model="warehouse_addForm.remarks" style="width:300px" clearable size="mini" | ||
| 153 | + type="textarea" :rows="2"> | ||
| 154 | + </el-input> | ||
| 155 | + </el-form-item> | ||
| 156 | + </el-form> | ||
| 157 | + <div slot="footer" class="dialog-footer" style="text-align: center;margin-top: -30px"> | ||
| 158 | + <el-button type="info" @click="warehouse_dialog.addDialog = false" size="medium" | ||
| 159 | + style="width: 100px">取消 | ||
| 160 | + </el-button> | ||
| 161 | + <el-button type="primary" @click="warehouse_add" :loading="warehouse_loading.addLoading" | ||
| 162 | + size="medium" style="width: 100px">保存 | ||
| 163 | + </el-button> | ||
| 164 | + </div> | ||
| 165 | + </el-dialog> | ||
| 166 | + </div> | ||
| 167 | + | ||
| 168 | + <!-- 仓库修改 --> | ||
| 169 | + <div> | ||
| 170 | + <el-dialog title="仓库修改:" | ||
| 171 | + :visible.sync="warehouse_dialog.editDialog" | ||
| 172 | + style="margin-top: -100px" text-align="center" width="60%" | ||
| 173 | + @close="warehouse_editDialogClosed"> | ||
| 174 | + <el-form :inline="true" label-width="165px" status-icon style="margin-top: -20px;" align="center" | ||
| 175 | + :model="warehouse_editForm" :rules="warehouse_editFormRules" ref="warehouse_editFormRef"> | ||
| 176 | + <el-form-item label="场站名称:" prop="yardId"> | ||
| 177 | + <el-select v-model="warehouse_editForm.yardId" style="width: 300px" clearable size="small" | ||
| 178 | + placeholder="请选择场站名称"> | ||
| 179 | + <el-option | ||
| 180 | + v-for="item in stationNameList" | ||
| 181 | + :key="item.name" | ||
| 182 | + :label="item.name" | ||
| 183 | + :value="item.id"> | ||
| 184 | + </el-option> | ||
| 185 | + </el-select> | ||
| 186 | + </el-form-item> | ||
| 187 | + <el-form-item label="仓库名称:" prop="name"> | ||
| 188 | + <el-input v-model="warehouse_editForm.name" style="width:300px" size="mini" clearable | ||
| 189 | + placeholder="请输入仓库名称"> | ||
| 190 | + </el-input> | ||
| 191 | + </el-form-item> | ||
| 192 | + <el-form-item label="仓库类型:" prop="warehouseType"> | ||
| 193 | + <el-select v-model="warehouse_editForm.warehouseType" style="width: 300px" clearable size="small" | ||
| 194 | + placeholder="请选择仓库类型"> | ||
| 195 | + <el-option | ||
| 196 | + v-for="item in warehouseTypeList" | ||
| 197 | + :key="item.label" | ||
| 198 | + :label="item.label" | ||
| 199 | + :value="item.value"> | ||
| 200 | + </el-option> | ||
| 201 | + </el-select> | ||
| 202 | + </el-form-item> | ||
| 203 | + <el-form-item label="仓库长度(米):" prop="warehouseLength"> | ||
| 204 | + <el-input-number :precision="2" :step="0.1" style="width:300px" clearable | ||
| 205 | + @blur="edit_calculationAreaAndVolume" | ||
| 206 | + v-model="warehouse_editForm.warehouseLength" placeholder="请输入仓库长度"> | ||
| 207 | + </el-input-number> | ||
| 208 | + </el-form-item> | ||
| 209 | + <el-form-item label="仓库宽度(米):" prop="warehouseWidth"> | ||
| 210 | + <el-input-number :precision="2" :step="0.1" style="width:300px" clearable | ||
| 211 | + @blur="edit_calculationAreaAndVolume" | ||
| 212 | + v-model="warehouse_editForm.warehouseWidth" placeholder="请输入仓库宽度"> | ||
| 213 | + </el-input-number> | ||
| 214 | + </el-form-item> | ||
| 215 | + | ||
| 216 | + <el-form-item label="仓库高度(米):" prop="warehouseHeight"> | ||
| 217 | + <el-input-number :precision="2" :step="0.1" style="width:300px" clearable | ||
| 218 | + @blur="edit_calculationAreaAndVolume" | ||
| 219 | + v-model="warehouse_editForm.warehouseHeight" placeholder="请输入仓库宽度"> | ||
| 220 | + </el-input-number> | ||
| 221 | + </el-form-item> | ||
| 222 | + <el-form-item label="仓库面积(平方米):" prop="warehouseArea"> | ||
| 223 | + <el-input-number :precision="2" :step="0.1" style="width:300px" clearable | ||
| 224 | + v-model="warehouse_editForm.warehouseArea" placeholder="请输入面积"> | ||
| 225 | + </el-input-number> | ||
| 226 | + </el-form-item> | ||
| 227 | + <el-form-item label="仓库体积(立方米):" prop="warehouseVolume"> | ||
| 228 | + <el-input-number :precision="2" :step="0.1" style="width:300px" clearable | ||
| 229 | + v-model="warehouse_editForm.warehouseVolume" placeholder="请输入体积"> | ||
| 230 | + </el-input-number> | ||
| 231 | + </el-form-item> | ||
| 232 | + | ||
| 233 | + <el-form-item label="备注信息:" prop="remarks"> | ||
| 234 | + <el-input v-model="warehouse_editForm.remarks" style="width:300px" clearable size="mini" | ||
| 235 | + type="textarea" :rows="2"> | ||
| 236 | + </el-input> | ||
| 237 | + </el-form-item> | ||
| 238 | + </el-form> | ||
| 239 | + <div slot="footer" class="dialog-footer" style="text-align: center;margin-top: -30px"> | ||
| 240 | + <el-button type="info" @click="warehouse_dialog.editDialog = false" size="medium" | ||
| 241 | + style="width: 100px">取消 | ||
| 242 | + </el-button> | ||
| 243 | + <el-button type="primary" @click="warehouse_edit" :loading="warehouse_loading.editLoading" | ||
| 244 | + size="medium" style="width: 100px">保存 | ||
| 245 | + </el-button> | ||
| 246 | + </div> | ||
| 247 | + </el-dialog> | ||
| 248 | + </div> | ||
| 249 | + </div> | ||
| 250 | +</template> | ||
| 251 | + | ||
| 252 | +<script> | ||
| 253 | + import {selectWarehouseList, insertWarehouse, updateWarehouse, deleteWarehouse, getYardList} from "../../api/station_dispatch"; | ||
| 254 | + | ||
| 255 | + export default { | ||
| 256 | + name: "Warehouse", | ||
| 257 | + data() { | ||
| 258 | + return { | ||
| 259 | + /** | ||
| 260 | + * 搜索参数 | ||
| 261 | + */ | ||
| 262 | + warehouse_queryInfo: { | ||
| 263 | + // 当前页数 | ||
| 264 | + pageNum: 1, | ||
| 265 | + // 每页大小 | ||
| 266 | + pageSize: 10, | ||
| 267 | + }, | ||
| 268 | + | ||
| 269 | + /** | ||
| 270 | + * 分页 | ||
| 271 | + */ | ||
| 272 | + warehouse_page: { | ||
| 273 | + yardList: [], | ||
| 274 | + total: 0, | ||
| 275 | + selectList: [], | ||
| 276 | + }, | ||
| 277 | + | ||
| 278 | + /** | ||
| 279 | + * 加载 | ||
| 280 | + */ | ||
| 281 | + warehouse_loading: { | ||
| 282 | + listLoading: false, | ||
| 283 | + addLoading: false, | ||
| 284 | + editLoading: false, | ||
| 285 | + delLoading: false, | ||
| 286 | + batchDelLoading: false, | ||
| 287 | + }, | ||
| 288 | + | ||
| 289 | + /** | ||
| 290 | + * 对话框 | ||
| 291 | + */ | ||
| 292 | + warehouse_dialog: { | ||
| 293 | + addDialog: false, | ||
| 294 | + editDialog: false, | ||
| 295 | + }, | ||
| 296 | + | ||
| 297 | + /** | ||
| 298 | + * 备案添加,表单 | ||
| 299 | + */ | ||
| 300 | + warehouse_addForm: { | ||
| 301 | + // 对应场站的ID | ||
| 302 | + yardId: '', | ||
| 303 | + // 仓库名称 | ||
| 304 | + name: '', | ||
| 305 | + // 仓库类型 | ||
| 306 | + warehouseType: '', | ||
| 307 | + // 仓库长度 | ||
| 308 | + warehouseLength: undefined, | ||
| 309 | + // 仓库宽度 | ||
| 310 | + warehouseWidth: undefined, | ||
| 311 | + // 仓库高度 | ||
| 312 | + warehouseHeight: undefined, | ||
| 313 | + // 仓库面积 | ||
| 314 | + warehouseArea: undefined, | ||
| 315 | + // 仓库体积 | ||
| 316 | + warehouseVolume: undefined, | ||
| 317 | + // 备注 | ||
| 318 | + remarks: '', | ||
| 319 | + }, | ||
| 320 | + | ||
| 321 | + /** | ||
| 322 | + * 仓库类型 | ||
| 323 | + */ | ||
| 324 | + warehouseTypeList: [ | ||
| 325 | + { | ||
| 326 | + value: '001', | ||
| 327 | + label: '进港仓库' | ||
| 328 | + }, | ||
| 329 | + { | ||
| 330 | + value: '002', | ||
| 331 | + label: '出港仓库' | ||
| 332 | + }, | ||
| 333 | + { | ||
| 334 | + value: '003', | ||
| 335 | + label: '查验仓库' | ||
| 336 | + }, | ||
| 337 | + { | ||
| 338 | + value: '004', | ||
| 339 | + label: '危险品仓库' | ||
| 340 | + }, | ||
| 341 | + ], | ||
| 342 | + /** | ||
| 343 | + * 场站名称 | ||
| 344 | + */ | ||
| 345 | + stationNameList: [], | ||
| 346 | + | ||
| 347 | + /** | ||
| 348 | + * 备案添加,表单验证规则 | ||
| 349 | + */ | ||
| 350 | + warehouse_addFormRules: { | ||
| 351 | + yardId: [ | ||
| 352 | + {required: true, message: '请选择场站', trigger: ['blur', 'change']}, | ||
| 353 | + ], | ||
| 354 | + // 仓库名称 | ||
| 355 | + name: [ | ||
| 356 | + {required: true, message: '请输入仓库名称', trigger: ['blur', 'change']}, | ||
| 357 | + ], | ||
| 358 | + // 仓库类型 | ||
| 359 | + warehouseType: [ | ||
| 360 | + {required: true, message: '请选择仓库类型', trigger: ['blur', 'change']}, | ||
| 361 | + ], | ||
| 362 | + // 仓库长度 | ||
| 363 | + warehouseLength: [ | ||
| 364 | + {required: true, message: '请输入仓库长度', trigger: ['blur', 'change']}, | ||
| 365 | + ], | ||
| 366 | + // 仓库宽度 | ||
| 367 | + warehouseWidth: [ | ||
| 368 | + {required: true, message: '请输入仓库宽度', trigger: ['blur', 'change']}, | ||
| 369 | + ], | ||
| 370 | + warehouseArea: [ | ||
| 371 | + {required: true, message: '请输入仓库面积', trigger: ['blur', 'change']}, | ||
| 372 | + ], | ||
| 373 | + }, | ||
| 374 | + | ||
| 375 | + /** | ||
| 376 | + * 备案修改,表单 | ||
| 377 | + */ | ||
| 378 | + warehouse_editForm: {}, | ||
| 379 | + | ||
| 380 | + /** | ||
| 381 | + * 备案修改,表单验证规则 | ||
| 382 | + */ | ||
| 383 | + warehouse_editFormRules: { | ||
| 384 | + yardId: [ | ||
| 385 | + {required: true, message: '请选择场站', trigger: ['blur', 'change']}, | ||
| 386 | + ], | ||
| 387 | + // 仓库名称 | ||
| 388 | + name: [ | ||
| 389 | + {required: true, message: '请输入仓库名称', trigger: ['blur', 'change']}, | ||
| 390 | + ], | ||
| 391 | + // 仓库类型 | ||
| 392 | + warehouseType: [ | ||
| 393 | + {required: true, message: '请选择仓库类型', trigger: ['blur', 'change']}, | ||
| 394 | + ], | ||
| 395 | + // 仓库长度 | ||
| 396 | + warehouseLength: [ | ||
| 397 | + {required: true, message: '请输入仓库长度', trigger: ['blur', 'change']}, | ||
| 398 | + ], | ||
| 399 | + // 仓库宽度 | ||
| 400 | + warehouseWidth: [ | ||
| 401 | + {required: true, message: '请输入仓库宽度', trigger: ['blur', 'change']}, | ||
| 402 | + ], | ||
| 403 | + warehouseArea: [ | ||
| 404 | + {required: true, message: '请输入仓库面积', trigger: ['blur', 'change']}, | ||
| 405 | + ], | ||
| 406 | + }, | ||
| 407 | + } | ||
| 408 | + }, | ||
| 409 | + methods: { | ||
| 410 | + /** | ||
| 411 | + * 分页查询,监听 pageSize 改变的事件 | ||
| 412 | + * 刷新列表 | ||
| 413 | + */ | ||
| 414 | + warehouse_handleSizeChange(newSize) { | ||
| 415 | + this.warehouse_queryInfo.pageSize = newSize; | ||
| 416 | + this.warehouse_getList(); | ||
| 417 | + }, | ||
| 418 | + /** | ||
| 419 | + * 分页查询,监听 pageNum 改变的事件 | ||
| 420 | + * 刷新列表 | ||
| 421 | + */ | ||
| 422 | + warehouse_handleCurrentChange(newPage) { | ||
| 423 | + this.warehouse_queryInfo.pageNum = newPage; | ||
| 424 | + this.warehouse_getList(); | ||
| 425 | + }, | ||
| 426 | + | ||
| 427 | + /** | ||
| 428 | + * 列表查询 | ||
| 429 | + */ | ||
| 430 | + warehouse_getList() { | ||
| 431 | + this.warehouse_loading.listLoading = true; | ||
| 432 | + selectWarehouseList(this.warehouse_queryInfo).then((response) => { | ||
| 433 | + let res = response.data; | ||
| 434 | + if (res.code !== '200') { | ||
| 435 | + this.warehouse_loading.listLoading = false; | ||
| 436 | + return this.$message.error(res.msg); | ||
| 437 | + } | ||
| 438 | + this.warehouse_page.warehouseList = res.data.list; | ||
| 439 | + this.warehouse_page.total = res.data.total; | ||
| 440 | + this.warehouse_loading.listLoading = false; | ||
| 441 | + }).catch(error => { | ||
| 442 | + this.warehouse_loading.listLoading = false; | ||
| 443 | + this.$message.error(error.toString()); | ||
| 444 | + }); | ||
| 445 | + }, | ||
| 446 | + | ||
| 447 | + /** | ||
| 448 | + * 对话框,备案添加,打开事件 | ||
| 449 | + */ | ||
| 450 | + warehouse_toAddDialog() { | ||
| 451 | + this.getYards(); | ||
| 452 | + this.warehouse_dialog.addDialog = true; | ||
| 453 | + }, | ||
| 454 | + | ||
| 455 | + /** | ||
| 456 | + * 对话框,备案添加,关闭事件 | ||
| 457 | + */ | ||
| 458 | + warehouse_addDialogClosed() { | ||
| 459 | + this.$refs.warehouse_addFormRef.resetFields(); | ||
| 460 | + }, | ||
| 461 | + | ||
| 462 | + /** | ||
| 463 | + * 添加表单,失去焦点时,计算面积和体积 | ||
| 464 | + */ | ||
| 465 | + calculationAreaAndVolume() { | ||
| 466 | + this.warehouse_addForm.warehouseArea = this.warehouse_addForm.warehouseLength * this.warehouse_addForm.warehouseWidth; | ||
| 467 | + this.warehouse_addForm.warehouseVolume = | ||
| 468 | + this.warehouse_addForm.warehouseLength * this.warehouse_addForm.warehouseWidth * this.warehouse_addForm.warehouseHeight; | ||
| 469 | + }, | ||
| 470 | + /** | ||
| 471 | + * 备案添加 | ||
| 472 | + */ | ||
| 473 | + warehouse_add() { | ||
| 474 | + this.$refs.warehouse_addFormRef.validate(valid => { | ||
| 475 | + // 未通过,表单预校验 | ||
| 476 | + if (!valid) return; | ||
| 477 | + | ||
| 478 | + this.warehouse_loading.addLoading = true; | ||
| 479 | + insertWarehouse(this.warehouse_addForm).then((response) => { | ||
| 480 | + let res = response.data; | ||
| 481 | + if (res.code !== '200') { | ||
| 482 | + this.warehouse_loading.addLoading = false; | ||
| 483 | + return this.$message.error(res.msg); | ||
| 484 | + } | ||
| 485 | + this.$message.success(res.msg); | ||
| 486 | + this.warehouse_loading.addLoading = false; | ||
| 487 | + this.warehouse_dialog.addDialog = false; | ||
| 488 | + this.warehouse_getList(); | ||
| 489 | + }).catch(error => { | ||
| 490 | + this.warehouse_loading.addLoading = false; | ||
| 491 | + this.$message.error(error.toString()); | ||
| 492 | + }); | ||
| 493 | + }) | ||
| 494 | + }, | ||
| 495 | + | ||
| 496 | + /** | ||
| 497 | + * 备案修改,对话框,打开事件 | ||
| 498 | + */ | ||
| 499 | + warehouse_toEditDialog(index, row) { | ||
| 500 | + this.getYards(); | ||
| 501 | + this.warehouse_editForm = Object.assign({}, row); | ||
| 502 | + this.warehouse_dialog.editDialog = true; | ||
| 503 | + }, | ||
| 504 | + | ||
| 505 | + /** | ||
| 506 | + * 备案修改,对话框,关闭事件 | ||
| 507 | + */ | ||
| 508 | + warehouse_editDialogClosed() { | ||
| 509 | + this.$refs.warehouse_editFormRef.resetFields(); | ||
| 510 | + }, | ||
| 511 | + /** | ||
| 512 | + * 添加表单,失去焦点时,计算面积和体积 | ||
| 513 | + */ | ||
| 514 | + edit_calculationAreaAndVolume() { | ||
| 515 | + this.warehouse_editForm.warehouseArea = this.warehouse_editForm.warehouseLength * this.warehouse_editForm.warehouseWidth; | ||
| 516 | + this.warehouse_editForm.warehouseVolume = | ||
| 517 | + this.warehouse_editForm.warehouseLength * this.warehouse_editForm.warehouseWidth * this.warehouse_editForm.warehouseHeight; | ||
| 518 | + }, | ||
| 519 | + /** | ||
| 520 | + * 备案修改 | ||
| 521 | + */ | ||
| 522 | + warehouse_edit() { | ||
| 523 | + this.$refs.warehouse_editFormRef.validate(valid => { | ||
| 524 | + // 未通过,表单预校验 | ||
| 525 | + if (!valid) return; | ||
| 526 | + | ||
| 527 | + this.warehouse_loading.editLoading = true; | ||
| 528 | + updateWarehouse(this.warehouse_editForm).then((response) => { | ||
| 529 | + let res = response.data; | ||
| 530 | + if (res.code !== '200') { | ||
| 531 | + this.warehouse_loading.editLoading = false; | ||
| 532 | + return this.$message.error(res.msg); | ||
| 533 | + } | ||
| 534 | + this.$message.success(res.msg); | ||
| 535 | + this.warehouse_loading.editLoading = false; | ||
| 536 | + this.warehouse_dialog.editDialog = false; | ||
| 537 | + this.warehouse_getList(); | ||
| 538 | + }).catch(error => { | ||
| 539 | + this.warehouse_loading.editLoading = false; | ||
| 540 | + this.$message.error(error.toString()); | ||
| 541 | + }); | ||
| 542 | + }) | ||
| 543 | + }, | ||
| 544 | + | ||
| 545 | + /** | ||
| 546 | + * 删除功能 | ||
| 547 | + */ | ||
| 548 | + warehouse_delete(index, row) { | ||
| 549 | + this.$confirm('此操作永久删除该仓库信息, 是否继续?', '警告', { | ||
| 550 | + confirmButtonText: '确定删除', | ||
| 551 | + cancelButtonText: '取消', | ||
| 552 | + type: 'warning' | ||
| 553 | + } | ||
| 554 | + ).then(() => { | ||
| 555 | + this.warehouse_loading.delLoading = true; | ||
| 556 | + deleteWarehouse(row).then((response) => { | ||
| 557 | + let res = response.data; | ||
| 558 | + if (res.code !== '200') { | ||
| 559 | + this.warehouse_loading.delLoading = false; | ||
| 560 | + return this.$message.error(res.msg); | ||
| 561 | + } | ||
| 562 | + this.warehouse_loading.delLoading = false; | ||
| 563 | + this.$message.success(res.msg); | ||
| 564 | + this.warehouse_getList(); | ||
| 565 | + }).catch(error => { | ||
| 566 | + this.warehouse_loading.delLoading = false; | ||
| 567 | + this.$message.error(error.toString()); | ||
| 568 | + }); | ||
| 569 | + }).catch(() => { | ||
| 570 | + }); | ||
| 571 | + }, | ||
| 572 | + /** | ||
| 573 | + * 获取所有场站列表 | ||
| 574 | + */ | ||
| 575 | + getYards() { | ||
| 576 | + getYardList().then((response) => { | ||
| 577 | + let res = response.data; | ||
| 578 | + if (res.code !== '200') { | ||
| 579 | + return this.$message.error(res.msg); | ||
| 580 | + } | ||
| 581 | + this.stationNameList = res.data; | ||
| 582 | + }).catch(error => { | ||
| 583 | + this.$message.error(error.toString()); | ||
| 584 | + }); | ||
| 585 | + }, | ||
| 586 | + }, | ||
| 587 | + } | ||
| 588 | +</script> | ||
| 589 | + | ||
| 590 | +<style scoped> | ||
| 591 | + | ||
| 592 | +</style> |
src/views/station_manage/Yard.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <div> | ||
| 3 | + <el-card style="background-color: #F5F7FA"> | ||
| 4 | + <!-- 搜素区域 --> | ||
| 5 | + <div> | ||
| 6 | + <el-row :gutter="10"> | ||
| 7 | + <el-col :span="4"> | ||
| 8 | + <el-input v-model="yard_queryInfo.name" prefix-icon="el-icon-search" size="small" | ||
| 9 | + placeholder="场站名称" clearable></el-input> | ||
| 10 | + </el-col> | ||
| 11 | + <el-col :span="4"> | ||
| 12 | + <el-input v-model="yard_queryInfo.customsCode" prefix-icon="el-icon-search" size="small" | ||
| 13 | + placeholder="关区代码" clearable></el-input> | ||
| 14 | + </el-col> | ||
| 15 | + <el-col :span="8"> | ||
| 16 | + <el-button type="success" style="width:120px" size="small" @click="yard_getList"> | ||
| 17 | + 查询 | ||
| 18 | + </el-button> | ||
| 19 | + <el-button type="primary" style="width:120px" size="small" @click="yard_toAddDialog"> | ||
| 20 | + 场站添加 | ||
| 21 | + </el-button> | ||
| 22 | + </el-col> | ||
| 23 | + </el-row> | ||
| 24 | + </div> | ||
| 25 | + | ||
| 26 | + <!-- 列表区域 --> | ||
| 27 | + <div style="margin-top: 20px;"> | ||
| 28 | + <el-table :data="yard_page.yardList" border size="mini" | ||
| 29 | + v-loading="yard_loading.listLoading" element-loading-text="获取场站列表,拼命加载中"> | ||
| 30 | + <el-table-column type="index" align="center"></el-table-column> | ||
| 31 | + <el-table-column label="场站名称" prop="name" align="center" width="120"></el-table-column> | ||
| 32 | + <el-table-column label="区域代码" prop="areaCode" align="center" width="120"></el-table-column> | ||
| 33 | + <el-table-column label="场站ID" prop="stationId" align="center" width="120"></el-table-column> | ||
| 34 | + <el-table-column label="关区代码" prop="customsCode" align="center" width="120"></el-table-column> | ||
| 35 | + <el-table-column label="备注信息" prop="remarks" align="center" width="200"></el-table-column> | ||
| 36 | + <el-table-column label="操作" width="140px" align="center"> | ||
| 37 | + <template slot-scope="scope"> | ||
| 38 | + <el-tooltip effect="dark" content="编辑" placement="top-start" :enterable="false"> | ||
| 39 | + <el-button type="text" icon="el-icon-edit" size="mini" | ||
| 40 | + @click="yard_toEditDialog(scope.$index,scope.row)">编辑 | ||
| 41 | + </el-button> | ||
| 42 | + </el-tooltip> | ||
| 43 | + <el-tooltip effect="dark" content="删除" placement="top-start" :enterable="false"> | ||
| 44 | + <el-button type="text" icon="el-icon-delete" size="mini" | ||
| 45 | + :loading="yard_loading.delLoading" | ||
| 46 | + @click="yard_delete(scope.$index,scope.row)">删除 | ||
| 47 | + </el-button> | ||
| 48 | + </el-tooltip> | ||
| 49 | + </template> | ||
| 50 | + </el-table-column> | ||
| 51 | + </el-table> | ||
| 52 | + </div> | ||
| 53 | + | ||
| 54 | + <!-- 分页区域 --> | ||
| 55 | + <div style="margin-top: 10px"> | ||
| 56 | + <el-row :gutter="24"> | ||
| 57 | + <el-col :span="10" style="margin-top: 5px"> | ||
| 58 | + <el-pagination | ||
| 59 | + @size-change="yard_handleSizeChange" | ||
| 60 | + @current-change="yard_handleCurrentChange" | ||
| 61 | + :current-page="yard_queryInfo.pageNum" | ||
| 62 | + :page-sizes="[10,30,50,100]" | ||
| 63 | + :page-size="yard_queryInfo.pageSize" | ||
| 64 | + layout="total, sizes, prev, pager, next, jumper" | ||
| 65 | + :total="yard_page.total"> | ||
| 66 | + </el-pagination> | ||
| 67 | + </el-col> | ||
| 68 | + </el-row> | ||
| 69 | + </div> | ||
| 70 | + </el-card> | ||
| 71 | + <!-- 场站添加 --> | ||
| 72 | + <div> | ||
| 73 | + <el-dialog title="场站添加:" | ||
| 74 | + :visible.sync="yard_dialog.addDialog" | ||
| 75 | + style="margin-top: -80px" text-align="center" width="60%" | ||
| 76 | + @close="yard_addDialogClosed"> | ||
| 77 | + <el-form :inline="true" label-width="150px" status-icon style="margin-top: -10px;" align="center" | ||
| 78 | + :model="yard_addForm" :rules="yard_addFormRules" ref="yard_addFormRef"> | ||
| 79 | + <el-form-item label="场站名称:" prop="name"> | ||
| 80 | + <el-input v-model="yard_addForm.name" style="width:300px" size="mini" clearable | ||
| 81 | + placeholder="请输入场站名称"> | ||
| 82 | + </el-input> | ||
| 83 | + </el-form-item> | ||
| 84 | + <el-form-item label="区域代码:" prop="areaCode"> | ||
| 85 | + <el-input v-model="yard_addForm.areaCode" style="width:300px" size="mini" clearable | ||
| 86 | + placeholder="请输入区域代码"> | ||
| 87 | + </el-input> | ||
| 88 | + </el-form-item> | ||
| 89 | + <el-form-item label="场站ID:" prop="stationId"> | ||
| 90 | + <el-input v-model="yard_addForm.stationId" style="width:300px" size="mini" clearable | ||
| 91 | + placeholder="请输入场站ID"> | ||
| 92 | + </el-input> | ||
| 93 | + </el-form-item> | ||
| 94 | + <el-form-item label="关区代码:" prop="customsCode"> | ||
| 95 | + <el-select v-model="yard_addForm.customsCode" style="width: 300px" clearable size="small" | ||
| 96 | + placeholder="请选择关区代码"> | ||
| 97 | + <el-option | ||
| 98 | + v-for="item in customsCodeList" | ||
| 99 | + :key="item.value" | ||
| 100 | + :label="item.label" | ||
| 101 | + :value="item.value"> | ||
| 102 | + </el-option> | ||
| 103 | + </el-select> | ||
| 104 | + </el-form-item> | ||
| 105 | + | ||
| 106 | + <el-form-item label="备注信息:" prop="remarks"> | ||
| 107 | + <el-input v-model="yard_addForm.remarks" style="width:300px" clearable size="mini" | ||
| 108 | + type="textarea" :rows="5"> | ||
| 109 | + </el-input> | ||
| 110 | + </el-form-item> | ||
| 111 | + </el-form> | ||
| 112 | + <div slot="footer" class="dialog-footer" style="text-align: center;margin-top: -30px"> | ||
| 113 | + <el-button type="info" @click="yard_dialog.addDialog = false" size="medium" | ||
| 114 | + style="width: 100px">取消 | ||
| 115 | + </el-button> | ||
| 116 | + <el-button type="primary" @click="yard_add" :loading="yard_loading.addLoading" | ||
| 117 | + size="medium" style="width: 100px">保存 | ||
| 118 | + </el-button> | ||
| 119 | + </div> | ||
| 120 | + </el-dialog> | ||
| 121 | + </div> | ||
| 122 | + | ||
| 123 | + <!-- 场站修改 --> | ||
| 124 | + <div> | ||
| 125 | + <el-dialog title="场站修改:" | ||
| 126 | + :visible.sync="yard_dialog.editDialog" | ||
| 127 | + style="margin-top: -80px" text-align="center" width="60%" | ||
| 128 | + @close="yard_editDialogClosed"> | ||
| 129 | + <el-form :inline="true" label-width="150px" status-icon style="margin-top: -10px;" align="center" | ||
| 130 | + :model="yard_editForm" :rules="yard_editFormRules" ref="yard_editFormRef"> | ||
| 131 | + <el-form-item label="场站名称:" prop="name"> | ||
| 132 | + <el-input v-model="yard_editForm.name" style="width:300px" size="mini" clearable | ||
| 133 | + placeholder="请输入场站名称"> | ||
| 134 | + </el-input> | ||
| 135 | + </el-form-item> | ||
| 136 | + <el-form-item label="区域代码:" prop="areaCode"> | ||
| 137 | + <el-input v-model="yard_editForm.areaCode" style="width:300px" size="mini" clearable | ||
| 138 | + placeholder="请输入区域代码"> | ||
| 139 | + </el-input> | ||
| 140 | + </el-form-item> | ||
| 141 | + <el-form-item label="场站ID:" prop="stationId"> | ||
| 142 | + <el-input v-model="yard_editForm.stationId" style="width:300px" size="mini" clearable | ||
| 143 | + placeholder="请输入场站ID"> | ||
| 144 | + </el-input> | ||
| 145 | + </el-form-item> | ||
| 146 | + <el-form-item label="关区代码:" prop="customsCode"> | ||
| 147 | + <el-select v-model="yard_editForm.customsCode" style="width: 300px" clearable size="small" | ||
| 148 | + placeholder="请选择关区代码"> | ||
| 149 | + <el-option | ||
| 150 | + v-for="item in customsCodeList" | ||
| 151 | + :key="item.value" | ||
| 152 | + :label="item.label" | ||
| 153 | + :value="item.value"> | ||
| 154 | + </el-option> | ||
| 155 | + </el-select> | ||
| 156 | + </el-form-item> | ||
| 157 | + | ||
| 158 | + <el-form-item label="备注信息:" prop="remarks"> | ||
| 159 | + <el-input v-model="yard_editForm.remarks" style="width:300px" clearable size="mini" | ||
| 160 | + type="textarea" :rows="5"> | ||
| 161 | + </el-input> | ||
| 162 | + </el-form-item> | ||
| 163 | + </el-form> | ||
| 164 | + <div slot="footer" class="dialog-footer" style="text-align: center;margin-top: -30px"> | ||
| 165 | + <el-button type="info" @click="yard_dialog.editDialog = false" size="medium" | ||
| 166 | + style="width: 100px">取消 | ||
| 167 | + </el-button> | ||
| 168 | + <el-button type="primary" @click="yard_edit" :loading="yard_loading.editLoading" | ||
| 169 | + size="medium" style="width: 100px">保存 | ||
| 170 | + </el-button> | ||
| 171 | + </div> | ||
| 172 | + </el-dialog> | ||
| 173 | + </div> | ||
| 174 | + </div> | ||
| 175 | +</template> | ||
| 176 | + | ||
| 177 | +<script> | ||
| 178 | + import {selectYardList, insertYard, updateYard, deleteYard} from "../../api/station_dispatch"; | ||
| 179 | + | ||
| 180 | + export default { | ||
| 181 | + name: "Yard", | ||
| 182 | + data() { | ||
| 183 | + return { | ||
| 184 | + /** | ||
| 185 | + * 搜索参数 | ||
| 186 | + */ | ||
| 187 | + yard_queryInfo: { | ||
| 188 | + // 场站名称 | ||
| 189 | + name: '', | ||
| 190 | + customsCode: undefined, | ||
| 191 | + // 当前页数 | ||
| 192 | + pageNum: 1, | ||
| 193 | + // 每页大小 | ||
| 194 | + pageSize: 10, | ||
| 195 | + }, | ||
| 196 | + | ||
| 197 | + /** | ||
| 198 | + * yard,分页 | ||
| 199 | + */ | ||
| 200 | + yard_page: { | ||
| 201 | + yardList: [], | ||
| 202 | + total: 0, | ||
| 203 | + selectList: [], | ||
| 204 | + }, | ||
| 205 | + | ||
| 206 | + /** | ||
| 207 | + * 加载 | ||
| 208 | + */ | ||
| 209 | + yard_loading: { | ||
| 210 | + listLoading: false, | ||
| 211 | + addLoading: false, | ||
| 212 | + editLoading: false, | ||
| 213 | + delLoading: false, | ||
| 214 | + batchDelLoading: false, | ||
| 215 | + }, | ||
| 216 | + | ||
| 217 | + /** | ||
| 218 | + * 对话框 | ||
| 219 | + */ | ||
| 220 | + yard_dialog: { | ||
| 221 | + addDialog: false, | ||
| 222 | + editDialog: false, | ||
| 223 | + }, | ||
| 224 | + | ||
| 225 | + /** | ||
| 226 | + * 备案添加,表单 | ||
| 227 | + */ | ||
| 228 | + yard_addForm: { | ||
| 229 | + // 场站名称 | ||
| 230 | + name: '', | ||
| 231 | + // 区域代码 | ||
| 232 | + areaCode: '', | ||
| 233 | + // 场站ID | ||
| 234 | + stationId: '', | ||
| 235 | + // 关区代码 | ||
| 236 | + customsCode: undefined, | ||
| 237 | + // 备注信息 | ||
| 238 | + remarks: '', | ||
| 239 | + }, | ||
| 240 | + | ||
| 241 | + customsCodeList: [ | ||
| 242 | + { | ||
| 243 | + value: 4604, | ||
| 244 | + label: '4604' | ||
| 245 | + }, | ||
| 246 | + { | ||
| 247 | + value: 4620, | ||
| 248 | + label: '4620' | ||
| 249 | + }, | ||
| 250 | + ], | ||
| 251 | + /** | ||
| 252 | + * 备案添加,表单验证规则 | ||
| 253 | + */ | ||
| 254 | + yard_addFormRules: { | ||
| 255 | + name: [ | ||
| 256 | + {required: true, message: '请输入场站名称', trigger: ['blur', 'change']}, | ||
| 257 | + ], | ||
| 258 | + }, | ||
| 259 | + | ||
| 260 | + /** | ||
| 261 | + * 备案修改,表单 | ||
| 262 | + */ | ||
| 263 | + yard_editForm: {}, | ||
| 264 | + | ||
| 265 | + /** | ||
| 266 | + * 备案修改,表单验证规则 | ||
| 267 | + */ | ||
| 268 | + yard_editFormRules: { | ||
| 269 | + name: [ | ||
| 270 | + {required: true, message: '请输入场站名称', trigger: ['blur', 'change']}, | ||
| 271 | + ], | ||
| 272 | + }, | ||
| 273 | + } | ||
| 274 | + }, | ||
| 275 | + methods: { | ||
| 276 | + /** | ||
| 277 | + * 分页查询,监听 pageSize 改变的事件 | ||
| 278 | + * 刷新列表 | ||
| 279 | + */ | ||
| 280 | + yard_handleSizeChange(newSize) { | ||
| 281 | + this.yard_queryInfo.pageSize = newSize; | ||
| 282 | + this.yard_getList(); | ||
| 283 | + }, | ||
| 284 | + /** | ||
| 285 | + * 分页查询,监听 pageNum 改变的事件 | ||
| 286 | + * 刷新列表 | ||
| 287 | + */ | ||
| 288 | + yard_handleCurrentChange(newPage) { | ||
| 289 | + this.yard_queryInfo.pageNum = newPage; | ||
| 290 | + this.yard_getList(); | ||
| 291 | + }, | ||
| 292 | + | ||
| 293 | + /** | ||
| 294 | + * 列表查询 | ||
| 295 | + */ | ||
| 296 | + yard_getList() { | ||
| 297 | + this.yard_loading.listLoading = true; | ||
| 298 | + selectYardList(this.yard_queryInfo).then((response) => { | ||
| 299 | + let res = response.data; | ||
| 300 | + if (res.code !== '200') { | ||
| 301 | + this.yard_loading.listLoading = false; | ||
| 302 | + return this.$message.error(res.msg); | ||
| 303 | + } | ||
| 304 | + this.yard_page.yardList = res.data.list; | ||
| 305 | + this.yard_page.total = res.data.total; | ||
| 306 | + this.yard_loading.listLoading = false; | ||
| 307 | + }).catch(error => { | ||
| 308 | + this.yard_loading.listLoading = false; | ||
| 309 | + this.$message.error(error.toString()); | ||
| 310 | + }); | ||
| 311 | + }, | ||
| 312 | + | ||
| 313 | + /** | ||
| 314 | + * 对话框,备案添加,打开事件 | ||
| 315 | + */ | ||
| 316 | + yard_toAddDialog() { | ||
| 317 | + this.yard_dialog.addDialog = true; | ||
| 318 | + }, | ||
| 319 | + | ||
| 320 | + /** | ||
| 321 | + * 对话框,备案添加,关闭事件 | ||
| 322 | + */ | ||
| 323 | + yard_addDialogClosed() { | ||
| 324 | + this.$refs.yard_addFormRef.resetFields(); | ||
| 325 | + }, | ||
| 326 | + | ||
| 327 | + /** | ||
| 328 | + * 备案添加 | ||
| 329 | + */ | ||
| 330 | + yard_add() { | ||
| 331 | + this.$refs.yard_addFormRef.validate(valid => { | ||
| 332 | + // 未通过,表单预校验 | ||
| 333 | + if (!valid) return; | ||
| 334 | + // 通过,表单预检验 | ||
| 335 | + this.yard_loading.addLoading = true; | ||
| 336 | + insertYard(this.yard_addForm).then((response) => { | ||
| 337 | + let res = response.data; | ||
| 338 | + if (res.code !== '200') { | ||
| 339 | + this.yard_loading.addLoading = false; | ||
| 340 | + return this.$message.error(res.msg); | ||
| 341 | + } | ||
| 342 | + this.$message.success(res.msg); | ||
| 343 | + this.yard_loading.addLoading = false; | ||
| 344 | + this.yard_dialog.addDialog = false; | ||
| 345 | + this.yard_getList(); | ||
| 346 | + }).catch(error => { | ||
| 347 | + this.yard_loading.addLoading = false; | ||
| 348 | + this.$message.error(error.toString()); | ||
| 349 | + }); | ||
| 350 | + }) | ||
| 351 | + }, | ||
| 352 | + | ||
| 353 | + /** | ||
| 354 | + * 备案修改,对话框,打开事件 | ||
| 355 | + */ | ||
| 356 | + yard_toEditDialog(index, row) { | ||
| 357 | + this.yard_editForm = Object.assign({}, row); | ||
| 358 | + this.yard_dialog.editDialog = true; | ||
| 359 | + }, | ||
| 360 | + | ||
| 361 | + /** | ||
| 362 | + * 备案修改,对话框,关闭事件 | ||
| 363 | + */ | ||
| 364 | + yard_editDialogClosed() { | ||
| 365 | + this.$refs.yard_editFormRef.resetFields(); | ||
| 366 | + }, | ||
| 367 | + /** | ||
| 368 | + * 备案修改 | ||
| 369 | + */ | ||
| 370 | + yard_edit() { | ||
| 371 | + this.$refs.yard_editFormRef.validate(valid => { | ||
| 372 | + // 未通过,表单预校验 | ||
| 373 | + if (!valid) return; | ||
| 374 | + | ||
| 375 | + this.yard_loading.editLoading = true; | ||
| 376 | + updateYard(this.yard_editForm).then((response) => { | ||
| 377 | + let res = response.data; | ||
| 378 | + if (res.code !== '200') { | ||
| 379 | + this.yard_loading.editLoading = false; | ||
| 380 | + return this.$message.error(res.msg); | ||
| 381 | + } | ||
| 382 | + this.$message.success(res.msg); | ||
| 383 | + this.yard_loading.editLoading = false; | ||
| 384 | + this.yard_dialog.editDialog = false; | ||
| 385 | + this.yard_getList(); | ||
| 386 | + }).catch(error => { | ||
| 387 | + this.yard_loading.editLoading = false; | ||
| 388 | + this.$message.error(error.toString()); | ||
| 389 | + }); | ||
| 390 | + }) | ||
| 391 | + }, | ||
| 392 | + | ||
| 393 | + /** | ||
| 394 | + * 删除功能 | ||
| 395 | + */ | ||
| 396 | + yard_delete(index, row) { | ||
| 397 | + this.$confirm('此操作永久删除该场站信息, 是否继续?', '警告', { | ||
| 398 | + confirmButtonText: '确定删除', | ||
| 399 | + cancelButtonText: '取消', | ||
| 400 | + type: 'warning' | ||
| 401 | + } | ||
| 402 | + ).then(() => { | ||
| 403 | + this.yard_loading.delLoading = true; | ||
| 404 | + deleteYard(row).then((response) => { | ||
| 405 | + let res = response.data; | ||
| 406 | + if (res.code !== '200') { | ||
| 407 | + this.yard_loading.delLoading = false; | ||
| 408 | + return this.$message.error(res.msg); | ||
| 409 | + } | ||
| 410 | + this.yard_loading.delLoading = false; | ||
| 411 | + this.$message.success(res.msg); | ||
| 412 | + this.yard_getList(); | ||
| 413 | + }).catch(error => { | ||
| 414 | + this.yard_loading.delLoading = false; | ||
| 415 | + this.$message.error(error.toString()); | ||
| 416 | + }); | ||
| 417 | + }).catch(() => { | ||
| 418 | + }); | ||
| 419 | + }, | ||
| 420 | + }, | ||
| 421 | + } | ||
| 422 | +</script> | ||
| 423 | + | ||
| 424 | +<style scoped> | ||
| 425 | + | ||
| 426 | +</style> |
-
请 注册 或 登录 后发表评论