fix:mlogbw
This commit is contained in:
parent
eb025fbeb2
commit
e3acce3f09
|
|
@ -142,7 +142,7 @@ export default {
|
||||||
});
|
});
|
||||||
if (arr.length > 0) {
|
if (arr.length > 0) {
|
||||||
that.form.wm_in = arr[0].id;
|
that.form.wm_in = arr[0].id;
|
||||||
if(mgroup_code == 'paiyicibang'||mgroup_code == 'paiercibang'){}else{
|
if(that.mgroup_code == 'paiyicibang'||that.mgroup_code == 'paiercibang'){}else{
|
||||||
that.submit();//提交
|
that.submit();//提交
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@
|
||||||
>编辑</el-button
|
>编辑</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="!scope.row.isEdit"
|
v-if="!scope.row.isEdit"
|
||||||
text
|
text
|
||||||
type="danger"
|
type="danger"
|
||||||
size="small"
|
size="small"
|
||||||
|
|
@ -97,8 +97,15 @@ export default {
|
||||||
},
|
},
|
||||||
getList(){
|
getList(){
|
||||||
let that = this;
|
let that = this;
|
||||||
|
that.mlogbwlist = [];
|
||||||
that.$API.wpm.mlogbw.list.req(that.params).then((res) => {
|
that.$API.wpm.mlogbw.list.req(that.params).then((res) => {
|
||||||
that.mlogbwlist = res;
|
if(res.length>0){
|
||||||
|
res.forEach((item) => {
|
||||||
|
let obj = Object.assign({},item);
|
||||||
|
obj.isEdit = false;
|
||||||
|
that.mlogbwlist.push(obj);
|
||||||
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//添加
|
//添加
|
||||||
|
|
@ -107,7 +114,7 @@ export default {
|
||||||
if(row.id!==''&&row.id!==undefined&&row.id!==null){
|
if(row.id!==''&&row.id!==undefined&&row.id!==null){
|
||||||
that.$API.wpm.mlogbw.update.req(row.id,row).then((res) => {
|
that.$API.wpm.mlogbw.update.req(row.id,row).then((res) => {
|
||||||
that.$message.success("保存成功");
|
that.$message.success("保存成功");
|
||||||
that.getLists();
|
that.getList();
|
||||||
return res;
|
return res;
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
return err;
|
return err;
|
||||||
|
|
@ -115,7 +122,7 @@ export default {
|
||||||
}else{
|
}else{
|
||||||
that.$API.wpm.mlogbw.create.req(row).then((res) => {
|
that.$API.wpm.mlogbw.create.req(row).then((res) => {
|
||||||
that.$message.success("添加成功");
|
that.$message.success("添加成功");
|
||||||
that.getLists();
|
that.getList();
|
||||||
return res;
|
return res;
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
return err;
|
return err;
|
||||||
|
|
@ -137,91 +144,22 @@ export default {
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
that.$API.wpm.mlogbw.delete.req(id).then((res) => {
|
that.$API.wpm.mlogbw.delete.req(id).then((res) => {
|
||||||
that.$message.success("删除成功");
|
that.$message.success("删除成功");
|
||||||
that.getLists();
|
that.getList();
|
||||||
return res;
|
return res;
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
return err;
|
return err;
|
||||||
});
|
});
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
//表单注入数据
|
|
||||||
setData(data) {
|
|
||||||
Object.assign(this.form, data);
|
|
||||||
this.getRoute(data.id);
|
|
||||||
},
|
|
||||||
//编辑
|
|
||||||
mlogUpdate() {
|
|
||||||
this.dialog.edit = true;
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.editDialog.open("edit").setData(this.mlogItem);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
table_add() {
|
|
||||||
this.dialog.save = true;
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.saveDialog.open();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
mlogbinSuccess(){
|
|
||||||
this.$refs.tableIn.refresh();
|
|
||||||
this.$refs.tableOut.refresh();
|
|
||||||
},
|
|
||||||
//自检
|
|
||||||
table_in_edit(row) {
|
|
||||||
this.saveInForm = row;
|
|
||||||
this.saveInDialog = true;
|
|
||||||
},
|
|
||||||
//提交自检
|
|
||||||
saveInSubmit() {
|
|
||||||
let that = this;
|
|
||||||
that.$refs.saveInForm.validate(async (valid) => {
|
|
||||||
if (valid) {
|
|
||||||
that.isSaveing = true;
|
|
||||||
let obj = {};
|
|
||||||
obj.count_use = that.saveInForm.count_use;
|
|
||||||
obj.count_pn_jgqbl = that.saveInForm.count_pn_jgqbl;
|
|
||||||
that.$API.wpm.mlogb.updateIn
|
|
||||||
.req(that.saveInForm.id, obj)
|
|
||||||
.then((res) => {
|
|
||||||
that.isSaveing = false;
|
|
||||||
that.$message.success("操作成功");
|
|
||||||
that.saveInDialog = false;
|
|
||||||
that.$refs.tableIn.refresh();
|
|
||||||
that.$refs.tableOut.refresh();
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
that.isSaveing = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
//表单提交方法
|
//表单提交方法
|
||||||
mlogSubmit() {
|
mlogbSubmit() {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.wpm.mlog.submit.req(that.mlogItem.id).then((res) => {
|
that.$API.wpm.mlogb.submit.req(that.mlogb).then((res) => {
|
||||||
that.isSaveing = false;
|
that.isSaveing = false;
|
||||||
that.visible = false;
|
that.visible = false;
|
||||||
that.$message.success("操作成功");
|
that.$message.success("操作成功");
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleSaveSuccess() {
|
|
||||||
this.$refs.tableIn.refresh();
|
|
||||||
this.$refs.tableOut.refresh();
|
|
||||||
},
|
|
||||||
handleCheckSuccess() {
|
|
||||||
this.$refs.tableOut.refresh();
|
|
||||||
},
|
|
||||||
fileUPSuccess(res) {
|
|
||||||
let that = this;
|
|
||||||
console.log('res',res);
|
|
||||||
this.test_file = res.path;
|
|
||||||
},
|
|
||||||
//编辑成功后的方法调用
|
|
||||||
handleEditSuccess() {
|
|
||||||
this.getMlogItem();
|
|
||||||
},
|
|
||||||
//设置过滤项
|
//设置过滤项
|
||||||
setFilters(filters) {
|
setFilters(filters) {
|
||||||
this.selectionFilters = filters;
|
this.selectionFilters = filters;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue