fix:出入库记录do_out、other_in、pur_in中mioitem可以撤回并删除
This commit is contained in:
parent
e7b03c0ca6
commit
d8d9fbf914
|
@ -185,6 +185,13 @@ export default {
|
|||
data);
|
||||
}
|
||||
},
|
||||
revertDel:{
|
||||
name: "撤回并删除",
|
||||
req: async function(id){
|
||||
return await http.post(
|
||||
`${config.API_URL}/inm/mioitem/${id}/revert_and_del/`);
|
||||
}
|
||||
}
|
||||
},
|
||||
// mioitemw
|
||||
mioitemw: {
|
||||
|
|
|
@ -170,13 +170,7 @@
|
|||
link
|
||||
type="primary"
|
||||
@click="table_check(scope.row)"
|
||||
v-if="
|
||||
scope.row.test_date == null &&
|
||||
mioObj.state == 20 &&
|
||||
(type == 'pur_in' ||
|
||||
type == 'do_in' ||
|
||||
type == 'other_in')
|
||||
"
|
||||
v-if="scope.row.test_date == null &&mioObj.state == 20 &&(type == 'pur_in' ||type == 'do_in' ||type == 'other_in')"
|
||||
v-auth="'mioitem.test'"
|
||||
>
|
||||
检验
|
||||
|
@ -195,7 +189,7 @@
|
|||
@click="check_reSet(scope.row)"
|
||||
v-if="scope.row.test_date !== null"
|
||||
>
|
||||
撤回
|
||||
检验作废
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
|
@ -212,7 +206,15 @@
|
|||
>
|
||||
物料标签
|
||||
</el-link>
|
||||
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
@click="check_revert(scope.row)"
|
||||
v-if="mioObj.state == 20&&(mioObj.type=='do_out'||mioObj.type=='other_in'||mioObj.type=='pur_in')"
|
||||
v-auth="'mioitem.update'"
|
||||
>
|
||||
撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
|
@ -405,6 +407,21 @@ export default {
|
|||
});
|
||||
}).catch(() => {});
|
||||
},
|
||||
//撤回并删除
|
||||
check_revert(row){
|
||||
let that = this;
|
||||
that.$confirm(`该记录已提交,确定撤回吗?`, "提示", {
|
||||
type: "warning",
|
||||
}).then(() => {
|
||||
console.log('确定删除');
|
||||
that.$API.inm.mioitem.revertDel.req(row.id).then((res) => {
|
||||
that.$message.success("撤回成功");
|
||||
that.$refs.table.refresh();
|
||||
}).catch((err) => {
|
||||
return err;
|
||||
});
|
||||
}).catch(() => {});
|
||||
},
|
||||
//检验
|
||||
table_check(row) {
|
||||
this.mioitemId = row.id;
|
||||
|
|
Loading…
Reference in New Issue