You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
4023 lines
146 KiB
4023 lines
146 KiB
<template>
|
|
<div class="mod-config">
|
|
<!-- 查询条件 -->
|
|
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
|
|
<el-form-item :label="'物料编码'">
|
|
<el-input v-model="searchData.partNo" 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-input v-model="searchData.spec" clearable style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<!-- <el-form-item :label="'ERP物料编码'">-->
|
|
<!-- <el-input v-model="searchData.erpPartNo" clearable style="width: 120px"></el-input>-->
|
|
<!-- </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 type="primary" @click="addModal()">新增</el-button>
|
|
<!-- <el-button 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-form-item>
|
|
</el-form>
|
|
|
|
<!-- 物料列表 -->
|
|
<el-table
|
|
:height="height"
|
|
:data="dataList"
|
|
border
|
|
ref="partTable"
|
|
@row-click="partClickRow"
|
|
@selection-change="selectionPart"
|
|
@current-change="changeCurrentRow"
|
|
v-loading="dataListLoading"
|
|
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">
|
|
<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 slot-scope="scope">
|
|
<a type="text" size="small" @click="updateModal(scope.row)">编辑</a>
|
|
</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" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="1000px">
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: -5px;">
|
|
<el-form-item label="物料编码" prop="partNo" :rules="rules.partNo">
|
|
<el-input v-model="modalData.partNo" clearable style="width: 128px" @blur="queryMasterField" :disabled="modalDisableFlag"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="物料描述" 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-tabs style="width: 100%;height: 465px" type="border-card">
|
|
<el-tab-pane label="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" style="width: 461px">
|
|
<el-option label="Manufactured" value="Manufactured"></el-option>
|
|
<el-option label="Manufactured recipe" value="Manufactured recipe"></el-option>
|
|
<el-option label="Purchase raw" value="Purchase raw"></el-option>
|
|
<el-option label="Purchased" value="Purchased"></el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<span slot="label" @click="getBaseList(123)"><a herf="#">安全代码 / Safety Code</a></span>
|
|
<el-input v-model="modalData.hazardCode" style="width: 128px"></el-input>
|
|
<el-input v-model="modalData.hazardDesc" disabled style="width: 330px"></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 slot="label" @click="getBaseList(113)"><a herf="#">计划人 / Planner</a></span>
|
|
<el-input v-model="modalData.productGroupId4" style="width: 128px"></el-input>
|
|
<el-input v-model="modalData.productGroupName4" disabled style="width: 330px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<span slot="label" @click="getBaseList(112)"><a herf="#">会计组 / Accounting Group</a></span>
|
|
<el-input v-model="modalData.productGroupId3" style="width: 128px"></el-input>
|
|
<el-input v-model="modalData.productGroupName3" disabled style="width: 330px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
|
|
<el-form-item prop="umName" :rules="rules.umName">
|
|
<span slot="label" @click="getBaseList(1007)"><a herf="#">库存计量单位 / Inventory UoM</a></span>
|
|
<el-input v-model="modalData.umId" style="width: 128px"></el-input>
|
|
<el-input v-model="modalData.umName" disabled style="width: 330px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<span slot="label" @click="getBaseList(109)"><a herf="#">产品代码 / Product Code</a></span>
|
|
<el-input v-model="modalData.groupId" style="width: 128px"></el-input>
|
|
<el-input v-model="modalData.groupName" disabled style="width: 330px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
|
|
<el-form-item>
|
|
<span slot="label" @click="getBaseList(110)"><a herf="#">商品组1 / Comm Group 1</a></span>
|
|
<el-input v-model="modalData.productGroupId1" style="width: 128px"></el-input>
|
|
<el-input v-model="modalData.productGroupName1" disabled style="width: 330px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<span slot="label" @click="getBaseList(108)"><a herf="#">产品大类 / Product Family</a></span>
|
|
<el-input v-model="modalData.familyId" style="width: 128px"></el-input>
|
|
<el-input v-model="modalData.familyName" disabled style="width: 330px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
|
|
<el-form-item>
|
|
<span slot="label" @click="getBaseList(111)"><a herf="#">商品组2 / Comm Group 2</a></span>
|
|
<el-input v-model="modalData.productGroupId2" style="width: 128px"></el-input>
|
|
<el-input v-model="modalData.productGroupName2" disabled style="width: 330px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="类型指定 / Type Designation">
|
|
<el-input v-model="modalData.typeDesignation" clearable style="width: 461px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
|
|
<el-form-item>
|
|
<span slot="label" @click="getBaseList(124)"><a herf="#">资产等级 / Asset Class</a></span>
|
|
<el-input v-model="modalData.assetClass" style="width: 128px"></el-input>
|
|
<el-input v-model="modalData.assetClassDesc" disabled style="width: 330px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="尺寸/材质 / Dimension/Quality">
|
|
<el-input v-model="modalData.dimQuality" clearable style="width: 461px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
|
|
<el-form-item>
|
|
<span slot="label" @click="getBaseList(125)"><a herf="#">零件状态 / Part Status</a></span>
|
|
<el-input v-model="modalData.partStatus" style="width: 128px"></el-input>
|
|
<el-input v-model="modalData.partStatusDesc" disabled style="width: 330px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="净重">
|
|
<el-input class="inlineNumber numInput" v-model="modalData.weightNet" readonly type="number" style="width: 223px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="净重单位">
|
|
<!-- <dict-data-select v-if="modalFlag" v-model="modalData.uomForWeightNet" style="width: 224px" :use-default-value="false" dict-type="part_uom_for_weight_net"></dict-data-select>-->
|
|
<el-input v-model="modalData.uomForWeightNet" readonly style="width: 224px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
|
|
<el-form-item>
|
|
<span slot="label" v-if="!modalDisableFlag"><a herf="#">ABC类 / ABC Class</a></span>
|
|
<span slot="label" v-else @click="getBaseList(126)"><a herf="#">ABC类 / ABC Class</a></span>
|
|
<el-input v-model="modalData.abcClass" :readonly="!modalDisableFlag" style="width: 128px"></el-input>
|
|
<el-input v-model="modalData.abcClassDesc" disabled style="width: 330px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="净数量">
|
|
<el-input class="inlineNumber numInput" v-model="modalData.volumeNet" readonly type="number" style="width: 223px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="数量单位">
|
|
<!-- <dict-data-select v-if="modalFlag" v-model="modalData.uomForVolumeNet" style="width: 224px" dict-type="part_uom_for_volume_net"></dict-data-select>-->
|
|
<el-input v-model="modalData.uomForVolumeNet" readonly style="width: 224px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
|
|
<el-form-item prop="codeDesc" :rules="rules.codeDesc">
|
|
<span slot="label" @click="getBaseList(20)"><a herf="#">属性模板</a></span>
|
|
<el-input v-model="modalData.codeNo" style="width: 128px"></el-input>
|
|
<el-input v-model="modalData.codeDesc" disabled style="width: 330px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="频率级别 / Frequency Class">
|
|
<el-input v-model="modalData.frequencyClass" readonly style="width: 223px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="生命周期阶段 / Lifecycle Stage">
|
|
<el-input v-model="modalData.lifecycleStage" readonly style="width: 224px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-tab-pane>
|
|
|
|
<el-tab-pane label="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 :disabled="!(modalData.partType === 'Manufactured' || modalData.partType === 'Manufactured recipe')" class="inlineNumber numInput" v-model="modalData.manufacturingLeadTime" @change="changeExpectedLeadTime" type="number" style="width: 223px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="周数 / Weeks">
|
|
<el-input class="inlineNumber numInput" v-model="modalData.durabilityWeek" readonly type="number" style="width: 223px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<span slot="label" @click="getBaseList(127)"><a herf="#">来源国家 / Country of Origin</a></span>
|
|
<el-input v-model="modalData.isoCountry" style="width: 128px"></el-input>
|
|
<el-input v-model="modalData.isoCountryDesc" disabled style="width: 330px"></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 class="inlineNumber numInput" v-model="modalData.expectedLeadTime" type="number" style="width: 223px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="天数 / Days">
|
|
<el-input class="inlineNumber numInput" v-model="modalData.durabilityDay" @change="changeDurabilityWeek" type="number" style="width: 223px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<span slot="label" @click="getBaseList(128)"><a herf="#">区域代码 / Region Code</a></span>
|
|
<el-input v-model="modalData.regionOfOrigin" style="width: 128px"></el-input>
|
|
<el-input v-model="modalData.regionOfOriginDesc" disabled style="width: 330px"></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 class="inlineNumber numInput" v-model="modalData.intrastatConvFactor" type="number" style="width: 128px"></el-input>
|
|
<el-input v-model="modalData.umDesc" disabled style="width: 330px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<span slot="label" @click="getBaseList(129)"><a herf="#">海关统计序号 / Customs Star No</a></span>
|
|
<el-input v-model="modalData.customsStarNo" style="width: 128px"></el-input>
|
|
<el-input v-model="modalData.customsStarDesc" disabled style="width: 330px"></el-input>
|
|
</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: 937px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-tab-pane>
|
|
|
|
<el-tab-pane label="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: 461px">
|
|
<el-option label="*" value="*"></el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
|
|
<el-form-item label="估计物料成本 / Estimated Material Cost">
|
|
<el-input class="inlineNumber numInput" v-model="modalData.estimatedMaterialCost" @input="handleInput(modalData.estimatedMaterialCost,1)" type="number" style="width: 461px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-tab-pane>
|
|
|
|
<el-tab-pane label="Misc Part Info">
|
|
<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: 461px">
|
|
<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 slot="label" @click="getBaseList(131)"><a herf="#">零件成本组 / Part Cost Group</a></span>
|
|
<el-input v-model="modalData.partCostGroupId" style="width: 128px"></el-input>
|
|
<el-input v-model="modalData.partCostGroupDesc" disabled style="width: 330px"></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: 461px">
|
|
<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: 461px">
|
|
<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: 461px">
|
|
<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">
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
|
|
<el-form-item>
|
|
<span slot="label" @click="getBaseList(132)"><a herf="#">计划方法 / Planning Method</a></span>
|
|
<el-input v-model="modalData.planningMethod" 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 class="inlineNumber numInput" v-model="modalData.safetyStock" @input="handleInput(modalData.safetyStock,2)" type="number" style="width: 170px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="最小批量 / Min Lot Size">
|
|
<el-input class="inlineNumber numInput" v-model="modalData.minOrderQty" @input="handleInput(modalData.minOrderQty,3)" type="number" style="width: 170px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="最大批量 / Max Lot Size">
|
|
<el-input class="inlineNumber numInput" v-model="modalData.maxOrderQty" @input="handleInput(modalData.maxOrderQty,4)" type="number" style="width: 155px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="多种批量大小 / Multiple Lot Size">
|
|
<el-input class="inlineNumber numInput" v-model="modalData.mulOrderQty" @input="handleInput(modalData.mulOrderQty,5)" type="number" style="width: 155px"></el-input>
|
|
</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 class="inlineNumber numInput" v-model="modalData.safetyLeadTime" @input="handleInput(modalData.safetyLeadTime,6)" type="number" style="width: 170px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="报废因子(%) / Scrap Factor(%)">
|
|
<el-input class="inlineNumber numInput" v-model="modalData.shrinkageFac" @input="handleInput(modalData.shrinkageFac,7)" type="number" style="width: 170px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="标准批量大小 / Std Lot Size">
|
|
<el-input class="inlineNumber numInput" v-model="modalData.stdOrderQty" @input="handleInput(modalData.stdOrderQty,8)" type="number" style="width: 155px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-tab-pane>
|
|
|
|
<el-tab-pane label="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 class="inlineNumber numInput" v-model="modalData.cumLeadTime" @input="handleInput(modalData.cumLeadTime,9)" type="number" style="width: 296px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="预留/下发来源 / Reserve/Issue from">
|
|
<el-select v-model="modalData.backFlushPart" style="width: 250px">
|
|
<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 class="inlineNumber numInput" v-model="modalData.unprotectedLeadTime" @input="handleInput(modalData.unprotectedLeadTime,10)" type="number" style="width: 296px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="预留/下发方法 / Reserve/Issue Method">
|
|
<el-select v-model="modalData.issueType" style="width: 250px">
|
|
<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 class="inlineNumber numInput" v-model="modalData.fixedLeadTimeDay" @input="handleInput(modalData.fixedLeadTimeDay,11)" type="number" style="width: 296px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="过度报告 / Over Reporting">
|
|
<el-select v-model="modalData.overReporting" style="width: 250px">
|
|
<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 class="inlineNumber numInput" v-model="modalData.variableLeadTimeDay" @input="handleInput(modalData.variableLeadTimeDay,12)" type="number" style="width: 296px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="报告公差过大 / Over Report Tolerance">
|
|
<el-input class="inlineNumber numInput" v-model="modalData.overReportTolerance" @input="handleInput(modalData.overReportTolerance,13)" type="number" style="width: 250px"></el-input>
|
|
</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 class="inlineNumber numInput" v-model="modalData.fixedLeadTimeHour" @input="handleInput(modalData.fixedLeadTimeHour,14)" type="number" style="width: 296px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="密度 / Density">
|
|
<el-input class="inlineNumber numInput" v-model="modalData.density" @input="handleInput(modalData.density,15)" type="number" style="width: 250px"></el-input>
|
|
</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 class="inlineNumber numInput" v-model="modalData.variableLeadTimeHour" @input="handleInput(modalData.variableLeadTimeHour,16)" type="number" style="width: 296px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-tab-pane>
|
|
|
|
<el-tab-pane label="Revisions"></el-tab-pane>
|
|
</el-tabs>
|
|
</el-form>
|
|
<el-footer style="height:35px;margin-top: 20px;text-align:center">
|
|
<el-button type="primary" @click="saveData()">保存</el-button>
|
|
<el-button type="primary" @click="modalFlag = false">关闭</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_item">
|
|
<el-form label-position="top" style="margin-top: 2px; margin-left: 2px;">
|
|
<el-button type="primary" @click="addOrDelItem">新增/删除</el-button>
|
|
<el-button type="primary" @click="updateItemValue">编辑</el-button>
|
|
</el-form>
|
|
<el-table
|
|
:data="partItemList"
|
|
:height="secondHeight - 60"
|
|
border
|
|
v-loading="dataListLoading"
|
|
style="width: 100%;">
|
|
<el-table-column
|
|
v-for="(item,index) in columnItemList" :key="index"
|
|
:sortable="item.columnSortable"
|
|
:prop="item.columnProp"
|
|
:header-align="item.headerAlign"
|
|
:show-overflow-tooltip="item.showOverflowTooltip"
|
|
:align="item.align"
|
|
:fixed="item.fixed==''?false:item.fixed"
|
|
:min-width="item.columnWidth"
|
|
:label="item.columnLabel">
|
|
<template slot-scope="scope">
|
|
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
|
|
</template>
|
|
</el-table-column>
|
|
<!-- <el-table-column-->
|
|
<!-- header-align="center"-->
|
|
<!-- align="center"-->
|
|
<!-- width="150"-->
|
|
<!-- fixed="right"-->
|
|
<!-- label="操作">-->
|
|
<!-- <template slot-scope="scope">-->
|
|
<!-- <a type="text" size="small" @click="deleteItemModal(scope.row)">删除</a>-->
|
|
<!-- </template>-->
|
|
<!-- </el-table-column>-->
|
|
</el-table>
|
|
</el-tab-pane>
|
|
<!-- 代理商页签 -->
|
|
<el-tab-pane label="代理商" name="part_agent">
|
|
<el-form label-position="top" style="margin-top: 2px; margin-left: 2px;">
|
|
<el-button type="primary" @click="savePartAgent()">新增</el-button>
|
|
</el-form>
|
|
<el-table
|
|
:data="partAgentList"
|
|
:height="secondHeight - 60"
|
|
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">
|
|
<a type="text" size="small" @click="deleteAgent2(scope.row)">删除</a>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-tab-pane>
|
|
<!-- 制造商页签 -->
|
|
<el-tab-pane label="制造商" name="part_manufacturer">
|
|
<el-form label-position="top" style="margin-top: 2px; margin-left: 2px;">
|
|
<el-button type="primary" @click="savePartManufacturer()">新增</el-button>
|
|
</el-form>
|
|
<el-table
|
|
:data="partManufacturerList"
|
|
:height="secondHeight - 60"
|
|
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">
|
|
<a type="text" size="small" @click="deleteManufacturer2(scope.row)">删除</a>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-tab-pane>
|
|
<!-- 默认库位页签 -->
|
|
<el-tab-pane label="默认库位" name="default_locations">
|
|
<el-form label-position="top" style="margin-top: 2px; margin-left: 2px;">
|
|
<el-button type="primary" @click="saveDefaultLocation()">新增</el-button>
|
|
</el-form>
|
|
<el-table
|
|
:data="defaultLocationList"
|
|
:height="secondHeight - 60"
|
|
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">
|
|
<a type="text" size="small" @click="deleteLocation2(scope.row)">删除</a>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-tab-pane>
|
|
<!-- 文档页签 -->
|
|
<el-tab-pane label="文档" name="part_file">
|
|
<el-form label-position="top" style="margin-top: 2px; margin-left: 2px;">
|
|
<el-button type="primary" @click="uploadFile()">上传文件</el-button>
|
|
</el-form>
|
|
<el-table
|
|
:data="fileContentList"
|
|
:height="secondHeight - 60"
|
|
border
|
|
v-loading="dataListLoading"
|
|
style="width: 100%; ">
|
|
<el-table-column
|
|
v-for="(item,index) in columnFileList" :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 slot-scope="scope">
|
|
<a @click="downloadFile(scope.row)">下载</a>
|
|
<a type="text" size="small" @click="deleteFile(scope.row)">删除</a>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-tab-pane>
|
|
</el-tabs>
|
|
|
|
<!-- 物料属性值编辑模态框 -->
|
|
<el-dialog title="物料属性" :close-on-click-modal="false" v-drag :visible.sync="updateItemModelFlag" width="1000px">
|
|
<div class="rq ">
|
|
<el-table
|
|
:data="updatePartItemList"
|
|
height="350px"
|
|
border
|
|
style="width: 100%;">
|
|
<el-table-column
|
|
v-for="(item,index) in updateColumnItemList" :key="index"
|
|
:sortable="item.columnSortable"
|
|
:prop="item.columnProp"
|
|
:header-align="item.headerAlign"
|
|
:show-overflow-tooltip="item.showOverflowTooltip"
|
|
:align="item.align"
|
|
:fixed="item.fixed==''?false:item.fixed"
|
|
:min-width="item.columnWidth"
|
|
:label="item.columnLabel">
|
|
<template slot-scope="scope">
|
|
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="textValue"
|
|
header-align="center"
|
|
align="right"
|
|
min-width="80"
|
|
label="文本值">
|
|
<template slot-scope="scope">
|
|
<el-input v-if="scope.row.valueTypeDb === 'T' && scope.row.valueChooseFlag === 'N'" v-model="scope.row.textValue" style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input>
|
|
<el-select v-if="scope.row.valueTypeDb === 'T' && scope.row.valueChooseFlag === 'Y'" v-model="scope.row.textValue" style="width: 180px" placeholder="请选择">
|
|
<el-option v-for="item in scope.row.availableValueList" :key="index" :label="item.availableValue" :value="item.availableValue"></el-option>
|
|
</el-select>
|
|
<el-input v-if="scope.row.valueTypeDb !== 'T'" v-model="scope.row.textValue" disabled style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="numValue"
|
|
header-align="center"
|
|
align="right"
|
|
min-width="80"
|
|
label="数字值">
|
|
<template slot-scope="scope">
|
|
<el-input v-if="scope.row.valueTypeDb === 'N' && scope.row.valueChooseFlag === 'N'" v-model="scope.row.numValue" style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input>
|
|
<el-select v-if="scope.row.valueTypeDb === 'N' && scope.row.valueChooseFlag === 'Y'" v-model="scope.row.numValue" style="width: 180px" placeholder="请选择">
|
|
<el-option v-for="item in scope.row.availableValueList" :key="index" :label="item.availableValue" :value="item.availableValue"></el-option>
|
|
</el-select>
|
|
<el-input v-if="scope.row.valueTypeDb !== 'N'" v-model="scope.row.numValue" disabled style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
<span slot="footer" class="dialog-footer">
|
|
<el-button type="primary" @click="commitItemValue()">保存</el-button>
|
|
<el-button type="primary" @click="updateItemModelFlag=false">关闭</el-button>
|
|
</span>
|
|
</el-dialog>
|
|
|
|
<!-- 物料属性-> 快速新增 -->
|
|
<el-dialog title="新增" :close-on-click-modal="false" v-drag :visible.sync="fastAddFlag" width="1000px">
|
|
<div style="font-size: 12px">
|
|
<el-form :inline="true" label-position="top" :model="itemData">
|
|
<el-form-item :label="'属性编码'">
|
|
<el-input v-model="itemData.propertiesItemNo" clearable style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'属性名称'">
|
|
<el-input v-model="itemData.itemDesc" clearable style="width: 150px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="' '">
|
|
<el-button type="primary" @click="queryPartItem()">查询</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="itemList1"
|
|
border
|
|
ref="itemTable1"
|
|
@row-click="itemClickRow1"
|
|
@selection-change="selectionItem1"
|
|
highlight-current-row
|
|
style="width: 100%">
|
|
<el-table-column
|
|
type="selection"
|
|
header-align="center"
|
|
align="center"
|
|
:selectable="selectFlag"
|
|
width="50">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="itNo"
|
|
header-align="center"
|
|
align="center"
|
|
min-width="80"
|
|
label="属性编码">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="itemDesc"
|
|
header-align="center"
|
|
align="center"
|
|
min-width="200"
|
|
label="属性名称">
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-main>
|
|
<el-main style="width: 10px;padding: 1px">
|
|
<div style="margin-top: 200px;margin-left: 18px">
|
|
<el-button type="primary" @click="addItem()">添加>></el-button>
|
|
</div>
|
|
<div style="margin-top: 15px;margin-left: 18px">
|
|
<el-button type="primary" @click="deleteItem()">删除<<</el-button>
|
|
</div>
|
|
</el-main>
|
|
<el-main style="width: 350px;padding: 1px">
|
|
<span style="font-size: 12px" >已有属性:</span>
|
|
<el-table
|
|
height="400px"
|
|
:data="itemList2"
|
|
border
|
|
ref="itemTable2"
|
|
@row-click="itemClickRow2"
|
|
@selection-change="selectionItem2"
|
|
highlight-current-row
|
|
style="width: 100%">
|
|
<el-table-column
|
|
type="selection"
|
|
header-align="center"
|
|
align="center"
|
|
:selectable="selectFlag"
|
|
width="50">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="itNo"
|
|
header-align="center"
|
|
align="center"
|
|
min-width="80"
|
|
label="属性编码">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="itemDesc"
|
|
header-align="center"
|
|
align="center"
|
|
min-width="200"
|
|
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="fastAddFlag = false">关闭</el-button>
|
|
</el-footer>
|
|
</el-dialog>
|
|
|
|
<!-- 代理商-> 快速新增 -->
|
|
<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"
|
|
:selectable="selectFlag"
|
|
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"
|
|
:selectable="selectFlag"
|
|
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"
|
|
:selectable="selectFlag"
|
|
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"
|
|
:selectable="selectFlag"
|
|
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="900px">
|
|
<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: 350px; 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"
|
|
:selectable="selectFlag"
|
|
width="50">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="locationId"
|
|
header-align="center"
|
|
align="center"
|
|
min-width="80"
|
|
label="库位编码">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="locationName"
|
|
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="addLocation()">添加>></el-button>
|
|
</div>
|
|
<div style="margin-top: 15px;margin-left: 18px">
|
|
<el-button type="primary" @click="deleteLocation()">删除<<</el-button>
|
|
</div>
|
|
</el-main>
|
|
<el-main style="width: 350px;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"
|
|
:selectable="selectFlag"
|
|
width="50">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="locationId"
|
|
header-align="center"
|
|
align="center"
|
|
min-width="80"
|
|
label="库位编码">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="locationName"
|
|
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="locationModelFlag = false">关闭</el-button>
|
|
</el-footer>
|
|
</el-dialog>
|
|
|
|
<!-- chooseList模态框 -->
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
|
|
|
|
<!-- 上传文件的modal -->
|
|
<partUploadFile ref="partUploadFile" @refreshPageTables="getFileContentData()" v-drag></partUploadFile>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import {
|
|
partInformationSearch, // 物料信息列表查询
|
|
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 属性
|
|
} from '@/api/part/partInformation.js'
|
|
import {
|
|
getFileContentList, // 获取物料单附件列表
|
|
deleteQuotationFile, // 文件删除
|
|
downLoadQuotationFile // 文件下载
|
|
} from '@/api/quotation/quotationInformation.js'
|
|
import Chooselist from '@/views/modules/common/Chooselist'
|
|
import partUploadFile from "./part_upload_file"
|
|
import DictDataSelect from '../sys/dict-data-select.vue'
|
|
export default {
|
|
components: {
|
|
DictDataSelect,
|
|
Chooselist,
|
|
partUploadFile
|
|
},
|
|
watch: {
|
|
searchData: {
|
|
deep: true,
|
|
handler: function (newV, oldV) {
|
|
this.searchData.partNo = this.searchData.partNo.toUpperCase()
|
|
}
|
|
},
|
|
modalData: {
|
|
deep: true,
|
|
handler: function (newV, oldV) {
|
|
this.modalData.partNo = this.modalData.partNo.toUpperCase()
|
|
}
|
|
}
|
|
},
|
|
data () {
|
|
return {
|
|
// 导出
|
|
exportData: [],
|
|
exportName: '物料档案管理' + this.dayjs().format('YYYYMMDDHHmmss'),
|
|
exportHeader: ['物料档案管理'],
|
|
exportFooter: [],
|
|
resultList: [],
|
|
// ======== 行高 ========
|
|
height: 200,
|
|
secondHeight: 200,
|
|
// ======== 分页 ========
|
|
pageIndex: 1,
|
|
pageSize: 50,
|
|
totalPage: 0,
|
|
selectedDataNum: 0,
|
|
tempCodeNo: '',
|
|
// 条件查询
|
|
searchData: {
|
|
site: this.$store.state.user.site,
|
|
partNo: '',
|
|
erpPartNo: '',
|
|
startDate: '',
|
|
endDate: '',
|
|
partDesc: '',
|
|
spec: '',
|
|
page: 1,
|
|
limit: 10
|
|
},
|
|
// 其它
|
|
dataListLoading: false,
|
|
// 初始页签
|
|
activeTable: 'part_item',
|
|
// ======== 数据对象 ========
|
|
modalData: {
|
|
flag: '',
|
|
title: '',
|
|
site: this.$store.state.user.site,
|
|
partNo: '',
|
|
partDesc: '',
|
|
spec: '',
|
|
partTypeDb: '',
|
|
partType: '',
|
|
familyId: '',
|
|
familyName: '',
|
|
groupId: '',
|
|
groupName: '',
|
|
umId: '',
|
|
umName: '',
|
|
weightNet: '',
|
|
uomForWeightNet: '',
|
|
volumeNet: '',
|
|
uomForVolumeNet: '',
|
|
lotTrackingCode: '',
|
|
active: '',
|
|
remark: '',
|
|
supplierId: '',
|
|
supplierName: '',
|
|
productGroupId1: '',
|
|
productGroupName1: '',
|
|
productGroupId2: '',
|
|
productGroupName2: '',
|
|
productGroupId3: '',
|
|
productGroupName3: '',
|
|
productGroupId4: '',
|
|
productGroupName4: '',
|
|
erpPartNo: '',
|
|
codeNo: '',
|
|
codeDesc: '',
|
|
manufacturerId: '',
|
|
manufacturerName: '',
|
|
createDate: '',
|
|
createBy: '',
|
|
updateDate: '',
|
|
updateBy: '',
|
|
agentId: '',
|
|
agentName: '',
|
|
typeDesignation: '',
|
|
hazardCode: '',
|
|
hazardDesc: '',
|
|
assetClass: '',
|
|
assetClassDesc: '',
|
|
dimQuality: '',
|
|
abcClass: '',
|
|
abcClassDesc: '',
|
|
frequencyClass: '',
|
|
lifecycleStage: '',
|
|
isoCountry: '',
|
|
isoCountryDesc: '',
|
|
manufacturingLeadTime: '',
|
|
expectedLeadTime: '',
|
|
regionOfOrigin: '',
|
|
regionOfOriginDesc: '',
|
|
durabilityWeek: '',
|
|
customsStarNo: '',
|
|
customsStarDesc: '',
|
|
durabilityDay: '',
|
|
intrastatConvFactor: '',
|
|
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: '',
|
|
variableLeadTimeHour: ''
|
|
},
|
|
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: '',
|
|
},
|
|
// ======== 数据列表 ========
|
|
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:[],
|
|
// ======== 列表表头 ========
|
|
columnList: [
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 104001,
|
|
serialNumber: '104001Table1PartNo',
|
|
tableId: '104001Table1',
|
|
tableName: '物料信息表',
|
|
columnProp: 'partNo',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '物料编码',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
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,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 104001,
|
|
serialNumber: '104001Table1Status',
|
|
tableId: '104001Table1',
|
|
tableName: '物料信息表',
|
|
columnProp: 'status',
|
|
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: '104001Table1Spec',
|
|
tableId: '104001Table1',
|
|
tableName: '物料信息表',
|
|
columnProp: 'spec',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '规格型号',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 104001,
|
|
serialNumber: '104001Table1UmId',
|
|
tableId: '104001Table1',
|
|
tableName: '物料信息表',
|
|
columnProp: 'umName',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '库存计量单位',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 60
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 104001,
|
|
serialNumber: '104001Table1WeightNet',
|
|
tableId: '104001Table1',
|
|
tableName: '物料信息表',
|
|
columnProp: 'weightNet',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '净重',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
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,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 60
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 104001,
|
|
serialNumber: '104001Table1VolumeNet',
|
|
tableId: '104001Table1',
|
|
tableName: '物料信息表',
|
|
columnProp: 'volumeNet',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '净数量',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
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,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 60
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 104001,
|
|
serialNumber: '104001Table1LotTrackingCode',
|
|
tableId: '104001Table1',
|
|
tableName: '物料信息表',
|
|
columnProp: 'lotTrackingCode',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '批号跟踪',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 60
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 104001,
|
|
serialNumber: '104001Table1PartType',
|
|
tableId: '104001Table1',
|
|
tableName: '物料信息表',
|
|
columnProp: 'partType',
|
|
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: '104001Table1FamilyName',
|
|
tableId: '104001Table1',
|
|
tableName: '物料信息表',
|
|
columnProp: 'familyName',
|
|
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: '104001Table1GroupName',
|
|
tableId: '104001Table1',
|
|
tableName: '物料信息表',
|
|
columnProp: 'groupName',
|
|
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: '104001Table1OtherGroup1',
|
|
tableId: '104001Table1',
|
|
tableName: '物料信息表',
|
|
columnProp: 'productGroupName1',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '商品组1',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 80
|
|
},
|
|
{
|
|
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,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 80
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 104001,
|
|
serialNumber: '104001Table1OtherGroup3',
|
|
tableId: '104001Table1',
|
|
tableName: '物料信息表',
|
|
columnProp: 'productGroupName3',
|
|
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: '104001Table1OtherGroup4',
|
|
tableId: '104001Table1',
|
|
tableName: '物料信息表',
|
|
columnProp: 'productGroupName4',
|
|
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: '104001Table1ItemNo',
|
|
tableId: '104001Table1',
|
|
tableName: '物料信息表',
|
|
columnProp: 'codeDesc',
|
|
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: '104001Table1Remark',
|
|
tableId: '104001Table1',
|
|
tableName: '物料信息表',
|
|
columnProp: 'remark',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '备注',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 160
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 104001,
|
|
serialNumber: '104001Table1Active',
|
|
tableId: '104001Table1',
|
|
tableName: '物料信息表',
|
|
columnProp: 'active',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '是否在用',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 60
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 104001,
|
|
serialNumber: '104001Table1CreateDate',
|
|
tableId: '104001Table1',
|
|
tableName: '物料信息表',
|
|
columnProp: 'createDate',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '创建时间',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
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,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
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,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
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,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 80
|
|
}
|
|
],
|
|
columnItemList: [
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 104001,
|
|
serialNumber: '104001Table2PropertiesItemID',
|
|
tableId: "104001Table2",
|
|
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: '104001Table2PropertiesItemDesc',
|
|
tableId: "104001Table2",
|
|
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: '104001Table2ValueType',
|
|
tableId: "104001Table2",
|
|
tableName: "物料属性表",
|
|
columnProp: 'valueType',
|
|
headerAlign: "center",
|
|
align: "center",
|
|
columnLabel: '属性类型',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: true,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 70,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 104001,
|
|
serialNumber: '104001Table2ValueChooseFlag',
|
|
tableId: "104001Table2",
|
|
tableName: "物料属性表",
|
|
columnProp: 'textValue',
|
|
headerAlign: "center",
|
|
align: "center",
|
|
columnLabel: '文本值',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: true,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 70,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 104001,
|
|
serialNumber: '104001Table2ValueChooseFlag',
|
|
tableId: "104001Table2",
|
|
tableName: "物料属性表",
|
|
columnProp: 'numValue',
|
|
headerAlign: "center",
|
|
align: "center",
|
|
columnLabel: '数字值',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: true,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 70,
|
|
},
|
|
],
|
|
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: '104001Table3Active',
|
|
tableId: '104001Table3',
|
|
tableName: '物料代理商表',
|
|
columnProp: 'active',
|
|
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: '104001Table5Active',
|
|
tableId: '104001Table5',
|
|
tableName: '物料制造商表',
|
|
columnProp: 'active',
|
|
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: '',
|
|
},
|
|
{
|
|
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: '',
|
|
},
|
|
{
|
|
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: '',
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 104001,
|
|
serialNumber: '104001Table7Active',
|
|
tableId: '104001Table7',
|
|
tableName: '物料库位表',
|
|
columnProp: 'active',
|
|
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: '104001Table7CreateDate',
|
|
tableId: '104001Table7',
|
|
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: '104001Table7CreateBy',
|
|
tableId: '104001Table7',
|
|
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: '104001Table7UpdateDate',
|
|
tableId: '104001Table7',
|
|
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: '104001Table7UpdateBy',
|
|
tableId: '104001Table7',
|
|
tableName: '物料库位表',
|
|
columnProp: 'updateBy',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '更新人',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
}
|
|
],
|
|
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: 'createdBy',
|
|
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: '',
|
|
},
|
|
],
|
|
// ======== 必填规则 ========
|
|
rules: {
|
|
partNo: [
|
|
{
|
|
required: true,
|
|
message: ' ',
|
|
trigger: 'change'
|
|
}
|
|
],
|
|
partDesc: [
|
|
{
|
|
required: true,
|
|
message: ' ',
|
|
trigger: 'change'
|
|
}
|
|
],
|
|
umName: [
|
|
{
|
|
required: true,
|
|
message: ' ',
|
|
trigger: 'change'
|
|
}
|
|
],
|
|
codeDesc: [
|
|
{
|
|
required: true,
|
|
message: ' ',
|
|
trigger: 'change'
|
|
}
|
|
],
|
|
manufacturerName: [
|
|
{
|
|
required: true,
|
|
message: ' ',
|
|
trigger: 'change'
|
|
}
|
|
],
|
|
active: [
|
|
{
|
|
required: true,
|
|
message: ' ',
|
|
trigger: 'change'
|
|
}
|
|
],
|
|
agentName: [
|
|
{
|
|
required: true,
|
|
message: ' ',
|
|
trigger: 'change'
|
|
}
|
|
],
|
|
partType: [
|
|
{
|
|
required: true,
|
|
message: ' ',
|
|
trigger: 'change'
|
|
}
|
|
],
|
|
productGroupId4: [
|
|
{
|
|
required: true,
|
|
message: ' ',
|
|
trigger: 'change'
|
|
}
|
|
],
|
|
lotTrackingCode: [
|
|
{
|
|
required: true,
|
|
message: ' ',
|
|
trigger: 'change'
|
|
}
|
|
],
|
|
},
|
|
// ======== 复选数据集 ========
|
|
partSelections: [],
|
|
// ======== 选中的当前行数据 ========
|
|
partCurrentRow: {},
|
|
// ======== 模态框开关控制 ========
|
|
modalFlag: false,
|
|
modalDisableFlag: false,
|
|
itemChooseFlag: false,
|
|
itemTextDisableFlag: false,
|
|
itemNumberDisableFlag: false,
|
|
itemModalDisableFlag: false,
|
|
itemModalFlag: false,
|
|
agentModelFlag: false,
|
|
manufacturerModelFlag: false,
|
|
updateItemModelFlag: false,
|
|
fastAddFlag: false,
|
|
locationModelFlag: false
|
|
}
|
|
},
|
|
|
|
mounted () {
|
|
this.$nextTick(() => {
|
|
this.height = window.innerHeight / 2 - 30
|
|
/*第二个表格高度的动态调整*/
|
|
this.secondHeight = window.innerHeight - this.height - 180
|
|
})
|
|
},
|
|
|
|
created () {
|
|
this.getDataList()
|
|
},
|
|
|
|
methods: {
|
|
// 物料编码失去焦点事件
|
|
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.uomForWeightNet = data.data.uomForWeightNet
|
|
this.modalData.volumeNet = data.data.volumeNet
|
|
this.modalData.uomForVolumeNet = data.data.uomForVolumeNet
|
|
}
|
|
}
|
|
})
|
|
},
|
|
|
|
// 制造提前期内容改变事件
|
|
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()
|
|
})
|
|
},
|
|
|
|
/**
|
|
* 编辑物料属性
|
|
*/
|
|
updateItemValue () {
|
|
let tempData = {
|
|
site: this.$store.state.user.site,
|
|
partNo: this.partCurrentRow.partNo,
|
|
codeNo: this.partCurrentRow.codeNo,
|
|
recordType: 'IP'
|
|
}
|
|
getPartItem(tempData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.updatePartItemList = data.rows
|
|
this.updateItemModelFlag = true
|
|
} else {
|
|
this.updatePartItemList = []
|
|
}
|
|
})
|
|
},
|
|
|
|
/**
|
|
* 新增/删除物料属性
|
|
*/
|
|
addOrDelItem () {
|
|
this.itemSelections1 = null
|
|
this.itemSelections2 = null
|
|
this.itemData.propertiesItemNo = ''
|
|
this.itemData.itemDesc = ''
|
|
let tempData = {
|
|
site: this.partCurrentRow.site,
|
|
partNo: this.partCurrentRow.partNo,
|
|
codeNo: this.partCurrentRow.codeNo,
|
|
recordType: 'IP'
|
|
}
|
|
getItemLists(tempData).then(({data}) => {
|
|
this.itemList1 = data.row1
|
|
this.itemList2 = data.row2
|
|
})
|
|
this.fastAddFlag = true
|
|
},
|
|
// 可选属性
|
|
itemClickRow1 (row) {
|
|
this.$refs.itemTable1.toggleRowSelection(row)
|
|
},
|
|
// 已有属性
|
|
itemClickRow2 (row) {
|
|
this.$refs.itemTable2.toggleRowSelection(row)
|
|
},
|
|
selectionItem1 (val) {
|
|
this.itemSelections1 = val
|
|
},
|
|
selectionItem2 (val) {
|
|
this.itemSelections2 = val
|
|
},
|
|
// 物料项目新增
|
|
addItem () {
|
|
if (this.itemSelections1 == null || this.itemSelections1.length === 0) {
|
|
this.$message.warning('请选择可选属性!')
|
|
return
|
|
}
|
|
let inData = {
|
|
site: this.$store.state.user.site,
|
|
partNo: this.partCurrentRow.partNo,
|
|
codeNo: this.partCurrentRow.codeNo,
|
|
codeDesc: this.partCurrentRow.codeDesc,
|
|
recordType: 'IP',
|
|
itemList: this.itemSelections1
|
|
}
|
|
addPartItem(inData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
getItemLists(inData).then(({data}) => {
|
|
this.itemList1 = data.row1
|
|
this.itemList2 = data.row2
|
|
})
|
|
this.getPartItem()
|
|
this.itemSelections1 = []
|
|
} else {
|
|
this.$alert(data.msg, '错误', {
|
|
confirmButtonText: '确定'
|
|
})
|
|
}
|
|
})
|
|
},
|
|
// 物料项目删除
|
|
deleteItem () {
|
|
if (this.itemSelections2 == null || this.itemSelections2.length === 0) {
|
|
this.$alert("请选择已有属性!", '提示', {
|
|
confirmButtonText: '确定'
|
|
})
|
|
return false
|
|
}
|
|
let inData = {
|
|
site: this.$store.state.user.site,
|
|
partNo: this.partCurrentRow.partNo,
|
|
codeNo: this.partCurrentRow.codeNo,
|
|
codeDesc: this.partCurrentRow.codeDesc,
|
|
recordType: 'IP',
|
|
itemList: this.itemSelections2
|
|
}
|
|
deletePartItem(inData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
getItemLists(inData).then(({data}) => {
|
|
this.itemList1 = data.row1
|
|
this.itemList2 = data.row2
|
|
})
|
|
this.getPartItem()
|
|
this.itemSelections2 = []
|
|
} else {
|
|
this.$alert(data.msg, '错误', {
|
|
confirmButtonText: '确定'
|
|
})
|
|
}
|
|
})
|
|
},
|
|
// 查询物料项目
|
|
queryPartItem () {
|
|
this.itemData.partNo = this.partCurrentRow.partNo
|
|
this.itemData.codeNo = this.partCurrentRow.codeNo
|
|
this.itemData.partNo = this.partCurrentRow.partNo
|
|
queryPartItem(this.itemData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.itemList1 = data.rows
|
|
} else {
|
|
this.itemList1 = []
|
|
}
|
|
})
|
|
},
|
|
|
|
// 确认修改物料属性
|
|
commitItemValue () {
|
|
let tempData = {
|
|
itemList: JSON.parse(JSON.stringify(this.updatePartItemList))
|
|
}
|
|
commitItemValue(tempData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.getPartItem()
|
|
this.updateItemModelFlag = false
|
|
this.$message({
|
|
message: '操作成功',
|
|
type: 'success',
|
|
duration: 1500,
|
|
onClose: () => {}
|
|
})
|
|
} else {
|
|
this.$alert(data.msg, '错误', {
|
|
confirmButtonText: '确定'
|
|
})
|
|
}
|
|
})
|
|
},
|
|
|
|
// ======= 正则校验 =======
|
|
handleInput (value, type) {
|
|
// 大于等于0,且只能输入4位小数
|
|
let val = value.replace(/^\D*([0-9]\d*\.?\d{0,4})?.*$/,'$1')
|
|
if (val === null || val === undefined || val === '') {
|
|
val = 0
|
|
}
|
|
if (type === 1) {
|
|
this.modalData.estimatedMaterialCost = val
|
|
} else if (type === 2) {
|
|
this.modalData.safetyStock = val
|
|
} else if (type === 3) {
|
|
this.modalData.minOrderQty = val
|
|
} else if (type === 4) {
|
|
this.modalData.maxOrderQty = val
|
|
} else if (type === 5) {
|
|
this.modalData.mulOrderQty = val
|
|
} else if (type === 6) {
|
|
this.modalData.safetyLeadTime = val
|
|
} else if (type === 7) {
|
|
this.modalData.shrinkageFac = val
|
|
} else if (type === 8) {
|
|
this.modalData.stdOrderQty = val
|
|
} else if (type === 9) {
|
|
this.modalData.cumLeadTime = val
|
|
} else if (type === 10) {
|
|
this.modalData.unprotectedLeadTime = val
|
|
} else if (type === 11) {
|
|
this.modalData.fixedLeadTimeDay = val
|
|
} else if (type === 12) {
|
|
this.modalData.variableLeadTimeDay = val
|
|
} else if (type === 13) {
|
|
this.modalData.overReportTolerance = val
|
|
} else if (type === 14) {
|
|
this.modalData.fixedLeadTimeHour = val
|
|
} else if (type === 15) {
|
|
this.modalData.density = val
|
|
} else if (type === 16) {
|
|
this.modalData.variableLeadTimeHour = val
|
|
}
|
|
},
|
|
|
|
// ======== 分页相关方法 ========
|
|
/**
|
|
* 每页数
|
|
* @param val
|
|
*/
|
|
sizeChangeHandle (val) {
|
|
this.pageSize = val
|
|
this.pageIndex = 1
|
|
this.getDataList()
|
|
},
|
|
/**
|
|
* 当前页
|
|
* @param val
|
|
*/
|
|
currentChangeHandle (val) {
|
|
this.pageIndex = val
|
|
this.getDataList()
|
|
},
|
|
|
|
// ======== 页签切换相关方法 ========
|
|
/**
|
|
* 未知
|
|
* @returns {boolean}
|
|
*/
|
|
selectFlag () {
|
|
return true
|
|
},
|
|
/**
|
|
* 列表表格选择替换
|
|
* @param tab
|
|
* @param event
|
|
*/
|
|
tabClick (tab, event) {
|
|
// 刷新列表数据
|
|
this.refreshCurrentTabTable()
|
|
},
|
|
/**
|
|
* 当前值发生变化的时候修改
|
|
* @param row
|
|
* @param oldRow
|
|
*/
|
|
changeCurrentRow (row, oldRow) {
|
|
// 判断是否是获取焦点的事件
|
|
if (row) {
|
|
this.partCurrentRow = JSON.parse(JSON.stringify(row))
|
|
//刷新当前页表
|
|
this.refreshCurrentTabTable()
|
|
}
|
|
},
|
|
/**
|
|
* 刷新页签的table数据
|
|
*/
|
|
refreshCurrentTabTable () {
|
|
if (this.activeTable === 'part_item') {
|
|
this.getPartItem()
|
|
} else 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()
|
|
}
|
|
},
|
|
|
|
// ======== 列表数据刷新方法 ========
|
|
/**
|
|
* 查询物料属性
|
|
*/
|
|
getPartItem () {
|
|
let tempData = {
|
|
site: this.$store.state.user.site,
|
|
partNo: this.partCurrentRow.partNo,
|
|
codeNo: this.partCurrentRow.codeNo,
|
|
recordType: 'IP'
|
|
}
|
|
getPartItem(tempData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.partItemList = data.rows
|
|
} 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.totalPage > 0) {
|
|
// 设置选中行
|
|
this.$refs.partTable.setCurrentRow(this.dataList[0])
|
|
// 加载当前的页签的table
|
|
this.refreshCurrentTabTable()
|
|
this.partClickRow(this.dataList[0])
|
|
}
|
|
}
|
|
this.dataListLoading = false
|
|
})
|
|
},
|
|
|
|
// ======== 新增/编辑模态框 ========
|
|
/**
|
|
* 物料信息新增模态框
|
|
*/
|
|
addModal () {
|
|
this.modalData = {
|
|
flag: '1',
|
|
title: '物料新增',
|
|
site: this.$store.state.user.site,
|
|
partNo: '',
|
|
partDesc: '',
|
|
spec: '',
|
|
partTypeDb: '',
|
|
partType: 'Purchase raw',
|
|
familyId: '',
|
|
familyName: '',
|
|
groupId: '',
|
|
groupName: '',
|
|
umId: '',
|
|
umName: '',
|
|
weightNet: '',
|
|
uomForWeightNet: '',
|
|
volumeNet: '',
|
|
uomForVolumeNet: '',
|
|
lotTrackingCode: 'Order Based',
|
|
active: 'Y',
|
|
remark: '',
|
|
supplierId: '',
|
|
supplierName: '',
|
|
productGroupId1: '',
|
|
productGroupName1: '',
|
|
productGroupId2: '',
|
|
productGroupName2: '',
|
|
productGroupId3: '',
|
|
productGroupName3: '',
|
|
productGroupId4: '*',
|
|
productGroupName4: 'NorthSky Application owner',
|
|
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',
|
|
isoCountry: '',
|
|
isoCountryDesc: '',
|
|
manufacturingLeadTime: '',
|
|
expectedLeadTime: '',
|
|
regionOfOrigin: '',
|
|
regionOfOriginDesc: '',
|
|
durabilityWeek: '',
|
|
customsStarNo: '',
|
|
customsStarDesc: '',
|
|
durabilityDay: '',
|
|
intrastatConvFactor: '',
|
|
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: '',
|
|
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: 0,
|
|
variableLeadTimeHour: 0
|
|
}
|
|
this.modalDisableFlag = false
|
|
this.modalFlag = true
|
|
},
|
|
/**
|
|
* 物料信息编辑模态框
|
|
* @param row
|
|
*/
|
|
updateModal (row) {
|
|
this.modalData = {
|
|
flag: '2',
|
|
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,
|
|
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,
|
|
isoCountry: row.isoCountry,
|
|
isoCountryDesc: row.isoCountryDesc,
|
|
manufacturingLeadTime: row.manufacturingLeadTime,
|
|
expectedLeadTime: row.expectedLeadTime,
|
|
regionOfOrigin: row.regionOfOrigin,
|
|
regionOfOriginDesc: row.regionOfOriginDesc,
|
|
durabilityWeek: '',
|
|
customsStarNo: row.customsStarNo,
|
|
customsStarDesc: row.customsStarDesc,
|
|
durabilityDay: row.durabilityDay,
|
|
intrastatConvFactor: row.intrastatConvFactor,
|
|
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
|
|
}
|
|
this.modalDisableFlag = true
|
|
this.modalFlag = true
|
|
},
|
|
|
|
/**
|
|
* 选择代理商
|
|
*/
|
|
getAgentList () {
|
|
// // 先清空缓存选中
|
|
// this.$nextTick(() => this.$refs.agentTable.clearSelection())
|
|
// // 拿到选中的代理商id
|
|
// let tempDataList = this.modalData.agentId.split(';')
|
|
// 查询所有代理商
|
|
getAgentListBy(this.agentData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.agentList1 = data.rows
|
|
// this.agentList.forEach(val => {
|
|
// // 回显选中的代理商
|
|
// if (tempDataList.includes(val.agentId)) {
|
|
// this.$nextTick(() => this.$refs.agentTable.toggleRowSelection(val, true))
|
|
// }
|
|
// })
|
|
// this.agentModelFlag = true
|
|
} else {
|
|
this.$alert(data.msg, '错误', {
|
|
confirmButtonText: '确定'
|
|
})
|
|
}
|
|
})
|
|
},
|
|
/**
|
|
* 代理商多选
|
|
* @param row
|
|
*/
|
|
agentClickRow (row) {
|
|
this.$refs.agentTable.toggleRowSelection(row);
|
|
},
|
|
/**
|
|
* 获得选中的代理商
|
|
* @param val
|
|
*/
|
|
selectionAgent (val) {
|
|
this.agentSelections = val
|
|
},
|
|
/**
|
|
* 返回列表唯一值
|
|
* @param row
|
|
* @returns {string|[{trigger: string, message: string, required: boolean}]|*}
|
|
*/
|
|
getRowKeys (row) {
|
|
// 唯一值,一般都为id
|
|
return row.agentId
|
|
},
|
|
/**
|
|
* 确认多选代理商
|
|
* @returns {boolean}
|
|
*/
|
|
confirmAgent () {
|
|
this.modalData.agentId = ''
|
|
this.modalData.agentName = ''
|
|
for (let i = 0; i < this.agentSelections.length; i++) {
|
|
this.modalData.agentId = this.modalData.agentId + ";" + this.agentSelections[i].agentId
|
|
this.modalData.agentName = this.modalData.agentName + ";" + this.agentSelections[i].agentName
|
|
}
|
|
this.modalData.agentId = this.modalData.agentId.substring(1)
|
|
this.modalData.agentName = this.modalData.agentName.substring(1)
|
|
this.agentModelFlag = false
|
|
},
|
|
|
|
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: '确定'
|
|
})
|
|
}
|
|
})
|
|
}).catch(() => {
|
|
})
|
|
},
|
|
/**
|
|
* 选择制造商
|
|
*/
|
|
getManufacturerList () {
|
|
// // 先清空缓存选中
|
|
// this.$nextTick(() => this.$refs.agentTable.clearSelection())
|
|
// // 拿到选中的代理商id
|
|
// let tempDataList = this.modalData.agentId.split(';')
|
|
// 查询所有代理商
|
|
getManufacturerListBy(this.manufacturerData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.manufacturerList1 = data.rows
|
|
// this.agentList.forEach(val => {
|
|
// // 回显选中的代理商
|
|
// if (tempDataList.includes(val.agentId)) {
|
|
// this.$nextTick(() => this.$refs.agentTable.toggleRowSelection(val, true))
|
|
// }
|
|
// })
|
|
// this.agentModelFlag = true
|
|
} else {
|
|
this.$alert(data.msg, '错误', {
|
|
confirmButtonText: '确定'
|
|
})
|
|
}
|
|
})
|
|
},
|
|
/**
|
|
* 选择默认库位
|
|
*/
|
|
getLocationList () {
|
|
// 查询所有库位
|
|
getLocationListBy(this.locationData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.locationList1 = data.rows
|
|
} else {
|
|
this.$alert(data.msg, '错误', {
|
|
confirmButtonText: '确定'
|
|
})
|
|
}
|
|
})
|
|
},
|
|
/**
|
|
* 制造商多选
|
|
* @param row
|
|
*/
|
|
manufacturerClickRow (row) {
|
|
this.$refs.manufacturerTable.toggleRowSelection(row);
|
|
},
|
|
/**
|
|
* 获得选中的制造商
|
|
* @param val
|
|
*/
|
|
selectionManufacturer (val) {
|
|
this.manufacturerSelections = val
|
|
},
|
|
/**
|
|
* 返回列表唯一值
|
|
* @param row
|
|
* @returns {string|[{trigger: string, message: string, required: boolean}]|*}
|
|
*/
|
|
getRowKeys2 (row) {
|
|
// 唯一值,一般都为id
|
|
return row.manufacturerId
|
|
},
|
|
/**
|
|
* 确认多选制造商
|
|
* @returns {boolean}
|
|
*/
|
|
confirmManufacturer () {
|
|
this.modalData.manufacturerId = ''
|
|
this.modalData.manufacturerName = ''
|
|
for (let i = 0; i < this.manufacturerSelections.length; i++) {
|
|
this.modalData.manufacturerId = this.modalData.manufacturerId + ";" + this.manufacturerSelections[i].manufacturerId
|
|
this.modalData.manufacturerName = this.modalData.manufacturerName + ";" + this.agentSelections[i].manufacturerName
|
|
}
|
|
this.modalData.manufacturerId = this.modalData.manufacturerId.substring(1)
|
|
this.modalData.manufacturerName = this.modalData.manufacturerName.substring(1)
|
|
this.manufacturerModelFlag = false
|
|
},
|
|
|
|
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
|
|
getLocationList(this.partCurrentRow).then(({data}) => {
|
|
this.locationList1 = data.row1
|
|
this.locationList2 = data.row2
|
|
})
|
|
this.locationData = {
|
|
site: this.$store.state.user.site,
|
|
locationId: '',
|
|
locationName: '',
|
|
}
|
|
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,
|
|
locationList: this.locationSelections1
|
|
}
|
|
addDefaultLocation(inData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
getLocationList(this.partCurrentRow).then(({data}) => {
|
|
this.locationList1 = data.row1
|
|
this.locationList2 = data.row2
|
|
})
|
|
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,
|
|
locationList: this.locationSelections2
|
|
}
|
|
deleteDefaultLocation(inData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
getLocationList(this.partCurrentRow).then(({data}) => {
|
|
this.locationList1 = data.row1
|
|
this.locationList2 = data.row2
|
|
})
|
|
this.locationSelections2 = []
|
|
} else {
|
|
this.$alert(data.msg, '错误', {
|
|
confirmButtonText: '确定'
|
|
})
|
|
}
|
|
})
|
|
},
|
|
// 单删
|
|
deleteLocation2 (row) {
|
|
this.$confirm(`是否删除该库位?`, '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
}).then(() => {
|
|
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()
|
|
},
|
|
|
|
// ======== 新增/编辑/删除方法 ========
|
|
/**
|
|
* 物料信息新增/编辑
|
|
*/
|
|
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
|
|
}
|
|
if (this.modalData.umId === '' || this.modalData.umId == null) {
|
|
this.$message.warning('请选择库存计量单位!')
|
|
return
|
|
}
|
|
if (this.modalData.codeNo === '' || this.modalData.codeNo == null) {
|
|
this.$message.warning('请选择属性模板!')
|
|
return
|
|
}
|
|
if (this.modalData.flag === '1') {
|
|
partInformationSave(this.modalData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.getDataList()
|
|
this.modalFlag = false
|
|
this.$message({
|
|
message: '操作成功',
|
|
type: 'success',
|
|
duration: 1500,
|
|
onClose: () => {}
|
|
})
|
|
} else {
|
|
this.$alert(data.msg, '错误', {
|
|
confirmButtonText: '确定'
|
|
})
|
|
}
|
|
})
|
|
} else {
|
|
partInformationEdit(this.modalData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.getDataList()
|
|
this.modalFlag = false
|
|
this.$message({
|
|
message: '操作成功',
|
|
type: 'success',
|
|
duration: 1500,
|
|
onClose: () => {}
|
|
})
|
|
} else {
|
|
this.$alert(data.msg, '错误', {
|
|
confirmButtonText: '确定'
|
|
})
|
|
}
|
|
})
|
|
}
|
|
},
|
|
/**
|
|
* 物料信息删除
|
|
*/
|
|
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: '确定'
|
|
})
|
|
}
|
|
})
|
|
}).catch(() => {
|
|
})
|
|
},
|
|
|
|
// ======== 列表操作方法 ========
|
|
/**
|
|
* 单机选中物料信息
|
|
* @param row
|
|
*/
|
|
partClickRow (row) {
|
|
this.$refs.partTable.toggleRowSelection(row)
|
|
this.partCurrentRow = JSON.parse(JSON.stringify(row))
|
|
},
|
|
/**
|
|
* 复选物料信息
|
|
* @param val
|
|
*/
|
|
selectionPart (val) {
|
|
this.partSelections = val
|
|
this.$refs.selectDiv.setLengthselected(this.partSelections.length)
|
|
},
|
|
|
|
// ======== 属性页签相关方法 ========
|
|
|
|
// /**
|
|
// * 编辑属性值方法
|
|
// * @returns {boolean}
|
|
// */
|
|
// itemSaveData () {
|
|
// if(this.itemData.partNo === '' || this.itemData.partNo == null){
|
|
// this.$message.warning('未选择物料!')
|
|
// return false
|
|
// }
|
|
// if(this.itemData.propertiesItemNo === ''|| this.itemData.propertiesItemNo == null){
|
|
// this.$message.warning('未选择属性!')
|
|
// return false
|
|
// }
|
|
// savePartItemValue(this.itemData).then(({data}) => {
|
|
// if (data && data.code === 0) {
|
|
// this.itemModalFlag = false
|
|
// this.getPartItem()
|
|
// this.$message({
|
|
// message: '操作成功',
|
|
// type: 'success',
|
|
// duration: 1500,
|
|
// onClose: () => {}
|
|
// })
|
|
// } else {
|
|
// this.$alert(data.msg, '错误', {
|
|
// confirmButtonText: '确定'
|
|
// })
|
|
// }
|
|
// })
|
|
// },
|
|
|
|
// ======== 附件的相关方法 ========
|
|
/**
|
|
* 获取物料附件列表
|
|
*/
|
|
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.$nextTick(() => {
|
|
this.$refs.partUploadFile.init(currentData);
|
|
})
|
|
},
|
|
/**
|
|
* 文件删除
|
|
* @param row
|
|
*/
|
|
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: '确定'
|
|
})
|
|
}
|
|
})
|
|
}).catch(() => {
|
|
})
|
|
},
|
|
/**
|
|
* 文件下载
|
|
* @param row
|
|
*/
|
|
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)
|
|
})
|
|
},
|
|
|
|
// ======== chooseList相关方法 ========
|
|
/**
|
|
* 获取基础数据列表S
|
|
* @param val
|
|
* @param type
|
|
*/
|
|
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.isoCountry
|
|
} else if (val === 128) {
|
|
strVal = this.modalData.regionOfOrigin
|
|
} else if (val === 129) {
|
|
strVal = this.modalData.customsStarNo
|
|
} else if (val === 131) {
|
|
strVal = this.modalData.partCostGroupId
|
|
} else if (val === 132) {
|
|
strVal = this.modalData.planningMethod
|
|
}
|
|
this.$refs.baseList.init(val, strVal)
|
|
})
|
|
},
|
|
/**
|
|
* 列表方法的回调
|
|
* @param val
|
|
*/
|
|
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 === 114) {
|
|
this.modalData.manufacturerId = val.manufacturer_id
|
|
this.modalData.manufacturerName = val.manufacturer_name
|
|
} else if (this.tagNo === 20) {
|
|
if (this.modalData.flag === '2') {
|
|
if (val.Code_no != this.tempCodeNo) {
|
|
this.$confirm(`更换属性模板将替换下方物料属性数据,请确认?`, '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
}).then(() => {
|
|
this.modalData.codeNo = val.Code_no
|
|
this.$set(this.modalData, 'codeDesc', val.Code_desc)
|
|
}).catch(() => {
|
|
})
|
|
}
|
|
} else {
|
|
this.modalData.codeNo = val.Code_no
|
|
this.$set(this.modalData, 'codeDesc', val.Code_desc)
|
|
}
|
|
} 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.isoCountry = val.iso_country
|
|
this.modalData.isoCountryDesc = val.iso_country_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.customsStarNo = val.customs_star_no
|
|
this.modalData.customsStarDesc = val.customs_star_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
|
|
}
|
|
},
|
|
|
|
// ======== 导出相关方法 ========
|
|
/**
|
|
* 导出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
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
/deep/ .customer-tab .el-tabs__content {
|
|
padding: 0px !important;
|
|
height: 459px;
|
|
}
|
|
/deep/ .customer-tab .el-tabs__content {
|
|
height: 294px;
|
|
}
|
|
.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>
|
|
|