<template>
|
<div ref="taskInfoDiv" class="taskinfo-div">
|
<div class="need-feed-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
|
style="display: inline-block;vertical-align: middle;margin-left:2px;cursor: pointer;"
|
@click="shrinkExpandTaskInfo"
|
>
|
<i
|
:class="[
|
'taskinfo-header',
|
'el-icon-arrow-right',
|
taskInfoShow ? 'is-active' : ''
|
]"
|
></i>
|
</div>
|
</div>
|
</div>
|
<div
|
ref="taskInfoMainDiv"
|
class="taskinfo-main"
|
:style="{ height: taskInfoMainHeight }"
|
v-show="taskInfoShow"
|
>
|
<el-tabs
|
v-model="taskInfoActiveName"
|
type="card"
|
class="taskInfoMainTab"
|
@tab-click="handleClick"
|
>
|
<el-tab-pane label="主要信息" name="主要信息">
|
<el-row>
|
<el-col :span="10" :offset="1" class="taskinfo-pane-div">
|
<el-row>
|
<el-col :span="12">
|
<div class="param-top">
|
<div class="form-item">
|
<label>销售订单号</label>
|
<div style="color: #7A9EFD">
|
{{ currOperateTask.customerOrderNo }}
|
</div>
|
</div>
|
</div>
|
</el-col>
|
<el-col :span="12">
|
<div class="param-top">
|
<div class="form-item">
|
<label>主计划号</label>
|
<div style="color: #7A9EFD">
|
{{ currOperateTask.mpsNo }}
|
</div>
|
</div>
|
</div>
|
</el-col>
|
<el-col :span="12">
|
<div class="param-top">
|
<div class="form-item">
|
<label>车间订单号</label>
|
<div style="color: #7A9EFD">
|
{{ currOperateTask.moNo }}
|
</div>
|
</div>
|
</div>
|
</el-col>
|
<el-col :span="12"
|
><div class="param-top">
|
<div class="form-item">
|
<label>工序</label>
|
<div style="color: #7A9EFD">
|
{{ currOperateTask.operationName }}
|
</div>
|
</div>
|
</div>
|
</el-col>
|
</el-row>
|
</el-col>
|
<el-col :span="10" :offset="1" class="taskinfo-pane-div">
|
<el-row>
|
<el-col :span="12">
|
<div class="param-top">
|
<div class="form-item">
|
<label>零件号</label>
|
<div style="color: #7A9EFD">
|
{{ currOperateTask.partNo }}
|
</div>
|
</div>
|
</div>
|
</el-col>
|
<el-col :span="12">
|
<div class="param-top">
|
<div class="form-item">
|
<label>零件名称</label>
|
<div style="color: #7A9EFD">
|
{{ currOperateTask.partName }}
|
</div>
|
</div>
|
</div>
|
</el-col>
|
<el-col :span="12">
|
<div class="param-top">
|
<div class="form-item">
|
<label>成品规格</label>
|
<div style="color: #7A9EFD">
|
{{ currOperateTask.productName }}
|
</div>
|
</div>
|
</div>
|
</el-col>
|
<el-col :span="12">
|
<div class="param-top">
|
<div class="form-item">
|
<label>载具规格</label>
|
<div style="color: #7A9EFD">
|
{{ currOperateTask.reelSpec }}
|
</div>
|
</div>
|
</div>
|
</el-col>
|
</el-row>
|
</el-col>
|
</el-row>
|
<el-row>
|
<el-col :span="10" :offset="1" class="taskinfo-pane-div">
|
<el-row>
|
<el-col :span="12">
|
<div class="param-top">
|
<div class="form-item">
|
<label>计划数量</label>
|
<div style="color: #7A9EFD">
|
{{ currOperateTask.plannedQuantity }}({{
|
currOperateTask.unit
|
}})
|
</div>
|
</div>
|
</div>
|
</el-col>
|
<el-col :span="12">
|
<div class="param-top">
|
<div class="form-item">
|
<label>备注</label>
|
<div style="color: #7A9EFD">
|
{{ currOperateTask.remark }}
|
</div>
|
</div>
|
</div>
|
</el-col>
|
|
<el-col :span="12">
|
<div class="param-top">
|
<div class="form-item">
|
<label>盘长</label>
|
<div style="color: #7A9EFD">
|
{{
|
currOperateTask.discNum == null
|
? 0
|
: (
|
currOperateTask.plannedQuantity /
|
currOperateTask.discNum
|
).toFixed(5)
|
}}{{ currOperateTask.unit }}*{{
|
currOperateTask.discNum == null
|
? 0
|
: currOperateTask.discNum
|
}}盘
|
</div>
|
</div>
|
</div>
|
</el-col>
|
<el-col :span="12">
|
<div class="param-top">
|
<div class="form-item">
|
<label>工艺名称</label>
|
<div style="color: #7A9EFD">
|
{{ currOperateTask.technologyName }}
|
</div>
|
</div>
|
</div>
|
</el-col>
|
</el-row>
|
</el-col>
|
<el-col :span="10" :offset="1" class="taskinfo-pane-div">
|
<el-row>
|
<el-col :span="12">
|
<div class="param-top">
|
<div class="form-item">
|
<label>计划开始时间</label>
|
<div style="color: #7A9EFD">
|
{{ currOperateTask.plannedStartDate }}
|
</div>
|
</div>
|
</div>
|
</el-col>
|
|
<el-col :span="12">
|
<div class="param-top">
|
<div class="form-item">
|
<label>计划完成时间</label>
|
<div style="color: #7A9EFD">
|
{{ currOperateTask.plannedFinishDate }}
|
</div>
|
</div>
|
</div>
|
</el-col>
|
<el-col :span="12">
|
<div class="param-top">
|
<div class="form-item">
|
<label>实际开始时间</label>
|
<div style="color: #7A9EFD">
|
{{ currOperateTask.actualStartDate }}
|
</div>
|
</div>
|
</div>
|
</el-col>
|
<el-col :span="12">
|
<div class="param-top">
|
<div class="form-item">
|
<label>客户名称</label>
|
<div style="color: #7A9EFD;white-space: normal">
|
{{ currOperateTask.customerName }}
|
</div>
|
</div>
|
</div>
|
</el-col>
|
</el-row>
|
</el-col>
|
</el-row>
|
</el-tab-pane>
|
<!--<el-tab-pane label="段长一览" name="段长一览">
|
<div style="height:240px;overflow:auto;">
|
<el-tree :data="batchTree" node-key="id"> </el-tree>
|
</div>
|
</el-tab-pane>-->
|
<el-tab-pane label="按批次报工" name="按批次报工">
|
<div>
|
<ctable
|
class="task-detail-info-table"
|
:table="taskDetailInfoTable"
|
@handleSelectionChange="taskDetailInfoHandleSelectionChange"
|
@objectSpanMethod="objectSpanMethodForTaskDetailInfo(arguments)"
|
:mergeCols="detailInfoMergeCols"
|
:searchList="taskDetailInfoSearchList"
|
:uploadInfo="taskDetailInfoUploadInfo"
|
:prelang="taskDetailInfoPrelang"
|
:options="taskDetailInfoOptions"
|
:paramObj="taskDetailInfoParamObj"
|
:isShowPagination="isShowPagination"
|
:bottomOffset="65"
|
:ajaxFun="taskDetailInfoAjaxFun"
|
ref="segmentmergeTaskDetailInfoTable"
|
>
|
<template #toolbar>
|
<div style="display:flex;">
|
<div style="display:flex;margin-left:5px ;">
|
<el-button
|
style="height:32px;"
|
@click="beginEdit()"
|
type="primary"
|
v-show="isEditShow"
|
>编辑
|
</el-button>
|
</div>
|
<div style="display:flex;margin-left:5px ;">
|
<el-button
|
style="height:32px;"
|
@click="cancelEdit()"
|
type="primary"
|
v-show="!isEditShow"
|
>取消
|
</el-button>
|
</div>
|
<div style="display:flex;margin-left:10px ;">
|
<el-button
|
style="height:32px;"
|
@click="saveEdit()"
|
type="primary"
|
v-show="!isEditShow"
|
>保存
|
</el-button>
|
</div>
|
<div style="display:flex;margin-left:5px ;">
|
<div
|
style="font-weight:bold;font-size:15px;line-height:28px;margin-right:5px;"
|
>
|
工序选择
|
</div>
|
<div style="display:flex;">
|
<el-select
|
v-model="selectedOperationIds"
|
placeholder="请选择"
|
multiple
|
clearable
|
size="mini"
|
class="segmentmerge-operation-select"
|
@change="setQueryObj"
|
>
|
<el-option
|
v-for="item in operationList"
|
:key="item.id"
|
:label="item.name"
|
:value="item.id"
|
>
|
</el-option>
|
</el-select>
|
</div>
|
</div>
|
</div>
|
</template>
|
</ctable>
|
</div>
|
</el-tab-pane>
|
</el-tabs>
|
</div>
|
<div
|
ref="taskInfoBodyDiv"
|
class="taskinfo-body"
|
:style="{ height: taskInfoBodyHeight }"
|
>
|
<div style="display:flex;justify-content:space-between;height:100%;">
|
<div style="height:100%;width:70%;">
|
<!-- <div v-if="paramTabs.length == 0" class="taskinfo-body-div">-->
|
<!-- 不存在绑定的工艺卡和配盘单-->
|
<!-- </div>-->
|
<el-tabs v-model="activeName" type="card" @tab-click="handleTabClick">
|
<el-tab-pane
|
v-for="(paramTab, index) in paramTabs"
|
:key="index"
|
:label="paramTab"
|
:name="paramTab"
|
>
|
<div class="pane-div">
|
<div>
|
<el-divider
|
class="pane-divider"
|
direction="vertical"
|
></el-divider
|
><span style="font-size:14px;font-weight:bold">参数集</span>
|
<div class="template-content-div">
|
<el-select
|
v-model="currTemplateId"
|
placeholder="请选择"
|
style="width: 300px;"
|
@change="tabParamsClick()"
|
clearable
|
>
|
<el-option
|
v-for="item in everyTabParams"
|
:key="item.id"
|
:label="item.operationTemplateName"
|
:value="item.id"
|
>
|
<div style="display: table;width: 300px;">
|
<div style="display: table-row;">
|
<div
|
style="display: table-cell;width:50%;text-align: center;"
|
>
|
{{ item.systemNo }}
|
</div>
|
<div
|
style="display: table-cell;text-align: center;"
|
>
|
{{ item.operationTemplateName }}
|
</div>
|
</div>
|
</div>
|
</el-option>
|
</el-select>
|
<!--<div style="position: relative">
|
<img src="/img/workbench/img_cs.png" />
|
<div
|
style="display:table;position:absolute;width:80%;height:100%;right:0;top:0;"
|
>
|
<div
|
style="display:table-cell; vertical-align:middle;text-align:center;font-size:15px;font-weight:bold;color: #fff;width: 50%;"
|
>
|
编号
|
</div>
|
<div
|
style="display:table-cell; vertical-align:middle;text-align:center;font-size:15px;font-weight:bold;color: #fff;"
|
>
|
配盘单
|
</div>
|
</div>
|
</div>-->
|
<!--<div class="template-listbody-div">
|
<div
|
v-for="(template, index) in everyTabParams"
|
:key="index"
|
@click="tabParamsClick(template)"
|
style="cursor:pointer;"
|
:class="[
|
template.checked
|
? 'template-checked-div'
|
: 'template-unchecked-div'
|
]"
|
>
|
<div style="display:table;height:100%;width: 100%;">
|
<div
|
style="display:table-cell; vertical-align:middle;text-align:center;width: 20%;"
|
>
|
<el-checkbox
|
v-model="template.checked"
|
disabled
|
></el-checkbox>
|
</div>
|
<div
|
style="display:table-cell; vertical-align:middle;text-align:center;width: 40%;font-size:13px;"
|
:class="[
|
template.checked
|
? 'template-checked-systemno'
|
: 'template-unchecked-systemno'
|
]"
|
>
|
{{ template.systemNo }}
|
</div>
|
<div
|
style="display:table-cell; vertical-align:middle;text-align:center;font-size:13px;"
|
:class="[
|
template.checked
|
? 'template-checked-templatename'
|
: 'template-unchecked-templatename'
|
]"
|
>
|
{{ template.operationTemplateName }}
|
</div>
|
</div>
|
</div>
|
</div>-->
|
</div>
|
</div>
|
<div style="margin-top:14px;">
|
<el-divider
|
class="pane-divider"
|
direction="vertical"
|
></el-divider
|
><span style="font-size:14px;font-weight:bold">参数</span>
|
<div class="params-content-div">
|
<el-table
|
:data="params"
|
:height="tableHeight"
|
:header-cell-style="paramsTableHeaderStyle"
|
:row-class-name="tableRowClassName"
|
class="taskinfo-params-table"
|
>
|
<el-table-column
|
prop="code"
|
label="编号"
|
width="200"
|
align="center"
|
>
|
</el-table-column>
|
<el-table-column
|
prop="parameterItem"
|
label="名称"
|
width="200"
|
align="center"
|
>
|
<template slot-scope="scope">
|
<span
|
>{{ scope.row.parameterItem }}({{
|
scope.row.unit
|
}})</span
|
>
|
</template>
|
</el-table-column>
|
<el-table-column
|
prop="paramValue"
|
label="值"
|
align="center"
|
>
|
</el-table-column>
|
</el-table>
|
</div>
|
<!--<el-pagination
|
class="params-pagination"
|
layout="prev, pager, next"
|
:total="50"
|
>
|
</el-pagination>-->
|
</div>
|
</div>
|
</el-tab-pane>
|
<!--工艺配置单-->
|
<el-tab-pane :label="tabNameExt0" :name="tabNameExt0" class="l-mes">
|
<!-- <div style="margin-left: 40px">
|
<el-radio v-model="configContent.modelType" label="01" disabled
|
>模板1</el-radio
|
>
|
<el-radio v-model="configContent.modelType" label="02" disabled
|
>模板2</el-radio
|
>
|
</div> -->
|
<el-divider content-position="left">配置单内容</el-divider>
|
|
<!--模板1-->
|
<div
|
class="node-content-remark"
|
v-if="configContent.modelType === '01'"
|
>
|
<el-form
|
class="configform1"
|
:inline="true"
|
ref="form"
|
label-width="80px"
|
>
|
<el-form-item label="订单编号:">
|
<el-input v-model="configContent.proNo" readonly></el-input>
|
</el-form-item>
|
<el-form-item label="项目名称:">
|
<el-input
|
v-model="configContent.proName"
|
readonly
|
></el-input>
|
</el-form-item>
|
<el-form-item
|
label="生产要求描述:"
|
style="width: 100%"
|
label-width="105px"
|
>
|
<div class="ql-editor" v-html="configContent.remark1" />
|
</el-form-item>
|
</el-form>
|
<!-- 生产要求描述:-->
|
</div>
|
|
<!--模板2-->
|
<div
|
class="node-content-remark2"
|
v-if="configContent.modelType === '02'"
|
>
|
<div
|
class="node-content-remark2"
|
style="width: 90%;margin-left: 30px;"
|
>
|
<el-form
|
class="configform2"
|
:inline="true"
|
ref="form"
|
label-width="80px"
|
>
|
<el-form-item label="合同编号:" style="width: 40%">
|
<el-input
|
v-model="configContent.proNo"
|
readonly
|
></el-input>
|
</el-form-item>
|
<el-form-item label="项目名称:" style="width: 40%">
|
<el-input
|
v-model="configContent.proName"
|
readonly
|
></el-input>
|
</el-form-item>
|
<el-form-item label="印字要求:" style="width: 100%">
|
<el-input
|
v-model="configContent.printReq"
|
readonly
|
></el-input>
|
</el-form-item>
|
<el-form-item
|
label="生产规格型号及数量:"
|
style="width: 100%"
|
label-width="140px"
|
>
|
<div class="ql-editor" v-html="configContent.remark1" />
|
</el-form-item>
|
<el-form-item
|
label="生产要求描述:"
|
style="width: 100%"
|
label-width="105px"
|
>
|
<div class="ql-editor" v-html="configContent.remark2" />
|
</el-form-item>
|
<el-form-item
|
label="实际印字要求:"
|
style="width: 80%"
|
label-width="105px"
|
>
|
<el-input v-model="configContent.realPrintReq"></el-input>
|
</el-form-item>
|
<el-row class="bodyrow">
|
<el-col :span="4">
|
<div class="param-top">
|
<div class="form-item" style="text-align: left">
|
<label>发泡缆芯(Φmm)</label>
|
<div style="color: #7A9EFD">
|
<el-input
|
v-model="configContent.cableCore"
|
></el-input>
|
</div>
|
</div>
|
</div>
|
</el-col>
|
<el-col :span="4">
|
<div class="param-top">
|
<div style="text-align: right;">
|
护套模具:
|
</div>
|
</div>
|
</el-col>
|
<el-col :span="3">
|
<div class="param-top">
|
<div class="form-item">
|
<label>模芯(Φmm)</label>
|
<div style="color: #7A9EFD">
|
<el-input
|
v-model="configContent.modelCore"
|
></el-input>
|
</div>
|
</div>
|
</div>
|
</el-col>
|
<el-col :span="3">
|
<div class="param-top">
|
<div class="form-item">
|
<label>模套(Φmm)</label>
|
<div style="color: #7A9EFD">
|
<el-input
|
v-model="configContent.modelSleeve"
|
></el-input>
|
</div>
|
</div>
|
</div>
|
</el-col>
|
<el-col :span="3"
|
><div class="param-top">
|
<div class="form-item">
|
<label>定径模(Φmm)</label>
|
<div style="color: #7A9EFD">
|
<el-input
|
v-model="configContent.sizingModel"
|
></el-input>
|
</div>
|
</div>
|
</div>
|
</el-col>
|
<el-col :span="3"
|
><div class="param-top">
|
<div class="form-item">
|
<label>过模(Φmm)</label>
|
<div style="color: #7A9EFD">
|
<el-input
|
v-model="configContent.strandModel"
|
></el-input>
|
</div>
|
</div>
|
</div>
|
</el-col>
|
</el-row>
|
<div style="margin-top: 15px">
|
产品的性能要求:20℃时的电气特征
|
</div>
|
|
<el-table
|
:data="configContent.processConfigDataList"
|
style="width: 100%;margin-top: 10px"
|
border
|
>
|
<el-table-column prop="date" label="频率(MHz)">
|
<template slot-scope="scope">
|
<el-input
|
v-model="scope.row.frequency"
|
disabled
|
></el-input>
|
</template>
|
</el-table-column>
|
<el-table-column prop="name" label="最大传送衰减(dB/km)">
|
<template slot-scope="scope">
|
<el-input
|
v-model="scope.row.deliveryReduce"
|
disabled
|
></el-input>
|
</template>
|
</el-table-column>
|
<el-table-column
|
prop="province"
|
label="耦合损耗max(dB),2米,95%"
|
>
|
<template slot-scope="scope">
|
<el-input
|
v-model="scope.row.couplingLoss"
|
disabled
|
></el-input>
|
</template>
|
</el-table-column>
|
</el-table>
|
|
<el-form-item
|
label="工作频带内驻波比:"
|
style="width: 80%"
|
label-width="120px"
|
>
|
<el-input
|
v-model="configContent.workFrequency"
|
disabled
|
></el-input>
|
</el-form-item>
|
<el-form-item
|
label="频率范围:"
|
style="width: 80%"
|
label-width="120px"
|
>
|
<el-input
|
v-model="configContent.frequencyRange"
|
disabled
|
></el-input>
|
</el-form-item>
|
<el-form-item
|
label="直流电阻:"
|
style="width: 80%"
|
label-width="120px"
|
>
|
<el-input
|
v-model="configContent.resistance"
|
disabled
|
></el-input>
|
</el-form-item>
|
|
<el-form-item
|
label="备注:"
|
style="width: 100%"
|
label-width="120px"
|
>
|
<div class="ql-editor" v-html="configContent.remark4" />
|
</el-form-item>
|
</el-form>
|
</div>
|
</div>
|
</el-tab-pane>
|
<!--工艺附件-->
|
<el-tab-pane :label="tabNameExt1" :name="tabNameExt1">
|
<el-table
|
:data="processConfigFileTableData"
|
border
|
style="width: 100%;"
|
:header-cell-style="{
|
background: 'antiquewhite',
|
color: '#333'
|
}"
|
>
|
<el-table-column
|
prop="orderNumber"
|
label="订单号"
|
align="center"
|
></el-table-column>
|
<el-table-column
|
prop="lineNumber"
|
label="行号"
|
align="center"
|
></el-table-column>
|
<el-table-column
|
prop="originalFileName"
|
label="文件名"
|
align="center"
|
></el-table-column>
|
<el-table-column
|
prop="createUser"
|
label="上传人"
|
align="center"
|
></el-table-column>
|
<el-table-column
|
prop="createTime"
|
label="上传时间"
|
align="center"
|
></el-table-column>
|
<el-table-column label="操作">
|
<template slot-scope="scope">
|
<el-button
|
@click="downloadProcessConfigFile(scope.row)"
|
type="text"
|
size="small"
|
>下载</el-button
|
>
|
</template>
|
</el-table-column>
|
</el-table>
|
</el-tab-pane>
|
<!--结构图-->
|
<el-tab-pane :label="tabNameExt2" :name="tabNameExt2">
|
<div style="text-align: center; padding: 15px 15px;">
|
<img
|
width="70%"
|
v-for="(image, index) in structureImages"
|
:key="index"
|
:src="image.url"
|
alt=""
|
/>
|
</div>
|
</el-tab-pane>
|
</el-tabs>
|
</div>
|
<div style="height:100%;width:27%;">
|
<div style="height: 50px;line-height:50px;">
|
<span style="color:#363636;font-size:16px;font-weight:700;"
|
>工艺备注</span
|
>
|
</div>
|
<div
|
style="height:calc( 100% - 50px );overflow: auto;padding:10px 10px;"
|
>
|
<div>
|
<span v-html="this.currOperateTask.routingOperationRemark"></span>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<productOutByBatchFormDialog
|
:currshowlist.sync="showProductByBatchForm"
|
:productList="productList"
|
:discToolMeasurementVal="discToolMeasurementVal"
|
:parentInfo="parentInfo"
|
:currentDutyRecord="currentDutyRecord"
|
:personBoardList="personBoardList"
|
:groupStatus="groupStatus"
|
:orderSnGenerateIdList="orderSnGenerateIdList"
|
@refreshTaskDetailInfoList="getSegmentmergeTaskDetailInfoData"
|
/>
|
<isReproduceFormDialog
|
:currshowlist.sync="showIsReproduceForm"
|
:orderSnGenerateIdList="orderSnGenerateIdList"
|
@refreshTaskDetailInfoList="getSegmentmergeTaskDetailInfoData"
|
/>
|
<processConfigurationSheetDialog
|
:currshowlist.sync="showProcessConfigurationSheet"
|
:orderInfo="orderInfo"
|
/>
|
</div>
|
</template>
|
<style lang="scss" scoped>
|
.need-feed-header {
|
margin-top: 20px;
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
}
|
.taskinfo-header.is-active {
|
transform: rotate(90deg);
|
}
|
.taskinfo-header {
|
transition: transform 0.3s;
|
font-weight: 300;
|
}
|
.taskinfo-div {
|
height: 100%;
|
overflow: auto;
|
background-color: #fff;
|
/*display: flex;
|
flex-direction: column;*/
|
}
|
.taskinfo-pane-div {
|
border: 0.5px solid #f8f8fb;
|
border-radius: 10px;
|
height: 120px;
|
}
|
.taskinfo-main {
|
/*flex-grow: 0;
|
flex-shrink: 0;*/
|
/*display: flex;*/
|
flex-wrap: wrap;
|
justify-content: space-between;
|
overflow: auto;
|
}
|
.taskinfo-main-item {
|
width: 33%;
|
position: relative;
|
}
|
.param-top {
|
width: 100%;
|
height: 30px;
|
padding: 10px 40px;
|
|
.form-item {
|
display: flex;
|
flex-direction: column;
|
align-items: center;
|
}
|
|
.form-item label {
|
color: #333;
|
font-weight: bold;
|
display: inline-block;
|
white-space: nowrap;
|
font-size: 12px;
|
transform: translateZ(0);
|
margin:autoauto;min-width: 100px;
|
}
|
|
.form-item div {
|
font-size: 12px;
|
font-weight: bold;
|
margin-top: 5px;
|
white-space: nowrap;
|
color: rgba(0, 0, 0, 0.9);
|
vertical-align: text-top;
|
}
|
}
|
/*.taskinfo-main-item img {*/
|
/* width: 100%;*/
|
/*}*/
|
.taskinfo-body {
|
/*flex-grow: 1;
|
flex-shrink: 1;*/
|
margin-top: 5px;
|
background-color: #fff;
|
}
|
.taskinfo-body >>> .el-tabs {
|
height: 100%;
|
}
|
.taskinfo-body >>> .el-tabs__item.is-active {
|
color: #363636;
|
background-color: #fff;
|
font-weight: bold;
|
}
|
.taskinfo-body >>> .el-tabs__item:hover {
|
color: #363636;
|
font-weight: bold;
|
}
|
.taskinfo-body >>> .el-tabs__item {
|
background-color: #f3f8fb;
|
min-width: 115px;
|
height: 49px;
|
font-size: 16px !important;
|
text-align: center;
|
}
|
.taskinfo-body >>> .el-tabs__content {
|
height: calc(100% - 65px);
|
}
|
.taskinfo-body >>> .el-tabs__content .el-tab-pane {
|
height: 100%;
|
overflow: auto;
|
}
|
.configform1 {
|
.el-input {
|
width: 300px;
|
}
|
}
|
.configform2 {
|
/deep/ .el-form-item__content {
|
width: 70% !important;
|
}
|
.el-input {
|
width: 100%;
|
}
|
}
|
.taskinfo-body-div {
|
text-align: center;
|
margin: auto;
|
padding-top: 200px;
|
color: #9ec1eb;
|
white-space: nowrap;
|
}
|
.pane-div {
|
height: 100%;
|
padding: 5px 14px;
|
}
|
|
.pane-divider {
|
width: 4px;
|
background-color: #4283ee;
|
}
|
.template-content-div {
|
margin-top: 14px;
|
}
|
.template-content-div > div:first-child img {
|
width: 100%;
|
}
|
.template-listbody-div {
|
height: calc(100% - 94px);
|
overflow: auto;
|
}
|
.template-listbody-div > div {
|
width: 100%;
|
height: 54px;
|
margin-bottom: 4px;
|
border-radius: 4px;
|
box-shadow: 0px 2px 14px 2px rgba(47, 47, 47, 0.06);
|
border: solid 1px #f0f0f0;
|
}
|
.template-unchecked-div {
|
background-color: #fff;
|
}
|
.template-checked-div {
|
background-color: #6290ec;
|
}
|
.template-checked-systemno {
|
color: #fffdfd;
|
}
|
.template-checked-templatename {
|
color: #fffdfd;
|
}
|
.template-unchecked-systemno {
|
color: #4898fc;
|
}
|
.template-unchecked-templatename {
|
color: #3f3f3f;
|
}
|
.template-listbody-div >>> .el-checkbox.is-disabled .el-checkbox__inner {
|
cursor: pointer;
|
}
|
.template-listbody-div
|
>>> .el-checkbox.is-disabled.is-checked
|
.el-checkbox__inner {
|
background-color: #fff;
|
border-color: #409eff;
|
}
|
.template-listbody-div
|
>>> .el-checkbox.is-disabled.is-checked
|
.el-checkbox__inner::after {
|
border-color: #409eff;
|
}
|
.params-content-div {
|
margin-top: 14px;
|
}
|
.el-table >>> .stripe-row {
|
background: #eef3fd;
|
}
|
.params-pagination {
|
margin-top: 5px;
|
text-align: right;
|
}
|
.params-pagination >>> .el-icon-arrow-left {
|
background: url('/img/workbench/icon_previous.png') center center no-repeat;
|
background-size: cover;
|
}
|
|
.params-pagination >>> .el-icon-arrow-left:before {
|
content: '替';
|
font-size: 20px;
|
visibility: hidden;
|
}
|
.params-pagination >>> .el-icon-arrow-right {
|
background: url('/img/workbench/icon_next.png') center center no-repeat;
|
background-size: cover;
|
}
|
|
.params-pagination >>> .el-icon-arrow-right:before {
|
content: '换';
|
font-size: 20px;
|
visibility: hidden;
|
}
|
.params-pagination >>> .el-pager li {
|
min-width: 28px;
|
}
|
.params-pagination >>> button {
|
min-width: 23.5px;
|
}
|
.params-pagination >>> .btn-prev {
|
padding: 0px 4px 0px 2px;
|
}
|
.params-pagination >>> .btn-next {
|
padding: 0px 2px 0px 4px;
|
}
|
.taskinfo-params-table >>> td {
|
padding: 3px 0px;
|
}
|
.taskInfoMainTab >>> .el-tabs__header {
|
margin: 0 0;
|
}
|
.taskInfoMainTab >>> .el-tabs__header {
|
margin: 0 0;
|
}
|
.taskInfoMainTab >>> .el-tabs__header .el-tabs__item {
|
height: 28px;
|
line-height: 28px;
|
}
|
.bodyrow {
|
.el-input {
|
width: 80%;
|
}
|
.form-item {
|
text-align: center;
|
}
|
}
|
.ql-editor {
|
color: #444;
|
line-height: 20px;
|
padding: 6px 0;
|
min-height: 32px;
|
font-size: 12px;
|
border-bottom: 1px solid #ddd;
|
}
|
.task-detail-info-table >>> .custom-table-div {
|
margin-top: 0px !important;
|
}
|
|
.task-detail-info-table
|
>>> .custom-table-div
|
.customTable
|
.el-table__body-wrapper
|
.el-table__row
|
.cell {
|
padding-left: 0px !important;
|
padding-right: 0px !important;
|
}
|
|
.task-detail-info-table
|
>>> .customTable
|
.el-table__header-wrapper
|
.el-table__header
|
.el-table-column--selection
|
.el-checkbox__input {
|
display: none;
|
}
|
</style>
|
<script>
|
import {
|
getPrintUrl,
|
getGenerateSN,
|
getShiftProductOutByOpIdAndWsId
|
} from '@/api/product/personboard'
|
import {
|
getTemplate,
|
getDocumentJgt,
|
getProcessConfigFiles
|
} from '@/api/plan/operationtask'
|
import {
|
downloadProcessConfigFile,
|
getProcessConfig
|
} from '@/api/plan/customerorder'
|
import { getByMpsNo } from '@/api/plan/masterproductionschedule'
|
import { getByOperationTaskIds } from '@/api/plan/operationtaskproduce'
|
import RichText from '@/views/common/rich-text.vue'
|
import ctable from '@/views/common/custom-table.vue'
|
import {
|
taskDetailInfoFetchList,
|
getOperationInfo,
|
updateSn
|
} from '@/api/plan/segmentmerge'
|
import { mapGetters } from 'vuex'
|
import productOutByBatchFormDialog from './productout-form-by-batch.vue'
|
import isReproduceFormDialog from './is-reproduce-form.vue'
|
import processConfigurationSheetDialog from './process-configuration-sheet.vue'
|
|
export default {
|
props: {
|
currOperateTask: {
|
type: Object,
|
default: () => {
|
return {}
|
}
|
},
|
workstationId: {
|
type: Number
|
},
|
currentDutyRecord: {
|
type: Object,
|
default: () => {
|
return {}
|
}
|
},
|
personBoardList: {
|
type: Array,
|
default: () => {
|
return []
|
}
|
}
|
},
|
components: {
|
RichText,
|
ctable,
|
productOutByBatchFormDialog,
|
isReproduceFormDialog,
|
processConfigurationSheetDialog
|
},
|
data() {
|
return {
|
isEditShow: true,
|
discToolMeasurementVal: null,
|
showProcessConfigurationSheet: false,
|
orderInfo: { customerOrderNo: null, otcLineNo: null },
|
orderSnGenerateIdList: [],
|
groupStatus: true,
|
productList: [],
|
showProductByBatchForm: false,
|
configContent: {
|
processConfigDataList: []
|
},
|
activeName: '',
|
paramDatas: [],
|
paramTabs: [], // tab的集合
|
everyTabParams: [], // 每个tab下参数集的集合
|
params: [], // 每个参数集下的参数的集合
|
paramTabCurrTemplateIds: [], // tab对应的最新参数集的集合
|
currTemplateId: null,
|
taskInfoShow: true,
|
taskInfoMainHeight: '305px',
|
taskInfoBodyHeight: '517px',
|
tableHeight: '367px',
|
opTask: { statusDesc: '' },
|
taskInfoActiveName: '主要信息',
|
outPutBatchList: [],
|
batchTree: [],
|
structureImages: [], // 结构图
|
processConfigFileTableData: [], // 工艺附件
|
tabNameExt1: '工艺附件',
|
tabNameExt0: '工艺配置单',
|
tabNameExt2: '结构图',
|
taskDetailInfoAjaxFun: taskDetailInfoFetchList,
|
taskDetailInfoPrelang: 'segmentmergeTaskDetailInfoTable',
|
taskDetailInfoUploadInfo: {
|
// 是否展示上传EXCEL以及对应的url
|
isShow: false,
|
url: ''
|
},
|
isShowPagination: false,
|
taskDetailInfoOptions: {
|
height: 300, // 默认高度-为了表头固定
|
stripe: false, // 是否为斑马纹 table
|
highlightCurrentRow: false, // 是否要高亮当前行
|
border: true, // 是否有纵向边框
|
lazy: false, // 是否需要懒加载
|
fit: true, // 列的宽度是否自撑开
|
multiSelect: true, //
|
isRefresh: true,
|
seqNo: true,
|
isShowHide: true, // 是否显示显影按钮
|
isSearch: false, // 高级查询按钮
|
isRowEdit: false, // 行可编辑
|
tableCellMerge: true,
|
cancelRunCreated: true,
|
defaultOrderBy: { column: 'id', direction: 'desc' }
|
},
|
taskDetailInfoParamObj: {
|
operationIds: [],
|
mpsId: null,
|
operationTaskId: null
|
},
|
detailInfoMergeCols: ['mergeSnNo', 'snNo', 'id'],
|
taskDetailInfoSearchList: [],
|
taskDetailInfoTable: {
|
total: 0,
|
currentPage: 1,
|
pageSize: 100,
|
data: [],
|
// 标题
|
column: [
|
// 是否报工
|
{
|
minWidth: '120',
|
prop: 'produceStatus',
|
label: '是否报工',
|
sort: true,
|
isTrue: true,
|
isEdit: false,
|
isSearch: true,
|
editInfoType: 'text',
|
searchInfoType: 'select',
|
optList: () => {
|
return this.getProduceStatusOptionList()
|
},
|
formatter: (row, column, cellValue) => {
|
var formatVal
|
if (cellValue != null) {
|
if (cellValue) {
|
formatVal = '是'
|
} else {
|
formatVal = '否'
|
}
|
} else {
|
formatVal = ''
|
}
|
return formatVal
|
}
|
},
|
// 成品缆号
|
{
|
minWidth: '140',
|
prop: 'snNo',
|
label: '成品缆号',
|
sort: true,
|
isTrue: true,
|
isEdit: false,
|
isSearch: true,
|
editInfoType: 'text'
|
},
|
// 段长
|
{
|
minWidth: '140',
|
prop: 'qty',
|
label: '段长',
|
sort: true,
|
isTrue: true,
|
isEdit: false,
|
isSearch: true,
|
editInfoType: 'text'
|
},
|
// 合并缆号
|
{
|
minWidth: '140',
|
prop: 'mergeSnNo',
|
label: '合并缆号',
|
sort: true,
|
isTrue: true,
|
isEdit: false,
|
isSearch: true,
|
editInfoType: 'text'
|
},
|
// SN号
|
{
|
minWidth: '140',
|
prop: 'sn',
|
label: 'SN号',
|
sort: true,
|
isTrue: true,
|
isEdit: true,
|
isSearch: true,
|
isSplitCell: true,
|
editInfoType: 'text'
|
},
|
// 米标
|
{
|
minWidth: '140',
|
prop: 'meterMark',
|
label: '米标',
|
sort: true,
|
isTrue: true,
|
isEdit: true,
|
isSearch: true,
|
isSplitCell: true,
|
editInfoType: 'text'
|
},
|
// 零件号
|
{
|
minWidth: '140',
|
prop: 'partNo',
|
label: '零件号',
|
sort: true,
|
isTrue: true,
|
isEdit: false,
|
isSearch: true,
|
isSplitCell: true,
|
editInfoType: 'text'
|
},
|
// 零件描述
|
{
|
minWidth: '140',
|
prop: 'partName',
|
label: '零件描述',
|
sort: true,
|
isTrue: true,
|
isEdit: false,
|
isSearch: true,
|
isSplitCell: true,
|
editInfoType: 'text'
|
},
|
// 生产长度
|
{
|
minWidth: '140',
|
prop: 'operationProduceQty',
|
label: '生产长度',
|
sort: true,
|
isTrue: true,
|
isEdit: false,
|
isSearch: true,
|
editInfoType: 'text'
|
},
|
// 工序
|
{
|
minWidth: '140',
|
prop: 'operationName',
|
label: '工序',
|
sort: true,
|
isTrue: true,
|
isEdit: false,
|
isSearch: true,
|
editInfoType: 'text'
|
},
|
// 节距
|
{
|
minWidth: '140',
|
prop: 'partPitch',
|
label: '节距',
|
sort: true,
|
isTrue: true,
|
isEdit: false,
|
isSearch: true,
|
editInfoType: 'text'
|
},
|
// 盘具
|
{
|
minWidth: '140',
|
prop: 'discToolMeasurement',
|
label: '盘具',
|
sort: true,
|
isTrue: true,
|
isEdit: false,
|
isSearch: true,
|
editInfoType: 'text'
|
},
|
// 区间
|
{
|
minWidth: '140',
|
prop: 'section',
|
label: '区间',
|
sort: true,
|
isTrue: true,
|
isEdit: false,
|
isSearch: true,
|
editInfoType: 'text'
|
},
|
// 订单说明
|
{
|
minWidth: '120',
|
prop: 'remark',
|
label: '订单说明',
|
sort: true,
|
isTrue: true,
|
isEdit: false,
|
isSearch: true,
|
editInfoType: 'text'
|
},
|
// 备注
|
{
|
minWidth: '120',
|
prop: 'orderUploadRemark',
|
label: '备注',
|
sort: true,
|
isTrue: true,
|
isEdit: false,
|
isSearch: true,
|
editInfoType: 'text'
|
}
|
],
|
toolbar: [
|
{
|
text: '报工',
|
type: 'primary',
|
barShow: true,
|
fun: this.createTracking
|
},
|
{
|
text: '缆号重置',
|
type: 'primary',
|
barShow: true,
|
fun: this.resetSnNo
|
}
|
],
|
operator: [
|
{
|
text: '查看',
|
type: 'text',
|
size: 'small',
|
fun: this.viewProcessConfig
|
}
|
],
|
operatorConfig: {
|
fixed: 'right',
|
label: '工艺配置单',
|
width: 100,
|
minWidth: 100
|
}
|
},
|
operationList: [],
|
selectedOperationIds: [],
|
parentInfo: {
|
workstationId: null,
|
operationTaskId: null,
|
currProductMainId: null,
|
productOutId: null,
|
currProductMainNo: null,
|
partId: null,
|
partNo: null,
|
partName: null,
|
unit: null
|
},
|
taskDetailInfoHandleSelection: [],
|
showIsReproduceForm: false,
|
produceStatusOptionList: [
|
{
|
value: true,
|
label: '是'
|
},
|
{
|
value: false,
|
label: '否'
|
}
|
]
|
}
|
},
|
computed: {
|
...mapGetters(['userInfo'])
|
},
|
mounted() {},
|
created() {},
|
methods: {
|
handleClick() {
|
if (this.taskInfoActiveName == '按批次报工') {
|
this.taskInfoMainHeight = '90%'
|
} else {
|
this.taskInfoMainHeight = '305px'
|
}
|
},
|
shrinkExpandTaskInfo() {
|
this.taskInfoShow = !this.taskInfoShow
|
if (this.taskInfoShow) {
|
this.taskInfoMainHeight = '305px'
|
this.taskInfoBodyHeight = '517px'
|
this.tableHeight = '367px'
|
} else {
|
this.taskInfoMainHeight = '0px'
|
this.taskInfoBodyHeight = '822px'
|
this.tableHeight = '637px'
|
}
|
},
|
// 根据工艺和工序的id去获取工序参数
|
getTechnologyRoutingParam(item) {
|
getTemplate(this.currOperateTask.id).then((response) => {
|
this.paramDatas = response.data.data
|
this.paramTabs = []
|
this.paramTabCurrTemplateIds = []
|
if (this.paramDatas != null && this.paramDatas.length > 0) {
|
for (let i = 0; i < this.paramDatas.length; i++) {
|
const paramData = this.paramDatas[i]
|
this.$set(paramData, 'checked', false)
|
if (this.paramTabs.indexOf(paramData.operationTemplateType) < 0) {
|
this.paramTabs.push(paramData.operationTemplateType)
|
this.paramTabCurrTemplateIds.push({
|
tab: paramData.operationTemplateType,
|
templateId: null
|
})
|
}
|
}
|
if (this.paramTabs.length > 0) {
|
this.activeName = this.paramTabs[0]
|
this.getEveryTabParams(this.paramTabs[0])
|
}
|
}
|
|
// 额外的两个标签
|
if (this.paramTabs.length == 0) {
|
this.activeName = this.tabNameExt1
|
this.handleTabClick({ name: this.tabNameExt1 })
|
}
|
})
|
},
|
// 响应tab单击事件
|
handleTabClick(tab, event) {
|
if (tab.name === this.tabNameExt0) {
|
if (this.currOperateTask.pcoId) {
|
getProcessConfig(this.currOperateTask.pcoId).then((response) => {
|
if (response.data && response.data.code === 0) {
|
this.configContent = response.data.data
|
this.$nextTick(() => {
|
// this.$refs.editorb1.setEnable(false)
|
// this.$refs.editorb2.setEnable(false)
|
// this.$refs.editorb4.setEnable(false)
|
})
|
}
|
})
|
} else {
|
this.configContent = {}
|
}
|
} else if (tab.name === this.tabNameExt1) {
|
// 工艺附件
|
const param = {
|
customerOrderNo: this.currOperateTask.customerOrderNo
|
}
|
getProcessConfigFiles(param).then((response) => {
|
this.processConfigFileTableData = response.data.data
|
})
|
} else if (tab.name === this.tabNameExt2) {
|
// 结构图
|
if (this.currOperateTask != null && this.currOperateTask.mpsNo) {
|
getByMpsNo({
|
mpsNo: this.currOperateTask.mpsNo
|
}).then((response) => {
|
if (response.data.data && response.data.data.technologyDocumentId) {
|
const param = {
|
technologyDocumentId: response.data.data.technologyDocumentId
|
}
|
getDocumentJgt(param).then((response) => {
|
this.structureImages = []
|
const jgts = response.data.data
|
for (let i = 0; i < jgts.length; i++) {
|
var aa = {
|
id: jgts[i].id,
|
name: '预览大图',
|
url: '/mes/document/file/' + jgts[i].fileName
|
}
|
this.structureImages.push(aa)
|
}
|
})
|
}
|
})
|
}
|
} else {
|
this.getEveryTabParams(tab.name)
|
}
|
},
|
// 响应参数集点击事件
|
tabParamsClick() {
|
// 将点击的行checked属性设置为true,其余行设置为false
|
/* for (let i = 0; i < this.everyTabParams.length; i++) {
|
if (this.everyTabParams[i].id === row.id) {
|
this.everyTabParams[i].checked = true
|
} else {
|
this.everyTabParams[i].checked = false
|
}
|
} */
|
|
const paramTabCurrTemplate = this.paramTabCurrTemplateIds.find(
|
(item) => this.activeName === item.tab
|
)
|
paramTabCurrTemplate.templateId =
|
this.currTemplateId === '' ? null : this.currTemplateId
|
this.getParams(this.currTemplateId)
|
},
|
// 根据tab名称,去获取参数集的集合
|
getEveryTabParams(tabName) {
|
this.currTemplateId = null
|
this.everyTabParams = []
|
this.params = []
|
if (this.paramDatas != null && this.paramDatas.length > 0) {
|
for (let i = 0; i < this.paramDatas.length; i++) {
|
const paramData = this.paramDatas[i]
|
paramData.checked = false
|
if (paramData.operationTemplateType === tabName) {
|
this.everyTabParams.push(paramData)
|
}
|
}
|
if (this.everyTabParams.length > 0) {
|
// 去paramTabCurrTemplateIds查看,当前tabName是否有templateId,若有则取出来,若没有,则找everyTabParams中的第一个元素
|
const paramTabCurrTemplate = this.paramTabCurrTemplateIds.find(
|
(item) => tabName === item.tab
|
)
|
if (paramTabCurrTemplate.templateId != null) {
|
this.currTemplateId = paramTabCurrTemplate.templateId
|
} else {
|
this.currTemplateId = this.everyTabParams[0].id
|
}
|
this.tabParamsClick()
|
}
|
}
|
},
|
// 根据参数集id,去获取参数的集合
|
getParams(id) {
|
this.params = []
|
const paramData = this.paramDatas.find((item) => id === item.id)
|
if (paramData !== undefined) {
|
this.params = paramData.paramList
|
}
|
},
|
paramsTableHeaderStyle({ row, column, rowIndex, columnIndex }) {
|
let headerStyle = 'background:#599ef4;color:#fff;'
|
if (columnIndex === 0) {
|
headerStyle += 'border-radius: 6px 0px 0px 0px;'
|
} else if (columnIndex === 2) {
|
headerStyle += 'border-radius: 0px 6px 0px 0px;'
|
}
|
return headerStyle
|
},
|
tableRowClassName({ row, rowIndex }) {
|
if (rowIndex % 2 === 1) {
|
return 'stripe-row'
|
} else {
|
return ''
|
}
|
},
|
// 刷新工单的信息
|
updateOpTask() {
|
this.opTask.statusDesc = '进行中'
|
},
|
// 初始化页面变量
|
initTaskParam() {
|
this.activeName = ''
|
this.paramDatas = []
|
this.paramTabs = []
|
this.everyTabParams = []
|
this.params = []
|
this.paramTabCurrTemplateIds = []
|
this.opTask = { statusDesc: '' }
|
this.batchTree = []
|
this.parentInfo = {
|
workstationId: null,
|
operationTaskId: null,
|
currProductMainId: null,
|
productOutId: null,
|
currProductMainNo: null,
|
partId: null,
|
partNo: null,
|
partName: null,
|
unit: null
|
}
|
},
|
// 获取工单产出批次
|
getOutPutBatchByOptaskId() {
|
this.outPutBatchList = []
|
getByOperationTaskIds([this.currOperateTask.id]).then((response) => {
|
const resData = response.data.data
|
const resCode = response.data.code
|
if (resCode === 0) {
|
this.outPutBatchList = resData[this.currOperateTask.id]
|
}
|
})
|
},
|
// 打印标签
|
printLabel(row) {
|
const queryParam = {
|
type: 3,
|
sn: row.snNo
|
}
|
getPrintUrl(queryParam).then((response) => {
|
const resData = response.data
|
if (resData.code === 0) {
|
const url = resData.data
|
window.open(url)
|
} else {
|
this.$message.error('获取积木报表url失败')
|
}
|
})
|
},
|
getBatchTree() {
|
this.batchTree = []
|
getGenerateSN({ operationTaskId: this.currOperateTask.id }).then(
|
(response) => {
|
const resData = response.data.data
|
const resCode = response.data.code
|
if (resCode === 0) {
|
if (resData.length > 0) {
|
const effectiveData = []
|
effectiveData.push(resData[0])
|
const floorIndex = 0
|
this.batchTree = this.getListName(effectiveData, floorIndex)
|
}
|
}
|
}
|
)
|
},
|
getListName(arr, floorIndex) {
|
arr.forEach((el) => {
|
if (floorIndex === 0) {
|
el.label = '(' + el.operationName + ')' + el.productSn
|
} else {
|
el.label = '(' + el.operationName + ')' + el.sn
|
}
|
|
if (el.children && el.children.length > 0) {
|
floorIndex++
|
this.getListName(el.children, floorIndex)
|
}
|
})
|
return arr
|
},
|
// 放大图片
|
openImg() {
|
console.log('放大照片')
|
},
|
downloadProcessConfigFile(row) {
|
downloadProcessConfigFile(
|
row.fileName,
|
row.bucketName,
|
row.originalFileName
|
)
|
},
|
taskDetailInfoHandleSelectionChange(val) {
|
this.taskDetailInfoHandleSelection = val
|
},
|
objectSpanMethodForTaskDetailInfo(data) {
|
const row = data[0]
|
const column = data[1]
|
const rowIndex = data[2]
|
const columnIndex = data[3]
|
const mergeRowColSplitObj = data[5]
|
if (column.property === 'qty' || column.property === 'snNo') {
|
const rowColSplitNodes = mergeRowColSplitObj.snNo.rowColSplitNodes
|
const rowColSplitNode = rowColSplitNodes.find(
|
(item) => item.key == row.snNo && item.node === rowIndex
|
)
|
if (rowColSplitNode !== undefined) {
|
data[4]({
|
rowspan: rowColSplitNode.num,
|
colspan: 1
|
})
|
} else {
|
data[4]({
|
rowspan: 0,
|
colspan: 0
|
})
|
}
|
}
|
if (column.property === 'mergeSnNo') {
|
const rowColSplitNodes = mergeRowColSplitObj.mergeSnNo.rowColSplitNodes
|
const rowColSplitNode = rowColSplitNodes.find(
|
(item) => item.key == row.mergeSnNo && item.node === rowIndex
|
)
|
if (rowColSplitNode !== undefined) {
|
data[4]({
|
rowspan: rowColSplitNode.num,
|
colspan: 1
|
})
|
} else {
|
data[4]({
|
rowspan: 0,
|
colspan: 0
|
})
|
}
|
}
|
if (column.property === 'sn' || columnIndex == 0) {
|
const rowColSplitNodes = mergeRowColSplitObj.id.rowColSplitNodes
|
const rowColSplitNode = rowColSplitNodes.find(
|
(item) => item.key == row.id && item.node === rowIndex
|
)
|
if (rowColSplitNode !== undefined) {
|
data[4]({
|
rowspan: rowColSplitNode.num,
|
colspan: 1
|
})
|
} else {
|
data[4]({
|
rowspan: 0,
|
colspan: 0
|
})
|
}
|
}
|
},
|
viewProcessConfig(row) {
|
this.orderInfo.customerOrderNo = row.customerOrderNo
|
this.orderInfo.otcLineNo = row.otcLineNo
|
this.showProcessConfigurationSheet = true
|
},
|
resetSnNo() {
|
// 弹出询问框,进行是否重新生产选择
|
if (this.taskDetailInfoHandleSelection.length > 0) {
|
this.orderSnGenerateIdList = []
|
this.taskDetailInfoHandleSelection.forEach((item) => {
|
this.orderSnGenerateIdList.push(item.id)
|
})
|
this.showIsReproduceForm = true
|
} else {
|
this.$message.error('请选择批次!')
|
}
|
},
|
createTracking() {
|
// this.taskDetailInfoHandleSelection
|
if (this.taskDetailInfoHandleSelection.length > 0) {
|
// 校验所选的批次对应零件,必须跟工单的零件相同
|
let flag = true
|
let hasSn = false
|
this.taskDetailInfoHandleSelection.forEach((item) => {
|
if (item.partNo != this.currOperateTask.partNo) {
|
flag = false
|
}
|
if (item.sn != null) {
|
hasSn = true
|
}
|
})
|
if (flag) {
|
let checkFlag = true
|
if (hasSn) {
|
// 只能单条,判断是否是单条
|
if (this.taskDetailInfoHandleSelection.length > 1) {
|
checkFlag = false
|
this.$message.error('SN号有值时,只能选择一条批次,进行报工!')
|
}
|
}
|
if (checkFlag) {
|
// 先进行各种校验
|
if (!this.currOperateTask.id) {
|
this.$message.error('请选择工单!')
|
}
|
// 先判断,是否存在需要交接的产出
|
getShiftProductOutByOpIdAndWsId(
|
this.workstationId,
|
this.currOperateTask.id
|
).then((response) => {
|
var data = response.data
|
if (data.code === 0) {
|
if (data.data != null) {
|
this.$message.warning(
|
'工单、机台下存在交班的产出,不可进行【批量产出】'
|
)
|
} else {
|
let productStaffs = []
|
let productStaffIds = []
|
if (
|
this.currentDutyRecord != null &&
|
this.currentDutyRecord.id != null
|
) {
|
if (
|
this.personBoardList != null &&
|
this.personBoardList.length > 0
|
) {
|
this.parentInfo.workstationId = this.workstationId
|
this.parentInfo.operationTaskId = this.currOperateTask.id
|
this.parentInfo.currProductMainId = null
|
this.parentInfo.currProductMainNo = null
|
this.parentInfo.partId = this.currOperateTask.partId
|
this.parentInfo.partNo = this.currOperateTask.partNo
|
this.parentInfo.partName = this.currOperateTask.partName
|
this.parentInfo.unit = this.currOperateTask.unit
|
this.parentInfo.productOutId = null
|
// 给弹出框产量列表productList赋值
|
this.productList = []
|
const product = {}
|
console.log('userInfo', this.userInfo)
|
const currStaff = this.personBoardList.find((item) => {
|
return item.staffId == this.userInfo.staffId
|
})
|
if (currStaff) {
|
this.orderSnGenerateIdList = []
|
if (hasSn) {
|
this.discToolMeasurementVal = this.taskDetailInfoHandleSelection[0].discToolMeasurement
|
const taskDetailInfoHandle = this
|
.taskDetailInfoHandleSelection[0]
|
this.orderSnGenerateIdList.push(
|
taskDetailInfoHandle.id
|
)
|
if (!taskDetailInfoHandle.produceStatus) {
|
// 有SN的,单条报工
|
productStaffs = []
|
productStaffIds = []
|
productStaffIds.push(currStaff.staffId)
|
productStaffs.push(currStaff.staffNo)
|
product.staffName = currStaff.staffName
|
product.staffNo = currStaff.staffNo
|
product.productNo = null
|
product.partId = this.currOperateTask.partId
|
product.partNo = this.currOperateTask.partNo
|
product.partName = this.currOperateTask.partName
|
product.outBatchNo = taskDetailInfoHandle.sn
|
product.disNumber = 1
|
product.productQty =
|
taskDetailInfoHandle.operationProduceQty
|
product.unit = this.currOperateTask.unit
|
product.productStaffs = JSON.parse(
|
JSON.stringify(productStaffs)
|
)
|
product.productStaffIds = JSON.parse(
|
JSON.stringify(productStaffIds)
|
)
|
product.status = true
|
product.systemNo = null
|
product.date = null
|
product.dutyRecordId = this.currentDutyRecord.id
|
product.startMeterMark = 0
|
product.endMeterMark =
|
taskDetailInfoHandle.operationProduceQty == null
|
? 0
|
: taskDetailInfoHandle.operationProduceQty
|
|
product.reelNumber = null
|
product.ifsBatchNo = null
|
product.scrapQty = null
|
product.segmentDesc = null
|
product.remark = null
|
|
product.sproductQty = 0
|
product.batchNoEdit = false
|
|
product.reelWeight = null
|
product.grossWeight = null
|
|
product.mainRemark = null
|
|
this.productList.push(product)
|
// 弹出产量填写的dialog
|
this.showProductByBatchForm = true
|
} else {
|
this.$message.warning('批次已报工!')
|
}
|
} else {
|
let totalProduceQty = 0
|
this.discToolMeasurementVal = this.taskDetailInfoHandleSelection[0].discToolMeasurement
|
this.taskDetailInfoHandleSelection.forEach(
|
(element) => {
|
this.orderSnGenerateIdList.push(element.id)
|
totalProduceQty =
|
totalProduceQty +
|
(element.operationProduceQty == null
|
? 0
|
: element.operationProduceQty)
|
}
|
)
|
|
// 有SN的,单条报工
|
productStaffs = []
|
productStaffIds = []
|
productStaffIds.push(currStaff.staffId)
|
productStaffs.push(currStaff.staffNo)
|
product.staffName = currStaff.staffName
|
product.staffNo = currStaff.staffNo
|
product.productNo = null
|
product.partId = this.currOperateTask.partId
|
product.partNo = this.currOperateTask.partNo
|
product.partName = this.currOperateTask.partName
|
product.outBatchNo = null
|
product.disNumber = 1
|
product.productQty = totalProduceQty
|
product.unit = this.currOperateTask.unit
|
product.productStaffs = JSON.parse(
|
JSON.stringify(productStaffs)
|
)
|
product.productStaffIds = JSON.parse(
|
JSON.stringify(productStaffIds)
|
)
|
product.status = true
|
product.systemNo = null
|
product.date = null
|
product.dutyRecordId = this.currentDutyRecord.id
|
product.startMeterMark = 0
|
product.endMeterMark = totalProduceQty
|
|
product.reelNumber = null
|
product.ifsBatchNo = null
|
product.scrapQty = null
|
product.segmentDesc = null
|
product.remark = null
|
|
product.sproductQty = 0
|
product.batchNoEdit = false
|
|
product.reelWeight = null
|
product.grossWeight = null
|
|
product.mainRemark = null
|
|
this.productList.push(product)
|
// 弹出产量填写的dialog
|
this.showProductByBatchForm = true
|
}
|
} else {
|
this.$message.warning('当前登录人,未当班登记!')
|
}
|
} else {
|
this.$message.warning('当前没有人员,不可进行报工!')
|
}
|
} else {
|
this.$message.warning('当前没有上班记录,不可进行报工!')
|
}
|
}
|
}
|
})
|
}
|
} else {
|
this.$message.error('所选批次零件与工单零件不一致!')
|
}
|
} else {
|
this.$message.error('请选择批次!')
|
}
|
},
|
getSegmentmergeTaskDetailInfoData() {
|
this.$refs.segmentmergeTaskDetailInfoTable.getDataList()
|
},
|
initSegmentmergeTaskDetailInfoOperationList() {
|
// this.operationList
|
this.operationList = []
|
getOperationInfo({ mpsId: this.currOperateTask.mpsId }).then(
|
(response) => {
|
const resData = response.data
|
this.operationList = resData.data
|
}
|
)
|
},
|
setQueryObj() {
|
if (this.selectedOperationIds.length > 0) {
|
this.taskDetailInfoParamObj.operationIds = this.selectedOperationIds
|
} else {
|
this.taskDetailInfoParamObj.operationIds = []
|
}
|
this.getSegmentmergeTaskDetailInfoData()
|
},
|
// 开启行编辑
|
beginEdit() {
|
if (this.taskDetailInfoHandleSelection.length > 0) {
|
// 判断行是否已报工,且sn是否是空的
|
let flag = true
|
this.taskDetailInfoHandleSelection.forEach((item) => {
|
if (item.produceStatus && item.sn == null) {
|
} else {
|
flag = false
|
}
|
})
|
if (flag) {
|
this.taskDetailInfoHandleSelection.forEach((item) => {
|
item.isRowEdit = true
|
})
|
this.isEditShow = false
|
} else {
|
this.$message.error('只有已报工且SN为空的批次,才可进行编辑!')
|
}
|
} else {
|
this.$message.error('请选择编辑批次!')
|
}
|
},
|
cancelEdit() {
|
this.isEditShow = true
|
this.getSegmentmergeTaskDetailInfoData()
|
},
|
saveEdit() {
|
if (this.taskDetailInfoHandleSelection.length > 0) {
|
const updateObjArr = []
|
this.taskDetailInfoHandleSelection.forEach((item) => {
|
updateObjArr.push({ id: item.id, sn: item.sn })
|
})
|
updateSn(updateObjArr).then((response) => {
|
this.$message.success('保存成功!')
|
this.isEditShow = true
|
this.getSegmentmergeTaskDetailInfoData()
|
})
|
} else {
|
this.$message.error('请选择保存的批次!')
|
}
|
},
|
getProduceStatusOptionList() {
|
return this.produceStatusOptionList
|
}
|
},
|
watch: {
|
currOperateTask: {
|
handler(newValue, oldValue) {
|
if (newValue.id) {
|
console.log(
|
'currOperateTask',
|
this.currOperateTask.routingOperationRemark
|
)
|
this.opTask.statusDesc = newValue.statusDesc
|
// 查询paramDatas
|
this.getTechnologyRoutingParam(newValue)
|
this.getOutPutBatchByOptaskId()
|
this.getBatchTree()
|
/* this.$nextTick(() => {
|
console.log('this.$refs', this.$refs)
|
const remarkImg = document.getElementById('remarkImg')
|
remarkImg.addEventListener('click', function() {
|
console.log('通过事件监听绑定事件')
|
})
|
// this.$refs.remarkImg.$on('click', this.openImg)
|
}) */
|
// 查询按批次报工工序列表
|
this.initSegmentmergeTaskDetailInfoOperationList()
|
this.taskDetailInfoParamObj.mpsId = this.currOperateTask.mpsId
|
this.taskDetailInfoParamObj.operationTaskId = this.currOperateTask.id
|
this.getSegmentmergeTaskDetailInfoData()
|
} else {
|
this.initTaskParam()
|
}
|
},
|
deep: true
|
},
|
workstationId(val) {
|
// this.initTaskParam()
|
}
|
}
|
}
|
</script>
|