提交
This commit is contained in:
1 parent
493f8d6756
commit
d84f4b944c
406 files changed
+58954
-10376
No files matched your search
@@ -371,8 +371,8 @@
|
||||
</el-button>
|
||||
<el-button
|
||||
class="btn-op-item danger"
|
||||
:disabled="!canDeleteRecord(row)"
|
||||
:title="canDeleteRecord(row) ? '' : '仅支持删除当天及之后日期的记录'"
|
||||
:disabled="!canDeleteRecord(row) || !canDeleteByCreator(row)"
|
||||
:title="!canDeleteRecord(row) ? '仅支持删除当天及之后日期的记录' : canDeleteByCreator(row) ? '' : CREATOR_DELETE_TIP"
|
||||
@click="handleDelete(row)"
|
||||
>
|
||||
<el-icon><Delete /></el-icon>
|
||||
@@ -514,6 +514,7 @@
|
||||
View
|
||||
} from '@element-plus/icons-vue'
|
||||
import DbCrmCustomerSelect from '@/components/business/db/DbCrmCustomerSelect.vue'
|
||||
import { canDeleteByCreator, CREATOR_DELETE_TIP } from '@/utils/creator-delete'
|
||||
import DbCrmProductSelect from '@/components/business/db/DbCrmProductSelect.vue'
|
||||
import DbInventoryRelatedViewDialog from '@/components/business/db/DbInventoryRelatedViewDialog.vue'
|
||||
import DbPoundSlipQrcodeDialog from '@/components/business/db/DbPoundSlipQrcodeDialog.vue'
|
||||
@@ -884,6 +885,10 @@
|
||||
$modal.msgWarning('仅支持删除当天及之后日期的记录,历史数据不可删除')
|
||||
return
|
||||
}
|
||||
if (!canDeleteByCreator(row)) {
|
||||
$modal.msgWarning(CREATOR_DELETE_TIP)
|
||||
return
|
||||
}
|
||||
try {
|
||||
await $modal.confirm('确定要删除这条记录吗?')
|
||||
await inventoryApi.delete(row.id)
|
||||
|
||||
@@ -287,7 +287,12 @@
|
||||
<el-icon><DocumentAdd /></el-icon>
|
||||
生成出入库单
|
||||
</el-button>
|
||||
<el-button class="btn-op-item danger" @click="handleDelete(row.id)">
|
||||
<el-button
|
||||
class="btn-op-item danger"
|
||||
:disabled="!canDeleteByCreator(row)"
|
||||
:title="canDeleteByCreator(row) ? '' : CREATOR_DELETE_TIP"
|
||||
@click="handleDelete(row)"
|
||||
>
|
||||
<el-icon><Delete /></el-icon>
|
||||
删除
|
||||
</el-button>
|
||||
@@ -459,6 +464,7 @@
|
||||
import DbPlanRelatedViewDialog from '@/components/business/db/DbPlanRelatedViewDialog.vue'
|
||||
import { useDbInstantSearch } from '@/composables/useDbInstantSearch'
|
||||
import { $modal } from '@/utils/modal'
|
||||
import { canDeleteByCreator, CREATOR_DELETE_TIP } from '@/utils/creator-delete'
|
||||
import {
|
||||
planApi,
|
||||
type Plan,
|
||||
@@ -769,10 +775,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
const handleDelete = async (id: string) => {
|
||||
const handleDelete = async (row: Plan) => {
|
||||
if (!canDeleteByCreator(row)) {
|
||||
$modal.msgWarning(CREATOR_DELETE_TIP)
|
||||
return
|
||||
}
|
||||
try {
|
||||
await $modal.confirm('确定要删除这个计划吗?')
|
||||
await planApi.delete(id)
|
||||
await planApi.delete(row.id)
|
||||
$modal.msgSuccess('删除成功')
|
||||
loadData()
|
||||
} catch {
|
||||
|
||||
Reference in new issue
Block a user