You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
3502 lines
136 KiB
3502 lines
136 KiB
<template>
|
|
<div class="mod-config">
|
|
<!-- 查询条件 -->
|
|
<el-form :inline="true" label-position="top" :model="searchData">
|
|
<el-form-item :label="'BU'">
|
|
<el-select v-model="searchData.buNo" placeholder="请选择" clearable style="width: 80px">
|
|
<el-option
|
|
v-for = "i in buList"
|
|
:key = "i.buNo"
|
|
:label = "i.buNo"
|
|
:value = "i.buNo">
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item label="PLM物料编码">
|
|
<el-input v-model="searchData.testPartNo" clearable style="width: 120px"/>
|
|
</el-form-item>
|
|
<el-form-item label="IFS物料编码">
|
|
<el-input v-model="searchData.partNo" clearable style="width: 120px"/>
|
|
</el-form-item>
|
|
<el-form-item label="物料名称">
|
|
<el-input v-model="searchData.partDesc" clearable style="width: 300px"/>
|
|
</el-form-item>
|
|
<el-form-item label="客户编码">
|
|
<el-input v-model="searchData.customerId" clearable style="width: 120px"/>
|
|
</el-form-item>
|
|
<el-form-item label="客户名称">
|
|
<el-input v-model="searchData.customerDesc" clearable style="width: 150px"/>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="searchData">
|
|
<el-form-item :label="'状态'">
|
|
<el-select v-model="searchData.status" clearable style="width: 80px">
|
|
<el-option label="草稿" value="cg"></el-option>
|
|
<el-option label="审批中" value="spz"></el-option>
|
|
<el-option label="已升版" value="death"></el-option>
|
|
<el-option label="已完成" value="已完成"></el-option>
|
|
<el-option label="Dead" value="dead"></el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item label="项目号">
|
|
<el-input v-model="searchData.projectId" clearable style="width: 120px"/>
|
|
</el-form-item>
|
|
<el-form-item label="项目名称">
|
|
<el-input v-model="searchData.projectDesc" clearable style="width: 215px"/>
|
|
</el-form-item>
|
|
<el-form-item label="技术参数卡编码">
|
|
<el-input v-model="searchData.oriCodeNo" clearable style="width: 150px"/>
|
|
</el-form-item>
|
|
<el-form-item label=" ">
|
|
<el-button plain type="primary" :loading="searchLoading" @click="getDataList">查询</el-button>
|
|
<el-button type="warning" :loading="updateAbnormalDataLoading" @click="handleUpdateAbnormalData">异常数据更新</el-button>
|
|
<el-button type="primary" :loading="saveDataLoading" @click="changeModel">变更申请</el-button>
|
|
<download-excel
|
|
:fields="fields()"
|
|
:data="exportData"
|
|
type="xls"
|
|
:name="exportName"
|
|
:header="exportHeader"
|
|
:footer="exportFooter"
|
|
:fetch="createExportData"
|
|
:before-generate="startDownload"
|
|
:before-finish="finishDownload"
|
|
worksheet="导出信息"
|
|
class="el-button el-button--primary el-button--medium">
|
|
{{ "导出" }}
|
|
</download-excel>
|
|
<el-button @click="filterVisible = true">搜索</el-button>
|
|
</el-form-item>
|
|
</el-form>
|
|
|
|
<!-- 数据列表 -->
|
|
<el-table
|
|
:height="height"
|
|
:data="dataList"
|
|
border
|
|
@selection-change="selectionData"
|
|
style="width: 100%;">
|
|
<el-table-column
|
|
type="selection"
|
|
header-align="center"
|
|
align="center"
|
|
width="50">
|
|
</el-table-column>
|
|
<el-table-column
|
|
v-for="(item,index) in columnList" :key="index"
|
|
:sortable="item.columnSortable"
|
|
:prop="item.columnProp"
|
|
:header-align="item.headerAlign"
|
|
:show-overflow-tooltip="item.showOverflowTooltip"
|
|
:align="item.align"
|
|
:fixed="item.fixed === ''?false:item.fixed"
|
|
:min-width="item.columnWidth"
|
|
:label="item.columnLabel">
|
|
<template slot-scope="scope">
|
|
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
|
|
<selectDiv ref="selectDiv"></selectDiv>
|
|
|
|
<!-- 分页插件 -->
|
|
<el-pagination style="margin-top: 0px"
|
|
@size-change="sizeChangeHandle"
|
|
@current-change="currentChangeHandle"
|
|
:current-page="pageIndex"
|
|
:page-sizes="[20, 50, 100, 200, 500]"
|
|
:page-size="pageSize"
|
|
:total="totalPage"
|
|
layout="total, sizes, prev, pager, next, jumper">
|
|
</el-pagination>
|
|
|
|
<!-- 变更申请模态框 -->
|
|
<el-dialog :title="changeTitle" :close-on-click-modal="false" top="8vh" v-drag :visible.sync="modalFlag" width="1060px" :showClose="false">
|
|
<el-tabs tab-position="left" type="border-card" v-model="activeName" @tab-click="refreshCurrentTabTable" style="width: 100%;height: 720px;">
|
|
<el-tab-pane label="基本信息" name="basicInformation">
|
|
<div style="height: 705px">
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: -5px;">
|
|
<el-form-item prop="applicantId" :rules="rules.applicantId">
|
|
<span style="cursor: pointer" slot="label" @click="getBaseList(103, 1)"><a herf="#">申请人/Applicant</a></span>
|
|
<el-input v-model="modalData.applicantId" @blur="applicantBlur(103)" style="width: 120px"></el-input>
|
|
<el-input v-model="modalData.applicantName" disabled style="width: 293px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="申请部门/Department">
|
|
<el-input v-model="modalData.applicationDepartmentId" readonly style="width: 120px"></el-input>
|
|
<el-input v-model="modalData.applicationDepartmentName" disabled style="width: 293px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
|
|
<el-form-item label="申请日期/Apply Date" prop="applyDate" :rules="rules.applyDate">
|
|
<el-date-picker
|
|
style="width: 205px"
|
|
v-model="modalData.applyDate"
|
|
type="date"
|
|
value-format="yyyy-MM-dd"
|
|
placeholder="请选择日期"
|
|
:editable=false>
|
|
</el-date-picker>
|
|
</el-form-item>
|
|
<!-- <el-form-item label="ECN变更影响" prop="changeImpact" :rules="rules.changeImpact">-->
|
|
<!-- <dict-data-select v-if="modalFlag" v-model="modalData.changeImpact" style="width: 205px" dict-type="change_change_Impact"></dict-data-select>-->
|
|
<!-- </el-form-item>-->
|
|
<el-form-item label="变更影响描述/Description">
|
|
<el-input v-model="modalData.changeImpactDesc" style="width: 629px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
|
|
<el-form-item label="ECN阶段/Stage" prop="ecnStage" :rules="rules.ecnStage">
|
|
<dict-data-select v-if="modalFlag" v-model="modalData.ecnStage" style="width: 95px" dict-type="change_ecn_stage"></dict-data-select>
|
|
</el-form-item>
|
|
<el-form-item label="变更类别/Change Category" prop="changeType" :rules="rules.changeType">
|
|
<dict-data-select v-if="modalFlag" v-model="modalData.changeType" style="width: 160px" dict-type="change_change_type"></dict-data-select>
|
|
</el-form-item>
|
|
<el-form-item label="ECN种类/ECN Category" prop="ecnType" :rules="rules.ecnType">
|
|
<dict-data-select v-if="modalFlag" v-model="modalData.ecnType" style="width: 160px" dict-type="change_ecn_type"></dict-data-select>
|
|
</el-form-item>
|
|
<el-form-item label=" " style="margin-left: -10px">
|
|
<el-button type="primary" @click="chooseEcnTypeModal" style="width: 70px">ECN种类</el-button>
|
|
</el-form-item>
|
|
<el-form-item label="变更生效日期/Change Effictive Date" prop="changePhaseInDate" :rules="rules.changePhaseInDate" style="margin-left: -10px">
|
|
<el-date-picker
|
|
style="width: 205px"
|
|
v-model="modalData.changePhaseInDate"
|
|
type="date"
|
|
value-format="yyyy-MM-dd"
|
|
placeholder="请选择日期"
|
|
:editable=false>
|
|
</el-date-picker>
|
|
</el-form-item>
|
|
<el-form-item label="是否DF产品/DF(Y/N)" prop="dfIsProduct" :rules="rules.dfIsProduct">
|
|
<dict-data-select v-if="modalFlag" v-model="modalData.dfIsProduct" style="width: 108px" dict-type="change_df_is_product"></dict-data-select>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
|
|
<el-form-item prop="tpEngineerId" :rules="rules.tpEngineerId">
|
|
<span style="cursor: pointer" slot="label" @click="getBaseList(2005)"><a herf="#">TP工程师/CS/TP Engineer/CS</a></span>
|
|
<el-input v-model="modalData.tpEngineerId" @blur="tpEngineerBlur(2005)" style="width: 120px"></el-input>
|
|
<el-input v-model="modalData.tpEngineerName" disabled style="width: 293px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label=" " prop="industrialEngineerId" :rules="[{required: modalData.dfIsProduct === 'Yes',message: ' ',trigger: ['blur','change']}]">
|
|
<span style="cursor: pointer" slot="label" @click="getBaseList(2006)"><a herf="#">关务人员/Customs</a></span>
|
|
<el-input v-model="modalData.industrialEngineerId" @blur="industrialEngineerBlur(2006)" style="width: 120px"></el-input>
|
|
<el-input v-model="modalData.industrialEngineerName" disabled style="width: 293px"></el-input>
|
|
</el-form-item>
|
|
<!-- <el-form-item label="制造成本是否变更" prop="manufacturingCostIsChange" :rules="rules.manufacturingCostIsChange">-->
|
|
<!-- <dict-data-select v-model="modalData.manufacturingCostIsChange" style="width: 205px" dict-type="change_manufacturing_cost_is_change"></dict-data-select>-->
|
|
<!-- </el-form-item>-->
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="modalData">
|
|
<el-form-item label=" ">
|
|
<span style="cursor: pointer" slot="label" @click="getBaseList(2007)"><a herf="#">质检人员/CQC</a></span>
|
|
<el-input v-model="modalData.cqcOperatorId" @blur="cqcOperatorBlur(2007)" style="width: 120px"></el-input>
|
|
<el-input v-model="modalData.cqcOperatorName" disabled style="width: 293px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label=" ">
|
|
<span style="cursor: pointer" slot="label" @click="getBaseList(2008)"><a herf="#">首件检测/FAI</a></span>
|
|
<el-input v-model="modalData.faiOperatorId" @blur="faiOperatorBlur(2008)" style="width: 120px"></el-input>
|
|
<el-input v-model="modalData.faiOperatorName" disabled style="width: 293px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
|
|
<el-form :inline="true" label-position="top" :model="modalData">
|
|
<el-form-item label="DelegateAccess">
|
|
<span style="cursor: pointer" slot="label" @click="delegateAccessVisible = true"><a herf="#">DelegateAccess</a></span>
|
|
<el-input type="textarea" v-model="delegateAccessName" readonly :rows="2" resize='none' style="width: 848px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: 30px">
|
|
<el-form-item label="变更要求描述/Requirements Desc." prop="changeRequestDesc" :rules="rules.changeRequestDesc">
|
|
<el-input type="textarea" v-model="modalData.changeRequestDesc" :rows="3" resize='none' show-word-limit style="width: 636px;height: 30px"></el-input>
|
|
</el-form-item>
|
|
<!-- <el-form-item label="是否重新报价" prop="isReQuote" :rules="rules.isReQuote">-->
|
|
<!-- <dict-data-select v-model="modalData.isReQuote" style="width: 205px" dict-type="change_is_re_quote"></dict-data-select>-->
|
|
<!-- <el-button type="primary" icon="el-icon-upload" @click="uploadFileModal" style="margin-top: 12px;width: 105px">文件上传</el-button>-->
|
|
<!-- </el-form-item>-->
|
|
<el-form-item label="印刷方式/Print Type" prop="printing" :rules="rules.printing">
|
|
<dict-data-select v-if="modalFlag" v-model="modalData.printing" style="width: 198px" dict-type="change_printing"></dict-data-select>
|
|
<el-button type="primary" icon="el-icon-upload" @click="uploadFileModal" style="margin-top: 15px;width: 105px">文件上传</el-button>
|
|
</el-form-item>
|
|
</el-form>
|
|
<!-- <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: 50px">-->
|
|
<!-- <el-form-item label="原产品是否UL认证要求" prop="ulCertificationRequirements" :rules="rules.ulCertificationRequirements">-->
|
|
<!-- <dict-data-select v-model="modalData.ulCertificationRequirements" style="width: 423px" dict-type="change_ul_certification_requirements"></dict-data-select>-->
|
|
<!-- </el-form-item>-->
|
|
<!-- <el-form-item label="如果有,变更后能否继续满足此需求" prop="ulContinueToMeetDemand" :rules="rules.ulContinueToMeetDemand">-->
|
|
<!-- <dict-data-select v-model="modalData.ulContinueToMeetDemand" style="width: 423px" dict-type="change_ul_continue_to_meet_demand"></dict-data-select>-->
|
|
<!-- </el-form-item>-->
|
|
<!-- </el-form>-->
|
|
<!-- <el-form :inline="true" label-position="top" :model="modalData" :rules="rules">-->
|
|
<!-- <el-form-item label="原产品是否GP要求" prop="gpCertificationRequirements" :rules="rules.gpCertificationRequirements">-->
|
|
<!-- <dict-data-select v-model="modalData.gpCertificationRequirements" style="width: 423px" dict-type="change_gp_certification_requirements"></dict-data-select>-->
|
|
<!-- </el-form-item>-->
|
|
<!-- <el-form-item label="如果有,变更后能否继续满足此需求" prop="gpContinueToMeetDemand" :rules="rules.gpContinueToMeetDemand">-->
|
|
<!-- <dict-data-select v-model="modalData.gpContinueToMeetDemand" style="width: 423px" dict-type="change_gp_continue_to_meet_demand"></dict-data-select>-->
|
|
<!-- </el-form-item>-->
|
|
<!-- </el-form>-->
|
|
<el-form :inline="true" label-position="top" style="margin-top: 50px">
|
|
<el-button type="primary" @click="addChangeDetail">新增</el-button>
|
|
<div class="rq">
|
|
<el-table
|
|
:data="chooseDataList"
|
|
height="273px"
|
|
border
|
|
style="width:100%">
|
|
<!-- <el-table-column-->
|
|
<!-- v-for="(item,index) in columnChooseDataList" :key="index"-->
|
|
<!-- :sortable="item.columnSortable"-->
|
|
<!-- :prop="item.columnProp"-->
|
|
<!-- :header-align="item.headerAlign"-->
|
|
<!-- :show-overflow-tooltip="item.showOverflowTooltip"-->
|
|
<!-- :align="item.align"-->
|
|
<!-- :fixed="item.fixed == ''?false:item.fixed"-->
|
|
<!-- :min-width="item.columnWidth"-->
|
|
<!-- :label="item.columnLabel">-->
|
|
<!-- <template slot-scope="scope">-->
|
|
<!-- <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>-->
|
|
<!-- <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>-->
|
|
<!-- </template>-->
|
|
<!-- </el-table-column>-->
|
|
<el-table-column label="PLM物料编码" header-align="center">
|
|
<el-table-column
|
|
prop="testPartNo"
|
|
header-align="center"
|
|
align="left"
|
|
min-width="120"
|
|
label="PLM Part No.">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="IFS物料编码" header-align="center">
|
|
<el-table-column
|
|
prop="partNo"
|
|
header-align="center"
|
|
align="left"
|
|
min-width="120"
|
|
label="IFS Part No.">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="物料名称" header-align="center">
|
|
<el-table-column
|
|
prop="partDesc"
|
|
header-align="center"
|
|
align="left"
|
|
min-width="180"
|
|
label="Part Desc.">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="图纸编码" header-align="center">
|
|
<el-table-column
|
|
prop="drawingNo"
|
|
header-align="center"
|
|
align="center"
|
|
min-width="100"
|
|
label="Drawing No.">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="图稿编码" header-align="center">
|
|
<el-table-column
|
|
prop="draftNo"
|
|
header-align="center"
|
|
align="center"
|
|
min-width="100"
|
|
label="Proof No.">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="新IFS料号" header-align="center">
|
|
<el-table-column
|
|
prop=""
|
|
header-align="center"
|
|
align="center"
|
|
min-width="170"
|
|
label="New IFS Part No.">
|
|
<template slot-scope="scope">
|
|
<el-input @input="(val)=>partInput(scope.row, val)" :ref="`newPartNo${scope.$index}`" v-model="scope.row.newPartNo" @keyup.enter.native="focusNextInput(scope.$index, 'newPartNo')" style="width:77%"></el-input>
|
|
<el-button type="primary" @click="choosePartNo(scope.row)" style="width:18%;padding: 3px 7px">· · ·</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="新图纸编码" header-align="center">
|
|
<el-table-column
|
|
prop=""
|
|
header-align="center"
|
|
align="center"
|
|
min-width="110"
|
|
label="New Drawing No.">
|
|
<template slot-scope="scope">
|
|
<el-input :ref="`newDrawingNo${scope.$index}`" v-model="scope.row.newDrawingNo" @keyup.enter.native="focusNextInput(scope.$index, 'newDrawingNo')" style="width:98%"></el-input>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="新图稿编码" header-align="center">
|
|
<el-table-column
|
|
prop=""
|
|
header-align="center"
|
|
align="center"
|
|
min-width="100"
|
|
label="New Proof No.">
|
|
<template slot-scope="scope">
|
|
<el-input :ref="`newDraftNo${scope.$index}`" v-model="scope.row.newDraftNo" @keyup.enter.native="focusNextInput(scope.$index, 'newDraftNo')" style="width:98%"></el-input>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
fixed="right"
|
|
header-align="center"
|
|
align="center"
|
|
width="60"
|
|
label="操作">
|
|
<template slot-scope="scope">
|
|
<el-link style="cursor: pointer" @click="deleteChooseDataModal(scope.row)">删除</el-link>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
</el-form>
|
|
</div>
|
|
</el-tab-pane>
|
|
|
|
<el-tab-pane label="库存成本影响" name="inventoryCostImpact">
|
|
<div style="height: 705px">
|
|
<el-form :inline="true" label-position="top" :model="costImpactData" style="margin-top: -5px;">
|
|
<el-form-item style="margin-top: 7px;width: 155px">
|
|
<el-checkbox v-model="costImpactData.productionProductFlag" true-label="Y">在制品<br>On-line product</el-checkbox>
|
|
</el-form-item>
|
|
<el-form-item style="margin-left: 50px" label="数量/Qty.">
|
|
<el-input class="inlineNumber numInput" v-model="costImpactData.productionProductNumber" :disabled="costImpactData.productionProductFlag !== 'Y'" type="number" style="width: 100px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="处理意见/Disposition">
|
|
<!-- <dict-data-select v-if="modalFlag" v-model="costImpactData.productionProductOpinions" :disabled="costImpactData.productionProductFlag !== 'Y'" style="width: 200px" dict-type="change_production_product_opinions"></dict-data-select>-->
|
|
<el-input v-if="modalFlag" v-model="costImpactData.productionProductOpinions" :disabled="costImpactData.productionProductFlag !== 'Y'" style="width: 200px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="报废金额/Scrap Amount">
|
|
<el-input class="inlineNumber numInput" v-model="costImpactData.productionProductScrapAmount" :disabled="costImpactData.productionProductFlag !== 'Y'" @input="handleInput(costImpactData.productionProductScrapAmount,1)" type="number" style="width: 140px"></el-input>
|
|
</el-form-item>
|
|
<!-- <el-form-item label=" " style="margin-left: -10px">-->
|
|
<!-- <el-input v-model="costImpactData.productionProductRemark" :disabled="costImpactData.productionProductFlag !== 'Y'" style="width: 300px"></el-input>-->
|
|
<!-- </el-form-item>-->
|
|
<el-form-item>
|
|
<span style="cursor: pointer" slot="label" @click="getBaseList(103, 3)"><a herf="#">执行人/Executor</a></span>
|
|
<el-input v-model="costImpactData.productionProductExecutorName" :disabled="costImpactData.productionProductFlag !== 'Y'" style="width: 130px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="costImpactData" style="margin-top: 10px;">
|
|
<el-form-item style="margin-top: 7px;width: 155px">
|
|
<el-checkbox v-model="costImpactData.inventoryProductFlag" true-label="Y">成品库存<br>FG Stock</el-checkbox>
|
|
</el-form-item>
|
|
<el-form-item style="margin-left: 50px" label="数量/Qty.">
|
|
<el-input class="inlineNumber numInput" v-model="costImpactData.inventoryProductNumber" :disabled="costImpactData.inventoryProductFlag !== 'Y'" type="number" style="width: 100px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="处理意见/Disposition">
|
|
<!-- <dict-data-select v-if="modalFlag" v-model="costImpactData.inventoryProductOpinions" :disabled="costImpactData.inventoryProductFlag !== 'Y'" style="width: 200px" dict-type="change_inventory_product_opinions"></dict-data-select>-->
|
|
<el-input v-if="modalFlag" v-model="costImpactData.inventoryProductOpinions" :disabled="costImpactData.inventoryProductFlag !== 'Y'" style="width: 200px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="报废金额/Scrap Amount">
|
|
<el-input class="inlineNumber numInput" v-model="costImpactData.inventoryProductScrapAmount" :disabled="costImpactData.inventoryProductFlag !== 'Y'" @input="handleInput(costImpactData.inventoryProductScrapAmount,2)" type="number" style="width: 140px"></el-input>
|
|
</el-form-item>
|
|
<!-- <el-form-item label=" " style="margin-left: -10px">-->
|
|
<!-- <el-input v-model="costImpactData.inventoryProductRemark" :disabled="costImpactData.inventoryProductFlag !== 'Y'" style="width: 300px"></el-input>-->
|
|
<!-- </el-form-item>-->
|
|
<el-form-item>
|
|
<span style="cursor: pointer" slot="label" @click="getBaseList(103, 4)"><a herf="#">执行人/Executor</a></span>
|
|
<el-input v-model="costImpactData.inventoryProductExecutorName" :disabled="costImpactData.inventoryProductFlag !== 'Y'" style="width: 130px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="costImpactData" style="margin-top: 10px;">
|
|
<el-form-item style="margin-top: 7px;width: 155px">
|
|
<el-checkbox v-model="costImpactData.newOrderFlag" true-label="Y">新订单<br>New Order</el-checkbox>
|
|
</el-form-item>
|
|
<el-form-item style="margin-left: 50px" label="数量/Qty.">
|
|
<el-input class="inlineNumber numInput" v-model="costImpactData.newOrderNumber" :disabled="costImpactData.newOrderFlag !== 'Y'" type="number" style="width: 100px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="costImpactData" style="margin-top: 10px;">
|
|
<el-form-item style="margin-top: 7px;width: 155px">
|
|
<el-checkbox v-model="costImpactData.affectedFlag" true-label="Y">影响的原材料及其库存量<br>Raw material influencing and stock</el-checkbox>
|
|
</el-form-item>
|
|
<el-form-item style="margin-left: 50px" label="数量/Qty.">
|
|
<el-input class="inlineNumber numInput" v-model="costImpactData.affectedNumber" :disabled="costImpactData.affectedFlag !== 'Y'" type="number" style="width: 100px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="处理意见/Disposition">
|
|
<!-- <dict-data-select v-if="modalFlag" v-model="costImpactData.affectedOpinions" :disabled="costImpactData.affectedFlag !== 'Y'" style="width: 200px" dict-type="change_affected_opinions"></dict-data-select>-->
|
|
<el-input v-if="modalFlag" v-model="costImpactData.affectedOpinions" :disabled="costImpactData.affectedFlag !== 'Y'" style="width: 200px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="报废金额/Scrap Amount">
|
|
<el-input class="inlineNumber numInput" v-model="costImpactData.affectedScrapAmount" :disabled="costImpactData.affectedFlag !== 'Y'" @input="handleInput(costImpactData.affectedScrapAmount,3)" type="number" style="width: 140px"></el-input>
|
|
</el-form-item>
|
|
<!-- <el-form-item label=" " style="margin-left: -10px">-->
|
|
<!-- <el-input v-model="costImpactData.affectedRemark" :disabled="costImpactData.affectedFlag !== 'Y'" style="width: 300px"></el-input>-->
|
|
<!-- </el-form-item>-->
|
|
<el-form-item>
|
|
<span style="cursor: pointer" slot="label" @click="getBaseList(103, 5)"><a herf="#">执行人/Executor</a></span>
|
|
<el-input v-model="costImpactData.affectedExecutorName" :disabled="costImpactData.affectedFlag !== 'Y'" style="width: 130px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="costImpactData" style="margin-top: 10px;">
|
|
<el-form-item label="ECN变更总成本/Total ECN Cost">
|
|
<el-input class="inlineNumber numInput" v-model="totalCost" readonly type="number" style="width: 205px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="备注/Remark">
|
|
<el-input v-model="costImpactData.remark" style="width: 611px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
</div>
|
|
</el-tab-pane>
|
|
|
|
<el-tab-pane label="TP&执行信息" name="actionInformation">
|
|
<div style="height: 705px">
|
|
<el-button type="primary" @click="chooseFeasibilityAssessmentModel">选择评估信息</el-button>
|
|
<div class="rq">
|
|
<el-table
|
|
:data="chooseItemList2"
|
|
height="230px"
|
|
border
|
|
style="width: 100%">
|
|
<el-table-column
|
|
v-for="(item,index) in columnChooseItemList2" :key="index"
|
|
:sortable="item.columnSortable"
|
|
:prop="item.columnProp"
|
|
:header-align="item.headerAlign"
|
|
:show-overflow-tooltip="item.showOverflowTooltip"
|
|
:align="item.align"
|
|
:fixed="item.fixed == ''?false:item.fixed"
|
|
:min-width="item.columnWidth"
|
|
:label="item.columnLabel">
|
|
<template slot-scope="scope">
|
|
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop=""
|
|
header-align="center"
|
|
align="center"
|
|
min-width="60"
|
|
label="可选值">
|
|
<template slot-scope="scope">
|
|
<el-select v-model="scope.row.chooseValue" placeholder="请选择">
|
|
<el-option v-for="item in scope.row.availableValueList" :key="item.availableValue" :label="item.availableValue" :value="item.availableValue"></el-option>
|
|
</el-select>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop=""
|
|
header-align="center"
|
|
align="center"
|
|
min-width="100"
|
|
label="备注">
|
|
<template slot-scope="scope">
|
|
<el-input v-model="scope.row.itemRemark" style="width:98%"></el-input>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
<div style="text-align: center;font-size: 11px;margin-top: 5px">
|
|
<span> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- </span>
|
|
</div>
|
|
<el-form :inline="true" label-position="top" :model="executionInfoData">
|
|
<el-form-item label="原菲林编号/Original Film No.">
|
|
<el-input v-model="executionInfoData.originalFilmNo" style="width: 226px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="原碑刀编号/Original Cutter No.">
|
|
<el-input v-model="executionInfoData.originalDieCuttingRuleNo" style="width: 226px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="原网板/印版编号/Original Plate No.">
|
|
<el-input v-model="executionInfoData.originalStencilNo" style="width: 226px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="ECN执行日期/Exec Date">
|
|
<el-date-picker style="width: 135px" v-model="executionInfoData.executionDate" type="date" value-format="yyyy-MM-dd" placeholder="请选择日期" :editable=false></el-date-picker>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="executionInfoData" style="margin-top: -5px;">
|
|
<el-form-item label="新菲林编号/New Film No.">
|
|
<el-input v-model="executionInfoData.newFilmNo" style="width: 226px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="新碑刀编号/New Cutter No.">
|
|
<el-input v-model="executionInfoData.newDieCuttingRuleNo" style="width: 226px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="新网板/印版编号/New Plate No.">
|
|
<el-input v-model="executionInfoData.newStencilNo" style="width: 226px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<div style="text-align: center ;font-size: 11px">
|
|
<span> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- </span>
|
|
</div>
|
|
<el-button type="primary" @click="chooseModel">选择执行信息</el-button>
|
|
<div class="rq">
|
|
<el-table
|
|
:data="chooseItemList"
|
|
height="285px"
|
|
border
|
|
style="width: 100%">
|
|
<el-table-column
|
|
v-for="(item,index) in columnChooseItemList" :key="index"
|
|
:sortable="item.columnSortable"
|
|
:prop="item.columnProp"
|
|
:header-align="item.headerAlign"
|
|
:show-overflow-tooltip="item.showOverflowTooltip"
|
|
:align="item.align"
|
|
:fixed="item.fixed == ''?false:item.fixed"
|
|
:min-width="item.columnWidth"
|
|
:label="item.columnLabel">
|
|
<template slot-scope="scope">
|
|
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop=""
|
|
header-align="center"
|
|
align="center"
|
|
min-width="130"
|
|
label="执行人">
|
|
<template slot-scope="scope">
|
|
<el-input @input="(val)=>executorInput(scope.row, val)" v-model="scope.row.executor" style="width:77%"></el-input>
|
|
<el-button type="primary" @click="chooseExecutor(scope.row)" style="width:18%;padding: 3px 7px">· · ·</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop=""
|
|
header-align="center"
|
|
align="center"
|
|
min-width="150"
|
|
label="备注">
|
|
<template slot-scope="scope">
|
|
<el-input v-model="scope.row.itemRemark" style="height: 11px;width:98%"></el-input>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
</div>
|
|
</el-tab-pane>
|
|
|
|
<el-tab-pane label="会签信息" name="countersignature">
|
|
<div style="height: 705px">
|
|
<el-form :inline="true" label-position="top" style="margin-top: -19px">
|
|
<el-form-item label=" ">
|
|
<el-button type="primary" @click="chooseCSModel">选择会签信息</el-button>
|
|
</el-form-item>
|
|
<el-form-item label="印刷方式/Print Type">
|
|
<dict-data-select v-if="modalFlag" v-model="modalData.printing" disabled style="width: 198px" dict-type="change_printing"></dict-data-select>
|
|
</el-form-item>
|
|
</el-form>
|
|
<div class="rq">
|
|
<el-table
|
|
:data="chooseCSItemList"
|
|
height="675px"
|
|
border
|
|
style="width: 100%">
|
|
<el-table-column
|
|
v-for="(item,index) in columnChooseCSItemList" :key="index"
|
|
:sortable="item.columnSortable"
|
|
:prop="item.columnProp"
|
|
:header-align="item.headerAlign"
|
|
:show-overflow-tooltip="item.showOverflowTooltip"
|
|
:align="item.align"
|
|
:fixed="item.fixed == ''?false:item.fixed"
|
|
:min-width="item.columnWidth"
|
|
:label="item.columnLabel">
|
|
<template slot-scope="scope">
|
|
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop=""
|
|
header-align="center"
|
|
align="center"
|
|
min-width="200"
|
|
label="备注">
|
|
<template slot-scope="scope">
|
|
<el-input v-model="scope.row.itemRemark" style="height: 11px;width:98%"></el-input>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
</div>
|
|
</el-tab-pane>
|
|
</el-tabs>
|
|
<el-footer style="height:35px;margin-top: 15px;text-align:center">
|
|
<el-button type="primary" :loading="saveDataLoading" @click="saveData(1)">应用</el-button>
|
|
<el-button type="primary" :loading="saveDataLoading" @click="closeModalFlag">关闭</el-button>
|
|
<el-button type="primary" :loading="saveDataLoading" @click="saveData(2)">保存并跳转</el-button>
|
|
</el-footer>
|
|
</el-dialog>
|
|
|
|
<!-- ECN种类模态框 -->
|
|
<el-dialog title="ECN种类" :close-on-click-modal="false" v-drag :visible.sync="EcnTypeModalFlag" width="900px">
|
|
<el-form ref="dataForm" label-position="right">
|
|
<el-row v-for="(item, index) in form" :key="index" style="padding-top: 10px;" :style="{borderTop:index === 0?'':'1px solid #ccc'}">
|
|
<el-col :span="8">
|
|
<el-form-item :prop="'input.'+index+'.value'">
|
|
<el-checkbox v-model="item.flag" @change="(val)=>ecnTypeHeaderChange(val,index)" :indeterminate="item.list.filter(a => a.flag === 'Y').length !== 0 && item.list.filter(a => a.flag === 'Y').length !== item.list.length" true-label="Y">{{item.value}}</el-checkbox>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="16">
|
|
<div v-for="i in item.list">
|
|
<el-form-item :prop="'input.'+index+'.value'">
|
|
<el-checkbox v-model="i.flag" @change="(val)=>ecnTypeDetailChange(val,index)" true-label="Y">{{i.value}}</el-checkbox>
|
|
</el-form-item>
|
|
</div>
|
|
</el-col>
|
|
</el-row>
|
|
</el-form>
|
|
<el-footer style="height:30px;text-align:center">
|
|
<el-button type="primary" @click="saveEcnTypeData">保存</el-button>
|
|
<el-button type="primary" @click="EcnTypeModalFlag = false">关闭</el-button>
|
|
</el-footer>
|
|
</el-dialog>
|
|
|
|
<!-- ECN模板属性清单 -->
|
|
<el-dialog title="属性清单" :close-on-click-modal="false" v-drag :visible.sync="chooseModelFlag" width="820px">
|
|
<div class="rq">
|
|
<el-form :inline="true" label-position="top" :model="chooseModelData">
|
|
<el-form-item :label="'模板'">
|
|
<el-select v-model="chooseModelData.codeNo" placeholder="请选择" style="width: 120px">
|
|
<el-option
|
|
v-for = "i in modelList"
|
|
:key = "i.codeNo"
|
|
:label = "i.codeDesc"
|
|
:value = "i.codeNo">
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item label="属性编码">
|
|
<el-input v-model="chooseModelData.itemNo" clearable style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="属性名称">
|
|
<el-input v-model="chooseModelData.itemDesc" clearable style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="' '">
|
|
<el-button type="primary" @click="searchItemList()">查询</el-button>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-table
|
|
:height="300"
|
|
:data="itemList"
|
|
ref="itemTable"
|
|
@row-click="itemClickRow"
|
|
@selection-change="selectionItem"
|
|
border
|
|
style="width: 100%;">
|
|
<el-table-column
|
|
type="selection"
|
|
header-align="center"
|
|
align="center"
|
|
width="50">
|
|
</el-table-column>
|
|
<el-table-column
|
|
v-for="(item,index) in columnItemList" :key="index"
|
|
:sortable="item.columnSortable"
|
|
:prop="item.columnProp"
|
|
:header-align="item.headerAlign"
|
|
:show-overflow-tooltip="item.showOverflowTooltip"
|
|
:align="item.align"
|
|
:fixed="item.fixed==''?false:item.fixed"
|
|
:min-width="item.columnWidth"
|
|
:label="item.columnLabel">
|
|
<template slot-scope="scope">
|
|
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
<el-footer style="height:40px;margin-top: 20px;text-align:center">
|
|
<el-button type="primary" @click="confirmItem">确认</el-button>
|
|
<el-button type="primary" @click="chooseModelFlag = false">关闭</el-button>
|
|
</el-footer>
|
|
</el-dialog>
|
|
|
|
<!-- ECN模板属性清单 -->
|
|
<el-dialog title="属性清单" :close-on-click-modal="false" v-drag :visible.sync="chooseModelFlag2" width="820px">
|
|
<div class="rq">
|
|
<el-form :inline="true" label-position="top" :model="chooseModelData2">
|
|
<el-form-item :label="'模板'">
|
|
<el-select v-model="chooseModelData2.codeNo" placeholder="请选择" style="width: 120px">
|
|
<el-option
|
|
v-for = "i in modelList2"
|
|
:key = "i.codeNo"
|
|
:label = "i.codeDesc"
|
|
:value = "i.codeNo">
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item label="属性编码">
|
|
<el-input v-model="chooseModelData2.itemNo" clearable style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="属性名称">
|
|
<el-input v-model="chooseModelData2.itemDesc" clearable style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="' '">
|
|
<el-button type="primary" @click="searchItemList2">查询</el-button>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-table
|
|
:height="300"
|
|
:data="itemList2"
|
|
ref="itemTable2"
|
|
@row-click="itemClickRow2"
|
|
@selection-change="selectionItem2"
|
|
border
|
|
style="width: 100%;">
|
|
<el-table-column
|
|
type="selection"
|
|
header-align="center"
|
|
align="center"
|
|
width="50">
|
|
</el-table-column>
|
|
<el-table-column
|
|
v-for="(item,index) in columnItemList2" :key="index"
|
|
:sortable="item.columnSortable"
|
|
:prop="item.columnProp"
|
|
:header-align="item.headerAlign"
|
|
:show-overflow-tooltip="item.showOverflowTooltip"
|
|
:align="item.align"
|
|
:fixed="item.fixed==''?false:item.fixed"
|
|
:min-width="item.columnWidth"
|
|
:label="item.columnLabel">
|
|
<template slot-scope="scope">
|
|
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
<el-footer style="height:40px;margin-top: 20px;text-align:center">
|
|
<el-button type="primary" @click="confirmItem2">确认</el-button>
|
|
<el-button type="primary" @click="chooseModelFlag2 = false">关闭</el-button>
|
|
</el-footer>
|
|
</el-dialog>
|
|
|
|
<!-- 会签模板属性清单 -->
|
|
<el-dialog title="属性清单" :close-on-click-modal="false" v-drag :visible.sync="chooseCSModelFlag" width="820px">
|
|
<div class="rq">
|
|
<el-form :inline="true" label-position="top" :model="chooseCSModelData">
|
|
<el-form-item :label="'模板'">
|
|
<el-select value="roleName" v-model="chooseCSModelData.codeNo" placeholder="请选择" style="width: 120px">
|
|
<el-option
|
|
v-for = "i in modelCSList"
|
|
:key = "i.codeNo"
|
|
:label = "i.codeDesc"
|
|
:value = "i.codeNo">
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item label="属性编码">
|
|
<el-input v-model="chooseCSModelData.itemNo" clearable style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="属性名称">
|
|
<el-input v-model="chooseCSModelData.itemDesc" clearable style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="' '">
|
|
<el-button type="primary" @click="searchCSItemList()">查询</el-button>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-table
|
|
:height="300"
|
|
:data="itemCSList"
|
|
ref="itemCSTable"
|
|
@row-click="itemCSClickRow"
|
|
@selection-change="selectionCSItem"
|
|
border
|
|
style="width: 100%;">
|
|
<el-table-column
|
|
type="selection"
|
|
header-align="center"
|
|
align="center"
|
|
width="50">
|
|
</el-table-column>
|
|
<el-table-column
|
|
v-for="(item,index) in columnCSItemList" :key="index"
|
|
:sortable="item.columnSortable"
|
|
:prop="item.columnProp"
|
|
:header-align="item.headerAlign"
|
|
:show-overflow-tooltip="item.showOverflowTooltip"
|
|
:align="item.align"
|
|
:fixed="item.fixed==''?false:item.fixed"
|
|
:min-width="item.columnWidth"
|
|
:label="item.columnLabel">
|
|
<template slot-scope="scope">
|
|
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
<el-footer style="height:40px;margin-top: 20px;text-align:center">
|
|
<el-button type="primary" @click="confirmCSItem">确认</el-button>
|
|
<el-button type="primary" @click="chooseCSModelFlag = false">关闭</el-button>
|
|
</el-footer>
|
|
</el-dialog>
|
|
|
|
<!-- 可选技术参数卡清单 -->
|
|
<el-dialog title="技术参数卡清单" :close-on-click-modal="false" v-drag :visible.sync="addDetailModal" width="881px">
|
|
<div class="rq">
|
|
<el-form :inline="true" label-position="top" :model="searchData2">
|
|
<el-form-item :label="'BU'">
|
|
<el-select v-model="searchData2.buNo" placeholder="请选择" clearable style="width: 70px">
|
|
<el-option
|
|
v-for = "i in buList"
|
|
:key = "i.buNo"
|
|
:label = "i.buNo"
|
|
:value = "i.buNo">
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item label="技术参数卡编码">
|
|
<el-input v-model="searchData2.codeNo" clearable style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="PLM物料编码">
|
|
<el-input v-model="searchData2.testPartNo" clearable style="width: 120px"/>
|
|
</el-form-item>
|
|
<el-form-item label="IFS物料编码">
|
|
<el-input v-model="searchData2.partNo" clearable style="width: 120px"/>
|
|
</el-form-item>
|
|
<el-form-item label="客户编码">
|
|
<el-input v-model="searchData2.customerId" clearable style="width: 120px"/>
|
|
</el-form-item>
|
|
<el-form-item label="项目号">
|
|
<el-input v-model="searchData2.projectId" clearable style="width: 120px"/>
|
|
</el-form-item>
|
|
<el-form-item :label="' '">
|
|
<el-button type="primary" @click="addChangeDetail()">查询</el-button>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-table
|
|
:height="300"
|
|
:data="dataList2"
|
|
@selection-change="selectionData2"
|
|
border
|
|
style="width: 100%;">
|
|
<el-table-column
|
|
type="selection"
|
|
header-align="center"
|
|
align="center"
|
|
width="50">
|
|
</el-table-column>
|
|
<el-table-column
|
|
v-for="(item,index) in columnList2" :key="index"
|
|
:sortable="item.columnSortable"
|
|
:prop="item.columnProp"
|
|
:header-align="item.headerAlign"
|
|
:show-overflow-tooltip="item.showOverflowTooltip"
|
|
:align="item.align"
|
|
:fixed="item.fixed==''?false:item.fixed"
|
|
:min-width="item.columnWidth"
|
|
:label="item.columnLabel">
|
|
<template slot-scope="scope">
|
|
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
<el-footer style="height:40px;margin-top: 20px;text-align:center">
|
|
<el-button type="primary" @click="addDetail">确认</el-button>
|
|
<el-button type="primary" @click="addDetailModal = false">关闭</el-button>
|
|
</el-footer>
|
|
</el-dialog>
|
|
|
|
<!-- 物料模态框 -->
|
|
<el-dialog title="物料清单" :close-on-click-modal="false" v-drag :visible.sync="partModelFlag" width="940px">
|
|
<div class="rq">
|
|
<el-form :inline="true" label-position="top" :model="partData">
|
|
<el-form-item :label="'IFS物料编码'">
|
|
<el-input v-model="partData.finalPartNo" clearable style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'PLM物料编码'">
|
|
<el-input v-model="partData.testPartNo" clearable style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'客户料号'">
|
|
<el-input v-model="partData.customerPartNo" clearable style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'物料名称'">
|
|
<el-input v-model="partData.partDesc" clearable style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="' '">
|
|
<el-button type="primary" @click="queryPartList()">查询</el-button>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-table
|
|
:height="300"
|
|
:data="partList"
|
|
@row-dblclick="getRowData"
|
|
border
|
|
style="width: 100%;">
|
|
<el-table-column
|
|
v-for="(item,index) in partColumnList" :key="index"
|
|
:sortable="item.columnSortable"
|
|
:prop="item.columnProp"
|
|
:header-align="item.headerAlign"
|
|
:show-overflow-tooltip="item.showOverflowTooltip"
|
|
:align="item.align"
|
|
:fixed="item.fixed==''?false:item.fixed"
|
|
:min-width="item.columnWidth"
|
|
:label="item.columnLabel">
|
|
<template slot-scope="scope">
|
|
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<!-- 分页插件 -->
|
|
<el-pagination
|
|
style="margin-top: 5px"
|
|
@size-change="sizeChangeHandle2"
|
|
@current-change="currentChangeHandle2"
|
|
:current-page="pageIndex2"
|
|
:page-sizes="[20, 50, 100, 200, 500]"
|
|
:page-size="pageSize2"
|
|
:total="totalPage2"
|
|
layout="total, sizes, prev, pager, next, jumper">
|
|
</el-pagination>
|
|
</div>
|
|
<el-footer style="height:35px;margin-top: 10px;text-align:center">
|
|
<el-button type="primary" @click="partModelFlag=false">关闭</el-button>
|
|
</el-footer>
|
|
</el-dialog>
|
|
|
|
<el-dialog title="人员选择" @open="openDelegateAccess" @close="closeDelegateAccess" v-drag :visible.sync="delegateAccessVisible" width="40vw">
|
|
<el-form :inline="true" label-position="top" :model="changeDelegateAccess">
|
|
<el-form-item label="编码">
|
|
<el-input v-model="changeDelegateAccess.delegateAccess" clearable style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="名称">
|
|
<el-input v-model="changeDelegateAccess.delegateAccessName" clearable style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label=" ">
|
|
<el-button type="primary" @click="searchDelegateAccessByUser()">查询</el-button>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-table
|
|
v-if="delegateAccessVisible"
|
|
:height="300"
|
|
:data="baseDelegateAccessList"
|
|
@selection-change="handleSelectionChange"
|
|
@row-click="(row,column, event)=>handleTableClick(row,column, event,'delegateAccesstTable')"
|
|
ref="delegateAccesstTable"
|
|
border row-key="delegateAccess"
|
|
style="width: 100%;">
|
|
<el-table-column
|
|
type="selection"
|
|
header-align="center"
|
|
align="center"
|
|
:reserve-selection="true"
|
|
width="50">
|
|
</el-table-column>
|
|
<el-table-column label="编码" property="delegateAccess" align="left" header-align="center"/>
|
|
<el-table-column label="名称" property="delegateAccessName" align="left" header-align="center"/>
|
|
</el-table>
|
|
<el-footer style="height:40px;margin-top: 20px;text-align:center">
|
|
<el-button type="primary" @click="confirmDelegateAccess">确定</el-button>
|
|
<el-button type="primary" @click="delegateAccessVisible=false">关闭</el-button>
|
|
</el-footer>
|
|
</el-dialog>
|
|
|
|
<ChooseList ref="baseList" @getBaseData="getBaseData"></ChooseList>
|
|
|
|
<upload-file-list ref="changeRef" v-if="modalFlag" folder="change" title="工程变更文件上传" :label="'变更单号'" :file-list.sync="fileData.file" :no="modalData.changeNo" :upload-dialog.sync="uploadDialog" path="/upload/test"></upload-file-list>
|
|
|
|
<filter-search :visible.sync="filterVisible" @search="queryByAnyField"></filter-search>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import {
|
|
technicalSpecificationSearch, // 获取技术参数卡列表
|
|
technicalSpecificationSearch2, // 获取技术参数卡列表
|
|
getDepartmentByUserName, // 根据用户编码获得用户部门
|
|
changeRequestSave, // 新增变更申请
|
|
changeRequestUpdate, // 新增变更申请
|
|
changeRequestTempSave, // 新增变更单(临时)
|
|
deleteChangeFiles, // 根据变更单号删除文件,
|
|
costImpactSave, // 新增库存成本影响
|
|
executionSave, // 新增执行信息
|
|
getEcnTypeData, // 查询ECN种类数据
|
|
getEcnModel, // 查询ECN的模板
|
|
getItemList, // 查询模板属性
|
|
countersignatureSave, // 新增会签信息
|
|
getBuBySite, // 根据site查bu
|
|
choosePartNoList, // 根据视图查物料计划
|
|
deleteTempChangeInfo, // 删除临时变更数据
|
|
updateShowInQueryFlag, // 更新异常数据
|
|
} from "@/api/changeManagement/changeManagement.js"
|
|
import {getChooselistData, verifyData} from "@/api/chooselist/chooselist.js"
|
|
import { searchDelegateAccessByUser} from "@/api/proofing/proofingInformation.js"
|
|
import ChooseList from '@/views/modules/common/Chooselist'
|
|
import DictDataSelect from '../sys/dict-data-select.vue'
|
|
import UploadFileList from "../common/uploadFileList.vue"
|
|
import FilterSearch from "../../common/filterSearch.vue";
|
|
import {routingAllInfoSearchAny} from "../../../api/part/routingManagement";
|
|
import {technicalSpecificationSearchAny} from "../../../api/changeManagement/changeManagement";
|
|
export default {
|
|
components: {
|
|
FilterSearch,
|
|
UploadFileList,
|
|
DictDataSelect,
|
|
ChooseList
|
|
},
|
|
watch: {
|
|
modalData: {
|
|
deep: true,
|
|
handler: function (newV, oldV) {
|
|
if (this.modalData.tpEngineerId === '' || this.modalData.tpEngineerId == null) {
|
|
this.modalData.tpEngineerName = ''
|
|
}
|
|
if (this.modalData.industrialEngineerId === '' || this.modalData.industrialEngineerId == null) {
|
|
this.modalData.industrialEngineerName = ''
|
|
}
|
|
if (this.modalData.cqcOperatorId === '' || this.modalData.cqcOperatorId == null) {
|
|
this.modalData.cqcOperatorName = ''
|
|
}
|
|
if (this.modalData.faiOperatorId === '' || this.modalData.faiOperatorId == null) {
|
|
this.modalData.faiOperatorName = ''
|
|
}
|
|
}
|
|
},
|
|
|
|
'costImpactData.productionProductFlag': function(newVal) {
|
|
if (newVal !== 'Y') {
|
|
this.costImpactData.productionProductNumber = ''
|
|
this.costImpactData.productionProductOpinions = ''
|
|
this.costImpactData.productionProductScrapAmount = 0
|
|
this.costImpactData.productionProductExecutor = ''
|
|
this.costImpactData.productionProductExecutorName = ''
|
|
}
|
|
},
|
|
'costImpactData.inventoryProductFlag': function(newVal) {
|
|
if (newVal !== 'Y') {
|
|
this.costImpactData.inventoryProductNumber = ''
|
|
this.costImpactData.inventoryProductOpinions = ''
|
|
this.costImpactData.inventoryProductScrapAmount = 0
|
|
this.costImpactData.inventoryProductExecutor = ''
|
|
this.costImpactData.inventoryProductExecutorName = ''
|
|
}
|
|
},
|
|
'costImpactData.newOrderFlag': function(newVal) {
|
|
if (newVal !== 'Y') {
|
|
this.costImpactData.newOrderNumber = ''
|
|
}
|
|
},
|
|
'costImpactData.affectedFlag': function(newVal) {
|
|
if (newVal !== 'Y') {
|
|
this.costImpactData.affectedNumber = ''
|
|
this.costImpactData.affectedOpinions = ''
|
|
this.costImpactData.affectedScrapAmount = 0
|
|
this.costImpactData.affectedExecutor = ''
|
|
this.costImpactData.affectedExecutorName = ''
|
|
}
|
|
},
|
|
},
|
|
data() {
|
|
return {
|
|
uploadDialog: false,
|
|
form: [],
|
|
buList: [],
|
|
// DelegateAccess 相关
|
|
selectionDelegateAccess: [],
|
|
selectionDelegateAccess2: [],
|
|
delegateAccessVisible: false,
|
|
baseDelegateAccessList: [],
|
|
changeDelegateAccess: {
|
|
delegateAccess: '',
|
|
delegateAccessName: '',
|
|
},
|
|
// 导出
|
|
exportData: [],
|
|
exportName: '工程变更申请' + this.dayjs().format('YYYYMMDDHHmmss'),
|
|
exportHeader: ['工程变更申请'],
|
|
exportFooter: [],
|
|
resultList: [],
|
|
// ======== 行高 ========
|
|
height: 200,
|
|
// ======== 分页 ========
|
|
pageIndex: 1,
|
|
pageSize: 50,
|
|
totalPage: 0,
|
|
pageIndex2: 1,
|
|
pageSize2: 20,
|
|
totalPage2: 0,
|
|
activeName: 'basicInformation',
|
|
tempPartRow: {},
|
|
tempExecutorRow: {},
|
|
changeTitle: '',
|
|
// 条件查询
|
|
searchData: {
|
|
site: this.$store.state.user.site,
|
|
partNo: '',
|
|
testPartNo: '',
|
|
partDesc: '',
|
|
customerId: '',
|
|
customerDesc: '',
|
|
projectId: '',
|
|
projectDesc: '',
|
|
codeNo: '',
|
|
oriCodeNo: '',
|
|
status: '',
|
|
buNo: '',
|
|
page: 1,
|
|
limit: 10
|
|
},
|
|
searchData2: {
|
|
site: this.$store.state.user.site,
|
|
partNo: '',
|
|
testPartNo: '',
|
|
partDesc: '',
|
|
customerId: '',
|
|
customerDesc: '',
|
|
projectId: '',
|
|
projectDesc: '',
|
|
codeNo: '',
|
|
buNo: '',
|
|
},
|
|
// ======== 数据对象 ========
|
|
modalData: {
|
|
site: this.$store.state.user.site,
|
|
changeNo: '',
|
|
applicantId: '',
|
|
applicantName: '',
|
|
applicationDepartmentId: '',
|
|
applicationDepartmentName: '',
|
|
applyDate: '',
|
|
changeImpact: '',
|
|
changeImpactDesc: '',
|
|
ecnStage: '',
|
|
changeType: '',
|
|
tpEngineerId: '',
|
|
tpEngineerName: '',
|
|
changePhaseInDate: '',
|
|
dfIsProduct: '',
|
|
printing: '',
|
|
manufacturingCostIsChange: '',
|
|
changeRequestDesc: '',
|
|
isReQuote: '',
|
|
ulCertificationRequirements: '',
|
|
ulContinueToMeetDemand: '',
|
|
gpCertificationRequirements: '',
|
|
gpContinueToMeetDemand: '',
|
|
createBy: '',
|
|
detailList: [],
|
|
ecnTypeData: [],
|
|
industrialEngineerId: '',
|
|
industrialEngineerName: '',
|
|
changeStatus: '',
|
|
ecnType: '',
|
|
cqcOperatorId: '',
|
|
cqcOperatorName: '',
|
|
faiOperatorId: '',
|
|
faiOperatorName: '',
|
|
showInQueryFlag: ''
|
|
},
|
|
costImpactData: {
|
|
site: this.$store.state.user.site,
|
|
changeNo: '',
|
|
productionProductFlag: '',
|
|
inventoryProductFlag: '',
|
|
newOrderFlag: '',
|
|
affectedFlag: '',
|
|
productionProductNumber: '',
|
|
productionProductOpinions: '',
|
|
productionProductScrapAmount: 0,
|
|
productionProductRemark: '',
|
|
productionProductExecutor: '',
|
|
productionProductExecutorName: '',
|
|
inventoryProductNumber: '',
|
|
inventoryProductOpinions: '',
|
|
inventoryProductScrapAmount: 0,
|
|
inventoryProductRemark: '',
|
|
inventoryProductExecutor: '',
|
|
inventoryProductExecutorName: '',
|
|
newOrderNumber: '',
|
|
affectedNumber: '',
|
|
affectedOpinions: '',
|
|
affectedScrapAmount: 0,
|
|
affectedRemark: '',
|
|
affectedExecutor: '',
|
|
affectedExecutorName: '',
|
|
changeTotalCost: '',
|
|
remark: '',
|
|
createBy: '',
|
|
updateBy: ''
|
|
},
|
|
executionInfoData: {
|
|
site: this.$store.state.user.site,
|
|
changeNo: '',
|
|
originalFilmNo: '',
|
|
newFilmNo: '',
|
|
originalDieCuttingRuleNo: '',
|
|
newDieCuttingRuleNo: '',
|
|
originalStencilNo: '',
|
|
newStencilNo: '',
|
|
executionDate: '',
|
|
createBy: '',
|
|
updateBy: '',
|
|
chooseItemList: [],
|
|
chooseItemList2: [],
|
|
},
|
|
countersignatureData: {
|
|
site: this.$store.state.user.site,
|
|
changeNo: '',
|
|
createBy: '',
|
|
updateBy: '',
|
|
chooseCSItemList: []
|
|
},
|
|
chooseModelData: {
|
|
site: this.$store.state.user.site,
|
|
functionType: 'ECN',
|
|
itemNo: '',
|
|
itemDesc: '',
|
|
codeNo: ''
|
|
},
|
|
chooseModelData2: {
|
|
site: this.$store.state.user.site,
|
|
functionType: 'ECN',
|
|
itemNo: '',
|
|
itemDesc: '',
|
|
codeNo: ''
|
|
},
|
|
chooseCSModelData: {
|
|
site: this.$store.state.user.site,
|
|
functionType: 'ECN',
|
|
itemNo: '',
|
|
itemDesc: '',
|
|
codeNo: ''
|
|
},
|
|
fileData: {
|
|
file: [],
|
|
orderRef1: '',
|
|
orderRef2: '',
|
|
fileRemark: '',
|
|
folder: ''
|
|
},
|
|
partData: {
|
|
site: '',
|
|
buNo: '',
|
|
finalPartNo: '',
|
|
testPartNo: '',
|
|
customerPartNo: '',
|
|
partDesc: '',
|
|
page: 1,
|
|
limit: 10
|
|
},
|
|
// ======== 数据列表 ========
|
|
dataList: [],
|
|
dataList2: [],
|
|
chooseDataList: [],
|
|
fileList: [],
|
|
modelList: [],
|
|
modelList2: [],
|
|
modelCSList: [],
|
|
itemList: [],
|
|
itemList2: [],
|
|
itemCSList: [],
|
|
chooseItemList: [],
|
|
chooseItemList2: [],
|
|
chooseCSItemList: [],
|
|
partList: [],
|
|
// ======== 列表表头 ========
|
|
columnList: [
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 108001,
|
|
serialNumber: '108001Table1BuNo',
|
|
tableId: '108001Table1',
|
|
tableName: '技术参数卡',
|
|
columnProp: 'buNo',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: 'BU',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 80
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 108001,
|
|
serialNumber: '108001Table1TestPartNo',
|
|
tableId: '108001Table1',
|
|
tableName: '技术参数卡',
|
|
columnProp: 'testPartNo',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: 'PLM物料编码',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 108001,
|
|
serialNumber: '108001Table1PartNo',
|
|
tableId: '108001Table1',
|
|
tableName: '技术参数卡',
|
|
columnProp: 'partNo',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: 'IFS物料编码',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 108001,
|
|
serialNumber: '108001Table1PartDesc',
|
|
tableId: '108001Table1',
|
|
tableName: '技术参数卡',
|
|
columnProp: 'partDesc',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '物料名称',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 180
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 108001,
|
|
serialNumber: '108001Table1ProjectId',
|
|
tableId: '108001Table1',
|
|
tableName: '技术参数卡',
|
|
columnProp: 'projectId',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '项目号',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 108001,
|
|
serialNumber: '108001Table1ProjectDesc',
|
|
tableId: '108001Table1',
|
|
tableName: '技术参数卡',
|
|
columnProp: 'projectDesc',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '项目名称',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 180
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 108001,
|
|
serialNumber: '108001Table1CustomerId',
|
|
tableId: '108001Table1',
|
|
tableName: '技术参数卡',
|
|
columnProp: 'customerId',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '客户编码',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 108001,
|
|
serialNumber: '108001Table1CustomerDesc',
|
|
tableId: '108001Table1',
|
|
tableName: '技术参数卡',
|
|
columnProp: 'customerDesc',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '客户名称',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 180
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 108001,
|
|
serialNumber: '108001Table1CodeNo',
|
|
tableId: '108001Table1',
|
|
tableName: '技术参数卡',
|
|
columnProp: 'oriCodeNo',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '技术参数卡',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 108001,
|
|
serialNumber: '108001Table1CodeNo',
|
|
tableId: '108001Table1',
|
|
tableName: '技术参数卡',
|
|
columnProp: 'ecnFlag',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '状态',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 100
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 108001,
|
|
serialNumber: '108001Table1RevNo',
|
|
tableId: '108001Table1',
|
|
tableName: '技术参数卡',
|
|
columnProp: 'revNo',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '版本号',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 80
|
|
},
|
|
],
|
|
columnList2: [
|
|
{
|
|
columnProp: 'buNo',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: 'BU',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 70
|
|
},
|
|
{
|
|
columnProp: 'testPartNo',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: 'PLM物料编码',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},
|
|
{
|
|
columnProp: 'partNo',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: 'IFS物料编码',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},
|
|
{
|
|
columnProp: 'partDesc',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '物料名称',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 200
|
|
},
|
|
{
|
|
columnProp: 'projectId',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '项目号',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},
|
|
{
|
|
columnProp: 'projectDesc',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '项目名称',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 180
|
|
},
|
|
{
|
|
columnProp: 'customerId',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '客户编码',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},
|
|
{
|
|
columnProp: 'customerDesc',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '客户名称',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 180
|
|
},
|
|
{
|
|
columnProp: 'codeNo',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '技术参数卡',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},
|
|
{
|
|
columnProp: 'ecnFlag',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '状态',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 100
|
|
},
|
|
{
|
|
columnProp: 'revNo',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '版本号',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 80
|
|
},
|
|
],
|
|
columnChooseDataList: [
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 108001,
|
|
serialNumber: '108001Table2TestPartNo',
|
|
tableId: '108001Table2',
|
|
tableName: '所选变更列表',
|
|
columnProp: 'testPartNo',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: 'PLM物料编码',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 108001,
|
|
serialNumber: '108001Table2PartNo',
|
|
tableId: '108001Table2',
|
|
tableName: '所选变更列表',
|
|
columnProp: 'partNo',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: 'IFS物料编码',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 108001,
|
|
serialNumber: '108001Table2PartDesc',
|
|
tableId: '108001Table2',
|
|
tableName: '所选变更列表',
|
|
columnProp: 'partDesc',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '物料名称',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 180
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 108001,
|
|
serialNumber: '108001Table2DrawingNo',
|
|
tableId: '108001Table2',
|
|
tableName: '所选变更列表',
|
|
columnProp: 'drawingNo',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '图纸编码',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 90
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 108001,
|
|
serialNumber: '108001Table2DraftNo',
|
|
tableId: '108001Table2',
|
|
tableName: '所选变更列表',
|
|
columnProp: 'draftNo',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '图稿编码',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 90
|
|
},
|
|
],
|
|
columnChooseItemList: [
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 108001,
|
|
serialNumber: '108001Table3ItemNo',
|
|
tableId: '108001Table3',
|
|
tableName: '执行属性表',
|
|
columnProp: 'itemNo',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '属性编码',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 80
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 108001,
|
|
serialNumber: '108001Table3ItemDesc',
|
|
tableId: '108001Table3',
|
|
tableName: '执行属性表',
|
|
columnProp: 'itemDesc',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '属性名称',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 150
|
|
},
|
|
// {
|
|
// userId: this.$store.state.user.name,
|
|
// functionId: 108001,
|
|
// serialNumber: '108001Table3ExecuteFlag',
|
|
// tableId: '108001Table3',
|
|
// tableName: '执行属性表',
|
|
// columnProp: 'executeFlag',
|
|
// headerAlign: 'center',
|
|
// align: 'center',
|
|
// columnLabel: '是否执行',
|
|
// columnHidden: false,
|
|
// columnImage: false,
|
|
// status: true,
|
|
// fixed: '',
|
|
// columnWidth: 80
|
|
// },
|
|
// {
|
|
// userId: this.$store.state.user.name,
|
|
// functionId: 108001,
|
|
// serialNumber: '108001Table3Executor',
|
|
// tableId: '108001Table3',
|
|
// tableName: '执行属性表',
|
|
// columnProp: 'executor',
|
|
// headerAlign: 'center',
|
|
// align: 'center',
|
|
// columnLabel: '执行人',
|
|
// columnHidden: false,
|
|
// columnImage: false,
|
|
// status: true,
|
|
// fixed: '',
|
|
// columnWidth: 100
|
|
// },
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 108001,
|
|
serialNumber: '108001Table3ExecuteDate',
|
|
tableId: '108001Table3',
|
|
tableName: '执行属性表',
|
|
columnProp: 'itemExecutionDate',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '执行时间',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 130
|
|
}
|
|
],
|
|
columnChooseItemList2: [
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 108001,
|
|
serialNumber: '108001Table7ItemNo',
|
|
tableId: '108001Table7',
|
|
tableName: '可行性评估属性表',
|
|
columnProp: 'itemNo',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '属性编码',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 80
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 108001,
|
|
serialNumber: '108001Table7ItemDesc',
|
|
tableId: '108001Table7',
|
|
tableName: '可行性评估属性表',
|
|
columnProp: 'itemDesc',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '属性名称',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 150
|
|
},
|
|
// {
|
|
// userId: this.$store.state.user.name,
|
|
// functionId: 108001,
|
|
// serialNumber: '108001Table7ExecuteFlag',
|
|
// tableId: '108001Table7',
|
|
// tableName: '可行性评估属性表',
|
|
// columnProp: 'executeFlag',
|
|
// headerAlign: 'center',
|
|
// align: 'center',
|
|
// columnLabel: '是否执行',
|
|
// columnHidden: false,
|
|
// columnImage: false,
|
|
// status: true,
|
|
// fixed: '',
|
|
// columnWidth: 80
|
|
// },
|
|
// {
|
|
// userId: this.$store.state.user.name,
|
|
// functionId: 108001,
|
|
// serialNumber: '108001Table7Executor',
|
|
// tableId: '108001Table7',
|
|
// tableName: '可行性评估属性表',
|
|
// columnProp: 'executor',
|
|
// headerAlign: 'center',
|
|
// align: 'center',
|
|
// columnLabel: '执行人',
|
|
// columnHidden: false,
|
|
// columnImage: false,
|
|
// status: true,
|
|
// fixed: '',
|
|
// columnWidth: 100
|
|
// },{
|
|
// userId: this.$store.state.user.name,
|
|
// functionId: 108001,
|
|
// serialNumber: '108001Table7ExecuteDate',
|
|
// tableId: '108001Table7',
|
|
// tableName: '可行性评估属性表',
|
|
// columnProp: 'itemExecutionDate',
|
|
// headerAlign: 'center',
|
|
// align: 'center',
|
|
// columnLabel: '执行时间',
|
|
// columnHidden: false,
|
|
// columnImage: false,
|
|
// status: true,
|
|
// fixed: '',
|
|
// columnWidth: 150
|
|
// },
|
|
|
|
],
|
|
columnChooseCSItemList: [
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 108001,
|
|
serialNumber: '108001Table6ItemNo',
|
|
tableId: '108001Table6',
|
|
tableName: '执行属性表',
|
|
columnProp: 'itemNo',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '属性编码',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 100
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 108001,
|
|
serialNumber: '108001Table6ItemDesc',
|
|
tableId: '108001Table6',
|
|
tableName: '执行属性表',
|
|
columnProp: 'itemDesc',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '属性名称',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 200
|
|
},
|
|
// {
|
|
// userId: this.$store.state.user.name,
|
|
// functionId: 108001,
|
|
// serialNumber: '108001Table6ExecuteFlag',
|
|
// tableId: '108001Table6',
|
|
// tableName: '执行属性表',
|
|
// columnProp: 'executeFlag',
|
|
// headerAlign: 'center',
|
|
// align: 'center',
|
|
// columnLabel: '是否执行',
|
|
// columnHidden: false,
|
|
// columnImage: false,
|
|
// status: true,
|
|
// fixed: '',
|
|
// columnWidth: 80
|
|
// },
|
|
// {
|
|
// userId: this.$store.state.user.name,
|
|
// functionId: 108001,
|
|
// serialNumber: '108001Table6Executor',
|
|
// tableId: '108001Table6',
|
|
// tableName: '执行属性表',
|
|
// columnProp: 'executor',
|
|
// headerAlign: 'center',
|
|
// align: 'center',
|
|
// columnLabel: '执行人',
|
|
// columnHidden: false,
|
|
// columnImage: false,
|
|
// status: true,
|
|
// fixed: '',
|
|
// columnWidth: 100
|
|
// },{
|
|
// userId: this.$store.state.user.name,
|
|
// functionId: 108001,
|
|
// serialNumber: '108001Table6ExecuteDate',
|
|
// tableId: '108001Table6',
|
|
// tableName: '执行属性表',
|
|
// columnProp: 'itemExecutionDate',
|
|
// headerAlign: 'center',
|
|
// align: 'center',
|
|
// columnLabel: '执行时间',
|
|
// columnHidden: false,
|
|
// columnImage: false,
|
|
// status: true,
|
|
// fixed: '',
|
|
// columnWidth: 150
|
|
// },
|
|
|
|
],
|
|
columnItemList: [
|
|
{
|
|
columnProp: 'itemNo',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '属性编码',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 80
|
|
},
|
|
{
|
|
columnProp: 'itemDesc',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '属性名称',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 150
|
|
},
|
|
],
|
|
columnItemList2: [
|
|
{
|
|
columnProp: 'itemNo',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '属性编码',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 80
|
|
},
|
|
{
|
|
columnProp: 'itemDesc',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '属性名称',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 150
|
|
},
|
|
],
|
|
columnCSItemList: [
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 108001,
|
|
serialNumber: '108001Table5ItemNo',
|
|
tableId: '108001Table5',
|
|
tableName: '执行属性表',
|
|
columnProp: 'itemNo',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '属性编码',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 80
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 108001,
|
|
serialNumber: '108001Table5ItemDesc',
|
|
tableId: '108001Table5',
|
|
tableName: '执行属性表',
|
|
columnProp: 'itemDesc',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '属性名称',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 150
|
|
},
|
|
],
|
|
partColumnList: [
|
|
{
|
|
columnProp: 'testPartNo',
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: 'PLM物料编码',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},
|
|
{
|
|
columnProp: 'finalPartNo',
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: 'IFS物料编码',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},
|
|
{
|
|
columnProp: 'customerPartNo',
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: '客户料号',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},
|
|
{
|
|
columnProp: 'partDesc',
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: '物料名称',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 200
|
|
},
|
|
],
|
|
// ======== 必填规则 ========
|
|
rules: {
|
|
applicantId: [
|
|
{
|
|
required: true,
|
|
message: ' ',
|
|
trigger: ['blur','change']
|
|
}
|
|
],
|
|
applyDate: [
|
|
{
|
|
required: true,
|
|
message: ' ',
|
|
trigger: ['blur','change']
|
|
}
|
|
],
|
|
changeImpact: [
|
|
{
|
|
required: true,
|
|
message: ' ',
|
|
trigger: ['blur','change']
|
|
}
|
|
],
|
|
ecnStage: [
|
|
{
|
|
required: true,
|
|
message: ' ',
|
|
trigger: ['blur','change']
|
|
}
|
|
],
|
|
changeType: [
|
|
{
|
|
required: true,
|
|
message: ' ',
|
|
trigger: ['blur','change']
|
|
}
|
|
],
|
|
tpEngineerId: [
|
|
{
|
|
required: true,
|
|
message: ' ',
|
|
trigger: ['blur','change']
|
|
}
|
|
],
|
|
changePhaseInDate: [
|
|
{
|
|
required: true,
|
|
message: ' ',
|
|
trigger: ['blur','change']
|
|
}
|
|
],
|
|
dfIsProduct: [
|
|
{
|
|
required: true,
|
|
message: ' ',
|
|
trigger: ['blur','change']
|
|
}
|
|
],
|
|
printing: [
|
|
{
|
|
required: true,
|
|
message: ' ',
|
|
trigger: ['blur','change']
|
|
}
|
|
],
|
|
manufacturingCostIsChange: [
|
|
{
|
|
required: true,
|
|
message: ' ',
|
|
trigger: ['blur','change']
|
|
}
|
|
],
|
|
changeRequestDesc: [
|
|
{
|
|
required: true,
|
|
message: ' ',
|
|
trigger: ['blur','change']
|
|
}
|
|
],
|
|
isReQuote: [
|
|
{
|
|
required: true,
|
|
message: ' ',
|
|
trigger: ['blur','change']
|
|
}
|
|
],
|
|
ulCertificationRequirements: [
|
|
{
|
|
required: true,
|
|
message: ' ',
|
|
trigger: ['blur','change']
|
|
}
|
|
],
|
|
ulContinueToMeetDemand: [
|
|
{
|
|
required: true,
|
|
message: ' ',
|
|
trigger: ['blur','change']
|
|
}
|
|
],
|
|
gpCertificationRequirements: [
|
|
{
|
|
required: true,
|
|
message: ' ',
|
|
trigger: ['blur','change']
|
|
}
|
|
],
|
|
gpContinueToMeetDemand: [
|
|
{
|
|
required: true,
|
|
message: ' ',
|
|
trigger: ['blur','change']
|
|
}
|
|
],
|
|
ecnType: [
|
|
{
|
|
required: true,
|
|
message: ' ',
|
|
trigger: ['blur','change']
|
|
}
|
|
],
|
|
},
|
|
// ======== 复选数据集 ========
|
|
dataSelections: [],
|
|
dataSelections2: [],
|
|
itemSelections: [],
|
|
itemSelections2: [],
|
|
itemCSSelections: [],
|
|
// ======== 模态框开关控制 ========
|
|
modalFlag: false,
|
|
modalDisableFlag: false,
|
|
EcnTypeModalFlag: false,
|
|
chooseModelFlag: false,
|
|
chooseModelFlag2: false,
|
|
chooseCSModelFlag: false,
|
|
addDetailModal: false,
|
|
partModelFlag: false,
|
|
saveDataLoading: false,
|
|
searchLoading: false,
|
|
updateAbnormalDataLoading: false,
|
|
filterVisible: false,
|
|
isFilterSearch: false,
|
|
filterSearchData: {},
|
|
}
|
|
},
|
|
|
|
created () {
|
|
this.getDataList()
|
|
this.getEcnModel()
|
|
this.getEcnModel2()
|
|
this.getEcnCSModel()
|
|
this.getBuBySite()
|
|
},
|
|
|
|
mounted() {
|
|
this.$nextTick(() => {
|
|
this.height = window.innerHeight - 211
|
|
})
|
|
},
|
|
computed:{
|
|
delegateAccessName: {
|
|
get() {
|
|
return this.selectionDelegateAccess.map(item => item.delegateAccessName).join(';')
|
|
},
|
|
set(val) {
|
|
}
|
|
},
|
|
totalCost: {
|
|
get () {
|
|
let total = 0
|
|
if (this.costImpactData.productionProductFlag === 'Y') {
|
|
total += +this.costImpactData.productionProductScrapAmount
|
|
}
|
|
if (this.costImpactData.inventoryProductFlag === 'Y') {
|
|
total += +this.costImpactData.inventoryProductScrapAmount
|
|
}
|
|
if (this.costImpactData.affectedFlag === 'Y') {
|
|
total += +this.costImpactData.affectedScrapAmount
|
|
}
|
|
return total
|
|
}
|
|
}
|
|
},
|
|
methods: {
|
|
|
|
// 获取用户的bu
|
|
getBuBySite () {
|
|
let tempData = {
|
|
site: this.$store.state.user.site,
|
|
}
|
|
getBuBySite(tempData).then(({data}) => {
|
|
if (data.code === 0) {
|
|
this.buList = data.rows
|
|
}
|
|
})
|
|
},
|
|
|
|
// ======= 正则校验 =======
|
|
handleInput (value, type) {
|
|
// 大于等于0,且只能输入16位小数
|
|
let val = value.replace(/^\D*([0-9]\d*\.?\d{0,16})?.*$/,'$1')
|
|
if (val === null || val === undefined || val === '') {
|
|
val = 0
|
|
}
|
|
if (type === 1) {
|
|
this.costImpactData.productionProductScrapAmount = val
|
|
} else if (type === 2) {
|
|
this.costImpactData.inventoryProductScrapAmount = val
|
|
} else if (type === 3) {
|
|
this.costImpactData.affectedScrapAmount = val
|
|
}
|
|
},
|
|
|
|
partInput (row, val) {
|
|
row.newPartNo = val.toUpperCase()
|
|
},
|
|
|
|
executorInput (row, val) {
|
|
//row.executor = val.toUpperCase()
|
|
},
|
|
|
|
choosePartNo (row) {
|
|
this.partData.site = row.site
|
|
this.partData.buNo = row.buNo
|
|
this.tempPartRow = row
|
|
this.queryPartList()
|
|
//this.getBaseList(133)
|
|
},
|
|
|
|
// 查询物料
|
|
queryPartList () {
|
|
this.partData.limit = this.pageSize2
|
|
this.partData.page = this.pageIndex2
|
|
choosePartNoList(this.partData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.partList = data.page.list
|
|
this.pageIndex2 = data.page.currPage
|
|
this.pageSize2 = data.page.pageSize
|
|
this.totalPage2 = data.page.totalCount
|
|
this.partModelFlag = true
|
|
} else {
|
|
this.partList = []
|
|
}
|
|
})
|
|
},
|
|
|
|
// 双击选中物料
|
|
getRowData (row) {
|
|
this.$set(this.tempPartRow,'newPartNo', row.testPartNo)
|
|
this.partModelFlag = false
|
|
},
|
|
|
|
// 每页数
|
|
sizeChangeHandle2 (val) {
|
|
this.pageSize2 = val
|
|
this.pageIndex2 = 1
|
|
this.queryPartList()
|
|
},
|
|
|
|
// 当前页
|
|
currentChangeHandle2 (val) {
|
|
this.pageIndex2 = val
|
|
this.queryPartList()
|
|
},
|
|
|
|
chooseExecutor (row) {
|
|
this.tempExecutorRow = row
|
|
this.getBaseList(2010)
|
|
},
|
|
|
|
ecnTypeHeaderChange (val,index) {
|
|
if (val === 'Y') {
|
|
for (let i = 0; i < this.form[index].list.length; i++) {
|
|
this.form[index].list[i].flag = 'Y'
|
|
}
|
|
} else {
|
|
for (let i = 0; i < this.form[index].list.length; i++) {
|
|
this.form[index].list[i].flag = 'N'
|
|
}
|
|
}
|
|
},
|
|
|
|
ecnTypeDetailChange (val,index) {
|
|
if (this.form[index].list.every(x => x.flag === 'Y')) {
|
|
this.form[index].flag = 'Y'
|
|
}else {
|
|
this.form[index].flag = 'N'
|
|
}
|
|
},
|
|
|
|
selectFlag (row) {
|
|
if (row.ecnFlag === '变更中') {
|
|
return false
|
|
} else {
|
|
return true
|
|
}
|
|
},
|
|
|
|
//每页数
|
|
sizeChangeHandle (val) {
|
|
this.pageSize = val
|
|
this.pageIndex = 1
|
|
if ( this.isFilterSearch === false){
|
|
this.getDataList()
|
|
} else {
|
|
this.queryByAnyField(this.filterSearchData)
|
|
}
|
|
},
|
|
|
|
// 当前页
|
|
currentChangeHandle (val) {
|
|
this.pageIndex = val
|
|
if ( this.isFilterSearch === false){
|
|
this.getDataList()
|
|
} else {
|
|
this.queryByAnyField(this.filterSearchData)
|
|
}
|
|
},
|
|
|
|
// 获取数据列表
|
|
getDataList () {
|
|
this.searchData.limit = this.pageSize
|
|
this.searchData.page = this.pageIndex
|
|
this.searchLoading = true
|
|
technicalSpecificationSearch(this.searchData).then(({data}) => {
|
|
if (data.code === 0) {
|
|
this.dataList = data.page.list
|
|
this.pageIndex = data.page.currPage
|
|
this.pageSize = data.page.pageSize
|
|
this.totalPage = data.page.totalCount
|
|
this.$refs.selectDiv.setLengthAll( this.dataList.length)
|
|
this.searchLoading = false
|
|
} else {
|
|
this.searchLoading = false
|
|
}
|
|
}).catch(()=>{
|
|
this.searchLoading = false
|
|
})
|
|
this.isFilterSearch = false
|
|
},
|
|
|
|
// 异常数据更新
|
|
handleUpdateAbnormalData() {
|
|
this.$confirm('此操作将更新异常数据, 是否继续?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
}).then(() => {
|
|
this.updateAbnormalDataLoading = true
|
|
const params = {
|
|
site: this.$store.state.user.site
|
|
}
|
|
updateShowInQueryFlag(params).then(({data}) => {
|
|
this.updateAbnormalDataLoading = false
|
|
if (data && data.code === 0) {
|
|
this.$message.success('异常数据更新成功')
|
|
this.getDataList()
|
|
} else {
|
|
this.$message.error(data.msg || '更新失败')
|
|
}
|
|
}).catch((error) => {
|
|
this.updateAbnormalDataLoading = false
|
|
this.$message.error(error || '更新失败')
|
|
})
|
|
}).catch(() => {
|
|
this.$message.info('已取消操作')
|
|
})
|
|
},
|
|
|
|
// 复选物料信息
|
|
selectionData (val) {
|
|
this.dataSelections = val
|
|
this.$refs.selectDiv.setLengthselected(this.dataSelections.length)
|
|
},
|
|
|
|
// 复选物料信息
|
|
selectionData2 (val) {
|
|
this.dataSelections2 = val
|
|
},
|
|
|
|
// 页签切换
|
|
refreshCurrentTabTable () {
|
|
|
|
},
|
|
|
|
// 变更申请模态框
|
|
changeModel () {
|
|
if (this.dataSelections.length === 0) {
|
|
this.$message.warning('请选择要变更的技术参数卡!')
|
|
return
|
|
}
|
|
if (!this.dataSelections.every(item => item.buNo === this.dataSelections[0].buNo)) {
|
|
this.$message.warning('请选择相同BU的技术参数卡!')
|
|
return
|
|
}
|
|
// 获取申请单号
|
|
let tempData = {
|
|
site: this.$store.state.user.site,
|
|
buNo: this.dataSelections[0].buNo,
|
|
transType: 'change_no',
|
|
detailList: this.dataSelections
|
|
}
|
|
this.saveDataLoading = true
|
|
changeRequestTempSave(tempData).then(({data}) => {
|
|
if (data.code === 0) {
|
|
this.modalData = {
|
|
site: this.$store.state.user.site,
|
|
changeNo: data.rows.changeNo,
|
|
applicantId: this.$store.state.user.name,
|
|
applicantName: this.$store.state.user.userDisplay,
|
|
applicationDepartmentId: '',
|
|
applicationDepartmentName: '',
|
|
applyDate: new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, ''),
|
|
changeImpact: '',
|
|
changeImpactDesc: '',
|
|
ecnStage: '',
|
|
changeType: '',
|
|
tpEngineerId: '',
|
|
tpEngineerName: '',
|
|
changePhaseInDate: new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, ''),
|
|
dfIsProduct: '',
|
|
printing: '',
|
|
manufacturingCostIsChange: '',
|
|
changeRequestDesc: '',
|
|
isReQuote: '',
|
|
ulCertificationRequirements: '',
|
|
ulContinueToMeetDemand: '',
|
|
gpCertificationRequirements: '',
|
|
gpContinueToMeetDemand: '',
|
|
createBy: this.$store.state.user.name,
|
|
detailList: [],
|
|
ecnTypeData: [],
|
|
industrialEngineerId: '',
|
|
industrialEngineerName: '',
|
|
changeStatus: '草稿',
|
|
ecnType: '',
|
|
cqcOperatorId: '',
|
|
cqcOperatorName: '',
|
|
faiOperatorId: '',
|
|
faiOperatorName: ''
|
|
}
|
|
this.changeTitle = '变更申请-' + this.modalData.changeNo
|
|
this.costImpactData = {
|
|
site: this.$store.state.user.site,
|
|
changeNo: data.rows.changeNo,
|
|
productionProductFlag: '',
|
|
inventoryProductFlag: '',
|
|
newOrderFlag: '',
|
|
affectedFlag: '',
|
|
productionProductNumber: '',
|
|
productionProductOpinions: '',
|
|
productionProductScrapAmount: 0,
|
|
productionProductRemark: '',
|
|
productionProductExecutor: '',
|
|
productionProductExecutorName: '',
|
|
inventoryProductNumber: '',
|
|
inventoryProductOpinions: '',
|
|
inventoryProductScrapAmount: 0,
|
|
inventoryProductRemark: '',
|
|
inventoryProductExecutor: '',
|
|
inventoryProductExecutorName: '',
|
|
newOrderNumber: '',
|
|
affectedNumber: '',
|
|
affectedOpinions: '',
|
|
affectedScrapAmount: 0,
|
|
affectedRemark: '',
|
|
affectedExecutor: '',
|
|
affectedExecutorName: '',
|
|
changeTotalCost: '',
|
|
remark: '',
|
|
createBy: this.$store.state.user.name,
|
|
}
|
|
this.executionInfoData = {
|
|
site: this.$store.state.user.site,
|
|
changeNo: data.rows.changeNo,
|
|
originalFilmNo: '',
|
|
newFilmNo: '',
|
|
originalDieCuttingRuleNo: '',
|
|
newDieCuttingRuleNo: '',
|
|
originalStencilNo: '',
|
|
newStencilNo: '',
|
|
executionDate: new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, ''),
|
|
createBy: this.$store.state.user.name,
|
|
chooseItemList: [],
|
|
chooseItemList2: []
|
|
}
|
|
this.countersignatureData = {
|
|
site: this.$store.state.user.site,
|
|
changeNo: data.rows.changeNo,
|
|
createBy: this.$store.state.user.name,
|
|
chooseCSItemList: []
|
|
}
|
|
this.chooseItemList = []
|
|
this.chooseItemList2 = []
|
|
this.chooseCSItemList = []
|
|
// 清空 DelegateAccess 的选择(delegateAccessName 是计算属性会自动清空)
|
|
this.selectionDelegateAccess = []
|
|
this.selectionDelegateAccess2 = []
|
|
this.baseDelegateAccessList = []
|
|
this.changeDelegateAccess = {
|
|
delegateAccess: '',
|
|
delegateAccessName: '',
|
|
}
|
|
this.getDepartmentByUserName()
|
|
this.getEcnTypeData() // 获取ECN种类
|
|
this.chooseDataList = data.rows.chooseDataList
|
|
this.activeName = 'basicInformation'
|
|
this.modalFlag = true
|
|
this.modalDisableFlag = false
|
|
} else {
|
|
this.$alert(data.msg, '错误', {
|
|
confirmButtonText: '确定'
|
|
})
|
|
}
|
|
this.saveDataLoading = false
|
|
}).catch(()=>{
|
|
this.saveDataLoading = false
|
|
})
|
|
},
|
|
|
|
// 删除变更申请模态框
|
|
closeModalFlag () {
|
|
// 删除临时变更单数据
|
|
this.saveDataLoading = true
|
|
deleteTempChangeInfo(this.modalData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.getDataList()
|
|
this.modalFlag = false
|
|
} else {
|
|
this.$alert(data.msg, '错误', {
|
|
confirmButtonText: '确定'
|
|
})
|
|
}
|
|
this.saveDataLoading = false
|
|
}).catch(()=>{
|
|
this.saveDataLoading = false
|
|
})
|
|
},
|
|
|
|
// 跳转变更申请
|
|
toMenu () {
|
|
if (this.$router.resolve(`/changeManagement-changeRecord`).resolved.name === '404') {
|
|
this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定'})
|
|
} else {
|
|
this.$router.push({name:`changeManagement-changeRecord`,params:{changeNo: this.modalData.changeNo}})
|
|
}
|
|
},
|
|
|
|
// 新增变更申请
|
|
saveData (type) {
|
|
// 基本信息校验
|
|
if (this.modalData.applicantId === '' || this.modalData.applicantId == null) {
|
|
this.$message.warning('请选择申请人员!')
|
|
return
|
|
}
|
|
if (this.modalData.applyDate === '' || this.modalData.applyDate == null) {
|
|
this.$message.warning('请选择申请日期!')
|
|
return
|
|
}
|
|
if (this.modalData.ecnStage === '' || this.modalData.ecnStage == null) {
|
|
this.$message.warning('请选择ECN阶段!')
|
|
return
|
|
}
|
|
if (this.modalData.changeType === '' || this.modalData.changeType == null) {
|
|
this.$message.warning('请选择变更类别!')
|
|
return
|
|
}
|
|
if (this.modalData.ecnType === '' || this.modalData.ecnType == null) {
|
|
this.$message.warning('请选择ECN种类!')
|
|
return
|
|
}
|
|
if (this.form.length === 0) {
|
|
this.$message.warning('请选择ECN种类!')
|
|
return
|
|
}
|
|
if (this.modalData.tpEngineerId === '' || this.modalData.tpEngineerId == null) {
|
|
this.$message.warning('请选择审批人员!')
|
|
return
|
|
}
|
|
if (this.modalData.changePhaseInDate === '' || this.modalData.changePhaseInDate == null) {
|
|
this.$message.warning('请选择变更生效日期!')
|
|
return
|
|
}
|
|
if (this.modalData.dfIsProduct === '' || this.modalData.dfIsProduct == null) {
|
|
this.$message.warning('请选择是否DF产品!')
|
|
return
|
|
}
|
|
if ((this.modalData.industrialEngineerId === '' || this.modalData.industrialEngineerId == null) && this.modalData.dfIsProduct === 'Y') {
|
|
this.$message.warning('请选择I/E!')
|
|
return
|
|
}
|
|
if (this.modalData.changeRequestDesc === '' || this.modalData.changeRequestDesc == null) {
|
|
this.$message.warning('请填写变更要求描述!')
|
|
return
|
|
}
|
|
if (this.modalData.printing === '' || this.modalData.printing == null) {
|
|
this.$message.warning('请选择印刷方式!')
|
|
return
|
|
}
|
|
if (this.chooseDataList.length === 0) {
|
|
this.$message.warning('请添加需要变更的技术参数卡!')
|
|
return
|
|
}
|
|
if (!this.chooseDataList.every(item => item.buNo === this.chooseDataList[0].buNo)) {
|
|
this.$message.warning('请选择相同BU的技术参数卡!')
|
|
return
|
|
}
|
|
// 库存成本影响校验
|
|
if (this.costImpactData.productionProductFlag === 'Y') { // 在生产品
|
|
if (this.costImpactData.productionProductNumber == null || this.costImpactData.productionProductNumber === '') {
|
|
this.$message.warning('请填写在生产品数量!')
|
|
return
|
|
}
|
|
if (this.costImpactData.productionProductOpinions == null || this.costImpactData.productionProductOpinions === '') {
|
|
this.$message.warning('请填写在生产品处理意见!')
|
|
return
|
|
}
|
|
if (this.costImpactData.productionProductExecutor == null || this.costImpactData.productionProductExecutor === '') {
|
|
this.$message.warning('请填写在生产品执行人!')
|
|
return
|
|
}
|
|
}
|
|
if (this.costImpactData.inventoryProductFlag === 'Y') { // 成品库存
|
|
if (this.costImpactData.inventoryProductNumber == null || this.costImpactData.inventoryProductNumber === '') {
|
|
this.$message.warning('请填写成品库存数量!')
|
|
return
|
|
}
|
|
if (this.costImpactData.inventoryProductOpinions == null || this.costImpactData.inventoryProductOpinions === '') {
|
|
this.$message.warning('请填写成品库存处理意见!')
|
|
return
|
|
}
|
|
if (this.costImpactData.inventoryProductExecutor == null || this.costImpactData.inventoryProductExecutor === '') {
|
|
this.$message.warning('请填写成品库存执行人!')
|
|
return
|
|
}
|
|
}
|
|
if (this.costImpactData.newOrderFlag === 'Y') { // 新订单
|
|
if (this.costImpactData.newOrderNumber == null || this.costImpactData.newOrderNumber === '') {
|
|
this.$message.warning('请填写新订单数量!')
|
|
return
|
|
}
|
|
}
|
|
if (this.costImpactData.affectedFlag === 'Y') { // 影响的原材料及其库存量
|
|
if (this.costImpactData.affectedNumber == null || this.costImpactData.affectedNumber === '') {
|
|
this.$message.warning('请填写影响的原材料及其库存量数量!')
|
|
return
|
|
}
|
|
if (this.costImpactData.affectedOpinions == null || this.costImpactData.affectedOpinions === '') {
|
|
this.$message.warning('请填写影响的原材料及其库存量处理意见!')
|
|
return
|
|
}
|
|
if (this.costImpactData.affectedExecutor == null || this.costImpactData.affectedExecutor === '') {
|
|
this.$message.warning('请填写影响的原材料及其库存量执行人!')
|
|
return
|
|
}
|
|
}
|
|
|
|
this.saveDataLoading = true
|
|
this.costImpactData.changeTotalCost = this.totalCost
|
|
this.executionInfoData.chooseItemList = this.chooseItemList
|
|
this.executionInfoData.chooseItemList2 = this.chooseItemList2
|
|
this.countersignatureData.chooseCSItemList = this.chooseCSItemList
|
|
|
|
this.modalData.showInQueryFlag = 'Y'
|
|
this.modalData.detailList = this.chooseDataList // 明细
|
|
this.modalData.ecnTypeData = this.form // ECN种类
|
|
this.modalData.costImpactData = this.costImpactData // 库存成本影响
|
|
this.modalData.executionInfoData = this.executionInfoData // TP执行信息
|
|
this.modalData.countersignatureData = this.countersignatureData // 会签信息
|
|
this.modalData.delegateAccessList = this.selectionDelegateAccess.map(item => item.delegateAccess) // DelegateAccess人员编码列表
|
|
changeRequestUpdate(this.modalData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.modalData = data.rows.modalData
|
|
this.changeTitle = '变更申请-' + this.modalData.changeNo
|
|
this.form = data.rows.form
|
|
this.chooseDataList = data.rows.chooseDataList
|
|
this.costImpactData = data.rows.costImpactData
|
|
this.executionInfoData = data.rows.executionInfoData
|
|
this.executionInfoData.createBy = this.$store.state.user.name
|
|
this.chooseItemList = data.rows.chooseItemList
|
|
this.chooseItemList2 = data.rows.chooseItemList2
|
|
this.chooseCSItemList = data.rows.chooseCSItemList
|
|
this.getDataList()
|
|
this.$message({
|
|
message: '操作成功',
|
|
type: 'success',
|
|
duration: 1500,
|
|
onClose: () => {}
|
|
})
|
|
if (type === 2) { // 保存并跳转
|
|
this.modalFlag = false
|
|
this.toMenu()
|
|
}
|
|
} else {
|
|
this.$alert(data.msg, '错误', {
|
|
confirmButtonText: '确定'
|
|
})
|
|
}
|
|
this.saveDataLoading = false
|
|
}).catch(()=>{
|
|
this.saveDataLoading = false
|
|
})
|
|
},
|
|
|
|
// 删除所选技术参数卡
|
|
deleteChooseDataModal (row) {
|
|
this.$confirm(`是否删除该技术参数卡的变更?`, '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
}).then(() => {
|
|
this.chooseDataList = this.chooseDataList.filter(a => {
|
|
return a.codeNo !== row.codeNo
|
|
})
|
|
})
|
|
},
|
|
|
|
// 根据人员编码查人员部门
|
|
getDepartmentByUserName () {
|
|
let tempData = {
|
|
site: this.$store.state.user.site,
|
|
username: this.modalData.applicantId
|
|
}
|
|
getDepartmentByUserName(tempData).then(({data}) => {
|
|
if (data.code === 0) {
|
|
this.modalData.applicationDepartmentId = data.rows[0].departmentNo
|
|
this.modalData.applicationDepartmentName = data.rows[0].departmentName
|
|
}
|
|
})
|
|
},
|
|
|
|
// 回车换行
|
|
focusNextInput (index, type) {
|
|
let aaa = ''
|
|
if (this.chooseDataList.length - 1 === index) {
|
|
aaa = `${type}0`
|
|
} else {
|
|
aaa = `${type}${index + 1}`
|
|
}
|
|
this.$nextTick(() => {
|
|
this.$refs[aaa].focus()
|
|
})
|
|
},
|
|
|
|
// 上传文件
|
|
uploadFileModal () {
|
|
this.uploadDialog = true
|
|
},
|
|
|
|
// 选择ECN种类模态框
|
|
chooseEcnTypeModal () {
|
|
this.EcnTypeModalFlag = true
|
|
},
|
|
|
|
// 查询ECN种类数据
|
|
getEcnTypeData () {
|
|
let tempData = {
|
|
site: this.$store.state.user.site
|
|
}
|
|
getEcnTypeData(tempData).then(({data}) => {
|
|
if (data.code === 0) {
|
|
this.form = data.rows
|
|
}
|
|
})
|
|
},
|
|
|
|
// 保存ECN种类
|
|
saveEcnTypeData () {
|
|
this.$message({
|
|
message: '操作成功',
|
|
type: 'success',
|
|
duration: 1500,
|
|
onClose: () => {}
|
|
})
|
|
this.EcnTypeModalFlag = false
|
|
},
|
|
|
|
// 选择模板属性
|
|
chooseModel () {
|
|
this.chooseModelData = {
|
|
site: this.$store.state.user.site,
|
|
itemNo: '',
|
|
itemDesc: '',
|
|
functionType: 'ECN',
|
|
codeNo: this.modelList.length > 0 ? this.modelList[0].codeNo : ''
|
|
}
|
|
// 先清空缓存选中
|
|
// this.$nextTick(() => this.$refs.itemTable.clearSelection())
|
|
getItemList(this.chooseModelData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.itemList = data.rows
|
|
this.itemList.forEach(val => {
|
|
// 回显选中
|
|
if (this.chooseItemList.map(val => val.itemNo).includes(val.itemNo)) {
|
|
this.$nextTick(() => this.$refs.itemTable.toggleRowSelection(val, true))
|
|
}
|
|
})
|
|
} else {
|
|
this.$alert(data.msg, '错误', {
|
|
confirmButtonText: '确定'
|
|
})
|
|
}
|
|
})
|
|
this.chooseModelFlag = true
|
|
},
|
|
|
|
// 选择模板属性
|
|
chooseFeasibilityAssessmentModel () {
|
|
this.chooseModelData2 = {
|
|
site: this.$store.state.user.site,
|
|
itemNo: '',
|
|
itemDesc: '',
|
|
functionType: 'ECN',
|
|
codeNo: this.modelList2.length > 0 ? this.modelList2[0].codeNo : ''
|
|
}
|
|
// 先清空缓存选中
|
|
//this.$nextTick(() => this.$refs.itemTable2.clearSelection())
|
|
getItemList(this.chooseModelData2).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.itemList2 = data.rows
|
|
this.itemList2.forEach(val => {
|
|
// 回显选中
|
|
if (this.chooseItemList2.map(val => val.itemNo).includes(val.itemNo)) {
|
|
this.$nextTick(() => this.$refs.itemTable2.toggleRowSelection(val, true))
|
|
}
|
|
})
|
|
} else {
|
|
this.$alert(data.msg, '错误', {
|
|
confirmButtonText: '确定'
|
|
})
|
|
}
|
|
})
|
|
this.chooseModelFlag2 = true
|
|
},
|
|
|
|
// 查询属性
|
|
searchItemList () {
|
|
getItemList(this.chooseModelData).then(({data}) => {
|
|
if (data.code === 0) {
|
|
this.itemList = data.rows
|
|
}
|
|
})
|
|
},
|
|
|
|
// 查询属性
|
|
searchItemList2 () {
|
|
getItemList(this.chooseModelData2).then(({data}) => {
|
|
if (data.code === 0) {
|
|
this.itemList2 = data.rows
|
|
}
|
|
})
|
|
},
|
|
|
|
// 单机选择
|
|
itemClickRow (row) {
|
|
this.$refs.itemTable.toggleRowSelection(row)
|
|
},
|
|
|
|
// 复选属性
|
|
selectionItem (val) {
|
|
this.itemSelections = val
|
|
},
|
|
|
|
// 单机选择
|
|
itemClickRow2 (row) {
|
|
this.$refs.itemTable2.toggleRowSelection(row)
|
|
},
|
|
|
|
// 复选属性
|
|
selectionItem2 (val) {
|
|
this.itemSelections2 = val
|
|
},
|
|
|
|
// 确认多选属性
|
|
confirmItem () {
|
|
if (this.itemSelections.length === 0) {
|
|
this.$message.warning("请勾选属性!")
|
|
return
|
|
}
|
|
// 临时集合
|
|
let temp = []
|
|
// 首先,遍历a,检查每个对象的名字是否在b中也存在
|
|
this.chooseItemList.forEach(itemA => {
|
|
if (this.itemSelections.some(itemB => itemB.itemNo === itemA.itemNo)) {
|
|
// 如果存在,则将a中的对象添加到结果中(这里直接用a的原对象,因为要求是保留a中对象)
|
|
temp.push(itemA)
|
|
}
|
|
})
|
|
// 然后,遍历b,检查是否有对象的名字不在结果中已存在的名字中
|
|
this.itemSelections.forEach(itemB => {
|
|
if (!temp.some(itemR => itemR.itemNo === itemB.itemNo)) {
|
|
// 如果b中的对象名字不在结果中,则添加到结果中
|
|
temp.push(itemB)
|
|
}
|
|
})
|
|
this.chooseItemList = temp
|
|
this.chooseModelFlag = false
|
|
},
|
|
|
|
// 确认多选属性
|
|
confirmItem2 () {
|
|
if (this.itemSelections2.length === 0) {
|
|
this.$message.warning("请勾选属性!")
|
|
return
|
|
}
|
|
// 临时集合
|
|
let temp = []
|
|
// 首先,遍历a,检查每个对象的名字是否在b中也存在
|
|
this.chooseItemList2.forEach(itemA => {
|
|
if (this.itemSelections2.some(itemB => itemB.itemNo === itemA.itemNo)) {
|
|
// 如果存在,则将a中的对象添加到结果中(这里直接用a的原对象,因为要求是保留a中对象)
|
|
temp.push(itemA)
|
|
}
|
|
})
|
|
// 然后,遍历b,检查是否有对象的名字不在结果中已存在的名字中
|
|
this.itemSelections2.forEach(itemB => {
|
|
if (!temp.some(itemR => itemR.itemNo === itemB.itemNo)) {
|
|
// 如果b中的对象名字不在结果中,则添加到结果中
|
|
temp.push(itemB)
|
|
}
|
|
})
|
|
this.chooseItemList2 = temp.map(item => {
|
|
if (item.availableValueList.length > 0) {
|
|
item.chooseValue = item.availableValueList[0].availableValue
|
|
}
|
|
return item
|
|
})
|
|
this.chooseModelFlag2 = false
|
|
},
|
|
|
|
// 查询ECN的模板
|
|
getEcnModel () {
|
|
let tempData = {
|
|
site: this.$store.state.user.site,
|
|
functionType: 'ECN',
|
|
codeNo: 'E001'
|
|
}
|
|
getEcnModel(tempData).then(({data}) => {
|
|
if (data.code === 0) {
|
|
this.modelList = data.rows
|
|
}
|
|
})
|
|
},
|
|
|
|
// 查询ECN的评估模板
|
|
getEcnModel2 () {
|
|
let tempData = {
|
|
site: this.$store.state.user.site,
|
|
functionType: 'ECN',
|
|
codeNo: 'E002'
|
|
}
|
|
getEcnModel(tempData).then(({data}) => {
|
|
if (data.code === 0) {
|
|
this.modelList2 = data.rows
|
|
}
|
|
})
|
|
},
|
|
|
|
// 查询会签的模板
|
|
getEcnCSModel () {
|
|
let tempData = {
|
|
site: this.$store.state.user.site,
|
|
functionType: 'ECN',
|
|
codeNo: 'E003'
|
|
}
|
|
getEcnModel(tempData).then(({data}) => {
|
|
if (data.code === 0) {
|
|
this.modelCSList = data.rows
|
|
}
|
|
})
|
|
},
|
|
|
|
// 选择会签模板属性
|
|
chooseCSModel () {
|
|
this.chooseCSModelData = {
|
|
site: this.$store.state.user.site,
|
|
itemNo: '',
|
|
itemDesc: '',
|
|
functionType: 'ECN',
|
|
codeNo: this.modelCSList.length > 0 ? this.modelCSList[0].codeNo : ''
|
|
}
|
|
// 先清空缓存选中
|
|
// this.$nextTick(() => this.$refs.itemCSTable.clearSelection())
|
|
// 查询所有属性
|
|
getItemList(this.chooseCSModelData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.itemCSList = data.rows
|
|
this.itemCSList.forEach(val => {
|
|
// 回显选中的部门
|
|
if (this.chooseCSItemList.map(val => val.itemNo).includes(val.itemNo)) {
|
|
this.$nextTick(() => this.$refs.itemCSTable.toggleRowSelection(val, true))
|
|
}
|
|
})
|
|
} else {
|
|
this.$alert(data.msg, '错误', {
|
|
confirmButtonText: '确定'
|
|
})
|
|
}
|
|
})
|
|
this.chooseCSModelFlag = true
|
|
},
|
|
|
|
// 查询CS属性
|
|
searchCSItemList () {
|
|
getItemList(this.chooseCSModelData).then(({data}) => {
|
|
if (data.code === 0) {
|
|
this.itemCSList = data.rows
|
|
}
|
|
})
|
|
},
|
|
|
|
// 单击选择
|
|
itemCSClickRow (row) {
|
|
this.$refs.itemCSTable.toggleRowSelection(row)
|
|
},
|
|
|
|
// 复选CS属性
|
|
selectionCSItem (val) {
|
|
this.itemCSSelections = val
|
|
},
|
|
|
|
// 确认多选CS属性
|
|
confirmCSItem () {
|
|
if (this.itemCSSelections.length === 0) {
|
|
this.$message.warning("请勾选属性!")
|
|
return
|
|
}
|
|
// 临时集合
|
|
let temp = []
|
|
// 首先,遍历a,检查每个对象的名字是否在b中也存在
|
|
this.chooseCSItemList.forEach(itemA => {
|
|
if (this.itemCSSelections.some(itemB => itemB.itemNo === itemA.itemNo)) {
|
|
// 如果存在,则将a中的对象添加到结果中(这里直接用a的原对象,因为要求是保留a中对象)
|
|
temp.push(itemA)
|
|
}
|
|
})
|
|
// 然后,遍历b,检查是否有对象的名字不在结果中已存在的名字中
|
|
this.itemCSSelections.forEach(itemB => {
|
|
if (!temp.some(itemR => itemR.itemNo === itemB.itemNo)) {
|
|
// 如果b中的对象名字不在结果中,则添加到结果中
|
|
temp.push(itemB)
|
|
}
|
|
})
|
|
this.chooseCSItemList = temp
|
|
this.chooseCSModelFlag = false
|
|
},
|
|
|
|
// 新增技术参数卡
|
|
addChangeDetail () {
|
|
technicalSpecificationSearch2(this.searchData2).then(({data}) => {
|
|
if (data.code === 0) {
|
|
this.dataList2 = data.rows
|
|
const shouldExclude = (item) => {
|
|
return this.chooseDataList.some(cdItem =>
|
|
cdItem.site === item.site && cdItem.codeNo === item.codeNo
|
|
)
|
|
}
|
|
this.dataList2 = this.dataList2.filter(item => !shouldExclude(item))
|
|
this.addDetailModal = true
|
|
} else {
|
|
this.dataList2 = []
|
|
}
|
|
})
|
|
},
|
|
|
|
// 确认选择技术参数卡
|
|
addDetail () {
|
|
if (this.dataSelections2.length === 0) {
|
|
this.$message.warning("请勾选技术参数卡!")
|
|
return
|
|
}
|
|
this.dataSelections2.forEach(item => {
|
|
// 确保没有重复的元素
|
|
if (!this.chooseDataList.some(cdItem => cdItem.site === item.site && cdItem.codeNo === item.codeNo)) {
|
|
this.chooseDataList.push(item)
|
|
}
|
|
})
|
|
this.addDetailModal = false
|
|
this.dataSelections2 = []
|
|
},
|
|
|
|
// 获取基础数据列表S
|
|
getBaseList (val, type) {
|
|
this.tagNo = val
|
|
this.tagNo1 = type
|
|
this.$nextTick(() => {
|
|
let strVal = ''
|
|
let conSql = ''
|
|
if (val === 103) {
|
|
if (type === 1) {
|
|
strVal = this.modalData.applicantId
|
|
} else if (type === 3) {
|
|
if (this.costImpactData.productionProductFlag !== 'Y') {
|
|
return
|
|
} else {
|
|
strVal = this.costImpactData.productionProductExecutor
|
|
}
|
|
} else if (type === 4) {
|
|
if (this.costImpactData.inventoryProductFlag !== 'Y') {
|
|
return
|
|
} else {
|
|
strVal = this.costImpactData.inventoryProductExecutor
|
|
}
|
|
} else if (type === 5) {
|
|
if (this.costImpactData.affectedFlag !== 'Y') {
|
|
return
|
|
} else {
|
|
strVal = this.costImpactData.affectedExecutor
|
|
}
|
|
}
|
|
// else if (type === 7) {
|
|
// strVal = this.tempExecutorRow.executor
|
|
// }
|
|
conSql = " and b.site = '" + this.$store.state.user.site + "'"
|
|
}
|
|
if (val === 133) {
|
|
strVal = this.tempPartRow.newPartNo
|
|
}
|
|
if (val === 2005) {
|
|
strVal = this.modalData.tpEngineerId
|
|
conSql = " and b.site = '" + this.$store.state.user.site + "'"
|
|
}
|
|
if (val === 2006) {
|
|
strVal = this.modalData.industrialEngineerId
|
|
conSql = " and b.site = '" + this.$store.state.user.site + "'"
|
|
}
|
|
if (val === 2007) {
|
|
strVal = this.modalData.cqcOperatorId
|
|
conSql = " and b.site = '" + this.$store.state.user.site + "'"
|
|
}
|
|
if (val === 2008) {
|
|
strVal = this.modalData.faiOperatorId
|
|
conSql = " and b.site = '" + this.$store.state.user.site + "'"
|
|
}
|
|
if (val === 2010) {
|
|
strVal = this.tempExecutorRow.executor
|
|
conSql = " and b.site = '" + this.$store.state.user.site + "'"
|
|
}
|
|
this.$refs.baseList.init(val, strVal, conSql)
|
|
})
|
|
},
|
|
|
|
// 列表方法的回调
|
|
getBaseData (val) {
|
|
if (this.tagNo === 103) {
|
|
if (this.tagNo1 === 1) {
|
|
this.modalData.applicantId = val.username
|
|
this.modalData.applicantName = val.user_display
|
|
this.getDepartmentByUserName()
|
|
} else if (this.tagNo1 === 3) {
|
|
this.costImpactData.productionProductExecutor = val.username
|
|
this.costImpactData.productionProductExecutorName = val.user_display
|
|
//this.$set(this.costImpactData,'productionProductExecutorName',val.user_display)
|
|
} else if (this.tagNo1 === 4) {
|
|
this.costImpactData.inventoryProductExecutor = val.username
|
|
this.costImpactData.inventoryProductExecutorName = val.user_display
|
|
//this.$set(this.costImpactData,'inventoryProductExecutorName',val.user_display)
|
|
} else if (this.tagNo1 === 5) {
|
|
this.costImpactData.affectedExecutor = val.username
|
|
this.costImpactData.affectedExecutorName = val.user_display
|
|
//this.$set(this.costImpactData,'affectedExecutorName',val.user_display)
|
|
}
|
|
// else if (this.tagNo1 === 7) {
|
|
// this.$set(this.tempExecutorRow,'executor',val.username)
|
|
// }
|
|
}
|
|
if (this.tagNo === 133) {
|
|
//this.tempPartRow.newPartNo = val.part_no
|
|
this.$set(this.tempPartRow,'newPartNo',val.part_no)
|
|
}
|
|
if (this.tagNo === 2005) {
|
|
this.modalData.tpEngineerId = val.username
|
|
this.modalData.tpEngineerName = val.user_display
|
|
}
|
|
if (this.tagNo === 2006) {
|
|
this.modalData.industrialEngineerId = val.username
|
|
this.modalData.industrialEngineerName = val.user_display
|
|
}
|
|
if (this.tagNo === 2007) {
|
|
this.modalData.cqcOperatorId = val.username
|
|
this.modalData.cqcOperatorName = val.user_display
|
|
}
|
|
if (this.tagNo === 2008) {
|
|
this.modalData.faiOperatorId = val.username
|
|
this.modalData.faiOperatorName = val.user_display
|
|
}
|
|
if (this.tagNo === 2010) {
|
|
this.$set(this.tempExecutorRow,'executor',val.username)
|
|
}
|
|
},
|
|
|
|
// 申请人输入校验
|
|
applicantBlur (tagNo) {
|
|
if (this.modalData.applicantId != null && this.modalData.applicantId !== '') {
|
|
let tempData = {
|
|
tagno: tagNo,
|
|
conditionSql: " and username = '" + this.modalData.applicantId + "'" + " and site = '" + this.modalData.site + "'"
|
|
}
|
|
verifyData(tempData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
if (data.baseListData.length > 0) {
|
|
this.modalData.applicantId = data.baseListData[0].username
|
|
this.modalData.applicantName = data.baseListData[0].user_display
|
|
this.getDepartmentByUserName()
|
|
return
|
|
}
|
|
}
|
|
})
|
|
}
|
|
this.modalData.applicantName = ''
|
|
this.modalData.applicationDepartmentId = ''
|
|
this.modalData.applicationDepartmentName = ''
|
|
},
|
|
|
|
// 审批人员输入校验
|
|
tpEngineerBlur (tagNo) {
|
|
if (this.modalData.tpEngineerId != null && this.modalData.tpEngineerId !== '') {
|
|
let tempData = {
|
|
tagno: tagNo,
|
|
conditionSql: " and a.username = '" + this.modalData.tpEngineerId + "'" + " and b.site = '" + this.modalData.site + "'"
|
|
}
|
|
verifyData(tempData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
if (data.baseListData.length > 0) {
|
|
this.modalData.tpEngineerId = data.baseListData[0].username
|
|
this.modalData.tpEngineerName = data.baseListData[0].user_display
|
|
return
|
|
}
|
|
}
|
|
})
|
|
}
|
|
this.modalData.tpEngineerName = ''
|
|
},
|
|
|
|
// I/E输入校验
|
|
industrialEngineerBlur (tagNo) {
|
|
if (this.modalData.industrialEngineerId != null && this.modalData.industrialEngineerId !== '') {
|
|
let tempData = {
|
|
tagno: tagNo,
|
|
conditionSql: " and a.username = '" + this.modalData.industrialEngineerId + "'" + " and b.site = '" + this.modalData.site + "'"
|
|
}
|
|
verifyData(tempData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
if (data.baseListData.length > 0) {
|
|
this.modalData.industrialEngineerId = data.baseListData[0].username
|
|
this.modalData.industrialEngineerName = data.baseListData[0].user_display
|
|
return
|
|
}
|
|
}
|
|
})
|
|
}
|
|
this.modalData.industrialEngineerName = ''
|
|
},
|
|
|
|
// CQC输入校验
|
|
cqcOperatorBlur (tagNo) {
|
|
if (this.modalData.cqcOperatorId != null && this.modalData.cqcOperatorId !== '') {
|
|
let tempData = {
|
|
tagno: tagNo,
|
|
conditionSql: " and a.username = '" + this.modalData.cqcOperatorId + "'" + " and b.site = '" + this.modalData.site + "'"
|
|
}
|
|
verifyData(tempData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
if (data.baseListData.length > 0) {
|
|
this.modalData.cqcOperatorId = data.baseListData[0].username
|
|
this.modalData.cqcOperatorName = data.baseListData[0].user_display
|
|
return
|
|
}
|
|
}
|
|
})
|
|
}
|
|
this.modalData.cqcOperatorName = ''
|
|
},
|
|
|
|
// FAI输入校验
|
|
faiOperatorBlur (tagNo) {
|
|
if (this.modalData.faiOperatorId != null && this.modalData.faiOperatorId !== '') {
|
|
let tempData = {
|
|
tagno: tagNo,
|
|
conditionSql: " and a.username = '" + this.modalData.faiOperatorId + "'" + " and b.site = '" + this.modalData.site + "'"
|
|
}
|
|
verifyData(tempData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
if (data.baseListData.length > 0) {
|
|
this.modalData.faiOperatorId = data.baseListData[0].username
|
|
this.modalData.faiOperatorName = data.baseListData[0].user_display
|
|
return
|
|
}
|
|
}
|
|
})
|
|
}
|
|
this.modalData.faiOperatorName = ''
|
|
},
|
|
|
|
// ======== DelegateAccess 相关方法 ========
|
|
searchDelegateAccessByUser() {
|
|
// 角色 ROO7 的用户
|
|
let params = {
|
|
...this.changeDelegateAccess,
|
|
site: this.$store.state.user.site,
|
|
}
|
|
searchDelegateAccessByUser(params).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.baseDelegateAccessList = data.rows;
|
|
// 不清空选中状态,依赖 :reserve-selection 保留之前的选择
|
|
} else {
|
|
this.$message.warning(data.msg)
|
|
}
|
|
}).catch((error) => {
|
|
this.$message.error(error)
|
|
})
|
|
},
|
|
|
|
handleSelectionChange(val) {
|
|
// val 只包含当前数据源中被选中的行
|
|
// 需要合并历史选择(selectionDelegateAccess)中不在当前数据源的人员
|
|
|
|
// 当前数据源中的所有人员编码
|
|
let currentDataKeys = this.baseDelegateAccessList.map(item => item.delegateAccess);
|
|
|
|
// 保留历史选择中不在当前数据源的人员(这些人员用户无法在当前对话框中取消选择)
|
|
let historyNotInCurrent = this.selectionDelegateAccess.filter(item =>
|
|
!currentDataKeys.includes(item.delegateAccess)
|
|
);
|
|
|
|
// 合并:历史人员(不在当前数据源)+ 当前选中的人员
|
|
let merged = [...historyNotInCurrent, ...val];
|
|
|
|
// 去重(虽然理论上不会重复)
|
|
let map = new Map();
|
|
merged.forEach(item => map.set(item.delegateAccess, item));
|
|
|
|
this.selectionDelegateAccess2 = Array.from(map.values());
|
|
},
|
|
|
|
handleTableClick(row, column, event, val) {
|
|
// 表格行点击选择
|
|
this.$refs[val].toggleRowSelection(row);
|
|
},
|
|
|
|
openDelegateAccess() {
|
|
// 恢复已确认选中的人员状态(仅限当前列表中存在的)
|
|
// 不清空选中状态,让 :reserve-selection 自动保留之前的选择
|
|
this.$nextTick(() => {
|
|
let rows = JSON.parse(JSON.stringify(this.selectionDelegateAccess))
|
|
if (rows && rows.length > 0 && this.$refs.delegateAccesstTable) {
|
|
rows.forEach(item => {
|
|
let row = this.baseDelegateAccessList.find(row => row.delegateAccess === item.delegateAccess);
|
|
if (row) { // 只对当前列表中存在的行进行选中操作
|
|
this.$refs.delegateAccesstTable.toggleRowSelection(row, true); // 明确设置为选中状态
|
|
}
|
|
})
|
|
}
|
|
})
|
|
},
|
|
|
|
closeDelegateAccess() {
|
|
this.selectionDelegateAccess2 = [];
|
|
},
|
|
|
|
confirmDelegateAccess() {
|
|
// selectionDelegateAccess2 已经在 handleSelectionChange 中合并了历史选择
|
|
// 直接保存即可
|
|
this.selectionDelegateAccess = JSON.parse(JSON.stringify(this.selectionDelegateAccess2))
|
|
this.delegateAccessVisible = false;
|
|
},
|
|
|
|
// ======== 导出相关方法 ========
|
|
/**
|
|
* 导出excel
|
|
*/
|
|
async createExportData () {
|
|
this.searchData.limit = -1
|
|
this.searchData.page = 1
|
|
await technicalSpecificationSearch(this.searchData).then(({data}) => {
|
|
this.resultList = data.page.list
|
|
})
|
|
return this.resultList
|
|
},
|
|
|
|
startDownload () {},
|
|
|
|
finishDownload () {},
|
|
|
|
fields () {
|
|
let json = '{'
|
|
this.columnList.forEach((item, index) => {
|
|
if (index == this.columnList.length - 1) {
|
|
json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"'
|
|
} else {
|
|
json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ','
|
|
}
|
|
})
|
|
json += '}'
|
|
let s = eval('(' + json + ')')
|
|
return s
|
|
},
|
|
|
|
queryByAnyField(params){
|
|
params.no = this.pageIndex
|
|
params.size = this.pageSize
|
|
params.site = this.$store.state.user.site
|
|
params.userId = this.$store.state.user.id.toString()
|
|
this.dataListLoading = true;
|
|
technicalSpecificationSearchAny(params).then(({data})=>{
|
|
if (data && data.code === 0){
|
|
this.dataList = data.page.list
|
|
this.totalPage = data.page.totalCount
|
|
}else {
|
|
this.$message.warning(data.msg)
|
|
}
|
|
this.dataListLoading = false;
|
|
}).catch((error)=>{
|
|
this.$message.error(error)
|
|
this.dataListLoading = false;
|
|
})
|
|
this.filterSearchData = params
|
|
this.isFilterSearch = true
|
|
this.filterVisible = false
|
|
},
|
|
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
.numInput /deep/ .el-input__inner{
|
|
text-align: right;
|
|
}
|
|
/deep/ .inlineNumber input::-webkit-outer-spin-button,
|
|
/deep/ .inlineNumber input::-webkit-inner-spin-button {
|
|
-webkit-appearance: none;
|
|
|
|
}
|
|
/deep/ .inlineNumber input[type="number"]{
|
|
-moz-appearance: textfield;
|
|
padding-right: 5px !important;
|
|
}
|
|
</style>
|