diff --git a/src/axios.js b/src/axios.js index e11e0d45..ba7f4820 100644 --- a/src/axios.js +++ b/src/axios.js @@ -17,7 +17,8 @@ import 'nprogress/nprogress.css'; // 进度条样式 import { Base64 } from 'js-base64'; // Base64编码工具 import { baseUrl } from '@/config/env'; // API基础URL import crypto from '@/utils/crypto'; // 加密工具,可能用于加密Token等 - +import {ref} from 'vue'; +let msg = ref(''); // 错误信息 // 存储待取消的HTTP请求的键值对,用于取消重复的请求 const pendingRequests = new Map(); @@ -131,13 +132,21 @@ axios.interceptors.response.use( // 如果response的状态码不是200,则显示消息提示,并返回Promise的reject状态 if (status !== 200) { - ElMessage({ - message: message, - type: 'error', - }); + if(!msg.value){ + ElMessage({ + message: message, + type: 'error', + }); + } + if(msg.value && (msg.value != message)){ + setTimeout(() => { + msg.value = ''; + }, 0); + }else{ + msg.value=message + } return Promise.reject(new Error(message)); } - // 正常状态返回responseData return res; }, diff --git a/src/main.js b/src/main.js index bc615af3..7c5c59b1 100644 --- a/src/main.js +++ b/src/main.js @@ -25,6 +25,7 @@ import flowDesign from './components/flow-design/main.vue'; import tablecmt from './components/tablecmt/tablecmt.vue'; import SelectBox from './components/SelectBox/SelectBox.vue'; import edittablehead from './components/edittablehead/index.vue'; +import {message } from './utils/resetMessage' import App from './App.vue'; import 'animate.css'; import dayjs from 'dayjs'; @@ -64,6 +65,7 @@ app.use(router); app.use(ElementPlus, { locale: messages[language], }); +app.config.globalProperties.$message = message;//解决重复弹窗 app.use(Avue, { axios, calcHeight: 10, diff --git a/src/utils/resetMessage.js b/src/utils/resetMessage.js new file mode 100644 index 00000000..5b770889 --- /dev/null +++ b/src/utils/resetMessage.js @@ -0,0 +1,23 @@ +import { ElMessage } from 'element-plus'; + +let messageInstance = null; +const resetMessage = (options) => { + if (messageInstance) { + messageInstance.close(); + } + messageInstance = ElMessage(options); +}; + +['error', 'success', 'info', 'warning'].forEach((type) => { + resetMessage[type] = (options) => { + if (typeof options === 'string') { + options = { + message: options, + }; + } + options.type = type; + return resetMessage(options); + }; +}); + +export const message = resetMessage; \ No newline at end of file diff --git a/src/views/distribution/deliverylist/distributionDeliveryListedt.vue b/src/views/distribution/deliverylist/distributionDeliveryListedt.vue index bd6a0dba..41a40936 100644 --- a/src/views/distribution/deliverylist/distributionDeliveryListedt.vue +++ b/src/views/distribution/deliverylist/distributionDeliveryListedt.vue @@ -261,6 +261,7 @@ > @@ -3998,6 +3999,7 @@ export default { type: 1, packageIds: row.id, }; + cancelReservationPackage(data).then(res => { if (res.data.code === 200) { this.$message.success(res.data.msg); @@ -4005,6 +4007,14 @@ export default { } }); }, + ViewingTrajectories(val){ + this.$router.push({ + path: '/distribution/signdetail/packageNodeSearch', + query: { + orderPackageCode:val.orderPackageCode, + } + }) + }, cancelReservationInventoryPackage(row) { console.log('row', row); console.log('deliveryId', this.deliveryId); diff --git a/src/views/distribution/inventory/distributionStockArticleDetails.vue b/src/views/distribution/inventory/distributionStockArticleDetails.vue index 7cce65ee..635017da 100644 --- a/src/views/distribution/inventory/distributionStockArticleDetails.vue +++ b/src/views/distribution/inventory/distributionStockArticleDetails.vue @@ -1292,14 +1292,12 @@ export default { }, handleTrajectory(row) { console.log('>>>>', row); - this.$message.warning('暂无法显示!!!'); - // this.title = '查看' - // this.view = true; - // this.box = true; - // this.dialogVisible = true; - // getDetail(row.id).then(res => { - // this.form = res.data.data; - // }); + this.$router.push({ + path: '/distribution/signdetail/packageNodeSearch', + query: { + orderPackageCode:row.orderPackageCode, + } + }); }, handleDelete() { if (this.selectionList.length === 0) { diff --git a/src/views/distribution/inventory/distrilbutionBillLadingView.vue b/src/views/distribution/inventory/distrilbutionBillLadingView.vue index b006cb25..74cd4b62 100644 --- a/src/views/distribution/inventory/distrilbutionBillLadingView.vue +++ b/src/views/distribution/inventory/distrilbutionBillLadingView.vue @@ -102,7 +102,9 @@ @selectCheck="selectsc" @selection="selectionChange" > - +
@@ -799,6 +801,17 @@ export default { sortable: true, head: false, }, + { + prop: '', + label: '操作', + type: 6, + values: '', + width: '150', + checkarr: [], + fixed: 'right', + sortable: true, + head: false, + }, ], }, height: 300, @@ -1550,6 +1563,16 @@ export default { console.log('sllsls'); this.selectionList = list; }, + // 查看轨迹 + ViewingTrajectories(scope){ + console.log('查看>>>>>轨迹>>', scope); + this.$router.push({ + path: '/distribution/signdetail/packageNodeSearch', + query: { + orderPackageCode:scope.orderPackageCode, + } + }) + }, selectionClear() { this.selectionList = []; this.$refs.table.clearSelection(); diff --git a/src/views/distribution/stockup/distributionStockupDetails.vue b/src/views/distribution/stockup/distributionStockupDetails.vue index ab498b33..ab853c1f 100644 --- a/src/views/distribution/stockup/distributionStockupDetails.vue +++ b/src/views/distribution/stockup/distributionStockupDetails.vue @@ -102,6 +102,13 @@ @click="handleQRCode(slotProps.scope.row)" >查看包条码 + 查看轨迹 @@ -742,7 +749,7 @@ export default { label: '操作', type: 6, values: '', - width: '150', + width: '230', checkarr: [], fixed: 'right', hide: true, @@ -1327,6 +1334,15 @@ export default { this.dialogVisible = true; }, + // 查看轨迹 + ViewingTrajectories(row){ + this.$router.push({ + path: '/distribution/signdetail/packageNodeSearch', + query: { + orderPackageCode:row.orderPackageCode, + } + }) + }, //系统备货确定 callFordelivery() { let c = false; diff --git a/src/views/warehouse/warehouseRetentionRecord/warehouseRetentionDetails.vue b/src/views/warehouse/warehouseRetentionRecord/warehouseRetentionDetails.vue index 26f73f2c..f9c11507 100644 --- a/src/views/warehouse/warehouseRetentionRecord/warehouseRetentionDetails.vue +++ b/src/views/warehouse/warehouseRetentionRecord/warehouseRetentionDetails.vue @@ -123,9 +123,16 @@ :width="item.width" :key="index" > + + + + + @@ -560,6 +567,17 @@ fixed: true, search: true, head: true + }, + { + prop: '', + label: '操作', + type: 4, + values: '', + width: '100', + checkarr: [], + fixed: true, + search: true, + head: true } ], zeroPackageColumnList: [ @@ -1072,7 +1090,15 @@ }); this.loading = false; console.log('retentionRcordId<>>>>>>>>>>>>>>>>>>', this.retentionRecordId); - } + }, + ViewingTrajectories(scope){ + this.$router.push({ + path: '/distribution/signdetail/packageNodeSearch', + query: { + orderPackageCode:scope.row.orderPackageCode, + } + }) + }, } };