aXin-0810 1 rok temu
rodzic
commit
b3ebf5b06a

+ 8 - 0
src/api/goodsPurchasedStored.js

@@ -96,6 +96,14 @@ export function goodsPurchaseItemDelCode(params) {
   })
 }
 
+export function goodsPurchaseDel(params) {
+  return request({
+    url: `/goods/purchase/del`,
+    method: 'post',
+    params
+  })
+}
+
 export function goodsPurchaseItemImportCode(data) {
   return handleImport('/goods/purchase/item/import/code', data.formdata, data.id || '')
 }

+ 8 - 0
src/api/merchandisePurchaseReturn.js

@@ -80,6 +80,14 @@ export function goodsPurchaseRetDetail(params) {
   })
 }
 
+export function goodsPurchaseRetDel(params) {
+  return request({
+    url: `/goods/purchase/ret/del`,
+    method: 'post',
+    params
+  })
+}
+
 export function goodsPurchaseRetItemImportCode(data) {
   return handleImport('/goods/purchase/ret/item/import/code', data.formdata, data.id || '')
 }

+ 19 - 1
src/views/salesPurchasing/goodsPurchasedStored/index.vue

@@ -68,7 +68,8 @@ import {
   goodsPurchaseAdd,
   goodsPurchaseDetail,
   goodsPurchaseSubmit,
-  goodsPurchaseConfirm
+  goodsPurchaseConfirm,
+  goodsPurchaseDel
 } from '@/api/goodsPurchasedStored.js'
 import form_ty from '../mixins/common_form'
 import storage_table from '../mixins/storage_table'
@@ -234,6 +235,23 @@ export default {
               this.openDetailForm(row, 1)
             }
           },
+          del: {
+            prompt: '是否确定删除',
+            conditions: ({ row, index, column }) => {
+              return row.status == 'SAVE'
+            },
+            click: ({ row, index, column }) => {
+              goodsPurchaseDel({
+                id: row.id
+              }).then(res => {
+                this.$message({
+                  type: 'success',
+                  message: '删除成功'
+                })
+                this.$refs.pageRef.refreshList()
+              })
+            }
+          },
           detail: {
             click: ({ row, index, column }) => {
               this.openDetailForm(row, 2)

+ 19 - 1
src/views/salesPurchasing/merchandisePurchaseReturn/index.vue

@@ -68,7 +68,8 @@ import {
   goodsPurchaseRetAdd,
   goodsPurchaseRetSubmit,
   goodsPurchaseRetConfirm,
-  goodsPurchaseRetDetail
+  goodsPurchaseRetDetail,
+  goodsPurchaseRetDel
 } from '@/api/merchandisePurchaseReturn.js'
 import form_ty from '../mixins/common_form'
 import out_storage_table from '../mixins/out_storage_table'
@@ -231,6 +232,23 @@ export default {
               this.openDetailForm(row, 1)
             }
           },
+          del: {
+            prompt: '是否确定删除',
+            conditions: ({ row, index, column }) => {
+              return row.status == 'SAVE'
+            },
+            click: ({ row, index, column }) => {
+              goodsPurchaseRetDel({
+                id: row.id
+              }).then(res => {
+                this.$message({
+                  type: 'success',
+                  message: '删除成功'
+                })
+                this.$refs.pageRef.refreshList()
+              })
+            }
+          },
           detail: {
             click: ({ row, index, column }) => {
               this.openDetailForm(row, 2)