Browse Source

无AGV分拣组盘

master
常熟吴彦祖 2 months ago
parent
commit
74ad0e5f4c
  1. 1
      src/api/automatedWarehouse/palletPacking.js
  2. 1
      src/router/index.js
  3. 82
      src/utils/common.js
  4. 6
      src/views/main.vue
  5. 1902
      src/views/modules/automatedWarehouse/palletSortingNoAgv.vue

1
src/api/automatedWarehouse/palletPacking.js

@ -78,6 +78,7 @@ export const callEmptyPalletToStation = data => createAPI(`/wcsIntegration/callE
// 结束分拣(下达预约送货任务到Z104区域,并更新pallet_detail的wcs_flag为1)- rqrq
export const finishSorting = data => createAPI(`/wcsIntegration/finishSorting`,'post',data)
export const finishSortingNoAgv = data => createAPI(`/wcsIntegration/finishSortingNoAgv`,'post',data)
// 根据栈板站点获取分拣明细RFID列表 - rqrq
export const getSortingList = data => createAPI(`/wcsIntegration/getSortingList`,'post',data)

1
src/router/index.js

@ -138,6 +138,7 @@ const globalRoutes = [
{path: "/emptyPalletAssembly",name: "emptyPalletAssembly", component: resolve => require(["@/views/modules/automatedWarehouse/emptyPalletAssembly.vue"], resolve), meta: { transition: 'instant' ,preload: true,keepAlive: true}},
{path: "/cancelWcsPallet",name: "cancelWcsPallet", component: resolve => require(["@/views/modules/automatedWarehouse/cancelWcsPallet.vue"], resolve), meta: { transition: 'instant' ,preload: true,keepAlive: true}},
{path: "/callOutToStation",name: "callOutToStation", component: resolve => require(["@/views/modules/automatedWarehouse/callOutToStation.vue"], resolve), meta: { transition: 'instant' ,preload: true,keepAlive: true}},
{path: "/palletSortingNoAgv",name: "palletSortingNoAgv", component: resolve => require(["@/views/modules/automatedWarehouse/palletSortingNoAgv.vue"], resolve), meta: { transition: 'instant' ,preload: true,keepAlive: true}},
]

82
src/utils/common.js

@ -29,3 +29,85 @@ export function throttle(fn, wait = 3000) {
}, wait)
}
}
// ========== 错误处理相关 ========== - rqrq
/**
* @Description 截取错误信息防止提示过长 - rqrq
* @param {Error|Object|String} error - 错误对象包含msg字段的对象或错误字符串
* @param {String} defaultMsg - 默认错误信息
* @param {Number} maxLength - 最大长度默认100字符
* @return {String} 处理后的错误信息
* @author rqrq
* @date 2024/01/17
*/
export function formatErrorMsg(error, defaultMsg = '操作失败', maxLength = 100) {
let errorMsg = defaultMsg;
// 从error对象中提取错误信息 - rqrq
if (error) {
if (typeof error === 'string') {
errorMsg = error;
} else if (error.message) {
errorMsg = error.message;
} else if (error.msg) {
errorMsg = error.msg;
}
}
// 截取过长的错误信息 - rqrq
if (errorMsg && errorMsg.length > maxLength) {
errorMsg = errorMsg.substring(0, maxLength) + '...';
}
return errorMsg;
}
/**
* @Description 统一的错误提示弹窗带聚焦控制- rqrq
* @param {Object} vm - Vue组件实例this
* @param {Error|Object|String} error - 错误对象
* @param {String} defaultMsg - 默认错误信息
* @param {String} inputRef - 需要聚焦的输入框ref名称可选
* @author rqrq
* @date 2024/01/17
*/
export function showErrorAlert(vm, error, defaultMsg = '操作失败', inputRef = '') {
const errorMsg = formatErrorMsg(error, defaultMsg);
vm.$alert(errorMsg, '错误', {
confirmButtonText: '确定',
callback: () => {
// 如果提供了inputRef,则在回调中聚焦 - rqrq
if (inputRef) {
vm.$nextTick(() => {
if (vm.$refs[inputRef]) {
vm.$refs[inputRef].focus();
}
});
}
}
});
}
/**
* @Description 统一的成功提示带回调- rqrq
* @param {Object} vm - Vue组件实例this
* @param {String} msg - 成功提示信息
* @param {Function} callback - 成功后的回调函数可选
* @author rqrq
* @date 2024/01/17
*/
export function showSuccessMsg(vm, msg = '操作成功', callback) {
vm.$message({
message: msg,
type: 'success',
duration: 2000,
showClose: true,
onClose: () => {
if (typeof callback === 'function') {
callback();
}
}
});
}

6
src/views/main.vue

@ -199,6 +199,12 @@
</div>
<div class="menu-text">WMS取消预留</div>
</div>
<div class="menu-item" @click="navigateWithWarehouseCheck('palletSortingNoAgv')">
<div class="menu-icon purchase">
<van-icon name="shopping-cart-o" size="24" />
</div>
<div class="menu-text">无AGV分拣组盘</div>
</div>
</div>
</div>
<!-- 库内管理 -->

1902
src/views/modules/automatedWarehouse/palletSortingNoAgv.vue
File diff suppressed because it is too large
View File

Loading…
Cancel
Save