buzhi пре 1 година
родитељ
комит
d899dbc5b2

+ 13 - 7
src/views/InformationAudit/enterWarehouseAudit/detail.vue

@@ -84,9 +84,12 @@
84
         </el-row>
84
         </el-row>
85
       </el-form>
85
       </el-form>
86
       <div style="text-align: center; padding: 50px 0 20px">
86
       <div style="text-align: center; padding: 50px 0 20px">
87
-        <button class="bottom-btn" v-if="!isShow" style="background-color: #676fe8" @click="handleAgree">通 过</button>
87
+        <!-- <button class="bottom-btn" v-if="!isShow" style="background-color: #676fe8" @click="handleAgree">通 过</button>
88
         <button class="bottom-btn" v-if="!isShow" style="background-color: #e13434" @click="handleReturn">退 回</button>
88
         <button class="bottom-btn" v-if="!isShow" style="background-color: #e13434" @click="handleReturn">退 回</button>
89
-        <button class="bottom-btn" style="background-color: #89aac4" @click="handleBack">返 回</button>
89
+        <button class="bottom-btn" style="background-color: #89aac4" @click="handleBack">返 回</button> -->
90
+        <el-button type="success" v-if="!isShow" @click="handleAgree" style="background-color: #676fe8;border:none">通过</el-button>
91
+        <el-button type="primary" v-if="!isShow" @click="handleReturn" style="background-color: #e13434;border:none">退回</el-button>
92
+        <el-button @click="handleBack">返回</el-button>
90
       </div>
93
       </div>
91
     </div>
94
     </div>
92
   </basic-container>
95
   </basic-container>
@@ -103,9 +106,12 @@ import { useDict } from "@/hooks/dict";
103
 // import { closeTagAndOpenLastTag } from '@/router/Routermethods';
106
 // import { closeTagAndOpenLastTag } from '@/router/Routermethods';
104
 import store from "@/store";
107
 import store from "@/store";
105
 import { useGetters } from "@/hooks/storeHooks";
108
 import { useGetters } from "@/hooks/storeHooks";
106
-const { access_token } = useGetters(["access_token"])
109
+import { getQuery } from "@/hooks/detailQuery/index";
107
 
110
 
111
+const { access_token } = useGetters(["access_token"])
108
 const { indound_type, is_available } = useDict("indound_type", "is_available");
112
 const { indound_type, is_available } = useDict("indound_type", "is_available");
113
+const queryData = getQuery("enterWarehouseAuditDetail");
114
+
109
 const router = useRouter();
115
 const router = useRouter();
110
 const route = useRoute();
116
 const route = useRoute();
