Commit d9984cb1 authored by 黄媛媛's avatar 黄媛媛

盘点中仓库的判断

parent 1a9ee2ec
......@@ -150,7 +150,7 @@
<div class="basefix">
<el-form-item label="" prop="WarehouseId">
<span class="label">仓库</span>
<el-select size="mini" v-model="addMsg.WarehouseId" placeholder="请选择">
<el-select size="mini" v-model="addMsg.WarehouseId" placeholder="请选择" @change="getWarehouseL">
<el-option
v-for="item in getWareHouseList"
:key="item.Id"
......@@ -233,7 +233,8 @@
</div>
<div class="btnformItem">
<span class="submitBtn" type="primary" @click="submitForm('addMsg')">确定出库</span>
<span class="submitBtn" type="primary" @click="submitForm('addMsg')" v-if="ISoperation == false">确定出库</span>
<span class="submitBtn" type="primary" style=" background:#909399;" v-if="ISoperation == true">确定出库</span>
<span class="exitBtn" @click="dialogState=false">取消</span>
</div>
</el-form>
......@@ -394,6 +395,8 @@ export default {
EmployeeList2:[],
EmName:'',
jumptype:1,
WarehouseList:[],
ISoperation:false,
}
},
created(){
......@@ -406,6 +409,7 @@ export default {
}
},
mounted(){
this.getSuppliesCheckList()
this.getList();
this.getWareHouse();
// this.getEmployee();
......@@ -595,6 +599,7 @@ export default {
}
this.wlItemList=[];
this.dialogState=true;
this.ISoperation = false
},
submitForm(formName) {
this.$refs[formName].validate((valid) => {
......@@ -654,6 +659,19 @@ export default {
if (res.data.resultCode === 1) {
this.tableData=res.data.data.pageData;
this.total=res.data.data.count;
if( this.WarehouseList.length>0 ){
this.tableData.forEach(x=>{
x.itemOperation = false;
for (let index = 0; index< this.WarehouseList.length; index++) {
const j = this.WarehouseList[index];
if(x.WarehouseId == j.WarehouseId){
x.itemOperation= true;
break
}
}
})
}
} else {
this.Error(res.data.message);
}
......@@ -662,65 +680,102 @@ export default {
);
},
Edit(item){
this.dialogState=true;
this.addMsg={
Id:item.Id,
WarehouseId:item.WarehouseId,
Remark:item.Remark,
EmployeeId:item.EmployeeId,
StockOutDate:item.StockOutDate,
DetailList:[],
if(item.itemOperation == true){
this.Error('此仓库在盘点中,无法操作!')
}else{
this.dialogState=true;
this.addMsg={
Id:item.Id,
WarehouseId:item.WarehouseId,
Remark:item.Remark,
EmployeeId:item.EmployeeId,
StockOutDate:item.StockOutDate,
DetailList:[],
}
this.wlItemList=item.DetailList;
this.EmName=item.EmName;
this.getEmployee(2);
}
this.wlItemList=item.DetailList;
this.EmName=item.EmName;
this.getEmployee(2);
},
Delete(item){
let Id=item.Id;
this.$confirm("确认删除?","提示", {
confirmButtonText:"确定",
cancelButtonText: "取消",
type: 'warning'
}).then(() => {
this.apiJavaPost("/api/Supplies/DelStockOutInfo",{StockOutId:Id},
res => {
if (res.data.resultCode === 1) {
this.getList();
this.Success(res.data.message)
} else {
this.Error(res.data.message);
}
},
null
);
if(item.itemOperation == true){
this.Error('此仓库在盘点中,无法操作!')
}else{
let Id=item.Id;
this.$confirm("确认删除?","提示", {
confirmButtonText:"确定",
cancelButtonText: "取消",
type: 'warning'
}).then(() => {
this.apiJavaPost("/api/Supplies/DelStockOutInfo",{StockOutId:Id},
res => {
if (res.data.resultCode === 1) {
this.getList();
this.Success(res.data.message)
} else {
this.Error(res.data.message);
}
},
null
);
}).catch(() => {
this.$message.info('已取消删除!')
});
}).catch(() => {
this.$message.info('已取消删除!')
});
}
},
Quxiao(item){
let Id=item.Id;
this.$confirm("确认取消入库单?","提示", {
confirmButtonText:"确定",
cancelButtonText: "取消",
type: 'warning'
}).then(() => {
this.apiJavaPost("/api/Supplies/CancelStockOutInfo",{StockOutId:Id},
res => {
if (res.data.resultCode === 1) {
this.getList();
this.Success(res.data.message)
} else {
this.Error(res.data.message);
}
},
null
);
if(item.itemOperation == true){
this.Error('此仓库在盘点中,无法操作!')
}else{
let Id=item.Id;
this.$confirm("确认取消入库单?","提示", {
confirmButtonText:"确定",
cancelButtonText: "取消",
type: 'warning'
}).then(() => {
this.apiJavaPost("/api/Supplies/CancelStockOutInfo",{StockOutId:Id},
res => {
if (res.data.resultCode === 1) {
this.getList();
this.Success(res.data.message)
} else {
this.Error(res.data.message);
}
},
null
);
}).catch(() => {
this.$message.info('已取消删除!')
});
}).catch(() => {
this.$message.info('已取消删除!')
});
}
},
//获取盘点仓库的列表
getSuppliesCheckList(){
this.apiJavaPost("/api/WarehouseOut/GetSuppliesCheckList", {},
res => {
if (res.data.resultCode === 1) {
this.WarehouseList = res.data.data && res.data.data.length>0 ? res.data.data:[]
} else {
this.Error(res.data.message);
}
},
null
);
},
getWarehouseL(){
this.ISoperation = false
for (let index = 0; index < this.WarehouseList.length; index++) {
const x = this.WarehouseList[index];
if(x.WarehouseId == this.addMsg.WarehouseId){
this.ISoperation = true;
this.Error('此仓库正在盘点,无法操作!')
break
}
}
},
},
......
......@@ -144,7 +144,7 @@
<div class="basefix">
<el-form-item label="" prop="WarehouseId">
<span class="label">仓库</span>
<el-select size="mini" v-model="addMsg.WarehouseId" placeholder="请选择">
<el-select size="mini" v-model="addMsg.WarehouseId" placeholder="请选择" @change="getWarehouseL">
<el-option
v-for="item in getWareHouseList"
:key="item.Id"
......@@ -226,7 +226,8 @@
</div>
<div class="btnformItem">
<span class="submitBtn" type="primary" @click="submitForm('addMsg')">确定入库</span>
<span class="submitBtn" type="primary" @click="submitForm('addMsg')" v-if="ISoperation == false">确定入库</span>
<span class="submitBtn" type="primary" style=" background:#909399;" v-if="ISoperation == true">确定入库</span>
<span class="exitBtn" @click="dialogState=false">取消</span>
</div>
</el-form>
......@@ -386,15 +387,19 @@ export default {
    return time.getTime() < Date.now() - 24 * 60 * 60 * 1000
}
},
WarehouseList:[],
ISoperation:false,
}
},
created(){
this.tableHeight=document.body.clientHeight-40-66-87;
},
mounted(){
this.getSuppliesCheckList()
this.getList();
this.getWareHouse();
this.getWuliao();
},
......@@ -408,17 +413,22 @@ export default {
);
},
Huifu(item){
this.apiJavaPost("/api/Supplies/RecoverStockInInfo",{StockInId:item.Id},
res => {
if (res.data.resultCode === 1) {
this.getList();
this.Success(res.data.message)
} else {
this.Error(res.data.message);
}
},
null
);
if(item.itemOperation == true){
this.Error('此仓库在盘点中,无法操作!')
}else{
this.apiJavaPost("/api/Supplies/RecoverStockInInfo",{StockInId:item.Id},
res => {
if (res.data.resultCode === 1) {
this.getList();
this.Success(res.data.message)
} else {
this.Error(res.data.message);
}
},
null
);
}
},
UnitPriceChange(item,index){
if(item.Number!='0' && item.Number!='' && item.UnitPrice!='0' && item.UnitPrice!=''){
......@@ -582,6 +592,7 @@ export default {
}
this.wlItemList=[];
this.dialogState=true;
this.ISoperation =false
},
submitForm(formName) {
this.$refs[formName].validate((valid) => {
......@@ -646,6 +657,19 @@ export default {
this.loading=false;
if (res.data.resultCode === 1) {
this.tableData=res.data.data.pageData;
if( this.WarehouseList.length>0 ){
this.tableData.forEach(x=>{
x.itemOperation = false;
for (let index = 0; index< this.WarehouseList.length; index++) {
const j = this.WarehouseList[index];
if(x.WarehouseId == j.WarehouseId){
x.itemOperation= true;
break
}
}
})
}
this.total=res.data.data.count;
} else {
this.Error(res.data.message);
......@@ -655,49 +679,62 @@ export default {
);
},
Edit(item){
if(item.StockInState==1){
this.Error("入库单已完成,无法修改!")
return;
}
this.dialogState=true;
this.addMsg={
Id:item.Id,
WarehouseId:item.WarehouseId,
Remark:item.Remark,
StockInDate:item.StockInDate,
Money:item.Money,
SupplierName:item.SupplierName,
SuppliesId:item.SuppliesId,
DetailList:[],
if(item.itemOperation == true){
this.Error('此仓库在盘点中,无法操作!')
}else{
if(item.StockInState==1){
this.Error("入库单已完成,无法修改!")
return;
}
this.dialogState=true;
this.addMsg={
Id:item.Id,
WarehouseId:item.WarehouseId,
Remark:item.Remark,
StockInDate:item.StockInDate,
Money:item.Money,
SupplierName:item.SupplierName,
SuppliesId:item.SuppliesId,
DetailList:[],
}
this.wlItemList=item.DetailList;
}
this.wlItemList=item.DetailList;
},
Delete(item){
let Id=item.Id;
this.$confirm("确认删除?","提示", {
confirmButtonText:"确定",
cancelButtonText: "取消",
type: 'warning'
}).then(() => {
this.apiJavaPost("/api/Supplies/DelStockInInfo",{StockInId:Id},
res => {
if (res.data.resultCode === 1) {
this.getList();
this.Success(res.data.message)
} else {
this.Error(res.data.message);
}
},
null
);
if(item.itemOperation == true){
this.Error('此仓库在盘点中,无法操作!')
}else{
let Id=item.Id;
this.$confirm("确认删除?","提示", {
confirmButtonText:"确定",
cancelButtonText: "取消",
type: 'warning'
}).then(() => {
this.apiJavaPost("/api/Supplies/DelStockInInfo",{StockInId:Id},
res => {
if (res.data.resultCode === 1) {
this.getList();
this.Success(res.data.message)
} else {
this.Error(res.data.message);
}
},
null
);
}).catch(() => {
this.$message.info('已取消删除!')
});
}).catch(() => {
this.$message.info('已取消删除!')
});
}
},
Quxiao(item){
let Id=item.Id;
this.$confirm("确认取消入库单?","提示", {
if(item.itemOperation == true){
this.Error('此仓库在盘点中,无法操作!')
}else{
let Id=item.Id;
this.$confirm("确认取消入库单?","提示", {
confirmButtonText:"确定",
cancelButtonText: "取消",
type: 'warning'
......@@ -714,10 +751,37 @@ export default {
null
);
}).catch(() => {
this.$message.info('已取消删除!')
});
}).catch(() => {
this.$message.info('已取消删除!')
});
}
},
//获取盘点仓库的列表
getSuppliesCheckList(){
this.apiJavaPost("/api/WarehouseOut/GetSuppliesCheckList", {},
res => {
if (res.data.resultCode === 1) {
this.WarehouseList = res.data.data && res.data.data.length>0 ? res.data.data:[]
} else {
this.Error(res.data.message);
}
},
null
);
},
getWarehouseL(){
this.ISoperation = false
for (let index = 0; index < this.WarehouseList.length; index++) {
const x = this.WarehouseList[index];
if(x.WarehouseId == this.addMsg.WarehouseId){
this.ISoperation = true;
this.Error('此仓库正在盘点,无法操作!')
break
}
}
},
},
......
......@@ -20,7 +20,8 @@
<div class="outbound_Main">
<div class="routerTitle" style="padding:17px 30px;">
<span class="pageTitle" style="margin-top:-5px;">商品出库</span>
<span @click="sureOutband()" class="chaxunSpan">确认出库</span>
<span @click="sureOutband()" class="chaxunSpan" v-if="ISoperation == false" >确认出库</span>
<span class="chaxunSpan" style=" background:#909399;" v-if="ISoperation == true" >确认出库</span>
</div>
<ul class="queryul" style="margin-left:20px;">
扫码出库
......@@ -64,12 +65,15 @@
<ul class="queryul" style="margin:30px 0 25px 0;">
选择仓库
<li style="margin-bottom:0;">
<el-select size="mini" v-model="msg.WarehouseId" @change="getData()" placeholder="请选择">
<el-select size="mini" v-model="msg.WarehouseId" @change="getWarehouseL(),getData()" placeholder="请选择">
<el-option :key="0" label="不限" :value="0"></el-option>
<el-option v-for="item in getWareHouseList" :key="item.Id" :label="item.Name" :value="item.Id">
</el-option>
</el-select>
</li>
<li v-if="ISoperation == true">
<span style="color:#F56C6C;font-size: 16px;padding:0 10px">此仓库正在盘点中,暂不支持出库功能!</span>
</li>
</ul>
<vxe-table stripe style="margin-top:15px;width:100%" :loading="loading" :data="tableData">
<vxe-table-column field="OrderNo" title="订单号"></vxe-table-column>
......@@ -114,13 +118,16 @@
WarehouseId: 0,
WarehouseOutGoodsDetailList: []
},
orderNum:0
orderNum:0,
ISoperation:false,
WarehouseList:[]
};
},
mounted() {
this.msg.ID = this.$route.query.ID;
this.getWareHouse();
this.getData();
this.getSuppliesCheckList()
// var myInput = document.getElementById('myCode');
// myInput.focus();
// myInput.onblur = function() {
......@@ -133,6 +140,14 @@
this.msg.pageIndex = val;
this.getList();
},
getWarehouseL(){
this.ISoperation = false
this.WarehouseList.forEach(x=>{
if(x.WarehouseId == this.msg.WarehouseId){
this.ISoperation = true
}
})
},
// 仓库列表
getWareHouse() {
this.apiJavaPost("/api/Supplies/GetWareHouseList", {
......@@ -149,6 +164,19 @@
null
);
},
//获取盘点仓库的列表
getSuppliesCheckList(){
this.apiJavaPost("/api/WarehouseOut/GetSuppliesCheckList", {},
res => {
if (res.data.resultCode === 1) {
this.WarehouseList = res.data.data && res.data.data.length>0 ? res.data.data:[]
} else {
this.Error(res.data.message);
}
},
null
);
},
//获取数据
getData() {
this.loading = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment