作者 朱兆平

Merge remote-tracking branch 'origin/master'

... ... @@ -17,7 +17,7 @@ export const remove = params => { return axios({
})};
//批量删除
export const batchRemove = params => { return axios.get(`${base}/user/batchremove`, { params: params }); };
export const batchRemove = params => { return axios.post(`${base}/batchremove`, params ); };
export const edit = params => { return axios({
method: 'PUT',
... ...
... ... @@ -130,6 +130,47 @@
<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="12">
<el-form-item label="" :label-width="formLabelWidth" prop="stationid">
<div class="my-text-area">
<div class="el-input-group__prepend prepand">所属场站</div>
<el-select v-model="addForm.stationid" v-if="this.dis === 'create'"
filterable
allow-create
default-first-option
remote autocomplete="off" size="small"
:remote-method="getStationno"
:loading="loading" placeholder="请输入场站id" style="width: 170px">
<el-option
v-for="item in stationids"
:key="item.stationno"
:label="item.stationname"
:value="item.stationno">
<span style="float: left">{{ item.stationname }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.stationno }}</span>
</el-option>
</el-select>
<el-select v-model="addForm.stationid" v-else disabled
filterable
allow-create
default-first-option
remote autocomplete="off" size="small"
:remote-method="getStationno"
:loading="loading" placeholder="请输入场站id" style="width: 170px">
<el-option
v-for="item in stationids"
:key="item.stationno"
:label="item.stationname"
:value="item.stationno">
<span style="float: left">{{ item.stationname }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.stationno }}</span>
</el-option>
</el-select>
</div>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="9">
<el-form-item label="" :label-width="formLabelWidth" prop="houseid">
<el-input v-if="this.dis === 'create'" v-model="addForm.houseid" autocomplete="off" size="small" style="width: 260px">
... ... @@ -173,26 +214,37 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="" :label-width="formLabelWidth" prop="stationid">
<el-form-item label="" :label-width="formLabelWidth" prop="ismeta">
<div class="my-text-area">
<div class="el-input-group__prepend prepand">体&emsp;&emsp;积</div>
<el-select v-model="addForm.stationid"
filterable
allow-create
default-first-option
remote autocomplete="off" size="small"
:remote-method="getStationno"
:loading="loading" placeholder="请输入场站id" style="width: 170px">
<el-option
v-for="item in stationids"
:key="item.stationno"
:label="item.stationno"
:value="item.stationno">
</el-option>
<div class="el-input-group__prepend prepand">虚拟仓库</div>
<el-select v-model="addForm.ismeta" placeholder="请选择是否虚拟仓库" size="small" style="width: 170px">
<el-option label="否" value="0"></el-option>
<el-option label="是" value="1"></el-option>
</el-select>
</div>
</el-form-item>
</el-col>
<!-- <el-col :span="12">-->
<!-- <el-form-item label="" :label-width="formLabelWidth" prop="stationid">-->
<!-- <div class="my-text-area">-->
<!-- <div class="el-input-group__prepend prepand">体&emsp;&emsp;积</div>-->
<!-- <el-select v-model="addForm.stationid"-->
<!-- filterable-->
<!-- allow-create-->
<!-- default-first-option-->
<!-- remote autocomplete="off" size="small"-->
<!-- :remote-method="getStationno"-->
<!-- :loading="loading" placeholder="请输入场站id" style="width: 170px">-->
<!-- <el-option-->
<!-- v-for="item in stationids"-->
<!-- :key="item.stationno"-->
<!-- :label="item.stationno"-->
<!-- :value="item.stationno">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </div>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row>
<el-row>
<el-col :span="9">
... ... @@ -234,17 +286,6 @@
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="" :label-width="formLabelWidth" prop="ismeta">
<div class="my-text-area">
<div class="el-input-group__prepend prepand">虚拟仓库</div>
<el-select v-model="addForm.ismeta" placeholder="请选择是否虚拟仓库" size="small" style="width: 170px">
<el-option label="否" value="0"></el-option>
<el-option label="是" value="1"></el-option>
</el-select>
</div>
</el-form-item>
</el-col>
</el-row>
<!-- <el-row>-->
<!-- <el-col :span="9">-->
... ...
... ... @@ -2,35 +2,75 @@
<el-row>
<el-card style="background-color: #F5F7FA">
<!-- 搜索区域-->
<el-row :gutter="10" class="toolbar">
<el-col :span="6">
<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-row class="toolbar" style="height: 100px">
<el-row style="margin-top: -3px">
<el-col :span="6">
<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-input v-model="queryInfo.billfhl" 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-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-row>
<el-row>
<el-col :span="12">
<div class="my-text-area">
<div class="el-input-group__prepend prepand">时间段</div>
<el-date-picker
v-model="searchTime"
type="daterange"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd HH:mm:ss"
:picker-options="pickerOptions">
</el-date-picker>
</div>
</el-col>
<el-col :span="5">
<el-button type="primary" icon="el-icon-search" size="small" @click="getList()">
查询
</el-button>
<el-button type="success" size="small" @click="changeFwb()" :disabled="this.sels.length===0">
更改主单号
</el-button>
<!-- <el-button type="success" icon="el-icon-edit" size="small" @click="applyAdd()">新增</el-button>-->
</el-col>
</el-row>
</el-row>
<el-col :gutter="0" class="toolbar toobar_analysis" style="padding-top:0">
<el-col :span="7">
<div class="analysis_title">总单数:</div>
<div class="analysis_text">20</div>
</el-col>
<el-col :span="6">
<el-input v-model="queryInfo.billfhl" prefix-icon="el-icon-search" size="small" style="width: 280px"
placeholder="货物单号" clearable>
<template slot="prepend">分单号</template>
</el-input>
<el-col :span="1">
<el-divider direction="vertical"></el-divider>
</el-col>
<el-col :span="6">
<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 :span="7">
<div class="analysis_title">总件数:</div>
<div class="analysis_text">50</div>
</el-col>
<el-col :span="5">
<el-button type="primary" icon="el-icon-search" size="small" @click="getList()">
查询
</el-button>
<el-button type="success" size="small" @click="changeFwb()" :disabled="this.sels.length===0">
更改主单号
</el-button>
<!-- <el-button type="success" icon="el-icon-edit" size="small" @click="applyAdd()">新增</el-button>-->
<el-col :span="1">
<el-divider direction="vertical"></el-divider>
</el-col>
</el-row>
<el-col :span="8">
<div class="analysis_title">总重量:</div>
<div class="analysis_text">150</div>
</el-col>
</el-col>
<!-- 列表区域-->
<el-row>
<template>
... ... @@ -423,6 +463,34 @@
props:['parentLoId'],
data() {
return {
pickerOptions: {
shortcuts: [{
text: '最近一周',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近一个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近三个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit('pick', [start, end]);
}
}]
},
queryInfo: {
waybill:'',
billfhl:'',
... ... @@ -431,7 +499,10 @@
pageNum: 1,
// 每页大小
pageSize: 10,
starttime:'',
endtime:'',
},
creattime:'',
total: 0,
tableData:[],
//新增编辑
... ... @@ -594,6 +665,21 @@
fwbRules:{},
}
},
computed:{
//选中的时间段
searchTime: {
get:function () {
return this.creattime
},
set:function (val) {
this.creattime = val
if (val && val.length===2){
this.queryInfo.starttime = val[0]
this.queryInfo.endtime = val[1]
}
}
},
},
methods: {
//获取所属库位
// getLo:function(query){
... ...
... ... @@ -2,44 +2,64 @@
<el-row>
<el-card style="background-color: #F5F7FA">
<!-- 搜索区域-->
<el-row :gutter="10" class="toolbar">
<el-col :span="5">
<el-input v-model="queryInfo.waybill" prefix-icon="el-icon-search" size="small" style="width: 240px"
placeholder="主单号" clearable>
<template slot="prepend">主单号</template>
</el-input>
</el-col>
<el-col :span="5">
<el-input v-model="queryInfo.billfhl" prefix-icon="el-icon-search" size="small" style="width: 240px"
placeholder="分单号" clearable>
<template slot="prepend">分单号</template>
</el-input>
</el-col>
<el-col :span="5">
<div class="my-text-area">
<div class="el-input-group__prepend prepand">出入库类型</div>
<el-select v-model="queryInfo.ietype" placeholder="出入库类型" size="mini" style="width: 140px">
<el-option label="出入库类型-进" value="I"></el-option>
<el-option label="出入库类型-出" value="E"></el-option>
</el-select>
</div>
<!-- <el-input v-model="queryInfo.ietype" prefix-icon="el-icon-search" size="small" style="width: 240px"-->
<!-- placeholder="类型" clearable>-->
<!-- <template slot="prepend">类型</template>-->
<!-- </el-input>-->
</el-col>
<el-col :span="5">
<el-input v-model="queryInfo.custcode" prefix-icon="el-icon-search" size="small" style="width: 240px"
placeholder="货物单号" clearable>
<template slot="prepend">客户代码</template>
</el-input>
</el-col>
<el-col :span="4">
<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 class="toolbar" style="height: 100px">
<el-row style="margin-top: -3px">
<el-col :span="5">
<el-input v-model="queryInfo.waybill" prefix-icon="el-icon-search" size="small" style="width: 240px"
placeholder="主单号" clearable>
<template slot="prepend">主单号</template>
</el-input>
</el-col>
<el-col :span="5">
<el-input v-model="queryInfo.billfhl" prefix-icon="el-icon-search" size="small" style="width: 240px"
placeholder="分单号" clearable>
<template slot="prepend">分单号</template>
</el-input>
</el-col>
<el-col :span="5">
<div class="my-text-area">
<div class="el-input-group__prepend prepand">出入库类型</div>
<el-select v-model="queryInfo.ietype" placeholder="出入库类型" size="mini" style="width: 140px">
<el-option label="出入库类型-进" value="I"></el-option>
<el-option label="出入库类型-出" value="E"></el-option>
</el-select>
</div>
<!-- <el-input v-model="queryInfo.ietype" prefix-icon="el-icon-search" size="small" style="width: 240px"-->
<!-- placeholder="类型" clearable>-->
<!-- <template slot="prepend">类型</template>-->
<!-- </el-input>-->
</el-col>
<el-col :span="5">
<el-input v-model="queryInfo.custcode" prefix-icon="el-icon-search" size="small" style="width: 240px"
placeholder="货物单号" clearable>
<template slot="prepend">客户代码</template>
</el-input>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<div class="my-text-area">
<div class="el-input-group__prepend prepand">时间段</div>
<el-date-picker
v-model="searchTime"
type="daterange"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd HH:mm:ss"
:picker-options="pickerOptions">
</el-date-picker>
</div>
</el-col>
<el-col :span="4">
<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>
<el-row>
<el-dialog :title="dialogMap[dialogApply]" :visible.sync="apply_dialog.addDialog" width="80%" >
... ... @@ -258,6 +278,33 @@
},
data() {
return {
pickerOptions: {
shortcuts: [{
text: '最近一周',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近一个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近三个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit('pick', [start, end]);
}
}]
},
queryInfo: {
waybill:'',
billfhl:'',
... ... @@ -267,7 +314,10 @@
pageNum: 1,
// 每页大小
pageSize: 10,
starttime:'',
endtime:'',
},
creattime:'',
total: 0,
// tableData:[],
dialogMap: {
... ... @@ -352,12 +402,28 @@
},
}
},
computed:{
//选中的时间段
searchTime: {
get:function () {
return this.creattime
},
set:function (val) {
this.creattime = val
if (val && val.length===2){
this.queryInfo.starttime = val[0]
this.queryInfo.endtime = val[1]
}
}
},
},
methods: {
zancun(){
this.zancundata.push(this.addForm);
console.log(this.zancundata)
},
getList() {
console.log("queryinfo---->"+this.queryInfo)
this.$refs.tabulation.getList(this.queryInfo)
},
... ...
... ... @@ -403,15 +403,18 @@
},
//批量删除
batchRemove: function () {
var ids = this.sels.map(item => item.permissionId).toString();
var ids = this.sels.map(item => item.permissionId);
this.$confirm('确认删除选中记录吗?', '提示', {
type: 'warning'
}).then(() => {
this.listLoading = true;
//NProgress.start();
let para = { ids: ids };
batchRemove(para).then((res) => {
this.listLoading = false;
// let para = { ids: ids };
batchRemove(ids).then((response) => {
let res = response.data;
if (res.code !== '200') {
return this.$message.error(res.msg);
}
//NProgress.done();
this.$message({
message: '删除成功',
... ... @@ -419,8 +422,10 @@
});
this.getTableList();
});
}).catch(() => {
}).catch((err) => {
this.$message.error(err);
}).finally(() => {
this.listLoading = false;
});
},
showDrawer: function(){
... ...