浏览代码

【新增】零售/工程发货申请单-弃审

莫绍宝 3 年之前
父节点
当前提交
4f445410fb
共有 3 个文件被更改,包括 70 次插入6 次删除
  1. 18 0
      src/api/supply/apply.js
  2. 26 3
      src/views/supply/apply/apply_list.vue
  3. 26 3
      src/views/supply/apply/engin_list.vue

+ 18 - 0
src/api/supply/apply.js

@@ -27,6 +27,15 @@ export function examineApply(params) {
   })
 }
 
+// 零售发货申请单 - 弃审
+export function abandonApply(params) {
+  return request({
+    url: '/invoice/giveUp',
+    method: 'post',
+    params
+  })
+}
+
 // 获取仓位列表
 export function getPositionList(params) {
   return request({
@@ -173,6 +182,15 @@ export function examineEngin(params) {
   })
 }
 
+// 工程发货申请单 - 弃审
+export function abandonEngin(params) {
+  return request({
+    url: '/invoice/projectGiveUp',
+    method: 'post',
+    params
+  })
+}
+
 // 工程发货申请单 - 申请/撤回
 export function submitEngin(params) {
   return request({

+ 26 - 3
src/views/supply/apply/apply_list.vue

@@ -101,12 +101,27 @@
             </el-table-column>
             <el-table-column align="center" label="操作" width="180" fixed="right">
               <template slot-scope="scope">
-                <el-popconfirm style="margin-right: 10px;" title="确定申请吗?" @onConfirm="handleSubmit(scope.row.id, 'WAIT')" v-if="$checkBtnRole('apply', $route.meta.roles) && scope.row.examineStatus === 'SAVE'" >
+                <el-popconfirm
+                  style="margin-right: 10px;" 
+                  title="确定申请吗?" 
+                  @onConfirm="handleSubmit(scope.row.id, 'WAIT')" 
+                  v-if="$checkBtnRole('apply', $route.meta.roles) && scope.row.examineStatus === 'SAVE'" >
                   <el-button slot="reference" type="text">申请</el-button>
                 </el-popconfirm>
-                <el-popconfirm style="margin-right: 10px;" title="确定撤回吗?" @onConfirm="handleSubmit(scope.row.id, 'SAVE')" v-if="$checkBtnRole('apply', $route.meta.roles) && scope.row.examineStatus === 'WAIT'" >
+                <el-popconfirm
+                  style="margin-right: 10px;" 
+                  title="确定撤回吗?" 
+                  @onConfirm="handleSubmit(scope.row.id, 'SAVE')"
+                  v-if="$checkBtnRole('apply', $route.meta.roles) && scope.row.examineStatus === 'WAIT'" >
                   <el-button slot="reference" type="text">撤回</el-button>
                 </el-popconfirm>
+                <el-popconfirm 
+                  style="margin-right: 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>
                 <el-button type="text" @click="toForm(scope.row)" v-if="$checkBtnRole('edit', $route.meta.roles) && scope.row.examineStatus === 'SAVE'">编辑</el-button>
                 <el-button type="text" @click="toExamine(scope.row)" v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'WAIT'">审单</el-button>
                 <el-button type="text" @click="toDetail(scope.row)">详情</el-button>
@@ -141,7 +156,7 @@
 </template>
 
 <script>
-import { getApplyList, submitApply, deleteApply } from "@/api/supply/apply";
+import { getApplyList, submitApply, deleteApply, abandonApply } from "@/api/supply/apply";
 import ApplyDetail from "@/views/supply/apply/components/apply_detail";
 import ApplyExamine from "@/views/supply/apply/components/apply_examine";
 import ApplyForm from "@/views/supply/apply/components/apply_form";
@@ -314,6 +329,14 @@ export default {
         this.getList();
       })
     },
+
+    // 弃审
+    handleAbandon(id) {
+      abandonApply({id}).then(res => {
+        this.$successMsg();
+        this.getList();
+      })
+    },
   }
 }
 </script>

+ 26 - 3
src/views/supply/apply/engin_list.vue

@@ -103,12 +103,27 @@
             </el-table-column>
             <el-table-column align="center" label="操作" width="180" fixed="right">
               <template slot-scope="scope">
-                <el-popconfirm style="margin-right: 10px;" title="确定申请吗?" @onConfirm="handleSubmit(scope.row.id, 'WAIT')" v-if="$checkBtnRole('apply', $route.meta.roles) && scope.row.examineStatus === 'SAVE'" >
+                <el-popconfirm
+                  style="margin-right: 10px;" 
+                  title="确定申请吗?" 
+                  @onConfirm="handleSubmit(scope.row.id, 'WAIT')" 
+                  v-if="$checkBtnRole('apply', $route.meta.roles) && scope.row.examineStatus === 'SAVE'" >
                   <el-button slot="reference" type="text">申请</el-button>
                 </el-popconfirm>
-                <el-popconfirm style="margin-right: 10px;" title="确定撤回吗?" @onConfirm="handleSubmit(scope.row.id, 'SAVE')" v-if="$checkBtnRole('apply', $route.meta.roles) && scope.row.examineStatus === 'WAIT'" >
+                <el-popconfirm
+                  style="margin-right: 10px;" 
+                  title="确定撤回吗?" 
+                  @onConfirm="handleSubmit(scope.row.id, 'SAVE')" 
+                  v-if="$checkBtnRole('apply', $route.meta.roles) && scope.row.examineStatus === 'WAIT'" >
                   <el-button slot="reference" type="text">撤回</el-button>
                 </el-popconfirm>
+                <el-popconfirm 
+                  style="margin-right: 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>
                 <el-button type="text" @click="toForm(scope.row)" v-if="$checkBtnRole('edit', $route.meta.roles) && scope.row.examineStatus === 'SAVE'">编辑</el-button>
                 <el-button type="text" @click="toExamine(scope.row)" v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'WAIT'">审单</el-button>
                 <el-button type="text" @click="toDetail(scope.row)">详情</el-button>
@@ -143,7 +158,7 @@
 </template>
 
 <script>
-import { getEnginList, submitEngin, deleteEngin } from "@/api/supply/apply";
+import { getEnginList, submitEngin, deleteEngin, abandonEngin } from "@/api/supply/apply";
 import EnginDetail from "@/views/supply/apply/components/engin_detail";
 import EnginExamine from "@/views/supply/apply/components/engin_examine";
 import EnginForm from "@/views/supply/apply/components/engin_form";
@@ -316,6 +331,14 @@ export default {
         this.getList();
       })
     },
+
+    // 弃审
+    handleAbandon(id) {
+      abandonEngin({id}).then(res => {
+        this.$successMsg();
+        this.getList();
+      })
+    },
   }
 }
 </script>