|
|
<template> <div class="mod-config"> <!-- 查询条件 --> <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()"> <el-form-item label="PLM物料编码"> <el-input v-model="searchData.plmPartNo" clearable style="width: 120px"></el-input> </el-form-item> <el-form-item label="IFS物料编码"> <el-input v-model="searchData.ifsPartNo" clearable style="width: 120px"></el-input> </el-form-item> <el-form-item label="物料名称"> <el-input v-model="searchData.partDesc" clearable style="width: 210px"></el-input> </el-form-item> <el-form-item label="是否在用"> <el-select v-model="searchData.active" clearable style="width: 80px"> <el-option label="启用" value="Y"></el-option> <el-option label="停用" value="N"></el-option> </el-select> </el-form-item> <el-form-item label="物料状态"> <el-select v-model="searchData.status" clearable style="width: 100px"> <el-option label="正式物料" value="Y"></el-option> <el-option label="临时物料" value="N"></el-option> </el-select> </el-form-item> </el-form> <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()"> <el-form-item label="零件类型"> <el-select v-model="searchData.partType" clearable style="width: 150px"> <el-option label="Manufactured" value="Manufactured"></el-option> <el-option label="Manufactured Recipe" value="Manufactured Recipe"></el-option> <el-option label="Purchased (raw)" value="Purchased (raw)"></el-option> <el-option label="Purchased" value="Purchased"></el-option> </el-select> </el-form-item> <el-form-item label="录入时间"> <el-date-picker style="width: 120px" v-model="searchData.startDate" type="date" value-format="yyyy-MM-dd" placeholder="选择日期"> </el-date-picker> </el-form-item> <el-form-item style="margin-top: 23px;"> <label style="margin-left: 0px;font-size: 19px">➞</label> </el-form-item> <el-form-item label=" "> <el-date-picker style="width: 120px" v-model="searchData.endDate" type="date" value-format="yyyy-MM-dd" placeholder="选择日期"> </el-date-picker> </el-form-item> <el-form-item :label="' '"> <el-button @click="getDataList()">查询</el-button> <el-button v-if="isAuth('104001001:save')" type="primary" @click="addModal()">新增</el-button> <el-button v-if="isAuth('104001001:delete')" type="primary" @click="delModal()">删除</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 - 9" :data="dataList" border ref="partTable" :row-style="rowStyle" @row-click="partClickRow" @selection-change="selectionPart" @current-change="changeCurrentRow" style="width: 100%;"> <el-table-column type="selection" header-align="center" align="center" :selectable="selectFlag" 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"> <div v-if="item.columnProp === 'ifsPartNo'"> <el-link style="cursor:pointer;" v-if="!item.columnHidden" @click="toPartMenu(scope.row.ifsPartNo)"> {{ scope.row[item.columnProp] }}</el-link> <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> </div> <div v-else> <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> </div> </template> </el-table-column> <el-table-column fixed="right" header-align="center" align="center" width="100" label="操作"> <template slot-scope="scope"> <el-link v-if="isAuth('104001001:update')" style="cursor: pointer" @click="updateModal(scope.row)">编辑</el-link> <el-link v-if="isAuth('104001001:details')" style="cursor: pointer" @click="detailsModal(scope.row)">详情</el-link> <el-dropdown trigger="click"> <el-link style="cursor: pointer;font-size: 12px"> 更多 </el-link > <el-dropdown-menu slot="dropdown"> <el-dropdown-item v-if="scope.row.ifHasBom === 'Y'" @click.native="toMenu('BOM', scope.row)">产品BOM</el-dropdown-item> <el-dropdown-item v-if="scope.row.ifHasPeifang === 'Y'" @click.native="toMenu('Recipe', scope.row)">配方BOM</el-dropdown-item> <el-dropdown-item @click.native="toMenu('Routing', scope.row)">Routing</el-dropdown-item> <el-dropdown-item v-if="scope.row.temporaryPartFlag === 'Y' && scope.row.status === 'N'" @click.native="toBecomeOfficialPartModal(scope.row)">转正式物料</el-dropdown-item> </el-dropdown-menu> </el-dropdown> </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="modalData.title" top="10vh" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" @close="handleDialogClose" width="1000px"> <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: -5px;"> <el-form-item label="Site"> <el-input v-model="modalData.site" disabled style="width: 60px"></el-input> </el-form-item> <el-form-item label="物料编码 / Part No." prop="partNo" :rules="rules.partNo" style="margin-left: -10px"> <el-input v-model="modalData.partNo" :disabled="modalDisableFlag && !copyFlag2" style="width: 128px" @blur="queryMasterField"></el-input> </el-form-item> <el-form-item label="物料名称 / Part Desc." prop="partDesc" :rules="rules.partDesc" style="margin-left: -10px"> <el-input v-model="modalData.partDesc" clearable style="width: 330px"></el-input> </el-form-item> <el-form-item v-if="modalData.flag === '2' && !copyFlag2" :label="' '"> <el-button type="primary" @click="toCopyPartModal">Copy Part</el-button> </el-form-item> <el-form-item v-if="modalData.flag === '2' && copyFlag2" :label="' '"> <el-button type="primary" @click="nextPartNo3">Next Part No</el-button> </el-form-item> <el-form-item v-if="modalData.flag === '2' && this.modalData.temporaryPartFlag === 'N' && this.modalData.status === 'Y'" :label="' '"> <el-button type="primary" @click="toCopyModal">Copy</el-button> </el-form-item> <el-form-item v-if="modalData.flag === '3'" label="IFS物料编码" prop="ifsPartNo" :rules="[{required: true,message: ' ',trigger: ['blur','change']}]" style="margin-left: -10px"> <el-input v-model="modalData.ifsPartNo" clearable style="width: 130px"></el-input> </el-form-item> <el-form-item v-if="modalData.flag === '3'" :label="' '"> <el-button type="primary" @click="toCopyPartModal">Copy</el-button> </el-form-item> <el-form-item v-if="modalData.flag === '3'" :label="' '"> <el-button type="primary" @click="nextPartNo">Next Part No</el-button> </el-form-item> <el-tabs v-model="inventoryPartTable" style="width: 100%;height: 465px;" type="border-card" @tab-click="inventoryPartClick"> <el-tab-pane label="General" name="General"> <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: -5px;"> <el-form-item label="零件类型 / Part Type" prop="partType" :rules="rules.partType"> <el-select v-model="modalData.partType" :disabled="modalData.flag==='3'" style="width: 458px"> <el-option label="Manufactured" value="Manufactured"></el-option> <el-option label="Manufactured Recipe" value="Manufactured Recipe"></el-option> <el-option label="Purchased (raw)" value="Purchased (raw)"></el-option> <el-option label="Purchased" value="Purchased"></el-option> </el-select> </el-form-item> <el-form-item> <span style="cursor: pointer" slot="label" @click="getBaseList(123)"><a herf="#">安全代码 / Safety Code</a></span> <el-input v-model="modalData.hazardCode" @change="hazardCodeBlur(123)" style="width: 128px"></el-input> <el-input v-model="modalData.hazardDesc" disabled style="width: 327px"></el-input> </el-form-item> </el-form> <el-form :inline="true" label-position="top" :model="modalData" :rules="rules"> <el-form-item prop="productGroupId4" :rules="rules.productGroupId4"> <span style="cursor: pointer" slot="label" @click="getBaseList(113)"><a herf="#">计划人 / Planner</a></span> <el-input v-model="modalData.productGroupId4" @change="productGroupId4Blur(113)" style="width: 128px"></el-input> <el-input v-model="modalData.productGroupName4" disabled style="width: 327px"></el-input> </el-form-item> <el-form-item> <span style="cursor: pointer" slot="label" @click="getBaseList(112)"><a herf="#">会计组 / Accounting Group</a></span> <el-input v-model="modalData.productGroupId3" @change="productGroupId3Blur(112)" style="width: 128px"></el-input> <el-input v-model="modalData.productGroupName3" disabled style="width: 327px"></el-input> </el-form-item> </el-form> <el-form :inline="true" label-position="top" :model="modalData" :rules="rules"> <el-form-item prop="umId" :rules="rules.umId"> <span v-if="modalData.flag === '2' && modalData.status === 'Y'" slot="label">计量单位 / Inventory UoM</span> <span v-else style="cursor: pointer" slot="label" @click="getBaseList(1007)"><a herf="#">计量单位 / Inventory UoM</a></span> <el-input v-model="modalData.umId" :disabled="modalData.flag === '2' && modalData.status === 'Y'" @change="umIdBlur(1007)" style="width: 128px"></el-input> <el-input v-model="modalData.umName" disabled style="width: 327px"></el-input> </el-form-item> <el-form-item> <span style="cursor: pointer" slot="label" @click="getBaseList(109)"><a herf="#">产品代码 / Product Code</a></span> <el-input v-model="modalData.groupId" @change="groupIdBlur(109)" style="width: 128px"></el-input> <el-input v-model="modalData.groupName" disabled style="width: 327px"></el-input> </el-form-item> </el-form> <el-form :inline="true" label-position="top" :model="modalData" :rules="rules"> <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.productGroupId1" @change="productGroupId1Blur(110)" style="width: 128px"></el-input> <el-input v-model="modalData.productGroupName1" disabled style="width: 327px"></el-input> </el-form-item> <el-form-item> <span style="cursor: pointer" slot="label" @click="getBaseList(108)"><a herf="#">产品大类 / Product Family</a></span> <el-input v-model="modalData.familyId" @change="familyIdBlur(108)" style="width: 128px"></el-input> <el-input v-model="modalData.familyName" disabled style="width: 327px"></el-input> </el-form-item> </el-form> <el-form :inline="true" label-position="top" :model="modalData" :rules="rules"> <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.productGroupId2" @change="productGroupId2Blur(111)" style="width: 128px"></el-input> <el-input v-model="modalData.productGroupName2" disabled style="width: 327px"></el-input> </el-form-item> <el-form-item label="类型指定 / Type Designation"> <el-input v-model="modalData.typeDesignation" clearable style="width: 458px"></el-input> </el-form-item> </el-form> <el-form :inline="true" label-position="top" :model="modalData" :rules="rules"> <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: 128px"></el-input> <el-input v-model="modalData.commGroup3Desc" disabled style="width: 327px"></el-input> </el-form-item> </el-form> <el-form :inline="true" label-position="top" :model="modalData" :rules="rules"> <el-form-item> <span style="cursor: pointer" slot="label" @click="getBaseList(124)"><a herf="#">资产等级 / Asset Class</a></span> <el-input v-model="modalData.assetClass" @change="assetClassBlur(124)" style="width: 128px"></el-input> <el-input v-model="modalData.assetClassDesc" disabled style="width: 327px"></el-input> </el-form-item> <el-form-item label="尺寸/材质 / Dimension/Quality"> <el-input v-model="modalData.dimQuality" clearable style="width: 458px"></el-input> </el-form-item> </el-form> <el-form :inline="true" label-position="top" :model="modalData" :rules="rules"> <el-form-item> <span style="cursor: pointer" slot="label" @click="getBaseList(125)"><a herf="#">零件状态 / Part Status</a></span> <el-input v-model="modalData.partStatus" @change="partStatusBlur(125)" style="width: 128px"></el-input> <el-input v-model="modalData.partStatusDesc" disabled style="width: 327px"></el-input> </el-form-item> <el-form-item label="净重"> <el-input class="inlineNumber numInput" v-model="modalData.weightNet" readonly type="number" style="width: 110px"></el-input> </el-form-item> <el-form-item label="净重单位" style="margin-left: -10px"> <el-input v-model="modalData.uomForWeightNet" readonly style="width: 110px"></el-input> </el-form-item> <el-form-item label="频率级别 / Frequency Class"> <el-input v-model="modalData.frequencyClass" readonly style="width: 220px"></el-input> </el-form-item> </el-form> <el-form :inline="true" label-position="top" :model="modalData" :rules="rules"> <el-form-item> <span style="cursor: pointer" slot="label" v-if="!modalDisableFlag"><a herf="#">ABC类 / ABC Class</a></span> <span style="cursor: pointer" slot="label" v-else @click="getBaseList(126)"><a herf="#">ABC类 / ABC Class</a></span> <el-input v-model="modalData.abcClass" @change="abcClassBlur(126)" :readonly="!modalDisableFlag" style="width: 128px"></el-input> <el-input v-model="modalData.abcClassDesc" disabled style="width: 327px"></el-input> </el-form-item> <el-form-item label="净数量"> <el-input class="inlineNumber numInput" v-model="modalData.volumeNet" readonly type="number" style="width: 110px"></el-input> </el-form-item> <el-form-item label="数量单位" style="margin-left: -10px"> <el-input v-model="modalData.uomForVolumeNet" readonly style="width: 110px"></el-input> </el-form-item> <el-form-item label="生命周期阶段 / Lifecycle Stage"> <el-input v-model="modalData.lifecycleStage" readonly style="width: 220px"></el-input> </el-form-item> </el-form> </el-tab-pane>
<el-tab-pane label="Acquisition" name="Acquisition"> <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: -5px;"> <el-form-item label="制造备货期 / Manufacturing Lead Time"> <el-input-number :controls="false" :step="0" v-model="modalData.manufacturingLeadTime" @change="changeExpectedLeadTime" :disabled="!(modalData.partType === 'Manufactured' || modalData.partType === 'Manufactured Recipe')" style="width: 222px"></el-input-number> </el-form-item> <el-form-item label="周数 / Weeks"> <el-input class="inlineNumber numInput" v-model="modalData.durabilityWeek" readonly type="number" style="width: 221px"></el-input> </el-form-item> <el-form-item> <span style="cursor: pointer" slot="label" @click="getBaseList(127)"><a herf="#">来源国家 / Country of Origin</a></span> <el-input v-model="modalData.countryOfOrigin" @change="countryOfOriginBlur(127)" style="width: 128px"></el-input> <el-input v-model="modalData.countryOfOriginDesc" disabled style="width: 327px"></el-input> </el-form-item> </el-form> <el-form :inline="true" label-position="top" :model="modalData" :rules="rules"> <el-form-item label="预期提前期 / Expected Lead Time"> <el-input-number :controls="false" :step="0" v-model="modalData.expectedLeadTime" style="width: 222px"></el-input-number> </el-form-item> <el-form-item label="天数 / Days"> <el-input-number :controls="false" :step="0" v-model="modalData.durabilityDay" @change="changeDurabilityWeek" style="width: 221px"></el-input-number> </el-form-item> <el-form-item> <span style="cursor: pointer" slot="label" @click="getBaseList(128)"><a herf="#">区域代码 / Region Code</a></span> <el-input v-model="modalData.regionOfOrigin" @change="regionOfOriginBlur(128)" style="width: 128px"></el-input> <el-input v-model="modalData.regionOfOriginDesc" disabled style="width: 327px"></el-input> </el-form-item> </el-form> <el-form :inline="true" label-position="top" :model="modalData" :rules="rules"> <el-form-item label="州内转换因子 / Intrastat Conv Factor"> <el-input-number :controls="false" :step="0" v-model="modalData.intrastatConvFactor" style="width: 128px"></el-input-number> <el-input v-model="modalData.umDesc" disabled style="width: 327px"></el-input> </el-form-item> <el-form-item> <span style="cursor: pointer" slot="label" @click="getBaseList(129)"><a herf="#">海关统计序号 / Customs Stat No</a></span> <el-input v-model="modalData.customsStatNo" @change="customsStatNoBlur(129)" style="width: 128px"></el-input> <el-input v-model="modalData.customsStatDesc" disabled style="width: 327px"></el-input> </el-form-item> </el-form> <el-form :inline="true" label-position="top" :model="modalData" :rules="rules"> <el-form-item label="默认物料需求供应 / Default Mtr Req Supply"> <el-select v-model="modalData.supplyCode" style="width: 458px" clearable> <el-option label="Inventory Order" value="IO"></el-option> <el-option label="Purchase Order" value="PO"></el-option> </el-select> </el-form-item> </el-form> <el-form :inline="true" label-position="top" :model="modalData" :rules="rules"> <el-form-item label="备注" style="height: 80px"> <el-input type="textarea" v-model="modalData.remark" :rows="3" resize='none' show-word-limit style="width: 931px"></el-input> </el-form-item> </el-form> </el-tab-pane>
<el-tab-pane label="Costs" name="Costs"> <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: -5px;"> <el-form-item label="配置标识 / Configuration ID"> <el-select v-model="modalData.configurationId" style="width: 220px"> <el-option label="*" value="*"></el-option> </el-select> </el-form-item> <el-form-item label="估计物料成本 / Estimated Material Cost"> <el-input-number :controls="false" :step="0" v-model="modalData.estimatedMaterialCost" style="width: 220px"></el-input-number> </el-form-item> </el-form> <el-table :data="unitCostList" height="330px" border ref="unitCostTable" style="width:100%"> <el-table-column v-for="(item,index) in columnUnitCostList" :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-tab-pane>
<el-tab-pane label="Misc Part Info" name="MiscPartInfo"> <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: -5px;"> <el-form-item label="库存估价方法 / Inventory Valuation Method"> <el-select v-model="modalData.inventoryValuationMethod" style="width: 458px"> <el-option label="Weighted Average" value="Weighted Average"></el-option> <el-option label="Standard Cost" value="Standard Cost"></el-option> <el-option label="First In First Out" value="First In First Out"></el-option> <el-option label="Last In First Out" value="Last In First Out"></el-option> </el-select> </el-form-item> <el-form-item> <span style="cursor: pointer" slot="label" @click="getBaseList(131)"><a herf="#">零件成本组 / Part Cost Group</a></span> <el-input v-model="modalData.partCostGroupId" @change="partCostGroupIdBlur(131)" style="width: 128px"></el-input> <el-input v-model="modalData.partCostGroupDesc" disabled style="width: 327px"></el-input> </el-form-item> </el-form> <el-form :inline="true" label-position="top" :model="modalData" :rules="rules"> <el-form-item label="库存件成本层 / Inventory Part Cost Level"> <el-select v-model="modalData.inventoryPartCostLevel" style="width: 458px"> <el-option label="Cost Per Part" value="Cost Per Part"></el-option> <el-option label="Cost Per Configuration" value="Cost Per Configuration"></el-option> <el-option label="Cost Per Condition" value="Cost Per Condition"></el-option> <el-option label="Cost Per Lot Batch" value="Cost Per Lot Batch"></el-option> <el-option label="Cost Per Serial" value="Cost Per Serial"></el-option> </el-select> </el-form-item> </el-form> <el-form :inline="true" label-position="top" :model="modalData" :rules="rules"> <el-form-item label="供应商发票事项 / Supplier Invoice Consideration"> <el-select v-model="modalData.invoiceConsideration" style="width: 458px"> <el-option label="Ignore Invoice Price" value="Ignore Invoice Price"></el-option> <el-option label="Periodic Weighted Average" value="Periodic Weighted Average"></el-option> <el-option label="Transaction Based" value="Transaction Based"></el-option> </el-select> </el-form-item> </el-form> <el-form :inline="true" label-position="top" :model="modalData" :rules="rules"> <el-form-item label="零成本 / Zero Cost"> <el-select v-model="modalData.zeroCostFlag" style="width: 458px"> <el-option label="Zero Cost Allowed" value="Zero Cost Allowed"></el-option> <el-option label="Zero Cost Forbidden" value="Zero Cost Forbidden"></el-option> <el-option label="Zero Cost Only" value="Zero Cost Only"></el-option> </el-select> </el-form-item> </el-form> </el-tab-pane>
<el-tab-pane label="Planning Data" name="PlanningData"> <el-form :inline="true" label-position="top" :model="modalData" :rules="rules"> <el-form-item> <span style="cursor: pointer" slot="label" @click="getBaseList(132)"><a herf="#">计划方法 / Planning Method</a></span> <el-input v-model="modalData.planningMethod" @blur="planningMethodBlur(132)" style="width: 170px"></el-input> </el-form-item> <el-form-item label=" "> <el-input v-model="modalData.planningMethodDesc" disabled style="width: 510px"></el-input> </el-form-item> </el-form> <el-form :inline="true" label-position="top" :model="modalData" :rules="rules"> <el-form-item label="安全库存 / Safety Stock"> <el-input-number :controls="false" :step="0" v-model="modalData.safetyStock" style="width: 170px"></el-input-number> </el-form-item> <el-form-item label="最小批量 / Min Lot Size"> <el-input-number :controls="false" :step="0" v-model="modalData.minOrderQty" style="width: 170px"></el-input-number> </el-form-item> <el-form-item label="最大批量 / Max Lot Size"> <el-input-number :controls="false" :step="0" v-model="modalData.maxOrderQty" style="width: 155px"></el-input-number> </el-form-item> <el-form-item label="多种批量大小 / Multiple Lot Size"> <el-input-number :controls="false" :step="0" v-model="modalData.mulOrderQty" style="width: 155px"></el-input-number> </el-form-item> </el-form> <el-form :inline="true" label-position="top" :model="modalData" :rules="rules"> <el-form-item label="安全提前期 / Safety Lead Time"> <el-input-number :controls="false" :step="0" v-model="modalData.safetyLeadTime" style="width: 170px"></el-input-number> </el-form-item> <el-form-item label="报废因子(%) / Scrap Factor(%)"> <el-input-number :controls="false" :step="0" v-model="modalData.shrinkageFac" style="width: 170px"></el-input-number> </el-form-item> <el-form-item label="标准批量大小 / Std Lot Size"> <el-input-number :controls="false" :step="0" v-model="modalData.stdOrderQty" style="width: 155px"></el-input-number> </el-form-item> </el-form> </el-tab-pane>
<el-tab-pane label="Manufacturing" name="Manufacturing"> <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: -5px;"> <el-form-item label="累计提前期 / Cum Lead Time"> <el-input-number :controls="false" :step="0" v-model="modalData.cumLeadTime" style="width: 294px"></el-input-number> </el-form-item> <el-form-item label="预留/下发来源 / Reserve/Issue from"> <el-select v-model="modalData.backFlushPart" style="width: 248px"> <el-option label="All Locations" value="All Locations"></el-option> <el-option label="Only Floor Stock" value="Only Floor Stock"></el-option> <el-option label="Only Specified Location" value="Only Specified Location"></el-option> </el-select> </el-form-item> <el-form-item style="margin-top: 23px"> <el-checkbox v-model="modalData.byProdAsSupplyInMrpDb" true-label="Y">将副产品用作MRP中的供应 / Use By-Product as Supply in MRP</el-checkbox> </el-form-item> </el-form> <el-form :inline="true" label-position="top" :model="modalData" :rules="rules"> <el-form-item label="未受保护提前期 / Unprotected Lead Time"> <el-input-number :controls="false" :step="0" v-model="modalData.unprotectedLeadTime" style="width: 294px"></el-input-number> </el-form-item> <el-form-item label="预留/下发方法 / Reserve/Issue Method"> <el-select v-model="modalData.issueType" style="width: 248px"> <el-option label="Reserve" value="Reserve"></el-option> <el-option label="Backflush" value="Backflush"></el-option> <el-option label="Reserve And Backflush" value="Reserve And Backflush"></el-option> <el-option label="Manual" value="Manual"></el-option> </el-select> </el-form-item> <el-form-item style="margin-top: 23px"> <el-checkbox v-model="modalData.mrpControlFlagDb" true-label="Y">MRP控制 / MRP Control</el-checkbox> </el-form-item> </el-form> <el-form :inline="true" label-position="top" :model="modalData" :rules="rules"> <el-form-item label="按日固定提前期 / Fixed Lead Time by Day"> <el-input-number :controls="false" :step="0" v-model="modalData.fixedLeadTimeDay" style="width: 294px"></el-input-number> </el-form-item> <el-form-item label="过度报告 / Over Reporting"> <el-select v-model="modalData.overReporting" style="width: 248px"> <el-option label="Allowed" value="Allowed"></el-option> <el-option label="Allowed with Warning" value="Allowed with Warning"></el-option> <el-option label="Not Allowed" value="Not Allowed"></el-option> </el-select> </el-form-item> <el-form-item style="margin-top: 23px"> <el-checkbox v-model="modalData.useTheoreticalDensityDb" true-label="Y">使用理论 / Use Theoretical</el-checkbox> </el-form-item> </el-form> <el-form :inline="true" label-position="top" :model="modalData" :rules="rules"> <el-form-item label="按天的可变化提前期 / Variable Lead Time by Day"> <el-input-number :controls="false" :step="0" v-model="modalData.variableLeadTimeDay" style="width: 294px"></el-input-number> </el-form-item> <el-form-item label="报告公差过大 / Over Report Tolerance"> <el-input-number :controls="false" :step="0" v-model="modalData.overReportTolerance" style="width: 248px"></el-input-number> </el-form-item> </el-form> <el-form :inline="true" label-position="top" :model="modalData" :rules="rules"> <el-form-item label="按小时的固定提前期 / Fixed Lead Time by Hour"> <el-input-number :controls="false" :step="0" v-model="modalData.fixedLeadTimeHour" style="width: 294px"></el-input-number> </el-form-item> <el-form-item label="密度 / Density"> <el-input-number :controls="false" :step="0" v-model="modalData.density" style="width: 248px"></el-input-number> </el-form-item> </el-form> <el-form :inline="true" label-position="top" :model="modalData" :rules="rules"> <el-form-item label="按小时计算的可变提前期 / Variable Lead Time by Hour"> <el-input-number :controls="false" :step="0" v-model="modalData.variableLeadTimeHour" style="width: 294px"></el-input-number> </el-form-item> </el-form> </el-tab-pane>
<el-tab-pane label="Characteristics" style="margin-top: -15px" name="Characteristics"> <el-form label-position="top" style="margin-left: 2px;"> <el-form-item> <span v-if="modalData.flag === '4'" slot="label">属性模板</span> <span v-else style="cursor: pointer" slot="label" @click="getBaseList(20)"><a herf="#">属性模板</a></span> <el-input v-model="modalData.codeNo" :disabled="modalData.flag === '4'" @change="codeNoBlur(20)" style="width: 128px"></el-input> <el-input v-model="modalData.codeDesc" disabled style="width: 330px"></el-input> </el-form-item> <el-form-item v-if="modalData.flag !== '4'" label=" "> <el-button type="primary" @click="savePartItemModal">新增</el-button> <el-button type="primary" @click="deletePartItemModal">删除</el-button> </el-form-item> </el-form> <div class="rq "> <el-table :data="partItemList" height="340px" border @selection-change="itemSelectionChange" style="width: 100%"> <el-table-column type="selection" 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"> <div v-if="item.columnProp !== 'textValue' && item.columnProp !== 'numValue'"> <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> </div> <div v-else> <div v-if="scope.row.valueChooseFlag !== 'Y'"> <el-input-number v-if="scope.row.valueTypeDb === 'N'" v-model="scope.row.numValue" style="padding: 0;width: 100%" :controls="false"></el-input-number> <el-input v-else v-model="scope.row.textValue"></el-input> </div> <div v-else> <el-select style="width: 100%;" v-if="scope.row.valueTypeDb === 'T'" v-model="scope.row.textValue" clearable> <el-option :value="i.availableValue" :label="i.availableValue" v-for="(i,key) in scope.row.availableValueList" :key="key"></el-option> </el-select> <el-select style="width: 100%;" v-else v-model="scope.row.numValue" clearable> <el-option :value="i.availableValue" :label="i.availableValue" v-for="(i,key) in scope.row.availableValueList" :key="key"></el-option> </el-select> </div> </div> </template> </el-table-column> </el-table> </div> </el-tab-pane>
<el-tab-pane v-if="modalDisableFlag && !copyFlag2" style="margin-top: -10px" label="Revisions" name="Revisions"> <el-button v-if="modalData.flag !== '4'" type="primary" @click="savePartRevisionModal">新增</el-button> <el-table :data="revisionList" height="355px" border ref="revisionTable" style="width:100%"> <el-table-column v-for="(item,index) in columnRevisionList" :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 fixed="right" header-align="center" align="center" width="100" label="操作"> <template v-if="modalData.flag !== '4'" slot-scope="scope"> <el-link style="cursor: pointer" @click="updateRevisionModal(scope.row)">编辑</el-link> <el-link style="cursor: pointer" @click="deleteRevisionModal(scope.row)">删除</el-link> </template> </el-table-column> </el-table> </el-tab-pane> </el-tabs> <el-container v-if="modalData.flag === '3'"> <el-aside style="width: 485px"> <el-table :data="bomAlternativeList" height="200px" border ref="bomAlternativeTable" @selection-change="selectionBomAlternative" style="width:100%"> <el-table-column type="selection" header-align="center" align="center" :selectable="alternativeSelectable" width="50"> </el-table-column> <el-table-column v-for="(item,index) in columnBomAlternativeList" :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-aside> <el-main style="padding: 0 0 0 0"> <el-table :data="routingAlternativeList" height="200px" border ref="routingAlternativeTable" @selection-change="selectionRoutingAlternative" style="width:100%"> <el-table-column type="selection" header-align="center" align="center" :selectable="alternativeSelectable" width="50"> </el-table-column> <el-table-column v-for="(item,index) in columnRoutingAlternativeList" :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-main> </el-container> </el-form> <el-footer style="height:35px;margin-top: 20px;text-align:center"> <el-button v-if="modalData.flag === '3'" type="primary" :loading="saveLoading" @click="saveData">同步</el-button> <el-button v-if="modalData.flag === '1' || modalData.flag === '2'" type="primary" :loading="saveLoading" @click="saveData">保存</el-button> <el-button type="primary" @click="closeModal()" :loading="saveLoading">关闭</el-button> </el-footer> </el-dialog>
<!-- 页签 --> <el-tabs v-model="activeTable" style="width: 100%" :style="{height: secondHeight + 'px'}" type="border-card" @tab-click="tabClick" class="customer-tab"> <!-- 代理商页签 --> <el-tab-pane label="代理商" name="part_agent"> <el-form label-position="top" style="margin-left: 2px;"> <el-button v-if="isAuth('104001001:agentSave')" type="primary" @click="savePartAgent">新增</el-button> </el-form> <el-table :data="partAgentList" :height="secondHeight - 68" border style="width: 100%;"> <el-table-column v-for="(item,index) in columnAgentList" :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 header-align="center" align="center" width="150" fixed="right" label="操作"> <template slot-scope="scope"> <el-link v-if="isAuth('104001001:agentDelete')" style="cursor: pointer" @click="deleteAgent2(scope.row)">删除</el-link> </template> </el-table-column> </el-table> </el-tab-pane> <!-- 制造商页签 --> <el-tab-pane label="制造商" name="part_manufacturer"> <el-form label-position="top" style="margin-left: 2px;"> <el-button v-if="isAuth('104001001:manufacturerSave')" type="primary" @click="savePartManufacturer()">新增</el-button> </el-form> <el-table :data="partManufacturerList" :height="secondHeight - 68" border style="width: 100%;"> <el-table-column v-for="(item,index) in columnManufacturerList" :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 header-align="center" align="center" width="150" fixed="right" label="操作"> <template slot-scope="scope"> <el-link v-if="isAuth('104001001:manufacturerDelete')" style="cursor: pointer" @click="deleteManufacturer2(scope.row)">删除</el-link> </template> </el-table-column> </el-table> </el-tab-pane> <!-- 默认库位页签 --> <el-tab-pane label="默认库位" name="default_locations"> <el-form label-position="top" style="margin-left: 2px;"> <el-button v-if="isAuth('104001001:locationSave')" type="primary" @click="saveDefaultLocation()">新增</el-button> </el-form> <el-table :data="defaultLocationList" :height="secondHeight - 68" border style="width: 100%;"> <el-table-column v-for="(item,index) in columnLocationList" :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 header-align="center" align="center" width="150" fixed="right" label="操作"> <template slot-scope="scope"> <el-link v-if="isAuth('104001001:locationDelete')" style="cursor: pointer" @click="deleteLocation2(scope.row)">删除</el-link> </template> </el-table-column> </el-table> </el-tab-pane> <!-- 文档页签 --> <el-tab-pane label="附件信息" name="part_file"> <oss-components label="物料编码" :height="secondHeight - 73" :columns="columnFileList" :order-ref2="partCurrentRow.partNo" :order-ref1="partCurrentRow.site" :disabled="!isAuth('104001001:fileSaveAndDelete')"></oss-components> </el-tab-pane> </el-tabs>
<!-- 代理商-> 快速新增 --> <el-dialog title="新增" @close="refreshDetailList" :close-on-click-modal="false" v-drag :visible.sync="agentModelFlag" width="900px"> <div style="font-size: 12px"> <el-form :inline="true" label-position="top" :model="agentData"> <el-form-item :label="'代理商编码'"> <el-input v-model="agentData.agentId" clearable style="width: 120px"></el-input> </el-form-item> <el-form-item :label="'代理商名称'"> <el-input v-model="agentData.agentName" clearable style="width: 120px"></el-input> </el-form-item> <el-form-item :label="' '"> <el-button type="primary" @click="getAgentList()">查询</el-button> </el-form-item> </el-form> </div> <el-container style="margin-top: 0px;"> <el-main style="width: 350px; padding: 1px"> <span style="font-size: 12px" >可选代理商:</span> <el-table height="400px" :data="agentList1" border ref="agentTable1" @row-click="agentClickRow1" @selection-change="selectionAgent1" highlight-current-row style="width: 100%"> <el-table-column type="selection" header-align="center" align="center" width="50"> </el-table-column> <el-table-column prop="agentId" header-align="center" align="center" min-width="80" label="代理商编码"> </el-table-column> <el-table-column prop="agentName" header-align="center" align="center" min-width="120" label="代理商名称"> </el-table-column> </el-table> </el-main> <el-main style="width: 111px;padding: -1px"> <div style="margin-top: 182px;margin-left: 18px"> <el-button type="primary" @click="addAgent()">添加>></el-button> </div> <div style="margin-top: 15px;margin-left: 18px"> <el-button type="primary" @click="deleteAgent()">删除<<</el-button> </div> </el-main> <el-main style="width: 350px;padding: 1px"> <span style="font-size: 12px" >已有代理商:</span> <el-table height="400px" :data="agentList2" border ref="agentTable2" @row-click="agentClickRow2" @selection-change="selectionAgent2" highlight-current-row style="width: 100%"> <el-table-column type="selection" header-align="center" align="center" width="50"> </el-table-column> <el-table-column prop="agentId" header-align="center" align="center" min-width="80" label="代理商编码"> </el-table-column> <el-table-column prop="agentName" header-align="center" align="center" min-width="120" label="代理商名称"> </el-table-column> </el-table> </el-main> </el-container> <el-footer style="height:40px;margin-top: 20px;text-align:center"> <el-button type="primary" @click="agentModelFlag = false">关闭</el-button> </el-footer> </el-dialog>
<!-- 制造商-> 快速新增 --> <el-dialog title="新增" @close="refreshDetailList" :close-on-click-modal="false" v-drag :visible.sync="manufacturerModelFlag" width="900px"> <div style="font-size: 12px"> <el-form :inline="true" label-position="top" :model="manufacturerData"> <el-form-item :label="'制造商编码'"> <el-input v-model="manufacturerData.manufacturerId" clearable style="width: 120px"></el-input> </el-form-item> <el-form-item :label="'制造商名称'"> <el-input v-model="manufacturerData.manufacturerName" clearable style="width: 120px"></el-input> </el-form-item> <el-form-item :label="' '"> <el-button type="primary" @click="getManufacturerList()">查询</el-button> </el-form-item> </el-form> </div> <el-container style="margin-top: 0px;"> <el-main style="width: 350px; padding: 1px"> <span style="font-size: 12px" >可选制造商:</span> <el-table height="400px" :data="manufacturerList1" border ref="manufacturerTable1" @row-click="manufacturerClickRow1" @selection-change="selectionManufacturer1" highlight-current-row style="width: 100%"> <el-table-column type="selection" header-align="center" align="center" width="50"> </el-table-column> <el-table-column prop="manufacturerId" header-align="center" align="center" min-width="80" label="制造商编码"> </el-table-column> <el-table-column prop="manufacturerName" header-align="center" align="center" min-width="120" label="制造商名称"> </el-table-column> </el-table> </el-main> <el-main style="width: 111px;padding: -1px"> <div style="margin-top: 182px;margin-left: 18px"> <el-button type="primary" @click="addManufacturer()">添加>></el-button> </div> <div style="margin-top: 15px;margin-left: 18px"> <el-button type="primary" @click="deleteManufacturer()">删除<<</el-button> </div> </el-main> <el-main style="width: 350px;padding: 1px"> <span style="font-size: 12px" >已有制造商:</span> <el-table height="400px" :data="manufacturerList2" border ref="manufacturerTable2" @row-click="manufacturerClickRow2" @selection-change="selectionManufacturer2" highlight-current-row style="width: 100%"> <el-table-column type="selection" header-align="center" align="center" width="50"> </el-table-column> <el-table-column prop="manufacturerId" header-align="center" align="center" min-width="80" label="制造商编码"> </el-table-column> <el-table-column prop="manufacturerName" header-align="center" align="center" min-width="120" label="制造商名称"> </el-table-column> </el-table> </el-main> </el-container> <el-footer style="height:40px;margin-top: 20px;text-align:center"> <el-button type="primary" @click="manufacturerModelFlag = false">关闭</el-button> </el-footer> </el-dialog>
<!-- 默认库位-> 快速新增 --> <el-dialog title="新增" @close="refreshDetailList" :close-on-click-modal="false" v-drag :visible.sync="locationModelFlag" width="945px"> <div style="font-size: 12px"> <el-form :inline="true" label-position="top" :model="locationData"> <el-form-item :label="'库位编码'"> <el-input v-model="locationData.locationId" clearable style="width: 120px"></el-input> </el-form-item> <el-form-item :label="'库位名称'"> <el-input v-model="locationData.locationName" clearable style="width: 120px"></el-input> </el-form-item> <el-form-item :label="' '"> <el-button type="primary" @click="getLocationList()">查询</el-button> </el-form-item> </el-form> </div> <el-container style="margin-top: 0px;"> <el-main style="width: 400px; padding: 1px"> <span style="font-size: 12px" >可选库位:</span> <el-table height="400px" :data="locationList1" border ref="locationTable1" @row-click="locationClickRow1" @selection-change="selectionLocation1" highlight-current-row style="width: 100%"> <el-table-column type="selection" header-align="center" align="center" width="50"> </el-table-column> <el-table-column prop="locationId" header-align="center" align="center" min-width="100" label="库位编码"> </el-table-column> <el-table-column prop="locationName" header-align="center" align="left" min-width="120" label="库位名称"> </el-table-column> <el-table-column prop="locationType" header-align="center" align="center" min-width="100" label="库位类型"> </el-table-column> </el-table> <!-- 分页插件 --> <el-pagination @size-change="locationSizeChangeHandle" @current-change="locationCurrentChangeHandle" :current-page="locationPageIndex" :page-sizes="[20, 50, 100, 200, 500]" :page-size="locationPageSize" :total="locationTotalPage" layout="total, sizes, prev, pager, next, jumper"> </el-pagination> </el-main> <el-main style="width: 111px;padding: -1px"> <div style="margin-top: 182px;margin-left: 5px"> <el-button type="primary" @click="addLocation()">添加>></el-button> </div> <div style="margin-top: 15px;margin-left: 5px"> <el-button type="primary" @click="deleteLocation()">删除<<</el-button> </div> </el-main> <el-main style="width: 400px;padding: 1px"> <span style="font-size: 12px" >已有库位:</span> <el-table height="400px" :data="locationList2" border ref="locationTable2" @row-click="locationClickRow2" @selection-change="selectionLocation2" highlight-current-row style="width: 100%"> <el-table-column type="selection" header-align="center" align="center" width="50"> </el-table-column> <el-table-column prop="locationId" header-align="center" align="center" min-width="100" label="库位编码"> </el-table-column> <el-table-column prop="locationName" header-align="center" align="left" min-width="120" label="库位名称"> </el-table-column> <el-table-column prop="locationType" header-align="center" align="left" min-width="100" label="库位类型"> </el-table-column> </el-table> </el-main> </el-container> <el-footer style="height:40px;margin-top: 20px;text-align:center"> <el-button type="primary" @click="locationModelFlag = false">关闭</el-button> </el-footer> </el-dialog>
<el-dialog title="Revision" :close-on-click-modal="false" v-drag :visible.sync="updateRevisionModelFlag" width="430px"> <el-form :inline="true" label-position="top" :model="revisionData" :rules="revisionRules" style="margin-left: 7px;margin-top: -5px;"> <el-form-item label="Revision" prop="engChgLevel" :rules="revisionRules.engChgLevel"> <el-input-number :controls="false" :step="0" v-model="revisionData.engChgLevel" :disabled="updateRevisionModelDisableFlag" style="width: 185px"></el-input-number> </el-form-item> <el-form-item label="Eng Rev"> <el-input v-model="revisionData.engRevision" style="width: 185px"></el-input> </el-form-item> </el-form> <el-form :inline="true" label-position="top" :model="revisionData" style="margin-left: 7px;margin-top: -5px;"> <el-form-item label="Phase In" prop="effPhaseInDate" :rules="revisionRules.effPhaseInDate"> <el-date-picker style="width: 185px" v-model="revisionData.effPhaseInDate" type="date" value-format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker> </el-form-item> <el-form-item label="Phase Out"> <el-date-picker style="width: 185px" v-model="revisionData.effPhaseOutDate" type="date" value-format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker> </el-form-item> </el-form> <el-form :inline="true" label-position="top" :model="revisionData" style="margin-left: 7px;margin-top: -5px;"> <el-form-item label="Product Status"> <el-input v-model="revisionData.productStatus" readonly style="width: 185px"></el-input> </el-form-item> <el-form-item label="Repair Status"> <el-input v-model="revisionData.repairStatus" readonly style="width: 185px"></el-input> </el-form-item> </el-form> <el-form :inline="true" label-position="top" :model="revisionData" style="margin-left: 7px;margin-top: -5px;"> <el-form-item label="Revision Text"> <el-input v-model="revisionData.revisionText" style="width: 382px"></el-input> </el-form-item> </el-form> <el-footer style="height:40px;margin-top: 10px;text-align:center"> <el-button type="primary" @click="updateRevision">保存</el-button> <el-button type="primary" @click="updateRevisionModelFlag = false">关闭</el-button> </el-footer> </el-dialog>
<el-dialog title="物料属性" :close-on-click-modal="false" v-drag :visible.sync="saveItemModelFlag" width="730px"> <el-form :inline="true" label-position="top" :model="itemData"> <el-form-item :label="'属性编码'"> <el-input v-model="itemData.propertiesItemNo" clearable style="width: 200px"></el-input> </el-form-item> <el-form-item :label="'属性名称'"> <el-input v-model="itemData.itemDesc" clearable style="width: 200px"></el-input> </el-form-item> <el-form-item :label="' '"> <el-button type="primary" @click="getItemExclusionAlreadyExists">查询</el-button> </el-form-item> </el-form> <el-table :height="250" :data="characteristicList" border ref="characteristicTable" @row-click="characteristicClickRow" @selection-change="characteristicSelectionChange" style="width: 100%;"> <el-table-column type="selection" align="center" width="50"></el-table-column> <el-table-column v-for="(item,index) in characteristicColumnList" :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-footer style="height:40px;margin-top: 10px;text-align:center"> <el-button type="primary" @click="saveCharacteristic">保存</el-button> <el-button type="primary" @click="saveItemModelFlag = false">关闭</el-button> </el-footer> </el-dialog>
<!-- copyPart --> <el-dialog title="Copy Part" :close-on-click-modal="false" v-drag :visible.sync="copyPartModelFlag" width="800px"> <fieldset style="width: 775px"> <legend>Part No To Copy</legend> <el-form v-if="modalData.flag === '3'" :inline="true" label-position="top" style="margin-left: 7px"> <el-form-item> <span style="cursor: pointer" slot="label" @click="queryPartModal"><a>From Part</a></span> <el-input v-model="copyPartData.fromPartNo" readonly style="width: 120px"></el-input> <el-input v-model="copyPartData.fromPartDesc" readonly style="width: 300px"></el-input> </el-form-item> <el-form-item label="From Site"> <el-input v-model="copyPartData.fromPartSite" readonly style="width: 60px"></el-input> </el-form-item> </el-form> <el-form v-else :inline="true" label-position="top" style="margin-left: 7px"> <el-form-item label="From Part"> <el-input v-model="copyPartData.fromPartNo" readonly style="width: 120px"></el-input> <el-input v-model="copyPartData.fromPartDesc" readonly style="width: 300px"></el-input> </el-form-item> <el-form-item label="From Site"> <el-input v-model="copyPartData.fromPartSite" readonly style="width: 60px"></el-input> </el-form-item> </el-form> <el-form :inline="true" label-position="top" style="margin-left: 7px"> <el-form-item> <template slot="label"> <span>To Part</span> <el-button style="margin-left: 2px;width: 83px;line-height: 0.5;font-size: 10px;" type="primary" @click="nextPartNo2">Next Part No</el-button> </template> <el-input v-model="copyPartData.partNo" style="width: 120px"></el-input> <el-input v-model="copyPartData.partDesc" style="width: 300px"></el-input> </el-form-item> <el-form-item label="To Site"> <el-input v-model="copyPartData.site" :readonly="modalData.flag === '3'" style="width: 60px"></el-input> </el-form-item><!-- <el-form-item v-if="modalData.flag === '2'">--><!-- <span slot="label" @click="getBaseList(106,1)"><a herf="#">BU</a></span>--><!-- <el-input v-model="copyPartData.buDesc" readonly style="width: 80px"></el-input>--><!-- </el-form-item>--><!-- <el-form-item label="客户料号" v-if="modalData.flag === '2'">--><!-- <el-input v-model="copyPartData.customerPartNo" clearable style="width: 120px"></el-input>--><!-- </el-form-item>--> </el-form> </fieldset> <fieldset style="width: 775px"> <legend>Select Part Information to Copy</legend> <el-form :inline="true"> <el-form-item label=" "> <el-checkbox v-model="copyPartData.copyGeneral" true-label="Y">Inventory Part, General</el-checkbox> </el-form-item> </el-form> <el-form :inline="true"> <el-form-item label=" "> <el-checkbox v-model="copyPartData.copyDefaultLocation" true-label="Y">Inventory Part, Default Locations</el-checkbox> </el-form-item> </el-form> <el-form :inline="true"> <el-form-item label=" "> <el-checkbox v-model="copyPartData.copyCharacteristic" true-label="Y">Inventory Part, Characteristics</el-checkbox> </el-form-item> </el-form> <el-form :inline="true"> <el-form-item label=" "> <el-checkbox v-model="copyPartData.copyManufacturing" true-label="Y">Inventory Part, Manufacturing</el-checkbox> </el-form-item> </el-form> <el-form :inline="true"> <el-form-item label=" "> <el-checkbox v-model="copyPartData.copyPPGeneral" true-label="Y">Purchase Part, General</el-checkbox> </el-form-item> </el-form> <el-form :inline="true"> <el-form-item label=" "> <el-checkbox v-model="copyPartData.copyPPDocumentTexts" true-label="Y">Purchase Part, Document Texts</el-checkbox> </el-form-item> </el-form> <el-form :inline="true"> <el-form-item label=" "> <el-checkbox v-model="copyPartData.copyPPConnectedObjects" true-label="Y">Purchase Part, Connected Objects</el-checkbox> </el-form-item> </el-form> <el-form :inline="true"> <el-form-item label=" "> <el-checkbox v-model="copyPartData.copySPPGeneral" true-label="Y">Supplier for Purchase Part, General</el-checkbox> </el-form-item> </el-form> <el-form :inline="true"> <el-form-item label=" "> <el-checkbox v-model="copyPartData.copySPPDocumentTexts" true-label="Y">Supplier for Purchase Part, Document Texts</el-checkbox> </el-form-item> </el-form> <el-form :inline="true"> <el-form-item label=" "> <el-checkbox v-model="copyPartData.copySPGeneral" true-label="Y">Sales Part, General</el-checkbox> </el-form-item> </el-form> <el-form :inline="true"> <el-form-item label=" "> <el-checkbox v-model="copyPartData.copySPCharacteristics" true-label="Y">Sales Part, Characteristics</el-checkbox> </el-form-item> </el-form> <el-form :inline="true"> <el-form-item label=" "> <el-checkbox v-model="copyPartData.copySPDocumentTexts" true-label="Y">Sales Part, Document Texts</el-checkbox> </el-form-item> </el-form> <el-form :inline="true"> <el-form-item label=" "> <el-checkbox v-model="copyPartData.copySPLanguageDescription" true-label="Y">Sales Part, Language Description</el-checkbox> </el-form-item> </el-form> </fieldset> <el-footer style="height:35px;margin-top: 20px;text-align:center"> <el-button type="primary" :loading="copyLoading" @click="copyPart">保存</el-button> <el-button type="primary" @click="copyPartModelFlag = false">关闭</el-button> </el-footer> </el-dialog>
<!-- 子明细物料模态框 --> <el-dialog title="物料清单" top="17vh" :close-on-click-modal="false" v-drag :visible.sync="fromPartModelFlag" width="940px"> <el-form :inline="true" label-position="top" :model="fromPartData"> <el-form-item label="PLM物料编码"> <el-input v-model="fromPartData.plmPartNo" clearable style="width: 120px"></el-input> </el-form-item> <el-form-item label="IFS物料编码"> <el-input v-model="fromPartData.ifsPartNo" clearable style="width: 120px"></el-input> </el-form-item> <el-form-item label="物料名称"> <el-input v-model="fromPartData.partDesc" clearable style="width: 200px"></el-input> </el-form-item> <el-form-item label=" "> <el-button type="primary" @click="queryFromPartList">查询</el-button> </el-form-item> </el-form> <el-table :height="250" :data="fromPartList" @row-dblclick="getFromRowData" border style="width: 100%;"> <el-table-column v-for="(item,index) in fromPartColumnList" :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> <el-footer style="height:35px;margin-top:10px;text-align:center"> <el-button type="primary" @click="fromPartModelFlag = false">关闭</el-button> </el-footer> </el-dialog>
<!-- chooseList模态框 --> <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
<!-- 上传文件的modal --> <partUploadFile ref="partUploadFile" @refreshPageTables="getFileContentData()" v-drag></partUploadFile>
<upload-file-list folder="Inventory Part" title="物料附件上传" :label="'物料编码:'" :no="partCurrentRow.partNo" :file-list.sync="fileList" :upload-dialog.sync="uploadDialog" path="/upload/test"></upload-file-list>
<filter-search :visible.sync="filterVisible" @search="queryByAnyField"></filter-search> </div></template>
<script> import { partInformationSearch, // 物料信息列表查询
partInformationSearch2, partInformationSave, // 物料信息新增
partInformationEdit, // 物料信息编辑
partInformationDelete, // 物料信息删除
getPartItem, // 查询物料属性
savePartItemValue, // 编辑属性值
getAgentList, // 获取代理商列表
getPartAgent, // 获取物料代理商
getAgentListBy, // 根据条件查询可选代理商
addPartAgent, // 新增物料代理商
deletePartAgent, // 删除物料代理商
deleteAgent, // 删除物料代理商(单删)
getManufacturerList, // 获取制造商列表
getPartManufacturer, // 获取物料制造商
getManufacturerListBy, // 根据条件查询可选制造商
addPartManufacturer, // 新增物料制造商
deletePartManufacturer, // 删除物料制造商
deleteManufacturer, // 删除物料制造商(单删)
getLocationList, // 获取库位列表
getDefaultLocation, // 获取物料库位
getLocationListBy, // 根据条件查询可选库位
addDefaultLocation, // 新增物料库位
deleteDefaultLocation, // 删除物料库位
deleteLocation, // 删除物料库位(单删)
commitItemValue, // 修改物料属性值
deleteItem, // 删除模板属性
getItemLists, // 获取模板属性
addPartItem, // 新增物料属性
deletePartItem, // 删除物料属性
queryPartItem, queryMasterField, // 根据物料编码查 masterPart 属性
queryPartRevisionList, // 查询物料的bom版本列表
saveRevision, // 新增物料版本
updateRevision, // 编辑物料版本
deleteRevision, // 删除物料版本
copyPart, // 复制物料
getBomAndRoutingList, // 查询物料的bom和routing集合
partInformationToOfficial, // 转正式物料
getProjectPartNo, // 获取物料编码
getNextPartNo, // 获取下一个物料编码
getPartRevisionEngChgLevel, // 获取下一个物料revision
queryPartUnitCostList, // 查询物料的 unitCost 列表
getItemListByCodeNo, // 查询模板中的属性
getItemExclusionAlreadyExists, // 查属性模板,不包括已存在的
getPartCharacteristicList, // 获取维护的物料属性
queryOfficialPartList, //
copyPart2 //
} from '@/api/part/partInformation.js' import { getFileContentList, // 获取物料单附件列表
deleteQuotationFile, // 文件删除
downLoadQuotationFile // 文件下载
} from '@/api/quotation/quotationInformation.js' import {getChooselistData, verifyData} from "@/api/chooselist/chooselist.js" import Chooselist from '@/views/modules/common/Chooselist' import partUploadFile from "./part_upload_file" import DictDataSelect from '../sys/dict-data-select.vue' import UploadFileList from "../common/uploadFileList.vue"; import OssComponents from "../oss/ossComponents.vue"; import FilterSearch from "../../common/filterSearch.vue"; import {masterPartSearchAny} from "../../../api/part/masterPartInformation"; import {partInformationSearchAny} from "../../../api/part/partInformation"; export default { components: { FilterSearch, OssComponents, UploadFileList, DictDataSelect, Chooselist, partUploadFile }, watch: { searchData: { deep: true, handler: function (newV, oldV) { this.searchData.partNo = this.searchData.partNo.toUpperCase() } }, 'searchData.plmPartNo': function(newVal, oldVal) { if (newVal !== oldVal && newVal !== '') { this.getDataList(); } }, modalData: { deep: true, handler: function (newV, oldV) { this.modalData.partNo = this.modalData.partNo.toUpperCase() this.modalData.productGroupId4 = this.modalData.productGroupId4.toUpperCase() this.modalData.hazardCode = this.modalData.hazardCode.toUpperCase() this.modalData.productGroupId3 = this.modalData.productGroupId3.toUpperCase() this.modalData.commGroup3 = this.modalData.commGroup3.toUpperCase() this.modalData.groupId = this.modalData.groupId.toUpperCase() this.modalData.productGroupId1 = this.modalData.productGroupId1.toUpperCase() this.modalData.familyId = this.modalData.familyId.toUpperCase() this.modalData.productGroupId2 = this.modalData.productGroupId2.toUpperCase() this.modalData.assetClass = this.modalData.assetClass.toUpperCase() this.modalData.partStatus = this.modalData.partStatus.toUpperCase() this.modalData.abcClass = this.modalData.abcClass.toUpperCase() this.modalData.codeNo = this.modalData.codeNo.toUpperCase() this.modalData.countryOfOrigin = this.modalData.countryOfOrigin.toUpperCase() this.modalData.regionOfOrigin = this.modalData.regionOfOrigin.toUpperCase() this.modalData.customsStatNo = this.modalData.customsStatNo.toUpperCase() this.modalData.partCostGroupId = this.modalData.partCostGroupId.toUpperCase() this.modalData.planningMethod = this.modalData.planningMethod.toUpperCase() this.modalData.ifsPartNo = this.modalData.ifsPartNo.toUpperCase() } }, itemData: { deep: true, handler: function (newV, oldV) { this.itemData.propertiesItemNo = this.itemData.propertiesItemNo.toUpperCase() } }, agentData: { deep: true, handler: function (newV, oldV) { this.agentData.agentId = this.agentData.agentId.toUpperCase() } }, manufacturerData: { deep: true, handler: function (newV, oldV) { this.manufacturerData.manufacturerId = this.manufacturerData.manufacturerId.toUpperCase() } }, locationData: { deep: true, handler: function (newV, oldV) { this.locationData.locationId = this.locationData.locationId.toUpperCase() } }, uploadDialog (newValue,oldValue) { if (newValue === false) { this.getFileContentData() } }, }, data () { return { // 导出
exportData: [], exportName: '物料档案管理' + this.dayjs().format('YYYYMMDDHHmmss'), exportHeader: ['物料档案管理'], exportFooter: [], resultList: [], // ======== 行高 ========
height: 200, secondHeight: 200, // ======== 分页 ========
pageIndex: 1, pageSize: 50, totalPage: 0, pageIndex2: 1, pageSize2: 50, totalPage2: 0, locationPageIndex: 1, locationPageSize: 50, locationTotalPage: 0, selectedDataNum: 0, tempCodeNo: '', // 条件查询
searchData: { site: this.$store.state.user.site, partNo: '', erpPartNo: '', startDate: '', endDate: '', partDesc: '', spec: '', active: '', page: 1, limit: 10, status: '', ifsPartNo: '', plmPartNo: '', partType: '' }, // 其它
loading: false, saveLoading: false, copyLoading: false, // 初始页签
activeTable: 'part_agent', inventoryPartTable: 'General', // ======== 数据对象 ========
modalData: { flag: '', title: '', site: this.$store.state.user.site, partNo: '', partDesc: '', spec: '', partTypeDb: '', oldPartType: '', partType: '', familyId: '', familyName: '', groupId: '', groupName: '', umId: '', umName: '', weightNet: '', uomForWeightNet: '', volumeNet: '', uomForVolumeNet: '', lotTrackingCode: '', active: '', remark: '', supplierId: '', supplierName: '', productGroupId1: '', productGroupName1: '', productGroupId2: '', productGroupName2: '', productGroupId3: '', productGroupName3: '', productGroupId4: '', productGroupName4: '', commGroup3: '', commGroup3Desc: '', erpPartNo: '', codeNo: '', codeDesc: '', manufacturerId: '', manufacturerName: '', createDate: '', createBy: '', updateDate: '', updateBy: '', agentId: '', agentName: '', typeDesignation: '', hazardCode: '', hazardDesc: '', assetClass: '', assetClassDesc: '', dimQuality: '', abcClass: '', abcClassDesc: '', frequencyClass: '', lifecycleStage: '', countryOfOrigin: '', countryOfOriginDesc: '', manufacturingLeadTime: '', expectedLeadTime: '', regionOfOrigin: '', regionOfOriginDesc: '', durabilityWeek: '', customsStatNo: '', customsStatDesc: '', durabilityDay: '', intrastatConvFactor: undefined, supplyCode: '', umDesc: '', status: '', partStatus: '', partStatusDesc: '', configurationId: '', estimatedMaterialCost: '', inventoryValuationMethod: '', partCostGroupId: '', partCostGroupDesc: '', inventoryPartCostLevel: '', invoiceConsideration: '', zeroCostFlag: '', planningMethod: '', planningMethodDesc: '', safetyStock: '', minOrderQty: '', maxOrderQty: '', mulOrderQty: '', safetyLeadTime: '', shrinkageFac: '', stdOrderQty: '', cumLeadTime: '', backFlushPart: '', byProdAsSupplyInMrpDb: '', unprotectedLeadTime: '', issueType: '', mrpControlFlagDb: '', fixedLeadTimeDay: '', overReporting: '', useTheoreticalDensityDb: '', variableLeadTimeDay: '', overReportTolerance: '', fixedLeadTimeHour: '', density: undefined, variableLeadTimeHour: '', ifsPartNo: '', plmPartNo: '', showInQueryFlag: '', temporaryPartFlag: '', mainInfoFlag: false, // 主信息标识
costsInfoFlag: false, // costs标识
manufacturingInfoFlag: false, // Manufacturing标识
planningInfoFlag: false, // planning标识
partItemInfoFlag: false, // 属性信息标识
copyPartNo: '' }, revisionData: { flag: '', site: '', partNo: '', engChgLevel: '', effPhaseInDate: '', effPhaseOutDate: '', revisionText: '', productStatus: '', repairStatus: '', engRevision: '', createBy: '', updateBy: '', }, itemData: { site: this.$store.state.user.site, partNo: '', propertiesItemNo: '', codeNo: '', itemDesc: '', textValue: '', numValue: '', recordType: 'IP' }, agentData: { site: this.$store.state.user.site, agentId: '', agentName: '', }, manufacturerData: { site: this.$store.state.user.site, manufacturerId: '', manufacturerName: '', }, locationData: { site: this.$store.state.user.site, locationId: '', locationName: '', partNo: '', page: 1, limit: 10 }, copyPartData: { site: '', partNo: '', partDesc: '', copyGeneral: '', copyManufacturing: '', copyDefaultLocation: '', copyCharacteristic: '', copyPPGeneral: '', copyPPDocumentTexts: '', copyPPConnectedObjects: '', copySPPGeneral: '', copySPPDocumentTexts: '', copySPGeneral: '', copySPCharacteristics: '', copySPDocumentTexts: '', copySPLanguageDescription: '', previousVersion: {}, createBy: '', ifsPartNo: '', fromPartSite: '', fromPartNo: '', fromPartDesc: '', copyFlag: '', buNo: '', buDesc: '', customerPartNo: '', }, fromPartData: { site: this.$store.state.user.site, partNo: '', plmPartNo: '', ifsPartNo: '', partDesc: '', status: '', page: 1, limit: 10 }, // ======== 数据列表 ========
dataList: [], partItemList: [], updatePartItemList: [], partAgentList: [], partManufacturerList: [], defaultLocationList: [], fileContentList: [], availableValueList:[], agentList: [], agentSelections: [], agentSelections1: [], agentSelections2: [], agentList1: [], agentList2: [], manufacturerList: [], manufacturerSelections: [], manufacturerSelections1: [], manufacturerSelections2: [], manufacturerList1: [], manufacturerList2: [], locationList: [], locationSelections: [], locationSelections1: [], locationSelections2: [], locationList1: [], locationList2: [], itemSelections1: [], itemSelections2: [], itemList1:[], itemList2:[], revisionList: [], unitCostList: [], bomAlternativeList: [], routingAlternativeList: [], copyAttributeList: [], fileList: [], characteristicList: [], fromPartList: [], watchers: [], unwatchTable: null, // 用于保存监听器的取消函数
// ======== 列表表头 ========
columnList: [ { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table1PartNo', tableId: '104001Table1', tableName: '物料信息表', columnProp: 'plmPartNo', headerAlign: 'center', align: 'left', columnLabel: 'PLM物料编码', columnHidden: false, columnImage: false, status: true, fixed: '', columnWidth: 120 }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table1IfsPartNo', tableId: '104001Table1', tableName: '物料信息表', columnProp: 'ifsPartNo', headerAlign: 'center', align: 'left', columnLabel: 'IFS物料编码', columnHidden: false, columnImage: false, status: true, fixed: '', columnWidth: 120 }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table1PartDesc', tableId: '104001Table1', tableName: '物料信息表', columnProp: 'partDesc', headerAlign: 'center', align: 'left', columnLabel: '物料名称', columnHidden: false, columnImage: false, status: true, fixed: '', columnWidth: 150 }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table1StatusDesc', tableId: '104001Table1', tableName: '物料信息表', columnProp: 'statusDesc', headerAlign: 'center', align: 'center', columnLabel: '物料状态', columnHidden: false, columnImage: false, status: true, fixed: '', columnWidth: 100 }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table1UmId', tableId: '104001Table1', tableName: '物料信息表', columnProp: 'umId', headerAlign: 'center', align: 'left', columnLabel: '计量单位', columnHidden: false, columnImage: false, status: true, fixed: '', columnWidth: 100 }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table1WeightNet', tableId: '104001Table1', tableName: '物料信息表', columnProp: 'weightNet', headerAlign: 'center', align: 'right', columnLabel: '净重', columnHidden: false, columnImage: false, status: true, fixed: '', columnWidth: 60 }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table1UomForWeightNet', tableId: '104001Table1', tableName: '物料信息表', columnProp: 'uomForWeightNet', headerAlign: 'center', align: 'center', columnLabel: '净重单位', columnHidden: false, columnImage: false, status: true, fixed: '', columnWidth: 80 }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table1VolumeNet', tableId: '104001Table1', tableName: '物料信息表', columnProp: 'volumeNet', headerAlign: 'center', align: 'right', columnLabel: '净数量', columnHidden: false, columnImage: false, status: true, fixed: '', columnWidth: 60 }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table1UomForVolumeNet', tableId: '104001Table1', tableName: '物料信息表', columnProp: 'uomForVolumeNet', headerAlign: 'center', align: 'center', columnLabel: '数量单位', columnHidden: false, columnImage: false, status: true, fixed: '', columnWidth: 80 }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table1LotTrackingCode', tableId: '104001Table1', tableName: '物料信息表', columnProp: 'lotTrackingCode', headerAlign: 'center', align: 'center', columnLabel: '批号跟踪', columnHidden: false, columnImage: false, status: true, fixed: '', columnWidth: 110 }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table1PartType', tableId: '104001Table1', tableName: '物料信息表', columnProp: 'partType', headerAlign: 'center', align: 'center', columnLabel: '零件类型', columnHidden: false, columnImage: false, status: true, fixed: '', columnWidth: 130 }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table1FamilyName', tableId: '104001Table1', tableName: '物料信息表', columnProp: 'familyName', headerAlign: 'center', align: 'center', columnLabel: '产品大类', columnHidden: false, columnImage: false, status: true, fixed: '', columnWidth: 100 }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table1GroupName', tableId: '104001Table1', tableName: '物料信息表', columnProp: 'groupName', headerAlign: 'center', align: 'center', columnLabel: '产品代码', columnHidden: false, columnImage: false, status: true, fixed: '', columnWidth: 100 }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table1OtherGroup1', tableId: '104001Table1', tableName: '物料信息表', columnProp: 'productGroupName1', headerAlign: 'center', align: 'center', columnLabel: '商品组1', columnHidden: false, columnImage: false, status: true, fixed: '', columnWidth: 100 }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table1OtherGroup2', tableId: '104001Table1', tableName: '物料信息表', columnProp: 'productGroupName2', headerAlign: 'center', align: 'center', columnLabel: '商品组2', columnHidden: false, columnImage: false, status: true, fixed: '', columnWidth: 100 }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table1OtherGroup3', tableId: '104001Table1', tableName: '物料信息表', columnProp: 'productGroupName3', headerAlign: 'center', align: 'center', columnLabel: '会计组', columnHidden: false, columnImage: false, status: true, fixed: '', columnWidth: 100 }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table1OtherGroup4', tableId: '104001Table1', tableName: '物料信息表', columnProp: 'productGroupName4', headerAlign: 'center', align: 'center', columnLabel: '计划人', columnHidden: false, columnImage: false, status: true, fixed: '', columnWidth: 100 }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table1CommGroup3', tableId: '104001Table1', tableName: '物料信息表', columnProp: 'commGroup3Desc', headerAlign: 'center', align: 'center', columnLabel: '商品组3', columnHidden: false, columnImage: false, status: true, fixed: '', columnWidth: 100 }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table1ItemNo', tableId: '104001Table1', tableName: '物料信息表', columnProp: 'codeDesc', headerAlign: 'center', align: 'center', columnLabel: '属性模板', columnHidden: false, columnImage: false, status: true, fixed: '', columnWidth: 100 }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table1Remark', tableId: '104001Table1', tableName: '物料信息表', columnProp: 'remark', headerAlign: 'center', align: 'left', columnLabel: '备注', columnHidden: false, columnImage: false, status: true, fixed: '', columnWidth: 150 }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table1ActiveDesc', tableId: '104001Table1', tableName: '物料信息表', columnProp: 'activeDesc', headerAlign: 'center', align: 'center', columnLabel: '是否在用', columnHidden: false, columnImage: false, status: true, fixed: '', columnWidth: 100 }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table1CreateDate', tableId: '104001Table1', tableName: '物料信息表', columnProp: 'createDate', headerAlign: 'center', align: 'center', columnLabel: '创建时间', columnHidden: false, columnImage: false, status: true, fixed: '', columnWidth: 160 }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table1CreateBy', tableId: '104001Table1', tableName: '物料信息表', columnProp: 'createBy', headerAlign: 'center', align: 'center', columnLabel: '创建人', columnHidden: false, columnImage: false, status: true, fixed: '', columnWidth: 80 }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table1UpdateDate', tableId: '104001Table1', tableName: '物料信息表', columnProp: 'updateDate', headerAlign: 'center', align: 'center', columnLabel: '更新时间', columnHidden: false, columnImage: false, status: true, fixed: '', columnWidth: 160 }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table1UpdateBy', tableId: '104001Table1', tableName: '物料信息表', columnProp: 'updateBy', headerAlign: 'center', align: 'center', columnLabel: '更新人', columnHidden: false, columnImage: false, status: true, fixed: '', columnWidth: 80 } ], columnItemList: [ { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table2PropertiesItemID', tableId: "104001Table2", tableName: "物料属性表", columnProp: 'propertiesItemNo', headerAlign: "center", align: "left", columnLabel: '属性编码', columnHidden: false, columnImage: false, status: true, fixed: '', columnWidth: 100, }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table2PropertiesItemDesc', tableId: "104001Table2", tableName: "物料属性表", columnProp: 'itemDesc', headerAlign: "center", align: "left", columnLabel: '属性名称', columnHidden: false, columnImage: false, status: true, fixed: '', columnWidth: 150, }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table2ValueType', tableId: "104001Table2", tableName: "物料属性表", columnProp: 'valueType', headerAlign: "center", align: "center", columnLabel: '属性类型', columnHidden: false, columnImage: false, status: true, fixed: '', columnWidth: 60, }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table2ValueChooseFlag', tableId: "104001Table2", tableName: "物料属性表", columnProp: 'textValue', headerAlign: "center", align: "left", columnLabel: '属性值', columnHidden: false, columnImage: false, status: true, fixed: '', columnWidth: 100, }, ], updateColumnItemList: [ { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table6PropertiesItemID', tableId: "104001Table6", tableName: "物料属性表", columnProp: 'propertiesItemNo', headerAlign: "center", align: "center", columnLabel: '属性编码', columnHidden: false, columnImage: false, columnSortable: true, sortLv: 0, status: true, fixed: '', columnWidth: 90, }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table6PropertiesItemDesc', tableId: "104001Table6", tableName: "物料属性表", columnProp: 'itemDesc', headerAlign: "center", align: "center", columnLabel: '属性名称', columnHidden: false, columnImage: false, columnSortable: true, sortLv: 0, status: true, fixed: '', columnWidth: 90, }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table6ValueType', tableId: "104001Table6", tableName: "物料属性表", columnProp: 'valueType', headerAlign: "center", align: "center", columnLabel: '属性类型', columnHidden: false, columnImage: false, columnSortable: true, sortLv: 0, status: true, fixed: '', columnWidth: 70, }, ], columnAgentList: [ { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table3AgentId', tableId: "104001Table3", tableName: "物料代理商表", columnProp: 'agentId', headerAlign: "center", align: "center", columnLabel: '代理商编码', columnHidden: false, columnImage: false, columnSortable: true, sortLv: 0, status: true, fixed: '', }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table3AgentName', tableId: "104001Table3", tableName: "物料代理商表", columnProp: 'agentName', headerAlign: "center", align: "center", columnLabel: '代理商名称', columnHidden: false, columnImage: false, columnSortable: true, sortLv: 0, status: true, fixed: '', }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table3ActiveDesc', tableId: '104001Table3', tableName: '物料代理商表', columnProp: 'activeDesc', headerAlign: 'center', align: 'center', columnLabel: '是否在用', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table3CreateDate', tableId: '104001Table3', tableName: '物料代理商表', columnProp: 'createDate', headerAlign: 'center', align: 'center', columnLabel: '创建时间', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table3CreateBy', tableId: '104001Table3', tableName: '物料代理商表', columnProp: 'createBy', headerAlign: 'center', align: 'center', columnLabel: '创建人', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table3UpdateDate', tableId: '104001Table3', tableName: '物料代理商表', columnProp: 'updateDate', headerAlign: 'center', align: 'center', columnLabel: '更新时间', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table3UpdateBy', tableId: '104001Table3', tableName: '物料代理商表', columnProp: 'updateBy', headerAlign: 'center', align: 'center', columnLabel: '更新人', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', } ], columnManufacturerList: [ { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table5ManufacturerId', tableId: "104001Table5", tableName: "物料制造商表", columnProp: 'manufacturerId', headerAlign: "center", align: "center", columnLabel: '制造商编码', columnHidden: false, columnImage: false, columnSortable: true, sortLv: 0, status: true, fixed: '', }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table5ManufacturerName', tableId: "104001Table5", tableName: "物料制造商表", columnProp: 'manufacturerName', headerAlign: "center", align: "center", columnLabel: '制造商名称', columnHidden: false, columnImage: false, columnSortable: true, sortLv: 0, status: true, fixed: '', }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table5ActiveDesc', tableId: '104001Table5', tableName: '物料制造商表', columnProp: 'activeDesc', headerAlign: 'center', align: 'center', columnLabel: '是否在用', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table5CreateDate', tableId: '104001Table5', tableName: '物料制造商表', columnProp: 'createDate', headerAlign: 'center', align: 'center', columnLabel: '创建时间', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table5CreateBy', tableId: '104001Table5', tableName: '物料制造商表', columnProp: 'createBy', headerAlign: 'center', align: 'center', columnLabel: '创建人', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table5UpdateDate', tableId: '104001Table5', tableName: '物料制造商表', columnProp: 'updateDate', headerAlign: 'center', align: 'center', columnLabel: '更新时间', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table5UpdateBy', tableId: '104001Table5', tableName: '物料制造商表', columnProp: 'updateBy', headerAlign: 'center', align: 'center', columnLabel: '更新人', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', } ], columnLocationList: [ { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table7LocationId', tableId: "104001Table7", tableName: "物料库位表", columnProp: 'locationId', headerAlign: "center", align: "center", columnLabel: '库位编码', columnHidden: false, columnImage: false, columnSortable: true, sortLv: 0, status: true, fixed: '', columnWidth: 120, }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table7LocationName', tableId: "104001Table7", tableName: "物料库位表", columnProp: 'locationName', headerAlign: "center", align: "center", columnLabel: '库位名称', columnHidden: false, columnImage: false, columnSortable: true, sortLv: 0, status: true, fixed: '', columnWidth: 200, }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table7LocationType', tableId: "104001Table7", tableName: "物料库位表", columnProp: 'locationType', headerAlign: "center", align: "center", columnLabel: '库位类型', columnHidden: false, columnImage: false, columnSortable: true, sortLv: 0, status: true, fixed: '', columnWidth: 120, }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table7warehouseId', tableId: "104001Table7", tableName: "物料库位表", columnProp: 'warehouseId', headerAlign: "center", align: "center", columnLabel: '仓库编码', columnHidden: false, columnImage: false, columnSortable: true, sortLv: 0, status: true, fixed: '', columnWidth: 120, }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table7ActiveDesc', tableId: '104001Table7', tableName: '物料库位表', columnProp: 'activeDesc', headerAlign: 'center', align: 'center', columnLabel: '是否在用', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', columnWidth: 80, }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table7CreateDate', tableId: '104001Table7', tableName: '物料库位表', columnProp: 'createDate', headerAlign: 'center', align: 'center', columnLabel: '创建时间', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', columnWidth: 170, }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table7CreateBy', tableId: '104001Table7', tableName: '物料库位表', columnProp: 'createBy', headerAlign: 'center', align: 'center', columnLabel: '创建人', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', columnWidth: 100, }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table7UpdateDate', tableId: '104001Table7', tableName: '物料库位表', columnProp: 'updateDate', headerAlign: 'center', align: 'center', columnLabel: '更新时间', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', columnWidth: 170, }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table7UpdateBy', tableId: '104001Table7', tableName: '物料库位表', columnProp: 'updateBy', headerAlign: 'center', align: 'center', columnLabel: '更新人', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', columnWidth: 100, } ], columnFileList: [ { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table4FileName', tableId: '104001Table4', tableName: '文件信息表', columnProp: 'fileName', headerAlign: 'center', align: 'center', columnLabel: '文件名称', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table4FileRemark', tableId: '104001Table4', tableName: '文件信息表', columnProp: 'fileRemark', headerAlign: 'center', align: 'center', columnLabel: '备注', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table4CreateDate', tableId: '104001Table4', tableName: '文件信息表', columnProp: 'createDate', headerAlign: 'center', align: 'center', columnLabel: '上传时间', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table4CreatedBy', tableId: '104001Table4', tableName: '文件信息表', columnProp: 'createBy', headerAlign: 'center', align: 'center', columnLabel: '上传人', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', } ], agentColumnList: [ { columnProp: 'agentId', headerAlign: "center", align: "center", columnLabel: '代理商编码', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', }, { columnProp: 'agentName', headerAlign: "center", align: "center", columnLabel: '代理商名称', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', }, ], columnRevisionList: [ { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table8EngChgLevel', tableId: "104001Table8", tableName: "物料版本表", columnProp: 'engChgLevel', headerAlign: "center", align: "center", columnLabel: 'Revision', columnHidden: false, columnImage: false, status: true, fixed: '', }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table8EffPhaseInDate', tableId: "104001Table8", tableName: "物料版本表", columnProp: 'effPhaseInDate', headerAlign: "center", align: "center", columnLabel: 'Phase In', columnHidden: false, columnImage: false, status: true, fixed: '', }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table8EffPhaseOutDate', tableId: "104001Table8", tableName: "物料版本表", columnProp: 'effPhaseOutDate', headerAlign: "center", align: "center", columnLabel: 'Phase Out', columnHidden: false, columnImage: false, status: true, fixed: '', }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table8NoteText', tableId: "104001Table8", tableName: "物料版本表", columnProp: 'revisionText', headerAlign: "center", align: "center", columnLabel: 'Revision Text', columnHidden: false, columnImage: false, status: true, fixed: '', }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table8NoteText', tableId: "104001Table8", tableName: "物料版本表", columnProp: 'productStatus', headerAlign: "center", align: "center", columnLabel: 'Product Status', columnHidden: false, columnImage: false, status: true, fixed: '', }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table8NoteText', tableId: "104001Table8", tableName: "物料版本表", columnProp: 'repairStatus', headerAlign: "center", align: "center", columnLabel: 'Repair Status', columnHidden: false, columnImage: false, status: true, fixed: '', }, { userId: this.$store.state.user.name, functionId: 104001, serialNumber: '104001Table8EngRevision', tableId: "104001Table8", tableName: "物料版本表", columnProp: 'engRevision', headerAlign: "center", align: "center", columnLabel: 'Eng Rev', columnHidden: false, columnImage: false, status: true, fixed: '', }, ], columnUnitCostList: [ { columnProp: 'lotBatchNo', headerAlign: "center", align: "center", columnLabel: 'Lot/Batch No', columnHidden: false, columnImage: false, status: true, fixed: '', }, { columnProp: 'serialNo', headerAlign: "center", align: "center", columnLabel: 'Serial No', columnHidden: false, columnImage: false, status: true, fixed: '', }, { columnProp: 'inventoryValue', headerAlign: "center", align: "center", columnLabel: 'Unit Cost', columnHidden: false, columnImage: false, status: true, fixed: '', }, ], columnBomAlternativeList: [ { columnProp: 'engChgLevel', headerAlign: "center", align: "center", columnLabel: 'BOM版本', columnHidden: false, columnImage: false, status: true, fixed: '', }, { columnProp: 'bomType', headerAlign: "center", align: "center", columnLabel: '制造类型', columnHidden: false, columnImage: false, status: true, fixed: '', }, { columnProp: 'alternativeNo', headerAlign: "center", align: "center", columnLabel: '替代编码', columnHidden: false, columnImage: false, status: true, fixed: '', }, { columnProp: 'alternativeDescription', headerAlign: "center", align: "left", columnLabel: '替代名称', columnHidden: false, columnImage: false, status: true, fixed: '', } ], columnRoutingAlternativeList: [ { columnProp: 'routingRevision', headerAlign: "center", align: "center", columnLabel: 'Routing版本', columnHidden: false, columnImage: false, status: true, fixed: '', }, { columnProp: 'routingType', headerAlign: "center", align: "center", columnLabel: '工艺类型', columnHidden: false, columnImage: false, status: true, fixed: '', }, { columnProp: 'alternativeNo', headerAlign: "center", align: "center", columnLabel: '替代编码', columnHidden: false, columnImage: false, status: true, fixed: '', }, { columnProp: 'alternativeDescription', headerAlign: "center", align: "left", columnLabel: '替代名称', columnHidden: false, columnImage: false, status: true, fixed: '', } ], characteristicColumnList: [ { columnProp: 'propertiesItemNo', headerAlign: "center", align: "left", columnLabel: '属性编码', columnHidden: false, columnImage: false, status: true, fixed: '', columnWidth: 100, }, { columnProp: 'itemDesc', headerAlign: "center", align: "left", columnLabel: '属性名称', columnHidden: false, columnImage: false, status: true, fixed: '', columnWidth: 200, }, { columnProp: 'valueType', headerAlign: "center", align: "center", columnLabel: '属性类型', columnHidden: false, columnImage: false, status: true, fixed: '', columnWidth: 60, }, ], fromPartColumnList: [ { columnProp: 'plmPartNo', headerAlign: "center", align: "center", columnLabel: 'PLM物料编码', columnHidden: false, columnImage: false, status: true, fixed: '', columnWidth: 120 }, { columnProp: 'ifsPartNo', headerAlign: "center", align: "center", 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: 'familyName', headerAlign: "center", align: "center", columnLabel: '物料分类', columnHidden: false, columnImage: false, status: true, fixed: '', columnWidth: 100 }, { columnProp: 'printUnit', headerAlign: "center", align: "left", columnLabel: '计量单位', columnHidden: false, columnImage: false, status: true, fixed: '', columnWidth: 100 }, { columnProp: 'spec', headerAlign: "center", align: "left", columnLabel: '规格型号', columnHidden: false, columnImage: false, status: true, fixed: '', columnWidth: 100 }, { columnProp: 'partType', headerAlign: "center", align: "center", columnLabel: '零件类型', columnHidden: false, columnImage: false, status: true, fixed: '', columnWidth: 130 }, { columnProp: 'partStatusDesc', headerAlign: "center", align: "left", columnLabel: '零件状态', columnHidden: false, columnImage: false, status: true, fixed: '', columnWidth: 120 } ], // ======== 必填规则 ========
rules: { partNo: [ { required: true, message: ' ', trigger: ['blur','change'] } ], partDesc: [ { required: true, message: ' ', trigger: ['blur','change'] } ], umId: [ { required: true, message: ' ', trigger: ['blur','change'] } ], codeNo: [ { required: true, message: ' ', trigger: ['blur','change'] } ], manufacturerName: [ { required: true, message: ' ', trigger: ['blur','change'] } ], active: [ { required: true, message: ' ', trigger: ['blur','change'] } ], agentName: [ { required: true, message: ' ', trigger: ['blur','change'] } ], partType: [ { required: true, message: ' ', trigger: ['blur','change'] } ], productGroupId4: [ { required: true, message: ' ', trigger: ['blur','change'] } ], lotTrackingCode: [ { required: true, message: ' ', trigger: ['blur','change'] } ], }, revisionRules: { engChgLevel: [ { required: true, message: ' ', trigger: ['blur','change'] } ], effPhaseInDate: [ { required: true, message: ' ', trigger: ['blur','change'] } ], }, // ======== 复选数据集 ========
partSelections: [], bomAlternativeSelections: [], routingAlternativeSelections: [], characteristicSelections: [], itemSelections: [], // ======== 选中的当前行数据 ========
partCurrentRow: {}, // ======== 模态框开关控制 ========
modalFlag: false, modalDisableFlag: false, itemChooseFlag: false, itemTextDisableFlag: false, itemNumberDisableFlag: false, itemModalDisableFlag: false, itemModalFlag: false, agentModelFlag: false, manufacturerModelFlag: false, locationModelFlag: false, updateRevisionModelFlag: false, updateRevisionModelDisableFlag: false, copyPartModelFlag: false, attributeDialog: true, uploadDialog: false, saveItemModelFlag: false, mainInfoFlag: false, // 主信息标识
costsInfoFlag: false, // costs标识
manufacturingInfoFlag: false, // Manufacturing标识
planningInfoFlag: false, // planning标识
partItemInfoFlag: false, // 属性信息标识
fromPartModelFlag: false, filterVisible: false, isFilterSearch: false, filterSearchData: {}, copyFlag2: false } },
mounted () { this.$nextTick(() => { this.height = window.innerHeight / 2 - 100 /*第二个表格高度的动态调整*/ this.secondHeight = window.innerHeight - this.height - 205 }) },
created () { this.searchData = { site: this.$store.state.user.site, partNo: '', erpPartNo: '', startDate: '', endDate: '', partDesc: '', spec: '', active: '', page: 1, limit: 10, status: '', ifsPartNo: '', plmPartNo: '', partType: '' } const { partNo } = this.$route.params;
if (partNo) { this.searchData.plmPartNo = partNo; } this.getDataList() this.setupWatchers() },
activated() { this.searchData = { site: this.$store.state.user.site, partNo: '', erpPartNo: '', startDate: '', endDate: '', partDesc: '', spec: '', active: '', page: 1, limit: 10, status: '', ifsPartNo: '', plmPartNo: '', partType: '' } if (this.$route.params.partNo) { this.searchData.plmPartNo = this.$route.params.partNo this.getDataList2() } else if (this.$route.params.ifsPartNo) { this.searchData.ifsPartNo = this.$route.params.ifsPartNo this.getDataList() } },
methods: {
// 重置标识
resetFlags () { this.mainInfoFlag = false this.costsInfoFlag = false this.manufacturingInfoFlag = false this.planningInfoFlag = false this.partItemInfoFlag = false },
// 设置监听
setupWatchers() { this.teardownWatchers() const groups = { mainInfoFlag: ['partDesc', 'partType', 'hazardCode', 'productGroupId4', 'productGroupId3', 'umId', 'groupId', 'productGroupId1', 'familyId', 'productGroupId2', 'typeDesignation', 'assetClass', 'dimQuality', 'partStatus', 'weightNet', 'uomForWeightNet', 'frequencyClass', 'abcClass', 'volumeNet', 'uomForVolumeNet', 'lifecycleStage', 'manufacturingLeadTime', 'countryOfOrigin', 'expectedLeadTime', 'durabilityDay', 'regionOfOrigin', 'intrastatConvFactor', 'customsStatNo', 'remark', 'inventoryValuationMethod', 'partCostGroupId', 'inventoryPartCostLevel', 'invoiceConsideration', 'zeroCostFlag', 'codeNo'], costsInfoFlag: ['estimatedMaterialCost'], manufacturingInfoFlag: ['cumLeadTime', 'backFlushPart', 'byProdAsSupplyInMrpDb', 'unprotectedLeadTime', 'issueType', 'mrpControlFlagDb', 'fixedLeadTimeDay', 'overReporting', 'useTheoreticalDensityDb', 'variableLeadTimeDay', 'overReportTolerance', 'fixedLeadTimeHour', 'density', 'variableLeadTimeHour'], planningInfoFlag: ['planningMethod', 'safetyStock', 'minOrderQty', 'maxOrderQty', 'mulOrderQty', 'safetyLeadTime', 'shrinkageFac', 'stdOrderQty'], } Object.entries(groups).forEach(([flagName, keys]) => { keys.forEach(key => { const unwatch = this.$watch( () => this.modalData[key], (newVal, oldVal) => { if (oldVal === undefined) return; // 忽略初始化赋值
if (newVal !== oldVal && !this[flagName]) { this[flagName] = true } } ) this.watchers.push(unwatch) }) })
let isFirstChange = true this.unwatchTable = this.$watch( () => JSON.stringify(this.partItemList), (newVal, oldVal) => { if (isFirstChange) { isFirstChange = false return // 第一次不处理
} if (newVal !== oldVal) { this.partItemInfoFlag = true } } ) },
// 清除监听
teardownWatchers () { // 清除其他信息监听
this.watchers.forEach(unwatch => unwatch()) this.watchers = [] // 清除属性监听
if (this.unwatchTable) { this.unwatchTable() this.unwatchTable = null } },
// 默认全选
defaultChecked () { this.$nextTick(() => { this.bomAlternativeList.forEach((v, i) => { this.$refs.bomAlternativeTable.toggleRowSelection(v, true) }) this.routingAlternativeList.forEach((v, i) => { this.$refs.routingAlternativeTable.toggleRowSelection(v, true) }) }) },
// 判断勾选
alternativeSelectable (row, index) { return false },
// 页签选择替换
inventoryPartClick (tab, event) { this.refreshInventoryPartTable() },
// 刷新页签的table数据
refreshInventoryPartTable () { if (this.inventoryPartTable === 'Costs') { this.queryPartUnitCostList() } if (this.inventoryPartTable === 'Revisions') { this.queryPartRevisionList() } },
// 获取维护的物料属性
getPartCharacteristicList () { let tempData = { site: this.modalData.site, partNo: this.modalData.partNo, recordType: 'IP' } getPartCharacteristicList(tempData).then(({data}) => { if (data && data.code === 0) { this.partItemList = data.rows.map(item => ({ ...item, numValue: item.numValue === null ? undefined : item.numValue })) } else { this.partItemList = [] } }) },
// 查询物料的bom版本列表
queryPartRevisionList () { let tempData = { site: this.modalData.site, partNo: this.modalData.partNo } queryPartRevisionList(tempData).then(({data}) => { if (data && data.code === 0) { this.revisionList = data.rows } else { this.revisionList = [] } }) },
// 查询物料的 unitCost 列表
queryPartUnitCostList () { let tempData = { site: this.modalData.site, partNo: this.modalData.partNo, configurationId: this.modalData.configurationId, userName: this.$store.state.user.name, } queryPartUnitCostList(tempData).then(({data}) => { if (data && data.code === 0) { this.unitCostList = data.rows } else { this.unitCostList = [] } }) },
// 新增revision模态框
savePartRevisionModal () { this.revisionData = { flag: '1', site: this.modalData.site, partNo: this.modalData.partNo, engChgLevel: undefined, effPhaseInDate: '', effPhaseOutDate: '', revisionText: '', productStatus: 'Not In Effect', repairStatus: 'Not In Effect', engRevision: '', createBy: this.$store.state.user.name, } getPartRevisionEngChgLevel(this.revisionData).then(({data}) => { if (data && data.code === 0) { this.revisionData.engChgLevel = data.rows.engChgLevel this.revisionData.engRevision = data.rows.engRevision } }) this.updateRevisionModelFlag = true this.updateRevisionModelDisableFlag = false },
// 编辑bom版本模态框
updateRevisionModal (row) { this.revisionData = { flag: '2', site: row.site, partNo: row.partNo, engChgLevel: row.engChgLevel, effPhaseInDate: row.effPhaseInDate, effPhaseOutDate: row.effPhaseOutDate, revisionText: row.revisionText, productStatus: row.productStatus, repairStatus: row.repairStatus, engRevision: row.engRevision, updateBy: this.$store.state.user.name, } this.updateRevisionModelFlag = true this.updateRevisionModelDisableFlag = true },
// 新增/编辑bom版本
updateRevision () { if (this.revisionData.engChgLevel === '' || this.revisionData.engChgLevel == null) { this.$message.warning('请填写版本号(Revision)!') return } if (this.revisionData.flag === '2' && (this.revisionData.engRevision === '' || this.revisionData.engRevision == null)) { this.$message.warning('请填写工程版本号(Eng Rev)!') return } if (this.revisionData.effPhaseInDate === '' || this.revisionData.effPhaseInDate == null) { this.$message.warning('请选择生效日期(Phase In)!') return } if (this.revisionData.flag === '1') { saveRevision(this.revisionData).then(({data}) => { if (data && data.code === 0) { this.queryPartRevisionList() this.updateRevisionModelFlag = false this.$message({ message: '操作成功', type: 'success', duration: 1500, onClose: () => {} }) } else { this.$alert(data.msg, '错误', { confirmButtonText: '确定' }) } }) } else { updateRevision(this.revisionData).then(({data}) => { if (data && data.code === 0) { this.queryPartRevisionList() this.updateRevisionModelFlag = false // 如果是同步物料阶段,需要刷新下面BOM的列表
if (this.modalData.flag === '3') { this.getBomAndRoutingList() } this.$message({ message: '操作成功', type: 'success', duration: 1500, onClose: () => {} }) } else { this.$alert(data.msg, '错误', { confirmButtonText: '确定' }) } }) } },
// 删除物料revision
deleteRevisionModal (row) { this.$confirm(`是否删除该版本?`, '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => { row.updateBy = this.$store.state.user.name deleteRevision(row).then(({data}) => { if (data && data.code === 0) { this.queryPartRevisionList() this.$message({ message: '操作成功', type: 'success', duration: 1500, onClose: () => {} }) } else { this.$alert(data.msg, '错误', { confirmButtonText: '确定' }) } }) }) },
// 物料编码失去焦点事件
queryMasterField () { // 根据物料编码查 masterPart 属性
queryMasterField(this.modalData).then(({data}) => { if (data && data.code === 0) { if (data.data != null) { this.modalData.partDesc = data.data.partDesc this.modalData.umId = data.data.umId this.modalData.umName = data.data.umName this.modalData.weightNet = data.data.weightNet this.modalData.volumeNet = data.data.volumeNet } } }) },
// 制造提前期内容改变事件
changeExpectedLeadTime () { this.modalData.expectedLeadTime = this.modalData.manufacturingLeadTime },
// 天数内容改变事件
changeDurabilityWeek () { this.modalData.durabilityWeek = this.modalData.durabilityDay / 7 },
focusNextInput (index, type) { let aaa = '' if (this.updatePartItemList.length - 1 === index) { aaa = `${type}0` } else { aaa = `${type}${index + 1}` } this.$nextTick(() => { this.$refs[aaa].focus() }) },
// ======== 分页相关方法 ========
// 每页数
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) } }, // 每页数
locationSizeChangeHandle (val) { this.locationPageSize = val this.locationPageIndex = 1 this.getLocationList() }, // 当前页
locationCurrentChangeHandle (val) { this.locationPageIndex = val this.getLocationList() }, // 每页数
sizeChangeHandle2 (val) { this.pageSize2 = val this.pageIndex2 = 1 this.queryFromPartList() }, // 当前页
currentChangeHandle2 (val) { this.pageIndex2 = val this.queryFromPartList() },
// ======== 页签切换相关方法 ========
selectFlag(row, index) { if (row.status !== 'Y') { return true } else { return false } },
// 列表表格选择替换
tabClick (tab, event) { // 刷新列表数据
this.refreshCurrentTabTable() },
// 当前值发生变化的时候修改
changeCurrentRow (row, oldRow) { // 判断是否是获取焦点的事件
if (row) { this.partCurrentRow = JSON.parse(JSON.stringify(row)) //刷新当前页表
this.refreshCurrentTabTable() } },
// 刷新页签的table数据
refreshCurrentTabTable () { if (this.activeTable === 'part_agent') { this.getPartAgent() } else if (this.activeTable === 'part_file') { this.getFileContentData() } else if (this.activeTable === 'part_manufacturer') { this.getPartManufacturer() } else if (this.activeTable === 'default_locations') { this.getDefaultLocation() } },
// ======== 列表数据刷新方法 ========
// 查询模板中的属性
getItemListByCodeNo () { let tempData = { site: this.$store.state.user.site, codeNo: this.modalData.codeNo, recordType: 'IP' } getItemListByCodeNo(tempData).then(({data}) => { if (data && data.code === 0) { this.partItemList = data.rows.map(item => ({ ...item, numValue: item.numValue === null ? undefined : item.numValue })) } else { this.partItemList = [] } }) },
// 查询物料代理商
getPartAgent () { let tempData = { site: this.$store.state.user.site, partNo: this.partCurrentRow.partNo, //agentId: this.partCurrentRow.agentId
} getPartAgent(tempData).then(({data}) => { if (data && data.code === 0) { this.partAgentList = data.rows } else { this.partAgentList = [] } }) },
// 查询物料制造商
getPartManufacturer () { let tempData = { site: this.$store.state.user.site, partNo: this.partCurrentRow.partNo, //agentId: this.partCurrentRow.agentId
} getPartManufacturer(tempData).then(({data}) => { if (data && data.code === 0) { this.partManufacturerList = data.rows } else { this.partManufacturerList = [] } }) },
// 查询物料库位
getDefaultLocation () { let tempData = { site: this.$store.state.user.site, partNo: this.partCurrentRow.partNo, } getDefaultLocation(tempData).then(({data}) => { if (data && data.code === 0) { this.defaultLocationList = data.rows } else { this.defaultLocationList = [] } }) },
// ======== 列表数据刷新方法 ========
// 获取数据列表
getDataList () { this.searchData.limit = this.pageSize this.searchData.page = this.pageIndex partInformationSearch(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) // 判断是否全部存在数据
if (this.dataList.length > 0) { // 设置选中行
this.$refs.partTable.setCurrentRow(this.dataList[0]) this.partClickRow(this.dataList[0]) } else { this.partCurrentRow = {} this.refreshCurrentTabTable() } } }) this.isFilterSearch = false },
// 其他页面跳转来的查询方法,如果该料号已经转正,则按照IFS料号跳转
getDataList2 () { this.searchData.limit = this.pageSize this.searchData.page = this.pageIndex partInformationSearch2(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) // 判断是否全部存在数据
if (this.dataList.length > 0) { // 设置选中行
this.$refs.partTable.setCurrentRow(this.dataList[0]) this.partClickRow(this.dataList[0]) this.searchData.plmPartNo = this.dataList[0].partNo } else { this.partCurrentRow = {} this.refreshCurrentTabTable() } } }) },
// ======== 新增/编辑模态框 ========
// 物料信息新增模态框
addModal () { getProjectPartNo(this.searchData).then(({data}) => { if (data && data.code === 0) { this.modalData = { flag: '1', title: '物料新增', site: this.$store.state.user.site, partNo: data.partNo, partDesc: '', spec: '', partTypeDb: '', partType: 'Purchased', familyId: '', familyName: '', groupId: '', groupName: '', umId: '', umName: '', weightNet: '', uomForWeightNet: 'kg', volumeNet: '', uomForVolumeNet: 'm3', lotTrackingCode: 'Order Based', active: 'Y', remark: '', supplierId: '', supplierName: '', productGroupId1: '', productGroupName1: '', productGroupId2: '', productGroupName2: '', productGroupId3: '', productGroupName3: '', productGroupId4: '*', productGroupName4: 'NorthSky Application owner', commGroup3: '', commGroup3Desc: '', erpPartNo: '', codeNo: '', codeDesc: '', manufacturerId: '', manufacturerName: '', agentId: '', agentName: '', createBy: this.$store.state.user.name, typeDesignation: '', hazardCode: '', hazardDesc: '', assetClass: 'S', assetClassDesc: '标准', dimQuality: '', abcClass: 'C', abcClassDesc: '', frequencyClass: 'Very Slow Mover', lifecycleStage: 'Development', countryOfOrigin: '', countryOfOriginDesc: '', manufacturingLeadTime: 0, expectedLeadTime: 0, regionOfOrigin: '', regionOfOriginDesc: '', durabilityWeek: '', customsStatNo: '', customsStatDesc: '', durabilityDay: '', intrastatConvFactor: undefined, supplyCode: '', umDesc: '', status: 'N', partStatus: 'A', partStatusDesc: '活动', configurationId: '*', estimatedMaterialCost: 0, inventoryValuationMethod: 'Standard Cost', partCostGroupId: '', partCostGroupDesc: '', inventoryPartCostLevel: 'Cost Per Part', invoiceConsideration: 'Ignore Invoice Price', zeroCostFlag: 'Zero Cost Forbidden', planningMethod: 'A', planningMethodDesc: '', safetyStock: 0, minOrderQty: 0, maxOrderQty: 0, mulOrderQty: 0, safetyLeadTime: 0, shrinkageFac: 0, stdOrderQty: 0, cumLeadTime: 0, backFlushPart: 'All Locations', byProdAsSupplyInMrpDb: '', unprotectedLeadTime: 0, issueType: 'Reserve And Backflush', mrpControlFlagDb: 'Y', fixedLeadTimeDay: 0, overReporting: 'Allowed', useTheoreticalDensityDb: '', variableLeadTimeDay: 0, overReportTolerance: 0, fixedLeadTimeHour: 0, density: undefined, variableLeadTimeHour: 0, partItemList: [], ifsPartNo: '', plmPartNo: '', showInQueryFlag: 'Y', temporaryPartFlag: 'Y', mainInfoFlag: false, // 主信息标识
costsInfoFlag: false, // costs标识
manufacturingInfoFlag: false, // Manufacturing标识
planningInfoFlag: false, // planning标识
partItemInfoFlag: false, // 属性信息标识
copyPartNo: '' } this.partItemList = [] this.inventoryPartTable = 'General' this.copyFlag2 = false this.modalDisableFlag = false this.modalFlag = true } else { this.$message.error(data.msg) } }) },
// 物料信息编辑模态框
updateModal (row) { this.modalData = { flag: '2', title: '物料编辑', site: row.site, partNo: row.partNo, partDesc: row.partDesc, spec: row.spec, partTypeDb: row.partTypeDb, oldPartType: row.partType, partType: row.partType, familyId: row.familyId, familyName: row.familyName, groupId: row.groupId, groupName: row.groupName, umId: row.umId, umName: row.umName, weightNet: row.weightNet, uomForWeightNet: row.uomForWeightNet, volumeNet: row.volumeNet, uomForVolumeNet: row.uomForVolumeNet, lotTrackingCode: row.lotTrackingCode, active: row.active, remark: row.remark, supplierId: row.supplierId, supplierName: row.supplierName, productGroupId1: row.productGroupId1, productGroupName1: row.productGroupName1, productGroupId2: row.productGroupId2, productGroupName2: row.productGroupName2, productGroupId3: row.productGroupId3, productGroupName3: row.productGroupName3, productGroupId4: row.productGroupId4, productGroupName4: row.productGroupName4, commGroup3: row.commGroup3, commGroup3Desc: row.commGroup3Desc, erpPartNo: row.erpPartNo, codeNo: row.codeNo, codeDesc: row.codeDesc, manufacturerId: row.manufacturerId, manufacturerName: row.manufacturerName, agentId: row.agentId, agentName: row.agentName, updateBy: this.$store.state.user.name, typeDesignation: row.typeDesignation, hazardCode: row.hazardCode, hazardDesc: row.hazardDesc, assetClass: row.assetClass, assetClassDesc: row.assetClassDesc, dimQuality: row.dimQuality, abcClass: row.abcClass, abcClassDesc: row.abcClassDesc, frequencyClass: row.frequencyClass, lifecycleStage: row.lifecycleStage, countryOfOrigin: row.countryOfOrigin, countryOfOriginDesc: row.countryOfOriginDesc, manufacturingLeadTime: row.manufacturingLeadTime, expectedLeadTime: row.expectedLeadTime, regionOfOrigin: row.regionOfOrigin, regionOfOriginDesc: row.regionOfOriginDesc, durabilityWeek: '', customsStatNo: row.customsStatNo, customsStatDesc: row.customsStatDesc, durabilityDay: row.durabilityDay, intrastatConvFactor: row.intrastatConvFactor, supplyCode: row.supplyCode, umDesc: row.umDesc, status: row.status, partStatus: row.partStatus, partStatusDesc: row.partStatusDesc, configurationId: row.configurationId, estimatedMaterialCost: row.estimatedMaterialCost, inventoryValuationMethod: row.inventoryValuationMethod, partCostGroupId: row.partCostGroupId, partCostGroupDesc: row.partCostGroupDesc, inventoryPartCostLevel: row.inventoryPartCostLevel, invoiceConsideration: row.invoiceConsideration, zeroCostFlag: row.zeroCostFlag, planningMethod: row.planningMethod, planningMethodDesc: row.planningMethodDesc, safetyStock: row.safetyStock, minOrderQty: row.minOrderQty, maxOrderQty: row.maxOrderQty, mulOrderQty: row.mulOrderQty, safetyLeadTime: row.safetyLeadTime, shrinkageFac: row.shrinkageFac, stdOrderQty: row.stdOrderQty, cumLeadTime: row.cumLeadTime, backFlushPart: row.backFlushPart, byProdAsSupplyInMrpDb: row.byProdAsSupplyInMrpDb, unprotectedLeadTime: row.unprotectedLeadTime, issueType: row.issueType, mrpControlFlagDb: row.mrpControlFlagDb, fixedLeadTimeDay: row.fixedLeadTimeDay, overReporting: row.overReporting, useTheoreticalDensityDb: row.useTheoreticalDensityDb, variableLeadTimeDay: row.variableLeadTimeDay, overReportTolerance: row.overReportTolerance, fixedLeadTimeHour: row.fixedLeadTimeHour, density: row.density, variableLeadTimeHour: row.variableLeadTimeHour, createDate: row.createDate, partItemList: [], plmPartNo: row.plmPartNo, ifsPartNo: row.ifsPartNo, showInQueryFlag: row.showInQueryFlag, temporaryPartFlag: row.temporaryPartFlag, mainInfoFlag: false, // 主信息标识
costsInfoFlag: false, // costs标识
manufacturingInfoFlag: false, // Manufacturing标识
planningInfoFlag: false, // planning标识
partItemInfoFlag: false, // 属性信息标识
copyPartNo: '' } this.resetFlags() // 重置标识
this.setupWatchers() // 设置监听
this.getPartCharacteristicList() this.inventoryPartTable = 'General' this.copyFlag2 = false this.modalDisableFlag = true this.modalFlag = true },
// 详情
detailsModal (row) { this.modalData = { flag: '4', title: '物料详情', site: row.site, partNo: row.partNo, partDesc: row.partDesc, spec: row.spec, partTypeDb: row.partTypeDb, oldPartType: row.partType, partType: row.partType, familyId: row.familyId, familyName: row.familyName, groupId: row.groupId, groupName: row.groupName, umId: row.umId, umName: row.umName, weightNet: row.weightNet, uomForWeightNet: row.uomForWeightNet, volumeNet: row.volumeNet, uomForVolumeNet: row.uomForVolumeNet, lotTrackingCode: row.lotTrackingCode, active: row.active, remark: row.remark, supplierId: row.supplierId, supplierName: row.supplierName, productGroupId1: row.productGroupId1, productGroupName1: row.productGroupName1, productGroupId2: row.productGroupId2, productGroupName2: row.productGroupName2, productGroupId3: row.productGroupId3, productGroupName3: row.productGroupName3, productGroupId4: row.productGroupId4, productGroupName4: row.productGroupName4, commGroup3: row.commGroup3, commGroup3Desc: row.commGroup3Desc, erpPartNo: row.erpPartNo, codeNo: row.codeNo, codeDesc: row.codeDesc, manufacturerId: row.manufacturerId, manufacturerName: row.manufacturerName, agentId: row.agentId, agentName: row.agentName, updateBy: this.$store.state.user.name, typeDesignation: row.typeDesignation, hazardCode: row.hazardCode, hazardDesc: row.hazardDesc, assetClass: row.assetClass, assetClassDesc: row.assetClassDesc, dimQuality: row.dimQuality, abcClass: row.abcClass, abcClassDesc: row.abcClassDesc, frequencyClass: row.frequencyClass, lifecycleStage: row.lifecycleStage, countryOfOrigin: row.countryOfOrigin, countryOfOriginDesc: row.countryOfOriginDesc, manufacturingLeadTime: row.manufacturingLeadTime, expectedLeadTime: row.expectedLeadTime, regionOfOrigin: row.regionOfOrigin, regionOfOriginDesc: row.regionOfOriginDesc, durabilityWeek: '', customsStatNo: row.customsStatNo, customsStatDesc: row.customsStatDesc, durabilityDay: row.durabilityDay, intrastatConvFactor: row.intrastatConvFactor, supplyCode: row.supplyCode, umDesc: row.umDesc, status: row.status, partStatus: row.partStatus, partStatusDesc: row.partStatusDesc, configurationId: row.configurationId, estimatedMaterialCost: row.estimatedMaterialCost, inventoryValuationMethod: row.inventoryValuationMethod, partCostGroupId: row.partCostGroupId, partCostGroupDesc: row.partCostGroupDesc, inventoryPartCostLevel: row.inventoryPartCostLevel, invoiceConsideration: row.invoiceConsideration, zeroCostFlag: row.zeroCostFlag, planningMethod: row.planningMethod, planningMethodDesc: row.planningMethodDesc, safetyStock: row.safetyStock, minOrderQty: row.minOrderQty, maxOrderQty: row.maxOrderQty, mulOrderQty: row.mulOrderQty, safetyLeadTime: row.safetyLeadTime, shrinkageFac: row.shrinkageFac, stdOrderQty: row.stdOrderQty, cumLeadTime: row.cumLeadTime, backFlushPart: row.backFlushPart, byProdAsSupplyInMrpDb: row.byProdAsSupplyInMrpDb, unprotectedLeadTime: row.unprotectedLeadTime, issueType: row.issueType, mrpControlFlagDb: row.mrpControlFlagDb, fixedLeadTimeDay: row.fixedLeadTimeDay, overReporting: row.overReporting, useTheoreticalDensityDb: row.useTheoreticalDensityDb, variableLeadTimeDay: row.variableLeadTimeDay, overReportTolerance: row.overReportTolerance, fixedLeadTimeHour: row.fixedLeadTimeHour, density: row.density, variableLeadTimeHour: row.variableLeadTimeHour, createDate: row.createDate, partItemList: [], plmPartNo: row.plmPartNo, ifsPartNo: row.ifsPartNo, showInQueryFlag: row.showInQueryFlag, temporaryPartFlag: row.temporaryPartFlag, mainInfoFlag: false, // 主信息标识
costsInfoFlag: false, // costs标识
manufacturingInfoFlag: false, // Manufacturing标识
planningInfoFlag: false, // planning标识
partItemInfoFlag: false, // 属性信息标识
copyPartNo: '' } this.getPartCharacteristicList() this.inventoryPartTable = 'General' this.copyFlag2 = false this.modalDisableFlag = true this.modalFlag = true },
// 转正式物料
toBecomeOfficialPartModal (row) { this.modalData = { flag: '3', title: '同步物料信息', site: row.site, partNo: row.partNo, partDesc: row.partDesc, spec: row.spec, partTypeDb: row.partTypeDb, partType: row.partType, familyId: row.familyId, familyName: row.familyName, groupId: row.groupId, groupName: row.groupName, umId: row.umId, umName: row.umName, weightNet: row.weightNet, uomForWeightNet: row.uomForWeightNet, volumeNet: row.volumeNet, uomForVolumeNet: row.uomForVolumeNet, lotTrackingCode: row.lotTrackingCode, active: row.active, remark: row.remark, supplierId: row.supplierId, supplierName: row.supplierName, productGroupId1: row.productGroupId1, productGroupName1: row.productGroupName1, productGroupId2: row.productGroupId2, productGroupName2: row.productGroupName2, productGroupId3: row.productGroupId3, productGroupName3: row.productGroupName3, productGroupId4: row.productGroupId4, productGroupName4: row.productGroupName4, commGroup3: row.commGroup3, commGroup3Desc: row.commGroup3Desc, erpPartNo: row.erpPartNo, codeNo: row.codeNo, codeDesc: row.codeDesc, manufacturerId: row.manufacturerId, manufacturerName: row.manufacturerName, agentId: row.agentId, agentName: row.agentName, updateBy: this.$store.state.user.name, typeDesignation: row.typeDesignation, hazardCode: row.hazardCode, hazardDesc: row.hazardDesc, assetClass: row.assetClass, assetClassDesc: row.assetClassDesc, dimQuality: row.dimQuality, abcClass: row.abcClass, abcClassDesc: row.abcClassDesc, frequencyClass: row.frequencyClass, lifecycleStage: row.lifecycleStage, countryOfOrigin: row.countryOfOrigin, countryOfOriginDesc: row.countryOfOriginDesc, manufacturingLeadTime: row.manufacturingLeadTime, expectedLeadTime: row.expectedLeadTime, regionOfOrigin: row.regionOfOrigin, regionOfOriginDesc: row.regionOfOriginDesc, durabilityWeek: '', customsStatNo: row.customsStatNo, customsStatDesc: row.customsStatDesc, durabilityDay: row.durabilityDay, intrastatConvFactor: row.intrastatConvFactor, supplyCode: row.supplyCode, umDesc: row.umDesc, status: row.status, partStatus: row.partStatus, partStatusDesc: row.partStatusDesc, configurationId: row.configurationId, estimatedMaterialCost: row.estimatedMaterialCost, inventoryValuationMethod: row.inventoryValuationMethod, partCostGroupId: row.partCostGroupId, partCostGroupDesc: row.partCostGroupDesc, inventoryPartCostLevel: row.inventoryPartCostLevel, invoiceConsideration: row.invoiceConsideration, zeroCostFlag: row.zeroCostFlag, planningMethod: row.planningMethod, planningMethodDesc: row.planningMethodDesc, safetyStock: row.safetyStock, minOrderQty: row.minOrderQty, maxOrderQty: row.maxOrderQty, mulOrderQty: row.mulOrderQty, safetyLeadTime: row.safetyLeadTime, shrinkageFac: row.shrinkageFac, stdOrderQty: row.stdOrderQty, cumLeadTime: row.cumLeadTime, backFlushPart: row.backFlushPart, byProdAsSupplyInMrpDb: row.byProdAsSupplyInMrpDb, unprotectedLeadTime: row.unprotectedLeadTime, issueType: row.issueType, mrpControlFlagDb: row.mrpControlFlagDb, fixedLeadTimeDay: row.fixedLeadTimeDay, overReporting: row.overReporting, useTheoreticalDensityDb: row.useTheoreticalDensityDb, variableLeadTimeDay: row.variableLeadTimeDay, overReportTolerance: row.overReportTolerance, fixedLeadTimeHour: row.fixedLeadTimeHour, density: row.density, variableLeadTimeHour: row.variableLeadTimeHour, createDate: row.createDate, bomAlternativeList: [], routingAlternativeList: [], partItemList: [], ifsPartNo: '', plmPartNo: row.plmPartNo, showInQueryFlag: row.showInQueryFlag, temporaryPartFlag: row.temporaryPartFlag, mainInfoFlag: false, // 主信息标识
costsInfoFlag: false, // costs标识
manufacturingInfoFlag: false, // Manufacturing标识
planningInfoFlag: false, // planning标识
partItemInfoFlag: false, // 属性信息标识
copyPartNo: '' } this.getPartCharacteristicList() // 查出该物料的BOM和routing的替代
this.getBomAndRoutingList() this.inventoryPartTable = 'General' this.copyFlag2 = false this.modalDisableFlag = true this.modalFlag = true },
// 关闭模态框
closeModal () { this.modalFlag = false },
// 模态框关闭事件
handleDialogClose () { if (this.modalData.flag === '2') { this.teardownWatchers() // 清除监听
} },
// 查出该物料的BOM和routing的替代
getBomAndRoutingList () { getBomAndRoutingList(this.modalData).then(({data}) => { if (data && data.code === 0) { this.bomAlternativeList = data.rows.bomList this.routingAlternativeList = data.rows.routingList this.defaultChecked() } else { this.bomAlternativeList = [] this.routingAlternativeList = [] } }) },
selectionBomAlternative (val) { this.bomAlternativeSelections = val },
selectionRoutingAlternative (val) { this.routingAlternativeSelections = val },
// 选择代理商
getAgentList () { // 查询所有代理商
getAgentListBy(this.agentData).then(({data}) => { if (data && data.code === 0) { this.agentList1 = data.rows } else { this.$alert(data.msg, '错误', { confirmButtonText: '确定' }) } }) },
savePartAgent () { this.agentSelections1 = null this.agentSelections2 = null getAgentList(this.partCurrentRow).then(({data}) => { this.agentList1 = data.row1 this.agentList2 = data.row2 }) this.agentData = { site: this.$store.state.user.site, agentId: '', agentName: '', } this.agentModelFlag = true },
// 可选代理商
agentClickRow1 (row) { this.$refs.agentTable1.toggleRowSelection(row) },
// 已有代理商
agentClickRow2 (row) { this.$refs.agentTable2.toggleRowSelection(row) },
selectionAgent1 (val) { this.agentSelections1 = val },
selectionAgent2 (val) { this.agentSelections2 = val },
// 添加代理商
addAgent () { if (this.agentSelections1 == null || this.agentSelections1.length === 0) { this.$message.warning('请选择可选代理商!') return } let inData = { site: this.$store.state.user.site, partNo: this.partCurrentRow.partNo, agentList: this.agentSelections1 } addPartAgent(inData).then(({data}) => { if (data && data.code === 0) { getAgentList(this.partCurrentRow).then(({data}) => { this.agentList1 = data.row1 this.agentList2 = data.row2 }) this.agentSelections1 = [] } else { this.$alert(data.msg, '错误', { confirmButtonText: '确定' }) } }) },
// 删除物料代理商
deleteAgent () { if(this.agentSelections2 == null || this.agentSelections2.length === 0){ this.$message.warning('请选择已有代理商!') return } let inData = { site: this.$store.state.user.site, partNo: this.partCurrentRow.partNo, agentList: this.agentSelections2 } deletePartAgent(inData).then(({data}) => { if (data && data.code === 0) { getAgentList(this.partCurrentRow).then(({data}) => { this.agentList1 = data.row1 this.agentList2 = data.row2 }) this.agentSelections2 = [] } else { this.$alert(data.msg, '错误', { confirmButtonText: '确定' }) } }) },
// 单删
deleteAgent2 (row) { this.$confirm(`是否删除该代理商?`, '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => { deleteAgent(row).then(({data}) => { if (data && data.code === 0) { this.getPartAgent() this.$message({ message: '操作成功', type: 'success', duration: 1500, onClose: () => {} }) } else { this.$alert(data.msg, '错误', { confirmButtonText: '确定' }) } }) }) },
// 选择制造商
getManufacturerList () { // 查询所有代理商
getManufacturerListBy(this.manufacturerData).then(({data}) => { if (data && data.code === 0) { this.manufacturerList1 = data.rows } else { this.$alert(data.msg, '错误', { confirmButtonText: '确定' }) } }) },
// 选择默认库位
getLocationList () { this.locationData.limit = this.locationPageSize this.locationData.page = this.locationPageIndex this.locationData.partNo = this.partCurrentRow.partNo getLocationListBy(this.locationData).then(({data}) => { if (data && data.code === 0) { this.locationList1 = data.page.list this.locationPageIndex = data.page.currPage this.locationPageSize = data.page.pageSize this.locationTotalPage = data.page.totalCount } else { this.locationList1 = [] } }) },
savePartManufacturer () { this.manufacturerSelections1 = null this.manufacturerSelections2 = null getManufacturerList(this.partCurrentRow).then(({data}) => { this.manufacturerList1 = data.row1 this.manufacturerList2 = data.row2 }) this.manufacturerData = { site: this.$store.state.user.site, manufacturerId: '', manufacturerName: '', } this.manufacturerModelFlag = true },
// 可选制造商
manufacturerClickRow1 (row) { this.$refs.manufacturerTable1.toggleRowSelection(row) },
// 已有制造商
manufacturerClickRow2 (row) { this.$refs.manufacturerTable2.toggleRowSelection(row) },
selectionManufacturer1 (val) { this.manufacturerSelections1 = val },
selectionManufacturer2 (val) { this.manufacturerSelections2 = val },
// 添加制造商
addManufacturer () { if (this.manufacturerSelections1 == null || this.manufacturerSelections1.length === 0) { this.$message.warning('请选择可选制造商!') return } let inData = { site: this.$store.state.user.site, partNo: this.partCurrentRow.partNo, manufacturerList: this.manufacturerSelections1 } addPartManufacturer(inData).then(({data}) => { if (data && data.code === 0) { getManufacturerList(this.partCurrentRow).then(({data}) => { this.manufacturerList1 = data.row1 this.manufacturerList2 = data.row2 }) this.manufacturerSelections1 = [] } else { this.$alert(data.msg, '错误', { confirmButtonText: '确定' }) } }) },
// 删除物料制造商
deleteManufacturer () { if (this.manufacturerSelections2 == null || this.manufacturerSelections2.length === 0) { this.$message.warning('请选择已有制造商!') return } let inData = { site: this.$store.state.user.site, partNo: this.partCurrentRow.partNo, manufacturerList: this.manufacturerSelections2 } deletePartManufacturer(inData).then(({data}) => { if (data && data.code === 0) { getManufacturerList(this.partCurrentRow).then(({data}) => { this.manufacturerList1 = data.row1 this.manufacturerList2 = data.row2 }) this.manufacturerSelections2 = [] } else { this.$alert(data.msg, '错误', { confirmButtonText: '确定' }) } }) },
// 单删
deleteManufacturer2 (row) { this.$confirm(`是否删除该制造商?`, '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => { deleteManufacturer(row).then(({data}) => { if (data && data.code === 0) { this.getPartManufacturer() this.$message({ message: '操作成功', type: 'success', duration: 1500, onClose: () => {} }) } else { this.$alert(data.msg, '错误', { confirmButtonText: '确定' }) } }) }).catch(() => { }) },
saveDefaultLocation () { this.locationSelections1 = null this.locationSelections2 = null this.locationData.limit = this.locationPageSize this.locationData.page = this.locationPageIndex this.locationData.partNo = this.partCurrentRow.partNo getLocationList(this.locationData).then(({data}) => { this.locationList1 = data.row1.list this.locationList2 = data.row2 this.locationPageIndex = data.row1.currPage this.locationPageSize = data.row1.pageSize this.locationTotalPage = data.row1.totalCount }) this.locationData = { site: this.$store.state.user.site, locationId: '', locationName: '', partNo: this.partCurrentRow.partNo, page: 1, limit: 10 } this.locationModelFlag = true },
// 可选库位
locationClickRow1 (row) { this.$refs.locationTable1.toggleRowSelection(row) },
// 已有库位
locationClickRow2 (row) { this.$refs.locationTable2.toggleRowSelection(row) },
selectionLocation1 (val) { this.locationSelections1 = val },
selectionLocation2 (val) { this.locationSelections2 = val },
// 添加库位
addLocation () { if (this.locationSelections1 == null || this.locationSelections1.length === 0) { this.$message.warning('请选择可选库位!') return } let inData = { site: this.$store.state.user.site, partNo: this.partCurrentRow.partNo, updateBy: this.$store.state.user.name, locationList: this.locationSelections1 } addDefaultLocation(inData).then(({data}) => { if (data && data.code === 0) { getLocationList(this.locationData).then(({data}) => { this.locationList1 = data.row1.list this.locationList2 = data.row2 this.locationPageIndex = data.row1.currPage this.locationPageSize = data.row1.pageSize this.locationTotalPage = data.row1.totalCount }) this.locationSelections1 = [] } else { this.$alert(data.msg, '错误', { confirmButtonText: '确定' }) } }) },
// 删除库位
deleteLocation () { if (this.locationSelections2 == null || this.locationSelections2.length === 0) { this.$message.warning('请选择已有库位!') return } let inData = { site: this.$store.state.user.site, partNo: this.partCurrentRow.partNo, updateBy: this.$store.state.user.name, locationList: this.locationSelections2 } deleteDefaultLocation(inData).then(({data}) => { if (data && data.code === 0) { getLocationList(this.locationData).then(({data}) => { this.locationList1 = data.row1.list this.locationList2 = data.row2 this.locationPageIndex = data.row1.currPage this.locationPageSize = data.row1.pageSize this.locationTotalPage = data.row1.totalCount }) this.locationSelections2 = [] } else { this.$alert(data.msg, '错误', { confirmButtonText: '确定' }) } }) },
// 单删
deleteLocation2 (row) { this.$confirm(`是否删除该库位?`, '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => { row.updateBy = this.$store.state.user.name deleteLocation(row).then(({data}) => { if (data && data.code === 0) { this.getDefaultLocation() this.$message({ message: '操作成功', type: 'success', duration: 1500, onClose: () => {} }) } else { this.$alert(data.msg, '错误', { confirmButtonText: '确定' }) } }) }).catch(() => { }) },
// 关闭后刷新列表
refreshDetailList () { this.getPartAgent() this.getPartManufacturer() this.getDefaultLocation() },
// ======== 新增/编辑/删除方法 ========
// 物料信息新增/编辑
saveData () { if (this.modalData.partNo === '' || this.modalData.partNo == null) { this.$message.warning('请填写物料编码!') return } if (this.modalData.partDesc === '' || this.modalData.partDesc == null) { this.$message.warning('请填写物料描述!') return } if (this.modalData.partType === '' || this.modalData.partType == null) { this.$message.warning('请选择零件类型!') return } if (this.modalData.productGroupId4 === '' || this.modalData.productGroupId4 == null) { this.$message.warning('请选择计划人!') return } // 如果商品组1是"00100",则商品组3必填
if (this.modalData.productGroupId1 === '00100' && (this.modalData.commGroup3 === '' || this.modalData.commGroup3 == null)) { this.$message.warning('商品组1为"00100"时,商品组3必填!') return } if (this.modalData.umId === '' || this.modalData.umId == null) { this.$message.warning('请选择计量单位!') return } if (this.partItemList.length > 0 && (this.modalData.codeNo == null || this.modalData.codeNo === '')) { this.$message.warning('存在物料属性,属性模板不能为空值!') return } if (this.modalData.partType==='Manufactured Recipe'&&!(this.modalData.density&&this.modalData.density!=='')){ this.$message.warning('请填写密度!') return } // 校验属性必须都填有属性值
if (this.partItemList.length > 0 && this.partItemList.some(item => { const emptyText = [null, undefined, ''].includes(item.textValue) const emptyNum = [null, undefined, ''].includes(item.numValue) return emptyText && emptyNum })) { this.$message.warning('属性值不能为空值!') return } if (this.modalData.flag === '2' && this.modalData.oldPartType === 'Manufactured' && this.modalData.partType === 'Manufactured Recipe') { this.$confirm("该操作会删除物料BOM,请确认!", "提示", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" }).then(() => { this.saveData2() }) } else if (this.modalData.flag === '2' && this.modalData.oldPartType === 'Manufactured Recipe' && this.modalData.partType === 'Manufactured') { this.$confirm("该操作会删除物料配方,请确认!", "提示", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" }).then(() => { this.saveData2() }) } else { this.saveData2() } },
saveData2 () { this.modalData.partItemList = this.partItemList if (this.modalData.flag === '1') { this.saveLoading = true partInformationSave(this.modalData).then(({data}) => { if (data && data.code === 0) { this.searchData.plmPartNo = this.modalData.partNo this.getDataList() this.modalFlag = false this.$message({ message: '操作成功', type: 'success', duration: 1500, onClose: () => {} }) } else { this.$alert(data.msg, '错误', { confirmButtonText: '确定' }) } this.saveLoading = false }).catch(()=>{ this.saveLoading = false }) } else if (this.modalData.flag === '3') { // 转正式物料
if (this.modalData.ifsPartNo === '' || this.modalData.ifsPartNo == null) { this.$message.warning('请填写IFS物料编码!') return } if (this.modalData.partNo === this.modalData.ifsPartNo) { this.$message.warning('IFS物料编码不能等于PLM物料编码!') return } if (this.modalData.planningMethod == null || this.modalData.planningMethod === '') { this.$message.warning('请选择计划方法!') return } if (this.modalData.productGroupId3 == null || this.modalData.productGroupId3 === '') { this.$message.warning('请选择会计组!') return } this.saveLoading = true this.modalData.bomAlternativeList = this.bomAlternativeSelections this.modalData.routingAlternativeList = this.routingAlternativeSelections partInformationToOfficial(this.modalData).then(({data}) => { if (data && data.code === 0) { this.searchData = { site: this.$store.state.user.site, partNo: '', erpPartNo: '', startDate: '', endDate: '', partDesc: '', spec: '', active: '', page: 1, limit: 10, status: '', ifsPartNo: this.modalData.ifsPartNo, plmPartNo: '', partType: '' } this.getDataList() this.modalFlag = false this.$message({ message: '操作成功', type: 'success', duration: 1500, onClose: () => {} }) } else { this.$alert(data.msg, '错误', { confirmButtonText: '确定' }) } this.saveLoading = false }).catch(()=>{ this.saveLoading = false }) } else { this.saveLoading = true if (this.copyFlag2) { copyPart2(this.modalData).then(({data}) => { if (data && data.code === 0) { this.searchData.ifsPartNo = this.modalData.partNo this.getDataList() this.modalFlag = false this.$message({ message: '操作成功', type: 'success', duration: 1500, onClose: () => {} }) } else { this.$alert(data.msg, '错误', { confirmButtonText: '确定' }) } this.saveLoading = false }).catch(()=>{ this.saveLoading = false }) } else { this.modalData.mainInfoFlag = this.mainInfoFlag this.modalData.costsInfoFlag = this.costsInfoFlag this.modalData.manufacturingInfoFlag = this.manufacturingInfoFlag this.modalData.planningInfoFlag = this.planningInfoFlag this.modalData.partItemInfoFlag = this.partItemInfoFlag partInformationEdit(this.modalData).then(({data}) => { if (data && data.code === 0) { this.searchData.plmPartNo = this.modalData.plmPartNo this.getDataList() this.modalFlag = false this.$message({ message: '操作成功', type: 'success', duration: 1500, onClose: () => {} }) } else { this.$alert(data.msg, '错误', { confirmButtonText: '确定' }) } this.saveLoading = false }).catch(()=>{ this.saveLoading = false }) } } },
// 物料信息删除
delModal () { if (this.partSelections.length === 0) { this.$message.warning('请勾选要删除的物料信息!') return } this.$confirm(`是否删除这 `+ this.partSelections.length +` 条物料信息?`, '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => { let tempData = { informationList: this.partSelections } partInformationDelete(tempData).then(({data}) => { if (data && data.code === 0) { this.getDataList() this.partSelections = [] this.$message({ message: '操作成功', type: 'success', duration: 1500, onClose: () => {} }) } else { this.$alert(data.msg, '错误', { confirmButtonText: '确定' }) } }) }) },
// 复制
toCopyModal () { this.modalData.copyPartNo = this.modalData.partNo this.modalData.partNo = '' this.modalData.partDesc = '' this.copyFlag2 = true },
// 复制物料的模态框
toCopyPartModal () { this.copyPartData = { site: this.modalData.site, partNo: this.modalData.partNo, partDesc: this.modalData.partDesc, copyGeneral: 'Y', copyManufacturing: 'Y', copyDefaultLocation: 'Y', copyCharacteristic: 'Y', copyPPGeneral: 'Y', copyPPDocumentTexts: 'Y', copyPPConnectedObjects: 'Y', copySPPGeneral: 'Y', copySPPDocumentTexts: 'Y', copySPGeneral: 'Y', copySPCharacteristics: 'Y', copySPDocumentTexts: 'Y', copySPLanguageDescription: 'Y', previousVersion: this.modalData, createBy: this.$store.state.user.name, ifsPartNo: '', fromPartSite: this.modalData.site, fromPartNo: '', fromPartDesc: '', copyFlag: '', buNo: '', buDesc: '', customerPartNo: '', } if (this.modalData.flag === '2') { getProjectPartNo(this.searchData).then(({data}) => { if (data && data.code === 0) { this.copyPartData.partNo = data.partNo } else { this.copyPartData.partNo = '' } }) } if (this.modalData.flag !== '3') { this.copyPartData.fromPartNo = this.modalData.partNo this.copyPartData.fromPartDesc = this.modalData.partDesc } this.copyPartModelFlag = true },
// 复制物料的方法
copyPart () { if (this.copyPartData.fromPartSite === '' || this.copyPartData.fromPartSite == null) { this.$message.warning('From Site 不能为空!') return } if (this.copyPartData.fromPartNo === '' || this.copyPartData.fromPartNo == null) { this.$message.warning('From Part 不能为空!') return } if (this.copyPartData.partNo === '' || this.copyPartData.partNo == null) { this.$message.warning('请输入物料编码!') return } if (this.copyPartData.partDesc === '' || this.copyPartData.partDesc == null) { this.$message.warning('请输入物料名称!') return } if (this.copyPartData.copyGeneral === '' || this.copyPartData.copyGeneral == null) { this.$message.warning('General信息必选!') return } if (this.modalData.flag === '3') { // 转正里的copyPart
this.copyPartData.copyFlag = 'Y' } this.copyLoading = true copyPart(this.copyPartData).then(({data}) => { if (data && data.code === 0) { this.searchData.ifsPartNo = this.copyPartData.partNo this.getDataList() this.copyPartModelFlag = false if (this.modalData.flag === '3') { this.modalFlag = false } this.$message({ message: '操作成功', type: 'success', duration: 1500, onClose: () => {} }) } else { this.$alert(data.msg, '错误', { confirmButtonText: '确定' }) } this.copyLoading = false }).catch(()=>{ this.copyLoading = false }) },
// 新增属性模态框
savePartItemModal () { this.itemData.propertiesItemNo = '' this.itemData.itemDesc = '' this.characteristicSelections = [] this.getItemExclusionAlreadyExists() this.saveItemModelFlag = true },
itemSelectionChange (selection) { this.itemSelections = selection },
// 删除属性
deletePartItemModal () { if (this.itemSelections.length === 0) { this.$message.warning('请选择要删除的属性!') } else { this.$confirm("请是否确认删除该属性记录?", "提示", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" }).then(() => { this.partItemList = this.partItemList.filter(val => !this.itemSelections.includes(val)) this.itemSelections = [] }) } },
// 查属性模板,不包括已存在的
getItemExclusionAlreadyExists () { let itemNos = this.partItemList.map(item => item.propertiesItemNo).join(",") let tempData = { site: this.modalData.site, recordType: 'IP', propertiesItemNo: this.itemData.propertiesItemNo, itemDesc: this.itemData.itemDesc, itemNos: itemNos } getItemExclusionAlreadyExists(tempData).then(({data}) => { if (data && data.code === 0) { this.characteristicList = data.rows } else { this.characteristicList = [] } }) },
// 将选择的属性加入
saveCharacteristic () { if (this.characteristicSelections == null || this.characteristicSelections.length === 0) { this.$message.warning('请选择属性!') return } this.partItemList = [...this.partItemList,...this.characteristicSelections.map(item => ({ ...item, numValue: item.numValue === null ? undefined : item.numValue }))] this.saveItemModelFlag = false },
characteristicClickRow (row) { this.$refs.characteristicTable.toggleRowSelection(row) },
characteristicSelectionChange(selection) { this.characteristicSelections = selection },
// 安全代码输入校验
hazardCodeBlur (tagNo) { let tempData = { tagno: tagNo, conditionSql: " and hazard_code = '" + this.modalData.hazardCode + "'" + " and site = '" + this.modalData.site + "'" } verifyData(tempData).then(({data}) => { if (data && data.code === 0) { if (data.baseListData.length > 0) { this.modalData.hazardCode = data.baseListData[0].hazard_code this.modalData.hazardDesc = data.baseListData[0].hazard_desc } else { this.modalData.hazardDesc = '' } } }) },
// 计划人输入校验
productGroupId4Blur (tagNo) { let tempData = { tagno: tagNo, conditionSql: " and product_group_id = '" + this.modalData.productGroupId4 + "'" + " and site = '" + this.modalData.site + "'" } verifyData(tempData).then(({data}) => { if (data && data.code === 0) { if (data.baseListData.length > 0) { this.modalData.productGroupId4 = data.baseListData[0].product_group_id this.modalData.productGroupName4 = data.baseListData[0].product_group_name } else { this.modalData.productGroupName4 = '' } } }) },
// 会计组输入校验
productGroupId3Blur (tagNo) { let tempData = { tagno: tagNo, conditionSql: " and product_group_id = '" + this.modalData.productGroupId3 + "'" + " and site = '" + this.modalData.site + "'" } verifyData(tempData).then(({data}) => { if (data && data.code === 0) { if (data.baseListData.length > 0) { this.modalData.productGroupId3 = data.baseListData[0].product_group_id this.modalData.productGroupName3 = data.baseListData[0].product_group_name } else { this.modalData.productGroupName3 = '' } } }) },
// 计量单位输入校验
umIdBlur (tagNo) { let tempData = { tagno: tagNo, conditionSql: " and um_id = '" + this.modalData.umId + "'" } verifyData(tempData).then(({data}) => { if (data && data.code === 0) { if (data.baseListData.length > 0) { this.modalData.umId = data.baseListData[0].um_id this.modalData.umName = data.baseListData[0].um_name } else { this.modalData.umName = '' } } }) },
// 产品代码输入校验
groupIdBlur (tagNo) { let tempData = { tagno: tagNo, conditionSql: " and group_id = '" + this.modalData.groupId + "'" + " and site = '" + this.modalData.site + "'" } verifyData(tempData).then(({data}) => { if (data && data.code === 0) { if (data.baseListData.length > 0) { this.modalData.groupId = data.baseListData[0].group_id this.modalData.groupName = data.baseListData[0].group_name } else { this.modalData.groupName = '' } } }) },
// 商品组1输入校验
productGroupId1Blur (tagNo) { let tempData = { tagno: tagNo, conditionSql: " and product_group_id = '" + this.modalData.productGroupId1 + "'" + " and site = '" + this.modalData.site + "'" } verifyData(tempData).then(({data}) => { if (data && data.code === 0) { if (data.baseListData.length > 0) { this.modalData.productGroupId1 = data.baseListData[0].product_group_id this.modalData.productGroupName1 = data.baseListData[0].product_group_name } else { this.modalData.productGroupName1 = '' } } }) },
// 产品大类输入校验
familyIdBlur (tagNo) { let tempData = { tagno: tagNo, conditionSql: " and family_id = '" + this.modalData.familyId + "'" + " and site = '" + this.modalData.site + "'" } verifyData(tempData).then(({data}) => { if (data && data.code === 0) { if (data.baseListData.length > 0) { this.modalData.familyId = data.baseListData[0].family_id this.modalData.familyName = data.baseListData[0].family_name } else { this.modalData.familyName = '' } } }) },
// 商品组2输入校验
productGroupId2Blur (tagNo) { let tempData = { tagno: tagNo, conditionSql: " and product_group_id = '" + this.modalData.productGroupId2 + "'" + " and site = '" + this.modalData.site + "'" } verifyData(tempData).then(({data}) => { if (data && data.code === 0) { if (data.baseListData.length > 0) { this.modalData.productGroupId2 = data.baseListData[0].product_group_id this.modalData.productGroupName2 = data.baseListData[0].product_group_name } else { this.modalData.productGroupName2 = '' } } }) },
// 商品组3输入校验
commGroup3Blur (tagNo) { let tempData = { tagno: tagNo, conditionSql: " and product_group_id = '" + this.modalData.commGroup3 + "'" + " and site = '" + this.modalData.site + "'" } verifyData(tempData).then(({data}) => { if (data && data.code === 0) { if (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 = '' } } }) },
// 资产等级输入校验
assetClassBlur (tagNo) { let tempData = { tagno: tagNo, conditionSql: " and asset_class = '" + this.modalData.assetClass + "'" + " and site = '" + this.modalData.site + "'" } verifyData(tempData).then(({data}) => { if (data && data.code === 0) { if (data.baseListData.length > 0) { this.modalData.assetClass = data.baseListData[0].asset_class this.modalData.assetClassDesc = data.baseListData[0].asset_class_desc } else { this.modalData.assetClassDesc = '' } } }) },
// 零件状态输入校验
partStatusBlur (tagNo) { let tempData = { tagno: tagNo, conditionSql: " and part_status = '" + this.modalData.partStatus + "'" + " and site = '" + this.modalData.site + "'" } verifyData(tempData).then(({data}) => { if (data && data.code === 0) { if (data.baseListData.length > 0) { this.modalData.partStatus = data.baseListData[0].part_status this.modalData.partStatusDesc = data.baseListData[0].part_status_desc } else { this.modalData.partStatusDesc = '' } } }) },
// abc类输入校验
abcClassBlur (tagNo) { let tempData = { tagno: tagNo, conditionSql: " and abc_class = '" + this.modalData.abcClass + "'" + " and site = '" + this.modalData.site + "'" } verifyData(tempData).then(({data}) => { if (data && data.code === 0) { if (data.baseListData.length > 0) { this.modalData.abcClass = data.baseListData[0].abc_class this.modalData.abcClassDesc = data.baseListData[0].abc_class_desc } else { this.modalData.abcClassDesc = '' } } }) },
// 属性模板输入校验
codeNoBlur (tagNo) { let tempData = { tagno: tagNo, conditionSql: " and Code_no = '" + this.modalData.codeNo + "'" + " and site = '" + this.modalData.site + "'" } verifyData(tempData).then(({data}) => { if (data && data.code === 0) { if (data.baseListData.length > 0) { this.modalData.codeNo = data.baseListData[0].Code_no this.modalData.codeDesc = data.baseListData[0].Code_desc this.getItemListByCodeNo() } else { this.modalData.codeDesc = '' } } }) },
// 来源国家输入校验
countryOfOriginBlur (tagNo) { let tempData = { tagno: tagNo, conditionSql: " and country_of_origin = '" + this.modalData.countryOfOrigin + "'" + " and site = '" + this.modalData.site + "'" } verifyData(tempData).then(({data}) => { if (data && data.code === 0) { if (data.baseListData.length > 0) { this.modalData.countryOfOrigin = data.baseListData[0].country_of_origin this.modalData.countryOfOriginDesc = data.baseListData[0].country_of_origin_desc } else { this.modalData.countryOfOriginDesc = '' } } }) },
// 区域代码输入校验
regionOfOriginBlur (tagNo) { let tempData = { tagno: tagNo, conditionSql: " and region_of_origin = '" + this.modalData.regionOfOrigin + "'" + " and site = '" + this.modalData.site + "'" } verifyData(tempData).then(({data}) => { if (data && data.code === 0) { if (data.baseListData.length > 0) { this.modalData.regionOfOrigin = data.baseListData[0].region_of_origin this.modalData.regionOfOriginDesc = data.baseListData[0].region_of_origin_desc } else { this.modalData.regionOfOriginDesc = '' } } }) },
// 海关统计序号输入校验
customsStatNoBlur (tagNo) { let tempData = { tagno: tagNo, conditionSql: " and customs_stat_no = '" + this.modalData.customsStatNo + "'" + " and site = '" + this.modalData.site + "'" } verifyData(tempData).then(({data}) => { if (data && data.code === 0) { if (data.baseListData.length > 0) { this.modalData.customsStatNo = data.baseListData[0].customs_stat_no this.modalData.customsStatDesc = data.baseListData[0].customs_stat_desc } else { this.modalData.customsStatDesc = '' } } }) },
// 零件成本组输入校验
partCostGroupIdBlur (tagNo) { let tempData = { tagno: tagNo, conditionSql: " and part_cost_group_id = '" + this.modalData.partCostGroupId + "'" + " and site = '" + this.modalData.site + "'" } verifyData(tempData).then(({data}) => { if (data && data.code === 0) { if (data.baseListData.length > 0) { this.modalData.partCostGroupId = data.baseListData[0].part_cost_group_id this.modalData.partCostGroupDesc = data.baseListData[0].part_cost_group_desc } else { this.modalData.partCostGroupDesc = '' } } }) },
// 计划方法
planningMethodBlur (tagNo) { let tempData = { tagno: tagNo, conditionSql: " and planning_method = '" + this.modalData.planningMethod + "'" + " and site = '" + this.modalData.site + "'" } verifyData(tempData).then(({data}) => { if (data && data.code === 0) { if (data.baseListData.length > 0) { this.modalData.planningMethod = data.baseListData[0].planning_method this.modalData.planningMethodDesc = data.baseListData[0].planning_method_desc } else { this.modalData.planningMethodDesc = '' } } }) },
// ======== 列表操作方法 ========
// 单机选中物料信息
partClickRow (row,column) { this.partCurrentRow = JSON.parse(JSON.stringify(row)) },
// 复选物料信息
selectionPart (val) { this.partSelections = val this.$refs.selectDiv.setLengthselected(this.partSelections.length) },
// 下一个物料编码
nextPartNo () { getNextPartNo(this.modalData).then(({data}) => { if (data && data.code === 0) { this.modalData.ifsPartNo = data.rows } }) },
// 下一个物料编码
nextPartNo2 () { this.copyPartData.ifsPartNo = this.copyPartData.partNo getNextPartNo(this.copyPartData).then(({data}) => { if (data && data.code === 0) { this.copyPartData.partNo = data.rows } }) },
// 下一个物料编码
nextPartNo3 () { this.modalData.ifsPartNo = this.modalData.partNo getNextPartNo(this.modalData).then(({data}) => { if (data && data.code === 0) { this.modalData.partNo = data.rows } }) },
// 查询物料列表
queryPartModal () { this.fromPartData.limit = this.pageSize2 this.fromPartData.page = this.pageIndex2 queryOfficialPartList(this.fromPartData).then(({data}) => { if (data && data.code === 0) { this.fromPartList = data.page.list this.pageIndex2 = data.page.currPage this.pageSize2 = data.page.pageSize this.totalPage2 = data.page.totalCount this.fromPartModelFlag = true } else { this.fromPartList = [] } }) },
queryFromPartList () { this.fromPartData.limit = this.pageSize2 this.fromPartData.page = this.pageIndex2 queryOfficialPartList(this.fromPartData).then(({data}) => { if (data && data.code === 0) { this.fromPartList = data.page.list this.pageIndex2 = data.page.currPage this.pageSize2 = data.page.pageSize this.totalPage2 = data.page.totalCount } else { this.fromPartList = [] } }) },
// 双击选中物料
getFromRowData (row) { this.copyPartData.fromPartNo = row.partNo this.copyPartData.fromPartDesc = row.partDesc this.fromPartModelFlag = false },
// ======== 附件的相关方法 ========
// 获取物料附件列表
getFileContentData () { let currentData = { orderRef1: this.$store.state.user.site, orderRef2: this.partCurrentRow.partNo } getFileContentList(currentData).then(({data}) => { if (data && data.code === 0) { this.fileContentList = data.rows } else { this.fileContentList = [] } }) },
// 上传文件
uploadFile () { let currentData = { titleCon: '物料附件上传', site: this.$store.state.user.site, createBy: this.$store.state.user.name, partNo: this.partCurrentRow.partNo } this.uploadDialog = true },
// 文件删除
deleteFile (row) { this.$confirm('确定要删除此文件?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => { deleteQuotationFile(row).then(({data}) => { if (data && data.code === 0) { this.getFileContentData() this.$message({ message: '操作成功', type: 'success', duration: 1500, onClose: () => {} }) } else { this.$alert(data.msg, '错误', { confirmButtonText: '确定' }) } }) }) },
// 文件下载
downloadFile (row) { downLoadQuotationFile(row).then(({data}) => { // 不限制文件下载类型
const blob = new Blob([data], {type:'application/octet-stream;charset=utf-8'}) // 下载文件名称
const fileName = row.fileName // a标签下载
const linkNode = document.createElement('a') linkNode.download = fileName // a标签的download属性规定下载文件的名称
linkNode.style.display = 'none' linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
document.body.appendChild(linkNode) linkNode.click() // 模拟在按钮上的一次鼠标单击
URL.revokeObjectURL(linkNode.href) // 释放URL 对象
document.body.removeChild(linkNode) }) },
// 预览
previewFile (row) { // 预览文件
let image = ['jpg', 'jpeg', 'png', 'gif', 'bmp'] let type = '' if (image.includes(row.fileType.toLowerCase())) { type = 'image/' + row.fileType } let video = ['mp4', 'avi', 'mov', 'wmv', 'flv'] if (video.includes(row.fileType.toLowerCase())) { type = 'video/' + row.fileType } let txt = ['txt'] if (txt.includes(row.fileType.toLowerCase())) { type = 'text/plain' } let office = ['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx'] if (office.includes(row.fileType.toLowerCase())) { this.$message.warning(`暂不支持预览${row.fileType.toLowerCase()}文件`) return } let pdf = ['pdf'] if (pdf.includes(row.fileType.toLowerCase())) { type = 'application/pdf' } if (type === ''){ this.$message.warning(`暂不支持预览${row.fileType.toLowerCase()}文件`) return; } downLoadQuotationFile(row).then(({data}) => { const blob = new Blob([data], { type: type }); // 创建URL来生成预览
const fileURL = URL.createObjectURL(blob); // 在新标签页中打开文件预览
const newTab = window.open(fileURL, '_blank') }) },
// ======== chooseList相关方法 ========
// 获取基础数据列表S
getBaseList (val, type) { this.tagNo = val this.tempCodeNo = this.modalData.codeNo this.$nextTick(() => { let strVal = '' if (val === 1007) { strVal = this.modalData.umId } else if (val === 108) { strVal = this.modalData.familyId } else if (val === 109) { strVal = this.modalData.groupId } else if (val === 110) { strVal = this.modalData.productGroupId1 } else if (val === 111) { strVal = this.modalData.productGroupId2 } else if (val === 112) { strVal = this.modalData.productGroupId3 } else if (val === 113) { strVal = this.modalData.productGroupId4 } else if (val === 114) { strVal = this.modalData.manufacturerId } else if (val === 20) { strVal = this.modalData.codeNo } else if (val === 123) { strVal = this.modalData.hazardCode } else if (val === 124) { strVal = this.modalData.assetClass } else if (val === 125) { strVal = this.modalData.partStatus } else if (val === 126) { strVal = this.modalData.abcClass } else if (val === 127) { strVal = this.modalData.countryOfOrigin } else if (val === 128) { strVal = this.modalData.regionOfOrigin } else if (val === 129) { strVal = this.modalData.customsStatNo } else if (val === 130) { strVal = this.modalData.commGroup3 } else if (val === 131) { strVal = this.modalData.partCostGroupId } else if (val === 132) { strVal = this.modalData.planningMethod } else if (val === 106) { strVal = this.copyPartData.buNo } this.$refs.baseList.init(val, strVal) }) },
// 列表方法的回调
getBaseData (val) { if (this.tagNo === 1007) { this.modalData.umId = val.um_id this.modalData.umName = val.um_name } else if (this.tagNo === 108) { this.modalData.familyId = val.family_id this.modalData.familyName = val.family_name } else if (this.tagNo === 109) { this.modalData.groupId = val.group_id this.modalData.groupName = val.group_name } else if (this.tagNo === 110) { this.modalData.productGroupId1 = val.product_group_id this.modalData.productGroupName1 = val.product_group_name } else if (this.tagNo === 111) { this.modalData.productGroupId2 = val.product_group_id this.modalData.productGroupName2 = val.product_group_name } else if (this.tagNo === 112) { this.modalData.productGroupId3 = val.product_group_id this.modalData.productGroupName3 = val.product_group_name } else if (this.tagNo === 113) { this.modalData.productGroupId4 = val.product_group_id this.modalData.productGroupName4 = val.product_group_name } else if (this.tagNo === 130) { this.modalData.commGroup3 = val.product_group_id this.modalData.commGroup3Desc = val.product_group_name } else if (this.tagNo === 114) { this.modalData.manufacturerId = val.manufacturer_id this.modalData.manufacturerName = val.manufacturer_name } else if (this.tagNo === 20) { this.modalData.codeNo = val.Code_no this.$set(this.modalData, 'codeDesc', val.Code_desc) this.getItemListByCodeNo() } else if (this.tagNo === 123) { this.modalData.hazardCode = val.hazard_code this.modalData.hazardDesc = val.hazard_desc } else if (this.tagNo === 124) { this.modalData.assetClass = val.asset_class this.modalData.assetClassDesc = val.asset_class_desc } else if (this.tagNo === 125) { this.modalData.partStatus = val.part_status this.modalData.partStatusDesc = val.part_status_desc } else if (this.tagNo === 126) { this.modalData.abcClass = val.abc_class this.modalData.abcClassDesc = val.abc_class_desc } else if (this.tagNo === 127) { this.modalData.countryOfOrigin = val.country_of_origin this.modalData.countryOfOriginDesc = val.country_of_origin_desc } else if (this.tagNo === 128) { this.modalData.regionOfOrigin = val.region_of_origin this.modalData.regionOfOriginDesc = val.region_of_origin_desc } else if (this.tagNo === 129) { this.modalData.customsStatNo = val.customs_stat_no this.modalData.customsStatDesc = val.customs_stat_desc } else if (this.tagNo === 131) { this.modalData.partCostGroupId = val.part_cost_group_id this.modalData.partCostGroupDesc = val.part_cost_group_desc } else if (this.tagNo === 132) { this.modalData.planningMethod = val.planning_method this.modalData.planningMethodDesc = val.planning_method_desc } else if (this.tagNo === 106) { this.copyPartData.buNo = val.Bu_no this.copyPartData.buDesc = val.Bu_desc } },
// ======== 导出相关方法 ========
// 导出excel
async createExportData () { this.searchData.limit = -1 this.searchData.page = 1 await partInformationSearch(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 },
toMenu (type, row) { let path = '' if (type === 'Routing' ) { path = 'routing' // } else if (type === 'BOM' && row.partType !== 'Manufactured Recipe') {
} else if (type === 'BOM') { path = 'bom' // } else if (type === 'BOM' && row.partType === 'Manufactured Recipe') {
} else if (type === 'Recipe') { path = 'recipe' } if (this.$router.resolve(`/part-${path}Management`).resolved.name === '404') { this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',}) } else { this.$router.push({name:`part-${path}Management`,params:{partNo: row.plmPartNo},}) } },
rowStyle ({row}) { if (this.partCurrentRow.partNo === row.partNo) { return { 'background-color': '#E8F7F6', cursor: 'pointer' } } },
toPartMenu (ifsPartNo) { if (this.$router.resolve(`/part-partCatalogInformation`).resolved.name === '404') { this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',}) } else { this.$router.push({name:`part-partCatalogInformation`,params:{ifsPartNo: ifsPartNo},}) } },
jumpBom (row) { if (row.engChgLevel != null || row.engChgLevel !== '') { this.$message.error("bom明细不存在") } let inData = { site: this.searchData.site, partNo: row.ifsPartNo, engChgLevel: row.engChgLevel, } localStorage.setItem('bomData', JSON.stringify(inData)) window.open('#/part-bomManagement') },
jumpPeifang (row) { let inData = { site: row.site, ifsPartNo: row.ifsPartNo, bomType: 'Manufacturing',
} localStorage.setItem('recipeData', JSON.stringify(inData)) window.open('#/part-recipeManagement') },
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; partInformationSearchAny(params).then(({data})=>{ if (data && data.code === 0){ this.dataList = data.page.list }else { this.$message.warning(data.msg) } this.dataListLoading = false; this.totalPage = data.page.totalCount }).catch((error)=>{ this.$message.error(error) this.dataListLoading = false; }) this.filterSearchData = params this.isFilterSearch = true this.filterVisible = false }, } }</script>
<style scoped lang="scss">/deep/ .customer-tab .el-tabs__content { padding: 5px !important;}.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>
|