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.
2012 lines
91 KiB
2012 lines
91 KiB
<template>
|
|
<div class="mod-config">
|
|
<!-- 查询条件 -->
|
|
<el-form :inline="true" label-position="top" :model="searchData">
|
|
<el-form-item label="序列号">
|
|
<el-input v-model="searchData.referenceNo" clearable style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="申请人">
|
|
<el-input v-model="searchData.applicant" clearable style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="' '">
|
|
<el-button v-if="authSearch" @click="getDataList">查询</el-button>
|
|
<el-button v-if="authUpdate" @click="addOrUpdateHandle()">新增</el-button>
|
|
<el-button v-if="authSearch" @click="exportHandle()">导出</el-button>
|
|
<el-button v-if="authSearch" @click="searchHandle()">搜索</el-button>
|
|
</el-form-item>
|
|
</el-form>
|
|
|
|
<!-- 列表 -->
|
|
<el-table
|
|
ref="rohsTable"
|
|
:height="height"
|
|
:data="dataList"
|
|
border
|
|
:row-style="rowStyle"
|
|
@row-click="changeClickRow"
|
|
@current-change="currentChange"
|
|
v-loading="dataListLoading"
|
|
style="width: 100%;">
|
|
<el-table-column prop="referenceNo" header-align="center" align="center" label="序列号/Reference No." width="165"></el-table-column>
|
|
<el-table-column prop="status" header-align="center" align="center" label="单据状态/Status" width="120"></el-table-column>
|
|
<el-table-column prop="applicant" header-align="center" align="center" label="申请人/Applicant" width="120"></el-table-column>
|
|
<el-table-column prop="pm" header-align="center" align="center" label="PM人员/PM" width="120"></el-table-column>
|
|
<el-table-column prop="applicationDate" header-align="center" align="center" label="申请日期/Application Date" width="165"></el-table-column>
|
|
<el-table-column prop="plannedMassProductionDate" header-align="center" align="center" label="计划转量产时间/Planned Mass Production" width="210"></el-table-column>
|
|
<el-table-column prop="process" header-align="center" align="center" label="工艺/Process" width="120"></el-table-column>
|
|
<el-table-column prop="color" header-align="center" align="center" label="颜色/Color" width="120"></el-table-column>
|
|
<el-table-column prop="vendorCode" header-align="center" align="center" label="供应商代码/Vendor Code" width="160"></el-table-column>
|
|
<el-table-column prop="vendorMaterialCode" header-align="center" align="center" label="供应商材料编号/Vendor Material Code" width="200" :show-overflow-tooltip="true"></el-table-column>
|
|
<el-table-column prop="materialClassify" header-align="center" align="center" label="材料分类/Material Classify" width="200" :show-overflow-tooltip="true"></el-table-column>
|
|
<el-table-column prop="otherMaterialClassify" header-align="center" align="center" label="其他材料分类/Other Material Classify" width="210" :show-overflow-tooltip="true"></el-table-column>
|
|
<el-table-column prop="materialUseFor" header-align="center" align="center" label="辅材用途/Material Use For" width="180" :show-overflow-tooltip="true"></el-table-column>
|
|
<el-table-column prop="endCustomer" header-align="center" align="center" label="最终客户/End Customer" width="150"></el-table-column>
|
|
<el-table-column prop="projectId" header-align="center" align="center" label="项目编码/Project ID" width="140"></el-table-column>
|
|
<el-table-column prop="commGroup1" header-align="center" align="center" label="商品组1/Comm Group 1" width="170"></el-table-column>
|
|
<el-table-column prop="commGroup2" header-align="center" align="center" label="商品组2/Comm Group 2" width="170"></el-table-column>
|
|
<el-table-column prop="commGroup3" header-align="center" align="center" label="商品组3/Comm Group 3" width="170"></el-table-column>
|
|
<el-table-column prop="needCreateNumber" header-align="center" align="center" label="需创建内部编号/Need Create No." width="200"></el-table-column>
|
|
<el-table-column prop="npdEngineer" header-align="center" align="center" label="NPD工程师/NPD Engineer" width="170"></el-table-column>
|
|
<el-table-column prop="materialValidityTime" header-align="center" align="center" label="材料有效期/Material Validity Time" width="200"></el-table-column>
|
|
<el-table-column prop="needDeviation" header-align="center" align="center" label="是否需偏差许可/Need Deviation" width="190"></el-table-column>
|
|
<el-table-column prop="technicalPlan" header-align="center" align="center" label="技术计划/Technical Plan" width="170"></el-table-column>
|
|
<el-table-column prop="buyer" header-align="center" align="center" label="采购/Buyer" width="130"></el-table-column>
|
|
<el-table-column prop="expectReportTime" header-align="center" align="center" label="报告时间(月)/Expect Report Time" width="200"></el-table-column>
|
|
<el-table-column prop="sgsReportNumber" header-align="center" align="center" label="SGS报告编号/SGS Report Number" width="190" :show-overflow-tooltip="true"></el-table-column>
|
|
<el-table-column prop="expiredDate" header-align="center" align="center" label="报告日期/Expired Date" width="165"></el-table-column>
|
|
<el-table-column prop="validUntil" header-align="center" align="center" label="有效期/Valid Until" width="160"></el-table-column>
|
|
<el-table-column prop="isMeetRohsRequirement" header-align="center" align="center" label="符合RoHS/Meet RoHS Req" width="170"></el-table-column>
|
|
<el-table-column prop="isAhGrade" header-align="center" align="center" label="AH属性/AH Grade" width="140"></el-table-column>
|
|
<el-table-column prop="hsfSupplierClassification" header-align="center" align="center" label="HSF供应商等级/Supplier Class" width="220"></el-table-column>
|
|
<el-table-column prop="isSameMaterialDiffSize" header-align="center" align="center" label="同材不同规格/Same Material Diff Size" width="220"></el-table-column>
|
|
<el-table-column prop="ifsPartNo" header-align="center" align="center" label="IFS编号/IFS Part No." width="150"></el-table-column>
|
|
<el-table-column prop="remark" header-align="center" align="center" label="备注/Remark" width="220" :show-overflow-tooltip="true"></el-table-column>
|
|
<el-table-column fixed="right" header-align="center" align="center" width="130" label="操作/Operation">
|
|
<template slot-scope="scope">
|
|
<el-link v-if="authUpdate && scope.row.status !== '已完成'" style="cursor: pointer" @click="addOrUpdateHandle(scope.row)">编辑</el-link>
|
|
<el-link v-if="authUpdate && scope.row.status === '已完成'" style="cursor: pointer" @click="addOrUpdateHandle(scope.row)">详情</el-link>
|
|
<el-link v-if="authIssue && scope.row.status === '草稿'" style="cursor: pointer; margin-left: 10px;" @click="issueModal(scope.row)">下达</el-link>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
|
|
<!-- 分页 -->
|
|
<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="modalTitle"
|
|
:visible.sync="modalFlag"
|
|
width="1010px"
|
|
top="10vh"
|
|
v-drag
|
|
:close-on-click-modal="false"
|
|
:showClose="false">
|
|
|
|
<el-tabs tab-position="left" type="border-card" v-model="activeName" style="width: 100%;height: 650px;">
|
|
<!-- 基本信息 -->
|
|
<el-tab-pane label="基本信息" name="basicInfo">
|
|
<div style="height: 635px">
|
|
<el-form :inline="true" label-position="top" :model="modalData" style="margin-top: -5px;">
|
|
<el-form-item>
|
|
<span style="cursor: pointer" slot="label" @click="getBaseList(103, 1)"><a herf="#">申请人/Applicant</a></span>
|
|
<el-input v-model="modalData.applicant" @blur="applicantBlur(103)" style="width: 150px"></el-input>
|
|
<el-input v-model="modalData.applicantName" disabled style="width: 240px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="申请日期/Application Date">
|
|
<el-date-picker v-model="modalData.applicationDate" type="date" value-format="yyyy-MM-dd" style="width: 190px" :editable=false></el-date-picker>
|
|
</el-form-item>
|
|
<el-form-item label="工艺/Process">
|
|
<dict-data-select v-model="modalData.process" clearable style="width: 190px" dict-type="rohs_process"></dict-data-select>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="modalData">
|
|
<el-form-item label="供应商代码/Vendor Code">
|
|
<el-input v-model="modalData.vendorCode" style="width: 150px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="供应商材料编号/Vendor Material Code" style="margin-left: -10px">
|
|
<el-input v-model="modalData.vendorMaterialCode" style="width: 240px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="辅材用途/Material Use For">
|
|
<el-input v-model="modalData.materialUseFor" style="width: 190px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="modalData">
|
|
<el-form-item label="材料分类/Material Classify">
|
|
<dict-data-select v-model="modalData.materialClassifyList" multiple :collapse-tags="true" style="width: 394px" dict-type="rohs_material_classify"></dict-data-select>
|
|
</el-form-item>
|
|
<el-form-item label="其他材料分类/Other Material Classify" v-if="modalData.materialClassifyList && modalData.materialClassifyList.includes('Other其他')">
|
|
<el-input v-model="modalData.otherMaterialClassify" style="width: 190px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="modalData">
|
|
<el-form-item>
|
|
<span slot="label" v-if="!modalData.endCustomerFlag" @click="getBaseList(102, 1)"><a herf="#">最终客户/End Customer</a></span>
|
|
<span slot="label" v-else>最终客户/End Customer</span>
|
|
<el-input :disabled="modalData.endCustomerFlag" readonly v-model="modalData.endCustomer" @blur="handleQueryCustomer" style="width: 150px"></el-input>
|
|
<el-input disabled v-model="modalData.endCustomerName" style="width: 240px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<span style="cursor: pointer" slot="label" @click="getBaseList(103, 5)"><a herf="#">PM人员/PM</a></span>
|
|
<el-input v-model="modalData.pm" @blur="pmBlur(103)" style="width: 150px"></el-input>
|
|
<el-input v-model="modalData.pmName" disabled style="width: 240px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="modalData">
|
|
<el-form-item>
|
|
<span slot="label" v-if="!modalData.projectIdFlag" @click="chooseProjectListFlag = true"><a herf="#">项目编码/Project ID</a></span>
|
|
<span slot="label" v-else>项目编码/Project ID</span>
|
|
<el-input :disabled="modalData.projectIdFlag" readonly v-model="modalData.projectId" @blur="handleQueryProjectByCustomer" style="width: 150px"></el-input>
|
|
<el-input disabled v-model="modalData.projectName" style="width: 240px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="颜色/Color">
|
|
<el-input v-model="modalData.color" style="width: 150px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="计划转量产时间/Planned Mass Production">
|
|
<el-date-picker v-model="modalData.plannedMassProductionDate" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" style="width: 230px" :editable=false></el-date-picker>
|
|
</el-form-item>
|
|
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="modalData">
|
|
<el-form-item>
|
|
<span style="cursor: pointer" slot="label" @click="getBaseList(110)"><a herf="#">商品组1 / Comm Group 1</a></span>
|
|
<el-input v-model="modalData.commGroup1" @change="commGroup1Blur(110)" style="width: 150px"></el-input>
|
|
<el-input v-model="modalData.commGroup1Desc" disabled style="width: 240px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="是否需偏差许可/Need Deviation">
|
|
<el-radio-group v-model="modalData.needDeviation" style="width: 190px">
|
|
<el-radio label="Y" @click.native.prevent="radioClick('needDeviation', 'Y')">是</el-radio>
|
|
<el-radio label="N" @click.native.prevent="radioClick('needDeviation', 'N')">否</el-radio>
|
|
</el-radio-group>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="modalData">
|
|
<el-form-item>
|
|
<span style="cursor: pointer" slot="label" @click="getBaseList(111)"><a herf="#">商品组2 / Comm Group 2</a></span>
|
|
<el-input v-model="modalData.commGroup2" @change="commGroup2Blur(111)" style="width: 150px"></el-input>
|
|
<el-input v-model="modalData.commGroup2Desc" disabled style="width: 240px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="需创建内部编号/Need Create No.">
|
|
<el-radio-group v-model="modalData.needCreateNumber" style="width: 190px">
|
|
<el-radio label="Y" @click.native.prevent="radioClick('needCreateNumber', 'Y')">是</el-radio>
|
|
<el-radio label="N" @click.native.prevent="radioClick('needCreateNumber', 'N')">否</el-radio>
|
|
</el-radio-group>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="modalData">
|
|
<el-form-item>
|
|
<span style="cursor: pointer" slot="label" @click="getBaseList(130)"><a herf="#">商品组3 / Comm Group 3</a></span>
|
|
<el-input v-model="modalData.commGroup3" @change="commGroup3Blur(130)" style="width: 150px"></el-input>
|
|
<el-input v-model="modalData.commGroup3Desc" disabled style="width: 240px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="是否Fiber材料/Fiber Material">
|
|
<el-radio-group v-model="modalData.isFiberMaterial" style="width: 190px">
|
|
<el-radio label="Y" @click.native.prevent="radioClick('isFiberMaterial', 'Y')">是</el-radio>
|
|
<el-radio label="N" @click.native.prevent="radioClick('isFiberMaterial', 'N')">否</el-radio>
|
|
</el-radio-group>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="modalData">
|
|
<el-form-item>
|
|
<span style="cursor: pointer" slot="label" @click="getBaseList(103, 3)"><a herf="#">NPD工程师/NPD Engineer</a></span>
|
|
<el-input v-model="modalData.npdEngineer" @blur="npdEngineerBlur(103)" style="width: 150px"></el-input>
|
|
<el-input v-model="modalData.npdEngineerName" disabled style="width: 240px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="WM所需求规格/WM Required Spec">
|
|
<el-input v-model="modalData.wmRequiredSpec" style="width: 190px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="材料厚度/Material Thickness">
|
|
<el-input v-model="modalData.materialThickness" style="width: 190px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="modalData">
|
|
<el-form-item label="材料有效期/Material Validity Time">
|
|
<el-date-picker v-model="modalData.materialValidityTime" type="date" value-format="yyyy-MM-dd" style="width: 190px" :editable=false></el-date-picker>
|
|
</el-form-item>
|
|
<el-form-item label="有效期备注/Validity Comments">
|
|
<el-input v-model="modalData.materialValidityComments" style="width: 190px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="报告时间(月)/Expect Report Time">
|
|
<el-input class="inlineNumber numInput" v-model="modalData.expectReportTime" type="number" style="width: 190px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label=" " style="margin-top: -2px;margin-left: 2px">
|
|
<el-button type="primary" icon="el-icon-upload" @click="uploadDialog = true">上传附件</el-button>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="modalData">
|
|
<el-form-item>
|
|
<span style="cursor: pointer" slot="label" @click="getBaseList(103, 4)"><a herf="#">技术计划/Technical Plan</a></span>
|
|
<el-input v-model="modalData.technicalPlan" @blur="technicalPlanBlur(103)" style="width: 150px"></el-input>
|
|
<el-input v-model="modalData.technicalPlanName" disabled style="width: 240px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<span style="cursor: pointer" slot="label" @click="getBaseList(2000, 2)"><a herf="#">采购/Buyer</a></span>
|
|
<el-input v-model="modalData.buyer" @blur="buyerBlur(2000)" style="width: 150px"></el-input>
|
|
<el-input v-model="modalData.buyerName" disabled style="width: 240px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="modalData">
|
|
<el-form-item label="所需审批文件/Docs Needed" >
|
|
<dict-data-select v-model="modalData.qualificationDocumentsNeededList" multiple :collapse-tags="true" style="width: 394px" dict-type="rohs_qualification_docs"></dict-data-select>
|
|
</el-form-item>
|
|
<el-form-item label="测试报告必测项/Test Items">
|
|
<dict-data-select v-model="modalData.testReportIncludingItemsList" multiple :collapse-tags="true" style="width: 394px" dict-type="rohs_test_report_items"></dict-data-select>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="modalData">
|
|
<el-form-item label="备注说明/Remark" style="display: block;">
|
|
<el-input type="textarea" :rows="3" v-model="modalData.remark" resize="none" style="width: 802px;height: 30px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
</div>
|
|
</el-tab-pane>
|
|
|
|
<!-- HSF 填写信息 -->
|
|
<el-tab-pane label="HSF 填写信息" name="hsfInfo">
|
|
<div style="height: 635px">
|
|
<el-form :inline="true" label-position="top" :model="modalData" style="margin-top: -5px;">
|
|
<el-form-item label="SGS报告编号/SGS Report Number">
|
|
<el-input v-model="modalData.sgsReportNumber" style="width: 230px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="报告日期/Expired Date">
|
|
<el-date-picker v-model="modalData.expiredDate" type="date" value-format="yyyy-MM-dd" style="width: 180px" :editable=false></el-date-picker>
|
|
</el-form-item>
|
|
<el-form-item label="有效期/Valid Until">
|
|
<dict-data-select v-model="modalData.validUntil" clearable style="width: 180px" dict-type="rohs_valid_until"></dict-data-select>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="modalData">
|
|
<el-form-item label="是否符合RoHS/Meet RoHS Req">
|
|
<el-radio-group v-model="modalData.isMeetRohsRequirement" style="width: 230px">
|
|
<el-radio label="Y" @click.native.prevent="radioClick('isMeetRohsRequirement', 'Y')">是</el-radio>
|
|
<el-radio label="N" @click.native.prevent="radioClick('isMeetRohsRequirement', 'N')">否</el-radio>
|
|
</el-radio-group>
|
|
</el-form-item>
|
|
<el-form-item label="材料属性是否是AH/Is AH Grade">
|
|
<el-radio-group v-model="modalData.isAhGrade" style="width: 180px">
|
|
<el-radio label="Y" @click.native.prevent="radioClick('isAhGrade', 'Y')">是</el-radio>
|
|
<el-radio label="N" @click.native.prevent="radioClick('isAhGrade', 'N')">否</el-radio>
|
|
</el-radio-group>
|
|
</el-form-item>
|
|
<el-form-item label="HSF供应商等级/Supplier Class">
|
|
<el-radio-group v-model="modalData.hsfSupplierClassification" style="width: 180px">
|
|
<el-radio label="A类" @click.native.prevent="radioClick('hsfSupplierClassification', 'A类')">A类</el-radio>
|
|
<el-radio label="B类" @click.native.prevent="radioClick('hsfSupplierClassification', 'B类')">B类</el-radio>
|
|
<el-radio label="C类" @click.native.prevent="radioClick('hsfSupplierClassification', 'C类')">C类</el-radio>
|
|
</el-radio-group>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="modalData">
|
|
<el-form-item label="Fiber报告信息/Fiber Information" style="display: block;">
|
|
<el-input type="textarea" :rows="3" v-model="modalData.fiberInformation" resize="none" style="width: 802px;height: 30px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="modalData" style="margin-top: 50px">
|
|
<el-form-item label="HSF标准/HSF Standard" style="display: block;">
|
|
<el-input type="textarea" :rows="3" v-model="modalData.hsfStandard" resize="none" style="width: 802px;height: 30px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
</div>
|
|
</el-tab-pane>
|
|
|
|
<!-- NPD 信息 -->
|
|
<el-tab-pane label="NPD 信息" name="npdInfo">
|
|
<div style="height: 635px">
|
|
<el-form :inline="true" label-position="top" :model="modalData" style="margin-top: -5px;">
|
|
<el-form-item label="现有材料不同规格/Same Material Diff Size">
|
|
<el-radio-group v-model="modalData.isSameMaterialDiffSize" style="width: 190px">
|
|
<el-radio label="Y" @click.native.prevent="radioClick('isSameMaterialDiffSize', 'Y')">是</el-radio>
|
|
<el-radio label="N" @click.native.prevent="radioClick('isSameMaterialDiffSize', 'N')">否</el-radio>
|
|
</el-radio-group>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="modalData">
|
|
<el-form-item label="材料描述/Material Desc." style="display: block;">
|
|
<el-input type="textarea" :rows="3" v-model="modalData.materialDesc" resize="none" style="width: 802px;height: 30px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="modalData" style="margin-top: 50px">
|
|
<el-form-item label="备注说明/NPD Remark" style="display: block;">
|
|
<el-input type="textarea" :rows="3" v-model="modalData.npdRemark" resize="none" style="width: 802px;height: 30px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
</div>
|
|
</el-tab-pane>
|
|
|
|
<!-- 材料信息 -->
|
|
<el-tab-pane label="材料信息" name="materialInfo">
|
|
<div style="height: 635px">
|
|
<el-form :inline="true" label-position="top" :model="modalData" style="margin-top: -15px;">
|
|
<el-form-item label=" ">
|
|
<el-button type="primary" v-if="!showModalFlag" @click="openProjectMaterialDialog">新增材料</el-button>
|
|
<el-button type="danger" v-if="!showModalFlag" @click="removeSelectedMaterialRows">删除材料</el-button>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-table
|
|
ref="rohsMaterialTable"
|
|
class="rohs-material-table"
|
|
border
|
|
:data="modalData.materialList"
|
|
@selection-change="materialSelectionChange"
|
|
:header-cell-style="materialDialogHeaderCellStyle"
|
|
:height="585"
|
|
style="width: 100%">
|
|
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
|
|
<el-table-column type="index" label="序号" width="50" header-align="center" align="center"></el-table-column>
|
|
<el-table-column prop="testPartNo" label="PLM物料编码/Test Part No." min-width="180" header-align="center" align="left" :show-overflow-tooltip="true"></el-table-column>
|
|
<el-table-column prop="finalPartNo" label="IFS物料编码/Final Part No." min-width="180" header-align="center" align="left" :show-overflow-tooltip="true"></el-table-column>
|
|
<el-table-column prop="customerPartNo" label="客户料号/Customer Part No." min-width="180" header-align="center" align="left" :show-overflow-tooltip="true"></el-table-column>
|
|
<el-table-column prop="partDesc" label="描述/Part Desc." min-width="220" header-align="center" align="left" :show-overflow-tooltip="true"></el-table-column>
|
|
</el-table>
|
|
</div>
|
|
</el-tab-pane>
|
|
</el-tabs>
|
|
|
|
<el-footer style="height:35px;margin-top: 15px;text-align:center">
|
|
<el-button type="primary" v-if="canSaveAction()" @click="dataFormSubmit()">保存</el-button>
|
|
<el-button type="primary" @click="modalFlag = false">关闭</el-button>
|
|
<el-button type="primary" v-if="canAgreeAction()" :loading="submitLoading" @click="agreeSubmit">同意</el-button>
|
|
<el-button type="primary" v-if="canRejectAction()" :loading="submitLoading" @click="openRejectModal">驳回</el-button>
|
|
</el-footer>
|
|
</el-dialog>
|
|
|
|
<upload-file-list
|
|
v-if="modalFlag"
|
|
folder="rohs"
|
|
title="RoHs 附件上传"
|
|
:label="'序列号'"
|
|
:file-list.sync="fileList"
|
|
:no="modalData.referenceNo"
|
|
:upload-dialog.sync="uploadDialog"
|
|
path="/upload/test">
|
|
</upload-file-list>
|
|
|
|
<!--选择项目模态框-->
|
|
<el-dialog title="选择-项目" :close-on-click-modal="false" @close="closeProjectInfoDialog"
|
|
@open="searchProjectInfoList" :visible.sync="chooseProjectListFlag" width="35%">
|
|
<el-form label-position="top" :model="searchProjectData" ref="closeProjectInfoForm">
|
|
<el-row :gutter="10">
|
|
<el-col :span="6">
|
|
<el-form-item label="项目号">
|
|
<el-input v-model="searchProjectData.projectId"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-form-item label="项目名称">
|
|
<el-input v-model="searchProjectData.projectName"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-form-item label=" ">
|
|
<el-button type="primary" @click="searchProjectInfoList">查询</el-button>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-table :height="223"
|
|
:data="projectList"
|
|
border
|
|
@row-click="projectClickRow">
|
|
<el-table-column label="项目号" prop="projectId"/>
|
|
<el-table-column label="项目名称" prop="projectName"/>
|
|
</el-table>
|
|
</el-form>
|
|
</el-dialog>
|
|
|
|
<el-dialog title="选择项目物料" top="15vh" width="75%" :close-on-click-modal="false" v-drag :visible.sync="projectMaterialDialogFlag">
|
|
<el-form :inline="true" label-position="top" :model="projectMaterialSearchData">
|
|
<el-form-item label="PLM物料编码/Test Part No.">
|
|
<el-input v-model="projectMaterialSearchData.testPartNo" clearable style="width: 150px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="描述/Part Desc">
|
|
<el-input v-model="projectMaterialSearchData.partDesc" clearable style="width: 150px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="IFS物料编码/Final Part No.">
|
|
<el-input v-model="projectMaterialSearchData.finalPartNo" clearable style="width: 150px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="客户料号/Customer Part No.">
|
|
<el-input v-model="projectMaterialSearchData.customerPartNo" clearable style="width: 150px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label=" ">
|
|
<el-button type="primary" @click="searchProjectMaterialList">查询</el-button>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-table
|
|
ref="projectMaterialTable"
|
|
class="rohs-material-table"
|
|
border
|
|
v-loading="projectMaterialLoading"
|
|
:data="projectMaterialList"
|
|
@selection-change="projectMaterialSelectionChange"
|
|
:header-cell-style="materialDialogHeaderCellStyle"
|
|
:height="320"
|
|
style="width: 100%">
|
|
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
|
|
<el-table-column prop="testPartNo" label="PLM物料编码/Test Part No." min-width="180" header-align="center" align="left" :show-overflow-tooltip="true"></el-table-column>
|
|
<el-table-column prop="finalPartNo" label="IFS物料编码/Final Part No." min-width="180" header-align="center" align="left" :show-overflow-tooltip="true"></el-table-column>
|
|
<el-table-column prop="customerPartNo" label="客户料号/Customer Part No." min-width="180" header-align="center" align="left" :show-overflow-tooltip="true"></el-table-column>
|
|
<el-table-column prop="partDesc" label="描述/Part Desc." min-width="220" header-align="center" align="left" :show-overflow-tooltip="true"></el-table-column>
|
|
</el-table>
|
|
<el-pagination
|
|
style="margin-top: 10px"
|
|
@size-change="projectMaterialSizeChangeHandle"
|
|
@current-change="projectMaterialCurrentChangeHandle"
|
|
:current-page="projectMaterialPageIndex"
|
|
:page-sizes="[20, 50, 100]"
|
|
:page-size="projectMaterialPageSize"
|
|
:total="projectMaterialTotal"
|
|
layout="total, sizes, prev, pager, next, jumper">
|
|
</el-pagination>
|
|
<el-footer style="height:35px;margin-top: 10px;text-align:center">
|
|
<el-button type="primary" @click="confirmProjectMaterialSelection">确定</el-button>
|
|
<el-button type="primary" @click="projectMaterialDialogFlag = false">取消</el-button>
|
|
</el-footer>
|
|
</el-dialog>
|
|
|
|
<el-dialog title="驳回" top="30vh" :close-on-click-modal="false" v-drag :visible.sync="submitModalFlag" width="500px">
|
|
<el-form label-position="top">
|
|
<el-form-item label="驳回意见/Reject Opinion">
|
|
<el-input type="textarea" v-model="rejectOpinion" :rows="3" resize="none" show-word-limit style="width: 479px;height: 30px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-footer style="height:35px;text-align:center">
|
|
<el-button type="primary" :loading="submitLoading" @click="rejectSubmit">确定</el-button>
|
|
<el-button type="primary" @click="submitModalFlag = false">取消</el-button>
|
|
</el-footer>
|
|
</el-dialog>
|
|
|
|
<!-- 底部附件页签 -->
|
|
<el-tabs v-model="activeTable" style="width: 100%; height: 100%;" type="border-card" @tab-click="refreshCurrentTabTable" class="customer-tab">
|
|
<el-tab-pane label="基本信息" name="basicInfo">
|
|
<div :style="{height: secondHeight + 'px'}" style="margin-left: 5px;margin-top: 5px; overflow-y: auto;">
|
|
<el-form :inline="true" label-position="top" :model="currentRow">
|
|
<el-form-item>
|
|
<span slot="label">申请人/Applicant</span>
|
|
<el-input :value="currentRow.applicant || ''" disabled style="width: 150px"></el-input>
|
|
<el-input :value="currentRow.applicantName || ''" disabled style="width: 240px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="申请日期/Application Date">
|
|
<el-date-picker :value="currentRow.applicationDate" disabled type="date" value-format="yyyy-MM-dd" style="width: 190px"></el-date-picker>
|
|
</el-form-item>
|
|
<el-form-item label="工艺/Process">
|
|
<el-input :value="currentRow.process || ''" disabled style="width: 190px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="currentRow">
|
|
<el-form-item label="供应商代码/Vendor Code">
|
|
<el-input :value="currentRow.vendorCode || ''" disabled style="width: 150px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="供应商材料编号/Vendor Material Code" style="margin-left: -10px">
|
|
<el-input :value="currentRow.vendorMaterialCode || ''" disabled style="width: 240px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="辅材用途/Material Use For">
|
|
<el-input :value="currentRow.materialUseFor || ''" disabled style="width: 190px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="currentRow">
|
|
<el-form-item label="材料分类/Material Classify">
|
|
<el-input :value="currentRow.materialClassify || ''" disabled style="width: 394px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="其他材料分类/Other Material Classify" v-if="currentRow.materialClassify && currentRow.materialClassify.includes('Other其他')">
|
|
<el-input :value="currentRow.otherMaterialClassify || ''" disabled style="width: 190px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="currentRow">
|
|
<el-form-item>
|
|
<span slot="label">最终客户/End Customer</span>
|
|
<el-input :value="currentRow.endCustomer || ''" disabled style="width: 150px"></el-input>
|
|
<el-input :value="currentRow.endCustomerName || ''" disabled style="width: 240px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<span slot="label">PM人员/PM</span>
|
|
<el-input :value="currentRow.pm || ''" disabled style="width: 150px"></el-input>
|
|
<el-input :value="currentRow.pmName || ''" disabled style="width: 240px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="currentRow">
|
|
<el-form-item>
|
|
<span slot="label">项目编码/Project ID</span>
|
|
<el-input :value="currentRow.projectId || ''" disabled style="width: 150px"></el-input>
|
|
<el-input :value="currentRow.projectName || ''" disabled style="width: 240px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="颜色/Color">
|
|
<el-input :value="currentRow.color || ''" disabled style="width: 150px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="计划转量产时间/Planned Mass Production">
|
|
<el-date-picker :value="currentRow.plannedMassProductionDate" disabled type="datetime" value-format="yyyy-MM-dd HH:mm:ss" style="width: 230px"></el-date-picker>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="currentRow">
|
|
<el-form-item>
|
|
<span slot="label">商品组1 / Comm Group 1</span>
|
|
<el-input :value="currentRow.commGroup1 || ''" disabled style="width: 150px"></el-input>
|
|
<el-input :value="currentRow.commGroup1Desc || ''" disabled style="width: 240px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="是否需偏差许可/Need Deviation">
|
|
<el-input :value="displayYesNo(currentRow.needDeviation)" disabled style="width: 190px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="currentRow">
|
|
<el-form-item>
|
|
<span slot="label">商品组2 / Comm Group 2</span>
|
|
<el-input :value="currentRow.commGroup2 || ''" disabled style="width: 150px"></el-input>
|
|
<el-input :value="currentRow.commGroup2Desc || ''" disabled style="width: 240px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="需创建内部编号/Need Create No.">
|
|
<el-input :value="displayYesNo(currentRow.needCreateNumber)" disabled style="width: 190px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="currentRow">
|
|
<el-form-item>
|
|
<span slot="label">商品组3 / Comm Group 3</span>
|
|
<el-input :value="currentRow.commGroup3 || ''" disabled style="width: 150px"></el-input>
|
|
<el-input :value="currentRow.commGroup3Desc || ''" disabled style="width: 240px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="是否Fiber材料/Fiber Material">
|
|
<el-input :value="displayYesNo(currentRow.isFiberMaterial)" disabled style="width: 190px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="currentRow">
|
|
<el-form-item>
|
|
<span slot="label">NPD工程师/NPD Engineer</span>
|
|
<el-input :value="currentRow.npdEngineer || ''" disabled style="width: 150px"></el-input>
|
|
<el-input :value="currentRow.npdEngineerName || ''" disabled style="width: 240px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="WM所需求规格/WM Required Spec">
|
|
<el-input :value="currentRow.wmRequiredSpec || ''" disabled style="width: 190px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="材料厚度/Material Thickness">
|
|
<el-input :value="currentRow.materialThickness || ''" disabled style="width: 190px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="currentRow">
|
|
<el-form-item label="材料有效期/Material Validity Time">
|
|
<el-date-picker :value="currentRow.materialValidityTime" disabled type="date" value-format="yyyy-MM-dd" style="width: 190px"></el-date-picker>
|
|
</el-form-item>
|
|
<el-form-item label="有效期备注/Validity Comments">
|
|
<el-input :value="currentRow.materialValidityComments || ''" disabled style="width: 190px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="报告时间(月)/Expect Report Time">
|
|
<el-input :value="currentRow.expectReportTime" disabled style="width: 190px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="currentRow">
|
|
<el-form-item>
|
|
<span slot="label">技术计划/Technical Plan</span>
|
|
<el-input :value="currentRow.technicalPlan || ''" disabled style="width: 150px"></el-input>
|
|
<el-input :value="currentRow.technicalPlanName || ''" disabled style="width: 240px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<span slot="label">采购/Buyer</span>
|
|
<el-input :value="currentRow.buyer || ''" disabled style="width: 150px"></el-input>
|
|
<el-input :value="currentRow.buyerName || ''" disabled style="width: 240px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="currentRow">
|
|
<el-form-item label="所需审批文件/Docs Needed">
|
|
<el-input :value="currentRow.qualificationDocumentsNeeded || ''" disabled style="width: 394px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="测试报告必测项/Test Items">
|
|
<el-input :value="currentRow.testReportIncludingItems || ''" disabled style="width: 394px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="currentRow">
|
|
<el-form-item label="备注说明/Remark" style="display: block;">
|
|
<el-input type="textarea" :rows="3" :value="currentRow.remark || ''" disabled resize="none" style="width: 802px;height: 30px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
</div>
|
|
</el-tab-pane>
|
|
|
|
<el-tab-pane label="HSF 填写信息" name="hsfInfo">
|
|
<div :style="{height: secondHeight + 'px'}" style="margin-left: 5px;margin-top: 5px; overflow-y: auto;">
|
|
<el-form :inline="true" label-position="top" :model="currentRow">
|
|
<el-form-item label="SGS报告编号/SGS Report Number">
|
|
<el-input :value="currentRow.sgsReportNumber || ''" disabled style="width: 230px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="报告日期/Expired Date">
|
|
<el-date-picker :value="currentRow.expiredDate" disabled type="date" value-format="yyyy-MM-dd" style="width: 180px"></el-date-picker>
|
|
</el-form-item>
|
|
<el-form-item label="有效期/Valid Until">
|
|
<el-input :value="currentRow.validUntil || ''" disabled style="width: 180px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="currentRow">
|
|
<el-form-item label="是否符合RoHS/Meet RoHS Req"><el-input :value="displayYesNo(currentRow.isMeetRohsRequirement)" disabled style="width: 230px"></el-input></el-form-item>
|
|
<el-form-item label="材料属性是否是AH/Is AH Grade"><el-input :value="displayYesNo(currentRow.isAhGrade)" disabled style="width: 180px"></el-input></el-form-item>
|
|
<el-form-item label="HSF供应商等级/Supplier Class"><el-input :value="currentRow.hsfSupplierClassification || ''" disabled style="width: 180px"></el-input></el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="currentRow">
|
|
<el-form-item label="Fiber报告信息/Fiber Information" style="display: block;"><el-input type="textarea" :rows="3" :value="currentRow.fiberInformation || ''" disabled resize="none" style="width: 802px;height: 30px"></el-input></el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="currentRow" style="margin-top: 50px">
|
|
<el-form-item label="HSF标准/HSF Standard" style="display: block;"><el-input type="textarea" :rows="3" :value="currentRow.hsfStandard || ''" disabled resize="none" style="width: 802px;height: 30px"></el-input></el-form-item>
|
|
</el-form>
|
|
</div>
|
|
</el-tab-pane>
|
|
|
|
<el-tab-pane label="NPD 信息" name="npdInfo">
|
|
<div :style="{height: secondHeight + 'px'}" style="margin-left: 5px;margin-top: 5px; overflow-y: auto;">
|
|
<el-form :inline="true" label-position="top" :model="currentRow">
|
|
<el-form-item label="现有材料不同规格/Same Material Diff Size"><el-input :value="displayYesNo(currentRow.isSameMaterialDiffSize)" disabled style="width: 205px"></el-input></el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="currentRow">
|
|
<el-form-item label="材料描述/Material Desc." style="display: block;"><el-input type="textarea" :rows="3" :value="currentRow.materialDesc || ''" disabled resize="none" style="width: 802px;height: 30px"></el-input></el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="currentRow" style="margin-top: 50px">
|
|
<el-form-item label="备注说明/NPD Remark" style="display: block;"><el-input type="textarea" :rows="3" :value="currentRow.npdRemark || ''" disabled resize="none" style="width: 802px;height: 30px"></el-input></el-form-item>
|
|
</el-form>
|
|
</div>
|
|
</el-tab-pane>
|
|
|
|
<el-tab-pane label="材料信息" name="materialInfo">
|
|
<div :style="{height: secondHeight + 'px'}" style="margin-left: 5px;margin-top: 5px; overflow-y: auto;">
|
|
<el-table
|
|
class="rohs-material-table"
|
|
border
|
|
:data="currentRow.materialList || []"
|
|
:height="secondHeight - 10"
|
|
style="width: 100%">
|
|
<el-table-column type="index" label="序号" width="50" header-align="center" align="center"></el-table-column>
|
|
<el-table-column prop="testPartNo" label="PLM物料编码/Test Part No." min-width="180" header-align="center" align="left" :show-overflow-tooltip="true"></el-table-column>
|
|
<el-table-column prop="finalPartNo" label="IFS物料编码/Final Part No." min-width="180" header-align="center" align="left" :show-overflow-tooltip="true"></el-table-column>
|
|
<el-table-column prop="customerPartNo" label="客户料号/Customer Part No." min-width="180" header-align="center" align="left" :show-overflow-tooltip="true"></el-table-column>
|
|
<el-table-column prop="partDesc" label="描述/Part Desc." min-width="220" header-align="center" align="left" :show-overflow-tooltip="true"></el-table-column>
|
|
</el-table>
|
|
</div>
|
|
</el-tab-pane>
|
|
|
|
<el-tab-pane label="附件信息" name="attachment">
|
|
<oss-components
|
|
:save-visible="authFileSave"
|
|
:download-visible="authFileDownLoad"
|
|
:remove-visible="authFileRemove"
|
|
:preview-visible="authFilePreview"
|
|
:disabled="currentRow.status === '已完成'"
|
|
label="序列号"
|
|
:height="secondHeight - 25"
|
|
style="margin-top: 2px"
|
|
:columns="fileColumnList"
|
|
:order-ref1="currentRow.site"
|
|
:order-ref2="currentRow.referenceNo">
|
|
</oss-components>
|
|
</el-tab-pane>
|
|
<el-tab-pane label="审批信息" name="approvalInformation">
|
|
<approval-information v-model:data-list="approvalList" :height="secondHeight"></approval-information>
|
|
</el-tab-pane>
|
|
</el-tabs>
|
|
<ChooseList ref="baseList" @getBaseData="getBaseData"></ChooseList>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import * as api from '@/api/rohs/rohs'
|
|
import { checkSuperAdmin } from "@/api/changeManagement/changeManagement"
|
|
import { verifyData } from "@/api/chooselist/chooselist.js"
|
|
import { searchProjectInfoList } from "@/api/quotation/quotationInformation.js"
|
|
import { queryCustomer } from "@/api/customer/customerInformation"
|
|
import { queryProjectByCustomer } from "@/api/project/project"
|
|
import uploadFileList from '../common/uploadFileList'
|
|
import ossComponents from '../oss/ossComponents.vue'
|
|
import ChooseList from '@/views/modules/common/Chooselist'
|
|
import DictDataSelect from "../sys/dict-data-select.vue"
|
|
import ApprovalInformation from "../changeManagement/approvalInformation.vue"
|
|
|
|
export default {
|
|
components: {
|
|
uploadFileList,
|
|
ossComponents,
|
|
ChooseList,
|
|
DictDataSelect,
|
|
ApprovalInformation
|
|
},
|
|
data () {
|
|
return {
|
|
searchData: {
|
|
site: this.$store.state.user.site,
|
|
referenceNo: '',
|
|
applicant: ''
|
|
},
|
|
dataList: [],
|
|
pageIndex: 1,
|
|
pageSize: 20,
|
|
totalPage: 0,
|
|
dataListLoading: false,
|
|
|
|
activeTable: 'basicInfo',
|
|
menuId: '108006', // 暂定ROHS菜单ID
|
|
authSearch: false,
|
|
authUpdate: false,
|
|
authIssue: false,
|
|
authSubmit: false,
|
|
authReject: false,
|
|
authFileSave: false,
|
|
authFileDownLoad: false,
|
|
authFileRemove: false,
|
|
authFilePreview: false,
|
|
authDelete: false,
|
|
superAdmin: false,
|
|
createBy2: this.$store.state.user.name,
|
|
height: 400,
|
|
secondHeight: 200,
|
|
currentRow: {},
|
|
currentRowNameSeq: 0,
|
|
fileColumnList: [
|
|
{
|
|
columnProp: 'fileName',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '文件名称',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 140
|
|
},
|
|
{
|
|
columnProp: 'fileRemark',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '备注',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 240
|
|
},
|
|
{
|
|
columnProp: 'createDate',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '上传时间',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 140
|
|
},
|
|
{
|
|
columnProp: 'createBy',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '上传人',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 140
|
|
}
|
|
],
|
|
|
|
modalFlag: false,
|
|
uploadDialog: false,
|
|
chooseProjectListFlag: false,
|
|
projectMaterialDialogFlag: false,
|
|
searchProjectData: {
|
|
site: '',
|
|
projectId: undefined,
|
|
projectName: undefined,
|
|
customerId: undefined,
|
|
},
|
|
projectMaterialSearchData: {
|
|
testPartNo: '',
|
|
partDesc: '',
|
|
finalPartNo: '',
|
|
customerPartNo: ''
|
|
},
|
|
projectMaterialList: [],
|
|
projectMaterialSelections: [],
|
|
materialSelections: [],
|
|
projectMaterialPageIndex: 1,
|
|
projectMaterialPageSize: 20,
|
|
projectMaterialTotal: 0,
|
|
projectMaterialLoading: false,
|
|
projectList: [],
|
|
fileList: [],
|
|
approvalList: [],
|
|
modalTitle: 'RoHs 新增',
|
|
activeName: 'basicInfo',
|
|
showModalFlag: false,
|
|
submitModalFlag: false,
|
|
rejectOpinion: '',
|
|
submitLoading: false,
|
|
modalData: {
|
|
site: 'DEFAULT',
|
|
referenceNo: '',
|
|
applicant: '',
|
|
pm: '',
|
|
pmName: '',
|
|
applicationDate: '',
|
|
process: '',
|
|
plannedMassProductionDate: '',
|
|
color: '',
|
|
vendorCode: '',
|
|
vendorMaterialCode: '',
|
|
materialClassify: '',
|
|
otherMaterialClassify: '',
|
|
materialUseFor: '',
|
|
endCustomer: '',
|
|
projectId: '',
|
|
commGroup1: '',
|
|
commGroup1Desc: '',
|
|
commGroup2: '',
|
|
commGroup2Desc: '',
|
|
commGroup3: '',
|
|
commGroup3Desc: '',
|
|
needCreateNumber: '',
|
|
npdEngineer: '',
|
|
materialValidityTime: '',
|
|
materialValidityComments: '',
|
|
needDeviation: '',
|
|
technicalPlan: '',
|
|
wmRequiredSpec: '',
|
|
isFiberMaterial: '',
|
|
materialThickness: '',
|
|
buyer: '',
|
|
expectReportTime: 0,
|
|
qualificationDocumentsNeeded: '',
|
|
qualificationDocumentsNeededList: [],
|
|
testReportIncludingItems: '',
|
|
testReportIncludingItemsList: [],
|
|
remark: '',
|
|
status: '',
|
|
sgsReportNumber: '',
|
|
expiredDate: '',
|
|
fiberInformation: '',
|
|
hsfStandard: '',
|
|
validUntil: '',
|
|
isMeetRohsRequirement: '',
|
|
isAhGrade: '',
|
|
hsfSupplierClassification: '',
|
|
materialDesc: '',
|
|
npdRemark: '',
|
|
isSameMaterialDiffSize: '',
|
|
ifsPartNo: '',
|
|
materialList: [],
|
|
createBy2: '',
|
|
isReject: 'Y',
|
|
tpProcessControl: 'N',
|
|
csProcessControl: 'N'
|
|
}
|
|
}
|
|
},
|
|
created () {
|
|
this.menuId = this.$route.meta.menuId
|
|
this.getButtonAuthData()
|
|
this.checkSuperAdmin()
|
|
},
|
|
mounted () {
|
|
if (this.authSearch) {
|
|
this.getDataList()
|
|
}
|
|
this.$nextTick(() => {
|
|
this.height = window.innerHeight / 2 - 30
|
|
/*第二个表格高度的动态调整*/
|
|
this.secondHeight = window.innerHeight / 2 - 186
|
|
})
|
|
},
|
|
methods: {
|
|
materialDialogHeaderCellStyle () {
|
|
return {
|
|
whiteSpace: 'nowrap',
|
|
wordBreak: 'keep-all'
|
|
}
|
|
},
|
|
displayYesNo (value) {
|
|
if (value === 'Y') {
|
|
return '是'
|
|
}
|
|
if (value === 'N') {
|
|
return '否'
|
|
}
|
|
return value || ''
|
|
},
|
|
isCurrentApprover () {
|
|
return this.superAdmin || (this.modalData.createBy2 && this.modalData.createBy2.split(';').includes(this.createBy2))
|
|
},
|
|
canSaveAction () {
|
|
return !this.showModalFlag && (this.modalData.status === '草稿' || (this.modalData.status === '审批中' && this.isCurrentApprover()))
|
|
},
|
|
canAgreeAction () {
|
|
return this.authSubmit && this.isCurrentApprover() && this.modalData.status === '审批中' && this.modalData.tpProcessControl !== 'Y' && this.modalData.csProcessControl !== 'Y'
|
|
},
|
|
canRejectAction () {
|
|
return this.authReject && this.isCurrentApprover() && this.modalData.status === '审批中' && this.modalData.isReject === 'Y'
|
|
},
|
|
loadModalButtonCondition () {
|
|
if (!this.modalData.site || !this.modalData.referenceNo || this.modalData.status !== '审批中') {
|
|
this.$set(this.modalData, 'createBy2', '')
|
|
this.$set(this.modalData, 'isReject', 'Y')
|
|
this.$set(this.modalData, 'tpProcessControl', 'N')
|
|
this.$set(this.modalData, 'csProcessControl', 'N')
|
|
return
|
|
}
|
|
let params = {
|
|
site: this.modalData.site,
|
|
referenceNo: this.modalData.referenceNo
|
|
}
|
|
api.getRohsButtonCondition(params).then(({data}) => {
|
|
if (data && data.code === 0 && data.data) {
|
|
this.$set(this.modalData, 'createBy2', data.data.createBy2 || '')
|
|
this.$set(this.modalData, 'isReject', data.data.isReject || 'Y')
|
|
this.$set(this.modalData, 'tpProcessControl', data.data.tpProcessControl || 'N')
|
|
this.$set(this.modalData, 'csProcessControl', data.data.csProcessControl || 'N')
|
|
} else {
|
|
this.$set(this.modalData, 'createBy2', '')
|
|
this.$set(this.modalData, 'isReject', 'Y')
|
|
this.$set(this.modalData, 'tpProcessControl', 'N')
|
|
this.$set(this.modalData, 'csProcessControl', 'N')
|
|
}
|
|
}).catch(() => {
|
|
this.$set(this.modalData, 'createBy2', '')
|
|
this.$set(this.modalData, 'isReject', 'Y')
|
|
this.$set(this.modalData, 'tpProcessControl', 'N')
|
|
this.$set(this.modalData, 'csProcessControl', 'N')
|
|
})
|
|
},
|
|
// 列表行选中变色
|
|
rowStyle ({row}) {
|
|
if (this.currentRow && this.currentRow.referenceNo === row.referenceNo) {
|
|
return { 'background-color': '#E8F7F6', cursor: 'pointer' }
|
|
}
|
|
},
|
|
// 获取按钮的权限数据
|
|
getButtonAuthData () {
|
|
this.authSearch = this.isAuth(this.menuId+":search")
|
|
this.authUpdate = this.isAuth(this.menuId+":update")
|
|
this.authIssue = this.isAuth(this.menuId+":issue")
|
|
this.authSubmit = this.isAuth(this.menuId+":submit")
|
|
this.authReject = this.isAuth(this.menuId+":reject")
|
|
this.authFileSave = this.isAuth(this.menuId+":fileSave")
|
|
this.authFileDownLoad = this.isAuth(this.menuId+":fileDownLoad")
|
|
this.authFileRemove = this.isAuth(this.menuId+":fileRemove")
|
|
this.authFilePreview = this.isAuth(this.menuId+":filePreview")
|
|
this.authDelete = this.isAuth(this.menuId+":delete")
|
|
},
|
|
// 校验是否为超级管理员
|
|
checkSuperAdmin () {
|
|
checkSuperAdmin().then(({data}) => {
|
|
this.superAdmin = data.superAdmin
|
|
})
|
|
},
|
|
changeClickRow (row, column, event) {
|
|
// 通过接口或直接赋值,让底部的页签显示当前选中行的数据
|
|
api.getRohsDetail(row.site, row.referenceNo).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.currentRow = data.data || {}
|
|
} else {
|
|
this.currentRow = row || {}
|
|
}
|
|
if (!Array.isArray(this.currentRow.materialList)) {
|
|
this.$set(this.currentRow, 'materialList', [])
|
|
}
|
|
this.loadCurrentRowNames()
|
|
this.refreshCurrentTabTable()
|
|
}).catch(() => {
|
|
this.currentRow = row || {}
|
|
if (!Array.isArray(this.currentRow.materialList)) {
|
|
this.$set(this.currentRow, 'materialList', [])
|
|
}
|
|
this.loadCurrentRowNames()
|
|
this.refreshCurrentTabTable()
|
|
})
|
|
},
|
|
currentChange (val) {
|
|
this.currentRow = val || {}
|
|
if (val) {
|
|
if (!Array.isArray(this.currentRow.materialList)) {
|
|
this.$set(this.currentRow, 'materialList', [])
|
|
}
|
|
this.loadCurrentRowNames()
|
|
this.refreshCurrentTabTable()
|
|
} else {
|
|
this.approvalList = []
|
|
}
|
|
},
|
|
loadCurrentRowNames () {
|
|
if (!this.currentRow) {
|
|
return
|
|
}
|
|
const site = this.currentRow.site || this.$store.state.user.site
|
|
const requestSeq = ++this.currentRowNameSeq
|
|
const setName = (field, value) => {
|
|
if (requestSeq !== this.currentRowNameSeq || !this.currentRow) {
|
|
return
|
|
}
|
|
this.$set(this.currentRow, field, value || '')
|
|
}
|
|
const tasks = []
|
|
if (this.currentRow.applicant) {
|
|
tasks.push(this.queryUserDisplayName(this.currentRow.applicant, site, 103).then(name => setName('applicantName', name)))
|
|
} else {
|
|
setName('applicantName', '')
|
|
}
|
|
if (this.currentRow.pm) {
|
|
tasks.push(this.queryUserDisplayName(this.currentRow.pm, site, 103).then(name => setName('pmName', name)))
|
|
} else {
|
|
setName('pmName', '')
|
|
}
|
|
if (this.currentRow.npdEngineer) {
|
|
tasks.push(this.queryUserDisplayName(this.currentRow.npdEngineer, site, 103).then(name => setName('npdEngineerName', name)))
|
|
} else {
|
|
setName('npdEngineerName', '')
|
|
}
|
|
if (this.currentRow.technicalPlan) {
|
|
tasks.push(this.queryUserDisplayName(this.currentRow.technicalPlan, site, 103).then(name => setName('technicalPlanName', name)))
|
|
} else {
|
|
setName('technicalPlanName', '')
|
|
}
|
|
if (this.currentRow.buyer) {
|
|
tasks.push(this.queryUserDisplayName(this.currentRow.buyer, site, 2000).then(name => setName('buyerName', name)))
|
|
} else {
|
|
setName('buyerName', '')
|
|
}
|
|
if (this.currentRow.endCustomer) {
|
|
tasks.push(this.queryCustomerDisplayName(site, this.currentRow.endCustomer).then(name => setName('endCustomerName', name)))
|
|
} else {
|
|
setName('endCustomerName', '')
|
|
}
|
|
if (this.currentRow.projectId) {
|
|
tasks.push(this.queryProjectDisplayName(site, this.currentRow.endCustomer, this.currentRow.projectId).then(name => setName('projectName', name)))
|
|
} else {
|
|
setName('projectName', '')
|
|
}
|
|
if (this.currentRow.commGroup1) {
|
|
tasks.push(this.queryCommGroupDisplayName(site, this.currentRow.commGroup1, 110).then(name => setName('commGroup1Desc', name)))
|
|
} else {
|
|
setName('commGroup1Desc', '')
|
|
}
|
|
if (this.currentRow.commGroup2) {
|
|
tasks.push(this.queryCommGroupDisplayName(site, this.currentRow.commGroup2, 111).then(name => setName('commGroup2Desc', name)))
|
|
} else {
|
|
setName('commGroup2Desc', '')
|
|
}
|
|
if (this.currentRow.commGroup3) {
|
|
tasks.push(this.queryCommGroupDisplayName(site, this.currentRow.commGroup3, 130).then(name => setName('commGroup3Desc', name)))
|
|
} else {
|
|
setName('commGroup3Desc', '')
|
|
}
|
|
if (tasks.length > 0) {
|
|
Promise.all(tasks).catch(() => {})
|
|
}
|
|
},
|
|
queryUserDisplayName (username, site, tagno) {
|
|
if (!username) {
|
|
return Promise.resolve('')
|
|
}
|
|
let tempData = {
|
|
tagno: tagno,
|
|
conditionSql: " and a.username = '" + username + "'" + " and b.site = '" + site + "'"
|
|
}
|
|
return verifyData(tempData).then(({data}) => {
|
|
if (data && data.code === 0 && data.baseListData && data.baseListData.length > 0) {
|
|
return data.baseListData[0].user_display || ''
|
|
}
|
|
return ''
|
|
}).catch(() => {
|
|
return ''
|
|
})
|
|
},
|
|
queryCustomerDisplayName (site, customerNo) {
|
|
if (!customerNo) {
|
|
return Promise.resolve('')
|
|
}
|
|
return queryCustomer({ site, customerNo }).then(({data}) => {
|
|
if (data && data.code === 0 && data.rows && data.rows.length > 0) {
|
|
const customer = data.rows[0]
|
|
return customer.customerDesc || customer.Customer_desc || customer.customerName || ''
|
|
}
|
|
return ''
|
|
}).catch(() => {
|
|
return ''
|
|
})
|
|
},
|
|
queryProjectDisplayName (site, customerId, projectId) {
|
|
if (!projectId) {
|
|
return Promise.resolve('')
|
|
}
|
|
let params = { site, projectId }
|
|
if (customerId) {
|
|
params.customerId = customerId
|
|
}
|
|
return queryProjectByCustomer(params).then(({data}) => {
|
|
if (data && data.code === 0 && data.rows && data.rows.length > 0) {
|
|
return data.rows[0].projectName || data.rows[0].Project_name || ''
|
|
}
|
|
return ''
|
|
}).catch(() => {
|
|
return ''
|
|
})
|
|
},
|
|
queryCommGroupDisplayName (site, commGroup, tagno) {
|
|
if (!commGroup) {
|
|
return Promise.resolve('')
|
|
}
|
|
let tempData = {
|
|
tagno: tagno,
|
|
conditionSql: " and product_group_id = '" + commGroup + "'" + " and site = '" + site + "'"
|
|
}
|
|
return verifyData(tempData).then(({data}) => {
|
|
if (data && data.code === 0 && data.baseListData && data.baseListData.length > 0) {
|
|
return data.baseListData[0].product_group_name || ''
|
|
}
|
|
return ''
|
|
}).catch(() => {
|
|
return ''
|
|
})
|
|
},
|
|
refreshCurrentTabTable () {
|
|
if (this.activeTable === 'approvalInformation') {
|
|
this.getApprovalList()
|
|
}
|
|
},
|
|
getApprovalList () {
|
|
if (!this.currentRow || !this.currentRow.site || !this.currentRow.referenceNo) {
|
|
this.approvalList = []
|
|
return
|
|
}
|
|
let params = {
|
|
site: this.currentRow.site,
|
|
menuId: this.menuId,
|
|
documentNo: this.currentRow.referenceNo
|
|
}
|
|
api.getRohsApprovalList(params).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.approvalList = data.rows || []
|
|
} else {
|
|
this.approvalList = []
|
|
}
|
|
}).catch(() => {
|
|
this.approvalList = []
|
|
})
|
|
},
|
|
|
|
// 获取列表
|
|
getDataList () {
|
|
if (!this.authSearch) {
|
|
this.dataList = []
|
|
this.totalPage = 0
|
|
this.currentRow = {}
|
|
this.approvalList = []
|
|
return
|
|
}
|
|
this.dataListLoading = true
|
|
let params = {
|
|
page: this.pageIndex,
|
|
limit: this.pageSize,
|
|
site: this.$store.state.user.site,
|
|
referenceNo: this.searchData.referenceNo,
|
|
applicant: this.searchData.applicant
|
|
}
|
|
api.getRohsList(params).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.dataList = data.page.list
|
|
this.totalPage = data.page.totalCount
|
|
this.$nextTick(() => {
|
|
if (this.$refs.rohsTable && this.dataList.length > 0) {
|
|
this.$refs.rohsTable.setCurrentRow(this.dataList[0])
|
|
} else if (this.$refs.rohsTable) {
|
|
this.$refs.rohsTable.setCurrentRow()
|
|
}
|
|
})
|
|
} else {
|
|
this.dataList = []
|
|
this.totalPage = 0
|
|
this.currentRow = {}
|
|
this.approvalList = []
|
|
}
|
|
this.dataListLoading = false
|
|
}).catch(() => {
|
|
this.currentRow = {}
|
|
this.approvalList = []
|
|
this.dataListLoading = false
|
|
})
|
|
},
|
|
// 分页
|
|
sizeChangeHandle (val) {
|
|
this.pageSize = val
|
|
this.pageIndex = 1
|
|
this.getDataList()
|
|
},
|
|
currentChangeHandle (val) {
|
|
this.pageIndex = val
|
|
this.getDataList()
|
|
},
|
|
// 搜索条件点击
|
|
searchHandle () {
|
|
if (!this.authSearch) {
|
|
return
|
|
}
|
|
this.pageIndex = 1
|
|
this.getDataList()
|
|
},
|
|
// 单选可取消
|
|
radioClick (field, value) {
|
|
if (this.modalData[field] === value) {
|
|
this.modalData[field] = ''
|
|
} else {
|
|
this.modalData[field] = value
|
|
}
|
|
},
|
|
// 导出
|
|
exportHandle () {
|
|
if (!this.authSearch) {
|
|
return
|
|
}
|
|
this.$message.info('导出功能开发中')
|
|
},
|
|
// 新增 / 修改
|
|
addOrUpdateHandle (row) {
|
|
if (!row && !this.authUpdate) {
|
|
this.$message.warning('没有新增权限')
|
|
return
|
|
}
|
|
if (row && !this.authUpdate) {
|
|
this.$message.warning('没有编辑权限')
|
|
return
|
|
}
|
|
this.modalFlag = true
|
|
this.activeName = 'basicInfo'
|
|
this.fileList = []
|
|
this.uploadDialog = false
|
|
this.submitModalFlag = false
|
|
this.rejectOpinion = ''
|
|
this.projectMaterialDialogFlag = false
|
|
this.projectMaterialSelections = []
|
|
this.materialSelections = []
|
|
this.projectMaterialPageIndex = 1
|
|
this.projectMaterialTotal = 0
|
|
this.projectMaterialList = []
|
|
this.projectMaterialSearchData = {
|
|
testPartNo: '',
|
|
partDesc: '',
|
|
finalPartNo: '',
|
|
customerPartNo: ''
|
|
}
|
|
this.showModalFlag = !!(row && row.status === '已完成')
|
|
|
|
if (row) {
|
|
this.modalTitle = 'RoHs 编辑'
|
|
api.getRohsDetail(row.site, row.referenceNo).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.modalData = data.data || {}
|
|
this.$set(this.modalData, 'qualificationDocumentsNeededList', this.modalData.qualificationDocumentsNeeded ? this.modalData.qualificationDocumentsNeeded.split(';').filter(item => item) : [])
|
|
this.$set(this.modalData, 'testReportIncludingItemsList', this.modalData.testReportIncludingItems ? this.modalData.testReportIncludingItems.split(';').filter(item => item) : [])
|
|
this.$set(this.modalData, 'materialClassifyList', this.modalData.materialClassify ? this.modalData.materialClassify.split(';').filter(item => item) : [])
|
|
this.$set(this.modalData, 'materialList', Array.isArray(this.modalData.materialList) ? this.modalData.materialList : [])
|
|
// Initialize names for display if needed
|
|
this.$set(this.modalData, 'applicantName', '')
|
|
this.$set(this.modalData, 'pmName', '')
|
|
this.$set(this.modalData, 'buyerName', '')
|
|
this.$set(this.modalData, 'npdEngineerName', '')
|
|
this.$set(this.modalData, 'technicalPlanName', '')
|
|
this.$set(this.modalData, 'endCustomerName', '')
|
|
this.$set(this.modalData, 'projectName', '')
|
|
this.$set(this.modalData, 'commGroup1Desc', '')
|
|
this.$set(this.modalData, 'commGroup2Desc', '')
|
|
this.$set(this.modalData, 'commGroup3Desc', '')
|
|
// 编辑时允许重新选择客户和项目
|
|
this.$set(this.modalData, 'endCustomerFlag', false)
|
|
this.$set(this.modalData, 'projectIdFlag', !this.modalData.endCustomer)
|
|
this.$set(this.modalData, 'createBy2', '')
|
|
this.$set(this.modalData, 'isReject', 'Y')
|
|
this.$set(this.modalData, 'tpProcessControl', 'N')
|
|
this.$set(this.modalData, 'csProcessControl', 'N')
|
|
|
|
// Try to trigger verify data on open to fetch names
|
|
this.applicantBlur(103)
|
|
this.pmBlur(103)
|
|
this.buyerBlur(2000)
|
|
this.npdEngineerBlur(103)
|
|
this.technicalPlanBlur(103)
|
|
this.commGroup1Blur(110)
|
|
this.commGroup2Blur(111)
|
|
this.commGroup3Blur(130)
|
|
this.handleQueryCustomer()
|
|
this.handleQueryProjectByCustomer()
|
|
this.loadModalButtonCondition()
|
|
}
|
|
})
|
|
} else {
|
|
this.modalTitle = 'RoHs 新增'
|
|
this.showModalFlag = false
|
|
// 生成一个临时ID用于附件上传绑定
|
|
const tempReferenceNo = 'TEMP-' + new Date().getTime() + '-' + Math.floor(Math.random() * 1000)
|
|
this.modalData = {
|
|
site: this.$store.state.user.site,
|
|
referenceNo: tempReferenceNo,
|
|
applicant: '',
|
|
applicantName: '',
|
|
pm: '',
|
|
pmName: '',
|
|
applicationDate: '',
|
|
process: '',
|
|
plannedMassProductionDate: '',
|
|
color: '',
|
|
vendorCode: '',
|
|
vendorMaterialCode: '',
|
|
materialClassify: '',
|
|
materialClassifyList: [],
|
|
otherMaterialClassify: '',
|
|
materialUseFor: '',
|
|
endCustomer: '',
|
|
endCustomerName: '',
|
|
endCustomerFlag: false,
|
|
projectId: '',
|
|
projectName: '',
|
|
projectIdFlag: true,
|
|
commGroup1: '',
|
|
commGroup1Desc: '',
|
|
commGroup2: '',
|
|
commGroup2Desc: '',
|
|
commGroup3: '',
|
|
commGroup3Desc: '',
|
|
needCreateNumber: '',
|
|
npdEngineer: '',
|
|
npdEngineerName: '',
|
|
materialValidityTime: '',
|
|
materialValidityComments: '',
|
|
needDeviation: '',
|
|
technicalPlan: '',
|
|
wmRequiredSpec: '',
|
|
isFiberMaterial: '',
|
|
materialThickness: '',
|
|
buyer: '',
|
|
buyerName: '',
|
|
expectReportTime: 0,
|
|
qualificationDocumentsNeeded: '',
|
|
qualificationDocumentsNeededList: [],
|
|
testReportIncludingItems: '',
|
|
testReportIncludingItemsList: [],
|
|
remark: '',
|
|
status: '草稿',
|
|
sgsReportNumber: '',
|
|
expiredDate: '',
|
|
fiberInformation: '',
|
|
hsfStandard: '',
|
|
validUntil: '',
|
|
isMeetRohsRequirement: '',
|
|
isAhGrade: '',
|
|
hsfSupplierClassification: '',
|
|
materialDesc: '',
|
|
npdRemark: '',
|
|
isSameMaterialDiffSize: '',
|
|
ifsPartNo: '',
|
|
materialList: [],
|
|
createBy2: '',
|
|
isReject: 'Y',
|
|
tpProcessControl: 'N',
|
|
csProcessControl: 'N'
|
|
}
|
|
}
|
|
},
|
|
// 表单提交
|
|
dataFormSubmit () {
|
|
if (!this.canSaveAction()) {
|
|
this.$message.warning('当前状态不允许保存')
|
|
return
|
|
}
|
|
this.modalData.qualificationDocumentsNeeded = this.modalData.qualificationDocumentsNeededList.join(';')
|
|
this.modalData.testReportIncludingItems = this.modalData.testReportIncludingItemsList.join(';')
|
|
this.modalData.materialClassify = this.modalData.materialClassifyList.join(';')
|
|
this.modalData.materialList = (this.modalData.materialList || []).map((item, index) => {
|
|
return {
|
|
...item,
|
|
lineNo: index + 1,
|
|
projectId: this.modalData.projectId
|
|
}
|
|
})
|
|
this.modalData.ifsPartNo = this.modalData.materialList.length > 0 ? this.modalData.materialList[0].testPartNo : ''
|
|
|
|
const submitMethod = this.modalTitle === 'RoHs 新增' ? api.saveRohs : api.updateRohs
|
|
submitMethod(this.modalData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.$message.success('操作成功')
|
|
this.modalFlag = false
|
|
this.getDataList()
|
|
} else {
|
|
this.$message.error(data.msg || '操作失败')
|
|
}
|
|
})
|
|
},
|
|
// 同意
|
|
agreeSubmit () {
|
|
if (!this.canAgreeAction()) {
|
|
this.$message.warning('当前状态不允许同意')
|
|
return
|
|
}
|
|
this.$confirm('确认同意该申请单?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
}).then(() => {
|
|
this.submitRohs('Y')
|
|
})
|
|
},
|
|
openRejectModal () {
|
|
if (!this.canRejectAction()) {
|
|
this.$message.warning('当前状态不允许驳回')
|
|
return
|
|
}
|
|
this.rejectOpinion = ''
|
|
this.submitModalFlag = true
|
|
},
|
|
// 驳回
|
|
rejectSubmit () {
|
|
if (!this.rejectOpinion || !this.rejectOpinion.trim()) {
|
|
this.$message.warning('请填写驳回意见')
|
|
return
|
|
}
|
|
this.submitRohs('N')
|
|
},
|
|
submitRohs (nodeConclusion) {
|
|
if (nodeConclusion === 'Y' && !this.canAgreeAction()) {
|
|
this.$message.warning('当前状态不允许同意')
|
|
return
|
|
}
|
|
if (nodeConclusion === 'N' && !this.canRejectAction()) {
|
|
this.$message.warning('当前状态不允许驳回')
|
|
return
|
|
}
|
|
if (!this.modalData.site || !this.modalData.referenceNo) {
|
|
this.$message.warning('单据主键信息缺失,无法提交审批')
|
|
return
|
|
}
|
|
this.submitLoading = true
|
|
let params = {
|
|
site: this.modalData.site,
|
|
referenceNo: this.modalData.referenceNo,
|
|
nodeConclusion: nodeConclusion,
|
|
rejectOpinion: nodeConclusion === 'N' ? this.rejectOpinion : '',
|
|
menuId: this.menuId,
|
|
documentNo: this.modalData.referenceNo
|
|
}
|
|
api.submitRohs(params).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.$message.success(nodeConclusion === 'Y' ? '同意成功' : '驳回成功')
|
|
this.submitModalFlag = false
|
|
this.modalFlag = false
|
|
this.getDataList()
|
|
} else {
|
|
this.$message.error(data.msg || '提交失败')
|
|
}
|
|
this.submitLoading = false
|
|
}).catch(() => {
|
|
this.submitLoading = false
|
|
})
|
|
},
|
|
// 下达
|
|
issueModal (row) {
|
|
if (!this.authIssue) {
|
|
this.$message.warning('没有下达权限')
|
|
return
|
|
}
|
|
this.$confirm('确认下达该申请单?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
}).then(() => {
|
|
let params = {
|
|
site: row.site,
|
|
referenceNo: row.referenceNo,
|
|
menuId: this.menuId
|
|
}
|
|
api.issueRohs(params).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.$message.success('下达成功')
|
|
if (this.modalFlag && this.modalData.referenceNo === row.referenceNo) {
|
|
this.modalData.status = '审批中'
|
|
}
|
|
this.getDataList()
|
|
} else {
|
|
this.$message.error(data.msg || '下达失败')
|
|
}
|
|
})
|
|
})
|
|
},
|
|
openProjectMaterialDialog () {
|
|
if (!this.modalData.projectId) {
|
|
this.$message.warning('请先选择项目编码')
|
|
return
|
|
}
|
|
if (!this.modalData.endCustomer) {
|
|
this.$message.warning('请先选择最终客户')
|
|
return
|
|
}
|
|
this.projectMaterialDialogFlag = true
|
|
this.projectMaterialPageIndex = 1
|
|
this.searchProjectMaterialList()
|
|
},
|
|
searchProjectMaterialList () {
|
|
if (!this.modalData.projectId) {
|
|
this.projectMaterialList = []
|
|
this.projectMaterialTotal = 0
|
|
return
|
|
}
|
|
this.projectMaterialLoading = true
|
|
const params = {
|
|
page: this.projectMaterialPageIndex,
|
|
limit: this.projectMaterialPageSize,
|
|
site: this.$store.state.user.site,
|
|
projectId: this.modalData.projectId,
|
|
endCustomer: this.modalData.endCustomer,
|
|
testPartNo: this.projectMaterialSearchData.testPartNo,
|
|
partDesc: this.projectMaterialSearchData.partDesc,
|
|
finalPartNo: this.projectMaterialSearchData.finalPartNo,
|
|
customerPartNo: this.projectMaterialSearchData.customerPartNo
|
|
}
|
|
api.getRohsProjectMaterialList(params).then(({data}) => {
|
|
if (data && data.code === 0 && data.page) {
|
|
this.projectMaterialList = data.page.list || []
|
|
this.projectMaterialTotal = data.page.totalCount || 0
|
|
this.$nextTick(() => {
|
|
if (this.$refs.projectMaterialTable) {
|
|
this.$refs.projectMaterialTable.clearSelection()
|
|
}
|
|
})
|
|
} else {
|
|
this.projectMaterialList = []
|
|
this.projectMaterialTotal = 0
|
|
this.$message.error(data.msg || '项目物料查询失败')
|
|
}
|
|
this.projectMaterialLoading = false
|
|
}).catch(() => {
|
|
this.projectMaterialList = []
|
|
this.projectMaterialTotal = 0
|
|
this.projectMaterialLoading = false
|
|
})
|
|
},
|
|
projectMaterialSelectionChange (rows) {
|
|
this.projectMaterialSelections = rows || []
|
|
},
|
|
projectMaterialSizeChangeHandle (val) {
|
|
this.projectMaterialPageSize = val
|
|
this.projectMaterialPageIndex = 1
|
|
this.searchProjectMaterialList()
|
|
},
|
|
projectMaterialCurrentChangeHandle (val) {
|
|
this.projectMaterialPageIndex = val
|
|
this.searchProjectMaterialList()
|
|
},
|
|
confirmProjectMaterialSelection () {
|
|
if (!this.projectMaterialSelections || this.projectMaterialSelections.length === 0) {
|
|
this.$message.warning('请至少选择一条项目物料')
|
|
return
|
|
}
|
|
this.appendMaterialRows(this.projectMaterialSelections)
|
|
this.projectMaterialDialogFlag = false
|
|
},
|
|
appendMaterialRows (rows) {
|
|
const materialList = Array.isArray(this.modalData.materialList) ? [...this.modalData.materialList] : []
|
|
const exists = new Set(materialList.map(item => item.testPartNo))
|
|
rows.forEach(row => {
|
|
const testPartNo = row.testPartNo || row.test_part_no
|
|
if (!testPartNo || exists.has(testPartNo)) {
|
|
return
|
|
}
|
|
exists.add(testPartNo)
|
|
materialList.push({
|
|
site: this.modalData.site,
|
|
referenceNo: this.modalData.referenceNo,
|
|
projectId: this.modalData.projectId,
|
|
testPartNo: testPartNo,
|
|
finalPartNo: row.finalPartNo || row.final_part_no || '',
|
|
customerPartNo: row.customerPartNo || row.customer_part_no || '',
|
|
partDesc: row.partDesc || row.part_desc || '',
|
|
partSpec: row.partSpec || row.part_spec || ''
|
|
})
|
|
})
|
|
this.$set(this.modalData, 'materialList', materialList)
|
|
},
|
|
materialSelectionChange (rows) {
|
|
this.materialSelections = rows || []
|
|
},
|
|
removeSelectedMaterialRows () {
|
|
if (this.showModalFlag) {
|
|
return
|
|
}
|
|
if (!this.materialSelections || this.materialSelections.length === 0) {
|
|
this.$message.warning('请先选择要删除的材料')
|
|
return
|
|
}
|
|
const removeSet = new Set(this.materialSelections.map(item => item.testPartNo))
|
|
const materialList = (this.modalData.materialList || []).filter(item => !removeSet.has(item.testPartNo))
|
|
this.$set(this.modalData, 'materialList', materialList)
|
|
this.materialSelections = []
|
|
},
|
|
// ======== chooseList相关方法 ========
|
|
// 获取基础数据列表
|
|
getBaseList (val, type) {
|
|
this.tagNo = val
|
|
this.tagNo1 = type
|
|
this.$nextTick(() => {
|
|
let strVal = ''
|
|
let conSql = ''
|
|
if (val === 102) {
|
|
if (type === 1) {
|
|
strVal = this.modalData.endCustomer
|
|
}
|
|
}
|
|
if (val === 103) {
|
|
if (type === 1) {
|
|
strVal = this.modalData.applicant
|
|
} else if (type === 3) {
|
|
strVal = this.modalData.npdEngineer
|
|
} else if (type === 4) {
|
|
strVal = this.modalData.technicalPlan
|
|
} else if (type === 5) {
|
|
strVal = this.modalData.pm
|
|
}
|
|
conSql = " and b.site = '" + this.$store.state.user.site + "'"
|
|
}
|
|
if (val === 2000) {
|
|
strVal = this.modalData.buyer
|
|
conSql = " and b.site = '" + this.$store.state.user.site + "'"
|
|
}
|
|
if (val === 110) {
|
|
strVal = this.modalData.commGroup1
|
|
}
|
|
if (val === 111) {
|
|
strVal = this.modalData.commGroup2
|
|
}
|
|
if (val === 130) {
|
|
strVal = this.modalData.commGroup3
|
|
}
|
|
this.$refs.baseList.init(val, strVal, conSql)
|
|
})
|
|
},
|
|
// 列表方法的回调
|
|
getBaseData (val) {
|
|
if (this.tagNo === 102) {
|
|
if (this.tagNo1 === 1) {
|
|
if (val.Customer_no === this.modalData.endCustomer) {
|
|
return
|
|
}
|
|
if (this.modalData.projectIdFlag) {
|
|
this.modalData.projectIdFlag = false
|
|
}
|
|
this.modalData.endCustomer = val.Customer_no
|
|
this.modalData.endCustomerName = val.Customer_desc
|
|
this.modalData.projectId = ''
|
|
this.modalData.projectName = ''
|
|
this.$set(this.modalData, 'materialList', [])
|
|
}
|
|
}
|
|
if (this.tagNo === 103) {
|
|
if (this.tagNo1 === 1) {
|
|
this.modalData.applicant = val.username
|
|
this.modalData.applicantName = val.user_display
|
|
} else if (this.tagNo1 === 3) {
|
|
this.modalData.npdEngineer = val.username
|
|
this.modalData.npdEngineerName = val.user_display
|
|
} else if (this.tagNo1 === 4) {
|
|
this.modalData.technicalPlan = val.username
|
|
this.modalData.technicalPlanName = val.user_display
|
|
} else if (this.tagNo1 === 5) {
|
|
this.modalData.pm = val.username
|
|
this.modalData.pmName = val.user_display
|
|
}
|
|
}
|
|
if (this.tagNo === 110) {
|
|
this.modalData.commGroup1 = val.product_group_id
|
|
this.modalData.commGroup1Desc = val.product_group_name
|
|
}
|
|
if (this.tagNo === 111) {
|
|
this.modalData.commGroup2 = val.product_group_id
|
|
this.modalData.commGroup2Desc = val.product_group_name
|
|
}
|
|
if (this.tagNo === 130) {
|
|
this.modalData.commGroup3 = val.product_group_id
|
|
this.modalData.commGroup3Desc = val.product_group_name
|
|
}
|
|
if (this.tagNo === 2000) {
|
|
this.modalData.buyer = val.username
|
|
this.modalData.buyerName = val.user_display
|
|
}
|
|
},
|
|
handleQueryCustomer() {
|
|
if (!this.modalData.endCustomer) {
|
|
this.modalData.endCustomerName = ''
|
|
this.modalData.projectId = ''
|
|
this.modalData.projectName = ''
|
|
this.modalData.projectIdFlag = true
|
|
this.$set(this.modalData, 'materialList', [])
|
|
return
|
|
}
|
|
let params = {
|
|
site: this.$store.state.user.site,
|
|
customerNo: this.modalData.endCustomer
|
|
}
|
|
queryCustomer(params).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
if (data.rows && data.rows.length === 1) {
|
|
const customer = data.rows[0]
|
|
this.modalData.endCustomerName = customer.customerDesc || customer.Customer_desc || customer.customerName || ''
|
|
this.modalData.projectIdFlag = false
|
|
} else {
|
|
this.modalData.endCustomerName = ''
|
|
this.modalData.projectId = ''
|
|
this.modalData.projectName = ''
|
|
this.modalData.projectIdFlag = true
|
|
this.$set(this.modalData, 'materialList', [])
|
|
}
|
|
} else {
|
|
this.modalData.endCustomerName = ''
|
|
this.modalData.projectId = ''
|
|
this.modalData.projectName = ''
|
|
this.modalData.projectIdFlag = true
|
|
this.$set(this.modalData, 'materialList', [])
|
|
}
|
|
}).catch((error) => {
|
|
this.modalData.endCustomerName = ''
|
|
this.modalData.projectId = ''
|
|
this.modalData.projectName = ''
|
|
this.modalData.projectIdFlag = true
|
|
this.$set(this.modalData, 'materialList', [])
|
|
})
|
|
},
|
|
handleQueryProjectByCustomer() {
|
|
if (!this.modalData.projectId) {
|
|
this.modalData.projectName = ''
|
|
return
|
|
}
|
|
let params = {
|
|
site: this.$store.state.user.site,
|
|
projectId: this.modalData.projectId
|
|
}
|
|
if (this.modalData.endCustomer) {
|
|
params.customerId = this.modalData.endCustomer
|
|
}
|
|
queryProjectByCustomer(params).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
if (data.rows && data.rows.length === 1) {
|
|
const project = data.rows[0]
|
|
this.modalData.projectName = project.projectName || project.Project_name || ''
|
|
} else {
|
|
this.modalData.projectName = ''
|
|
}
|
|
} else {
|
|
this.modalData.projectName = ''
|
|
}
|
|
}).catch((error) => {
|
|
this.modalData.projectName = ''
|
|
})
|
|
},
|
|
projectClickRow(row) {
|
|
const oldProjectId = this.modalData.projectId
|
|
this.modalData.projectId = row.projectId
|
|
this.modalData.projectName = row.projectName
|
|
if (this.modalData.endCustomer && this.modalData.endCustomer !== '') {
|
|
// do nothing
|
|
} else {
|
|
this.modalData.endCustomer = row.customerId
|
|
this.modalData.endCustomerName = row.customerName
|
|
}
|
|
if (oldProjectId && oldProjectId !== row.projectId) {
|
|
this.$set(this.modalData, 'materialList', [])
|
|
}
|
|
this.chooseProjectListFlag = false
|
|
},
|
|
searchProjectInfoList() {
|
|
this.projectList = [];
|
|
if (this.modalData.endCustomer && this.modalData.endCustomer !== '') {
|
|
this.searchProjectData.customerId = this.modalData.endCustomer
|
|
} else {
|
|
this.searchProjectData.customerId = undefined
|
|
}
|
|
this.searchProjectData.site = this.$store.state.user.site
|
|
searchProjectInfoList(this.searchProjectData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
const rows = data.rows || []
|
|
this.projectList = rows
|
|
if ((!this.modalData.endCustomer || this.modalData.endCustomer === '') && rows.length > 0) {
|
|
this.modalData.projectId = rows[0].projectId
|
|
this.modalData.projectName = rows[0].projectName
|
|
this.modalData.endCustomer = rows[0].customerId
|
|
this.modalData.endCustomerName = rows[0].customerName
|
|
}
|
|
} else {
|
|
this.projectList = []
|
|
}
|
|
}).catch((error) => {
|
|
this.$message.error('查询项目信息失败')
|
|
})
|
|
},
|
|
closeProjectInfoDialog() {
|
|
if(this.$refs.closeProjectInfoForm) {
|
|
this.$refs.closeProjectInfoForm.resetFields();
|
|
}
|
|
this.searchProjectData = {
|
|
site: this.$store.state.user.site,
|
|
projectId: undefined,
|
|
projectName: undefined,
|
|
customerId: undefined,
|
|
}
|
|
},
|
|
// 申请人输入校验
|
|
applicantBlur (tagNo) {
|
|
if (this.modalData.applicant != null && this.modalData.applicant !== '') {
|
|
let tempData = {
|
|
tagno: tagNo,
|
|
conditionSql: " and a.username = '" + this.modalData.applicant + "'" + " and b.site = '" + this.$store.state.user.site + "'"
|
|
}
|
|
verifyData(tempData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
if (data.baseListData.length > 0) {
|
|
this.modalData.applicant = data.baseListData[0].username
|
|
this.modalData.applicantName = data.baseListData[0].user_display
|
|
return
|
|
}
|
|
}
|
|
this.modalData.applicantName = ''
|
|
})
|
|
} else {
|
|
this.modalData.applicantName = ''
|
|
}
|
|
},
|
|
// PM输入校验
|
|
pmBlur (tagNo) {
|
|
if (this.modalData.pm != null && this.modalData.pm !== '') {
|
|
let tempData = {
|
|
tagno: tagNo,
|
|
conditionSql: " and a.username = '" + this.modalData.pm + "'" + " and b.site = '" + this.$store.state.user.site + "'"
|
|
}
|
|
verifyData(tempData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
if (data.baseListData.length > 0) {
|
|
this.modalData.pm = data.baseListData[0].username
|
|
this.modalData.pmName = data.baseListData[0].user_display
|
|
return
|
|
}
|
|
}
|
|
this.modalData.pmName = ''
|
|
})
|
|
} else {
|
|
this.modalData.pmName = ''
|
|
}
|
|
},
|
|
// NPD工程师输入校验
|
|
npdEngineerBlur (tagNo) {
|
|
if (this.modalData.npdEngineer != null && this.modalData.npdEngineer !== '') {
|
|
let tempData = {
|
|
tagno: tagNo,
|
|
conditionSql: " and a.username = '" + this.modalData.npdEngineer + "'" + " and b.site = '" + this.$store.state.user.site + "'"
|
|
}
|
|
verifyData(tempData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
if (data.baseListData.length > 0) {
|
|
this.modalData.npdEngineer = data.baseListData[0].username
|
|
this.modalData.npdEngineerName = data.baseListData[0].user_display
|
|
return
|
|
}
|
|
}
|
|
this.modalData.npdEngineerName = ''
|
|
})
|
|
} else {
|
|
this.modalData.npdEngineerName = ''
|
|
}
|
|
},
|
|
// 技术计划输入校验
|
|
technicalPlanBlur (tagNo) {
|
|
if (this.modalData.technicalPlan != null && this.modalData.technicalPlan !== '') {
|
|
let tempData = {
|
|
tagno: tagNo,
|
|
conditionSql: " and a.username = '" + this.modalData.technicalPlan + "'" + " and b.site = '" + this.$store.state.user.site + "'"
|
|
}
|
|
verifyData(tempData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
if (data.baseListData.length > 0) {
|
|
this.modalData.technicalPlan = data.baseListData[0].username
|
|
this.modalData.technicalPlanName = data.baseListData[0].user_display
|
|
return
|
|
}
|
|
}
|
|
this.modalData.technicalPlanName = ''
|
|
})
|
|
} else {
|
|
this.modalData.technicalPlanName = ''
|
|
}
|
|
},
|
|
// 采购输入校验
|
|
buyerBlur (tagNo) {
|
|
if (this.modalData.buyer != null && this.modalData.buyer !== '') {
|
|
let tempData = {
|
|
tagno: tagNo,
|
|
conditionSql: " and a.username = '" + this.modalData.buyer + "'" + " and b.site = '" + this.$store.state.user.site + "'"
|
|
}
|
|
verifyData(tempData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
if (data.baseListData.length > 0) {
|
|
this.modalData.buyer = data.baseListData[0].username
|
|
this.modalData.buyerName = data.baseListData[0].user_display
|
|
return
|
|
}
|
|
}
|
|
this.modalData.buyerName = ''
|
|
})
|
|
} else {
|
|
this.modalData.buyerName = ''
|
|
}
|
|
},
|
|
// 商品组1输入校验
|
|
commGroup1Blur (tagNo) {
|
|
if (this.modalData.commGroup1 != null && this.modalData.commGroup1 !== '') {
|
|
let tempData = {
|
|
tagno: tagNo,
|
|
conditionSql: " and product_group_id = '" + this.modalData.commGroup1 + "'" + " and site = '" + this.$store.state.user.site + "'"
|
|
}
|
|
verifyData(tempData).then(({data}) => {
|
|
if (data && data.code === 0 && data.baseListData.length > 0) {
|
|
this.modalData.commGroup1 = data.baseListData[0].product_group_id
|
|
this.modalData.commGroup1Desc = data.baseListData[0].product_group_name
|
|
} else {
|
|
this.modalData.commGroup1Desc = ''
|
|
}
|
|
})
|
|
} else {
|
|
this.modalData.commGroup1Desc = ''
|
|
}
|
|
},
|
|
// 商品组2输入校验
|
|
commGroup2Blur (tagNo) {
|
|
if (this.modalData.commGroup2 != null && this.modalData.commGroup2 !== '') {
|
|
let tempData = {
|
|
tagno: tagNo,
|
|
conditionSql: " and product_group_id = '" + this.modalData.commGroup2 + "'" + " and site = '" + this.$store.state.user.site + "'"
|
|
}
|
|
verifyData(tempData).then(({data}) => {
|
|
if (data && data.code === 0 && data.baseListData.length > 0) {
|
|
this.modalData.commGroup2 = data.baseListData[0].product_group_id
|
|
this.modalData.commGroup2Desc = data.baseListData[0].product_group_name
|
|
} else {
|
|
this.modalData.commGroup2Desc = ''
|
|
}
|
|
})
|
|
} else {
|
|
this.modalData.commGroup2Desc = ''
|
|
}
|
|
},
|
|
// 商品组3输入校验
|
|
commGroup3Blur (tagNo) {
|
|
if (this.modalData.commGroup3 != null && this.modalData.commGroup3 !== '') {
|
|
let tempData = {
|
|
tagno: tagNo,
|
|
conditionSql: " and product_group_id = '" + this.modalData.commGroup3 + "'" + " and site = '" + this.$store.state.user.site + "'"
|
|
}
|
|
verifyData(tempData).then(({data}) => {
|
|
if (data && data.code === 0 && data.baseListData.length > 0) {
|
|
this.modalData.commGroup3 = data.baseListData[0].product_group_id
|
|
this.modalData.commGroup3Desc = data.baseListData[0].product_group_name
|
|
} else {
|
|
this.modalData.commGroup3Desc = ''
|
|
}
|
|
})
|
|
} else {
|
|
this.modalData.commGroup3Desc = ''
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
/deep/ .customer-tab .el-tabs__content {
|
|
padding: 0 !important;
|
|
}
|
|
|
|
/deep/ .rohs-material-table .el-table__header-wrapper th > .cell {
|
|
white-space: nowrap;
|
|
word-break: keep-all;
|
|
}
|
|
</style>
|