From 2a1ea6a1c5b2210b3ac751e344517741cfbac2dd Mon Sep 17 00:00:00 2001 From: zouyu <2723363702@qq.com> Date: 星期五, 19 一月 2024 10:59:31 +0800 Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/mes-ocea-before --- src/views/product/workbench/index.vue | 279 ++++++++++++++++++++++++++++++------------------------- 1 files changed, 152 insertions(+), 127 deletions(-) diff --git a/src/views/product/workbench/index.vue b/src/views/product/workbench/index.vue index 026fcfe..aa7d640 100644 --- a/src/views/product/workbench/index.vue +++ b/src/views/product/workbench/index.vue @@ -256,7 +256,7 @@ > </div> </div> - <div class="start-end-div"> + <div class="start-end-div" > <div> <span style="margin-left:8px;font-size:12px;line-height:32px;" @@ -528,35 +528,37 @@ </el-form-item> </el-form> </div> - <div class="task-div-content"> - <div v-if="!isShowNormalTracking" class="task-list-div"> - <operationTaskPane - ref="operateTaskDiv" - :workstationId="dutyForm.workstationId" - :productSn="operateTaskForm.SN" - :orderNumber="operateTaskForm.orderNumber" - :spec="operateTaskForm.spec" - :outBatchNo="operateTaskForm.outBatchNo" - :mpsNo="operateTaskForm.mpsNo" - @changeCurrOperateTask="changeCurrOperateTask" - @refreshReport="refreshWorkReportPageData" - /> - </div> - <div v-if="isShowNormalTracking" class="task-list-div"> - <operationTaskTable - ref="operateTaskTableDiv" - :workstationId="dutyForm.workstationId" - :productSn="operateTaskForm.SN" - :orderNumber="operateTaskForm.orderNumber" - :spec="operateTaskForm.spec" - :mpsNo="operateTaskForm.mpsNo" - @changeCurrOperateTask="changeCurrOperateTask" - /> - </div> - </div> + <!-- :style="{ backgroundColor: taskStatusColor() }" --> + <div class="task-div-content" > + <div v-if="!isShowNormalTracking" class="task-list-div" > + <operationTaskPane + ref="operateTaskDiv" + :workstationId="dutyForm.workstationId" + :productSn="operateTaskForm.SN" + :orderNumber="operateTaskForm.orderNumber" + :spec="operateTaskForm.spec" + :outBatchNo="operateTaskForm.outBatchNo" + :mpsNo="operateTaskForm.mpsNo" + @changeCurrOperateTask="changeCurrOperateTask" + @refreshReport="refreshWorkReportPageData" + /> + </div> + <div v-if="isShowNormalTracking" class="task-list-div" > + <operationTaskTable + ref="operateTaskTableDiv" + :workstationId="dutyForm.workstationId" + :productSn="operateTaskForm.SN" + :orderNumber="operateTaskForm.orderNumber" + :spec="operateTaskForm.spec" + :mpsNo="operateTaskForm.mpsNo" + @changeCurrOperateTask="changeCurrOperateTask" + /> + </div> + + </div> </div> </div> - <div :style="{ width: mainMiddleWidth }" v-show="mainMiddleShow"> + <div :style="{ width: mainMiddleWidth } " v-show="mainMiddleShow"> <div style="height:86px;width:14px;position: absolute;top:50%"> <el-tooltip effect="dark" content="鏀剁缉" placement="left"> <img @@ -732,7 +734,6 @@ <staffDialog :currshowlist.sync="showStaff" :selCol="selCol" - :selColValArr="selColValArr" :multiSelect="true" :dutyRecord="dutyForm" @handleSelectionChange="selectStaff" @@ -1485,7 +1486,8 @@ .warning-info { margin-left: 20px; - font-size: 16px; + font-size: 13px; + font-weight: bold; color: red; letter-spacing: 3px; } @@ -1560,6 +1562,10 @@ }, data() { return { + dutyForm: {}, + operateTaskForm: {}, + isShowNormalTracking: false, + // taskStatusColor: '', showBan: false, dutyCanEdit: false, saveButton: false, @@ -1666,96 +1672,9 @@ currItem: 'task' } }, - computed: { - ...mapGetters(['userInfo', 'tagWel', 'permissions']) - }, - created() { - document.title = '宸ヤ綔鍙扳�斺�擬ES' - if (!this.dutyForm.workstationId) { - const k = localStorage.getItem(storage_key) - if (k) { - this.dutyForm.workstationId = parseInt(k) - } - } - this.initOptions() - this.getSysParam(sysParam.SHOW_STEP_BUSINESS) - this.getTrackingParam(sysParam.SHOW_TRACKING_TYPE) - this.timer = setInterval(this.clockTimer, 1000) - }, - watch: { - 'dutyForm.workstationId'(val) { - if (val) { - localStorage.setItem(storage_key, val) - } - // 宸ヤ綔绔欐敼鍙樻椂锛屾暣涓〉闈㈢殑鍔ㄦ�佹暟鎹渶瀹炴椂鍔犺浇銆侀〉闈㈢紦瀛樻暟鎹渶 鍒濆鍖� - this.initPageVariable() - this.loadInfoByWorkstation() - }, - 'dutyForm.startTime'(val, oldval) { - if (val) { - this.checkTime() - } else { - this.warningShow = false - } - }, - 'dutyForm.endTime'(val, oldval) { - if (val) { - this.checkTime() - } else { - this.warningShow = false - } - }, - 'operateTaskForm.orderNumber'(val) { - /* this.$nextTick(() => { - this.queryInfoForOrderNumber() - }) */ - }, - 'operateTaskForm.spec'(val) { - if (val == '' || val == null) { - this.SNs = [] - this.operateTaskForm.SN = '' - } else { - const that = this - that.SNs = [] - getProductSnByCustomerNoAndPartName({ - customerOrderNo: this.operateTaskForm.orderNumber, - partName: val - }).then((res) => { - const result = res.data.data - result.forEach(function(item) { - const obj = { - key: item, - value: item - } - that.SNs.push(obj) - }) - }) - } - this.$nextTick(() => { - if (this.partNames.length !== 0) { - this.refreshOperateTasks() - } - }) - }, - 'operateTaskForm.SN'(val) { - this.$nextTick(() => { - if (this.SNs.length !== 0) { - this.refreshOperateTasks() - } - }) - }, - 'operateTaskForm.outBatchNo'(val) { - /* this.$nextTick(() => { - this.refreshOperateTasks() - }) */ - }, - 'operateTaskForm.mpsNo'(val) { - /* this.$nextTick(() => { - this.refreshOperateTasks() - }) */ - } - }, methods: { + // changeCurrOperateTask() {}, + // refreshWorkReportPageData() {}, refreshOperateTasksByConditions() { this.$nextTick(() => { this.refreshOperateTasks() @@ -1791,7 +1710,6 @@ customerOrderNo: this.operateTaskForm.orderNumber }).then((res) => { const result = res.data.data - console.log(result) result.forEach(function(item) { const obj = { key: item, @@ -1799,7 +1717,6 @@ } that.partNames.push(obj) }) - console.log(that.partNames) }) }, 500) } else { @@ -2297,7 +2214,6 @@ (e) => e.id === this.dutyForm.workstationId ).workCenter } - console.log(this.paramObj_StationSave) this.visible_StationSave = true }, Select_StationSave() { @@ -2461,10 +2377,10 @@ } else if (this.status) { this.$message.warning('璇ョ彮娆″凡缁忕‘璁わ紝涓嶅彲淇敼') } else { - this.selCol = 'staffNo' - for (let i = 0; i < this.personBoardList.length; i++) { - this.selColValArr.push(this.personBoardList[i].staffNo) - } + // this.selCol = 'staffNo' + // for (let i = 0; i < this.personBoardList.length; i++) { + // this.selColValArr.push(this.personBoardList[i].staffNo) + // } this.showStaff = true } }, @@ -2597,6 +2513,115 @@ beforeDestroy() { clearInterval(this.timer) } - } + }, + computed: { + ...mapGetters(['userInfo', 'tagWel', 'permissions']), +// 鍗婁釜鏈堜箣鍓嶆槸榛勮壊 褰撳ぉ鍜屼笁澶╀箣鍐呭氨鏄孩鑹� 涓夊ぉ涔嬪悗灏辨槸钃濊壊 +// taskStatusColor() { +// return function(date) { +// const now = new Date(); +// const halfMonthAgo = new Date(now - 15 * 24 * 60 * 60 * 1000); +// const threeDaysAgo = new Date(now - 3 * 24 * 60 * 60 * 1000); +// const oneDayAgo = new Date(now - 24 * 60 * 60 * 1000); +// const today = new Date(now); + +// if (halfMonthAgo <= date && date <= threeDaysAgo) { +// return 'yellow'; +// } else if (today <= date && date <= threeDaysAgo) { +// return 'red'; +// } else { +// return 'blue'; +// } +// }; +// } + + }, + created() { + document.title = '宸ヤ綔鍙扳�斺�擬ES' + if (!this.dutyForm.workstationId) { + const k = localStorage.getItem(storage_key) + if (k) { + this.dutyForm.workstationId = parseInt(k) + } + } + this.initOptions() + this.getSysParam(sysParam.SHOW_STEP_BUSINESS) + this.getTrackingParam(sysParam.SHOW_TRACKING_TYPE) + this.timer = setInterval(this.clockTimer, 1000) + }, + watch: { + 'dutyForm.workstationId'(val) { + if (val) { + localStorage.setItem(storage_key, val) + } + // 宸ヤ綔绔欐敼鍙樻椂锛屾暣涓〉闈㈢殑鍔ㄦ�佹暟鎹渶瀹炴椂鍔犺浇銆侀〉闈㈢紦瀛樻暟鎹渶 鍒濆鍖� + this.initPageVariable() + this.loadInfoByWorkstation() + }, + 'dutyForm.startTime'(val, oldval) { + if (val) { + this.checkTime() + } else { + this.warningShow = false + } + }, + 'dutyForm.endTime'(val, oldval) { + if (val) { + this.checkTime() + } else { + this.warningShow = false + } + }, + 'operateTaskForm.orderNumber'(val) { + /* this.$nextTick(() => { + this.queryInfoForOrderNumber() + }) */ + }, + 'operateTaskForm.spec'(val) { + if (val == '' || val == null) { + this.SNs = [] + this.operateTaskForm.SN = '' + } else { + const that = this + that.SNs = [] + getProductSnByCustomerNoAndPartName({ + customerOrderNo: this.operateTaskForm.orderNumber, + partName: val + }).then((res) => { + const result = res.data.data + result.forEach(function(item) { + const obj = { + key: item, + value: item + } + that.SNs.push(obj) + }) + }) + } + this.$nextTick(() => { + if (this.partNames.length !== 0) { + this.refreshOperateTasks() + } + }) + }, + 'operateTaskForm.SN'(val) { + this.$nextTick(() => { + if (this.SNs.length !== 0) { + this.refreshOperateTasks() + } + }) + }, + 'operateTaskForm.outBatchNo'(val) { + /* this.$nextTick(() => { + this.refreshOperateTasks() + }) */ + }, + 'operateTaskForm.mpsNo'(val) { + /* this.$nextTick(() => { + this.refreshOperateTasks() + }) */ + } + }, + } </script> -- Gitblit v1.9.3