Pārlūkot izejas kodu

Finish Hotfix-mo-30

莫绍宝 3 gadi atpakaļ
vecāks
revīzija
be373c0615

+ 19 - 1
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({
@@ -84,7 +93,7 @@ export function editApply(params) {
 // 获取仓库列表
 export function getWarehouseList(params) {
   return request({
-    url: '/stock/listStock',
+    url: '/stock/manager/listStock',
     method: 'get',
     params
   })
@@ -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({

+ 1 - 1
src/api/supply/engin.js

@@ -421,7 +421,7 @@ export function returnCom(params) {
 // 获取仓库列表
 export function getWarehouseList(params) {
   return request({
-    url: '/stock/listStock',
+    url: '/stock/manager/listStock',
     method: 'get',
     params
   })

+ 1 - 1
src/api/supply/pickup.js

@@ -21,7 +21,7 @@ export function getDetail(params) {
 // 获取仓库列表
 export function getWarehouseList(params) {
   return request({
-    url: '/stock/listStock',
+    url: '/stock/manager/listStock',
     method: 'get',
     params
   })

+ 1 - 1
src/api/supply/policy.js

@@ -102,7 +102,7 @@ export function getWalletList(params) {
 // 获取仓库列表
 export function getWarehouseList(params) {
   return request({
-    url: '/stock/listStock',
+    url: '/stock/manager/listStock',
     method: 'get',
     params
   })

+ 1 - 1
src/api/supply/retail.js

@@ -111,7 +111,7 @@ export function getWalletList(params) {
 // 获取仓库列表
 export function getWarehouseList(params) {
   return request({
-    url: "/stock/listStock",
+    url: "/stock/manager/listStock",
     method: "get",
     params,
   });

+ 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>

+ 1 - 1
src/views/supply/engin/components/commerce_form.vue

@@ -755,7 +755,7 @@ export default {
             delete item.wallets;
           })
 
-          let saleManItem = this.outSalesmanList.find(o => o.adminUserId == this.mainForm.salesMan);
+          let saleManItem = this.mainForm.salesMan ? this.mainForm.salesManthis.outSalesmanList.find(o => o.adminUserId == this.mainForm.salesMan) : '';
           let params = {
             enginOrderId: this.mainForm.orderNum,
             // orderDate: this.mainForm.orderDate,

+ 1 - 1
src/views/supply/engin/components/home_form.vue

@@ -1042,7 +1042,7 @@ export default {
           })
 
           let saleTypeItem = this.salesTypeList.find(o => o.id == this.mainForm.saleType);
-          let saleManItem = this.outSalesmanList.find(o => o.adminUserId == this.mainForm.salesMan);
+          let saleManItem = this.mainForm.salesMan ? this.mainForm.salesManthis.outSalesmanList.find(o => o.adminUserId == this.mainForm.salesMan) : '';
           let params = {
             enginOrderId: this.mainForm.orderNum,
             // orderDate: this.mainForm.orderDate,

+ 1 - 1
src/views/supply/retail/components/retail_form.vue

@@ -681,7 +681,7 @@ export default {
             delete item.wallets;
           })
 
-          let saleManItem = this.outSalesmanList.find(o => o.adminUserId == this.mainForm.salesMan);
+          let saleManItem = this.mainForm.salesMan ? this.mainForm.salesManthis.outSalesmanList.find(o => o.adminUserId == this.mainForm.salesMan) : '';
           let params = {
             // theTime: this.mainForm.date + ' 00:00:00',
             // mainId: this.mainForm.type,