Browse Source

2024-09-09 优化

master
fengyuan_yang 1 year ago
parent
commit
d3caac349d
  1. 7
      src/api/part/bomManagement.js
  2. 7
      src/api/part/routingManagement.js
  3. 27
      src/views/modules/common/Chooselist.vue
  4. 429
      src/views/modules/part/bomManagement.vue
  5. 58
      src/views/modules/part/partInformation.vue
  6. 499
      src/views/modules/part/routingManagement.vue
  7. 14
      src/views/modules/tooling/searchToolApply.vue

7
src/api/part/bomManagement.js

@ -189,4 +189,11 @@ export const queryManufStructCostDistribtionTable = data => createAPI(`/plm/bomM
*/ */
export const queryMultiLevelStructureTable = data => createAPI(`/plm/bomManagement/queryMultiLevelStructureTable`,'post',data) export const queryMultiLevelStructureTable = data => createAPI(`/plm/bomManagement/queryMultiLevelStructureTable`,'post',data)
/**
* 查出可创建BOM的物料
* @param data
* @returns {*}
*/
export const queryPartListBom = data => createAPI(`/plm/bomManagement/queryPartListBom`,'post',data)

7
src/api/part/routingManagement.js

@ -196,3 +196,10 @@ export const toBecomeOfficialRouting = data => createAPI(`/plm/routingManagement
* @returns {*} * @returns {*}
*/ */
export const queryMaxOperationNo = data => createAPI(`/plm/routingManagement/queryMaxOperationNo`,'post',data) export const queryMaxOperationNo = data => createAPI(`/plm/routingManagement/queryMaxOperationNo`,'post',data)
/**
* 查出可创建Routing的物料
* @param data
* @returns {*}
*/
export const queryPartListRouting = data => createAPI(`/plm/routingManagement/queryPartListRouting`,'post',data)

27
src/views/modules/common/Chooselist.vue

@ -1,30 +1,22 @@
<template> <template>
<el-dialog append-to-body :title="baseListData.description"
:close-on-click-modal="false" :close-on-press-escape="false"
@close="closeDialog"
:visible.sync="visible"
width="685px" v-drag>
<el-form label-position="top"
inline="inline"
size="mini"
label-width="120px">
<el-dialog append-to-body :title="baseListData.description" :close-on-click-modal="false" :close-on-press-escape="false" @close="closeDialog" :visible.sync="visible" width="685px" v-drag>
<el-form label-position="top" inline="inline" size="mini" label-width="120px">
<el-form-item :label="baseListData.caption1" v-if="baseListData.caption1!='' && baseListData.caption1!=null"> <el-form-item :label="baseListData.caption1" v-if="baseListData.caption1!='' && baseListData.caption1!=null">
<el-input v-model="param1"></el-input> <el-input v-model="param1"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="baseListData.caption2" v-if="baseListData.caption2!='' && baseListData.caption2!=null"> <el-form-item :label="baseListData.caption2" v-if="baseListData.caption2!='' && baseListData.caption2!=null">
<el-input v-model="param2"></el-input> <el-input v-model="param2"></el-input>
</el-form-item> </el-form-item>
<!-- <el-form-item :label="baseListData.caption4" v-if="baseListData.caption4!='' && baseListData.caption4!=null">-->
<!-- <el-input v-model="param4" style="width: 120px"></el-input>-->
<!-- </el-form-item>-->
<el-form-item :label="baseListData.caption3" v-if="baseListData.caption3!='' && baseListData.caption3!=null&&(this.tagNo<501||this.tagNo>999)">
<el-form-item :label="baseListData.caption3" v-if="baseListData.caption3 != '' && baseListData.caption3 != null && (this.tagNo < 501 || this.tagNo > 999) && this.tagNo !== 119">
<el-select v-model="param3" style="width: 120px"> <el-select v-model="param3" style="width: 120px">
<el-option label="全部" value=""></el-option> <el-option label="全部" value=""></el-option>
<el-option label="在用" value="Y"></el-option> <el-option label="在用" value="Y"></el-option>
<el-option label="不在用" value="N"></el-option> <el-option label="不在用" value="N"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- <el-form-item :label="baseListData.caption4" v-if="baseListData.caption4 !== '' && baseListData.caption4 != null">-->
<!-- <el-input v-model="param4" style="width: 120px"></el-input>-->
<!-- </el-form-item>-->
<el-button style="margin-top: 18px" type="primary" @click="getDataList(false)">查询 <el-button style="margin-top: 18px" type="primary" @click="getDataList(false)">查询
</el-button> </el-button>
</el-form> </el-form>
@ -191,11 +183,6 @@ export default {
if (this.param2) { if (this.param2) {
sql += " and a." + this.baseListData.fieldname2 + " like '%" + this.param2 + "%'" sql += " and a." + this.baseListData.fieldname2 + " like '%" + this.param2 + "%'"
} }
if (this.tagNo < 1000 && this.tagNo !== 93){
if (this.param4) {
sql += " and site = " + this.param4
}
}
} else { } else {
if (bool) { if (bool) {
sql += " and (" + this.baseListData.fieldname1 + " like '%" + this.param + "%' OR "+this.baseListData.fieldname2 + " like '%" + this.param + "%'" +" ) " sql += " and (" + this.baseListData.fieldname1 + " like '%" + this.param + "%' OR "+this.baseListData.fieldname2 + " like '%" + this.param + "%'" +" ) "
@ -209,7 +196,7 @@ export default {
if (this.param3) { if (this.param3) {
sql += " and active like '%" + this.param3 + "%'" sql += " and active like '%" + this.param3 + "%'"
} }
if (this.tagNo <1000 && this.tagNo !== 93){
if (this.tagNo <1000 && this.tagNo !== 93) {
if (this.param4) { if (this.param4) {
sql += " and site=" + "'" + this.param4 + "'" sql += " and site=" + "'" + this.param4 + "'"
} }

429
src/views/modules/part/bomManagement.vue

@ -9,9 +9,14 @@
<el-input v-model="searchData.partDesc" clearable style="width: 120px"></el-input> <el-input v-model="searchData.partDesc" clearable style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="'制造类型'"> <el-form-item :label="'制造类型'">
<el-input v-model="searchData.bomType" clearable style="width: 120px"></el-input>
<el-select v-model="searchData.bomType" clearable style="width: 120px">
<el-option label="Manufacturing" value="Manufacturing"></el-option>
<el-option label="Repair" value="Repair"></el-option>
<el-option label="Purchase" value="Purchase"></el-option>
<el-option label="Prototype" value="Prototype"></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item :label="'配方版本号'">
<el-form-item :label="'BOM版本号'">
<el-input v-model="searchData.engChgLevel" clearable style="width: 120px"></el-input> <el-input v-model="searchData.engChgLevel" clearable style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="' '"> <el-form-item :label="' '">
@ -168,7 +173,7 @@
<el-button v-if="modalData.flag === '2'" type="primary" @click="copyBomAlternative">Copy</el-button> <el-button v-if="modalData.flag === '2'" type="primary" @click="copyBomAlternative">Copy</el-button>
<el-button v-if="detailData.status === 'Tentative' || detailData.status === 'Obsolete'" type="primary" @click="updateStatusToBuildable">Build</el-button> <el-button v-if="detailData.status === 'Tentative' || detailData.status === 'Obsolete'" type="primary" @click="updateStatusToBuildable">Build</el-button>
<el-button v-if="detailData.status === 'Buildable'" type="primary" @click="updateStatusToObsolete">Retire</el-button> <el-button v-if="detailData.status === 'Buildable'" type="primary" @click="updateStatusToObsolete">Retire</el-button>
<el-button v-if="modalData.flag === '2' && detailData.officialFlag !== 'Y'" type="primary" @click="toBecomeOfficialBom" :loading="toBecomeOfficialLoading">转正式BOM</el-button>
<el-button v-if="modalData.flag === '2' && detailData.officialFlag !== 'Y' && (modalData.ifsPartNo == null || modalData.ifsPartNo === '')" type="primary" @click="toBecomeOfficialBom" :loading="toBecomeOfficialLoading">转正式BOM</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-position="top" :model="detailData" :rules="rules" style="margin-left: 7px"> <el-form :inline="true" label-position="top" :model="detailData" :rules="rules" style="margin-left: 7px">
@ -423,6 +428,16 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页插件 -->
<el-pagination
@size-change="sizeChangeHandle2"
@current-change="currentChangeHandle2"
:current-page="pageIndex2"
:page-sizes="[20, 50, 100, 200, 500]"
:page-size="pageSize2"
:total="totalPage2"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
</div> </div>
<el-footer style="height:40px;margin-top: 20px;text-align:center"> <el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="partModelFlag=false">关闭</el-button> <el-button type="primary" @click="partModelFlag=false">关闭</el-button>
@ -470,6 +485,16 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页插件 -->
<el-pagination
@size-change="sizeChangeHandle3"
@current-change="currentChangeHandle3"
:current-page="pageIndex3"
:page-sizes="[20, 50, 100, 200, 500]"
:page-size="pageSize3"
:total="totalPage3"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<el-footer style="height:35px;margin-top:10px;text-align:center"> <el-footer style="height:35px;margin-top:10px;text-align:center">
<el-button type="primary" @click="componentPartModelFlag = false">关闭</el-button> <el-button type="primary" @click="componentPartModelFlag = false">关闭</el-button>
</el-footer> </el-footer>
@ -519,9 +544,10 @@
</el-form-item> </el-form-item>
<el-form-item :label="'生产属性'" prop="issueType" :rules="componentRules.issueType"> <el-form-item :label="'生产属性'" prop="issueType" :rules="componentRules.issueType">
<el-select v-model="componentData.issueType" style="width: 165px"> <el-select v-model="componentData.issueType" style="width: 165px">
<el-option label="Reserve and Backflush" value="Reserve and Backflush"></el-option>
<el-option label="Reserve And Backflush" value="Reserve And Backflush"></el-option>
<el-option label="Reserve" value="Reserve"></el-option> <el-option label="Reserve" value="Reserve"></el-option>
<el-option label="Backflush" value="Backflush"></el-option> <el-option label="Backflush" value="Backflush"></el-option>
<el-option label="Manual" value="Manual"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -630,15 +656,18 @@
<legend>Source Revision</legend> <legend>Source Revision</legend>
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="物料编码"> <el-form-item label="物料编码">
<el-input v-model="modalData.partNo" readonly style="width: 185px"></el-input>
<el-input v-model="modalData.partNo" readonly style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="site">
<el-input v-model="modalData.site" disabled style="width: 185px"></el-input>
<el-form-item label="物料名称">
<el-input v-model="modalData.partDesc" readonly style="width: 249px"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="Bom版本号">
<el-input v-model="modalData.engChgLevel" readonly style="width: 185px"></el-input>
<el-form-item label="Site">
<el-input v-model="modalData.site" readonly style="width: 85px"></el-input>
</el-form-item>
<el-form-item label="BOM版本号">
<el-input v-model="modalData.engChgLevel" readonly style="width: 85px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="制造类型"> <el-form-item label="制造类型">
<el-input v-model="modalData.bomType" readonly style="width: 185px"></el-input> <el-input v-model="modalData.bomType" readonly style="width: 185px"></el-input>
@ -677,19 +706,23 @@
<fieldset style="width: 426px"> <fieldset style="width: 426px">
<legend>Destination Revision</legend> <legend>Destination Revision</legend>
<el-form :inline="true" label-position="top" :model="copyBomData" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" :model="copyBomData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="物料编码">
<el-input v-model="copyBomData.partNo" style="width: 185px"></el-input>
<el-form-item>
<span slot="label" @click="queryCopyPartModal"><a herf="#">物料编码</a></span>
<el-input v-model="copyBomData.partNo" @change="copyBomTypeChange" @blur="copyPartBlur" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="site">
<el-input v-model="copyBomData.site" disabled style="width: 185px"></el-input>
<el-form-item :label="'物料名称'">
<el-input v-model="copyBomData.partDesc" disabled style="width: 249px"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-position="top" :model="copyBomData" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" :model="copyBomData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="Bom版本号">
<el-input v-model="copyBomData.engChgLevel" style="width: 185px"></el-input>
<el-form-item label="Site">
<el-input v-model="copyBomData.site" disabled style="width: 85px"></el-input>
</el-form-item>
<el-form-item label="BOM版本号">
<el-input v-model="copyBomData.engChgLevel" style="width: 85px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="制造类型"> <el-form-item label="制造类型">
<el-select v-model="copyBomData.bomType" style="width: 185px">
<el-select v-model="copyBomData.bomType" @change="copyBomTypeChange" style="width: 185px">
<el-option label="Manufacturing" value="Manufacturing"></el-option> <el-option label="Manufacturing" value="Manufacturing"></el-option>
<el-option label="Repair" value="Repair"></el-option> <el-option label="Repair" value="Repair"></el-option>
<el-option label="Purchase" value="Purchase"></el-option> <el-option label="Purchase" value="Purchase"></el-option>
@ -707,26 +740,79 @@
</el-form> </el-form>
</fieldset> </fieldset>
<el-footer style="height:40px;margin-top: 10px;text-align:center"> <el-footer style="height:40px;margin-top: 10px;text-align:center">
<el-button type="primary" @click="copyBom">保存</el-button>
<el-button type="primary" :loading="copyLoading" @click="copyBom">保存</el-button>
<el-button type="primary" @click="copyBomModelFlag = false">关闭</el-button> <el-button type="primary" @click="copyBomModelFlag = false">关闭</el-button>
</el-footer> </el-footer>
</el-dialog> </el-dialog>
<!-- copy物料模态框 -->
<el-dialog title="物料清单" top="17vh" :close-on-click-modal="false" v-drag :visible.sync="copyPartModelFlag" width="700px">
<el-form :inline="true" label-position="top" :model="copyPartData">
<el-form-item :label="'物料编码'">
<el-input v-model="copyPartData.partNo" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'物料名称'">
<el-input v-model="copyPartData.partDesc" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="' '">
<el-button type="primary" @click="queryCopyPartList">查询</el-button>
</el-form-item>
</el-form>
<el-table
:height="250"
:data="copyPartList"
@row-dblclick="getCopyRowData"
border
style="width: 100%;">
<el-table-column
v-for="(item,index) in componentPartColumnList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
<!-- 分页插件 -->
<el-pagination
@size-change="sizeChangeHandle4"
@current-change="currentChangeHandle4"
:current-page="pageIndex4"
:page-sizes="[20, 50, 100, 200, 500]"
:page-size="pageSize4"
:total="totalPage4"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<el-footer style="height:35px;margin-top:10px;text-align:center">
<el-button type="primary" @click="copyPartModelFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<!-- copyAlternative --> <!-- copyAlternative -->
<el-dialog title="Copy Structure Alternative" :close-on-click-modal="false" v-drag :visible.sync="copyAlternativeModelFlag" width="450px"> <el-dialog title="Copy Structure Alternative" :close-on-click-modal="false" v-drag :visible.sync="copyAlternativeModelFlag" width="450px">
<fieldset style="width: 426px"> <fieldset style="width: 426px">
<legend>Source Revision</legend> <legend>Source Revision</legend>
<el-form :inline="true" label-position="top" :model="detailData" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" :model="detailData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="物料编码"> <el-form-item label="物料编码">
<el-input v-model="detailData.partNo" readonly style="width: 185px"></el-input>
<el-input v-model="detailData.partNo" readonly style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="site">
<el-input v-model="detailData.site" disabled style="width: 185px"></el-input>
<el-form-item label="物料名称">
<el-input v-model="modalData.partDesc" readonly style="width: 249px"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-position="top" :model="detailData" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" :model="detailData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="Bom版本号">
<el-input v-model="detailData.engChgLevel" readonly style="width: 185px"></el-input>
<el-form-item label="Site">
<el-input v-model="detailData.site" readonly style="width: 85px"></el-input>
</el-form-item>
<el-form-item label="BOM版本号">
<el-input v-model="detailData.engChgLevel" readonly style="width: 85px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="制造类型"> <el-form-item label="制造类型">
<el-input v-model="detailData.bomType" readonly style="width: 185px"></el-input> <el-input v-model="detailData.bomType" readonly style="width: 185px"></el-input>
@ -744,16 +830,20 @@
<fieldset style="width: 426px"> <fieldset style="width: 426px">
<legend>Destination Revision</legend> <legend>Destination Revision</legend>
<el-form :inline="true" label-position="top" :model="copyAlternativeData" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" :model="copyAlternativeData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="物料编码">
<el-input v-model="copyAlternativeData.partNo" style="width: 185px"></el-input>
<el-form-item>
<span slot="label" @click="queryCopyPartModal"><a herf="#">物料编码</a></span>
<el-input v-model="copyAlternativeData.partNo" @blur="copyPartBlur" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="site">
<el-input v-model="copyAlternativeData.site" disabled style="width: 185px"></el-input>
<el-form-item :label="'物料名称'">
<el-input v-model="copyAlternativeData.partDesc" disabled style="width: 249px"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-position="top" :model="copyAlternativeData" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" :model="copyAlternativeData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="Bom版本号">
<el-input v-model="copyAlternativeData.engChgLevel" style="width: 185px"></el-input>
<el-form-item label="Site">
<el-input v-model="copyAlternativeData.site" disabled style="width: 85px"></el-input>
</el-form-item>
<el-form-item label="BOM版本号">
<el-input v-model="copyAlternativeData.engChgLevel" style="width: 85px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="制造类型"> <el-form-item label="制造类型">
<el-select v-model="copyAlternativeData.bomType" style="width: 185px"> <el-select v-model="copyAlternativeData.bomType" style="width: 185px">
@ -774,7 +864,7 @@
</el-form> </el-form>
</fieldset> </fieldset>
<el-footer style="height:40px;margin-top: 10px;text-align:center"> <el-footer style="height:40px;margin-top: 10px;text-align:center">
<el-button type="primary" @click="copyAlternative">保存</el-button>
<el-button type="primary" :loading="copyLoading" @click="copyAlternative">保存</el-button>
<el-button type="primary" @click="copyAlternativeModelFlag = false">关闭</el-button> <el-button type="primary" @click="copyAlternativeModelFlag = false">关闭</el-button>
</el-footer> </el-footer>
</el-dialog> </el-dialog>
@ -813,10 +903,9 @@ import {
queryBomByProductTable, // queryBomByProductTable, //
queryManufStructCostDistribtionTable, // queryManufStructCostDistribtionTable, //
queryMultiLevelStructureTable, // queryMultiLevelStructureTable, //
queryPartListBom, // BOM
} from '@/api/part/bomManagement.js' } from '@/api/part/bomManagement.js'
import ChooseList from '@/views/modules/common/Chooselist' import ChooseList from '@/views/modules/common/Chooselist'
import dayjs from "dayjs";
import fa from "element-ui/src/locale/lang/fa";
export default { export default {
// //
@ -883,6 +972,15 @@ export default {
pageIndex: 1, pageIndex: 1,
pageSize: 50, pageSize: 50,
totalPage: 0, totalPage: 0,
pageIndex2: 1,
pageSize2: 20,
totalPage2: 0,
pageIndex3: 1,
pageSize3: 20,
totalPage3: 0,
pageIndex4: 1,
pageSize4: 20,
totalPage4: 0,
selectedDataNum: 0, selectedDataNum: 0,
// //
searchData: { searchData: {
@ -900,6 +998,7 @@ export default {
saveDetailLoading: false, saveDetailLoading: false,
saveAllLoading: false, saveAllLoading: false,
toBecomeOfficialLoading: false, toBecomeOfficialLoading: false,
copyLoading: false,
// //
detailTable: 'bom_detail', detailTable: 'bom_detail',
subDetailTable: 'bom_sub_detail', subDetailTable: 'bom_sub_detail',
@ -976,12 +1075,24 @@ export default {
site: this.$store.state.user.site, site: this.$store.state.user.site,
partNo: '', partNo: '',
partDesc: '', partDesc: '',
page: 1,
limit: 10
}, },
componentPartData: { componentPartData: {
site: this.$store.state.user.site, site: this.$store.state.user.site,
partNo: '', partNo: '',
partDesc: '', partDesc: '',
status: ''
status: '',
page: 1,
limit: 10
},
copyPartData: {
type: '',
site: this.$store.state.user.site,
partNo: '',
partDesc: '',
page: 1,
limit: 10
}, },
saveDetailData: { saveDetailData: {
flag: '', flag: '',
@ -1013,6 +1124,7 @@ export default {
copyBomData: { copyBomData: {
site: '', site: '',
partNo: '', partNo: '',
partDesc: '',
engChgLevel: '', engChgLevel: '',
bomType: '', bomType: '',
effPhaseInDate: '', effPhaseInDate: '',
@ -1024,6 +1136,7 @@ export default {
copyAlternativeData: { copyAlternativeData: {
site: '', site: '',
partNo: '', partNo: '',
partDesc: '',
engChgLevel: '', engChgLevel: '',
bomType: '', bomType: '',
alternativeNo: '', alternativeNo: '',
@ -1055,6 +1168,7 @@ export default {
dataList: [], dataList: [],
partList: [], partList: [],
componentPartList: [], componentPartList: [],
copyPartList: [],
componentPartSelections: [], componentPartSelections: [],
subDetailList: [], subDetailList: [],
byProductList: [], byProductList: [],
@ -1916,6 +2030,7 @@ export default {
columnImage: false, columnImage: false,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 100
}, },
{ {
columnProp: 'alternativeDescription', columnProp: 'alternativeDescription',
@ -1926,6 +2041,7 @@ export default {
columnImage: false, columnImage: false,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 200
}, },
{ {
columnProp: 'status', columnProp: 'status',
@ -1936,6 +2052,7 @@ export default {
columnImage: false, columnImage: false,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 100
}, },
], ],
columnManufStructCostDistribList: [ columnManufStructCostDistribList: [
@ -2343,6 +2460,7 @@ export default {
modalDisableFlag: false, modalDisableFlag: false,
partModelFlag: false, partModelFlag: false,
componentPartModelFlag: false, componentPartModelFlag: false,
copyPartModelFlag: false,
saveDetailModalFlag :false, saveDetailModalFlag :false,
saveDetailModalDisable: false, saveDetailModalDisable: false,
componentSaveModal: false, componentSaveModal: false,
@ -2416,6 +2534,63 @@ export default {
this.getDataList() this.getDataList()
}, },
/**
* 每页数
* @param val
*/
sizeChangeHandle2 (val) {
this.pageSize2 = val
this.pageIndex2 = 1
this.queryPartList()
},
/**
* 当前页
* @param val
*/
currentChangeHandle2 (val) {
this.pageIndex2 = val
this.queryPartList()
},
/**
* 每页数
* @param val
*/
sizeChangeHandle3 (val) {
this.pageSize3 = val
this.pageIndex3 = 1
this.queryComponentPartModal()
},
/**
* 当前页
* @param val
*/
currentChangeHandle3 (val) {
this.pageIndex3 = val
this.queryComponentPartModal()
},
/**
* 每页数
* @param val
*/
sizeChangeHandle4 (val) {
this.pageSize4 = val
this.pageIndex4 = 1
this.queryCopyPartModal()
},
/**
* 当前页
* @param val
*/
currentChangeHandle4 (val) {
this.pageIndex4 = val
this.queryCopyPartModal()
},
// ======== ======== // ======== ========
/** /**
* 明细页签选择替换 * 明细页签选择替换
@ -2611,6 +2786,8 @@ export default {
printUnit: row.printUnit, printUnit: row.printUnit,
printUnitName: row.printUnitName, printUnitName: row.printUnitName,
officialFlag: row.officialFlag, officialFlag: row.officialFlag,
alternativeNo: row.alternativeNo,
ifsPartNo: row.ifsPartNo
} }
this.subDetailTable = 'bom_sub_detail' this.subDetailTable = 'bom_sub_detail'
// bom // bom
@ -2618,9 +2795,6 @@ export default {
if (data && data.code === 0) { if (data && data.code === 0) {
this.detailDataList = data.rows.detailList this.detailDataList = data.rows.detailList
this.subDetailList = data.rows.componentList this.subDetailList = data.rows.componentList
this.byProductList = data.rows.byProductList
this.manufStructCostDistribList = data.rows.manufStructCostDistribList
this.multiLevelStructureList = data.rows.multiLevelStructureList
this.detailData = data.rows.detailData this.detailData = data.rows.detailData
this.modalDisableFlag = true this.modalDisableFlag = true
this.modalFlag = true this.modalFlag = true
@ -2751,7 +2925,7 @@ export default {
printUnitName: '', printUnitName: '',
qtyPerAssembly: 0, qtyPerAssembly: 0,
componentScrap: 0, componentScrap: 0,
issueType: 'Reserve and Backflush',
issueType: 'Reserve And Backflush',
shrinkageFactor: 0, shrinkageFactor: 0,
lineItemNo: '', lineItemNo: '',
operationId: '', operationId: '',
@ -2802,7 +2976,7 @@ export default {
printUnitName: '', printUnitName: '',
qtyPerAssembly: 0, qtyPerAssembly: 0,
componentScrap: 0, componentScrap: 0,
issueType: 'Reserve and Backflush',
issueType: 'Reserve And Backflush',
shrinkageFactor: 0, shrinkageFactor: 0,
lineItemNo: '', lineItemNo: '',
operationId: '', operationId: '',
@ -3141,9 +3315,14 @@ export default {
* 查询物料 * 查询物料
*/ */
queryPartList () { queryPartList () {
queryPartList(this.partData).then(({data}) => {
this.partData.limit = this.pageSize2
this.partData.page = this.pageIndex2
queryPartListBom(this.partData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.partList = data.rows
this.partList = data.page.list
this.pageIndex2 = data.page.currPage
this.pageSize2 = data.page.pageSize
this.totalPage2 = data.page.totalCount
this.partModelFlag = true this.partModelFlag = true
} else { } else {
this.$alert(data.msg, '错误', { this.$alert(data.msg, '错误', {
@ -3155,13 +3334,15 @@ export default {
// //
partNoBlur () { partNoBlur () {
this.partData.limit = this.pageSize2
this.partData.page = this.pageIndex2
this.partData.partNo = this.modalData.partNo this.partData.partNo = this.modalData.partNo
queryPartList(this.partData).then(({data}) => { queryPartList(this.partData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
if (data.rows.length === 1) {
this.modalData.partDesc = data.rows[0].partDesc
this.modalData.printUnit = data.rows[0].printUnit
this.modalData.printUnitName = data.rows[0].printUnitName
if (data.page.list.length === 1) {
this.modalData.partDesc = data.page.list[0].partDesc
this.modalData.printUnit = data.page.list[0].printUnit
this.modalData.printUnitName = data.page[0].printUnitName
} else { } else {
this.modalData.partDesc = '' this.modalData.partDesc = ''
this.modalData.printUnit = '' this.modalData.printUnit = ''
@ -3218,6 +3399,7 @@ export default {
this.operationModelFlag = false this.operationModelFlag = false
}, },
//
getComponentRowData (row) { getComponentRowData (row) {
this.componentData.componentPart = row.partNo this.componentData.componentPart = row.partNo
this.componentData.componentPartDesc = row.partDesc this.componentData.componentPartDesc = row.partDesc
@ -3226,15 +3408,33 @@ export default {
this.componentPartModelFlag = false this.componentPartModelFlag = false
}, },
// copy
getCopyRowData (row) {
if (this.copyPartData.type === '1') {
this.copyBomData.partNo = row.partNo
this.copyBomData.partDesc = row.partDesc
this.copyBomTypeChange()
} else {
this.copyAlternativeData.partNo = row.partNo
this.copyAlternativeData.partDesc = row.partDesc
}
this.copyPartModelFlag = false
},
/** /**
* 物料列表
* 物料列表
*/ */
queryComponentPartModal () { queryComponentPartModal () {
this.componentPartData.limit = this.pageSize3
this.componentPartData.page = this.pageIndex3
this.componentPartData.status = 'Y' this.componentPartData.status = 'Y'
// //
queryPartList(this.componentPartData).then(({data}) => { queryPartList(this.componentPartData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.componentPartList = data.rows
this.componentPartList = data.page.list
this.pageIndex3 = data.page.currPage
this.pageSize3 = data.page.pageSize
this.totalPage3 = data.page.totalCount
this.componentPartModelFlag = true this.componentPartModelFlag = true
} else { } else {
this.$alert(data.msg, '错误', { this.$alert(data.msg, '错误', {
@ -3244,30 +3444,78 @@ export default {
}) })
}, },
/**
* copy物料列表
*/
queryCopyPartModal () {
this.copyPartData.limit = this.pageSize4
this.copyPartData.page = this.pageIndex4
//
queryPartList(this.copyPartData).then(({data}) => {
if (data && data.code === 0) {
this.copyPartList = data.page.list
this.pageIndex4 = data.page.currPage
this.pageSize4 = data.page.pageSize
this.totalPage4 = data.page.totalCount
this.copyPartModelFlag = true
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
/** /**
* 物料列表 * 物料列表
*/ */
queryComponentPartList () { queryComponentPartList () {
this.componentPartData.limit = this.pageSize3
this.componentPartData.page = this.pageIndex3
// //
queryPartList(this.componentPartData).then(({data}) => { queryPartList(this.componentPartData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.componentPartList = data.rows
this.componentPartList = data.page.list
this.pageIndex3 = data.page.currPage
this.pageSize3 = data.page.pageSize
this.totalPage3 = data.page.totalCount
} else { } else {
this.componentPartList = [] this.componentPartList = []
} }
}) })
}, },
/**
* copy物料查询列表
*/
queryCopyPartList () {
this.copyPartData.limit = this.pageSize4
this.copyPartData.page = this.pageIndex4
//
queryPartList(this.copyPartData).then(({data}) => {
if (data && data.code === 0) {
this.copyPartList = data.page.list
this.pageIndex4 = data.page.currPage
this.pageSize4 = data.page.pageSize
this.totalPage4 = data.page.totalCount
} else {
this.copyPartList = []
}
})
},
// //
componentPartBlur () { componentPartBlur () {
if (this.componentData.componentPart != null && this.componentData.componentPart !== '') { if (this.componentData.componentPart != null && this.componentData.componentPart !== '') {
this.componentPartData.limit = this.pageSize3
this.componentPartData.page = this.pageIndex3
this.componentPartData.partNo = this.componentData.componentPart this.componentPartData.partNo = this.componentData.componentPart
queryPartList(this.componentPartData).then(({data}) => { queryPartList(this.componentPartData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
if (data.rows.length === 1) { if (data.rows.length === 1) {
this.componentData.componentPartDesc = data.rows[0].partDesc
this.componentData.printUnit = data.rows[0].printUnit
this.componentData.printUnitName = data.rows[0].printUnitName
this.componentData.componentPartDesc = data.page.list[0].partDesc
this.componentData.printUnit = data.page.list[0].printUnit
this.componentData.printUnitName = data.page.list[0].printUnitName
} else { } else {
this.$message.warning('该子物料不存在!') this.$message.warning('该子物料不存在!')
this.componentData.componentPartDesc = '' this.componentData.componentPartDesc = ''
@ -3279,6 +3527,55 @@ export default {
} }
}, },
// copy
copyPartBlur () {
if (this.copyPartData.type === '1') {
if (this.copyBomData.partNo != null && this.copyBomData.partNo !== '') {
this.copyPartData.limit = this.pageSize4
this.copyPartData.page = this.pageIndex4
this.copyPartData.partNo = this.copyBomData.partNo
queryPartList(this.copyPartData).then(({data}) => {
if (data && data.code === 0) {
if (data.page.list.length === 1) {
this.copyBomData.partDesc = data.page.list[0].partDesc
} else {
this.$message.warning('该物料不存在!')
this.copyBomData.partDesc = ''
}
}
})
}
} else {
if (this.copyAlternativeData.partNo != null && this.copyAlternativeData.partNo !== '') {
this.copyPartData.limit = this.pageSize4
this.copyPartData.page = this.pageIndex4
this.copyPartData.partNo = this.copyAlternativeData.partNo
queryPartList(this.copyPartData).then(({data}) => {
if (data && data.code === 0) {
if (data.page.list.length === 1) {
this.copyAlternativeData.partDesc = data.page.list[0].partDesc
} else {
this.$message.warning('该物料不存在!')
this.copyAlternativeData.partDesc = ''
}
}
})
}
}
},
// copy BOM
copyBomTypeChange () {
// bom
getBomEngChgLevel(this.copyBomData).then(({data}) => {
if (data && data.code === 0) {
this.copyBomData.engChgLevel = data.engChgLevel
} else {
this.copyBomData.engChgLevel = ''
}
})
},
/** /**
* 表格的新增 * 表格的新增
* @param row * @param row
@ -3608,6 +3905,7 @@ export default {
this.copyBomData = { this.copyBomData = {
site: this.modalData.site, site: this.modalData.site,
partNo: this.modalData.partNo, partNo: this.modalData.partNo,
partDesc: this.modalData.partDesc,
engChgLevel: this.modalData.engChgLevel + 1, engChgLevel: this.modalData.engChgLevel + 1,
bomType: this.modalData.bomType, bomType: this.modalData.bomType,
effPhaseInDate: this.dayjs(new Date()).format('YYYY-MM-DD'), effPhaseInDate: this.dayjs(new Date()).format('YYYY-MM-DD'),
@ -3616,6 +3914,14 @@ export default {
createBy: this.$store.state.user.name, createBy: this.$store.state.user.name,
officialFlag: 'N' officialFlag: 'N'
} }
this.copyPartData = {
type: '1',
site: this.$store.state.user.site,
partNo: '',
partDesc: '',
page: 1,
limit: 10
}
this.copyBomModelFlag = true this.copyBomModelFlag = true
}, },
/** /**
@ -3634,12 +3940,17 @@ export default {
this.$message.warning('请选择制造类型!') this.$message.warning('请选择制造类型!')
return return
} }
if (this.copyBomData.effPhaseOutDate != null && this.copyBomData.effPhaseOutDate !== '' && this.copyBomData.effPhaseOutDate < this.copyBomData.effPhaseInDate) {
this.$message.warning('失效日期必须大于生效日期!')
return
}
this.copyBomData.previousVersion = this.modalData this.copyBomData.previousVersion = this.modalData
this.copyLoading = true
// //
copyBom(this.copyBomData).then(({data}) => { copyBom(this.copyBomData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.modalData.effPhaseOutDate = data.rows.effPhaseOutDate
this.copyBomModelFlag = false this.copyBomModelFlag = false
this.updateModal(data.rows)
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',
@ -3651,6 +3962,9 @@ export default {
confirmButtonText: '确定' confirmButtonText: '确定'
}) })
} }
this.copyLoading = false
}).catch(()=>{
this.copyLoading = false
}) })
}, },
/** /**
@ -3660,6 +3974,7 @@ export default {
this.copyAlternativeData = { this.copyAlternativeData = {
site: this.detailData.site, site: this.detailData.site,
partNo: this.detailData.partNo, partNo: this.detailData.partNo,
partDesc: this.modalData.partDesc,
engChgLevel: this.detailData.engChgLevel, engChgLevel: this.detailData.engChgLevel,
bomType: this.detailData.bomType, bomType: this.detailData.bomType,
alternativeNo: this.detailData.alternativeNo, alternativeNo: this.detailData.alternativeNo,
@ -3672,6 +3987,14 @@ export default {
previousVersion: {}, previousVersion: {},
createBy: this.$store.state.user.name createBy: this.$store.state.user.name
} }
this.copyPartData = {
type: '2',
site: this.$store.state.user.site,
partNo: '',
partDesc: '',
page: 1,
limit: 10
}
this.copyAlternativeModelFlag = true this.copyAlternativeModelFlag = true
}, },
@ -3700,10 +4023,11 @@ export default {
return return
} }
this.copyAlternativeData.previousVersion = this.detailData this.copyAlternativeData.previousVersion = this.detailData
this.copyLoading = true
copyAlternative(this.copyAlternativeData).then(({data}) => { copyAlternative(this.copyAlternativeData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.detailDataList = data.rows.detailDataList
this.copyAlternativeModelFlag = false this.copyAlternativeModelFlag = false
this.updateModal(data.rows)
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',
@ -3715,6 +4039,9 @@ export default {
confirmButtonText: '确定' confirmButtonText: '确定'
}) })
} }
this.copyLoading = false
}).catch(()=>{
this.copyLoading = false
}) })
}, },

58
src/views/modules/part/partInformation.vue

@ -94,7 +94,7 @@
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="toMenu('BOM',scope.row)">BOM</el-dropdown-item> <el-dropdown-item @click.native="toMenu('BOM',scope.row)">BOM</el-dropdown-item>
<el-dropdown-item @click.native="toMenu('Routing',scope.row)">Routing</el-dropdown-item> <el-dropdown-item @click.native="toMenu('Routing',scope.row)">Routing</el-dropdown-item>
<el-dropdown-item v-if="scope.row.status !== 'Y'" @click.native="toBecomeOfficialPartModal(scope.row)">转正式物料</el-dropdown-item>
<el-dropdown-item v-if="scope.row.status !== 'Y' && (scope.row.ifsPartNo == null || scope.row.ifsPartNo === '')" @click.native="toBecomeOfficialPartModal(scope.row)">转正式物料</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</template> </template>
@ -116,22 +116,22 @@
<!-- 物料新增/编辑模态框 --> <!-- 物料新增/编辑模态框 -->
<el-dialog :title="modalData.title" top="10vh" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="1000px"> <el-dialog :title="modalData.title" top="10vh" :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;" v-loading="toBecomeOfficialLoading" element-loading-text="拼命加载中">
<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-form-item label="物料编码" prop="partNo" :rules="rules.partNo">
<el-input v-model="modalData.partNo" style="width: 128px" @blur="queryMasterField"></el-input> <el-input v-model="modalData.partNo" style="width: 128px" @blur="queryMasterField"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="物料描述" prop="partDesc" :rules="rules.partDesc" style="margin-left: -10px"> <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-input v-model="modalData.partDesc" clearable style="width: 330px"></el-input>
</el-form-item> </el-form-item>
<el-form-item v-if="modalData.flag === '1'" :label="' '">
<el-button type="primary" @click="nextPartNo">Next Part No</el-button>
</el-form-item>
<el-form-item v-if="modalData.flag === '2'" :label="' '"> <el-form-item v-if="modalData.flag === '2'" :label="' '">
<el-button type="primary" @click="toCopyPartModal">Copy</el-button> <el-button type="primary" @click="toCopyPartModal">Copy</el-button>
</el-form-item> </el-form-item>
<el-form-item v-if="modalData.flag === '3'" label="IFS物料编码" prop="ifsPartNo" :rules="[{required: true,message: ' ',trigger: ['blur','change']}]" style="margin-left: -10px"> <el-form-item v-if="modalData.flag === '3'" label="IFS物料编码" prop="ifsPartNo" :rules="[{required: true,message: ' ',trigger: ['blur','change']}]" style="margin-left: -10px">
<el-input v-model="modalData.ifsPartNo" clearable style="width: 330px"></el-input> <el-input v-model="modalData.ifsPartNo" clearable style="width: 330px"></el-input>
</el-form-item> </el-form-item>
<el-form-item v-if="modalData.flag === '3'" :label="' '">
<el-button type="primary" @click="nextPartNo">Next Part No</el-button>
</el-form-item>
<!-- <el-form-item v-if="modalDisableFlag && modalData.status !== 'Y'" :label="' '">--> <!-- <el-form-item v-if="modalDisableFlag && modalData.status !== 'Y'" :label="' '">-->
<!-- <el-button type="primary" @click="toBecomeOfficialPart">转正式物料</el-button>--> <!-- <el-button type="primary" @click="toBecomeOfficialPart">转正式物料</el-button>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
@ -571,9 +571,9 @@
</el-container> </el-container>
</el-form> </el-form>
<el-footer style="height:35px;margin-top: 20px;text-align:center"> <el-footer style="height:35px;margin-top: 20px;text-align:center">
<el-button v-if="modalData.flag === '3'" type="primary" @click="saveData" :loading="toBecomeOfficialLoading">同步</el-button>
<el-button v-else type="primary" @click="saveData">保存</el-button>
<el-button type="primary" @click="modalFlag = false" :loading="toBecomeOfficialLoading">关闭</el-button>
<el-button v-if="modalData.flag === '3'" type="primary" :loading="saveLoading" @click="saveData">同步</el-button>
<el-button v-else type="primary" :loading="saveLoading" @click="saveData">保存</el-button>
<el-button type="primary" @click="modalFlag = false" :loading="saveLoading">关闭</el-button>
</el-footer> </el-footer>
</el-dialog> </el-dialog>
@ -1518,7 +1518,7 @@
}, },
// //
loading: false, loading: false,
toBecomeOfficialLoading: false,
saveLoading: false,
// //
activeTable: 'part_item', activeTable: 'part_item',
inventoryPartTable: 'General', inventoryPartTable: 'General',
@ -2034,6 +2034,22 @@
fixed: '', fixed: '',
columnWidth: 120 columnWidth: 120
}, },
{
userId: this.$store.state.user.name,
functionId: 104001,
serialNumber: '104001Table1IfsPartNo',
tableId: '104001Table1',
tableName: '物料信息表',
columnProp: 'ifsPartNo',
headerAlign: 'center',
align: 'center',
columnLabel: 'IFS料号',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
columnWidth: 120
},
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 104001, functionId: 104001,
@ -3136,7 +3152,7 @@
this.$message.warning('请填写版本号(Revision)!') this.$message.warning('请填写版本号(Revision)!')
return return
} }
if (this.revisionData.engRevision === '' || this.revisionData.engRevision == null) {
if (this.revisionData.flag === '2' && (this.revisionData.engRevision === '' || this.revisionData.engRevision == null)) {
this.$message.warning('请填写工程版本号(Eng Rev)!') this.$message.warning('请填写工程版本号(Eng Rev)!')
return return
} }
@ -3144,10 +3160,14 @@
this.$message.warning('请选择生效日期(Phase In)!') this.$message.warning('请选择生效日期(Phase In)!')
return return
} }
if (this.revisionData.effPhaseOutDate === '' || this.revisionData.effPhaseOutDate == null) {
if (this.revisionData.flag === '2' && (this.revisionData.effPhaseOutDate === '' || this.revisionData.effPhaseOutDate == null)) {
this.$message.warning('请选择失效日期(Phase Out)!') this.$message.warning('请选择失效日期(Phase Out)!')
return return
} }
if (this.revisionData.flag === '2' && (this.revisionData.effPhaseOutDate < this.revisionData.effPhaseInDate)) {
this.$message.warning('失效日期不能早于生效日期!')
return
}
if (this.revisionData.flag === '1') { if (this.revisionData.flag === '1') {
saveRevision(this.revisionData).then(({data}) => { saveRevision(this.revisionData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
@ -4484,6 +4504,7 @@
return return
} }
if (this.modalData.flag === '1') { if (this.modalData.flag === '1') {
this.saveLoading = true
partInformationSave(this.modalData).then(({data}) => { partInformationSave(this.modalData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.getDataList() this.getDataList()
@ -4499,6 +4520,9 @@
confirmButtonText: '确定' confirmButtonText: '确定'
}) })
} }
this.saveLoading = false
}).catch(()=>{
this.saveLoading = false
}) })
} else if (this.modalData.flag === '3') { // } else if (this.modalData.flag === '3') { //
if (this.modalData.ifsPartNo === '' || this.modalData.ifsPartNo == null) { if (this.modalData.ifsPartNo === '' || this.modalData.ifsPartNo == null) {
@ -4509,7 +4533,7 @@
this.$message.warning('IFS物料编码不能等于PLM物料编码!') this.$message.warning('IFS物料编码不能等于PLM物料编码!')
return return
} }
this.toBecomeOfficialLoading = true
this.saveLoading = true
this.modalData.bomAlternativeList = this.bomAlternativeSelections this.modalData.bomAlternativeList = this.bomAlternativeSelections
this.modalData.routingAlternativeList = this.routingAlternativeSelections this.modalData.routingAlternativeList = this.routingAlternativeSelections
partInformationToOfficial(this.modalData).then(({data}) => { partInformationToOfficial(this.modalData).then(({data}) => {
@ -4527,11 +4551,12 @@
confirmButtonText: '确定' confirmButtonText: '确定'
}) })
} }
this.toBecomeOfficialLoading = false
this.saveLoading = false
}).catch(()=>{ }).catch(()=>{
this.toBecomeOfficialLoading = false
this.saveLoading = false
}) })
} else { } else {
this.saveLoading = true
partInformationEdit(this.modalData).then(({data}) => { partInformationEdit(this.modalData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.getDataList() this.getDataList()
@ -4547,6 +4572,9 @@
confirmButtonText: '确定' confirmButtonText: '确定'
}) })
} }
this.saveLoading = false
}).catch(()=>{
this.saveLoading = false
}) })
} }
}, },
@ -5067,7 +5095,7 @@
// //
nextPartNo () { nextPartNo () {
if (this.modalData.partNo.length !== 3) {
if (this.modalData.ifsPartNo.length !== 3) {
this.$message.warning('Part No的前缀必须是3位!') this.$message.warning('Part No的前缀必须是3位!')
return return
} }

499
src/views/modules/part/routingManagement.vue

@ -9,7 +9,11 @@
<el-input v-model="searchData.partDesc" clearable style="width: 120px"></el-input> <el-input v-model="searchData.partDesc" clearable style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="'工艺类型'"> <el-form-item :label="'工艺类型'">
<el-input v-model="searchData.routingType" clearable style="width: 120px"></el-input>
<el-select v-model="searchData.routingType" clearable style="width: 120px">
<el-option label="Manufacturing" value="Manufacturing"></el-option>
<el-option label="Repair" value="Repair"></el-option>
<el-option label="Prototype" value="Prototype"></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item :label="'Routing版本号'"> <el-form-item :label="'Routing版本号'">
<el-input v-model="searchData.routingRevision" clearable style="width: 120px"></el-input> <el-input v-model="searchData.routingRevision" clearable style="width: 120px"></el-input>
@ -158,7 +162,7 @@
<el-button v-if="modalData.flag === '2'" type="primary" @click="copyRoutingAlternative">Copy</el-button> <el-button v-if="modalData.flag === '2'" type="primary" @click="copyRoutingAlternative">Copy</el-button>
<el-button v-if="detailData.status === 'Tentative' || detailData.status === 'Obsolete'" type="primary" @click="updateStatusToBuildable">Build</el-button> <el-button v-if="detailData.status === 'Tentative' || detailData.status === 'Obsolete'" type="primary" @click="updateStatusToBuildable">Build</el-button>
<el-button v-if="detailData.status === 'Buildable' && (modalData.effPhaseOutDate == null || modalData.effPhaseOutDate === '')" type="primary" @click="updateStatusToObsolete">Retire</el-button> <el-button v-if="detailData.status === 'Buildable' && (modalData.effPhaseOutDate == null || modalData.effPhaseOutDate === '')" type="primary" @click="updateStatusToObsolete">Retire</el-button>
<el-button v-if="modalData.flag === '2' && detailData.officialFlag !== 'Y'" type="primary" @click="toBecomeOfficialRouting" :loading="toBecomeOfficialLoading">转正式Routing</el-button>
<el-button v-if="modalData.flag === '2' && detailData.officialFlag !== 'Y' && (modalData.ifsPartNo == null || modalData.ifsPartNo === '')" type="primary" @click="toBecomeOfficialRouting" :loading="toBecomeOfficialLoading">转正式Routing</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-position="top" :model="detailData" :rules="rules" style="margin-left: 7px"> <el-form :inline="true" label-position="top" :model="detailData" :rules="rules" style="margin-left: 7px">
@ -344,6 +348,16 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页插件 -->
<el-pagination
@size-change="sizeChangeHandle2"
@current-change="currentChangeHandle2"
:current-page="pageIndex2"
:page-sizes="[20, 50, 100, 200, 500]"
:page-size="pageSize2"
:total="totalPage2"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
</div> </div>
<el-footer style="height:40px;margin-top: 20px;text-align:center"> <el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="partModelFlag=false">关闭</el-button> <el-button type="primary" @click="partModelFlag=false">关闭</el-button>
@ -400,7 +414,10 @@
<el-form :inline="true" label-position="top" :model="componentData" :rules="componentRules" style="margin-left: 5px"> <el-form :inline="true" label-position="top" :model="componentData" :rules="componentRules" style="margin-left: 5px">
<el-form-item prop="workCenterNo" :rules="componentRules.workCenterNo"> <el-form-item prop="workCenterNo" :rules="componentRules.workCenterNo">
<span style="cursor: pointer" slot="label" @click="getBaseList(119)"><a herf="#">加工中心编码</a></span> <span style="cursor: pointer" slot="label" @click="getBaseList(119)"><a herf="#">加工中心编码</a></span>
<el-input v-model="componentData.workCenterNo" @blur="workCenterBlur(119)" style="width: 221px"></el-input>
<el-input v-model="componentData.workCenterNo" @blur="workCenterBlur(119)" style="width: 103px"></el-input>
</el-form-item>
<el-form-item label=" ">
<el-input v-model="componentData.workCenterType" readonly style="width: 103px"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="'加工中心名称'"> <el-form-item :label="'加工中心名称'">
<el-input v-model="componentData.workCenterDesc" disabled style="width: 221px"></el-input> <el-input v-model="componentData.workCenterDesc" disabled style="width: 221px"></el-input>
@ -456,7 +473,7 @@
</el-form> </el-form>
<el-form :inline="true" label-position="top" :model="componentData" style="margin-left: 5px"> <el-form :inline="true" label-position="top" :model="componentData" style="margin-left: 5px">
<el-form-item :label="'外协采购料号'"> <el-form-item :label="'外协采购料号'">
<el-input v-model="componentData.outsideOpItem" style="width: 456px"></el-input>
<el-input v-model="componentData.outsideOpItem" :readonly="componentData.workCenterType !== '外部'" style="width: 456px"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-position="top" :model="componentData" style="margin-left: 5px"> <el-form :inline="true" label-position="top" :model="componentData" style="margin-left: 5px">
@ -523,15 +540,18 @@
<legend>Source Revision</legend> <legend>Source Revision</legend>
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="物料编码"> <el-form-item label="物料编码">
<el-input v-model="modalData.partNo" readonly style="width: 185px"></el-input>
<el-input v-model="modalData.partNo" readonly style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="site">
<el-input v-model="modalData.site" disabled style="width: 185px"></el-input>
<el-form-item label="物料名称">
<el-input v-model="modalData.partDesc" readonly style="width: 249px"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="Site">
<el-input v-model="modalData.site" readonly style="width: 85px"></el-input>
</el-form-item>
<el-form-item label="Routing版本号"> <el-form-item label="Routing版本号">
<el-input v-model="modalData.routingRevision" readonly style="width: 185px"></el-input>
<el-input v-model="modalData.routingRevision" readonly style="width: 85px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="工艺类型"> <el-form-item label="工艺类型">
<el-input v-model="modalData.routingType" readonly style="width: 185px"></el-input> <el-input v-model="modalData.routingType" readonly style="width: 185px"></el-input>
@ -570,19 +590,23 @@
<fieldset style="width: 426px"> <fieldset style="width: 426px">
<legend>Destination Revision</legend> <legend>Destination Revision</legend>
<el-form :inline="true" label-position="top" :model="copyRoutingData" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" :model="copyRoutingData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="物料编码">
<el-input v-model="copyRoutingData.partNo" style="width: 185px"></el-input>
<el-form-item>
<span slot="label" @click="queryCopyPartModal"><a herf="#">物料编码</a></span>
<el-input v-model="copyRoutingData.partNo" @change="copyRoutingTypeChange" @blur="copyPartBlur" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="site">
<el-input v-model="copyRoutingData.site" disabled style="width: 185px"></el-input>
<el-form-item :label="'物料名称'">
<el-input v-model="copyRoutingData.partDesc" disabled style="width: 249px"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-position="top" :model="copyRoutingData" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" :model="copyRoutingData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="Site">
<el-input v-model="copyRoutingData.site" disabled style="width: 85px"></el-input>
</el-form-item>
<el-form-item label="Routing版本号"> <el-form-item label="Routing版本号">
<el-input v-model="copyRoutingData.routingRevision" style="width: 185px"></el-input>
<el-input v-model="copyRoutingData.routingRevision" style="width: 85px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="工艺类型"> <el-form-item label="工艺类型">
<el-select v-model="copyRoutingData.routingType" style="width: 185px">
<el-select v-model="copyRoutingData.routingType" @change="copyRoutingTypeChange" style="width: 185px">
<el-option label="Manufacturing" value="Manufacturing"></el-option> <el-option label="Manufacturing" value="Manufacturing"></el-option>
<el-option label="Repair" value="Repair"></el-option> <el-option label="Repair" value="Repair"></el-option>
<el-option label="Prototype" value="Prototype"></el-option> <el-option label="Prototype" value="Prototype"></el-option>
@ -599,7 +623,7 @@
</el-form> </el-form>
</fieldset> </fieldset>
<el-footer style="height:40px;margin-top: 10px;text-align:center"> <el-footer style="height:40px;margin-top: 10px;text-align:center">
<el-button type="primary" @click="copyRouting">保存</el-button>
<el-button type="primary" :loading="copyLoading" @click="copyRouting">保存</el-button>
<el-button type="primary" @click="copyRoutingModelFlag = false">关闭</el-button> <el-button type="primary" @click="copyRoutingModelFlag = false">关闭</el-button>
</el-footer> </el-footer>
</el-dialog> </el-dialog>
@ -610,15 +634,18 @@
<legend>Source Revision</legend> <legend>Source Revision</legend>
<el-form :inline="true" label-position="top" :model="detailData" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" :model="detailData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="物料编码"> <el-form-item label="物料编码">
<el-input v-model="detailData.partNo" readonly style="width: 185px"></el-input>
<el-input v-model="detailData.partNo" readonly style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="site">
<el-input v-model="detailData.site" disabled style="width: 185px"></el-input>
<el-form-item label="物料名称">
<el-input v-model="modalData.partDesc" readonly style="width: 249px"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-position="top" :model="detailData" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" :model="detailData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="Site">
<el-input v-model="detailData.site" readonly style="width: 85px"></el-input>
</el-form-item>
<el-form-item label="Routing版本号"> <el-form-item label="Routing版本号">
<el-input v-model="detailData.routingRevision" readonly style="width: 185px"></el-input>
<el-input v-model="detailData.routingRevision" readonly style="width: 85px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="工艺类型"> <el-form-item label="工艺类型">
<el-input v-model="detailData.routingType" readonly style="width: 185px"></el-input> <el-input v-model="detailData.routingType" readonly style="width: 185px"></el-input>
@ -636,16 +663,20 @@
<fieldset style="width: 426px"> <fieldset style="width: 426px">
<legend>Destination Revision</legend> <legend>Destination Revision</legend>
<el-form :inline="true" label-position="top" :model="copyAlternativeData" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" :model="copyAlternativeData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="物料编码">
<el-input v-model="copyAlternativeData.partNo" style="width: 185px"></el-input>
<el-form-item>
<span slot="label" @click="queryCopyPartModal"><a herf="#">物料编码</a></span>
<el-input v-model="copyAlternativeData.partNo" @blur="copyPartBlur" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="site">
<el-input v-model="copyAlternativeData.site" disabled style="width: 185px"></el-input>
<el-form-item :label="'物料名称'">
<el-input v-model="copyAlternativeData.partDesc" disabled style="width: 249px"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-position="top" :model="copyAlternativeData" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" :model="copyAlternativeData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="Site">
<el-input v-model="copyAlternativeData.site" disabled style="width: 85px"></el-input>
</el-form-item>
<el-form-item label="Routing版本号"> <el-form-item label="Routing版本号">
<el-input v-model="copyAlternativeData.routingRevision" style="width: 185px"></el-input>
<el-input v-model="copyAlternativeData.routingRevision" style="width: 85px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="工艺类型"> <el-form-item label="工艺类型">
<el-select v-model="copyAlternativeData.routingType" style="width: 185px"> <el-select v-model="copyAlternativeData.routingType" style="width: 185px">
@ -665,7 +696,7 @@
</el-form> </el-form>
</fieldset> </fieldset>
<el-footer style="height:40px;margin-top: 10px;text-align:center"> <el-footer style="height:40px;margin-top: 10px;text-align:center">
<el-button type="primary" @click="copyAlternative">保存</el-button>
<el-button type="primary" :loading="copyLoading" @click="copyAlternative">保存</el-button>
<el-button type="primary" @click="copyAlternativeModelFlag = false">关闭</el-button> <el-button type="primary" @click="copyAlternativeModelFlag = false">关闭</el-button>
</el-footer> </el-footer>
</el-dialog> </el-dialog>
@ -794,6 +825,56 @@
</el-footer> </el-footer>
</el-dialog> </el-dialog>
<!-- copy物料模态框 -->
<el-dialog title="物料清单" top="17vh" :close-on-click-modal="false" v-drag :visible.sync="copyPartModelFlag" width="700px">
<el-form :inline="true" label-position="top" :model="copyPartData">
<el-form-item :label="'物料编码'">
<el-input v-model="copyPartData.partNo" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'物料名称'">
<el-input v-model="copyPartData.partDesc" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="' '">
<el-button type="primary" @click="queryCopyPartList">查询</el-button>
</el-form-item>
</el-form>
<el-table
:height="250"
:data="copyPartList"
@row-dblclick="getCopyRowData"
border
style="width: 100%;">
<el-table-column
v-for="(item,index) in componentPartColumnList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
<!-- 分页插件 -->
<el-pagination
@size-change="sizeChangeHandle4"
@current-change="currentChangeHandle4"
:current-page="pageIndex4"
:page-sizes="[20, 50, 100, 200, 500]"
:page-size="pageSize4"
:total="totalPage4"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<el-footer style="height:35px;margin-top:10px;text-align:center">
<el-button type="primary" @click="copyPartModelFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<!-- chooseList模态框 --> <!-- chooseList模态框 -->
<ChooseList ref="baseList" @getBaseData="getBaseData"></ChooseList> <ChooseList ref="baseList" @getBaseData="getBaseData"></ChooseList>
</div> </div>
@ -813,6 +894,7 @@ import {
updateAlternativeStatus, // updateAlternativeStatus, //
routingDetailDelete, // routing routingDetailDelete, // routing
queryPartList, // queryPartList, //
queryPartListRouting, // Routing
queryRoutingComponent, // routing queryRoutingComponent, // routing
saveRoutingComponent, // routing saveRoutingComponent, // routing
updateRoutingComponent, // routing updateRoutingComponent, // routing
@ -908,6 +990,12 @@ export default {
pageIndex: 1, pageIndex: 1,
pageSize: 50, pageSize: 50,
totalPage: 0, totalPage: 0,
pageIndex2: 1,
pageSize2: 20,
totalPage2: 0,
pageIndex4: 1,
pageSize4: 20,
totalPage4: 0,
selectedDataNum: 0, selectedDataNum: 0,
// //
searchData: { searchData: {
@ -925,6 +1013,7 @@ export default {
saveDetailLoading: false, saveDetailLoading: false,
saveAllLoading: false, saveAllLoading: false,
toBecomeOfficialLoading: false, toBecomeOfficialLoading: false,
copyLoading: false,
// //
detailTable: 'routing_detail', detailTable: 'routing_detail',
subDetailTable: 'routing_sub_detail', subDetailTable: 'routing_sub_detail',
@ -994,6 +1083,7 @@ export default {
machineNo: '', machineNo: '',
workCenterNo: '', workCenterNo: '',
workCenterDesc: '', workCenterDesc: '',
workCenterType: '',
laborClassNo: '', laborClassNo: '',
laborClassDesc: '', laborClassDesc: '',
setupLaborClassNo: '', setupLaborClassNo: '',
@ -1011,6 +1101,8 @@ export default {
site: this.$store.state.user.site, site: this.$store.state.user.site,
partNo: '', partNo: '',
partDesc: '', partDesc: '',
page: 1,
limit: 10
}, },
operationData: { operationData: {
site: this.$store.state.user.site, site: this.$store.state.user.site,
@ -1070,6 +1162,7 @@ export default {
copyRoutingData: { copyRoutingData: {
site: '', site: '',
partNo: '', partNo: '',
partDesc: '',
routingRevision: '', routingRevision: '',
routingType: '', routingType: '',
phaseInDate: '', phaseInDate: '',
@ -1080,6 +1173,7 @@ export default {
copyAlternativeData: { copyAlternativeData: {
site: '', site: '',
partNo: '', partNo: '',
partDesc: '',
routingRevision: '', routingRevision: '',
routingType: '', routingType: '',
alternativeNo: '', alternativeNo: '',
@ -1134,6 +1228,14 @@ export default {
ifsRowId: '', ifsRowId: '',
ifsRowVersion: '' ifsRowVersion: ''
}, },
copyPartData: {
type: '',
site: this.$store.state.user.site,
partNo: '',
partDesc: '',
page: 1,
limit: 10
},
// ======== ======== // ======== ========
dataList: [], dataList: [],
partList: [], partList: [],
@ -1146,6 +1248,7 @@ export default {
routingToolList: [], routingToolList: [],
alternativeList: [], alternativeList: [],
workGuidelineList: [], workGuidelineList: [],
copyPartList: [],
// ======== ======== // ======== ========
columnList: [ columnList: [
{ {
@ -1398,7 +1501,7 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 60
columnWidth: 100
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -1416,7 +1519,7 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 100
columnWidth: 150
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -1434,7 +1537,7 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 60
columnWidth: 100
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -1452,7 +1555,7 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 85
columnWidth: 100
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -1470,7 +1573,7 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 85
columnWidth: 100
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -1488,7 +1591,7 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 80
columnWidth: 100
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -1506,7 +1609,7 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 85
columnWidth: 100
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -1524,7 +1627,7 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 85
columnWidth: 100
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -1542,7 +1645,7 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 85
columnWidth: 100
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -1560,7 +1663,7 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 85
columnWidth: 100
}, },
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
@ -1578,6 +1681,24 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 104003,
serialNumber: '104003Table2WorkCenterNo',
tableId: '104003Table2',
tableName: 'Routing工序表',
columnProp: 'workCenterNo',
headerAlign: 'center',
align: 'center',
columnLabel: '加工中心编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100 columnWidth: 100
}, },
{ {
@ -1588,8 +1709,26 @@ export default {
tableName: 'Routing工序表', tableName: 'Routing工序表',
columnProp: 'workCenterDesc', columnProp: 'workCenterDesc',
headerAlign: 'center', headerAlign: 'center',
align: 'left',
columnLabel: '加工中心名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 200
},
{
userId: this.$store.state.user.name,
functionId: 104003,
serialNumber: '104003Table2WorkCenterType',
tableId: '104003Table2',
tableName: 'Routing工序表',
columnProp: 'workCenterType',
headerAlign: 'center',
align: 'center', align: 'center',
columnLabel: '加工中心',
columnLabel: '加工中心类型',
columnHidden: false, columnHidden: false,
columnImage: false, columnImage: false,
columnSortable: false, columnSortable: false,
@ -1650,7 +1789,7 @@ export default {
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 120
columnWidth: 200
}, },
], ],
columnRoutingToolList: [ columnRoutingToolList: [
@ -2019,6 +2158,68 @@ export default {
columnWidth: 80 columnWidth: 80
} }
], ],
componentPartColumnList: [
{
columnProp: 'partNo',
headerAlign: "center",
align: "center",
columnLabel: '物料编码',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
},
{
columnProp: 'partDesc',
headerAlign: "center",
align: "left",
columnLabel: '物料名称',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
},
{
columnProp: 'familyName',
headerAlign: "center",
align: "center",
columnLabel: '物料分类',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
},
{
columnProp: 'printUnit',
headerAlign: "center",
align: "center",
columnLabel: '计量单位',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
},
{
columnProp: 'spec',
headerAlign: "center",
align: "center",
columnLabel: '规格型号',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
},
{
columnProp: 'partType',
headerAlign: "center",
align: "center",
columnLabel: '零件类型',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
}
],
// ======== ======== // ======== ========
rules: { rules: {
partNo: [ partNo: [
@ -2266,7 +2467,8 @@ export default {
queryWorkGuidelineModal: false, queryWorkGuidelineModal: false,
saveWorkGuidelineModal: false, saveWorkGuidelineModal: false,
workGuidelineDisableModal: false, workGuidelineDisableModal: false,
headerSaveFlag: false
headerSaveFlag: false,
copyPartModelFlag: false,
} }
}, },
@ -2332,6 +2534,148 @@ export default {
this.getDataList() this.getDataList()
}, },
/**
* 每页数
* @param val
*/
sizeChangeHandle2 (val) {
this.pageSize2 = val
this.pageIndex2 = 1
this.queryPartList()
},
/**
* 当前页
* @param val
*/
currentChangeHandle2 (val) {
this.pageIndex2 = val
this.queryPartList()
},
/**
* 每页数
* @param val
*/
sizeChangeHandle4 (val) {
this.pageSize4 = val
this.pageIndex4 = 1
this.queryCopyPartModal()
},
/**
* 当前页
* @param val
*/
currentChangeHandle4 (val) {
this.pageIndex4 = val
this.queryCopyPartModal()
},
/**
* copy物料列表
*/
queryCopyPartModal () {
this.copyPartData.limit = this.pageSize4
this.copyPartData.page = this.pageIndex4
//
queryPartList(this.copyPartData).then(({data}) => {
if (data && data.code === 0) {
this.copyPartList = data.page.list
this.pageIndex4 = data.page.currPage
this.pageSize4 = data.page.pageSize
this.totalPage4 = data.page.totalCount
this.copyPartModelFlag = true
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
/**
* copy物料查询列表
*/
queryCopyPartList () {
this.copyPartData.limit = this.pageSize4
this.copyPartData.page = this.pageIndex4
//
queryPartList(this.copyPartData).then(({data}) => {
if (data && data.code === 0) {
this.copyPartList = data.page.list
this.pageIndex4 = data.page.currPage
this.pageSize4 = data.page.pageSize
this.totalPage4 = data.page.totalCount
} else {
this.copyPartList = []
}
})
},
// copy
copyPartBlur () {
if (this.copyPartData.type === '1') {
if (this.copyRoutingData.partNo != null && this.copyRoutingData.partNo !== '') {
this.copyPartData.limit = this.pageSize4
this.copyPartData.page = this.pageIndex4
this.copyPartData.partNo = this.copyRoutingData.partNo
queryPartList(this.copyPartData).then(({data}) => {
if (data && data.code === 0) {
if (data.page.list.length === 1) {
this.copyRoutingData.partDesc = data.page.list[0].partDesc
} else {
this.$message.warning('该物料不存在!')
this.copyRoutingData.partDesc = ''
}
}
})
}
} else {
if (this.copyAlternativeData.partNo != null && this.copyAlternativeData.partNo !== '') {
this.copyPartData.limit = this.pageSize4
this.copyPartData.page = this.pageIndex4
this.copyPartData.partNo = this.copyAlternativeData.partNo
queryPartList(this.copyPartData).then(({data}) => {
if (data && data.code === 0) {
if (data.page.list.length === 1) {
this.copyAlternativeData.partDesc = data.page.list[0].partDesc
} else {
this.$message.warning('该物料不存在!')
this.copyAlternativeData.partDesc = ''
}
}
})
}
}
},
// copy
getCopyRowData (row) {
if (this.copyPartData.type === '1') {
this.copyRoutingData.partNo = row.partNo
this.copyRoutingData.partDesc = row.partDesc
this.copyRoutingTypeChange()
} else {
this.copyAlternativeData.partNo = row.partNo
this.copyAlternativeData.partDesc = row.partDesc
}
this.copyPartModelFlag = false
},
// copy BOM
copyRoutingTypeChange () {
// routing
getRottingRevision(this.copyRoutingData).then(({data}) => {
if (data && data.code === 0) {
this.copyRoutingData.routingRevision = data.routingRevision
} else {
this.copyRoutingData.routingRevision = ''
}
})
},
// ======== ======== // ======== ========
/** /**
* 明细页签选择替换 * 明细页签选择替换
@ -2383,11 +2727,11 @@ export default {
*/ */
getDataList () { getDataList () {
// //
if(localStorage.getItem('routeData')!=undefined){
let data=JSON.parse(localStorage.getItem('routeData'));
this.searchData.partNo=data.partNo
this.searchData.routingType=data.routingType
this.searchData.routingRevision=data.routingRevision
if (localStorage.getItem('routeData') != undefined) {
let data = JSON.parse(localStorage.getItem('routeData'))
this.searchData.partNo = data.partNo
this.searchData.routingType = data.routingType
this.searchData.routingRevision = data.routingRevision
} }
this.searchData.limit = this.pageSize this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex this.searchData.page = this.pageIndex
@ -2399,16 +2743,14 @@ export default {
this.pageSize = data.page.pageSize this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount this.totalPage = data.page.totalCount
this.$refs.selectDiv.setLengthAll( this.dataList.length) this.$refs.selectDiv.setLengthAll( this.dataList.length)
if(localStorage.getItem('routeData')!=undefined){
if (localStorage.getItem('routeData') != undefined) {
this.updateModal(this.dataList[0]) this.updateModal(this.dataList[0])
} }
} }
this.queryLoading = false this.queryLoading = false
if(localStorage.getItem('routeData')!=undefined){
if (localStorage.getItem('routeData') != undefined) {
this.$nextTick(function () { this.$nextTick(function () {
localStorage.removeItem('routeData');
localStorage.removeItem('routeData')
}) })
} }
}) })
@ -2504,7 +2846,9 @@ export default {
updateBy: this.$store.state.user.name, updateBy: this.$store.state.user.name,
printUnit: row.printUnit, printUnit: row.printUnit,
printUnitName: row.printUnitName, printUnitName: row.printUnitName,
officialFlag: row.officialFlag
officialFlag: row.officialFlag,
alternativeNo: row.alternativeNo,
ifsPartNo: row.ifsPartNo
} }
// routing // routing
queryRoutingDetail(this.modalData).then(({data}) => { queryRoutingDetail(this.modalData).then(({data}) => {
@ -2665,6 +3009,7 @@ export default {
machineNo: '', machineNo: '',
workCenterNo: '', workCenterNo: '',
workCenterDesc: '', workCenterDesc: '',
workCenterType: '',
laborClassNo: '', laborClassNo: '',
laborClassDesc: '', laborClassDesc: '',
setupLaborClassNo: '', setupLaborClassNo: '',
@ -2719,6 +3064,7 @@ export default {
machineNo: row.machineNo, machineNo: row.machineNo,
workCenterNo: row.workCenterNo, workCenterNo: row.workCenterNo,
workCenterDesc: row.workCenterDesc, workCenterDesc: row.workCenterDesc,
workCenterType: row.workCenterType,
laborClassNo: row.laborClassNo, laborClassNo: row.laborClassNo,
laborClassDesc: row.laborClassDesc, laborClassDesc: row.laborClassDesc,
setupLaborClassNo: row.setupLaborClassNo, setupLaborClassNo: row.setupLaborClassNo,
@ -2934,9 +3280,14 @@ export default {
* 查询物料 * 查询物料
*/ */
queryPartList () { queryPartList () {
queryPartList(this.partData).then(({data}) => {
this.partData.limit = this.pageSize2
this.partData.page = this.pageIndex2
queryPartListRouting(this.partData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.partList = data.rows
this.partList = data.page.list
this.pageIndex2 = data.page.currPage
this.pageSize2 = data.page.pageSize
this.totalPage2 = data.page.totalCount
this.partModelFlag = true this.partModelFlag = true
} else { } else {
this.$alert(data.msg, '错误', { this.$alert(data.msg, '错误', {
@ -2948,13 +3299,15 @@ export default {
// //
partNoBlur () { partNoBlur () {
this.partData.limit = this.pageSize2
this.partData.page = this.pageIndex2
this.partData.partNo = this.modalData.partNo this.partData.partNo = this.modalData.partNo
queryPartList(this.partData).then(({data}) => { queryPartList(this.partData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
if (data.rows.length === 1) {
this.modalData.partDesc = data.rows[0].partDesc
this.modalData.printUnit = data.rows[0].printUnit
this.modalData.printUnitName = data.rows[0].printUnitName
if (data.page.list.length === 1) {
this.modalData.partDesc = data.page.list[0].partDesc
this.modalData.printUnit = data.page.list[0].printUnit
this.modalData.printUnitName = data.page.list[0].printUnitName
// routing // routing
getRottingRevision(this.modalData).then(({data}) => { getRottingRevision(this.modalData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
@ -3315,6 +3668,7 @@ export default {
this.copyRoutingData = { this.copyRoutingData = {
site: this.modalData.site, site: this.modalData.site,
partNo: this.modalData.partNo, partNo: this.modalData.partNo,
partDesc: this.modalData.partDesc,
routingRevision: this.modalData.routingRevision + 1, routingRevision: this.modalData.routingRevision + 1,
routingType: this.modalData.routingType, routingType: this.modalData.routingType,
phaseInDate: this.dayjs(new Date()).format('YYYY-MM-DD'), phaseInDate: this.dayjs(new Date()).format('YYYY-MM-DD'),
@ -3323,6 +3677,14 @@ export default {
createBy: this.$store.state.user.name, createBy: this.$store.state.user.name,
officialFlag: 'N' officialFlag: 'N'
} }
this.copyPartData = {
type: '1',
site: this.$store.state.user.site,
partNo: '',
partDesc: '',
page: 1,
limit: 10
}
this.copyRoutingModelFlag = true this.copyRoutingModelFlag = true
}, },
/** /**
@ -3341,12 +3703,17 @@ export default {
this.$message.warning('请选择工艺类型!') this.$message.warning('请选择工艺类型!')
return return
} }
if (this.copyRoutingData.phaseOutDate != null && this.copyRoutingData.phaseOutDate !== '' && this.copyRoutingData.phaseOutDate < this.copyRoutingData.phaseInDate) {
this.$message.warning('失效日期必须大于生效日期!')
return
}
this.copyRoutingData.previousVersion = this.modalData this.copyRoutingData.previousVersion = this.modalData
this.copyLoading = true
// //
copyRouting(this.copyRoutingData).then(({data}) => { copyRouting(this.copyRoutingData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.modalData.phaseOutDate = data.rows.phaseOutDate
this.copyRoutingModelFlag = false this.copyRoutingModelFlag = false
this.updateModal(data.rows)
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',
@ -3358,6 +3725,9 @@ export default {
confirmButtonText: '确定' confirmButtonText: '确定'
}) })
} }
this.copyLoading = false
}).catch(()=>{
this.copyLoading = false
}) })
}, },
/** /**
@ -3367,6 +3737,7 @@ export default {
this.copyAlternativeData = { this.copyAlternativeData = {
site: this.detailData.site, site: this.detailData.site,
partNo: this.detailData.partNo, partNo: this.detailData.partNo,
partDesc: this.modalData.partDesc,
routingRevision: this.detailData.routingRevision, routingRevision: this.detailData.routingRevision,
routingType: this.detailData.routingType, routingType: this.detailData.routingType,
alternativeNo: this.detailData.alternativeNo, alternativeNo: this.detailData.alternativeNo,
@ -3386,6 +3757,14 @@ export default {
previousVersion: {}, previousVersion: {},
createBy: this.$store.state.user.name createBy: this.$store.state.user.name
} }
this.copyPartData = {
type: '2',
site: this.$store.state.user.site,
partNo: '',
partDesc: '',
page: 1,
limit: 10
}
this.copyAlternativeModelFlag = true this.copyAlternativeModelFlag = true
}, },
@ -3623,10 +4002,11 @@ export default {
return return
} }
this.copyAlternativeData.previousVersion = this.detailData this.copyAlternativeData.previousVersion = this.detailData
this.copyLoading = true
copyAlternative(this.copyAlternativeData).then(({data}) => { copyAlternative(this.copyAlternativeData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.detailDataList = data.rows.detailDataList
this.copyAlternativeModelFlag = false this.copyAlternativeModelFlag = false
this.updateModal(data.rows)
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',
@ -3638,6 +4018,9 @@ export default {
confirmButtonText: '确定' confirmButtonText: '确定'
}) })
} }
this.copyLoading = false
}).catch(()=>{
this.copyLoading = false
}) })
}, },
@ -4020,6 +4403,7 @@ export default {
if (this.tagNo === 119) { if (this.tagNo === 119) {
this.componentData.workCenterNo = val.work_center_no this.componentData.workCenterNo = val.work_center_no
this.componentData.workCenterDesc = val.work_center_desc this.componentData.workCenterDesc = val.work_center_desc
this.componentData.workCenterType = val.work_center_type
} }
if (this.tagNo === 122) { if (this.tagNo === 122) {
this.routingToolData.toolId = val.tool_id this.routingToolData.toolId = val.tool_id
@ -4049,6 +4433,7 @@ export default {
if (data.baseListData.length > 0) { if (data.baseListData.length > 0) {
this.componentData.workCenterNo = data.baseListData[0].work_center_no this.componentData.workCenterNo = data.baseListData[0].work_center_no
this.componentData.workCenterDesc = data.baseListData[0].work_center_desc this.componentData.workCenterDesc = data.baseListData[0].work_center_desc
this.componentData.workCenterType = data.baseListData[0].work_center_type
} else { } else {
this.$message.warning('该加工中心不存在!') this.$message.warning('该加工中心不存在!')
this.componentData.workCenterDesc = '' this.componentData.workCenterDesc = ''

14
src/views/modules/tooling/searchToolApply.vue

@ -922,16 +922,22 @@
} }
}) })
}, },
comfirmApply(row){
comfirmApply (row) {
this.$confirm(`确定下达这个申请`, '提示', { this.$confirm(`确定下达这个申请`, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
comfirmProjectToolApply(row).then(({data}) => {
let tempData = {
site: row.site,
userName: this.$store.state.user.name,
applyNo: row.applyNo,
menuId: this.$route.meta.menuId
}
comfirmProjectToolApply(tempData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
row.statusCode='10'
row.status='下达'
row.statusCode = '10'
row.status = '下达'
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',

Loading…
Cancel
Save