diff --git a/src/views/materialManagement/productionMaterial/MmRecordInbound.vue b/src/views/materialManagement/productionMaterial/MmRecordInbound.vue
index f6e9664..63ea3f1 100644
--- a/src/views/materialManagement/productionMaterial/MmRecordInbound.vue
+++ b/src/views/materialManagement/productionMaterial/MmRecordInbound.vue
@@ -91,24 +91,30 @@
-
+
@@ -303,7 +309,7 @@ import {
getMmRecordInbound
} from '@/api/materialManagement/productionMaterial/mmrecordinbound.js'
import { listMmTransactionType } from '@/api/materialManagement/productionMaterial/mmtransactiontype.js'
-import { getMaterialOption, getLocationOption } from '@/api/materialManagement/productionMaterial/mminventory.js'
+import { getMaterialOption, getLocationOption, cancelMmInventory } from '@/api/materialManagement/productionMaterial/mminventory.js'
import { listUser } from '@/api/system/user.js'
import useUserStore from '@/store/modules/user'
import { exportMmRecordInbound } from '@/api/materialManagement/productionMaterial/mmrecordinbound.js'
@@ -664,6 +670,27 @@ function handleExport() {
})
}
+/** 撤销出/入库记录 */
+function handleCancel(row) {
+ proxy
+ .$confirm('是否确认撤销入库记录?', '警告', {
+ confirmButtonText: proxy.$t('common.ok'),
+ cancelButtonText: proxy.$t('common.cancel'),
+ type: 'warning'
+ })
+ .then(() => {
+ cancelMmInventory({ id: row.id, type: 1 }).then((res) => {
+ const { code, msg } = res
+ if (code == 200) {
+ proxy.$modal.msgSuccess('撤销成功')
+ queryRecord()
+ } else {
+ proxy.$modal.msgError(msg)
+ }
+ })
+ })
+}
+
handleQuery()
getTypeOfWarehousingList()
getMaterialCodeList()
diff --git a/src/views/materialManagement/productionMaterial/MmRecordOutbound.vue b/src/views/materialManagement/productionMaterial/MmRecordOutbound.vue
index 4b4dcdc..90f16d2 100644
--- a/src/views/materialManagement/productionMaterial/MmRecordOutbound.vue
+++ b/src/views/materialManagement/productionMaterial/MmRecordOutbound.vue
@@ -93,24 +93,29 @@
-
+
@@ -275,7 +280,7 @@ import {
} from '@/api/materialManagement/productionMaterial/mmrecordoutbound.js'
import { listMmTransactionType } from '@/api/materialManagement/productionMaterial/mmtransactiontype.js'
import { listMmMaterial } from '@/api/materialManagement/productionMaterial/mmmaterial.js'
-import { getLocationOption } from '@/api/materialManagement/productionMaterial/mminventory.js'
+import { getLocationOption, cancelMmInventory } from '@/api/materialManagement/productionMaterial/mminventory.js'
import { listUser } from '@/api/system/user.js'
import dateOptions from '@/utils/dateOptions.js'
import useUserStore from '@/store/modules/user'
@@ -630,6 +635,27 @@ function handleExport() {
})
}
+/** 撤销出/入库记录 */
+function handleCancel(row) {
+ proxy
+ .$confirm('是否确认撤销出库记录?', '警告', {
+ confirmButtonText: proxy.$t('common.ok'),
+ cancelButtonText: proxy.$t('common.cancel'),
+ type: 'warning'
+ })
+ .then(() => {
+ cancelMmInventory({ id: row.id, type: 2 }).then((res) => {
+ const { code, msg } = res
+ if (code == 200) {
+ proxy.$modal.msgSuccess('撤销成功')
+ queryRecord()
+ } else {
+ proxy.$modal.msgError(msg)
+ }
+ })
+ })
+}
+
handleQuery()
getTypeOfWarehousingList()
getMaterialList()