feat: 库存增加撤销功能
This commit is contained in:
parent
0ef2c8ba18
commit
7de24e53c7
|
|
@ -103,6 +103,14 @@ export default {
|
|||
);
|
||||
}
|
||||
},
|
||||
revert: {
|
||||
name: "撤销",
|
||||
req: async function(id){
|
||||
return await http.post(
|
||||
`${config.API_URL}/inm/mio/${id}/revert/`,
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
// 出入库明细
|
||||
mioitem: {
|
||||
|
|
|
|||
|
|
@ -44,6 +44,8 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="有效期" prop="expiration_date">
|
||||
</el-table-column>
|
||||
<el-table-column label="更新时间" prop="update_time">
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
|
|
|
|||
|
|
@ -44,6 +44,8 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="有效期" prop="expiration_date">
|
||||
</el-table-column>
|
||||
<el-table-column label="更新时间" prop="update_time">
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
|
|
|
|||
|
|
@ -53,6 +53,9 @@
|
|||
v-if="scope.row.state == 10">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button link type="warning" @click="revert(scope.row)" v-auth="'mio.submit'" v-if="scope.row.state == 20">
|
||||
撤销
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
|
|
@ -141,6 +144,19 @@ export default {
|
|||
});
|
||||
}).catch(() => { });
|
||||
},
|
||||
revert(row) {
|
||||
this.$confirm(`确定撤销该操作吗?`, "提示", {
|
||||
type: "warning",
|
||||
}).then(() => {
|
||||
this.$API.inm.mio.revert.req(row.id).then((res) => {
|
||||
this.$message.success("撤销成功");
|
||||
this.$refs.table.refresh();
|
||||
return res;
|
||||
}).catch((err) => {
|
||||
return err;
|
||||
});
|
||||
}).catch(() => { });
|
||||
},
|
||||
table_submit(row) {
|
||||
this.$API.inm.mio.submit.req(row.id).then(res => {
|
||||
this.$message.success("提交成功");
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="有效期" prop="expiration_date">
|
||||
</el-table-column>
|
||||
<el-table-column label="更新时间" prop="update_time">
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="有效期" prop="expiration_date">
|
||||
</el-table-column>
|
||||
<el-table-column label="更新时间" prop="update_time">
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
|
|
|
|||
Loading…
Reference in New Issue