diff --git a/src/api/oth/delivery.js b/src/api/oth/delivery.js index b94e74f..05c2f46 100644 --- a/src/api/oth/delivery.js +++ b/src/api/oth/delivery.js @@ -2,7 +2,7 @@ * @Author: zwq * @Date: 2024-04-16 15:08:37 * @LastEditors: zwq - * @LastEditTime: 2024-04-16 16:22:00 + * @LastEditTime: 2024-05-24 09:57:14 * @Description: */ import request from '@/utils/request' @@ -14,6 +14,14 @@ export function createDelivery(data) { data: data }) } +// 创建点对点出库单 +export function createDeliveryList(data) { + return request({ + url: '/asrs/delivery/createList', + method: 'post', + data: data + }) +} // 更新出库单 export function updateDelivery(data) { @@ -82,7 +90,7 @@ export function cancelDelivery(data) { }) } -// 获得出库单分页 +// 获得出库单历史分页 export function getDeliveryHisPage(query) { return request({ url: '/asrs/delivery-history/page', @@ -91,6 +99,15 @@ export function getDeliveryHisPage(query) { }) } +// 获得出库单历史和膜卷关系 +export function getDeliveryHisProPage(query) { + return request({ + url: '/asrs/delivery-history-product/page', + method: 'get', + params: query + }) +} + // 获得code export function getCode() { return request({ @@ -98,3 +115,13 @@ export function getCode() { method: 'post' }) } + +// 导出历史 Excel +export function exportDeliveryHisExcel(query) { + return request({ + url: '/asrs/delivery-history/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} diff --git a/src/layout/index.vue b/src/layout/index.vue index 1560b26..55a672d 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -85,13 +85,15 @@ export default { }; }, created() { + this.startFun(); axios .post('http://172.22.22.190/wcs-njlm/business/wcsTask/isonline') .then((res) => { - if (res.code === 500) { + console.log(res); + if (res.data.code == 500) { this.$notify({ title: '设备异常', - message: res.msg, + message: res.data.msg, type: 'warning', duration: 0, }); @@ -113,6 +115,41 @@ export default { handleClickOutside() { this.$store.dispatch('app/closeSideBar', { withoutAnimation: false }); }, + startFun() { + setInterval(() => { + this.getRealAlarm(); + }, 10000); + }, + getRealAlarm() { + axios + .post('http://172.22.22.190/wcs-njlm/business/wcsTask/isAlarm') + .then((res) => { + res.data.forEach((item, index) => { + if (index < 4) { + if (item.code !== 0) { + this.$notify({ + title: '异常', + message: item.msg, + type: 'warning', + duration: 8000, + }); + } + } else { + if (item.code > 30) { + this.$notify({ + title: '异常', + message: item.msg, + type: 'warning', + duration: 9000, + }); + } + } + }); + }) + .catch((error) => { + console.error('There was an error!', error); + }); + }, }, }; diff --git a/src/views/asrs/delivery/add-or-updata.vue b/src/views/asrs/delivery/add-or-updata.vue index 482e2f1..1c156bc 100644 --- a/src/views/asrs/delivery/add-or-updata.vue +++ b/src/views/asrs/delivery/add-or-updata.vue @@ -2,126 +2,349 @@ * @Author: zwq * @Date: 2021-11-18 14:16:25 * @LastEditors: zwq - * @LastEditTime: 2024-05-09 09:33:08 + * @LastEditTime: 2024-05-22 10:09:16 * @Description: --> + diff --git a/src/views/asrs/delivery/index.vue b/src/views/asrs/delivery/index.vue index cd8d55b..859df31 100644 --- a/src/views/asrs/delivery/index.vue +++ b/src/views/asrs/delivery/index.vue @@ -1,23 +1,24 @@