From baa2094fb611a7b18f09ad2e79ec5bcb63707f8b Mon Sep 17 00:00:00 2001 From: zwq Date: Wed, 17 Apr 2024 14:20:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=87=BA=E5=BA=93=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/oth/delivery.js | 100 +++++ src/views/asrs/delivery/add-or-updata.vue | 241 +++++++++++ src/views/asrs/delivery/index.vue | 493 ++++++++++++++++++++++ src/views/asrs/deliveryHis/index.vue | 157 +++++++ src/views/asrs/mixins/code-filter.js | 104 +++-- 5 files changed, 1056 insertions(+), 39 deletions(-) create mode 100644 src/api/oth/delivery.js create mode 100644 src/views/asrs/delivery/add-or-updata.vue create mode 100644 src/views/asrs/delivery/index.vue create mode 100644 src/views/asrs/deliveryHis/index.vue diff --git a/src/api/oth/delivery.js b/src/api/oth/delivery.js new file mode 100644 index 0000000..b94e74f --- /dev/null +++ b/src/api/oth/delivery.js @@ -0,0 +1,100 @@ +/* + * @Author: zwq + * @Date: 2024-04-16 15:08:37 + * @LastEditors: zwq + * @LastEditTime: 2024-04-16 16:22:00 + * @Description: + */ +import request from '@/utils/request' +// 创建出库单 +export function createDelivery(data) { + return request({ + url: '/asrs/delivery/create', + method: 'post', + data: data + }) +} + +// 更新出库单 +export function updateDelivery(data) { + return request({ + url: '/asrs/delivery/update', + method: 'put', + data: data + }) +} + +// 删除出库单 +export function deleteDelivery(id) { + return request({ + url: '/asrs/delivery/delete?id=' + id, + method: 'delete' + }) +} + +// 获得出库单 +export function getDelivery(id) { + return request({ + url: '/asrs/delivery/get?id=' + id, + method: 'get' + }) +} +// 获得出库单分页 +export function getDeliveryPage(query) { + return request({ + url: '/asrs/delivery/page', + method: 'get', + params: query + }) +} + + +// 重启当前出库单 +export function restartDelivery(data) { + return request({ + url: '/asrs/delivery/restart', + method: 'put', + data: data + }) +} +// 暂停当前出库单 +export function pauseDelivery(data) { + return request({ + url: '/asrs/delivery/pause', + method: 'put', + data: data + }) +} +// 提升当前出库单 +export function improveDelivery(data) { + return request({ + url: '/asrs/delivery/improve', + method: 'put', + data: data + }) +} +// 取消当前出库单 +export function cancelDelivery(data) { + return request({ + url: '/asrs/delivery/cancel', + method: 'put', + data: data + }) +} + +// 获得出库单分页 +export function getDeliveryHisPage(query) { + return request({ + url: '/asrs/delivery-history/page', + method: 'get', + params: query + }) +} + +// 获得code +export function getCode() { + return request({ + url: '/asrs/delivery/getCode', + method: 'post' + }) +} diff --git a/src/views/asrs/delivery/add-or-updata.vue b/src/views/asrs/delivery/add-or-updata.vue new file mode 100644 index 0000000..24e6ceb --- /dev/null +++ b/src/views/asrs/delivery/add-or-updata.vue @@ -0,0 +1,241 @@ + + + + diff --git a/src/views/asrs/delivery/index.vue b/src/views/asrs/delivery/index.vue new file mode 100644 index 0000000..ecf6f9e --- /dev/null +++ b/src/views/asrs/delivery/index.vue @@ -0,0 +1,493 @@ + + + diff --git a/src/views/asrs/deliveryHis/index.vue b/src/views/asrs/deliveryHis/index.vue new file mode 100644 index 0000000..c421466 --- /dev/null +++ b/src/views/asrs/deliveryHis/index.vue @@ -0,0 +1,157 @@ + + + diff --git a/src/views/asrs/mixins/code-filter.js b/src/views/asrs/mixins/code-filter.js index 9dacf90..c8c15c2 100644 --- a/src/views/asrs/mixins/code-filter.js +++ b/src/views/asrs/mixins/code-filter.js @@ -2,7 +2,7 @@ /* * @Date: 2020-12-29 16:49:28 * @LastEditors: zwq - * @LastEditTime: 2024-04-02 14:16:16 + * @LastEditTime: 2024-04-17 09:24:05 * @FilePath: \basic-admin\src\filters\basicData\index.js * @Description: */ @@ -16,38 +16,38 @@ const table = { 1: '启用', 0: '停用', }, - isOrno:{ + isOrno: { 1: '是', 0: '否', }, - quality:{ + quality: { 2: 'C', 1: 'B', 0: 'A', }, - mainTaskType:{ - 1: '入库', - 2: '出库', - 3: '移库', - 4: '出库+移库', - 5: '不带agv入库', - 6: '不带agv出库', - 7: '入库+6臂空托盘出库', - 8: '不带agv出库+移库', - 9: '入库+12臂空托盘出库', - 10: '平库移库', - }, - mainTaskState:{ - 0: '开始', - 1: '已发送agv', - 2: 'agv运行中', - 3: '已发送堆垛机', - 4: '堆垛机运行中', - 5: '完成', - 6: '已发送传输线', - 7: '传输线运行中', - 8: '暂时无空托盘', - }, + mainTaskType: { + 1: '入库', + 2: '出库', + 3: '移库', + 4: '出库+移库', + 5: '不带agv入库', + 6: '不带agv出库', + 7: '入库+6臂空托盘出库', + 8: '不带agv出库+移库', + 9: '入库+12臂空托盘出库', + 10: '平库移库', + }, + mainTaskState: { + 0: '开始', + 1: '已发送agv', + 2: 'agv运行中', + 3: '已发送堆垛机', + 4: '堆垛机运行中', + 5: '完成', + 6: '已发送传输线', + 7: '传输线运行中', + 8: '暂时无空托盘', + }, taskSource: { 1: 'mes下发', 2: 'wms手动', @@ -61,9 +61,35 @@ const table = { 2: '清洗', 3: '润滑', }, - specification:{ + specification: { 0: '卷', }, + status: { + 1: '优先执行', + 2: '正常运行', + 3: '暂停', + 4: '完成', + 5: '取消', + }, + region: { + 1: '一次分切区域', + 2: '一次分拣区域', + 3: '二次分切区域', + 4: '二次分拣区域', + 5: '手动包装区域', + 6: '涂覆区域', + 7: '其他', + 8: '自动包装区域', + }, + deliveryType: { + 1: '单托盘出库', + 2: '多托盘出库', + }, + trayType: { + 2: '12臂', + 1: '6臂', + 0: '无要求', + }, } // 日期格式化 @@ -79,7 +105,7 @@ export function parseTime(time, pattern) { if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) { time = parseInt(time) } else if (typeof time === 'string') { - time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.\d{3}/gm),''); + time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.\d{3}/gm), ''); } if ((typeof time === 'number') && (time.toString().length === 10)) { time = time * 1000 @@ -110,17 +136,17 @@ export function parseTime(time, pattern) { } // 去除浮点相乘 export function mul(num1, num2) { - if (parseFloat(num1).toString() == "NaN" || parseFloat(num2).toString() == "NaN") return; - var m = 0, s1 = num1.toString(), s2 = num2.toString(); - try { - m += s1.split(".")[1].length - } catch (e) { - } - try { - m += s2.split(".")[1].length - } catch (e) { - } - return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m); + if (parseFloat(num1).toString() == "NaN" || parseFloat(num2).toString() == "NaN") return; + var m = 0, s1 = num1.toString(), s2 = num2.toString(); + try { + m += s1.split(".")[1].length + } catch (e) { + } + try { + m += s2.split(".")[1].length + } catch (e) { + } + return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m); } export default function (dictTable) { return function (val) {