Browse Source

YT-2049便次时间配置,在供应商地点便次时间配置表中使用的数据仍能删除

intex_online20250311
张立 4 weeks ago
parent
commit
ee7188ed1e
  1. 5
      src/api/wms/deliTime/index.ts
  2. 5
      src/views/wms/basicDataManage/supplierManage/deliTime/index.vue

5
src/api/wms/deliTime/index.ts

@ -36,7 +36,10 @@ export const createDeliTime = async (data: DeliTimeVO) => {
export const updateDeliTime = async (data: DeliTimeVO) => {
return await request.put({ url: `/wms/deli-time/update`, data })
}
// 校验是否使用
export const getIsUse = async (id: number) => {
return await request.get({ url: `/wms/deli-time/get?id=` + id })
}
// 删除便次时间配置
export const deleteDeliTime = async (id: number) => {
return await request.delete({ url: `/wms/deli-time/delete?id=` + id })

5
src/views/wms/basicDataManage/supplierManage/deliTime/index.vue

@ -203,6 +203,11 @@ const openDetail = (row: any, titleName: any, titleValue: any) => {
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
const isUse = await DeliTimeApi.getIsUse(id)
if (isUse) {
message.warning('该条数据在供应商地点便次时间配置表中使用的,不可以删除')
return
}
//
await message.delConfirm()
//

Loading…
Cancel
Save