From a919f4024198231f906cd7f02f78d6d29be6b068 Mon Sep 17 00:00:00 2001 From: ruanqi Date: Thu, 23 Feb 2023 14:45:03 +0800 Subject: [PATCH] =?UTF-8?q?0412=20=E6=96=B0=E7=9C=8B=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.js | 4 ++- src/utils/common.js | 31 +++++++++++++++++++ .../board/SORoutingBoardForBaoZhuang.vue | 2 +- src/views/modules/print/print_outBox_label.js | 2 +- .../modules/production/closeSchedule.vue | 8 ++++- .../modules/production/generateReport.vue | 29 ++++++++++++----- .../modules/production/scheduleForSOTask.vue | 12 +++---- .../production/scheduleForShopOrder.vue | 12 +++---- .../modules/production/soscheduleRouting.vue | 4 +++ 9 files changed, 80 insertions(+), 24 deletions(-) create mode 100644 src/utils/common.js diff --git a/src/main.js b/src/main.js index 5ebe4ac..6276ad9 100644 --- a/src/main.js +++ b/src/main.js @@ -18,7 +18,7 @@ import './directives' import decimalUtil from '@/utils/decimalUtil' import dayjs from 'dayjs'; import getLodop from '@/utils/LodopFuncs.js' - +import { debounce,throttle} from '@/utils/common.js' Vue.component('downloadExcel', JsonExcel) @@ -36,6 +36,8 @@ Vue.prototype.isAuth = isAuth // 权限方法 Vue.prototype.decimalUtil = decimalUtil // 计算 Vue.prototype.dayjs = dayjs //时间格式化插件 2021-11-02 Vue.prototype.getLodop = getLodop // 打印 +Vue.prototype.debounce = debounce // 防抖 +Vue.prototype.throttle = throttle // 限流 // 保存整站vuex本地储存初始状态 window.SITE_CONFIG['storeState'] = cloneDeep(store.state) diff --git a/src/utils/common.js b/src/utils/common.js new file mode 100644 index 0000000..82c789d --- /dev/null +++ b/src/utils/common.js @@ -0,0 +1,31 @@ +// 防抖 +export function debounce(fn, wait = 3000) { + let timer = null; + return function () { + console.log(wait) + let args = arguments; + let that = this; + if (timer) { + clearTimeout(timer) + } + timer = setTimeout(function () { + timer = null; + fn.apply(that, args) + }, wait) + } +} + +// 节流 +export function throttle(fn, wait = 3000) { + let timer = null; + return function () { + if (timer != null) return; + let args = arguments; + let that = this; + clearTimeout(timer) + fn.apply(that, args) + timer = setTimeout(function () { + timer = null; + }, wait) + } +} diff --git a/src/views/modules/board/SORoutingBoardForBaoZhuang.vue b/src/views/modules/board/SORoutingBoardForBaoZhuang.vue index cc35fc1..d850144 100644 --- a/src/views/modules/board/SORoutingBoardForBaoZhuang.vue +++ b/src/views/modules/board/SORoutingBoardForBaoZhuang.vue @@ -43,7 +43,7 @@ header-align="center" align="left" min-width="30" - label="包装袋"> + label="包材"> 加工中心编码 - + 产品编码 @@ -561,6 +561,11 @@ }) return false; } + this.$confirm(`是否流转?流转后需要重新打印新派工单!`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { circulationSchedule(this.circulationData).then(({data}) => { if (data && data.code === 0) { this.circulationFlag=false; @@ -578,6 +583,7 @@ }) } }) + }) }, closeSchedule(row){ this.$confirm(`确定关闭此派工单`, '提示', { diff --git a/src/views/modules/production/generateReport.vue b/src/views/modules/production/generateReport.vue index 05edc4a..53cb46c 100644 --- a/src/views/modules/production/generateReport.vue +++ b/src/views/modules/production/generateReport.vue @@ -89,8 +89,8 @@ 派工单开始 派工单报工 - 派工单暂停 - 派工单继续 + 派工单异常暂停 + 派工单异常继续 - + + @@ -396,7 +397,7 @@ - + @@ -407,9 +408,9 @@ - - - + + + @@ -431,7 +432,10 @@ - + + + +
@@ -564,6 +568,7 @@ KGRework:'', approveFlag:false, abnormalList:[], + moQty:'', saveHeaderData: { boxWeight:0, qtyRequire:'', @@ -594,6 +599,7 @@ orderRef1:'', scheduleType:'', userId:'', + liLunQty:'', }, scanSeqNo:'', stopModalFlag:false, @@ -1022,6 +1028,8 @@ this.saveHeaderData.boxWeight=0; this.qty1=''; this.qty2 =''; + this.moQty =''; + this.liLunQty =''; this.saveHeaderData.planStartTime = this.dayjs(new Date()).format('YYYY-MM-DD 00:00:00') this.saveHeaderData.planFinishTime = this.dayjs(new Date()).format('YYYY-MM-DD 00:00:00') @@ -1068,6 +1076,11 @@ this.KGReported='' } }, + moQtyBlur(){ + if(this.cavity&&this.cavity!=0&&this.cavity!='erp未维护数据'&&this.moQty!=''){ + this.saveHeaderData.liLunQty=(this.cavity*this.moQty).toFixed(1) + } + }, qtyApproveBlur(){ if(this.qty3&&this.qty3!=0&&this.qty3!='erp未维护数据'&&this.saveHeaderData.qtyApprove!=''){ if(this.saveHeaderData.boxWeight!=null&&this.saveHeaderData.boxWeight!='') { diff --git a/src/views/modules/production/scheduleForSOTask.vue b/src/views/modules/production/scheduleForSOTask.vue index 5924ea8..7b72ade 100644 --- a/src/views/modules/production/scheduleForSOTask.vue +++ b/src/views/modules/production/scheduleForSOTask.vue @@ -626,12 +626,12 @@ }, openScheduleModel(row){ - if (row.lotSize-row.scheduledQty == 0) { - this.$alert('该订单已派工完毕!', '错误', { - confirmButtonText: '确定' - }) - return false - } + // if (row.lotSize-row.scheduledQty == 0) { + // this.$alert('该订单已派工完毕!', '错误', { + // confirmButtonText: '确定' + // }) + // return false + // } if (row.qtyfinished == 0) { this.$alert('该日计划尚未打料完成!', '错误', { confirmButtonText: '确定' diff --git a/src/views/modules/production/scheduleForShopOrder.vue b/src/views/modules/production/scheduleForShopOrder.vue index bf132c7..e78f86d 100644 --- a/src/views/modules/production/scheduleForShopOrder.vue +++ b/src/views/modules/production/scheduleForShopOrder.vue @@ -659,12 +659,12 @@ }, openScheduleModel(row){ - if (row.lotSize-row.scheduledQty == 0) { - this.$alert('该订单已派工完毕!', '错误', { - confirmButtonText: '确定' - }) - return false - } + // if (row.lotSize-row.scheduledQty == 0) { + // this.$alert('该订单已派工完毕!', '错误', { + // confirmButtonText: '确定' + // }) + // return false + // } this.schedulingModalData = { remark:'', weightFactor: row.weightFactor, diff --git a/src/views/modules/production/soscheduleRouting.vue b/src/views/modules/production/soscheduleRouting.vue index 8d0c5d8..252749c 100644 --- a/src/views/modules/production/soscheduleRouting.vue +++ b/src/views/modules/production/soscheduleRouting.vue @@ -479,6 +479,10 @@ onClose: () => { } }) + }else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) } }) })