소스 검색

审核按钮权限

buzhi 2 년 전
부모
커밋
20cbd916ae

+ 22 - 8
src/router/index.ts

@@ -37,14 +37,28 @@ const routes: Array<RouteRecordRaw> = [
37 37
     ]
38 38
   },
39 39
   {
40
-    path: "/InformationAudit/outWarehouseAuditDetail",
41
-    name: "outWarehouseAuditDetail",
42
-    component: () => import("@/views/InformationAudit/outWarehouseAudit/detail.vue")
43
-  },
44
-  {
45
-    path: "/InformationAudit/enterWarehouseAuditDetail",
46
-    name: "enterWarehouseAuditDetail",
47
-    component: () => import("@/views/InformationAudit/enterWarehouseAudit/detail.vue")
40
+    path: "/InformationAudit",
41
+    name: "InformationAudit",
42
+    redirect: "/InformationAudit/outWarehouseAudit",
43
+    component: layout,
44
+    children: [
45
+      {
46
+        path: "outWarehouseAuditDetail",
47
+        name: "outWarehouseAuditDetail",
48
+        component: () => import("@/views/InformationAudit/outWarehouseAudit/detail.vue"),
49
+        props(route){
50
+          return route.query
51
+        }
52
+      },
53
+      {
54
+        path: "enterWarehouseAuditDetail",
55
+        name: "enterWarehouseAuditDetail",
56
+        component: () => import("@/views/InformationAudit/enterWarehouseAudit/detail.vue"),
57
+        props(route){
58
+          return route.query
59
+        }
60
+      }
61
+    ]
48 62
   },
49 63
 ];
50 64
 

+ 8 - 5
src/views/InformationAudit/enterWarehouseAudit/detail.vue

@@ -71,7 +71,9 @@
71 71
                 :limit="1"
72 72
                 :on-exceed="handleExceed"
73 73
               >
74
-                <el-button v-if="formData.fileList.length == 0" style="margin-top: 10px" type="primary">选择文件</el-button>
74
+                <el-button v-if="formData.fileList.length == 0" style="margin-top: 10px" type="primary"
75
+                  >选择文件</el-button
76
+                >
75 77
               </el-upload>
76 78
             </el-form-item></el-col
77 79
           >
@@ -87,7 +89,7 @@
87 89
 </template>
88 90
 
89 91
 <script setup lang="ts">
90
-import { reactive, toRefs } from "vue";
92
+import { reactive, toRefs, onMounted } from "vue";
91 93
 import { getInAuditDetail, audit } from "@/api/inAndOut/inAudit/index";
92 94
 import { getDictItemList } from "@/api/admin/index";
93 95
 import { Search } from "@element-plus/icons-vue";
@@ -115,7 +117,7 @@ let formData = reactive({
115 117
   opinion: "",
116 118
   filePart: "",
117 119
   fileName: "",
118
-  fileList:[],
120
+  fileList: []
119 121
 });
