作者 小范

新增仓库场站管理4个界面

... ... @@ -3,7 +3,15 @@ import http from "../http";
let baseUrl = 'wms-server-warehouse/wms/station/'
let baseUrl1 = 'wms-server-warehouse/wms/house/'
let baseUrl2 = 'wms-server-warehouse/wms/inventroyrecord/'
let baseUrl3 = 'wms-server-warehouse/wms/location/'
let baseUrl4 = 'wms-server-warehouse/wms/inventroy/'
let baseUrl5 = 'wms-server-warehouse/wms/area/'
//场站管理
export const selectStations = params => { return axios.get(`${baseUrl}/selectStations`, { params: params }); };
export const delStation = params => { return axios.get(`${baseUrl}/delStation`, { params: params }); };
... ... @@ -11,3 +19,43 @@ export const delStation = params => { return axios.get(`${baseUrl}/delStation`,
export const addStation = params => { return http.post(`${baseUrl}/addStation`,params)};
export const ediStation = params => { return http.post(`${baseUrl}/ediStation`,params)};
//仓库管理
export const selectHouses = params => { return axios.get(`${baseUrl1}/selectHouses`, { params: params }); };
export const delHouse = params => { return axios.get(`${baseUrl1}/delHouse`, { params: params }); };
export const addHouse = params => { return http.post(`${baseUrl1}/addHouse`,params)};
export const ediHouse = params => { return http.post(`${baseUrl1}/ediHouse`,params)};
//库存变更记录
export const selectInventroyrecords = params => { return axios.get(`${baseUrl2}/selectInventroyrecords`, { params: params }); };
export const delInventoryrecord = params => { return axios.get(`${baseUrl2}/delInventoryrecord`, { params: params }); };
export const addInventoryrecord = params => { return http.post(`${baseUrl2}/addInventoryrecord`,params)};
export const ediInventroyrecord = params => { return http.post(`${baseUrl2}/ediInventroyrecord`,params)};
//库位管理
export const selectLocations = params => { return axios.get(`${baseUrl3}/selectLocations`, { params: params }); };
export const delLocation = params => { return axios.get(`${baseUrl3}/delLocation`, { params: params }); };
export const addLocation = params => { return http.post(`${baseUrl3}/addLocation`,params)};
export const ediLocation = params => { return http.post(`${baseUrl3}/ediLocation`,params)};
//库存管理
export const selectInventorys = params => { return axios.get(`${baseUrl4}/selectInventorys`, { params: params }); };
export const delInventroy = params => { return axios.get(`${baseUrl4}/delInventroy`, { params: params }); };
export const addInventory = params => { return http.post(`${baseUrl4}/addInventory`,params)};
export const ediInventroy = params => { return http.post(`${baseUrl4}/ediInventroy`,params)};
//库区管理
export const selectAreas = params => { return axios.get(`${baseUrl5}/selectAreas`, { params: params }); };
export const delArea = params => { return axios.get(`${baseUrl5}/delArea`, { params: params }); };
export const addArea = params => { return http.post(`${baseUrl5}/addArea`,params)};
export const ediArea = params => { return http.post(`${baseUrl5}/ediArea`,params)};
... ...
... ... @@ -108,9 +108,13 @@ import task from './views/technological/task.vue'
import myTask from './views/technological/myTask.vue'
import definition from './views/technological/definition.vue'
//部署管理
//仓库场站管理
import station from './views/deploy/station.vue'
import house from './views/deploy/house.vue'
import inventroyrecord from './views/deploy/inventroyrecord.vue'
import locations from './views/deploy/locations.vue'
import inventroy from './views/deploy/inventroy.vue'
import area from './views/deploy/area.vue'
import departure from './views/airtransport/departure.vue'
... ... @@ -522,9 +526,12 @@ let routes = [
name: '仓库场站管理',
iconCls:'el-icon-goods',
children:[
{path:'/station',component:station,name:'仓库管理'},
{path:'/station',component:station,name:'场站管理'},
{path:'/house',component:house,name:'仓库管理'},
{path:'/inventroyrecord',component:inventroyrecord,name:'库存变更记录'},
{path:'/locations',component:locations,name:'库位管理'},
{path:'/inventroy',component:inventroy,name:'库存管理'},
{path:'/area',component:area,name:'库区管理'},
]
},
{
... ...
<template>
<el-row>
<el-card style="background-color: #F5F7FA">
<!-- 搜索区域-->
<el-row :gutter="10" class="toolbar">
<el-col :span="7">
<el-input v-model="queryInfo.houseid" prefix-icon="el-icon-search" size="small" style="width: 280px"
placeholder="仓库编号" clearable>
<template slot="prepend">仓库编号</template>
</el-input>
</el-col>
<el-col :span="7">
<el-input v-model="queryInfo.housename" prefix-icon="el-icon-search" size="small" style="width: 280px"
placeholder="场站编号" clearable>
<template slot="prepend">仓库名称</template>
</el-input>
</el-col>
<el-col :span="6">
<el-button type="primary" icon="el-icon-search" size="small" @click="getList()">
查询
</el-button>
<el-button type="success" icon="el-icon-edit" size="small" @click="applyAdd()">新增</el-button>
</el-col>
</el-row>
<!-- 列表区域-->
<el-row>
<template>
<el-table
:data="tableData"
border
:cell-style="{textAlign:'center'}"
style="border-radius: 10px 10px 0px 0px;line-height: 25px"
:header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" size="small"
>
<el-table-column
fixed
prop="houseid"
label="仓库编号"
width="160">
</el-table-column>
<el-table-column
prop="housename"
label="仓库名称"
width="160">
</el-table-column>
<el-table-column
prop="houseadr"
label="仓库地址"
width="160">
</el-table-column>
<el-table-column
prop="houseuser"
label="仓库负责人名称"
width="240">
</el-table-column>
<el-table-column
prop="housetype"
label="仓库类型"
width="120">
</el-table-column>
<el-table-column
prop="ismeta"
label="是否虚拟仓库"
width="160">
</el-table-column>
<el-table-column
fixed
prop="length"
label="仓库长度"
width="160">
</el-table-column>
<el-table-column
prop="width"
label="仓库宽度"
width="160">
</el-table-column>
<el-table-column
prop="height"
label="仓库高度"
width="240">
</el-table-column>
<el-table-column
prop="area"
label="仓库面积"
width="120">
</el-table-column>
<el-table-column
prop="vol"
label="仓库体积"
width="160">
</el-table-column>
<el-table-column
prop="stationid"
label="场站id"
width="80">
<template slot-scope="scope">
<span v-if="scope.row.stationid ==='0'">否</span>
<span v-if="scope.row.stationid ==='1'">是</span>
</template>
</el-table-column>
<el-table-column
prop="remark"
label="备注"
width="80">
</el-table-column>
<el-table-column
fixed="right"
label="操作">
<template slot-scope="scope">
<el-button type="success" size="mini" @click="applyEdit(scope.row)">编辑</el-button>
<el-button type="danger" size="mini" @click="applyDel(scope.$index,scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</template>
</el-row>
<el-row style="margin-top: 10px" class="toolbar">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="queryInfo.pageNum"
:page-size="queryInfo.pageSize"
:page-sizes="[10, 50, 100, 500]"
layout="total, sizes, prev, pager, next, jumper"
:total="total">
</el-pagination>
</el-row>
<el-row>
<el-dialog :title="dialogMap[dialogApply]" :visible.sync="apply_dialog.addDialog" width="70%" >
<el-form :model="addForm" :rules="rules" ref="addForm" style="margin-top: 40px">
<el-row>
<el-col :span="9">
<el-form-item label="" :label-width="formLabelWidth" prop="houseid">
<el-input v-model="addForm.houseid" autocomplete="off" size="small" style="width: 260px">
<template slot="prepend">仓库编号</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="" :label-width="formLabelWidth" prop="housename">
<el-input v-model="addForm.housename" autocomplete="off" size="small" style="width: 260px">
<template slot="prepend">仓库名称</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="9">
<el-form-item label="" :label-width="formLabelWidth" prop="houseadr">
<el-input v-model="addForm.houseadr" autocomplete="off" size="small" style="width: 260px">
<template slot="prepend">仓库地址</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="" :label-width="formLabelWidth" prop="houseuser">
<el-input v-model="addForm.houseuser" autocomplete="off" size="small" style="width: 260px">
<template slot="prepend">负责人名称</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="9">
<el-form-item label="" :label-width="formLabelWidth" prop="housetype">
<el-input v-model="addForm.housetype" autocomplete="off" size="small" style="width: 260px">
<template slot="prepend">仓库类型</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="" :label-width="formLabelWidth" prop="stationid">
<el-input v-model="addForm.stationid" autocomplete="off" size="small" style="width: 260px">
<template slot="prepend">场站&emsp;id</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="9">
<el-form-item label="" :label-width="formLabelWidth" prop="length">
<el-input v-model="addForm.length" autocomplete="off" size="small" style="width: 260px">
<template slot="prepend">仓库长度</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="" :label-width="formLabelWidth" prop="width">
<el-input v-model="addForm.width" autocomplete="off" size="small" style="width: 260px">
<template slot="prepend">仓库宽度</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="9">
<el-form-item label="" :label-width="formLabelWidth" prop="height">
<el-input v-model="addForm.height" autocomplete="off" size="small" style="width: 260px">
<template slot="prepend">仓库高度</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="" :label-width="formLabelWidth" prop="area">
<el-input v-model="addForm.area" autocomplete="off" size="small" style="width: 260px">
<template slot="prepend">仓库面积</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="9">
<el-form-item label="" :label-width="formLabelWidth" prop="vol">
<el-input v-model="addForm.vol" autocomplete="off" size="small" style="width: 260px">
<template slot="prepend">仓库体积</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="" :label-width="formLabelWidth" prop="ismeta">
<el-select v-model="addForm.ismeta" placeholder="请选择是否虚拟仓库" size="mini" style="width: 260px">
<el-option label="否" value="0"></el-option>
<el-option label="是" value="1"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<!-- <el-row>-->
<!-- <el-col :span="9">-->
<!-- <el-form-item label="" :label-width="formLabelWidth" prop="remark">-->
<!-- <el-input v-model="addForm.remark" autocomplete="off" size="small" style="width: 260px">-->
<!-- <template slot="prepend">备&emsp;&emsp;注</template>-->
<!-- </el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="apply_dialog.addDialog = false" size="small">取 消</el-button>
<el-button type="primary" @click="dialogApply==='create'?add():edit()" size="small">提 交</el-button>
</div>
</el-dialog>
</el-row>
</el-card>
</el-row>
</template>
<script>
import {selectHouses,delHouse,addHouse,ediHouse} from '../../api/consigner/station';
export default {
name: "house",
data() {
return {
queryInfo: {
houseid:'',
housename:'',
// 当前页数
pageNum: 1,
// 每页大小
pageSize: 10,
},
total: 0,
tableData:[],
dialogMap: {
update: '编辑',
create: '新增'
},
dialogApply: 'create',
apply_dialog: {
// 添加对话框
addDialog: false,
// 编辑对话框
editDialog: false
},
addForm: {
houseid: '',
housename: '',
houseadr: '',
houseuser: '',
housetype: '',
ismeta: '',
length: '',
width: '',
height: '',
area: '',
vol: '',
stationid: '',
remark:'',
remark1:'',
remark2:'',
remark3:''
},
formLabelWidth: '220px',
rules: {
userName: [
// { required: true, message: '请输入申请人', trigger: 'blur' },
// // { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
// ],
// applyTime: [
// { required: true, message: '请选择时间', trigger: 'change' }
// ],
// needCount: [
// { required: true, message: '请输入需要车辆数量', trigger: 'blur' },
// ],
// orginStation: [
// { required: true, message: '请输入起始场站', trigger: 'blur' },
// ],
// endStation: [
// { required: true, message: '请输入目的场站', trigger: 'blur' },
// ], { required: true, message: '请选择申请状态', trigger: 'change' }
],
},
}
},
methods: {
handleSizeChange(val) {
this.queryInfo.pageSize = val
this.getList()
},
handleCurrentChange(val) {
this.queryInfo.pageNum = val
this.getList()
},
getList() {
const _this = this
selectHouses(this.queryInfo).then((response) => {
const res = response.data
console.log(response.data)
if (res.code !== '200') {
return _this.$message.error('获取消息收发记录,失败!')
}
// 获取列表数据
_this.tableData = res.data.list
// 获取列表的总记录数
_this.total = res.data.total
_this.$message.success('获取消息收发记录,成功!')
}).catch(error => {
// 关闭加载
_this.$message.error(error.toString())
})
},
// 添加对话框,打开事件
applyAdd() {
this.addForm = {
houseid: '',
housename: '',
houseadr: '',
houseuser: '',
housetype: '',
ismeta: '',
length: '',
width: '',
height: '',
area: '',
vol: '',
stationid: '',
remark:'',
remark1:'',
remark2:'',
remark3:''
};
this.dialogApply= 'create';
this.apply_dialog.addDialog = true;
},
// 添加功能
add() {
this.$refs.addForm.validate(valid => {
// 未通过,表单预校验
if (!valid) return;
addHouse(this.addForm).then((response) => {
let res = response.data;
// 添加失败
if (res.code !== '200') {
return this.$message.error(res.msg);
}
// 添加,成功
this.$message.success(res.msg);
// 隐藏对话框
this.apply_dialog.addDialog = false;
// 刷新列表
this.getList();
}).catch(error => {
this.$message.error(error.toString());
});
})
},
// 打开编辑
applyEdit(row) {
this.apply_dialog.addDialog = true;
this.dialogApply = 'update';
this.addForm=row;
},
// 编辑功能
edit() {
// 进行表单的预验证
this.$refs.addForm.validate(valid => {
// 未通过,表单预校验
if (!valid) return
ediHouse(this.addForm).then((response) => {
// console.log(row)
const res = response.data
if (res.code != '200') {
return this.$message.error(res.msg)
}
this.$message.success(res.msg)
// 隐藏对话框
this.apply_dialog.addDialog = false
// 刷新列表
this.getList()
}).catch(error => {
this.$message.error(error.toString())
})
})
},
// 删除
applyDel(index, row) {
// 弹框询问是否删除?
this.$confirm('此操作永久删除该消息收发记录, 是否继续?', '警告', {
confirmButtonText: '确定删除',
cancelButtonText: '取消',
type: 'warning'
}
).then(() => {
// console.log(row);
delHouse({houseid:row.houseid}).then((response) => {
// console.log(row)
const res = response.data
this.$message.success(res.msg)
this.getList()
}).catch(error => {
this.$message.error(res.msg)
})
}).catch(() => {
})
},
},
mounted() {
this.getList();
// this.getYardList();
}
}
</script>
<style scoped>
.toolbar{
height: 60px;
background-color: white;
/*line-height: 60px;*/
vertical-align: middle;
border-radius: 5px 5px 5px 5px;
padding: 15px 0 0 20px;
box-shadow: 0px 5px 5px #e5e8eb;
}
</style>
... ...
<template>
<el-row>
<el-card style="background-color: #F5F7FA">
<!-- 搜索区域-->
<el-row :gutter="10" class="toolbar">
<el-col :span="7">
<el-input v-model="queryInfo.waybill" prefix-icon="el-icon-search" size="small" style="width: 280px"
placeholder="货物单号" clearable>
<template slot="prepend">货物单号</template>
</el-input>
</el-col>
<el-col :span="6">
<el-button type="primary" icon="el-icon-search" size="small" @click="getList()">
查询
</el-button>
<el-button type="success" icon="el-icon-edit" size="small" @click="applyAdd()">新增</el-button>
</el-col>
</el-row>
<!-- 列表区域-->
<el-row>
<template>
<el-table
:data="tableData"
border
:cell-style="{textAlign:'center'}"
style="border-radius: 10px 10px 0px 0px;line-height: 25px"
:header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" size="small"
>
<el-table-column
fixed
prop="waybill"
label="货物单号"
width="120">
</el-table-column>
<el-table-column
prop="vol"
label="体积"
width="60">
</el-table-column>
<el-table-column
prop="weight"
label="重量"
width="60">
</el-table-column>
<el-table-column
prop="pcs"
label="件数"
width="60">
</el-table-column>
<el-table-column
prop="billweight"
label="计费重量"
width="70">
</el-table-column>
<el-table-column
prop="area"
label="库区"
width="60">
</el-table-column>
<el-table-column
prop="location"
label="库位"
width="60">
</el-table-column>
<el-table-column
prop="serialnumber"
label="流水号"
width="120">
</el-table-column>
<el-table-column
prop="station"
label="出入库场站"
width="100">
</el-table-column>
<el-table-column
prop="status"
label="状态"
width="80">
<template slot-scope="scope">
<span v-if="scope.row.status ==='0'">失败</span>
<span v-if="scope.row.status ==='1'">成功</span>
</template>
</el-table-column>
<el-table-column
prop="transcar"
label="运输车辆信息"
width="100">
</el-table-column>
<el-table-column
prop="transtype"
label="交易类型"
width="100">
</el-table-column>
<el-table-column
prop="custel"
label="出入库客户联系电话"
width="140">
</el-table-column>
<el-table-column
prop="customer"
label="出入库客户联系人姓名"
width="80">
</el-table-column>
<el-table-column
prop="customername"
label="出入库客户名称"
width="80">
</el-table-column>
<el-table-column
prop="goodstype"
label="出入库货物类型"
width="80">
</el-table-column>
<el-table-column
prop="house"
label="出入库仓库"
width="100">
</el-table-column>
<el-table-column
prop="ietype"
label="出入库类型"
width="60">
<template slot-scope="scope">
<span v-if="scope.row.ietype ==='I'">进</span>
<span v-if="scope.row.ietype ==='E'">出</span>
</template>
</el-table-column>
<el-table-column
prop="opter"
label="出入库经办人"
width="100">
</el-table-column>
<el-table-column
prop="opttime"
label="出入库时间"
width="140">
</el-table-column>
<el-table-column
fixed="right"
label="操作"
width="160">
<template slot-scope="scope">
<el-button type="success" size="mini" @click="applyEdit(scope.row)">编辑</el-button>
<el-button type="danger" size="mini" @click="applyDel(scope.$index,scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</template>
</el-row>
<el-row style="margin-top: 10px" class="toolbar">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="queryInfo.pageNum"
:page-size="queryInfo.pageSize"
:page-sizes="[10, 50, 100, 500]"
layout="total, sizes, prev, pager, next, jumper"
:total="total">
</el-pagination>
</el-row>
<el-row>
<el-dialog :title="dialogMap[dialogApply]" :visible.sync="apply_dialog.addDialog" width="80%" >
<el-form :model="addForm" :rules="rules" ref="addForm" style="margin-top: 40px">
<el-row>
<el-col :span="7">
<el-form-item label="" :label-width="formLabelWidth" prop="waybill">
<el-input v-model="addForm.waybill" autocomplete="off" size="small" style="width: 300px">
<template slot="prepend">货物单号</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="" :label-width="formLabelWidth" prop="weight">
<el-input v-model="addForm.weight" autocomplete="off" size="small" style="width: 300px">
<template slot="prepend">重&emsp;&emsp;量</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="" :label-width="formLabelWidth" prop="vol">
<el-input v-model="addForm.vol" autocomplete="off" size="small" style="width: 300px">
<template slot="prepend">体&emsp;&emsp;积</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7">
<el-form-item label="" :label-width="formLabelWidth" prop="pcs">
<el-input v-model="addForm.pcs" autocomplete="off" size="small" style="width: 300px">
<template slot="prepend">件&emsp;&emsp;数</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="" :label-width="formLabelWidth" prop="billweight">
<el-input v-model="addForm.billweight" autocomplete="off" size="small" style="width: 300px">
<template slot="prepend">计费重量</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="" :label-width="formLabelWidth" prop="area">
<el-input v-model="addForm.area" autocomplete="off" size="small" style="width: 300px">
<template slot="prepend">库&emsp;&emsp;区</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7">
<el-form-item label="" :label-width="formLabelWidth" prop="location">
<el-input v-model="addForm.location" autocomplete="off" size="small" style="width: 300px">
<template slot="prepend">库&emsp;&emsp;位</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="" :label-width="formLabelWidth" prop="serialnumber">
<el-input v-model="addForm.serialnumber" autocomplete="off" size="small" style="width: 300px">
<template slot="prepend">流水&emsp;号</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="" :label-width="formLabelWidth" prop="transtype">
<el-input v-model="addForm.transtype" autocomplete="off" size="small" style="width: 300px">
<template slot="prepend">交易类型</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7">
<el-form-item label="" :label-width="formLabelWidth" prop="house">
<el-input v-model="addForm.house" autocomplete="off" size="small" style="width: 300px">
<template slot="prepend">出入库仓库</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="" :label-width="formLabelWidth" prop="opttime">
<el-input v-model="addForm.opttime" autocomplete="off" size="small" style="width: 300px">
<template slot="prepend">出入库时间</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="" :label-width="formLabelWidth" prop="station">
<el-input v-model="addForm.station" autocomplete="off" size="small" style="width: 300px">
<template slot="prepend">出入库场站</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7">
<el-form-item label="" :label-width="formLabelWidth" prop="goodstype">
<el-input v-model="addForm.goodstype" autocomplete="off" size="small" style="width: 300px">
<template slot="prepend">出入库货物类型</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="" :label-width="formLabelWidth" prop="opter">
<el-input v-model="addForm.opter" autocomplete="off" size="small" style="width: 300px">
<template slot="prepend">出入库经办人</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="" :label-width="formLabelWidth" prop="customername">
<el-input v-model="addForm.customername" autocomplete="off" size="small" style="width: 300px">
<template slot="prepend">出入库客户名称</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7">
<el-form-item label="" :label-width="formLabelWidth" prop="transcar">
<el-input v-model="addForm.transcar" autocomplete="off" size="small" style="width: 300px">
<template slot="prepend">运输车辆信息</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="" :label-width="formLabelWidth" prop="ietype">
<el-select v-model="addForm.ietype" placeholder="出入库类型" size="mini" style="width: 300px">
<el-option label="出入库类型-进" value="I"></el-option>
<el-option label="出入库类型-出" value="E"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<!-- <el-form-item label="" :label-width="formLabelWidth" prop="status">-->
<!-- <el-input v-model="addForm.status" autocomplete="off" size="small" style="width: 300px">-->
<!-- <template slot="prepend">状&emsp;&emsp;态</template>-->
<!-- </el-input>-->
<!-- </el-form-item>-->
<el-form-item label="" :label-width="formLabelWidth" prop="status">
<el-select v-model="addForm.status" placeholder="请选择状态" size="mini" style="width: 300px">
<el-option label="状态-失败" value="0"></el-option>
<el-option label="状态-成功" value="1"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7">
<el-form-item label="" :label-width="formLabelWidth" prop="custel">
<el-input v-model="addForm.custel" autocomplete="off" size="small" style="width: 300px">
<template slot="prepend">出入库客户联系电话</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="" :label-width="formLabelWidth" prop="customer">
<el-input v-model="addForm.customer" autocomplete="off" size="small" style="width: 300px">
<template slot="prepend">出入库客户联系人姓名</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="apply_dialog.addDialog = false" size="small">取 消</el-button>
<el-button type="primary" @click="dialogApply==='create'?add():edit()" size="small">提 交</el-button>
</div>
</el-dialog>
</el-row>
</el-card>
</el-row>
</template>
<script>
import {selectInventroyrecords,delInventoryrecord,addInventoryrecord,ediInventroyrecord} from '../../api/consigner/station';
export default {
name: "inventroyrecord",
data() {
return {
queryInfo: {
waybill:'',
// 当前页数
pageNum: 1,
// 每页大小
pageSize: 10,
},
total: 0,
tableData:[],
dialogMap: {
update: '编辑',
create: '新增'
},
dialogApply: 'create',
apply_dialog: {
// 添加对话框
addDialog: false,
// 编辑对话框
editDialog: false
},
addForm: {
area: '',
billweight: '',
custel: '',
customer: '',
customername: '',
goodstype: '',
house:'',
ietype:'',
location:'',
opter:'',
opttime: '',
pcs: '',
serialnumber: '',
station: '',
status: '',
transcar: '',
transtype:'',
vol:'',
waybill:'',
weight:'',
remark:'',
remark1:'',
remark2:'',
remark3:'',
remark4:'',
remark5:'',
},
formLabelWidth: '80px',
rules: {
userName: [
// { required: true, message: '请输入申请人', trigger: 'blur' },
// // { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
// ],
// applyTime: [
// { required: true, message: '请选择时间', trigger: 'change' }
// ],
// needCount: [
// { required: true, message: '请输入需要车辆数量', trigger: 'blur' },
// ],
// orginStation: [
// { required: true, message: '请输入起始场站', trigger: 'blur' },
// ],
// endStation: [
// { required: true, message: '请输入目的场站', trigger: 'blur' },
// ],
],
},
}
},
methods: {
handleSizeChange(val) {
this.queryInfo.pageSize = val
this.getList()
},
handleCurrentChange(val) {
this.queryInfo.pageNum = val
this.getList()
},
getList() {
const _this = this
selectInventroyrecords(this.queryInfo).then((response) => {
const res = response.data
console.log(response.data)
if (res.code !== '200') {
return _this.$message.error('获取消息收发记录,失败!')
}
// 获取列表数据
_this.tableData = res.data.list
// 获取列表的总记录数
_this.total = res.data.total
_this.$message.success('获取消息收发记录,成功!')
}).catch(error => {
// 关闭加载
_this.$message.error(error.toString())
})
},
// 添加对话框,打开事件
applyAdd() {
this.addForm = {
area: '',
billweight: '',
custel: '',
customer: '',
customername: '',
goodstype: '',
house:'',
ietype:'',
location:'',
opter:'',
opttime: '',
pcs: '',
serialnumber: '',
station: '',
status: '',
transcar: '',
transtype:'',
vol:'',
waybill:'',
weight:'',
remark:'',
remark1:'',
remark2:'',
remark3:'',
remark4:'',
remark5:'',
uuid:''
};
this.dialogApply= 'create';
this.apply_dialog.addDialog = true;
},
// 添加功能
add() {
this.$refs.addForm.validate(valid => {
// 未通过,表单预校验
if (!valid) return;
addInventoryrecord(this.addForm).then((response) => {
let res = response.data;
// 添加失败
if (res.code !== '200') {
return this.$message.error(res.msg);
}
// 添加,成功
this.$message.success(res.msg);
// 隐藏对话框
this.apply_dialog.addDialog = false;
// 刷新列表
this.getList();
}).catch(error => {
this.$message.error(error.toString());
});
})
},
// 打开编辑
applyEdit(row) {
this.apply_dialog.addDialog = true;
this.dialogApply = 'update';
this.addForm=row;
},
// 编辑功能
edit() {
// 进行表单的预验证
this.$refs.addForm.validate(valid => {
// 未通过,表单预校验
if (!valid) return
ediInventroyrecord(this.addForm).then((response) => {
// console.log(row)
const res = response.data
if (res.code != '200') {
return this.$message.error(res.msg)
}
this.$message.success(res.msg)
// 隐藏对话框
this.apply_dialog.addDialog = false
// 刷新列表
this.getList()
}).catch(error => {
this.$message.error(error.toString())
})
})
},
// 删除
applyDel(index, row) {
// 弹框询问是否删除?
this.$confirm('此操作永久删除该消息收发记录, 是否继续?', '警告', {
confirmButtonText: '确定删除',
cancelButtonText: '取消',
type: 'warning'
}
).then(() => {
// console.log(row);
delInventoryrecord({uuid:row.uuid}).then((response) => {
// console.log(row)
const res = response.data
this.$message.success(res.msg)
this.getList()
}).catch(error => {
this.$message.error(res.msg)
})
}).catch(() => {
})
},
},
mounted() {
this.getList();
// this.getYardList();
}
}
</script>
<style scoped>
.toolbar{
height: 60px;
background-color: white;
/*line-height: 60px;*/
vertical-align: middle;
border-radius: 5px 5px 5px 5px;
padding: 15px 0 0 20px;
box-shadow: 0px 5px 5px #e5e8eb;
}
</style>
... ...
<template>
<el-row>
<el-card style="background-color: #F5F7FA">
<!-- 搜索区域-->
<el-row :gutter="10" class="toolbar">
<el-col :span="7">
<el-input v-model="queryInfo.locationno" prefix-icon="el-icon-search" size="small" style="width: 280px"
placeholder="库位编号" clearable>
<template slot="prepend">库位编号</template>
</el-input>
</el-col>
<el-col :span="6">
<el-button type="primary" icon="el-icon-search" size="small" @click="getList()">
查询
</el-button>
<el-button type="success" icon="el-icon-edit" size="small" @click="applyAdd()">新增</el-button>
</el-col>
</el-row>
<!-- 列表区域-->
<el-row>
<template>
<el-table
:data="tableData"
border
:cell-style="{textAlign:'center'}"
style="border-radius: 10px 10px 0px 0px;line-height: 25px"
:header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" size="small"
>
<el-table-column
fixed
prop="locationno"
label="库位编号"
width="160">
</el-table-column>
<el-table-column
prop="locationname"
label="库位名称"
width="160">
</el-table-column>
<el-table-column
prop="areaid"
label="所属库区"
width="160">
</el-table-column>
<el-table-column
prop="length"
label="库位长度"
width="240">
</el-table-column>
<el-table-column
prop="width"
label="库位宽度"
width="120">
</el-table-column>
<el-table-column
prop="heigth"
label="库位高度"
width="160">
</el-table-column>
<el-table-column
prop="area"
label="库位面积"
width="160">
</el-table-column>
<el-table-column
prop="vol"
label="库位体积"
width="160">
</el-table-column>
<el-table-column
prop="xyz"
label="库位xyz"
width="240">
</el-table-column>
<el-table-column
prop="autodist"
label="库位自动分配"
width="120">
</el-table-column>
<el-table-column
fixed="right"
label="操作">
<template slot-scope="scope">
<el-button type="success" size="mini" @click="applyEdit(scope.row)">编辑</el-button>
<el-button type="danger" size="mini" @click="applyDel(scope.$index,scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</template>
</el-row>
<el-row style="margin-top: 10px" class="toolbar">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="queryInfo.pageNum"
:page-size="queryInfo.pageSize"
:page-sizes="[10, 50, 100, 500]"
layout="total, sizes, prev, pager, next, jumper"
:total="total">
</el-pagination>
</el-row>
<el-row>
<el-dialog :title="dialogMap[dialogApply]" :visible.sync="apply_dialog.addDialog" width="70%" >
<el-form :model="addForm" :rules="rules" ref="addForm" style="margin-top: 40px">
<el-row>
<el-col :span="9">
<el-form-item label="" :label-width="formLabelWidth" prop="locationno">
<el-input v-model="addForm.locationno" autocomplete="off" size="small" style="width: 260px">
<template slot="prepend">库位编号</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="" :label-width="formLabelWidth" prop="locationname">
<el-input v-model="addForm.locationname" autocomplete="off" size="small" style="width: 260px">
<template slot="prepend">库位名称</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="9">
<el-form-item label="" :label-width="formLabelWidth" prop="areaid">
<el-input v-model="addForm.areaid" autocomplete="off" size="small" style="width: 260px">
<template slot="prepend">所属库区</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="" :label-width="formLabelWidth" prop="length">
<el-input v-model="addForm.length" autocomplete="off" size="small" style="width: 260px">
<template slot="prepend">库位长度</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="9">
<el-form-item label="" :label-width="formLabelWidth" prop="width">
<el-input v-model="addForm.width" autocomplete="off" size="small" style="width: 260px">
<template slot="prepend">库位宽度</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="" :label-width="formLabelWidth" prop="heigth">
<el-input v-model="addForm.heigth" autocomplete="off" size="small" style="width: 260px">
<template slot="prepend">库位高度</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="9">
<el-form-item label="" :label-width="formLabelWidth" prop="area">
<el-input v-model="addForm.area" autocomplete="off" size="small" style="width: 260px">
<template slot="prepend">库位面积</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="" :label-width="formLabelWidth" prop="vol">
<el-input v-model="addForm.vol" autocomplete="off" size="small" style="width: 260px">
<template slot="prepend">库位体积</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="9">
<el-form-item label="" :label-width="formLabelWidth" prop="xyz">
<el-input v-model="addForm.xyz" autocomplete="off" size="small" style="width: 260px">
<template slot="prepend">库位xyz</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="" :label-width="formLabelWidth" prop="autodist">
<el-input v-model="addForm.autodist" autocomplete="off" size="small" style="width: 260px">
<template slot="prepend">库位自动分配</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="apply_dialog.addDialog = false" size="small">取 消</el-button>
<el-button type="primary" @click="dialogApply==='create'?add():edit()" size="small">提 交</el-button>
</div>
</el-dialog>
</el-row>
</el-card>
</el-row>
</template>
<script>
import {selectLocations,delLocation,addLocation,ediLocation} from '../../api/consigner/station';
export default {
name: "locations",
data() {
return {
queryInfo: {
locationno:'',
housename:'',
// 当前页数
pageNum: 1,
// 每页大小
pageSize: 10,
},
total: 0,
tableData:[],
dialogMap: {
update: '编辑',
create: '新增'
},
dialogApply: 'create',
apply_dialog: {
// 添加对话框
addDialog: false,
// 编辑对话框
editDialog: false
},
addForm: {
area: '',
areaid: '',
autodist: '',
heigth: '',
length: '',
locationname: '',
locationno: '',
vol: '',
width: '',
xyz: '',
remark:'',
remark1:'',
remark2:'',
remark3:'',
remark4:'',
},
formLabelWidth: '220px',
rules: {
userName: [
// { required: true, message: '请输入申请人', trigger: 'blur' },
// // { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
// ],
// applyTime: [
// { required: true, message: '请选择时间', trigger: 'change' }
// ],
// needCount: [
// { required: true, message: '请输入需要车辆数量', trigger: 'blur' },
// ],
// orginStation: [
// { required: true, message: '请输入起始场站', trigger: 'blur' },
// ],
// endStation: [
// { required: true, message: '请输入目的场站', trigger: 'blur' },
// ], { required: true, message: '请选择申请状态', trigger: 'change' }
],
},
}
},
methods: {
handleSizeChange(val) {
this.queryInfo.pageSize = val
this.getList()
},
handleCurrentChange(val) {
this.queryInfo.pageNum = val
this.getList()
},
getList() {
const _this = this
selectLocations(this.queryInfo).then((response) => {
const res = response.data
console.log(response.data)
if (res.code !== '200') {
return _this.$message.error('获取消息收发记录,失败!')
}
// 获取列表数据
_this.tableData = res.data.list
// 获取列表的总记录数
_this.total = res.data.total
_this.$message.success('获取消息收发记录,成功!')
}).catch(error => {
// 关闭加载
_this.$message.error(error.toString())
})
},
// 添加对话框,打开事件
applyAdd() {
this.addForm = {
area: '',
areaid: '',
autodist: '',
heigth: '',
length: '',
locationname: '',
locationno: '',
vol: '',
width: '',
xyz: '',
remark:'',
remark1:'',
remark2:'',
remark3:'',
remark4:'',
};
this.dialogApply= 'create';
this.apply_dialog.addDialog = true;
},
// 添加功能
add() {
this.$refs.addForm.validate(valid => {
// 未通过,表单预校验
if (!valid) return;
addLocation(this.addForm).then((response) => {
let res = response.data;
// 添加失败
if (res.code !== '200') {
return this.$message.error(res.msg);
}
// 添加,成功
this.$message.success(res.msg);
// 隐藏对话框
this.apply_dialog.addDialog = false;
// 刷新列表
this.getList();
}).catch(error => {
this.$message.error(error.toString());
});
})
},
// 打开编辑
applyEdit(row) {
this.apply_dialog.addDialog = true;
this.dialogApply = 'update';
this.addForm=row;
},
// 编辑功能
edit() {
// 进行表单的预验证
this.$refs.addForm.validate(valid => {
// 未通过,表单预校验
if (!valid) return
ediLocation(this.addForm).then((response) => {
// console.log(row)
const res = response.data
if (res.code != '200') {
return this.$message.error(res.msg)
}
this.$message.success(res.msg)
// 隐藏对话框
this.apply_dialog.addDialog = false
// 刷新列表
this.getList()
}).catch(error => {
this.$message.error(error.toString())
})
})
},
// 删除
applyDel(index, row) {
// 弹框询问是否删除?
this.$confirm('此操作永久删除该消息收发记录, 是否继续?', '警告', {
confirmButtonText: '确定删除',
cancelButtonText: '取消',
type: 'warning'
}
).then(() => {
// console.log(row);
delLocation({areaid:row.areaid}).then((response) => {
// console.log(row)
const res = response.data
this.$message.success(res.msg)
this.getList()
}).catch(error => {
this.$message.error(res.msg)
})
}).catch(() => {
})
},
},
mounted() {
this.getList();
// this.getYardList();
}
}
</script>
<style scoped>
.toolbar{
height: 60px;
background-color: white;
/*line-height: 60px;*/
vertical-align: middle;
border-radius: 5px 5px 5px 5px;
padding: 15px 0 0 20px;
box-shadow: 0px 5px 5px #e5e8eb;
}
</style>
... ...
... ... @@ -7,7 +7,6 @@
<el-input v-model="queryInfo.stationno" prefix-icon="el-icon-search" size="small" style="width: 280px"
placeholder="场站编号" clearable>
<template slot="prepend">场站编号</template>
</el-input>
</el-col>
<el-col :span="6">
... ... @@ -81,41 +80,53 @@
</el-pagination>
</el-row>
<el-row>
<el-dialog :title="dialogMap[dialogApply]" :visible.sync="apply_dialog.addDialog" width="80%" >
<el-dialog :title="dialogMap[dialogApply]" :visible.sync="apply_dialog.addDialog" width="70%" >
<el-form :model="addForm" :rules="rules" ref="addForm" style="margin-top: 40px">
<el-row>
<el-col :span="9">
<el-form-item label="场站编号" :label-width="formLabelWidth" prop="stationno">
<el-input v-model="addForm.stationno" autocomplete="off" size="small" style="width: 190px"></el-input>
<el-form-item label="" :label-width="formLabelWidth" prop="stationno">
<el-input v-model="addForm.stationno" autocomplete="off" size="small" style="width: 260px">
<template slot="prepend">场站编号</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="场站名称" :label-width="formLabelWidth" prop="stationname">
<el-input v-model="addForm.stationname" autocomplete="off" size="small" style="width: 190px"></el-input>
<el-form-item label="" :label-width="formLabelWidth" prop="stationname">
<el-input v-model="addForm.stationname" autocomplete="off" size="small" style="width: 260px">
<template slot="prepend">场站名称</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="9">
<el-form-item label="场站地址" :label-width="formLabelWidth" prop="stationadr">
<el-input v-model="addForm.stationadr" autocomplete="off" size="small" style="width: 190px"></el-input>
<el-form-item label="" :label-width="formLabelWidth" prop="stationadr">
<el-input v-model="addForm.stationadr" autocomplete="off" size="small" style="width: 260px">
<template slot="prepend">场站名称</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="场站负责人名称" :label-width="formLabelWidth" prop="stationuser">
<el-input v-model="addForm.stationuser" autocomplete="off" size="small" style="width: 190px"></el-input>
<el-form-item label="" :label-width="formLabelWidth" prop="stationuser">
<el-input v-model="addForm.stationuser" autocomplete="off" size="small" style="width: 260px">
<template slot="prepend">负责人名称</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="9">
<el-form-item label="区域代码" :label-width="formLabelWidth" prop="area">
<el-input v-model="addForm.area" autocomplete="off" size="small" style="width: 190px"></el-input>
<el-form-item label="" :label-width="formLabelWidth" prop="area">
<el-input v-model="addForm.area" autocomplete="off" size="small" style="width: 260px">
<template slot="prepend">区域代码</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="关区" :label-width="formLabelWidth" prop="customs">
<el-input v-model="addForm.customs" autocomplete="off" size="small" style="width: 190px"></el-input>
<el-form-item label="" :label-width="formLabelWidth" prop="customs">
<el-input v-model="addForm.customs" autocomplete="off" size="small" style="width: 260px">
<template slot="prepend">关&emsp;&emsp;区</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
... ... @@ -134,7 +145,7 @@
import {selectStations,delStation,addStation,ediStation} from '../../api/consigner/station';
export default {
name: "warehouse",
name: "station",
data() {
return {
queryInfo: {
... ... @@ -187,8 +198,6 @@
// endStation: [
// { required: true, message: '请输入目的场站', trigger: 'blur' },
// ],
// status: [
// { required: true, message: '请选择申请状态', trigger: 'change' }
],
},
}
... ...