Sfoglia il codice sorgente

fix: 增加删除接口

Howie 1 anno fa
parent
commit
34c5a53269
3 ha cambiato i file con 22 aggiunte e 6 eliminazioni
  1. 7 0
      src/api/common.js
  2. 14 1
      src/views/setting/other.vue
  3. 1 5
      src/views/supply/apply/engin_list.vue

+ 7 - 0
src/api/common.js

@@ -120,6 +120,13 @@ export function updateStockForceDetail(data) {
     data
   })
 }
+export function delTockForceDetail(data) {
+  return request({
+    url: '/stock/force/del',
+    method: 'post',
+    data
+  })
+}
 // 联查单据
 export function checkOrder(params) {
   return request({

+ 14 - 1
src/views/setting/other.vue

@@ -377,6 +377,12 @@
         </el-form>
       </div>
       <el-button type="primary" size="small" @click="submitForcedHold">确 定</el-button>
+      <el-button
+        size="small"
+        @click="handleDel"
+      >重置
+      </el-button>
+
     </div>
     <!-- //弹窗 -->
     <el-dialog :title="title" :visible.sync="dialogForm" width="30%" :show-close="false" :close-on-click-modal="false">
@@ -404,7 +410,8 @@ import {
   deleDictList,
   updateReceipt,
   getStockCostDict,
-  updateStockCostDict, getStockForceDetail, updateStockForceDetail
+  updateStockCostDict, getStockForceDetail, updateStockForceDetail,
+  delTockForceDetail
 } from '@/api/common'
 import { getKingDeeCategory } from '@/api/basic_data/material'
 import { getListStockV2 } from '@/api/basic_data/warehouse'
@@ -696,6 +703,12 @@ export default {
         this.value1 = ''
       })
     },
+    handleDel() {
+      delTockForceDetail().then(res => {
+        this.getStockForceDetail()
+        this.$successMsg('重置成功')
+      })
+    },
     submitForcedHold() {
       if (!this.forcedHoldForm.warehouse) {
         this.$errorMsg('请选择仓库')

+ 1 - 5
src/views/supply/apply/engin_list.vue

@@ -328,11 +328,7 @@ export default {
             {this.$checkBtnRole('edit', this.$route.meta.roles) &&
             (!row.automaticStatus &&
             (row.examineStatus === 'SAVE' || row.examineStatus === 'FAIL') &&
-            row.type === 1) || (this.isCustomer &&
-                !row.automaticStatus &&
-                (row.examineStatus === 'SAVE' || row.examineStatus === 'FAIL') &&
-                row.type != 2 &&
-                row.type !== 1) ? (
+            row.type === 1) ? (
                 <el-button
                   size='mini'
                   type='text'