<template>
|
<div style="width: 100%;height: 100%">
|
<div class="wb-header">
|
<div class="wb-header-user">
|
<el-image src="/img/workbench/img_user.png"></el-image>
|
<span class="time-content">{{ userInfo.username }}</span>
|
<div class="user-info" v-if="userInfo.staffName && userInfo.post">
|
{{ userInfo.post }} - {{ userInfo.staffName }}
|
</div>
|
<div class="user-info" v-else-if="userInfo.staffName">
|
{{ userInfo.staffName }}
|
</div>
|
</div>
|
<div class="wb-header-menu">
|
<div
|
:class="['wb-header-menu-item', taskShow ? 'item-show' : '']"
|
@click="selectItem('task')"
|
>
|
<el-image src="/img/workbench/icon_gd.png"></el-image>
|
<span class="item-name">工单详情</span>
|
</div>
|
<div
|
:class="['wb-header-menu-item', productRecordShow ? 'item-show' : '']"
|
@click="selectItem('productRecord')"
|
>
|
<el-image src="/img/workbench/icon_sc.png"></el-image>
|
<span class="item-name">生产记录</span>
|
</div>
|
<div
|
:class="['wb-header-menu-item', feedShow ? 'item-show' : '']"
|
@click="selectItem('feed')"
|
>
|
<el-image src="/img/workbench/icon_tl.png"></el-image>
|
<span class="item-name">投料</span>
|
</div>
|
<div
|
v-show="isShowNormalTracking"
|
:class="['wb-header-menu-item', trackingShow ? 'item-show' : '']"
|
@click="selectItem('tracking')"
|
>
|
<el-image src="/img/workbench/icon_bg.png"></el-image>
|
<span class="item-name">报工</span>
|
</div>
|
<div
|
v-show="!isShowNormalTracking"
|
:class="['wb-header-menu-item', workReportShow ? 'item-show' : '']"
|
@click="selectItem('workReport')"
|
>
|
<el-image src="/img/workbench/icon_bg.png"></el-image>
|
<span class="item-name">报工</span>
|
</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
|
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
|
:class="['wb-header-menu-item', artificialShow ? 'item-show' : '']"
|
@click="selectItem('artificial')"
|
>
|
<el-image src="/img/workbench/icon_rg.png"></el-image>
|
<span class="item-name">人工</span>
|
</div>
|
|
<div
|
:class="['wb-header-menu-item', productOutShow ? 'item-show' : '']"
|
@click="selectItem('productOut')"
|
>
|
<el-image src="/img/workbench/icon_cc.png"></el-image>
|
<span class="item-name">产出记录</span>
|
</div>
|
<div
|
:class="['wb-header-menu-item', exceptionShow ? 'item-show' : '']"
|
@click="selectItem('exception')"
|
>
|
<el-image src="/img/workbench/icon_yc.png"></el-image>
|
<span class="item-name">生产异常反馈</span>
|
</div>
|
<div
|
v-show="permissions.product_menu_mold"
|
:class="['wb-header-menu-item', mouldShow ? 'item-show' : '']"
|
@click="selectItem('mould')"
|
>
|
<el-image src="/img/workbench/icon_tl.png"></el-image>
|
<span class="item-name">工装模具</span>
|
</div>
|
<div
|
v-show="permissions.product_menu_devicecloud"
|
:class="['wb-header-menu-item']"
|
@click="selectItem('devicecloud')"
|
>
|
<el-image src="/img/workbench/icon_sby.png"></el-image>
|
<span class="item-name">设备云</span>
|
</div>
|
<div class="wb-header-menu-item" @click="jumpToFirstPage">
|
<el-image
|
style="height:28px;width:28px;"
|
src="/img/workbench/icon_ht.png"
|
></el-image>
|
<span class="item-name">后台管理</span>
|
</div>
|
</div>
|
<div class="wb-header-time">
|
<el-image src="/img/workbench/icon_time.png"></el-image>
|
<div style="width:130px;" class="time-content">{{ currentTime }}</div>
|
</div>
|
</div>
|
<div class="wb-main">
|
<div
|
class="wb-main-expand"
|
:style="{ width: mainExpandWidth }"
|
v-show="mainExpandShow"
|
>
|
<div style="height:86px;width:14px;position: absolute;top:50%">
|
<el-tooltip effect="dark" content="展开" placement="right">
|
<img
|
style="cursor:pointer"
|
src="/img/workbench/to_right.png"
|
@click="shrinkExpand('expand')"
|
/>
|
</el-tooltip>
|
</div>
|
</div>
|
<div
|
class="wb-main-left"
|
:style="{ width: mainLeftWidth }"
|
v-show="mainLeftShow"
|
>
|
<div :class="['duty-div', { hide: !dutyShow }]">
|
<div class="duty-card-div" style="overflow-x:auto;">
|
<div class="duty-info-div">
|
<div>
|
<div style="float:left;width:90%;">
|
<div class="edit-duty-div">
|
<div class="edit-duty-top-div">
|
<div
|
style="width:15%;text-align:center;height: 42px;line-height:42px;"
|
>
|
<i class="icon-workstation"></i>
|
</div>
|
<div style="width:85%">
|
<div class="workstation-div">
|
<el-select
|
v-model="dutyForm.workstationId"
|
filterable
|
placeholder="请选择工作站"
|
style="width: calc(100% - 40px);margin-left:8px;"
|
>
|
<el-option
|
v-for="item in workstations"
|
:key="item.id"
|
:label="item.name"
|
:value="item.id"
|
>
|
</el-option>
|
</el-select>
|
</div>
|
<div class="shift-crew-div">
|
<div>
|
<span
|
style="margin-left:8px;font-size:12px;line-height:32px;"
|
>班次:</span
|
>
|
<span
|
style="font-size:12px;line-height:32px;"
|
v-if="!dutyCanEdit"
|
>{{ formatShift(dutyForm.shiftId) }}</span
|
>
|
<el-select
|
v-if="dutyCanEdit"
|
v-model="dutyForm.shiftId"
|
style="width:70px"
|
placeholder="班次"
|
filterable
|
@change="selectShiftChanged"
|
>
|
<el-option
|
v-for="item in shifts"
|
:key="item.id"
|
:label="item.name"
|
:value="item.id"
|
/>
|
</el-select>
|
</div>
|
<div>
|
<span style="margin-left:8px;font-size:12px;"
|
>班组:</span
|
>
|
<span
|
style="font-size:12px;line-height:32px;"
|
v-if="!dutyCanEdit"
|
>{{ formatCrew(dutyForm.crewId) }}</span
|
>
|
<el-select
|
v-if="dutyCanEdit"
|
v-model="dutyForm.crewId"
|
style="width:70px"
|
placeholder="班组"
|
filterable
|
>
|
<el-option
|
v-for="item in crews"
|
:key="item.id"
|
:label="item.crewName"
|
:value="item.id"
|
/>
|
</el-select>
|
</div>
|
</div>
|
</div>
|
</div>
|
<div class="edit-duty-bottom-div">
|
<div
|
style="width:15%;text-align:center;height: 42px;line-height:42px;"
|
>
|
<i class="icon-duty-day"></i>
|
</div>
|
<div style="width:85%">
|
<div class="duty-day-div" style="width:100%">
|
<div>
|
<span
|
style="margin-left:8px;"
|
v-if="!dutyCanEdit"
|
>{{
|
dutyForm.dutyDate != null
|
? dutyForm.dutyDate.substring(0, 10)
|
: ''
|
}}</span
|
>
|
<el-date-picker
|
v-if="dutyCanEdit"
|
style="margin-left:8px;"
|
v-model="dutyForm.dutyDate"
|
type="date"
|
placeholder="班次日期"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
@change="selectDutyDate"
|
:clearable="false"
|
>
|
</el-date-picker>
|
</div>
|
<div>
|
<span class="warning-info" v-if="warningShow"
|
>此生产班次非今日生产班次!</span
|
>
|
</div>
|
</div>
|
<div class="start-end-div">
|
<div>
|
<span
|
style="margin-left:8px;font-size:12px;line-height:32px;"
|
>开始:</span
|
>
|
<span
|
style="margin-left:0px;font-size:12px;"
|
v-if="!dutyCanEdit"
|
>{{
|
dutyForm.startTime != null
|
? dutyForm.startTime.substring(0, 16)
|
: ''
|
}}</span
|
>
|
<el-date-picker
|
v-if="dutyCanEdit"
|
v-model="dutyForm.startTime"
|
type="datetime"
|
placeholder="开始"
|
format="yyyy-MM-dd HH:mm"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
:clearable="false"
|
>
|
</el-date-picker>
|
</div>
|
<div>
|
<span
|
style="margin-left:8px;font-size:12px;line-height:32px;"
|
>结束:</span
|
>
|
<span
|
style="margin-left:0px;font-size:12px;"
|
v-if="!dutyCanEdit"
|
>{{
|
dutyForm.endTime != null
|
? dutyForm.endTime.substring(0, 16)
|
: ''
|
}}</span
|
>
|
<el-date-picker
|
v-if="dutyCanEdit"
|
v-model="dutyForm.endTime"
|
type="datetime"
|
placeholder="结束"
|
format="yyyy-MM-dd HH:mm"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
:clearable="false"
|
>
|
</el-date-picker>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<div style="float:right;width:10%;">
|
<div class="open-edit-duty-div">
|
<div>
|
<span class="duty-edit-span" @click="clearDutyRecord"
|
>清空</span
|
>
|
</div>
|
<div>
|
<span class="duty-edit-span" @click="openDutyEdit"
|
>编辑</span
|
>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<div class="duty-status-div">
|
<el-button icon="icon-duty-no" class="dutyno_button"
|
>编号:{{ dutyForm.dutyNo }}
|
</el-button>
|
<el-button icon="icon-duty-status" class="dutystatus_button"
|
>状态:{{ dutyForm.isSubmit ? '已提交' : '未提交' }}
|
</el-button>
|
</div>
|
<div class="duty-toolbar-div">
|
<el-tooltip
|
class="item"
|
effect="dark"
|
content="保存"
|
placement="top"
|
>
|
<button
|
class="duty-circle-button"
|
style="margin-left:24px;"
|
@click="dutyFormSubmit"
|
>
|
<i class="icon-duty-save"></i>
|
</button>
|
</el-tooltip>
|
<el-tooltip
|
class="item"
|
effect="dark"
|
content="批量保存"
|
placement="top"
|
>
|
<button
|
class="duty-circle-button"
|
@click="dutyFormSubmitBatch"
|
v-if="this.permissions.product_add_shift_batch"
|
>
|
<i class="el-icon-folder-add" style="color: #FFFFFF;"></i>
|
</button>
|
</el-tooltip>
|
<el-tooltip
|
class="item"
|
effect="dark"
|
content="提交"
|
placement="top"
|
>
|
<button class="duty-circle-button" @click="submitDutyRecord">
|
<i class="icon-duty-submit"></i>
|
</button>
|
</el-tooltip>
|
<el-tooltip
|
class="item"
|
effect="dark"
|
content="批量提交"
|
placement="top"
|
>
|
<button
|
class="duty-circle-button"
|
@click="submitSaveDutyRecord"
|
>
|
<i
|
class="el-icon-document-checked"
|
style="color: #FFFFFF;"
|
></i>
|
</button>
|
</el-tooltip>
|
<el-tooltip
|
class="item"
|
effect="dark"
|
content="历史"
|
placement="top"
|
>
|
<button class="duty-circle-button" @click="changeDutyRecord">
|
<i class="icon-duty-history"></i>
|
</button>
|
</el-tooltip>
|
<el-tooltip
|
class="item"
|
effect="dark"
|
content="删除"
|
placement="top"
|
>
|
<button class="duty-circle-button" @click="deleteDutyRecord">
|
<i class="icon-duty-delete"></i>
|
</button>
|
</el-tooltip>
|
<el-tooltip
|
class="item fold"
|
effect="dark"
|
content="班次折叠"
|
placement="top"
|
>
|
<button
|
class="duty-circle-button"
|
@click="dutyShow = !dutyShow"
|
>
|
<i
|
:class="
|
dutyShow ? 'el-icon-top-left' : 'el-icon-bottom-right'
|
"
|
style="color:white"
|
></i>
|
</button>
|
</el-tooltip>
|
</div>
|
</div>
|
</div>
|
<div :class="['task-div', { dutyhide: !dutyShow }]">
|
<div class="task-div-title">
|
<div style="margin-left:15px;">
|
<span style="font-size: 17px;font-weight: bold;color: #2d2d2d;"
|
>工单列表</span
|
>
|
</div>
|
<div style="margin-right:20px;">
|
<el-tooltip
|
class="item"
|
effect="dark"
|
content="刷新工单"
|
placement="top"
|
>
|
<el-button
|
icon="el-icon-refresh"
|
type="info"
|
circle
|
@click="refreshOperateTasks"
|
></el-button>
|
</el-tooltip>
|
</div>
|
</div>
|
<div
|
style="margin-bottom: 10px;margin-left: 15px; display:inline-block;"
|
>
|
<el-form
|
:model="operateTaskForm"
|
class="l-mes"
|
:inline="true"
|
style="margin-left: 10px"
|
>
|
<el-form-item prop="orderNumber" label="销售订单号">
|
<el-input
|
placeholder="请输入销售订单号"
|
v-model="operateTaskForm.orderNumber"
|
clearable
|
@keyup.enter.native="queryInfoForOrderNumber"
|
@clear="queryInfoForOrderNumber"
|
></el-input>
|
</el-form-item>
|
<el-form-item prop="spec" label="成品规格">
|
<el-select
|
placeholder="请选择成品规格"
|
v-model="operateTaskForm.spec"
|
clearable
|
>
|
<el-option
|
v-for="item in partNames"
|
:key="item.key"
|
:label="item.value"
|
:value="item.value"
|
>
|
</el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item prop="成品段长" label="成品段长">
|
<el-select v-model="operateTaskForm.SN" clearable>
|
<el-option
|
v-for="item in SNs"
|
:key="item.key"
|
:lable="item.key"
|
:value="item.value"
|
>
|
</el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item prop="outBatchNo" label="SN">
|
<el-input
|
placeholder="请输入投入半成品SN号"
|
v-model="operateTaskForm.outBatchNo"
|
clearable
|
@keyup.enter.native="refreshOperateTasksByConditions"
|
@clear="refreshOperateTasksByConditions"
|
></el-input>
|
</el-form-item>
|
<el-form-item prop="mpsNo" label="计划号">
|
<el-input
|
placeholder="请输入计划号"
|
v-model="operateTaskForm.mpsNo"
|
clearable
|
@keyup.enter.native="refreshOperateTasksByConditions"
|
@clear="refreshOperateTasksByConditions"
|
></el-input>
|
</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>
|
</div>
|
</div>
|
<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
|
style="cursor:pointer"
|
src="/img/workbench/to_left.png"
|
@click="shrinkExpand('shrink')"
|
/>
|
</el-tooltip>
|
</div>
|
</div>
|
<div class="wb-main-right" :style="{ width: mainRightWidth }">
|
<div v-show="taskShow" style="height:100%;background-color: #f5f5f5;">
|
<taskInfoPane
|
ref="taskInfoTab"
|
:currOperateTask="currOperateTask"
|
:workstationId="dutyForm.workstationId"
|
:currentDutyRecord="dutyForm"
|
:personBoardList="personBoardList"
|
/>
|
</div>
|
<div v-show="feedShow" style="height:100%;background-color: #ffffff;">
|
<feedPane
|
ref="feedTab"
|
:workstationId="dutyForm.workstationId"
|
:currOperateTask="currOperateTask"
|
:currItem="currItem"
|
/>
|
</div>
|
<div
|
v-show="exceptionShow"
|
style="height:100%;background-color: #ffffff; margin-top: 5px"
|
>
|
<exception
|
ref="exceptionTab"
|
:workstationId="dutyForm.workstationId"
|
/>
|
</div>
|
<div
|
v-show="trackingShow"
|
style="height:100%;background-color: #ffffff;"
|
>
|
<!--<productTrackingTabCard
|
ref="productTrackingTab"
|
:workstationId="dutyForm.workstationId"
|
:currOperateTask="currOperateTask"
|
:currentDutyRecord="dutyForm"
|
:personBoardList="personBoardList"
|
@refreshOperateTasks="refreshOperateTasks"
|
@refreshArtificial="refreshArtificial"
|
@refreshProductOutput="refreshProductOutput"
|
@refreshFeeds="refreshFeeds"
|
@refreshFeedsForDel="refreshFeeds"
|
@spreadParam="spreadParam"
|
@refreshCurrOpTask="refreshCurrOpTask"
|
/>-->
|
</div>
|
<div
|
v-show="stepShow"
|
style="height:100%;background-color: #ffffff;"
|
class="step-div"
|
>
|
<!-- <stepTabCard
|
:currOperateTask="currOperateTask"
|
:personBoardList="personBoardList"
|
:currentDutyRecord="dutyForm"
|
/> -->
|
<stepTabCard
|
:workstationId="dutyForm.workstationId"
|
:currOperateTask="currOperateTask"
|
:personBoardList="personBoardList"
|
:currentDutyRecord="dutyForm"
|
:stepShow="stepShow"
|
:userInfo="userInfo"
|
:currItem="currItem"
|
ref="stepRecordForm"
|
@refreshProductTracking="refreshNewTrackingList"
|
/>
|
</div>
|
<div
|
v-show="artificialShow"
|
style="height:100%;background-color: #ffffff;"
|
>
|
<div
|
class="artificial-div"
|
style="padding:0px 14px;height: 100%;overflow: auto;"
|
>
|
<div class="artificial-header">
|
<div style="height:28px;line-height:28px;">
|
<el-divider
|
class="pane-divider"
|
direction="vertical"
|
></el-divider>
|
<span style="font-size:14px;font-weight:bold">人工列表</span>
|
</div>
|
</div>
|
<div style="height: 800px">
|
<artificialTable
|
ref="artificialTable"
|
:personList="personBoardList"
|
:workstationId="dutyForm.workstationId"
|
:commitLimit="status"
|
:currentDutyRecord="dutyForm"
|
></artificialTable>
|
</div>
|
</div>
|
</div>
|
<div
|
v-show="productRecordShow"
|
style="height:100%;background-color: #ffffff;"
|
>
|
<productRecordTabCard
|
:currOperateTask="currOperateTask"
|
:currentDutyRecord="dutyForm"
|
:workstationId="dutyForm.workstationId"
|
:templateTypeList="templateTypeList"
|
/>
|
</div>
|
<div
|
v-show="productOutShow"
|
style="height:100%;background-color: #ffffff;"
|
>
|
<productOutputTable
|
ref="productOutputTable"
|
:workstationId="dutyForm.workstationId"
|
:currentDutyRecord="dutyForm"
|
:currItem="currItem"
|
></productOutputTable>
|
</div>
|
<div v-show="mouldShow" style="height:100%;background-color: #ffffff;">
|
<mouldPane
|
ref="mouldTab"
|
:workstationId="dutyForm.workstationId"
|
:currOperateTask="currOperateTask"
|
:shiftId="dutyForm.shiftId"
|
:crewId="dutyForm.crewId"
|
/>
|
</div>
|
<div
|
v-show="workReportShow"
|
style="height:100%;background-color: #ffffff;"
|
>
|
<workReportCard
|
ref="workReportCard"
|
:workstationId="dutyForm.workstationId"
|
:currOperateTask="currOperateTask"
|
:currentDutyRecord="dutyForm"
|
:personBoardList="personBoardList"
|
:currItem="currItem"
|
@refreshOperateTasks="refreshOperateTasks"
|
@refreshArtificial="refreshArtificial"
|
@refreshProductOutput="refreshProductOutput"
|
@refreshFeeds="refreshFeeds"
|
@refreshFeedsForDel="refreshFeeds"
|
@spreadParam="spreadParam"
|
@refreshCurrOpTask="refreshCurrOpTask"
|
/>
|
</div>
|
<div
|
v-show="splitTaskShow"
|
style="height:100%;background-color: #ffffff;"
|
>
|
<splitTaskCard
|
ref="splitTaskCard"
|
:workstationId="dutyForm.workstationId"
|
:currOperateTask="currOperateTask"
|
:currentDutyRecord="dutyForm"
|
:personBoardList="personBoardList"
|
:currItem="currItem"
|
/>
|
</div>
|
</div>
|
</div>
|
<staffDialog
|
:currshowlist.sync="showStaff"
|
:selCol="selCol"
|
:selColValArr="selColValArr"
|
:multiSelect="true"
|
:dutyRecord="dutyForm"
|
@handleSelectionChange="selectStaff"
|
@handleSelectionChangeBacth="selectStaffBatch"
|
:isBatch="true"
|
/>
|
<dutyRecordDialog
|
:currshowlist.sync="showDutyRecord"
|
:multiSelect="false"
|
@listenToDutyEvent="selectDutyRecord"
|
:workstationId="dutyForm.workstationId"
|
/>
|
<StationMulti
|
:currshowlist.sync="visible_StationMulti"
|
:paramObj="paramObj_StationMulti"
|
@listenToWorkStationMultiEvent="Select_StationMulti"
|
/>
|
<StationSave
|
:currshowlist.sync="visible_StationSave"
|
:paramObj="paramObj_StationSave"
|
@listenToWorkStationSaveEvent="Select_StationSave"
|
/>
|
|
<el-drawer
|
:visible.sync="personDrawer"
|
direction="ltr"
|
size="400px"
|
title="当班人员"
|
class="personDrawerClass"
|
>
|
<el-table :data="personBoardList" :show-header="true" height="100%">
|
<el-table-column>
|
<template slot="header">
|
<el-button
|
type="text"
|
size="medium"
|
@click="addPersonBoards()"
|
:disabled="status"
|
class="commonButton"
|
>
|
添加人员
|
</el-button>
|
</template>
|
<template scope="scope">
|
<div class="worker">
|
<div class="info">
|
<el-image src="/img/icon/avatar.png" class="avatar" />
|
<div>
|
<label style="font-size: 13px;color: #333;font-weight: 700">{{
|
scope.row.staffName
|
}}</label>
|
<label style="font-size: 12px;color: #999;margin-top: 4px">{{
|
scope.row.staffNo
|
}}</label>
|
</div>
|
</div>
|
<el-tooltip
|
effect="dark"
|
content="删除人员"
|
placement="top-start"
|
>
|
<el-image
|
src="/img/icon/del.png"
|
style="margin-left:10px;height: 28px;width: 28px;vertical-align:middle;cursor: pointer;"
|
@click="deletePersonBoard(scope.$index, scope.row)"
|
/>
|
</el-tooltip>
|
</div>
|
</template>
|
</el-table-column>
|
</el-table>
|
</el-drawer>
|
<div
|
class="operateButtonClass"
|
@click="openPersonDrawer()"
|
style="cursor:pointer;z-index:999;position:absolute;bottom:100px;border-radius: 0 100px 100px 0;"
|
>
|
<span
|
style="color: white;font-size: 12px;line-height: 40px;margin-left: 5px;"
|
>当班人员</span
|
>
|
<i
|
class="el-icon-user"
|
style="font-weight: 500;color: white;font-size: 13px;margin-left: 5px;"
|
></i>
|
<span style="font-weight: 500;color: white;font-size: 13px;"
|
>×{{ personBoardList.length }}</span
|
>
|
</div>
|
</div>
|
</template>
|
<style lang="scss" scoped>
|
.operateButtonClass {
|
width: 100px;
|
height: 40px;
|
background: #006eff;
|
box-shadow: 0 10px 20px 0 rgba(19, 41, 75, 0.2);
|
left: -55px;
|
transition: left 0.35s ease-out;
|
}
|
|
.operateButtonClass:hover {
|
left: 0px;
|
transition: left 0.35s ease-out;
|
}
|
|
.personDrawerClass >>> .el-drawer__body {
|
height: calc(100% - 81px);
|
}
|
|
.worker:hover {
|
background-color: #bae7ff;
|
}
|
|
.worker {
|
padding: 0 8px;
|
display: flex;
|
flex-direction: row;
|
align-items: center;
|
justify-content: space-between;
|
|
.time {
|
display: flex;
|
align-items: center;
|
}
|
|
.time img {
|
width: 15px;
|
height: 15px;
|
}
|
|
.info {
|
display: flex;
|
flex-direction: row;
|
}
|
|
.info div {
|
display: flex;
|
flex-direction: column;
|
justify-content: center;
|
}
|
}
|
|
.avatar {
|
width: 30px;
|
height: 30px;
|
margin: 10px;
|
}
|
|
.wb-header {
|
min-height: 70px;
|
height: 70px;
|
padding: 0px 20px;
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
background-image: -webkit-linear-gradient(90deg, #006eff 0%, #076ecd 100%);
|
background-image: -moz-linear-gradient(90deg, #006eff 0%, #076ecd 100%);
|
background-image: linear-gradient(90deg, #006eff 0%, #076ecd 100%);
|
}
|
|
.wb-header-user {
|
height: 100%;
|
flex-grow: 1;
|
display: flex;
|
justify-content: flex-start;
|
align-items: center;
|
}
|
|
.wb-header-menu {
|
height: 100%;
|
// width: 760px;
|
width: 960px;
|
display: flex;
|
justify-content: space-around;
|
align-items: center;
|
}
|
|
.wb-header-time {
|
height: 100%;
|
flex-grow: 1;
|
display: flex;
|
justify-content: flex-end;
|
align-items: center;
|
}
|
|
.wb-header-menu-item {
|
display: flex;
|
height: 100%;
|
width: 95px;
|
flex-direction: column;
|
justify-content: center;
|
align-items: center;
|
cursor: pointer;
|
padding: 10px 0px 6px;
|
}
|
|
.workstation-div >>> .el-input .el-input__inner {
|
background: transparent !important;
|
border-top: none;
|
border-left: none;
|
border-right: none;
|
border-bottom: none;
|
padding: 0;
|
border-radius: 0;
|
color: #fff;
|
font-size: 16px;
|
}
|
|
.workstation-div >>> .el-select .el-input .el-select__caret::before {
|
content: '';
|
background: url('/img/workbench/icon_xl1.png') center center no-repeat;
|
position: absolute;
|
width: 100%;
|
height: 100%;
|
top: 50%;
|
left: 50%;
|
transform: translate(-50%, -50%);
|
}
|
|
.duty-day-div >>> .el-input .el-input__inner {
|
background: transparent !important;
|
border-top: none;
|
border-left: none;
|
border-right: none;
|
border-bottom: none;
|
padding: 0;
|
border-radius: 0;
|
color: #fff;
|
font-size: 16px;
|
}
|
|
.duty-day-div >>> .el-input.el-input--prefix .el-input__inner {
|
padding-left: 25px;
|
}
|
|
.duty-day-div >>> .el-input .el-input__prefix {
|
left: 0;
|
}
|
|
.duty-day-div >>> .el-date-editor {
|
width: 120px;
|
height: 32px;
|
}
|
|
.item-name {
|
display: block;
|
margin-top: 7px;
|
color: #fff;
|
font-size: 12px;
|
}
|
|
.time-content {
|
color: #fff;
|
margin-left: 12px;
|
font-size: 14px;
|
}
|
|
.user-info {
|
color: #fff;
|
margin-left: 12px;
|
border-radius: 16px;
|
padding: 4px 10px;
|
background-color: #005eae;
|
font-size: 12px;
|
}
|
|
.item-show {
|
background-color: #049efe;
|
}
|
|
.wb-main {
|
box-sizing: border-box;
|
padding: 12px 14px;
|
height: calc(100% - 70px);
|
background-color: #f5f5f5;
|
display: flex;
|
flex-direction: row;
|
justify-content: space-between;
|
position: relative;
|
}
|
|
.wb-main-expand {
|
position: absolute;
|
top: 12px;
|
left: 0px;
|
height: calc(100% - 24px);
|
}
|
|
.wb-main-left {
|
display: flex;
|
background-color: #fff;
|
flex-direction: column;
|
justify-content: center;
|
align-items: center;
|
}
|
|
.duty-div {
|
width: 100%;
|
height: 290px;
|
padding: 15px;
|
box-sizing: border-box;
|
transition: all 0.5s;
|
&.hide {
|
height: 60px;
|
padding-bottom: 5px;
|
.duty-card-div {
|
padding: 0;
|
height: 40px;
|
}
|
.duty-info-div,
|
.duty-status-div {
|
display: none;
|
}
|
.duty-toolbar-div {
|
.item:not(.fold) {
|
display: none;
|
}
|
.fold {
|
margin-left: 15px;
|
}
|
}
|
}
|
}
|
|
.task-div {
|
width: 100%;
|
height: calc(100% - 290px);
|
display: flex;
|
flex-direction: column;
|
transition: all 0.5s;
|
&.dutyhide {
|
height: calc(100% - 60px);
|
}
|
}
|
|
.duty-card-div {
|
width: 100%;
|
height: 250px;
|
transition: all 0.5s;
|
background-image: -webkit-linear-gradient(139deg, #5b5fff 0%, #44a5ff 100%);
|
background-image: -moz-linear-gradient(139deg, #5b5fff 0%, #44a5ff 100%);
|
background-image: linear-gradient(139deg, #5b5fff 0%, #44a5ff 100%);
|
border-radius: 15px;
|
padding: 10px 0px 0px;
|
}
|
|
.edit-duty-div {
|
color: #fff;
|
}
|
|
.edit-duty-top-div {
|
display: flex;
|
justify-content: space-around;
|
align-items: center;
|
margin-bottom: 5px;
|
}
|
|
.shift-crew-div {
|
display: flex;
|
justify-content: space-around;
|
}
|
|
.shift-crew-div > div {
|
width: 50%;
|
}
|
|
.shift-crew-div >>> .el-input .el-input__inner {
|
background: transparent !important;
|
border-top: none;
|
border-left: none;
|
border-right: none;
|
border-bottom: none;
|
padding: 0;
|
border-radius: 0;
|
color: #fff;
|
}
|
|
.shift-crew-div >>> .el-select {
|
width: 55px;
|
}
|
|
.shift-crew-div >>> .el-date-editor {
|
width: 120px;
|
margin-left: 58px;
|
}
|
|
.shift-crew-div >>> .el-input .el-input__prefix {
|
left: 0;
|
}
|
|
.shift-crew-div >>> .el-input.el-input--prefix .el-input__inner {
|
padding-left: 25px;
|
}
|
|
.shift-crew-div >>> .el-input .el-input__suffix {
|
right: 0;
|
}
|
|
.edit-duty-bottom-div {
|
display: flex;
|
justify-content: space-around;
|
align-items: center;
|
}
|
|
.start-end-div {
|
display: flex;
|
justify-content: space-around;
|
}
|
|
.start-end-div > div {
|
width: 50%;
|
}
|
|
.start-end-div >>> .el-input .el-input__inner {
|
background: transparent !important;
|
border-top: none;
|
border-left: none;
|
border-right: none;
|
border-bottom: none;
|
padding: 0;
|
border-radius: 0;
|
color: #fff;
|
}
|
|
.start-end-div >>> .el-select {
|
width: 55px;
|
}
|
|
.start-end-div >>> .el-date-editor {
|
width: 120px;
|
margin-left: 0px;
|
height: 32px;
|
}
|
|
.start-end-div >>> .el-input .el-input__prefix {
|
left: 0;
|
}
|
|
.start-end-div >>> .el-input.el-input--prefix .el-input__inner {
|
padding-left: 15px;
|
}
|
|
.start-end-div >>> .el-date-editor .el-input__prefix .el-input__icon {
|
width: 15px;
|
}
|
|
.start-end-div >>> .el-input .el-input__suffix {
|
right: 0;
|
}
|
|
.workstation-div {
|
padding-left: 0px;
|
width: 100%;
|
font-size: 16px;
|
color: #fff;
|
}
|
|
.duty-day-div {
|
padding-left: 0px;
|
width: 100%;
|
font-size: 16px;
|
color: #fff;
|
height: 32px;
|
line-height: 38px;
|
display: flex;
|
}
|
|
.duty-info-div {
|
min-height: 140px;
|
}
|
|
.duty-info-div:after {
|
/*添加一个内容*/
|
content: '';
|
/*转换为一个块元素*/
|
display: block;
|
/*清除两侧的浮动*/
|
clear: both;
|
}
|
|
.duty-status-div {
|
display: flex;
|
justify-content: center;
|
height: 60px;
|
padding-top: 10px;
|
}
|
|
.dutyno_button {
|
width: 40%;
|
height: 32px;
|
background-color: #ffffff;
|
border-radius: 19px;
|
opacity: 0.6;
|
color: #272fc7;
|
border: 0px;
|
cursor: default;
|
}
|
|
.dutyno_button >>> span {
|
margin-left: 6px;
|
}
|
|
.dutystatus_button {
|
width: 40%;
|
height: 32px;
|
background-image: -webkit-linear-gradient(0deg, #ff6826 0%, #ff9758 100%);
|
background-image: -moz-linear-gradient(0deg, #ff6826 0%, #ff9758 100%);
|
background-image: linear-gradient(0deg, #ff6826 0%, #ff9758 100%);
|
border-radius: 19px;
|
color: #f3f6fb;
|
border: 0px;
|
cursor: default;
|
}
|
|
.dutystatus_button >>> span {
|
margin-left: 6px;
|
}
|
|
.duty-status-div >>> .icon-duty-no {
|
background: url('/img/workbench/icon_bh.png') center center no-repeat;
|
background-size: cover;
|
font-size: 14px !important;
|
}
|
|
.duty-status-div >>> .icon-duty-no:before {
|
content: '状';
|
font-size: 14px;
|
visibility: hidden;
|
}
|
|
.duty-status-div >>> .icon-duty-status {
|
background: url('/img/workbench/icon_zt1.png') center center no-repeat;
|
background-size: cover;
|
font-size: 14px !important;
|
}
|
|
.duty-status-div >>> .icon-duty-status:before {
|
content: '状';
|
font-size: 14px;
|
visibility: hidden;
|
}
|
|
.duty-toolbar-div {
|
height: 40px;
|
border-radius: 0px 0px 15px 15px;
|
background-color: rgba(45, 51, 175, 0.28);
|
}
|
|
.duty-circle-button {
|
border-radius: 50%;
|
padding: 6px;
|
line-height: 1;
|
font-size: 12px;
|
border: 1px solid #fff;
|
background: transparent !important;
|
margin-top: 7px;
|
margin-right: 12px;
|
}
|
|
.duty-ellipse-button {
|
border-radius: 15px;
|
padding: 6px 12px;
|
line-height: 1;
|
font-size: 12px;
|
color: #fff;
|
border: 1px solid #fff;
|
background: transparent !important;
|
margin-top: 7px;
|
margin-right: 12px;
|
}
|
|
.open-edit-duty-div div {
|
text-align: center;
|
margin-bottom: 3px;
|
}
|
|
.duty-edit-span {
|
font-size: 13px;
|
text-decoration: underline;
|
color: #fff;
|
cursor: pointer;
|
}
|
|
.icon-duty-edit {
|
background: url('/img/workbench/icon_xg.png') center center no-repeat;
|
background-size: cover;
|
font-size: 14px !important;
|
cursor: pointer;
|
}
|
|
.icon-duty-edit:before {
|
content: '编';
|
font-size: 14px;
|
visibility: hidden;
|
}
|
|
.icon-duty-save {
|
background: url('/img/workbench/icon_preserve_click.png') center center
|
no-repeat;
|
background-size: cover;
|
font-size: 12px !important;
|
cursor: pointer;
|
}
|
|
.icon-duty-save:before {
|
content: '存';
|
font-size: 12px;
|
visibility: hidden;
|
}
|
|
.icon-duty-submit {
|
background: url('/img/workbench/icon_submit_click.png') center center
|
no-repeat;
|
background-size: cover;
|
font-size: 12px !important;
|
cursor: pointer;
|
}
|
|
.icon-duty-submit:before {
|
content: '提';
|
font-size: 12px;
|
visibility: hidden;
|
}
|
|
.icon-duty-history {
|
background: url('/img/workbench/icon_history_click.png') center center
|
no-repeat;
|
background-size: cover;
|
font-size: 12px !important;
|
cursor: pointer;
|
}
|
|
.icon-duty-history:before {
|
content: '历';
|
font-size: 12px;
|
visibility: hidden;
|
}
|
|
.icon-duty-clean {
|
background: url('/img/workbench/icon_empty_click.png') center center no-repeat;
|
background-size: cover;
|
font-size: 12px !important;
|
cursor: pointer;
|
}
|
|
.icon-duty-clean:before {
|
content: '清';
|
font-size: 12px;
|
visibility: hidden;
|
}
|
|
.icon-duty-delete {
|
background: url('/img/workbench/icon_delete_click.png') center center
|
no-repeat;
|
background-size: cover;
|
font-size: 12px !important;
|
cursor: pointer;
|
}
|
|
.icon-duty-delete:before {
|
content: '删';
|
font-size: 12px;
|
visibility: hidden;
|
}
|
|
.icon-workstation {
|
background: url('/img/workbench/icon_jt.png') center center no-repeat;
|
background-size: cover;
|
font-size: 32px !important;
|
}
|
|
.icon-workstation:before {
|
content: '机';
|
font-size: 32px;
|
visibility: hidden;
|
}
|
|
.icon-duty-day {
|
background: url('/img/workbench/icon_duty_rq.png') center center no-repeat;
|
background-size: cover;
|
font-size: 32px !important;
|
}
|
|
.icon-duty-day:before {
|
content: '日';
|
font-size: 32px;
|
visibility: hidden;
|
}
|
|
.task-div-title {
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
height: 40px;
|
}
|
|
.task-div-content {
|
// height: calc(100% - 40px);
|
flex: 1;
|
padding: 0px 15px;
|
box-sizing: border-box;
|
overflow-y: auto;
|
margin-bottom: 10px;
|
}
|
|
.task-list-div {
|
height: 100%;
|
}
|
|
.wb-main-right {
|
background-color: #fff;
|
}
|
|
.step-div >>> .el-card__header {
|
border-bottom: none;
|
}
|
|
.wb-main-right >>> .el-card {
|
border: 1px solid #cfd5de;
|
}
|
|
.artificial-header {
|
margin-top: 20px;
|
margin-bottom: 14px;
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
}
|
|
.pane-divider {
|
width: 4px;
|
background-color: #4283ee;
|
}
|
|
.artificial-div >>> .el-table .el-table__header th {
|
background: #599ef4 !important;
|
color: #fff !important;
|
}
|
|
.artificial-div >>> .el-table .el-table__header th .el-button {
|
background-image: -webkit-linear-gradient(139deg, #39cb40 0%, #00d999 100%);
|
background-image: -moz-linear-gradient(139deg, #39cb40 0%, #00d999 100%);
|
background-image: linear-gradient(139deg, #39cb40 0%, #00d999 100%);
|
color: #fff;
|
border-color: #e8effb;
|
border-radius: 15px;
|
padding: 6px 15px;
|
}
|
|
.warning-info {
|
margin-left: 20px;
|
font-size: 16px;
|
color: red;
|
letter-spacing: 3px;
|
}
|
</style>
|
<script>
|
import {
|
addPersonBoard,
|
deletePersonBoard,
|
addPersonBoardBatch,
|
getGenerateSnByCustomerOrderNo,
|
getOperationTask,
|
getPartNamesByOrderNo,
|
getProductSnByCustomerNoAndPartName
|
} from '@/api/product/personboard'
|
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'
|
import taskInfoPane from './taskinfo-pane.vue'
|
import feedPane from './feed-pane.vue'
|
import operationTaskPane from './operation-task-pane.vue'
|
import operationTaskTable from './operation-task-table.vue'
|
import productTrackingTabCard from './producttracking-tab.vue'
|
import stepTabCard from './steprecord-tab.vue'
|
import artificialTable from './artificial-table'
|
import productRecordTabCard from './productrecord-tab.vue'
|
import productOutputTable from './productoutput-table'
|
import dutyRecordDialog from '@/views/product/dutyrecord/dutyrecord-table'
|
import staffDialog from '@/views/common/workstaff.vue'
|
import exception from '@/views/quality/exception/exception.vue'
|
import mouldPane from './mould-pane.vue'
|
import workReportCard from './workReportCard.vue'
|
import splitTaskCard from './splitTaskCard.vue'
|
import {
|
getDutyRecordByWorkstationId,
|
getPersonByDutyRecordId,
|
addDutyRecord,
|
putDutyRecord,
|
delDutyRecord,
|
getCheckTime,
|
addDutyRecordBatch
|
} from '@/api/product/dutyrecord'
|
import { dateFormat } from '@/util/date'
|
import { mapGetters } from 'vuex'
|
import { sysParam } from '../../../config/sysParam' // 系统参数
|
import { getProductOutTempTypeName } from '@/api/basic/template'
|
import { getOperationTaskById } from '@/api/plan/operationtask'
|
import StationMulti from './StationMulti'
|
import StationSave from './StationSave'
|
|
const storage_key = 'WORKSTATION_ID'
|
|
export default {
|
components: {
|
StationMulti,
|
StationSave,
|
taskInfoPane,
|
feedPane,
|
operationTaskPane,
|
productTrackingTabCard,
|
stepTabCard,
|
artificialTable,
|
productRecordTabCard,
|
productOutputTable,
|
dutyRecordDialog,
|
staffDialog,
|
exception,
|
mouldPane,
|
workReportCard,
|
operationTaskTable,
|
splitTaskCard
|
},
|
data() {
|
return {
|
showBan: false,
|
dutyCanEdit: false,
|
saveButton: false,
|
submitButton: false,
|
historyButton: false,
|
cleanButton: false,
|
deleteButton: false,
|
mainLeftWidth: 'calc(30% - 14px)',
|
mainLeftShow: true,
|
mainRightWidth: '70%',
|
mainMiddleWidth: '14px',
|
mainMiddleShow: true,
|
dutyShow: true,
|
mainExpandWidth: '0px',
|
mainExpandShow: false,
|
taskShow: true,
|
feedShow: false,
|
trackingShow: false,
|
stepShow: false,
|
exceptionShow: false,
|
artificialShow: false,
|
productRecordShow: false,
|
productOutShow: false,
|
splitTaskShow: false,
|
visible_StationMulti: false,
|
visible_StationSave: false,
|
paramObj_StationMulti: {},
|
paramObj_StationSave: {},
|
dutyForm: {
|
workstationId: null,
|
dutyNo: null,
|
crewId: null,
|
dutyDate: null,
|
startTime: null,
|
endTime: null,
|
dutyTime: null,
|
shiftId: null,
|
id: null,
|
isSubmit: null
|
},
|
updateDutyForm: {
|
dutyNo: null,
|
crewId: null,
|
dutyDate: null,
|
startTime: null,
|
endTime: null,
|
dutyTime: null,
|
shiftId: null,
|
id: null,
|
isSubmit: null
|
},
|
currentTime: '',
|
selCol: null,
|
selColValArr: [],
|
shifts: [],
|
crews: [],
|
workstations: [],
|
personDrawer: false,
|
showStaff: false,
|
status: false,
|
showDutyRecord: false,
|
personBoardList: [],
|
currOperateTask: {
|
id: null,
|
taskNo: null,
|
technologyName: null,
|
technologyRequire: null,
|
partName: null,
|
manufacturingOrder: null,
|
status: null,
|
statusDesc: null,
|
saleOrder: null,
|
custom: null,
|
remark: null,
|
partId: null,
|
partNo: null,
|
unit: null,
|
operationName: null,
|
routingId: null,
|
operationId: null,
|
discNum: null,
|
mpsNo: null,
|
mpsId: null,
|
customerName: null,
|
productName: null,
|
reelSpec: null,
|
customerOrderNo: null
|
},
|
isShowStepBusiness: false,
|
timer: null,
|
warningShow: false,
|
mouldShow: false,
|
workReportShow: false,
|
templateTypeList: [],
|
isShowNormalTracking: false,
|
operateTaskForm: {
|
orderNumber: '',
|
SN: '',
|
spec: '',
|
outBatchNo: ''
|
},
|
SNs: [],
|
partNames: [],
|
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: {
|
refreshOperateTasksByConditions() {
|
this.$nextTick(() => {
|
this.refreshOperateTasks()
|
})
|
},
|
queryInfoForOrderNumber() {
|
if (
|
this.operateTaskForm.orderNumber !== null &&
|
this.operateTaskForm.orderNumber !== ''
|
) {
|
if (this.timer) {
|
clearTimeout(this.timer)
|
}
|
this.timer = setTimeout(() => {
|
this.operateTaskForm.SN = ''
|
this.operateTaskForm.spec = ''
|
const that = this
|
that.SNs = []
|
that.partNames = []
|
getGenerateSnByCustomerOrderNo({
|
customerOrderNo: this.operateTaskForm.orderNumber
|
}).then((res) => {
|
const result = res.data.data
|
result.forEach(function(item) {
|
const obj = {
|
key: item,
|
value: item
|
}
|
that.SNs.push(obj)
|
})
|
})
|
getPartNamesByOrderNo({
|
customerOrderNo: this.operateTaskForm.orderNumber
|
}).then((res) => {
|
const result = res.data.data
|
console.log(result)
|
result.forEach(function(item) {
|
const obj = {
|
key: item,
|
value: item
|
}
|
that.partNames.push(obj)
|
})
|
console.log(that.partNames)
|
})
|
}, 500)
|
} else {
|
this.partNames = []
|
this.SNs = []
|
this.operateTaskForm.spec = ''
|
this.operateTaskForm.SN = ''
|
}
|
this.$nextTick(() => {
|
this.refreshOperateTasks()
|
})
|
},
|
// 校验
|
checkTime() {
|
getCheckTime({
|
startTime: this.dutyForm.startTime,
|
endTime: this.dutyForm.endTime
|
}).then((res) => {
|
if (res.data.data) {
|
this.warningShow = false
|
} else {
|
this.warningShow = true
|
}
|
})
|
},
|
// 跳转至首页
|
jumpToFirstPage() {
|
this.$router.push({ path: this.tagWel.value })
|
},
|
// 当班编辑状态切换
|
openDutyEdit() {
|
if (!this.showBan) {
|
if (this.dutyCanEdit) {
|
this.dutyCanEdit = false
|
} else {
|
this.dutyCanEdit = true
|
}
|
} else {
|
this.$message.warning('班次已提交,不可编辑!')
|
}
|
},
|
formatShift(val) {
|
let shiftName = ''
|
const shiftObj = this.shifts.find((item) => item.id === val)
|
if (shiftObj) {
|
shiftName = shiftObj.name
|
}
|
return shiftName
|
},
|
formatCrew(val) {
|
let crewName = ''
|
const crewObj = this.crews.find((item) => item.id === val)
|
if (crewObj) {
|
crewName = crewObj.crewName
|
}
|
return crewName
|
},
|
// 切换按钮,buttonGroup同类按钮,style按钮类型
|
switchButton(buttonGroup, style) {
|
if (buttonGroup === 'submit') {
|
if (style === '0') {
|
this.submitButton = false
|
} else {
|
this.submitButton = true
|
}
|
} else if (buttonGroup === 'save') {
|
if (style === '0') {
|
this.saveButton = false
|
} else {
|
this.saveButton = true
|
}
|
} else if (buttonGroup === 'history') {
|
if (style === '0') {
|
this.historyButton = false
|
} else {
|
this.historyButton = true
|
}
|
} else if (buttonGroup === 'clean') {
|
if (style === '0') {
|
this.cleanButton = false
|
} else {
|
this.cleanButton = true
|
}
|
} else if (buttonGroup === 'delete') {
|
if (style === '0') {
|
this.deleteButton = false
|
} else {
|
this.deleteButton = true
|
}
|
}
|
},
|
shrinkExpand(isExpand) {
|
if (isExpand === 'shrink') {
|
this.mainLeftWidth = '0%'
|
this.mainRightWidth = '100%'
|
this.mainMiddleWidth = '0px'
|
this.mainExpandWidth = '14px'
|
this.mainLeftShow = false
|
this.mainMiddleShow = false
|
this.mainExpandShow = true
|
} else {
|
this.mainLeftWidth = 'calc(30% - 14px)'
|
this.mainRightWidth = '70%'
|
this.mainMiddleWidth = '14px'
|
this.mainExpandWidth = '0px'
|
this.mainLeftShow = true
|
this.mainMiddleShow = true
|
this.mainExpandShow = false
|
}
|
},
|
// 时间
|
clockTimer() {
|
const date = new Date()
|
const month = (date.getMonth() + 1).toString().padStart(2, '0')
|
const strDate = date
|
.getDate()
|
.toString()
|
.padStart(2, '0')
|
this.currentTime = `${date.getFullYear()}-${month}-${strDate} ${date
|
.getHours()
|
.toString()
|
.padStart(2, '0')}:${date
|
.getMinutes()
|
.toString()
|
.padStart(2, '0')}:${date
|
.getSeconds()
|
.toString()
|
.padStart(2, '0')}`
|
},
|
selectItem(item) {
|
if (item === 'devicecloud') {
|
// 打开设备云链接
|
window.open(
|
'http://10.32.8.110:8013/#/ZHRF/device_home?contract=ZHRF&contracts=[{"Contract":"ZHRF","F_FullName":"中天射频电缆有限公司","F_Industrial":"通信产业集团","F_CompanyId":"3D0D59BB1B914A0D807781BBAE4E518E"}]'
|
)
|
} else {
|
this.initItemShow()
|
if (item === 'task') {
|
this.currItem = 'task'
|
this.taskShow = true
|
} else if (item === 'feed') {
|
this.currItem = 'feed'
|
this.feedShow = true
|
// 刷新投料页面的数据
|
this.refreshFeedPageData()
|
} else if (item === 'tracking') {
|
this.currItem = 'tracking'
|
this.trackingShow = true
|
} else if (item === 'step') {
|
this.currItem = 'step'
|
this.stepShow = true
|
// 刷新工步页面的数据
|
this.refreshStepRecordPageData()
|
} else if (item === 'splitTask') {
|
this.currItem = 'splitTask'
|
this.splitTaskShow = true
|
this.refreshSplitTaskCardPageData()
|
} else if (item === 'artificial') {
|
this.currItem = 'artificial'
|
this.artificialShow = true
|
} else if (item === 'productRecord') {
|
this.currItem = 'productRecord'
|
this.productRecordShow = true
|
} else if (item === 'productOut') {
|
this.currItem = 'productOut'
|
this.productOutShow = true
|
// 刷新产出记录页面的数据
|
this.refreshProductOutPageData()
|
} else if (item === 'exception') {
|
this.currItem = 'exception'
|
this.exceptionShow = true
|
} else if (item === 'mould') {
|
this.currItem = 'mould'
|
this.mouldShow = true
|
// 刷新模具页面
|
this.refreshMouldPageData()
|
} else if (item === 'workReport') {
|
this.currItem = 'workReport'
|
this.workReportShow = true
|
// 刷新报工页面的数据
|
this.refreshWorkReportPageData()
|
} else if (item === 'devicecloud') {
|
// 打开设备云链接
|
window.open(
|
'http://10.32.8.110:8013/#/ZHRF/device_home?contract=ZHRF&contracts=[{"Contract":"ZHRF","F_FullName":"中天射频电缆有限公司","F_Industrial":"通信产业集团","F_CompanyId":"3D0D59BB1B914A0D807781BBAE4E518E"}]'
|
)
|
}
|
}
|
},
|
initItemShow() {
|
this.taskShow = false
|
this.feedShow = false
|
this.trackingShow = false
|
this.stepShow = false
|
this.exceptionShow = false
|
this.artificialShow = false
|
this.productRecordShow = false
|
this.productOutShow = false
|
this.mouldShow = false
|
this.workReportShow = false
|
this.splitTaskShow = false
|
},
|
// 删除班次
|
deleteDutyRecord() {
|
if (this.dutyForm && this.dutyForm.id) {
|
if (this.dutyForm.isSubmit) {
|
this.$message.warning(
|
'该班次已经提交,无法删除,请联系审核人员取消提交'
|
)
|
} else {
|
this.$confirm(
|
'是否确认删除班次记录编号为:' + this.dutyForm.dutyNo,
|
'提示',
|
{
|
confirmButtonText: '确定',
|
cancelButtonText: '取消',
|
closeOnClickModal: false,
|
type: 'warning'
|
}
|
)
|
.then(() => {
|
delDutyRecord(this.dutyForm.id).then((res) => {
|
this.$message.success('删除成功')
|
this.clearDutyRecord()
|
})
|
})
|
.catch(() => {})
|
}
|
}
|
},
|
// 清空班次和人员信息
|
clearDutyRecord() {
|
this.dutyForm.dutyNo = null
|
this.dutyForm.crewId = null
|
this.dutyForm.dutyDate = null
|
this.dutyForm.startTime = null
|
this.dutyForm.endTime = null
|
this.dutyForm.dutyTime = null
|
this.dutyForm.shiftId = null
|
this.dutyForm.id = null
|
this.dutyForm.isSubmit = null
|
this.dutyForm.isConfirm = null
|
this.showBan = false
|
this.$nextTick(() => {
|
// this.$refs.dutyForm.clearValidate() // 只清除清除验证
|
})
|
this.personBoardList = []
|
},
|
// 初始化页面缓存数据
|
initPageVariable() {
|
this.exceptionShow = false
|
this.taskShow = true
|
this.feedShow = false
|
this.trackingShow = false
|
this.stepShow = false
|
this.artificialShow = false
|
this.productRecordShow = false
|
this.productOutShow = false
|
this.personDrawer = false
|
this.showStaff = false
|
this.showDutyRecord = false
|
this.mouldShow = false
|
this.workReportShow = false
|
this.splitTaskShow = false
|
this.currOperateTask = {
|
id: null,
|
taskNo: null,
|
technologyName: null,
|
technologyRequire: null,
|
partName: null,
|
manufacturingOrder: null,
|
status: null,
|
statusDesc: null,
|
saleOrder: null,
|
custom: null,
|
remark: null,
|
partId: null,
|
partNo: null,
|
unit: null,
|
operationName: null,
|
routingId: null,
|
operationId: null,
|
discNum: null,
|
reelSpec: null,
|
customerOrderNo: null,
|
mpsId: null
|
}
|
this.timer = null
|
this.operateTaskForm = {
|
orderNumber: '',
|
SN: '',
|
spec: '',
|
outBatchNo: ''
|
}
|
this.SNs = []
|
this.partNames = []
|
this.currItem = 'task'
|
},
|
// 初始化选择项
|
initOptions() {
|
getAllCrewList().then((response) => {
|
this.crews = response.data.data
|
})
|
getAllShiftList().then((response) => {
|
this.shifts = response.data.data
|
})
|
getAllWorkstationList().then((response) => {
|
const workstationData = response.data.data
|
workstationData.forEach((item) => {
|
item.name = '(' + item.workCenter + ')' + item.name
|
})
|
this.workstations = workstationData
|
})
|
getProductOutTempTypeName().then((response) => {
|
this.templateTypeList = response.data.data
|
})
|
},
|
selectShiftChanged(shiftId) {
|
const shift = this.shifts.find((item) => item.id === shiftId)
|
let date = new Date()
|
if (this.dutyForm.dutyDate) {
|
date = this.dutyForm.dutyDate
|
} else {
|
this.dutyForm.dutyDate = dateFormat(date)
|
}
|
this.autoValue(shift, date)
|
},
|
selectDutyDate(dutyDate) {
|
const shift = this.shifts.find(
|
(item) => item.id === this.dutyForm.shiftId
|
)
|
if (shift) {
|
this.autoValue(shift, dutyDate)
|
}
|
},
|
autoValue(shift, date) {
|
const a = [
|
'sunday',
|
'monday',
|
'tuesday',
|
'wensday',
|
'thursday',
|
'friday',
|
'saturday'
|
]
|
const day = a[new Date().getDay()]
|
const hours = day + 'Hours'
|
const workHours = day + 'WorkHours'
|
const start = shift[`${hours}`].split('-')[0]
|
const end = shift[`${hours}`].split('-')[1]
|
this.dutyForm.startTime =
|
this.dutyForm.dutyDate.split(' ')[0] + ' ' + start + ':00'
|
// 夜班这种情况结束时间要计算到下一天
|
if (start < end) {
|
this.dutyForm.endTime =
|
this.dutyForm.dutyDate.split(' ')[0] + ' ' + end + ':00'
|
} else {
|
const nextDay = dateFormat(
|
new Date(new Date().setDate(new Date(date).getDate() + 1))
|
)
|
this.dutyForm.endTime = nextDay.split(' ')[0] + ' ' + end + ':00'
|
}
|
this.dutyForm.dutyTime = shift[`${workHours}`]
|
},
|
dutyFormSubmit() {
|
const validResult = this.validDutyForm()
|
if (validResult.result) {
|
if (this.dutyForm.id) {
|
if (!this.status) {
|
this.updateDutyForm.dutyNo = this.dutyForm.dutyNo
|
this.updateDutyForm.crewId = this.dutyForm.crewId
|
this.updateDutyForm.dutyDate = this.dutyForm.dutyDate
|
this.updateDutyForm.startTime = this.dutyForm.startTime
|
this.updateDutyForm.endTime = this.dutyForm.endTime
|
this.updateDutyForm.dutyTime = this.dutyForm.dutyTime
|
this.updateDutyForm.shiftId = this.dutyForm.shiftId
|
this.updateDutyForm.id = this.dutyForm.id
|
this.updateDutyForm.isSubmit = this.dutyForm.isSubmit
|
|
putDutyRecord(
|
Object.assign(new Object(), this.updateDutyForm, {
|
operationType: '编辑',
|
isLimitUpd: true
|
})
|
).then((res) => {
|
this.$message.success('修改成功')
|
this.dutyCanEdit = false
|
this.dutyForm = res.data.data
|
this.loadPerson()
|
})
|
} else {
|
this.$message.warning('该班次已经确认,不可修改')
|
}
|
} else {
|
addDutyRecord(
|
Object.assign(new Object(), this.dutyForm, { isSubmit: false })
|
).then((res) => {
|
this.$message.success('添加成功')
|
this.dutyCanEdit = false
|
this.dutyForm = res.data.data
|
this.status = false
|
// 工作站绑定班次
|
updateById(
|
Object.assign({
|
id: this.dutyForm.workstationId,
|
dutyRecordId: this.dutyForm.id
|
})
|
).then((response) => {})
|
this.loadPerson()
|
})
|
}
|
} else {
|
this.$message.error(validResult.msg)
|
}
|
},
|
// 批量新增
|
dutyFormSubmitBatch() {
|
const validResult = this.validDutyForm()
|
if (validResult.result) {
|
if (this.dutyForm.id) {
|
this.$message.warning('该班次修改,不可进行批量保存操作')
|
} else {
|
this.paramObj_StationMulti = {
|
workCenter: this.workstations.find(
|
(e) => e.id === this.dutyForm.workstationId
|
).workCenter
|
}
|
this.visible_StationMulti = true
|
}
|
} else {
|
this.$message.error(validResult.msg)
|
}
|
},
|
// 选中机台后,触发,重新加载排产列表
|
Select_StationMulti(val) {
|
addDutyRecordBatch(
|
Object.assign(new Object(), this.dutyForm, {
|
isSubmit: false,
|
workstationIdList: val.map((e) => e.id)
|
})
|
).then((res) => {
|
this.$message.success('添加成功')
|
this.dutyCanEdit = false
|
this.dutyForm = res.data.data
|
this.status = false
|
this.loadPerson()
|
})
|
},
|
validDutyForm() {
|
if (!this.dutyForm.dutyDate) {
|
return { result: false, msg: '班次日期不能为空' }
|
}
|
if (!this.dutyForm.startTime) {
|
return { result: false, msg: '开始时间不能为空' }
|
}
|
if (!this.dutyForm.endTime) {
|
return { result: false, msg: '结束时间不能为空' }
|
}
|
if (!this.dutyForm.dutyTime) {
|
return { result: false, msg: '班次时间不能为空' }
|
}
|
if (!this.dutyForm.shiftId) {
|
return { result: false, msg: '班次不能为空' }
|
}
|
if (!this.dutyForm.workstationId) {
|
return { result: false, msg: '工作站不能为空' }
|
}
|
return { result: true, msg: '' }
|
},
|
// 提交上班记录
|
submitDutyRecord() {
|
this.$confirm('是否确认提交', '提示', {
|
confirmButtonText: '确定',
|
cancelButtonText: '取消',
|
closeOnClickModal: false,
|
type: 'warning'
|
}).then(() => {
|
putDutyRecord(
|
Object.assign({
|
id: this.dutyForm.id,
|
isSubmit: true,
|
operationType: '提交',
|
isLimitUpd: true
|
})
|
).then((data) => {
|
this.$message.success('提交成功')
|
this.loadInfoByWorkstation()
|
})
|
})
|
},
|
// 批量提交
|
submitSaveDutyRecord() {
|
this.paramObj_StationSave = {
|
workCenter: this.workstations.find(
|
(e) => e.id === this.dutyForm.workstationId
|
).workCenter
|
}
|
console.log(this.paramObj_StationSave)
|
this.visible_StationSave = true
|
},
|
Select_StationSave() {
|
this.loadInfoByWorkstation()
|
this.$message.success('提交成功')
|
},
|
// 换班
|
changeDutyRecord() {
|
this.showDutyRecord = true
|
},
|
// 选中班次记录并切换
|
selectDutyRecord(dutyRecord) {
|
if (dutyRecord) {
|
this.dutyForm = dutyRecord
|
if (this.dutyForm.isConfirm) {
|
this.status = true
|
} else {
|
this.status = false
|
}
|
if (this.dutyForm.isSubmit) {
|
this.showBan = true
|
} else {
|
this.showBan = false
|
}
|
|
if (this.dutyForm && this.dutyForm.id && this.dutyForm.workstationId) {
|
// 工作站绑定班次
|
updateById(
|
Object.assign({
|
id: this.dutyForm.workstationId,
|
dutyRecordId: this.dutyForm.id
|
})
|
).then((response) => {
|
this.$message.success('换班成功')
|
})
|
// 切换选定班次的人员
|
getPersonByDutyRecordId(this.dutyForm.id).then((response) => {
|
this.personBoardList = response.data.data
|
})
|
}
|
}
|
},
|
// 选中人员,并记录员工上机信息
|
selectStaff(staffs) {
|
if (staffs.length > 0) {
|
// 校验选中的员工是否已经上机,若已经上机,则过滤
|
var personBoards = []
|
for (var i = 0; i < staffs.length; i++) {
|
var pb = this.personBoardList.find(
|
(item) => item.staffId === staffs[i].id
|
)
|
if (pb == null) {
|
personBoards.push(
|
Object.assign({
|
dutyTime: this.dutyForm.dutyTime,
|
workTime: dateFormat(new Date()),
|
workstationId: this.dutyForm.workstationId,
|
staffId: staffs[i].id,
|
dutyRecordId: this.dutyForm.id
|
})
|
)
|
}
|
}
|
if (personBoards.length > 0) {
|
addPersonBoard(personBoards).then((response) => {
|
this.$message.success('人员添加成功')
|
getPersonByDutyRecordId(this.dutyForm.id).then((response) => {
|
this.personBoardList = response.data.data
|
})
|
})
|
} else {
|
this.$message.warning('选择人员已在当前上班记录')
|
}
|
} else {
|
this.$message.warning('未选择人员')
|
}
|
},
|
// 批量新增人员
|
selectStaffBatch(staffs) {
|
if (staffs.length > 0) {
|
// 校验选中的员工是否已经上机,若已经上机,则过滤
|
var personBoards = []
|
for (var i = 0; i < staffs.length; i++) {
|
var pb = this.personBoardList.find(
|
(item) => item.staffId === staffs[i].id
|
)
|
if (pb == null) {
|
personBoards.push(
|
Object.assign({
|
dutyTime: this.dutyForm.dutyTime,
|
workTime: dateFormat(new Date()),
|
workstationId: this.dutyForm.workstationId,
|
staffId: staffs[i].id,
|
dutyRecordId: this.dutyForm.id
|
})
|
)
|
}
|
}
|
if (personBoards.length > 0) {
|
addPersonBoardBatch(personBoards).then((response) => {
|
this.$message.success('人员添加成功')
|
getPersonByDutyRecordId(this.dutyForm.id).then((response) => {
|
this.personBoardList = response.data.data
|
})
|
})
|
} else {
|
this.$message.warning('选择人员已在当前上班记录')
|
}
|
} else {
|
this.$message.warning('未选择人员')
|
}
|
},
|
// 根据工作站,加载班次和上机人员信息
|
loadInfoByWorkstation() {
|
this.showBan = false
|
this.personBoardList = []
|
if (this.dutyForm.workstationId) {
|
getDutyRecordByWorkstationId(this.dutyForm.workstationId).then(
|
(response) => {
|
if (response.data.data) {
|
this.dutyForm = response.data.data
|
if (this.dutyForm.isConfirm) {
|
this.status = true
|
} else {
|
this.status = false
|
}
|
if (this.dutyForm.isSubmit) {
|
this.showBan = true
|
} else {
|
this.showBan = false
|
}
|
} else {
|
this.clearDutyRecord()
|
this.$nextTick(() => {
|
// this.$refs.dutyForm.clearValidate() // 只清除清除验证
|
})
|
}
|
if (this.dutyForm && this.dutyForm.id) {
|
getPersonByDutyRecordId(this.dutyForm.id).then((response) => {
|
this.personBoardList = response.data.data
|
})
|
}
|
}
|
)
|
}
|
},
|
loadPerson() {
|
if (this.dutyForm && this.dutyForm.id) {
|
getPersonByDutyRecordId(this.dutyForm.id).then((response) => {
|
this.personBoardList = response.data.data
|
})
|
}
|
},
|
openPersonDrawer() {
|
this.personDrawer = true
|
},
|
// 新增人员上机
|
addPersonBoards() {
|
if (this.dutyForm.id == null) {
|
this.$message.warning('请选择一条上班记录')
|
} 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.showStaff = true
|
}
|
},
|
// 删除人员
|
deletePersonBoard(index, row) {
|
if (!this.status) {
|
if (row.id) {
|
deletePersonBoard([row.id]).then((response) => {
|
this.personBoardList.splice(index, 1)
|
this.$message.success('人员删除成功')
|
})
|
} else {
|
this.personBoardList.splice(index, 1)
|
this.$message.success('人员删除成功')
|
}
|
} else {
|
this.$message.warning('改班次已经提交,不可修改人员信息')
|
}
|
},
|
// 工单变更事件方法
|
changeCurrOperateTask(val) {
|
this.currOperateTask = val
|
},
|
// 刷新工单列表
|
refreshOperateTasks() {
|
if (this.isShowNormalTracking) {
|
this.$refs.operateTaskTableDiv.loadOperateTaskByWorkstation(
|
this.currOperateTask.id
|
)
|
} else {
|
this.$refs.operateTaskDiv.loadOperateTaskByWorkstation(
|
this.currOperateTask.id
|
)
|
}
|
},
|
// 刷新杂工登记页面
|
refreshArtificial() {
|
this.$refs.artificialTable.getArtificialInformation()
|
},
|
// 刷新产出记录页面
|
refreshProductOutput() {
|
// this.$refs.productOutputTable.getData()
|
},
|
// 选中报告后,将报工id抛过来
|
spreadParam(id) {
|
if (id != '') {
|
this.$refs.exceptionTab.init(id)
|
this.$refs.stepRecordForm.init(id)
|
} else {
|
this.$refs.exceptionTab.init(0)
|
this.$refs.stepRecordForm.init(0)
|
}
|
},
|
// 刷新报工投入产出
|
refreshProductTracking() {
|
this.$refs.productTrackingTab.changeProductMain()
|
},
|
|
// 刷新报工列表
|
refreshNewTrackingList() {
|
// this.$refs.workReportCard.refreshProductOutputList()
|
},
|
// 刷新投料列表
|
refreshFeeds() {
|
// this.$refs.feedTab.loadFeedByWorkstation(this.dutyForm.workstationId)
|
},
|
// 刷新当前工单,注意:此时千万不能去修改currOperateTask这个变量,因为它被watch了
|
refreshCurrOpTask() {
|
// 更新工单列表中某工单
|
if (this.isShowNormalTracking) {
|
this.$refs.operateTaskTableDiv.updateSomeOpTask()
|
} else {
|
this.$refs.operateTaskDiv.updateSomeOpTask()
|
}
|
// 更新工单详情
|
this.$refs.taskInfoTab.updateOpTask()
|
},
|
getSysParam(paramKey) {
|
getSysParam(paramKey).then((response) => {
|
var paramVal = response.data.data
|
if (response.data.code === 0) {
|
if (paramVal != null && paramVal === '1') {
|
this.isShowStepBusiness = true
|
} else {
|
this.isShowStepBusiness = false
|
}
|
} else {
|
this.isShowStepBusiness = false
|
}
|
})
|
},
|
getTrackingParam(paramKey) {
|
getSysParam(paramKey).then((response) => {
|
var paramVal = response.data.data
|
if (response.data.code === 0) {
|
if (paramVal != null && paramVal === '1') {
|
this.isShowNormalTracking = true
|
} else {
|
this.isShowNormalTracking = false
|
}
|
} else {
|
this.isShowNormalTracking = false
|
}
|
})
|
},
|
// 刷新投料页面的数据
|
refreshFeedPageData() {
|
this.$refs.feedTab.refreshAllData()
|
},
|
// 刷新报工页面的数据
|
refreshWorkReportPageData() {
|
this.$refs.workReportCard.refreshAllData()
|
},
|
// 刷新分割任务页面的数据
|
refreshSplitTaskCardPageData() {
|
this.$refs.splitTaskCard.refreshAllData()
|
},
|
// 刷新工步页面的数据
|
refreshStepRecordPageData() {
|
this.$refs.stepRecordForm.refreshAllData()
|
},
|
// 刷新产出记录页面的数据
|
refreshProductOutPageData() {
|
this.$refs.productOutputTable.refreshAllData()
|
},
|
// 刷新模具页面数据
|
refreshMouldPageData() {
|
this.$refs.mouldTab.refreshAllData()
|
},
|
beforeDestroy() {
|
clearInterval(this.timer)
|
}
|
}
|
}
|
</script>
|