fix:mlogbw

This commit is contained in:
shijing 2025-01-02 17:45:32 +08:00
parent eb025fbeb2
commit e3acce3f09
2 changed files with 15 additions and 77 deletions

View File

@ -142,7 +142,7 @@ export default {
});
if (arr.length > 0) {
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();//
}
}else{

View File

@ -44,7 +44,7 @@
>编辑</el-button
>
<el-button
v-if="!scope.row.isEdit"
v-if="!scope.row.isEdit"
text
type="danger"
size="small"
@ -97,8 +97,15 @@ export default {
},
getList(){
let that = this;
that.mlogbwlist = [];
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){
that.$API.wpm.mlogbw.update.req(row.id,row).then((res) => {
that.$message.success("保存成功");
that.getLists();
that.getList();
return res;
}).catch((err) => {
return err;
@ -115,7 +122,7 @@ export default {
}else{
that.$API.wpm.mlogbw.create.req(row).then((res) => {
that.$message.success("添加成功");
that.getLists();
that.getList();
return res;
}).catch((err) => {
return err;
@ -137,91 +144,22 @@ export default {
}).then(() => {
that.$API.wpm.mlogbw.delete.req(id).then((res) => {
that.$message.success("删除成功");
that.getLists();
that.getList();
return res;
}).catch((err) => {
return err;
});
}).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;
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.visible = false;
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) {
this.selectionFilters = filters;