diff --git a/src/views/electronic_waybill_management/customer_management/add.vue b/src/views/electronic_waybill_management/customer_management/add.vue index 74cc1a3..2cf9d5d 100644 --- a/src/views/electronic_waybill_management/customer_management/add.vue +++ b/src/views/electronic_waybill_management/customer_management/add.vue @@ -170,7 +170,7 @@ const fnSubmit = async () => { await addSafetyCustomerView(formData); ElMessage.success("添加成功"); - router.push("/electronic_waybill_management/customer_management"); + router.back(); // 重置表单 data.form.TRANSPORTATIONCOMPANY = ""; data.form.CUSTOMERTYPE = ""; diff --git a/src/views/electronic_waybill_management/customer_management/edit.vue b/src/views/electronic_waybill_management/customer_management/edit.vue index 8d43421..8edf602 100644 --- a/src/views/electronic_waybill_management/customer_management/edit.vue +++ b/src/views/electronic_waybill_management/customer_management/edit.vue @@ -89,7 +89,13 @@ 删除 @@ -107,7 +113,7 @@ diff --git a/src/views/electronic_waybill_management/location_managemen/index.vue b/src/views/electronic_waybill_management/location_managemen/index.vue index 7632d16..63b25a5 100644 --- a/src/views/electronic_waybill_management/location_managemen/index.vue +++ b/src/views/electronic_waybill_management/location_managemen/index.vue @@ -106,8 +106,14 @@ const deleteItem = async (value) => { await ElMessageBox.confirm(`确定要删除吗?`, { type: "warning", }); - await deleteSafetyLocationView({ LOCATIONMANAGEMENT_ID: value }); - ElMessage.success("删除成功"); + const result = await deleteSafetyLocationView({ + LOCATIONMANAGEMENT_ID: value, + }); + if (result.pd) { + ElMessage.warning("此地点已被运单使用,无法删除"); + } else { + ElMessage.success("删除成功"); + } fnGetData(); }; diff --git a/src/views/electronic_waybill_management/waybill_registration/index.vue b/src/views/electronic_waybill_management/waybill_registration/index.vue index a1dc9ef..2d619c7 100644 --- a/src/views/electronic_waybill_management/waybill_registration/index.vue +++ b/src/views/electronic_waybill_management/waybill_registration/index.vue @@ -58,7 +58,7 @@ - + @@ -67,8 +67,21 @@ - + @@ -122,25 +129,16 @@ import useListData from "@/assets/js/useListData.js"; import { onMounted, ref } from "vue"; import { layoutFnGetNotificationsClassification } from "@/request/safety_production_related.js"; import { - dateteSecurityAllWaybillre, deleteSafetyWaybillreView, getSecurityWaybillreList, } from "@/request/waybill_registration.js"; import { ElMessageBox, ElMessage } from "element-plus"; -import { debounce } from "throttle-debounce"; -import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js"; import { useRouter } from "vue-router"; const router = useRouter(); -const buttonJurisdiction = await useButtonJurisdiction("riskunit"); const tableRef = ref(null); const { list, pagination, searchForm, fnGetData, fnResetPagination } = useListData(getSecurityWaybillreList); -const fnResetPaginationTransfer = () => { - fnResetPagination({ - DEPTIDS: searchForm.value.DEPTIDS?.join(","), - }); -}; // 删除事件 const deleteItem = async (value) => { await ElMessageBox.confirm(`确定要删除吗?`, { @@ -150,25 +148,6 @@ const deleteItem = async (value) => { ElMessage.success("删除成功"); fnGetData(); }; -const fnBatchDelete = debounce( - 1000, - async () => { - // eslint-disable-next-line no-undef - const selectionData = tableRef.value.getSelectionRows(); - if (selectionData.length === 0) { - ElMessage.warning("请选中要删除的项"); - return; - } - await ElMessageBox.confirm("确定要删除选中的数据吗?", { type: "warning" }); - const DATA_IDS = selectionData - .map((item) => item.WAYBILLREGISTRATION_ID) - .join(","); - await dateteSecurityAllWaybillre({ DATA_IDS }); - ElMessage.success("删除成功"); - fnResetPaginationTransfer(); - }, - { atBegin: true } -); const relatedClassificationList = ref(null); onMounted(async () => { diff --git a/src/views/electronic_waybill_management/waybill_registration/view.vue b/src/views/electronic_waybill_management/waybill_registration/view.vue new file mode 100644 index 0000000..fbdf5d4 --- /dev/null +++ b/src/views/electronic_waybill_management/waybill_registration/view.vue @@ -0,0 +1,97 @@ + + + + +