120 122
 let paramsData = reactive({
121 123
   bucket: "bound"
@@ -270,10 +272,11 @@ const beforeRemove = (uploadFile: any, uploadFiles: any) => {
270 272
   );
271 273
 };
272 274
 
273
-getList();
274 275
 getOutboundTypeList();
275 276
 getIsAvailableList();
276
-// getProvinceList();
277
+onMounted(() => {
278
+  getList();
279
+});
277 280
 </script>
278 281
 
279 282
 <style lang="scss" scoped>

+ 19 - 11
src/views/InformationAudit/enterWarehouseAudit/index.vue

@@ -59,7 +59,10 @@
59 59
           >
60 60
           <el-button
61 61
             size=""
62
-            v-if="scope.row.status == '2' || scope.row.status == '4' || scope.row.status == '6'"
62
+            v-if="
63
+              (deptId == '9' && scope.row.status == '3') ||
64
+              (deptId == '10' && (scope.row.status == '2' || scope.row.status == '6'))
65
+            "
63 66
             type="warning"
64 67
             style="backgroundcolor: #dbc262"
65 68
             @click="handleProcess(scope.row)"
@@ -80,7 +83,7 @@
80 83
 </template>
81 84
 
82 85
 <script setup lang="ts">
83
-import { reactive, toRefs } from "vue";
86
+import { reactive, toRefs, onMounted } from "vue";
84 87
 import { getInAuditList } from "@/api/inAndOut/inAudit/index";
85 88
 import { getDictItemList } from "@/api/admin/index";
86 89
 import { Search } from "@element-plus/icons-vue";
@@ -94,7 +97,8 @@ const data = reactive({
94 97
   // dysfObject: {}, //调用省份
95 98
   spjdObject: {}, //审批节点
96 99
   dqspjdOptions: [],
97
-  spjdOptions: []
100
+  spjdOptions: [],
101
+  deptId: ""
98 102
 });
99 103
 let page = reactive({
100 104
   currentPage: 1,
@@ -108,7 +112,7 @@ let formData = reactive({
108 112
   status: ""
109 113
 });
110 114
 
111
-let { tableData, cklxOptions, cklxObject, spjdObject, dqspjdOptions, spjdOptions } = toRefs(data);
115
+let { tableData, cklxOptions, cklxObject, spjdObject, dqspjdOptions, spjdOptions, deptId } = toRefs(data);
112 116
 
113 117
 // 获取列表
114 118
 const getList = () => {
@@ -181,27 +185,31 @@ const handleReSearch = () => {
181 185
 // 审核
182 186
 const handleProcess = (row: any) => {
183 187
   router.push({
184
-    name:"enterWarehouseAuditDetail",
185
-    query:{
188
+    name: "enterWarehouseAuditDetail",
189
+    query: {
186 190
       id: row.inboundId,
187
-      type: "audit",
191
+      type: "audit"
188 192
     }
189 193
   });
190 194
 };
191 195
 // 查看
192 196
 const handleShow = (row: any) => {
193 197
   router.push({
194
-    name:"enterWarehouseAuditDetail",
195
-    query:{
198
+    name: "enterWarehouseAuditDetail",
199
+    query: {
196 200
       id: row.inboundId,
197
-      type: "show",
201
+      type: "show"
198 202
     }
199 203
   });
200 204
 };
201 205
 
202
-getList();
203 206
 getOutboundTypeList();
204 207
 getStatusList();
208
+onMounted(() => {
209
+  getList();
210
+  let deptObj: any = sessionStorage.getItem("userInfo");
211
+  deptId = deptObj ? JSON.parse(deptObj).deptId : "";
212
+});
205 213
 </script>
206 214
 
207 215
 <style lang="scss" scoped></style>

+ 4 - 2
src/views/InformationAudit/outWarehouseAudit/detail.vue

@@ -92,7 +92,7 @@
92 92
 </template>
93 93
 
94 94
 <script setup lang="ts">
95
-import { reactive, toRefs } from "vue";
95
+import { reactive, toRefs, onMounted } from "vue";
96 96
 import { getInAuditDetail, audit } from "@/api/inAndOut/outAudit/index";
97 97
 import { getDictItemList } from "@/api/admin/index";
98 98
 import { Search } from "@element-plus/icons-vue";
@@ -275,10 +275,12 @@ const beforeRemove = (uploadFile: any, uploadFiles: any) => {
275 275
   );
276 276
 };
277 277
 
278
-getList();
279 278
 getOutboundTypeList();
280 279
 getIsAvailableList();
281 280
 getProvinceList();
281
+onMounted(() => {
282
+  getList();
283
+});
282 284
 </script>
283 285
 
284 286
 <style lang="scss" scoped>

+ 27 - 14
src/views/InformationAudit/outWarehouseAudit/index.vue

@@ -64,7 +64,15 @@
64 64
           <el-button size="" type="primary" style="backgroundcolor: #949aef" @click="handleShow(scope.row)"
65 65
             >查看</el-button
66 66
           >
67
-          <el-button size="" v-if="scope.row.status == '2'||scope.row.status == '4'||scope.row.status == '6'" type="warning" style="backgroundcolor: #dbc262" @click="handleProcess(scope.row)"
67
+          <el-button
68
+            size=""
69
+            v-if="
70
+              (deptId == '9' && scope.row.status == '3') ||
71
+              (deptId == '10' && (scope.row.status == '2' || scope.row.status == '6'))
72
+            "
73
+            type="warning"
74
+            style="backgroundcolor: #dbc262"
75
+            @click="handleProcess(scope.row)"
68 76
             >审核</el-button
69 77
           >
70 78
         </template>
@@ -82,7 +90,7 @@
82 90
 </template>
83 91
 
84 92
 <script setup lang="ts">
85
-import { reactive, toRefs } from "vue";
93
+import { reactive, toRefs, onMounted } from "vue";
86 94
 import { getInAuditList } from "@/api/inAndOut/outAudit/index";
87 95
 import { getDictItemList } from "@/api/admin/index";
88 96
 import { Search } from "@element-plus/icons-vue";
@@ -96,7 +104,8 @@ const data = reactive({
96 104
   dysfObject: {}, //调用省份
97 105
   spjdObject: {}, //审批节点
98 106
   dqspjdOptions: [],
99
-  spjdOptions: []
107
+  spjdOptions: [],
108
+  deptId: ""
100 109
 });
101 110
 let page = reactive({
102 111
   currentPage: 1,
@@ -110,7 +119,7 @@ let formData = reactive({
110 119
   // spjd: ""
111 120
 });
112 121
 
113
-let { tableData, cklxOptions, cklxObject, dqspjdOptions, spjdOptions, dysfObject, spjdObject } = toRefs(data);
122
+let { tableData, cklxOptions, cklxObject, dqspjdOptions, spjdOptions, dysfObject, spjdObject, deptId } = toRefs(data);
114 123
 
115 124
 // 获取列表
116 125
 const getList = () => {
@@ -132,7 +141,7 @@ const getOutboundTypeList = () => {
132 141
   const data = reactive({
133 142
     size: 100,
134 143
     current: 1,
135
-    dictId: '214124'
144
+    dictId: "214124"
136 145
   });
137 146
   getDictItemList(data).then((res: any) => {
138 147
     if (res.code === 0) {
@@ -149,7 +158,7 @@ const getStatusList = () => {
149 158
   const data = reactive({
150 159
     size: 100,
151 160
     current: 1,
152
-    dictId: '423059273'
161
+    dictId: "423059273"
153 162
   });
154 163
   getDictItemList(data).then((res: any) => {
155 164
     if (res.code === 0) {
@@ -166,7 +175,7 @@ const getProvinceList = () => {
166 175
   const data = reactive({
167 176
     size: 100,
168 177
     current: 1,
169
-    dictId: '1763408141744652289'
178
+    dictId: "1763408141744652289"
170 179
   });
171 180
   getDictItemList(data).then((res: any) => {
172 181
     if (res.code === 0) {
@@ -199,28 +208,32 @@ const handleReSearch = () => {
199 208
 // 审核
200 209
 const handleProcess = (row: any) => {
201 210
   router.push({
202
-    name:"outWarehouseAuditDetail",
203
-    query:{
211
+    name: "outWarehouseAuditDetail",
212
+    query: {
204 213
       id: row.outboundId,
205
-      type: "audit",
214
+      type: "audit"
206 215
     }
207 216
   });
208 217
 };
209 218
 // 查看
210 219
 const handleShow = (row: any) => {
211 220
   router.push({
212
-    name:"outWarehouseAuditDetail",
213
-    query:{
221
+    name: "outWarehouseAuditDetail",
222
+    query: {
214 223
       id: row.outboundId,
215
-      type: "show",
224
+      type: "show"
216 225
     }
217 226
   });
218 227
 };
219 228
 
220
-getList();
221 229
 getOutboundTypeList();
222 230
 getStatusList();
223 231
 getProvinceList();
232
+onMounted(() => {
233
+  getList();
234
+  let deptObj: any = sessionStorage.getItem("userInfo");
235
+  deptId = deptObj ? JSON.parse(deptObj).deptId : "";
236
+});
224 237
 </script>
225 238
 
226 239
 <style lang="scss" scoped></style>