Parcourir la source

【新增】销售出库单-弃审

莫绍宝 il y a 3 ans
Parent
commit
91b9c7d1bd
2 fichiers modifiés avec 26 ajouts et 2 suppressions
  1. 9 0
      src/api/supply/sales.js
  2. 17 2
      src/views/supply/sales/sales_list.vue

+ 9 - 0
src/api/supply/sales.js

@@ -27,6 +27,15 @@ export function examineData(params) {
   })
 }
 
+// 弃审
+export function abandonData(params) {
+  return request({
+    url: '/sale/order/trialApproval',
+    method: 'post',
+    params
+  })
+}
+
 // 审批进入判断
 export function examineJudge(params) {
   return request({

+ 17 - 2
src/views/supply/sales/sales_list.vue

@@ -118,6 +118,13 @@
               <template slot-scope="scope">
                 <el-button type="text" @click="toDetail(scope.row)">详情</el-button>
                 <el-button type="text" @click="toExamine(scope.row)" v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'WAIT'">审批</el-button>
+                <el-popconfirm 
+                  style="margin-left: 10px;" 
+                  title="确定弃审吗?" 
+                  @onConfirm="handleAbandon(scope.row.id)" 
+                  v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'OK'" >
+                  <el-button slot="reference" type="text">弃审</el-button>
+                </el-popconfirm>
               </template>
             </el-table-column>
           </el-table>
@@ -147,7 +154,7 @@
 </template>
 
 <script>
-import { getList, examineJudge, examineBatch } from "@/api/supply/sales";
+import { getList, examineJudge, examineBatch, abandonData } from "@/api/supply/sales";
 import SalesDetail from "@/views/supply/sales/components/sales_detail";
 import SalesExamine from "@/views/supply/sales/components/sales_examine";
 import ExamineDialog from "@/components/Common/examine-dialog";
@@ -206,7 +213,7 @@ export default {
       examineForm: {
         status: '',
         remark: '',
-      }
+      },
     }
   },
 
@@ -346,6 +353,14 @@ export default {
         this.$successMsg('修改成功');
       })
     },
+
+    // 弃审
+    handleAbandon(id) {
+      abandonData({id}).then(res => {
+        this.$successMsg();
+        this.getList();
+      })
+    },
   }
 }
 </script>