ccjgmwz 3 tahun lalu
induk
melakukan
6aca1c837f

+ 2 - 0
src/api/V2/houseSelfCollect/index.js

@@ -110,5 +110,7 @@ export const API_POST_IMPORT ='/qualityInspectionManagement/api/importQuality'
 export const API_GET_SETTLEACCOUT = '/warehouseInOutInfo/getInfo'
 // 退回
 export const API_POST_RETURN= '/weighingManagement/weightReturn'
+// 退回
+export const API_POST_DELETE= '/weighingManagement/deleteWeightcheck'
 // 新检斤保存
 export const API_POST_SUBMIT= '/warehouseInOutInfo/api/newInOutWarehouse'

+ 4 - 1
src/model/houseSelfCollect/index.js

@@ -57,7 +57,8 @@ import {
   API_GET_INSPECT_CONTRACTNO,
   API_GET_SETTLEACCOUT,
   API_POST_RETURN,
-  API_POST_SUBMIT
+  API_POST_SUBMIT,
+  API_POST_DELETE
 } from '@/api/V2/houseSelfCollect'
 //客户管理列表
 export const getCustomerManage = appRx.get(API_GET_CUSTOMER_MANAGE, errorCatcher, errorHandle, filter)
@@ -171,5 +172,7 @@ export const importWord = appRx.post(API_POST_IMPORT, errorCatcher, errorHandle,
 export const getsettleaccout = appRx.get(API_GET_SETTLEACCOUT, errorCatcher, errorHandle, filter)
 // 退回
 export const returnInfo = appRx.post(API_POST_RETURN, errorCatcher, errorHandle, filter)
+// 删除
+export const deleteInfo = appRx.post(API_POST_DELETE, errorCatcher, errorHandle, filter)
 // 新检斤保存
 export const newSubmit = appRx.post(API_POST_SUBMIT, errorCatcher, errorHandle, filter)

+ 30 - 1
src/views/houseSelfCollect/weightCheckRecord.vue

@@ -73,6 +73,7 @@
             <!-- <el-button size="small" @click="print(scope.row)">打印</el-button> -->
             <el-button @click="print(scope.row)" v-if="scope.row.status == '已称皮重' || scope.row.status == '已称毛重'" v-hasPermission="`acquisitionManagement.acquisitionWeight.print`">打印</el-button>
             <el-button @click="backInfo(scope.row)" v-if="scope.row.status == '已称皮重'">退回</el-button>
+            <el-button @click="delete(scope.row)" v-if="scope.row.status == '已称毛重'">删除</el-button>
           </template>
         </el-table-column>
       </el-table>
@@ -148,7 +149,8 @@
     selectWarehouseSelf,
     getweighingList,
     getPrint,
-    returnInfo
+    returnInfo,
+    getweighingDelete
   } from '@/model/houseSelfCollect/index'
   import weightCheckPrint from './component/weightCheckPrint.vue'
   export default {
@@ -304,6 +306,33 @@
             })
           })
       },
+      delete(row){
+            //删除
+        this.$confirm('确定删除检斤信息?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            getweighingDelete({
+                id: row.id,
+              })
+              .toPromise()
+              .then((response) => {
+                this.$notify.success({
+                  title: '成功',
+                  message: '删除成功',
+                })
+                this.getList()
+              })
+              .catch((response) => {
+                // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+              })
+          })
+          .catch(() => {
+            return false
+          })
+      },
       typePrintCannelClick() {
         this.onePrint = false //单个打印标识
         this.dialogDataList = [] //打个打印取消时数组至空