作者 小范

出入库操作功能优化

... ... @@ -19,6 +19,8 @@ export const selectNewInventroyrecords = params => { return axios.get(`${baseSer
export const ExtNewinventroyrecord = params => { return axios.get(`${baseServiceURL}/newinventroyrecord/ExtNewinventroyrecord`, { params: params }); };
//回库
export const ReNewinventroyrecord = params => { return axios.post(`${baseServiceURL}/newinventroyrecord/ReNewinventroyrecord`, params); };
//退库
export const CancleNewinventroyrecord = params => { return axios.post(`${baseServiceURL}/newinventroyrecord/CancleNewinventroyrecord`, params); };
//分批出库
export const batchoutbound = params => { return http.post(`${baseUrl2}/batchoutbound`,params)};
... ...
... ... @@ -20,8 +20,10 @@
<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=""></el-option>
<el-option label="出入库类型-进" value="I"></el-option>
<el-option label="出入库类型-出" value="E"></el-option>
<el-option label="出入库类型-退" value="C"></el-option>
</el-select>
</div>
<!-- <el-input v-model="queryInfo.ietype" prefix-icon="el-icon-search" size="small" style="width: 240px"-->
... ... @@ -196,6 +198,7 @@
<el-select v-model="addForm.ietype" placeholder="出入库类型" size="mini" style="width: 210px">
<el-option label="出入库类型-进" value="I"></el-option>
<el-option label="出入库类型-出" value="E"></el-option>
<el-option label="出入库类型-退" value="C"></el-option>
</el-select>
</div>
</el-form-item>
... ...
... ... @@ -172,6 +172,7 @@
<template slot-scope="scope">
<span v-if="scope.row.ietype ==='I'">进</span>
<span v-if="scope.row.ietype ==='E'">出</span>
<span v-if="scope.row.ietype ==='C'">退</span>
</template>
</el-table-column>
<el-table-column
... ... @@ -223,14 +224,14 @@
<el-table-column
fixed="right"
label="操作"
width="160">
width="220">
<template slot-scope="scope">
<el-button v-if="scope.row.ietype ==='E'" disabled type="success" size="mini" @click="outBound(scope.row)">出库</el-button>
<el-button v-else type="success" size="mini" @click="outBound(scope.row)">出库</el-button>
<el-button v-if="scope.row.ietype ==='E'" type="primary" size="mini" @click="inBound(scope.row)">回库</el-button>
<el-button v-else type="primary" disabled size="mini" @click="inBound(scope.row)">回库</el-button>
<!-- <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>-->
<el-button type="success" size="mini" @click="outBound(scope.row)" :disabled="outBoundStatus(scope.row)">出库</el-button>
<!--<el-button v-else type="success" size="mini" @click="outBound(scope.row)">出库</el-button>-->
<el-button type="primary" :disabled="inBoundStatus(scope.row)" size="mini" @click="inBound(scope.row)">回库</el-button>
<!--<el-button v-else type="primary" size="mini" @click="inBound(scope.row)">回库</el-button>-->
<el-button type="warning" size="mini" @click="reBound(scope.row)" :disabled="reBoundStatus(scope.row)">退库</el-button>
<!--<el-button v-else type="warning" size="mini" @click="reBound(scope.row)">退库</el-button>-->
</template>
</el-table-column>
</el-table>
... ... @@ -454,7 +455,7 @@
delInventoryrecord,
ediInventroyrecord,
ExtNewinventroyrecord,
selectNewInventroyrecords,ReNewinventroyrecord
selectNewInventroyrecords,ReNewinventroyrecord,CancleNewinventroyrecord
} from "../../api/consigner/station";
import packge from '@/api/nmms/packge'
... ... @@ -643,6 +644,29 @@
}).catch(() => {
})
},
//退库
reBound(row) {
this.$confirm('是否确认退库?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}
).then(() => {
// console.log(row);
CancleNewinventroyrecord(row).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.getList()
}).catch(error => {
this.$message.error(error)
})
}).catch(() => {
})
},
// 删除
applyDel(index, row) {
// 弹框询问是否删除?
... ... @@ -696,6 +720,28 @@
})
},
outBoundStatus:(row)=>{
if(row.ietype=='I' && row.goodsstatus=='1' ||row.ietype=='E' ||row.ietype=='C'){
return true;
}else{
return false;
}
},
inBoundStatus:(row)=>{
if(row.ietype=='I' || row.ietype=='C'){
return true;
}else{
return false;
}
},
reBoundStatus:(row)=>{
if(row.ietype=='I' && row.goodsstatus=='0'){
return false;
}else{
return true;
}
},
},
mounted() {
this.getList();
... ...