作者 小范

仓库场站管理新增2界面+更新

@@ -14,6 +14,8 @@ let baseUrl5 = 'wms-server-warehouse/wms/area/' @@ -14,6 +14,8 @@ let baseUrl5 = 'wms-server-warehouse/wms/area/'
14 //场站管理 14 //场站管理
15 export const selectStations = params => { return axios.get(`${baseUrl}/selectStations`, { params: params }); }; 15 export const selectStations = params => { return axios.get(`${baseUrl}/selectStations`, { params: params }); };
16 16
  17 +export const selectStationList = params => { return axios.get(`${baseUrl}/selectStationList`, { params: params }); };
  18 +
17 export const delStation = params => { return axios.get(`${baseUrl}/delStation`, { params: params }); }; 19 export const delStation = params => { return axios.get(`${baseUrl}/delStation`, { params: params }); };
18 20
19 export const addStation = params => { return http.post(`${baseUrl}/addStation`,params)}; 21 export const addStation = params => { return http.post(`${baseUrl}/addStation`,params)};
  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.areano" 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="areano"
  32 + label="库区编号"
  33 + width="160">
  34 + </el-table-column>
  35 + <el-table-column
  36 + prop="stationname"
  37 + label="库区名称"
  38 + width="160">
  39 + </el-table-column>
  40 + <el-table-column
  41 + prop="houseid"
  42 + label="所属仓库"
  43 + width="240">
  44 + </el-table-column>
  45 + <el-table-column
  46 + prop="length"
  47 + label="库区长度"
  48 + width="120">
  49 + </el-table-column>
  50 + <el-table-column
  51 + prop="width"
  52 + label="库区宽度"
  53 + width="160">
  54 + </el-table-column>
  55 + <el-table-column
  56 + prop="areanum"
  57 + label="库区面积"
  58 + width="80">
  59 + </el-table-column>
  60 + <el-table-column
  61 + prop="areavol"
  62 + label="库区体积"
  63 + width="160">
  64 + </el-table-column>
  65 + <el-table-column
  66 + prop=" owner"
  67 + label="分配货主"
  68 + width="160">
  69 + </el-table-column>
  70 + <el-table-column
  71 + prop="surpluslocation"
  72 + label="剩余库位"
  73 + width="240">
  74 + </el-table-column>
  75 + <el-table-column
  76 + prop="totallocation"
  77 + label="占用库位"
  78 + width="120">
  79 + </el-table-column>
  80 + <el-table-column
  81 + prop="xstart"
  82 + label="库区X起始位"
  83 + width="160">
  84 + </el-table-column>
  85 + <el-table-column
  86 + prop="xend"
  87 + label="库区X结束位"
  88 + width="80">
  89 + </el-table-column>
  90 + <el-table-column
  91 + prop="ystart"
  92 + label="库区Y起始位"
  93 + width="160">
  94 + </el-table-column>
  95 + <el-table-column
  96 + prop="yend"
  97 + label="库区Y结束位"
  98 + width="80">
  99 + </el-table-column>
  100 + <el-table-column
  101 + prop="zstart"
  102 + label="库区Z起始位"
  103 + width="160">
  104 + </el-table-column>
  105 + <el-table-column
  106 + prop="zend"
  107 + label="库区Z结束位"
  108 + width="80">
  109 + </el-table-column>
  110 + <el-table-column
  111 + fixed="right"
  112 + label="操作">
  113 + <template slot-scope="scope">
  114 + <el-button type="success" size="mini" @click="applyEdit(scope.row)">编辑</el-button>
  115 + <el-button type="danger" size="mini" @click="applyDel(scope.$index,scope.row)">删除</el-button>
  116 + </template>
  117 + </el-table-column>
  118 + </el-table>
  119 + </template>
  120 + </el-row>
  121 + <el-row style="margin-top: 10px" class="toolbar">
  122 + <el-pagination
  123 + @size-change="handleSizeChange"
  124 + @current-change="handleCurrentChange"
  125 + :current-page="queryInfo.pageNum"
  126 + :page-size="queryInfo.pageSize"
  127 + :page-sizes="[10, 50, 100, 500]"
  128 + layout="total, sizes, prev, pager, next, jumper"
  129 + :total="total">
  130 + </el-pagination>
  131 + </el-row>
  132 + <el-row>
  133 + <el-dialog :title="dialogMap[dialogApply]" :visible.sync="apply_dialog.addDialog" width="80%" >
  134 + <el-form :model="addForm" :rules="rules" ref="addForm" style="margin-top: 40px">
  135 + <el-row>
  136 + <el-col :span="7">
  137 + <el-form-item label="" :label-width="formLabelWidth" prop="areano">
  138 + <el-input v-model="addForm.areano" autocomplete="off" size="small" style="width: 300px">
  139 + <template slot="prepend">库区编号</template>
  140 + </el-input>
  141 + </el-form-item>
  142 + </el-col>
  143 + <el-col :span="8">
  144 + <el-form-item label="" :label-width="formLabelWidth" prop="areaname">
  145 + <el-input v-model="addForm.areaname" autocomplete="off" size="small" style="width: 300px">
  146 + <template slot="prepend">库区名称</template>
  147 + </el-input>
  148 + </el-form-item>
  149 + </el-col>
  150 + <el-col :span="8">
  151 + <el-form-item label="" :label-width="formLabelWidth" prop="houseid">
  152 + <el-input v-model="addForm.houseid" autocomplete="off" size="small" style="width: 300px">
  153 + <template slot="prepend">所属仓库</template>
  154 + </el-input>
  155 + </el-form-item>
  156 + </el-col>
  157 + </el-row>
  158 + <el-row>
  159 + <el-col :span="7">
  160 + <el-form-item label="" :label-width="formLabelWidth" prop="length">
  161 + <el-input v-model="addForm.length" autocomplete="off" size="small" style="width: 300px">
  162 + <template slot="prepend">库区长度</template>
  163 + </el-input>
  164 + </el-form-item>
  165 + </el-col>
  166 + <el-col :span="8">
  167 + <el-form-item label="" :label-width="formLabelWidth" prop="width">
  168 + <el-input v-model="addForm.width" autocomplete="off" size="small" style="width: 300px">
  169 + <template slot="prepend">库区宽度</template>
  170 + </el-input>
  171 + </el-form-item>
  172 + </el-col>
  173 + <el-col :span="8">
  174 + <el-form-item label="" :label-width="formLabelWidth" prop="areanum">
  175 + <el-input v-model="addForm.areanum" autocomplete="off" size="small" style="width: 300px">
  176 + <template slot="prepend">库区面积</template>
  177 + </el-input>
  178 + </el-form-item>
  179 + </el-col>
  180 + </el-row>
  181 + <el-row>
  182 + <el-col :span="7">
  183 + <el-form-item label="" :label-width="formLabelWidth" prop="areavol">
  184 + <el-input v-model="addForm.areavol" autocomplete="off" size="small" style="width: 300px">
  185 + <template slot="prepend">库区体积</template>
  186 + </el-input>
  187 + </el-form-item>
  188 + </el-col>
  189 + <el-col :span="8">
  190 + <el-form-item label="" :label-width="formLabelWidth" prop="owner">
  191 + <el-input v-model="addForm.owner" autocomplete="off" size="small" style="width: 300px">
  192 + <template slot="prepend">分配货主</template>
  193 + </el-input>
  194 + </el-form-item>
  195 + </el-col>
  196 + <el-col :span="8">
  197 + <el-form-item label="" :label-width="formLabelWidth" prop="surpluslocation">
  198 + <el-input v-model="addForm.surpluslocation" autocomplete="off" size="small" style="width: 300px">
  199 + <template slot="prepend">剩余库位</template>
  200 + </el-input>
  201 + </el-form-item>
  202 + </el-col>
  203 + </el-row>
  204 + <el-row>
  205 + <el-col :span="7">
  206 + <el-form-item label="" :label-width="formLabelWidth" prop="totallocation">
  207 + <el-input v-model="addForm.totallocation" autocomplete="off" size="small" style="width: 300px">
  208 + <template slot="prepend">占用库位</template>
  209 + </el-input>
  210 + </el-form-item>
  211 + </el-col>
  212 + <el-col :span="8">
  213 + <el-form-item label="" :label-width="formLabelWidth" prop="xstart">
  214 + <el-input v-model="addForm.xstart" autocomplete="off" size="small" style="width: 300px">
  215 + <template slot="prepend">库区X起始位</template>
  216 + </el-input>
  217 + </el-form-item>
  218 + </el-col>
  219 + <el-col :span="8">
  220 + <el-form-item label="" :label-width="formLabelWidth" prop="xend">
  221 + <el-input v-model="addForm.xend" autocomplete="off" size="small" style="width: 300px">
  222 + <template slot="prepend">库区X结束位</template>
  223 + </el-input>
  224 + </el-form-item>
  225 + </el-col>
  226 + </el-row>
  227 + <el-row>
  228 + <el-col :span="7">
  229 + <el-form-item label="" :label-width="formLabelWidth" prop="ystart">
  230 + <el-input v-model="addForm.ystart" autocomplete="off" size="small" style="width: 300px">
  231 + <template slot="prepend">库区Y起始位</template>
  232 + </el-input>
  233 + </el-form-item>
  234 + </el-col>
  235 + <el-col :span="8">
  236 + <el-form-item label="" :label-width="formLabelWidth" prop="yend">
  237 + <el-input v-model="addForm.yend" autocomplete="off" size="small" style="width: 300px">
  238 + <template slot="prepend">库区Y结束位</template>
  239 + </el-input>
  240 + </el-form-item>
  241 + </el-col>
  242 + <el-col :span="8">
  243 + <el-form-item label="" :label-width="formLabelWidth" prop="zstart">
  244 + <el-input v-model="addForm.zstart" autocomplete="off" size="small" style="width: 300px">
  245 + <template slot="prepend">库区Z起始位</template>
  246 + </el-input>
  247 + </el-form-item>
  248 + </el-col>
  249 + </el-row>
  250 + <el-row>
  251 + <el-col :span="7">
  252 + <el-form-item label="" :label-width="formLabelWidth" prop="zend">
  253 + <el-input v-model="addForm.zend" autocomplete="off" size="small" style="width: 300px">
  254 + <template slot="prepend">库区Z结束位</template>
  255 + </el-input>
  256 + </el-form-item>
  257 + </el-col>
  258 + </el-row>
  259 + </el-form>
  260 + <div slot="footer" class="dialog-footer">
  261 + <el-button @click="apply_dialog.addDialog = false" size="small">取 消</el-button>
  262 + <el-button type="primary" @click="dialogApply==='create'?add():edit()" size="small">提 交</el-button>
  263 + </div>
  264 + </el-dialog>
  265 + </el-row>
  266 + </el-card>
  267 + </el-row>
  268 +</template>
  269 +
  270 +<script>
  271 + import {selectAreas,delArea,addArea,ediArea} from '../../api/consigner/station';
  272 +
  273 + export default {
  274 + name: "area",
  275 + data() {
  276 + return {
  277 + queryInfo: {
  278 + areano:'',
  279 + // 当前页数
  280 + pageNum: 1,
  281 + // 每页大小
  282 + pageSize: 10,
  283 + },
  284 + total: 0,
  285 + tableData:[],
  286 + dialogMap: {
  287 + update: '编辑',
  288 + create: '新增'
  289 + },
  290 + dialogApply: 'create',
  291 + apply_dialog: {
  292 + // 添加对话框
  293 + addDialog: false,
  294 + // 编辑对话框
  295 + editDialog: false
  296 + },
  297 + addForm: {
  298 + areaname: '',
  299 + areano: '',
  300 + areanum: '',
  301 + areavol: '',
  302 + houseid: '',
  303 + length: '',
  304 + owner: '',
  305 + surpluslocation: '',
  306 + totallocation: '',
  307 + width: '',
  308 + xend: '',
  309 + xstart: '',
  310 + yend: '',
  311 + ystart: '',
  312 + zend: '',
  313 + zstart: '',
  314 + remark:'',
  315 + remark1:'',
  316 + remark2:'',
  317 + remark3:'',
  318 + remark4:'',
  319 + },
  320 + formLabelWidth: '120px',
  321 + rules: {
  322 + userName: [
  323 + // { required: true, message: '请输入申请人', trigger: 'blur' },
  324 + // // { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
  325 + // ],
  326 + // applyTime: [
  327 + // { required: true, message: '请选择时间', trigger: 'change' }
  328 + // ],
  329 + // needCount: [
  330 + // { required: true, message: '请输入需要车辆数量', trigger: 'blur' },
  331 + // ],
  332 + // orginStation: [
  333 + // { required: true, message: '请输入起始场站', trigger: 'blur' },
  334 + // ],
  335 + // endStation: [
  336 + // { required: true, message: '请输入目的场站', trigger: 'blur' },
  337 + // ],
  338 + ],
  339 + },
  340 + }
  341 + },
  342 + methods: {
  343 + handleSizeChange(val) {
  344 + this.queryInfo.pageSize = val
  345 + this.getList()
  346 + },
  347 + handleCurrentChange(val) {
  348 + this.queryInfo.pageNum = val
  349 + this.getList()
  350 + },
  351 + getList() {
  352 + const _this = this
  353 + selectAreas(this.queryInfo).then((response) => {
  354 + const res = response.data
  355 + console.log(response.data)
  356 + if (res.code !== '200') {
  357 + return _this.$message.error('获取消息收发记录,失败!')
  358 + }
  359 + // 获取列表数据
  360 + _this.tableData = res.data.list
  361 + // 获取列表的总记录数
  362 + _this.total = res.data.total
  363 + _this.$message.success('获取消息收发记录,成功!')
  364 + }).catch(error => {
  365 + // 关闭加载
  366 + _this.$message.error(error.toString())
  367 + })
  368 + },
  369 + // 添加对话框,打开事件
  370 + applyAdd() {
  371 + this.addForm = {
  372 + areaname: '',
  373 + areano: '',
  374 + areanum: '',
  375 + areavol: '',
  376 + houseid: '',
  377 + length: '',
  378 + owner: '',
  379 + surpluslocation: '',
  380 + totallocation: '',
  381 + width: '',
  382 + xend: '',
  383 + xstart: '',
  384 + yend: '',
  385 + ystart: '',
  386 + zend: '',
  387 + zstart: '',
  388 + remark:'',
  389 + remark1:'',
  390 + remark2:'',
  391 + remark3:'',
  392 + remark4:'',
  393 + };
  394 + this.dialogApply= 'create';
  395 + this.apply_dialog.addDialog = true;
  396 + },
  397 + // 添加功能
  398 + add() {
  399 + this.$refs.addForm.validate(valid => {
  400 + // 未通过,表单预校验
  401 + if (!valid) return;
  402 + addArea(this.addForm).then((response) => {
  403 + let res = response.data;
  404 + // 添加失败
  405 + if (res.code !== '200') {
  406 + return this.$message.error(res.msg);
  407 + }
  408 + // 添加,成功
  409 + this.$message.success(res.msg);
  410 + // 隐藏对话框
  411 + this.apply_dialog.addDialog = false;
  412 + // 刷新列表
  413 + this.getList();
  414 + }).catch(error => {
  415 + this.$message.error(error.toString());
  416 + });
  417 + })
  418 + },
  419 +// 打开编辑
  420 + applyEdit(row) {
  421 + this.apply_dialog.addDialog = true;
  422 + this.dialogApply = 'update';
  423 + this.addForm=row;
  424 + },
  425 + // 编辑功能
  426 + edit() {
  427 + // 进行表单的预验证
  428 + this.$refs.addForm.validate(valid => {
  429 + // 未通过,表单预校验
  430 + if (!valid) return
  431 + ediArea(this.addForm).then((response) => {
  432 + // console.log(row)
  433 + const res = response.data
  434 + if (res.code != '200') {
  435 + return this.$message.error(res.msg)
  436 + }
  437 + this.$message.success(res.msg)
  438 + // 隐藏对话框
  439 + this.apply_dialog.addDialog = false
  440 + // 刷新列表
  441 + this.getList()
  442 + }).catch(error => {
  443 + this.$message.error(error.toString())
  444 + })
  445 + })
  446 + },
  447 + // 删除
  448 + applyDel(index, row) {
  449 + // 弹框询问是否删除?
  450 + this.$confirm('此操作永久删除该消息收发记录, 是否继续?', '警告', {
  451 + confirmButtonText: '确定删除',
  452 + cancelButtonText: '取消',
  453 + type: 'warning'
  454 + }
  455 + ).then(() => {
  456 + // console.log(row);
  457 + delArea({areano:row.areano}).then((response) => {
  458 + // console.log(row)
  459 + const res = response.data
  460 + this.$message.success(res.msg)
  461 + this.getList()
  462 + }).catch(error => {
  463 + this.$message.error(res.msg)
  464 + })
  465 + }).catch(() => {
  466 + })
  467 + },
  468 + },
  469 + mounted() {
  470 + this.getList();
  471 + // this.getYardList();
  472 +
  473 + }
  474 +
  475 + }
  476 +</script>
  477 +
  478 +<style scoped>
  479 + .toolbar{
  480 + height: 60px;
  481 + background-color: white;
  482 + /*line-height: 60px;*/
  483 + vertical-align: middle;
  484 + border-radius: 5px 5px 5px 5px;
  485 + padding: 15px 0 0 20px;
  486 + box-shadow: 0px 5px 5px #e5e8eb;
  487 + }
  488 +</style>
  489 +
  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">重&emsp;&emsp;量</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">体&emsp;&emsp;积</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">件&emsp;&emsp;数</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">库&emsp;&emsp;区</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">库&emsp;&emsp;位</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">流水&emsp;号</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">状&emsp;&emsp;态</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 {selectInventorys,delInventroy,addInventory,ediInventroy} from '../../api/consigner/station';
  339 +
  340 + export default {
  341 + name: "inventroy",
  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 + selectInventorys(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 + addInventory(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 + ediInventroy(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 + delInventroy({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 +
  568 +
@@ -369,7 +369,7 @@ @@ -369,7 +369,7 @@
369 } 369 }
370 ).then(() => { 370 ).then(() => {
371 // console.log(row); 371 // console.log(row);
372 - delLocation({areaid:row.areaid}).then((response) => { 372 + delLocation({locationno:row.locationno}).then((response) => {
373 // console.log(row) 373 // console.log(row)
374 const res = response.data 374 const res = response.data
375 this.$message.success(res.msg) 375 this.$message.success(res.msg)
@@ -9,11 +9,14 @@ @@ -9,11 +9,14 @@
9 <template slot="prepend">场站编号</template> 9 <template slot="prepend">场站编号</template>
10 </el-input> 10 </el-input>
11 </el-col> 11 </el-col>
12 - <el-col :span="6"> 12 + <el-col :span="9">
13 <el-button type="primary" icon="el-icon-search" size="small" @click="getList()"> 13 <el-button type="primary" icon="el-icon-search" size="small" @click="getList()">
14 查询 14 查询
15 </el-button> 15 </el-button>
16 <el-button type="success" icon="el-icon-edit" size="small" @click="applyAdd()">新增</el-button> 16 <el-button type="success" icon="el-icon-edit" size="small" @click="applyAdd()">新增</el-button>
  17 + <el-button type="primary" icon="el-icon-search" size="small" @click="getStationList()">
  18 + 查询所有
  19 + </el-button>
17 </el-col> 20 </el-col>
18 </el-row> 21 </el-row>
19 <!-- 列表区域--> 22 <!-- 列表区域-->
@@ -142,7 +145,7 @@ @@ -142,7 +145,7 @@
142 </template> 145 </template>
143 146
144 <script> 147 <script>
145 - import {selectStations,delStation,addStation,ediStation} from '../../api/consigner/station'; 148 + import {selectStations,delStation,addStation,ediStation,selectStationList} from '../../api/consigner/station';
146 149
147 export default { 150 export default {
148 name: "station", 151 name: "station",
@@ -229,6 +232,24 @@ @@ -229,6 +232,24 @@
229 _this.$message.error(error.toString()) 232 _this.$message.error(error.toString())
230 }) 233 })
231 }, 234 },
  235 + getStationList() {
  236 + const _this = this
  237 + selectStationList(this.queryInfo).then((response) => {
  238 + const res = response.data
  239 + console.log(response.data)
  240 + if (res.code !== '200') {
  241 + return _this.$message.error('获取消息收发记录,失败!')
  242 + }
  243 + // 获取列表数据
  244 + _this.tableData = res.data.list
  245 + // 获取列表的总记录数
  246 + _this.total = res.data.total
  247 + _this.$message.success('获取消息收发记录,成功!')
  248 + }).catch(error => {
  249 + // 关闭加载
  250 + _this.$message.error(error.toString())
  251 + })
  252 + },
232 // 添加对话框,打开事件 253 // 添加对话框,打开事件
233 applyAdd() { 254 applyAdd() {
234 this.addForm = { 255 this.addForm = {