浏览代码

Merge branch 'master' of http://47.100.3.209:3000/gdc/yiliangyiyun-pc

ccjgmwz 3 年之前
父节点
当前提交
4fbe331caf

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

@@ -56,6 +56,8 @@ export const API_GET_WEIGHTCHECK_GETWEIGHINGLIST = '/weighingManagement/selectWe
 export const API_POST_WEIGHTCHECK_TARE= '/weighingManagement/api/editTare'
 //毛重检斤保存
 export const API_POST_WEIGHTCHECK_GROSSWEIGHT = '/weighingManagement/api/editGrossWeight'
+//检斤管理删除
+export const API_POST_INSPECT_GETWEIGHTDELETE = '/weighingManagement/api/deleteWeightcheck'
 //付款查看
 export const API_GET_PAYMENT = '/paymentManagement/getInfo'
 // 付款结算

+ 3 - 0
src/model/houseSelfCollect/index.js

@@ -51,6 +51,7 @@ import {
   API_GAT_GETQRCODE,
   API_GAT_INFO,
   API_POST_WORKFLOW_TASK,
+  API_POST_INSPECT_GETWEIGHTDELETE,
   API_POST_SUSPENDINSTANCE
 } from '@/api/V2/houseSelfCollect'
 //客户管理列表
@@ -111,6 +112,8 @@ export const getweighingList = appRx.get(API_GET_WEIGHTCHECK_GETWEIGHINGLIST, er
 export const tare = appRx.post(API_POST_WEIGHTCHECK_TARE, errorCatcher, errorHandle, filter)
 //毛重检斤保存
 export const grossWeight = appRx.post(API_POST_WEIGHTCHECK_GROSSWEIGHT, errorCatcher, errorHandle, filter)
+//检斤删除
+export const getweighingDelete = appRx.post(API_POST_INSPECT_GETWEIGHTDELETE, errorCatcher, errorHandle, filter)
 //付款信息查看
 export const getpaymentexamine = appRx.get(API_GET_PAYMENT, errorCatcher, errorHandle, filter)
 //付款信息结算

+ 32 - 0
src/views/houseSelfCollect/weighingManagement.vue

@@ -106,6 +106,10 @@
           <el-button :disabled="scope.row.allow == 2" @click="weightCheck(scope.row, 2)"
             v-if=" (scope.row.status == '已称毛重' || scope.row.status == '已称皮重') "
             v-hasPermission="`acquisitionManagement.acquisitionWeight.weight`">皮重</el-button>
+          <div style="display: inline-block;">
+            <el-button @click="del(scope.row)" type="danger"
+              v-hasPermission="`acquisitionManagement.acquisitionQuality.delete`">删除</el-button>
+          </div>
           <el-button @click="print(scope.row)" v-if="scope.row.status == '已称皮重' ||scope.row.status == '已称毛重'"
             v-hasPermission="`acquisitionManagement.acquisitionWeight.print`">打印</el-button>
         </template>
@@ -146,6 +150,7 @@
 <script>
   import {
     getweighingList,
+    getweighingDelete,
     selectWarehouseSelf,
     getPrint
   } from '@/model/houseSelfCollect/index'
@@ -476,6 +481,33 @@
         }
 
       },
+      del(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
+          })
+      },
       find() {
         this.getList()
       },