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