Commit 402727af authored by zhengke's avatar zhengke

修改

parent 04a3ba90
...@@ -137,10 +137,10 @@ ...@@ -137,10 +137,10 @@
mounted() { mounted() {
this.msg.CheckId = this.$route.query.CheckId; this.msg.CheckId = this.$route.query.CheckId;
this.saveMsg.CheckId = this.$route.query.CheckId; this.saveMsg.CheckId = this.$route.query.CheckId;
this.saveMsg.WarehouseId = this.$route.query.WarehouseId;
this.isFrom = this.$route.query.isFrom; this.isFrom = this.$route.query.isFrom;
this.getList(); this.getList();
this.getCheckStatus(); this.getCheckStatus();
this.getWarehouseId();
}, },
methods: { methods: {
currentChange(val) { currentChange(val) {
...@@ -169,8 +169,7 @@ ...@@ -169,8 +169,7 @@
this.$router.push({ this.$router.push({
path: path, path: path,
query: { query: {
CheckId: this.msg.CheckId, CheckId: this.msg.CheckId
WarehouseId:this.saveMsg.WarehouseId
} }
}); });
}, },
...@@ -223,6 +222,12 @@ ...@@ -223,6 +222,12 @@
if(this.checkList.length==0){ if(this.checkList.length==0){
this.Error('请选择报损单据'); this.Error('请选择报损单据');
}else{ }else{
var loading = this.$loading({
lock: true,
text: '玩命保存中...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
this.checkList.forEach(x=>{ this.checkList.forEach(x=>{
var obj={ var obj={
SuppliesId:x.SuppliesId, SuppliesId:x.SuppliesId,
...@@ -239,6 +244,7 @@ ...@@ -239,6 +244,7 @@
"/api/supplies/SetSuppliesReportLoss", "/api/supplies/SetSuppliesReportLoss",
this.saveMsg, this.saveMsg,
res => { res => {
loading.close();
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
this.Success(res.data.message); this.Success(res.data.message);
this.getList(); this.getList();
...@@ -250,6 +256,23 @@ ...@@ -250,6 +256,23 @@
); );
} }
}, },
//获取仓库id
getWarehouseId(){
let msg={
CheckId:this.msg.CheckId
}
this.apiJavaPost(
"/api/supplies/GetSuppliesCheckModel", msg,
res => {
if (res.data.resultCode === 1) {
this.saveMsg.WarehouseId=res.data.data.WarehouseId;
} else {
this.Error(res.data.message);
}
},
null
);
}
} }
}; };
......
...@@ -103,9 +103,9 @@ ...@@ -103,9 +103,9 @@
mounted() { mounted() {
this.msg.CheckId = this.$route.query.CheckId; this.msg.CheckId = this.$route.query.CheckId;
this.saveMsg.CheckId = this.$route.query.CheckId; this.saveMsg.CheckId = this.$route.query.CheckId;
this.saveMsg.WarehouseId = this.$route.query.WarehouseId;
this.isFrom = this.$route.query.isFrom; this.isFrom = this.$route.query.isFrom;
this.getList(); this.getList();
this.getWarehouseId();
}, },
methods: { methods: {
currentChange(val) { currentChange(val) {
...@@ -122,8 +122,7 @@ ...@@ -122,8 +122,7 @@
this.$router.push({ this.$router.push({
path: path, path: path,
query: { query: {
CheckId: this.msg.CheckId, CheckId: this.msg.CheckId
WarehouseId:this.saveMsg.WarehouseId
} }
}); });
}, },
...@@ -176,6 +175,12 @@ ...@@ -176,6 +175,12 @@
if(this.checkList.length==0){ if(this.checkList.length==0){
this.Error('请选择报损单据'); this.Error('请选择报损单据');
}else{ }else{
var loading = this.$loading({
lock: true,
text: '玩命保存中...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
this.checkList.forEach(x=>{ this.checkList.forEach(x=>{
var obj={ var obj={
SuppliesId:x.SuppliesId, SuppliesId:x.SuppliesId,
...@@ -192,6 +197,7 @@ ...@@ -192,6 +197,7 @@
"/api/supplies/SetSuppliesReportLoss", "/api/supplies/SetSuppliesReportLoss",
this.saveMsg, this.saveMsg,
res => { res => {
loading.close();
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
this.Success(res.data.message); this.Success(res.data.message);
this.getList(); this.getList();
...@@ -203,6 +209,23 @@ ...@@ -203,6 +209,23 @@
); );
} }
}, },
//获取仓库id
getWarehouseId(){
let msg={
CheckId:this.msg.CheckId
}
this.apiJavaPost(
"/api/supplies/GetSuppliesCheckModel", msg,
res => {
if (res.data.resultCode === 1) {
this.saveMsg.WarehouseId=res.data.data.WarehouseId;
} else {
this.Error(res.data.message);
}
},
null
);
}
} }
}; };
......
...@@ -195,10 +195,10 @@ ...@@ -195,10 +195,10 @@
}, },
mounted() { mounted() {
this.msg.CheckId = this.$route.query.CheckId; this.msg.CheckId = this.$route.query.CheckId;
this.WarehouseId = this.$route.query.WarehouseId;
this.CheckState = this.$route.query.CheckState; this.CheckState = this.$route.query.CheckState;
this.getList(); this.getList();
this.getCheckStatus(); this.getCheckStatus();
this.getWarehouseId();
//上传接口路径 //上传接口路径
this.importFileUrl2 = this.domainManager().DomainUrl + this.importFileUrl2 = this.domainManager().DomainUrl +
"/api/file/LocalFileUploadImportForSuppliesCheck"; "/api/file/LocalFileUploadImportForSuppliesCheck";
...@@ -253,8 +253,7 @@ ...@@ -253,8 +253,7 @@
this.$router.push({ this.$router.push({
path: path, path: path,
query: { query: {
CheckId: this.msg.CheckId, CheckId: this.msg.CheckId
WarehouseId: this.WarehouseId
} }
}); });
}, },
...@@ -480,8 +479,24 @@ ...@@ -480,8 +479,24 @@
getImgView(imglist){ getImgView(imglist){
this.isShowImageDialog=true; this.isShowImageDialog=true;
this.InvimageList=imglist; this.InvimageList=imglist;
},
//获取仓库id
getWarehouseId(){
let msg={
CheckId:this.msg.CheckId
}
this.apiJavaPost(
"/api/supplies/GetSuppliesCheckModel", msg,
res => {
if (res.data.resultCode === 1) {
this.WarehouseId=res.data.data.WarehouseId;
} else {
this.Error(res.data.message);
}
},
null
);
} }
} }
}; };
......
...@@ -323,7 +323,6 @@ export default { ...@@ -323,7 +323,6 @@ export default {
path: path, path: path,
query: { query: {
CheckId:item.Id, CheckId:item.Id,
WarehouseId:item.WarehouseId,
CheckState:item.CheckState CheckState:item.CheckState
} }
}); });
......
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