111
 const data = reactive({
117
 const data = reactive({
@@ -134,12 +140,12 @@ let { tableData, auditData, isShow, fileUrl, myHeader } = toRefs(data);
134
 
140
 
135
 // 获取列表
141
 // 获取列表
136
 const getList = () => {
142
 const getList = () => {
137
-  if (route.query.type == "show") {
143
+  if (queryData.type == "show") {
138
     isShow.value = true;
144
     isShow.value = true;
139
   } else {
145
   } else {
140
     isShow.value = false;
146
     isShow.value = false;
141
   }
147
   }
142
-  getInAuditDetail(route.query.id).then((res: any) => {
148
+  getInAuditDetail(queryData.id).then((res: any) => {
143
     if (res.code === 0) {
149
     if (res.code === 0) {
144
       tableData.value = res.data.inboundMaterial;
150
       tableData.value = res.data.inboundMaterial;
145
       auditData.value = res.data.inboundStatus;
151
       auditData.value = res.data.inboundStatus;
@@ -159,7 +165,7 @@ const handleAgree = () => {
159
     type: "warning"
165
     type: "warning"
160
   })
166
   })
161
     .then(() => {
167
     .then(() => {
162
-      let data = { ...formData, audi: "0", inboundId: route.query.id };
168
+      let data = { ...formData, audi: "0", inboundId: queryData.id };
163
       audit(data).then((res: any) => {
169
       audit(data).then((res: any) => {
164
         if (res.code === 0) {
170
         if (res.code === 0) {
165
           ElMessage({
171
           ElMessage({
@@ -185,7 +191,7 @@ const handleReturn = () => {
185
     type: "warning"
191
     type: "warning"
186
   })
192
   })
187
     .then(() => {
193
     .then(() => {
188
-      let data = { ...formData, audi: "1", inboundId: route.query.id };
194
+      let data = { ...formData, audi: "1", inboundId: queryData.id };
189
       audit(data).then((res: any) => {
195
       audit(data).then((res: any) => {
190
         if (res.code === 0) {
196
         if (res.code === 0) {
191
           ElMessage({
197
           ElMessage({

+ 17 - 14
src/views/InformationAudit/enterWarehouseAudit/index.vue

@@ -101,6 +101,7 @@ import { Search, RefreshRight } from "@element-plus/icons-vue";
101
 import { useRouter } from "vue-router";
101
 import { useRouter } from "vue-router";
102
 import { useDict } from "@/hooks/dict";
102
 import { useDict } from "@/hooks/dict";
103
 import { useGetters } from "@/hooks/storeHooks";
103
 import { useGetters } from "@/hooks/storeHooks";
104
+import { setQuery } from "@/hooks/detailQuery/index";
104
 
105
 
105
 const { indound_type, auditing_status } = useDict("indound_type", "auditing_status");
106
 const { indound_type, auditing_status } = useDict("indound_type", "auditing_status");
106
 const { userInfo } = useGetters(["userInfo"]);
107
 const { userInfo } = useGetters(["userInfo"]);
@@ -162,23 +163,25 @@ const handleReSearch = () => {
162
 };
163
 };
163
 // 审核
164
 // 审核
164
 const handleProcess = (row: any) => {
165
 const handleProcess = (row: any) => {
165
-  router.push({
166
-    path: "enterWarehouseAuditDetail",
167
-    query: {
168
-      id: row.inboundId,
169
-      type: "audit"
170
-    }
171
-  });
166
+  // router.push({
167
+  //   path: "enterWarehouseAuditDetail",
168
+  //   query: {
169
+  //     id: row.inboundId,
170
+  //     type: "audit"
171
+  //   }
172
+  // });
173
+  setQuery("enterWarehouseAuditDetail", { id: row.inboundId, type: "audit" });
172
 };
174
 };
173
 // 查看
175
 // 查看
174
 const handleShow = (row: any) => {
176
 const handleShow = (row: any) => {
175
-  router.push({
176
-    path: "enterWarehouseAuditDetail",
177
-    query: {
178
-      id: row.inboundId,
179
-      type: "show"
180
-    }
181
-  });
177
+  // router.push({
178
+  //   path: "enterWarehouseAuditDetail",
179
+  //   query: {
180
+  //     id: row.inboundId,
181
+  //     type: "show"
182
+  //   }
183
+  // });
184
+  setQuery("enterWarehouseAuditDetail", { id: row.inboundId, type: "show" });
182
 };
185
 };
183
 
186
 
184
 onMounted(() => {
187
 onMounted(() => {

+ 17 - 11
src/views/InformationAudit/outWarehouseAudit/detail.vue

@@ -89,9 +89,12 @@
89
         </el-row>
89
         </el-row>
90
       </el-form>
90
       </el-form>
91
       <div style="text-align: center; padding: 50px 0 20px">
91
       <div style="text-align: center; padding: 50px 0 20px">
92
-        <button class="bottom-btn" v-if="!isShow" style="background-color: #676fe8" @click="handleAgree">通 过</button>
92
+        <!-- <button class="bottom-btn" v-if="!isShow" style="background-color: #676fe8" @click="handleAgree">通 过</button>
93
         <button class="bottom-btn" v-if="!isShow" style="background-color: #e13434" @click="handleReturn">退 回</button>
93
         <button class="bottom-btn" v-if="!isShow" style="background-color: #e13434" @click="handleReturn">退 回</button>
94
-        <button class="bottom-btn" style="background-color: #89aac4" @click="handleBack">返 回</button>
94
+        <button class="bottom-btn" style="background-color: #89aac4" @click="handleBack">返 回</button> -->
95
+        <el-button type="success" v-if="!isShow" @click="handleAgree" style="background-color: #676fe8;border:none">通过</el-button>
96
+        <el-button type="primary" v-if="!isShow" @click="handleReturn" style="background-color: #e13434;border:none">退回</el-button>
97
+        <el-button @click="handleBack">返回</el-button>
95
       </div>
98
       </div>
96
     </div>
99
     </div>
97
   </basic-container>
100
   </basic-container>
@@ -105,12 +108,14 @@ import { Search } from "@element-plus/icons-vue";
105
 import { ElMessage, ElMessageBox } from "element-plus";
108
 import { ElMessage, ElMessageBox } from "element-plus";
106
 import { useRouter, useRoute } from "vue-router";
109
 import { useRouter, useRoute } from "vue-router";
107
 import { useDict } from "@/hooks/dict";
110
 import { useDict } from "@/hooks/dict";
108
-import { closeTagAndOpenLastTag } from "@/router/Routermethods";
111
+// import { closeTagAndOpenLastTag } from "@/router/Routermethods";
109
 import store from "@/store";
112
 import store from "@/store";
110
 import { useGetters } from "@/hooks/storeHooks";
113
 import { useGetters } from "@/hooks/storeHooks";
111
-const { access_token } = useGetters(["access_token"])
114
+import { getQuery } from "@/hooks/detailQuery/index";
112
 
115
 
116
+const { access_token } = useGetters(["access_token"]);
113
 const { outdound_type, is_available, province_ch } = useDict("outdound_type", "is_available", "province_ch");
117
 const { outdound_type, is_available, province_ch } = useDict("outdound_type", "is_available", "province_ch");
118
+const queryData = getQuery("outWarehouseAuditDetail");
114
 
119
 
115
 const router = useRouter();
120
 const router = useRouter();
116
 const route = useRoute();
121
 const route = useRoute();
@@ -140,12 +145,12 @@ let { tableData, auditData, isShow, fileUrl, myHeader } = toRefs(data);
140
 
145
 
141
 // 获取列表
146
 // 获取列表
142
 const getList = () => {
147
 const getList = () => {
143
-  if (route.query.type == "show") {
148
+  if (queryData.type == "show") {
144
     isShow.value = true;
149
     isShow.value = true;
145
   } else {
150
   } else {
146
     isShow.value = false;
151
     isShow.value = false;
147
   }
152
   }
148
-  getInAuditDetail(route.query.id).then((res: any) => {
153
+  getInAuditDetail(queryData.id).then((res: any) => {
149
     if (res.code === 0) {
154
     if (res.code === 0) {
150
       tableData.value = res.data.outboundMaterial;
155
       tableData.value = res.data.outboundMaterial;
151
       auditData.value = res.data.outboundStatus;
156
       auditData.value = res.data.outboundStatus;
@@ -165,7 +170,7 @@ const handleAgree = () => {
165
     type: "warning"
170
     type: "warning"
166
   })
171
   })
167
     .then(() => {
172
     .then(() => {
168
-      let data = { ...formData, audi: "0", outboundId: route.query.id };
173
+      let data = { ...formData, audi: "0", outboundId: queryData.id };
169
       audit(data).then((res: any) => {
174
       audit(data).then((res: any) => {
170
         if (res.code === 0) {
175
         if (res.code === 0) {
171
           ElMessage({
176
           ElMessage({
@@ -191,7 +196,7 @@ const handleReturn = () => {
191
     type: "warning"
196
     type: "warning"
192
   })
197
   })
193
     .then(() => {
198
     .then(() => {
194
-      let data = { ...formData, audi: "1", outboundId: route.query.id };
199
+      let data = { ...formData, audi: "1", outboundId: queryData.id };
195
       audit(data).then((res: any) => {
200
       audit(data).then((res: any) => {
196
         if (res.code === 0) {
201
         if (res.code === 0) {
197
           ElMessage({
202
           ElMessage({
@@ -211,9 +216,9 @@ const handleReturn = () => {
211
 };
216
 };
212
 // 返回
217
 // 返回
213
 const handleBack = () => {
218
 const handleBack = () => {
214
-  // store.commit("DEL_TAG", store.getters.tag);
215
-  // router.push("/InformationAudit/outWarehouseAudit");
216
-  closeTagAndOpenLastTag();
219
+  store.commit("DEL_TAG", store.getters.tag);
220
+  router.push("/InformationAudit/outWarehouseAudit");
221
+  // closeTagAndOpenLastTag();
217
 };
222
 };
218
 
223
 
219
 // 附件相关
224
 // 附件相关
@@ -281,6 +286,7 @@ onMounted(() => {
281
   border: none;
286
   border: none;
282
   border-radius: 15px;
287
   border-radius: 15px;
283
 }
288
 }
289
+
284
 .bottom-btn + .bottom-btn {
290
 .bottom-btn + .bottom-btn {
285
   margin-left: 20px;
291
   margin-left: 20px;
286
 }
292
 }

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

@@ -99,6 +99,7 @@ import { Search, RefreshRight } from "@element-plus/icons-vue";
99
 import { useRouter } from "vue-router";
99
 import { useRouter } from "vue-router";
100
 import { useDict } from "@/hooks/dict";
100
 import { useDict } from "@/hooks/dict";
101
 import { useGetters } from "@/hooks/storeHooks";
101
 import { useGetters } from "@/hooks/storeHooks";
102
+import { setQuery } from "@/hooks/detailQuery/index";
102
 
103
 
103
 const { outdound_type, is_available, province_ch, auditing_status } = useDict(
104
 const { outdound_type, is_available, province_ch, auditing_status } = useDict(
104
   "outdound_type",
105
   "outdound_type",
@@ -164,23 +165,25 @@ const handleReSearch = () => {
164
 };
165
 };
165
 // 审核
166
 // 审核
166
 const handleProcess = (row: any) => {
167
 const handleProcess = (row: any) => {
167
-  router.push({
168
-    path: "outWarehouseAuditDetail",
169
-    query: {
170
-      id: row.outboundId,
171
-      type: "audit"
172
-    }
173
-  });
168
+  // router.push({
169
+  //   path: "outWarehouseAuditDetail",
170
+  //   query: {
171
+  //     id: row.outboundId,
172
+  //     type: "audit"
173
+  //   }
174
+  // });
175
+  setQuery("outWarehouseAuditDetail", { id: row.outboundId, type: "audit" });
174
 };
176
 };
175
 // 查看
177
 // 查看
176
 const handleShow = (row: any) => {
178
 const handleShow = (row: any) => {
177
-  router.push({
178
-    path: "outWarehouseAuditDetail",
179
-    query: {
180
-      id: row.outboundId,
181
-      type: "show"
182
-    }
183
-  });
179
+  // router.push({
180
+  //   path: "outWarehouseAuditDetail",
181
+  //   query: {
182
+  //     id: row.outboundId,
183
+  //     type: "show"
184
+  //   }
185
+  // });
186
+  setQuery("outWarehouseAuditDetail", { id: row.outboundId, type: "show" });
184
 };
187
 };
185
 
188
 
186
 onMounted(() => {
189
 onMounted(() => {