| | |
| | | <el-image src="/img/workbench/icon_bg.png"></el-image> |
| | | <span class="item-name">报工</span> |
| | | </div> |
| | | <div |
| | | <!-- <div |
| | | v-show="isShowStepBusiness" |
| | | :class="['wb-header-menu-item', stepShow ? 'item-show' : '']" |
| | | @click="selectItem('step')" |
| | | > |
| | | <el-image src="/img/workbench/icon_gb.png"></el-image> |
| | | <span class="item-name">工步</span> |
| | | </div> |
| | | <div |
| | | </div> --> |
| | | <!-- <div |
| | | v-show="permissions.product_menu_split" |
| | | :class="['wb-header-menu-item', splitTaskShow ? 'item-show' : '']" |
| | | @click="selectItem('splitTask')" |
| | | > |
| | | <el-image src="/img/workbench/icon_sp.png"></el-image> |
| | | <span class="item-name">分割</span> |
| | | </div> |
| | | </div> --> |
| | | <div |
| | | :class="['wb-header-menu-item', artificialShow ? 'item-show' : '']" |
| | | @click="selectItem('artificial')" |
| | |
| | | > |
| | | </div> |
| | | </div> |
| | | <div class="start-end-div"> |
| | | <div class="start-end-div" > |
| | | <div> |
| | | <span |
| | | style="margin-left:8px;font-size:12px;line-height:32px;" |
| | |
| | | </div> |
| | | <div style="float:right;width:10%;"> |
| | | <div class="open-edit-duty-div"> |
| | | <div> |
| | | <!-- <div> |
| | | <span class="duty-edit-span" @click="clearDutyRecord" |
| | | >清空</span |
| | | > |
| | | </div> |
| | | </div> --> |
| | | <div> |
| | | <span class="duty-edit-span" @click="openDutyEdit" |
| | | >编辑</span |
| | |
| | | <el-tooltip |
| | | class="item" |
| | | effect="dark" |
| | | content="批量提交" |
| | | content="清空" |
| | | placement="top" |
| | | > |
| | | <button |
| | | <!-- <button |
| | | class="duty-circle-button" |
| | | @click="submitSaveDutyRecord" |
| | | > |
| | | <i |
| | | class="el-icon-document-checked" |
| | | class="el-icon-delete" |
| | | style="color: #FFFFFF;" |
| | | ></i> |
| | | </button> --> |
| | | <button |
| | | class="duty-circle-button" |
| | | @click="clearDutyRecord" |
| | | > |
| | | <i |
| | | class="el-icon-delete" |
| | | style="color: #FFFFFF;" |
| | | ></i> |
| | | </button> |
| | |
| | | :inline="true" |
| | | style="margin-left: 10px" |
| | | > |
| | | <el-form-item prop="orderNumber" label="销售订单号"> |
| | | <!-- <el-form-item prop="orderNumber" label="销售订单号"> |
| | | <el-input |
| | | placeholder="请输入销售订单号" |
| | | v-model="operateTaskForm.orderNumber" |
| | |
| | | @keyup.enter.native="queryInfoForOrderNumber" |
| | | @clear="queryInfoForOrderNumber" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item prop="spec" label="成品规格"> |
| | | </el-form-item> --> |
| | | <!-- <el-form-item prop="spec" label="成品规格"> |
| | | <el-select |
| | | placeholder="请选择成品规格" |
| | | v-model="operateTaskForm.spec" |
| | |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item prop="outBatchNo" label="SN"> |
| | | </el-form-item> --> |
| | | <el-form-item prop="outBatchNo" label="车间订单"> |
| | | <el-input |
| | | placeholder="请输入投入半成品SN号" |
| | | placeholder="请输入车间订单号" |
| | | v-model="operateTaskForm.outBatchNo" |
| | | clearable |
| | | @keyup.enter.native="refreshOperateTasksByConditions" |
| | | @clear="refreshOperateTasksByConditions" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item prop="mpsNo" label="计划号"> |
| | | <el-form-item prop="mpsNo" label="工单号"> |
| | | <el-input |
| | | placeholder="请输入计划号" |
| | | placeholder="请输入工单号" |
| | | v-model="operateTaskForm.mpsNo" |
| | | clearable |
| | | @keyup.enter.native="refreshOperateTasksByConditions" |
| | |
| | | </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 |
| | |
| | | .task-div-content { |
| | | // height: calc(100% - 40px); |
| | | flex: 1; |
| | | padding: 0px 15px; |
| | | padding: 10px 15px; |
| | | box-sizing: border-box; |
| | | overflow-y: auto; |
| | | margin-bottom: 10px; |
| | |
| | | |
| | | .warning-info { |
| | | margin-left: 20px; |
| | | font-size: 16px; |
| | | font-size: 13px; |
| | | font-weight: bold; |
| | | color: red; |
| | | letter-spacing: 3px; |
| | | } |
| | |
| | | getPartNamesByOrderNo, |
| | | getProductSnByCustomerNoAndPartName |
| | | } from '@/api/product/personboard' |
| | | import { getObj as getSysParam } from '@/api/admin/sys-public-param' |
| | | import { getObj as getSysParam} from '@/api/admin/sys-public-param' |
| | | import { getAllCrewList } from '@/api/basic/crew' |
| | | import { getAllShiftList } from '@/api/basic/shift' |
| | | import { getAllWorkstationList, updateById } from '@/api/basic/workstation' |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | dutyForm: {}, |
| | | operateTaskForm: {}, |
| | | isShowNormalTracking: false, |
| | | // taskStatusColor: '', |
| | | showBan: false, |
| | | dutyCanEdit: false, |
| | | saveButton: false, |
| | |
| | | currItem: 'task' |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(['userInfo', 'tagWel', 'permissions']) |
| | | }, |
| | | created() { |
| | | document.title = '工作台——ZTTMES' |
| | | 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) |
| | | console.log(this.permissions, 'ASSS') |
| | | }, |
| | | 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() |
| | |
| | | customerOrderNo: this.operateTaskForm.orderNumber |
| | | }).then((res) => { |
| | | const result = res.data.data |
| | | console.log(result) |
| | | result.forEach(function(item) { |
| | | const obj = { |
| | | key: item, |
| | |
| | | } |
| | | that.partNames.push(obj) |
| | | }) |
| | | console.log(that.partNames) |
| | | }) |
| | | }, 500) |
| | | } else { |
| | |
| | | if (!this.dutyForm.endTime) { |
| | | return { result: false, msg: '结束时间不能为空' } |
| | | } |
| | | if (!this.dutyForm.dutyTime) { |
| | | /* if (!this.dutyForm.dutyTime) { |
| | | return { result: false, msg: '班次时间不能为空' } |
| | | } |
| | | } */ |
| | | if (!this.dutyForm.shiftId) { |
| | | return { result: false, msg: '班次不能为空' } |
| | | } |
| | |
| | | (e) => e.id === this.dutyForm.workstationId |
| | | ).workCenter |
| | | } |
| | | console.log(this.paramObj_StationSave) |
| | | this.visible_StationSave = true |
| | | }, |
| | | Select_StationSave() { |
| | |
| | | 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 = '工作台——MES' |
| | | 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> |