import { checkLock } from "@/api/lock/lock" export async function checkLocks(data) { let option await checkLock(data).then(res => { //此单据未被锁定 if (res.data.code === 200) { option = false } else { //此单据已被锁定 option = true } }) return option } export async function inLocks(moduleName, tableName, id, no) { const data = { moduleName: moduleName, tableName: tableName, billId: id, no: localStorage.getItem("browserID"), billNo: no }; this.inDetailsKey(this.$route.name, { moduleName: moduleName, tableName: tableName, billId: id, billNo: no }); await checkLock(data).then(res => { if (res.data.code == 200) { this.onLock(data).then(res => { if (res.data.code == 200) { return false } else { return true } }); } }); }