Browse Source

2024-03-01 物料,bom,routing修改

master
fengyuan_yang 2 years ago
parent
commit
eae541ad51
  1. 15
      src/api/part/bomManagement.js
  2. 19
      src/api/part/partInformation.js
  3. 14
      src/api/part/routingManagement.js
  4. 358
      src/views/modules/part/bomManagement.vue
  5. 2
      src/views/modules/part/partCatalogInformation.vue
  6. 415
      src/views/modules/part/partInformation.vue
  7. 983
      src/views/modules/part/routingManagement.vue

15
src/api/part/bomManagement.js

@ -133,5 +133,20 @@ export const getBomEngChgLevel = data => createAPI(`/plm/bomManagement/getBomEng
*/
export const getComponentLineSequence = data => createAPI(`/plm/bomManagement/getComponentLineSequence`,'post',data)
/**
* 复制bom
* @param data
* @returns {*}
*/
export const copyBom = data => createAPI(`/plm/bomManagement/copyBom`,'post',data)
/**
* 复制alternative
* @param data
* @returns {*}
*/
export const copyAlternative = data => createAPI(`/plm/bomManagement/copyAlternative`,'post',data)

19
src/api/part/partInformation.js

@ -198,3 +198,22 @@ export const queryPartItem = data => createAPI(`/plm/partInformation/queryPartIt
*/
export const queryMasterField = data => createAPI(`/plm/partInformation/queryMasterField`,'post',data)
/**
* 临时物料转为正式物料
*/
export const toBecomeOfficialPart = data => createAPI(`/plm/partInformation/toBecomeOfficialPart`,'post',data)
/**
* 查询物料的bom版本列表
*/
export const queryPartRevisionList = data => createAPI(`/plm/partInformation/queryPartRevisionList`,'post',data)
/**
* 编辑bom版本
*/
export const updateRevision = data => createAPI(`/plm/partInformation/updateRevision`,'post',data)
/**
* 复制物料
*/
export const copyPart = data => createAPI(`/plm/partInformation/copyPart`,'post',data)

14
src/api/part/routingManagement.js

@ -168,3 +168,17 @@ export const deleteRoutingTool = data => createAPI(`/plm/routingManagement/delet
* @Date 2024/10/21 10:14:35
**/
export const routingAllInfoSearch = data => createAPI(`/plm/routingManagement/routingAllInfoSearch`,'post',data)
/**
* 复制Routing
* @param data
* @returns {*}
*/
export const copyRouting = data => createAPI(`/plm/routingManagement/copyRouting`,'post',data)
/**
* 复制alternative
* @param data
* @returns {*}
*/
export const copyAlternative = data => createAPI(`/plm/routingManagement/copyAlternative`,'post',data)

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

@ -112,8 +112,9 @@
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="开始日期" prop="effPhaseInDate" :rules="rules.effPhaseInDate">
<el-form-item label="生效日期" prop="effPhaseInDate" :rules="rules.effPhaseInDate">
<el-date-picker
:readonly="this.detailData.partNo !== ''"
style="width: 221px"
v-model="modalData.effPhaseInDate"
type="date"
@ -122,8 +123,9 @@
:editable=false>
</el-date-picker>
</el-form-item>
<el-form-item label="结束日期">
<el-form-item label="失效日期">
<el-date-picker
readonly
style="width: 221px"
v-model="modalData.effPhaseOutDate"
type="date"
@ -138,8 +140,9 @@
<el-form-item :label="'工程版本号'">
<el-input v-model="modalData.engRevision" style="width: 221px"></el-input>
</el-form-item>
<el-form-item v-if="!modalDisableFlag">
<el-button :loading="saveHeaderLoading" type="primary" @click="saveBomHeader()" style="margin-top: 23px;width: 120px">保存</el-button>
<el-form-item>
<el-button v-if="modalData.flag === '1'" :loading="saveHeaderLoading" type="primary" @click="saveBomHeader()" style="margin-top: 23px;width: 120px">保存</el-button>
<el-button v-else type="primary" @click="copyBomRevision()" style="margin-top: 23px;width: 120px">Copy</el-button>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
@ -155,8 +158,9 @@
<el-button type="primary" @click="saveBomDetail()" style="margin-left: 7px">新增</el-button>
<el-button type="primary" @click="deleteBomDetail()">删除</el-button>
<el-button type="primary" @click="updateBomDetail()">编辑</el-button>
<el-button v-if="detailData.status === 'Tentative'" type="primary" @click="updateStatusToBuildable()">Buildable</el-button>
<el-button v-if="detailData.status === 'Buildable'" type="primary" @click="updateStatusToObsolete()">Obsolete</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()">Buildable</el-button>
<el-button v-if="detailData.status === 'Buildable' && (modalData.effPhaseOutDate == null || modalData.effPhaseOutDate === '')" type="primary" @click="updateStatusToObsolete()">Obsolete</el-button>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="detailData" :rules="rules" style="margin-left: 7px">
@ -450,6 +454,161 @@
</el-footer>
</el-dialog>
<!-- copyBom -->
<el-dialog title="Copy Structure Revision" :close-on-click-modal="false" v-drag :visible.sync="copyBomModelFlag" width="450px">
<fieldset style="width: 426px">
<legend>Source Revision</legend>
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="物料编码">
<el-input v-model="modalData.partNo" readonly style="width: 185px"></el-input>
</el-form-item>
<el-form-item label="site">
<el-input v-model="modalData.site" disabled style="width: 185px"></el-input>
</el-form-item>
</el-form>
<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>
<el-form-item label="制造类型">
<el-input v-model="modalData.bomType" readonly style="width: 185px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="生效日期">
<el-date-picker style="width: 185px" v-model="modalData.effPhaseInDate" readonly type="date" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
<el-form-item label="失效日期">
<el-date-picker style="width: 185px" v-model="modalData.effPhaseOutDate" readonly type="date" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
</el-form>
<el-table
:data="detailDataList"
height="100px"
border
style="width:100%">
<el-table-column
v-for="(item,index) in columnBomDetailList" :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>
</fieldset>
<fieldset style="width: 426px">
<legend>Destination Revision</legend>
<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>
<el-form-item label="site">
<el-input v-model="copyBomData.site" disabled style="width: 185px"></el-input>
</el-form-item>
</el-form>
<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>
<el-form-item label="制造类型">
<el-select v-model="copyBomData.bomType" style="width: 185px">
<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>
<el-form :inline="true" label-position="top" :model="copyBomData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="生效日期">
<el-date-picker style="width: 185px" v-model="copyBomData.effPhaseInDate" type="date" value-format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker>
</el-form-item>
<el-form-item label="失效日期">
<el-date-picker style="width: 185px" v-model="copyBomData.effPhaseOutDate" type="date" value-format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker>
</el-form-item>
</el-form>
</fieldset>
<el-footer style="height:40px;margin-top: 10px;text-align:center">
<el-button type="primary" @click="copyBom">保存</el-button>
<el-button type="primary" @click="copyBomModelFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<!-- copyAlternative -->
<el-dialog title="Copy Structure Alternative" :close-on-click-modal="false" v-drag :visible.sync="copyAlternativeModelFlag" width="450px">
<fieldset style="width: 426px">
<legend>Source Revision</legend>
<el-form :inline="true" label-position="top" :model="detailData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="物料编码">
<el-input v-model="detailData.partNo" readonly style="width: 185px"></el-input>
</el-form-item>
<el-form-item label="site">
<el-input v-model="detailData.site" disabled style="width: 185px"></el-input>
</el-form-item>
</el-form>
<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>
<el-form-item label="制造类型">
<el-input v-model="detailData.bomType" readonly style="width: 185px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="detailData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="替代编码">
<el-input v-model="detailData.alternativeNo" readonly style="width: 185px"></el-input>
</el-form-item>
<el-form-item label="替代名称">
<el-input v-model="detailData.alternativeDescription" readonly style="width: 185px"></el-input>
</el-form-item>
</el-form>
</fieldset>
<fieldset style="width: 426px">
<legend>Destination Revision</legend>
<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>
<el-form-item label="site">
<el-input v-model="copyAlternativeData.site" disabled style="width: 185px"></el-input>
</el-form-item>
</el-form>
<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>
<el-form-item label="制造类型">
<el-select v-model="copyAlternativeData.bomType" style="width: 185px">
<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>
<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.alternativeNo" style="width: 185px"></el-input>
</el-form-item>
<el-form-item label="替代名称">
<el-input v-model="copyAlternativeData.alternativeDescription" style="width: 185px"></el-input>
</el-form-item>
</el-form>
</fieldset>
<el-footer style="height:40px;margin-top: 10px;text-align:center">
<el-button type="primary" @click="copyAlternative">保存</el-button>
<el-button type="primary" @click="copyAlternativeModelFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<!-- chooseList模态框 -->
<ChooseList ref="baseList" @getBaseData="getBaseData"></ChooseList>
</div>
@ -476,6 +635,8 @@ import {
queryOperationList, //
getBomEngChgLevel, // bom
getComponentLineSequence, //
copyBom, // bom
copyAlternative, // alternative
} from '@/api/part/bomManagement.js'
import ChooseList from '@/views/modules/common/Chooselist'
import dayjs from "dayjs";
@ -630,6 +791,30 @@ export default {
partNo: '',
operationName: '',
},
copyBomData: {
site: '',
partNo: '',
engChgLevel: '',
bomType: '',
effPhaseInDate: '',
effPhaseOutDate: '',
previousVersion: {},
createBy: ''
},
copyAlternativeData: {
site: '',
partNo: '',
engChgLevel: '',
bomType: '',
alternativeNo: '',
alternativeDescription: '',
minLotQty: '',
defaultFlag: '',
detailNoteText: '',
status: '',
previousVersion: {},
createBy: ''
},
// ======== ========
dataList: [],
partList: [],
@ -758,7 +943,7 @@ export default {
columnProp: 'effPhaseInDate',
headerAlign: 'center',
align: 'center',
columnLabel: '开始时间',
columnLabel: '生效日期',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -776,7 +961,7 @@ export default {
columnProp: 'effPhaseOutDate',
headerAlign: 'center',
align: 'center',
columnLabel: '结束时间',
columnLabel: '失效日期',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -1172,6 +1357,44 @@ export default {
fixed: '',
}
],
columnBomDetailList: [
{
columnProp: 'alternativeNo',
headerAlign: "center",
align: "center",
columnLabel: '替代编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
columnProp: 'alternativeDescription',
headerAlign: "center",
align: "center",
columnLabel: '替代名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
columnProp: 'status',
headerAlign: "center",
align: "center",
columnLabel: '状态',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
],
// ======== ========
rules: {
partNo: [
@ -1296,6 +1519,8 @@ export default {
componentSaveModal: false,
componentDisableFlag: false,
operationModelFlag: false,
copyBomModelFlag: false,
copyAlternativeModelFlag: false
}
},
@ -1681,11 +1906,11 @@ export default {
return
}
if (this.modalData.effPhaseInDate === '' || this.modalData.effPhaseInDate == null) {
this.$message.warning('请选择开始时间!')
this.$message.warning('请选择生效日期!')
return
}
// if (this.modalData.effPhaseOutDate === '' || this.modalData.effPhaseOutDate == null) {
// this.$message.warning('')
// this.$message.warning('')
// return
// }
if (this.modalData.engChgLevel === '' || this.modalData.engChgLevel == null) {
@ -2195,6 +2420,119 @@ export default {
this.saveHeaderLoading = false
})
},
/**
* 复制bom的模态框
*/
copyBomRevision () {
this.copyBomData = {
site: this.modalData.site,
partNo: this.modalData.partNo,
engChgLevel: this.modalData.engChgLevel + 1,
bomType: this.modalData.bomType,
effPhaseInDate: this.dayjs(new Date()).format('YYYY-MM-DD'),
effPhaseOutDate: '',
previousVersion: {},
createBy: this.$store.state.user.name
}
this.copyBomModelFlag = true
},
/**
* 复制bom的方法
*/
copyBom () {
if (this.copyBomData.partNo === '' || this.copyBomData.partNo == null) {
this.$message.warning('请选择Bom物料!')
return
}
if (this.copyBomData.engChgLevel === '' || this.copyBomData.engChgLevel == null) {
this.$message.warning('请填写Bom版本号!')
return
}
if (this.copyBomData.bomType === '' || this.copyBomData.bomType == null) {
this.$message.warning('请选择制造类型!')
return
}
this.copyBomData.previousVersion = this.modalData
//
copyBom(this.copyBomData).then(({data}) => {
if (data && data.code === 0) {
this.copyBomModelFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
/**
* 复制alternative的模态框
*/
copyBomAlternative () {
this.copyAlternativeData = {
site: this.detailData.site,
partNo: this.detailData.partNo,
engChgLevel: this.detailData.engChgLevel,
bomType: this.detailData.bomType,
alternativeNo: this.detailData.alternativeNo,
alternativeDescription: this.detailData.alternativeDescription,
minLotQty: this.detailData.minLotQty,
defaultFlag: this.detailData.defaultFlag,
detailNoteText: this.detailData.detailNoteText,
status: 'Tentative',
previousVersion: {},
createBy: this.$store.state.user.name
}
this.copyAlternativeModelFlag = true
},
/**
* 复制alternative的方法
*/
copyAlternative () {
if (this.copyAlternativeData.partNo === '' || this.copyAlternativeData.partNo == null) {
this.$message.warning('请选择Bom物料!')
return
}
if (this.copyAlternativeData.engChgLevel === '' || this.copyAlternativeData.engChgLevel == null) {
this.$message.warning('请填写Bom版本号!')
return
}
if (this.copyAlternativeData.bomType === '' || this.copyAlternativeData.bomType == null) {
this.$message.warning('请选择制造类型!')
return
}
if (this.copyAlternativeData.alternativeNo === '' || this.copyAlternativeData.alternativeNo == null) {
this.$message.warning('请填写替代编码!')
return
}
if (this.copyAlternativeData.alternativeDescription === '' || this.copyAlternativeData.alternativeDescription == null) {
this.$message.warning('请填写替代名称!')
return
}
this.copyAlternativeData.previousVersion = this.detailData
copyAlternative(this.copyAlternativeData).then(({data}) => {
if (data && data.code === 0) {
this.copyAlternativeModelFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
/**
* 新增替代方法
*/

2
src/views/modules/part/partCatalogInformation.vue

@ -11,7 +11,7 @@
<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>
<!-- <el-button type="primary" @click="delModal()">删除</el-button>-->
<download-excel
:fields="fields()"
:data="exportData"

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

@ -11,9 +11,6 @@
<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"
@ -123,7 +120,13 @@
<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-form-item v-if="modalDisableFlag" :label="' '">
<el-button type="primary" @click="toCopyPartModal">Copy</el-button>
</el-form-item>
<el-form-item v-if="modalDisableFlag && modalData.status !== 'Y'" :label="' '">
<el-button type="primary" @click="toBecomeOfficialPart">转正式物料</el-button>
</el-form-item>
<el-tabs v-model="inventoryPartTable" style="width: 100%;height: 465px" type="border-card" @tab-click="inventoryPartClick">
<el-tab-pane label="General">
<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">
@ -273,9 +276,9 @@
<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>
<span slot="label" @click="getBaseList(129)"><a herf="#">海关统计序号 / Customs Stat No</a></span>
<el-input v-model="modalData.customsStatNo" style="width: 128px"></el-input>
<el-input v-model="modalData.customsStatDesc" disabled style="width: 330px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
@ -454,7 +457,40 @@
</el-form>
</el-tab-pane>
<el-tab-pane label="Revisions"></el-tab-pane>
<el-tab-pane style="margin-top: -10px" label="Revisions" name="Revisions">
<el-table
:data="revisionList"
height="415px"
border
ref="revisionTable"
style="width:100%">
<el-table-column
v-for="(item,index) in columnRevisionList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed == ''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<el-table-column
fixed="right"
header-align="center"
align="center"
width="100"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" @click="updateRevisionModal(scope.row)">编辑</a>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
</el-tabs>
</el-form>
<el-footer style="height:35px;margin-top: 20px;text-align:center">
@ -1107,6 +1143,72 @@
</el-footer>
</el-dialog>
<el-dialog title="BOM" :close-on-click-modal="false" v-drag :visible.sync="updateRevisionModelFlag" width="430px">
<el-form :inline="true" label-position="top" :model="revisionData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="版本号">
<el-input v-model="revisionData.engChgLevel" disabled style="width: 185px"></el-input>
</el-form-item>
<el-form-item label="制造类型">
<el-input v-model="revisionData.bomType" disabled style="width: 185px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="revisionData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="生效日期">
<el-date-picker style="width: 185px" v-model="revisionData.effPhaseInDate" type="date" value-format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker>
</el-form-item>
<el-form-item label="失效日期">
<el-date-picker style="width: 185px" v-model="revisionData.effPhaseOutDate" type="date" value-format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker>
</el-form-item>
</el-form>
<el-footer style="height:40px;margin-top: 10px;text-align:center">
<el-button type="primary" @click="updateRevision()">保存</el-button>
<el-button type="primary" @click="updateRevisionModelFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<!-- copyPart -->
<el-dialog title="Copy Part" :close-on-click-modal="false" v-drag :visible.sync="copyPartModelFlag" width="450px">
<fieldset style="width: 426px">
<legend>Part No To Copy</legend>
<el-form :inline="true" style="margin-left: 7px">
<el-form-item label="From Part">
<el-input v-model="modalData.partNo" readonly style="width: 140px"></el-input>
<el-input v-model="modalData.partDesc" readonly style="width: 240px"></el-input>
</el-form-item>
<el-form-item label="To Part">
<el-input v-model="copyPartData.partNo" style="width: 140px"></el-input>
<el-input v-model="copyPartData.partDesc" style="width: 240px"></el-input>
</el-form-item>
</el-form>
</fieldset>
<fieldset style="width: 426px">
<legend>Select Part Information to Copy</legend>
<el-form :inline="true" style="margin-left: 7px">
<el-form-item label=" ">
<el-checkbox v-model="copyPartData.copyGeneral" true-label="Y">General</el-checkbox>
</el-form-item>
<el-form-item label=" ">
<el-checkbox v-model="copyPartData.copyCosts" true-label="Y">Costs</el-checkbox>
</el-form-item>
<el-form-item label=" ">
<el-checkbox v-model="copyPartData.copyPlanningData" true-label="Y">Planning Data</el-checkbox>
</el-form-item>
</el-form>
<el-form :inline="true" style="margin-left: 7px">
<el-form-item label=" ">
<el-checkbox v-model="copyPartData.copyManufacturing" true-label="Y">Manufacturing</el-checkbox>
</el-form-item>
<el-form-item label=" ">
<el-checkbox v-model="copyPartData.copyDefaultLocation" true-label="Y">Default Location</el-checkbox>
</el-form-item>
</el-form>
</fieldset>
<el-footer style="height:40px;margin-top: 10px;text-align:center">
<el-button type="primary" @click="copyPart">保存</el-button>
<el-button type="primary" @click="copyPartModelFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<!-- chooseList模态框 -->
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
@ -1150,6 +1252,10 @@
deletePartItem, //
queryPartItem,
queryMasterField, // masterPart
toBecomeOfficialPart, //
queryPartRevisionList, // bom
updateRevision, //bom
copyPart //
} from '@/api/part/partInformation.js'
import {
getFileContentList, //
@ -1176,6 +1282,23 @@
deep: true,
handler: function (newV, oldV) {
this.modalData.partNo = this.modalData.partNo.toUpperCase()
this.modalData.productGroupId4 = this.modalData.productGroupId4.toUpperCase()
this.modalData.hazardCode = this.modalData.hazardCode.toUpperCase()
this.modalData.productGroupId3 = this.modalData.productGroupId3.toUpperCase()
this.modalData.umId = this.modalData.umId.toUpperCase()
this.modalData.groupId = this.modalData.groupId.toUpperCase()
this.modalData.productGroupId1 = this.modalData.productGroupId1.toUpperCase()
this.modalData.familyId = this.modalData.familyId.toUpperCase()
this.modalData.productGroupId2 = this.modalData.productGroupId2.toUpperCase()
this.modalData.assetClass = this.modalData.assetClass.toUpperCase()
this.modalData.partStatus = this.modalData.partStatus.toUpperCase()
this.modalData.abcClass = this.modalData.abcClass.toUpperCase()
this.modalData.codeNo = this.modalData.codeNo.toUpperCase()
this.modalData.countryOfOrigin = this.modalData.countryOfOrigin.toUpperCase()
this.modalData.regionOfOrigin = this.modalData.regionOfOrigin.toUpperCase()
this.modalData.customsStatNo = this.modalData.customsStatNo.toUpperCase()
this.modalData.partCostGroupId = this.modalData.partCostGroupId.toUpperCase()
this.modalData.planningMethod = this.modalData.planningMethod.toUpperCase()
}
}
},
@ -1212,6 +1335,7 @@
dataListLoading: false,
//
activeTable: 'part_item',
inventoryPartTable: '',
// ======== ========
modalData: {
flag: '',
@ -1273,8 +1397,8 @@
regionOfOrigin: '',
regionOfOriginDesc: '',
durabilityWeek: '',
customsStarNo: '',
customsStarDesc: '',
customsStatNo: '',
customsStatDesc: '',
durabilityDay: '',
intrastatConvFactor: '',
umDesc: '',
@ -1313,6 +1437,16 @@
density: '',
variableLeadTimeHour: ''
},
revisionData: {
site: '',
partNo: '',
engChgLevel: '',
bomType: '',
noteText: '',
effPhaseInDate: '',
effPhaseOutDate: '',
engRevision: ''
},
itemData: {
site: this.$store.state.user.site,
partNo: '',
@ -1338,6 +1472,18 @@
locationId: '',
locationName: '',
},
copyPartData: {
site: '',
partNo: '',
partDesc: '',
copyGeneral: 'Y',
copyCosts: '',
copyPlanningData: '',
copyManufacturing: '',
copyDefaultLocation: '',
previousVersion: {},
createBy: ''
},
// ======== ========
dataList: [],
partItemList: [],
@ -1369,6 +1515,7 @@
itemSelections2: [],
itemList1:[],
itemList2:[],
revisionList: [],
// ======== ========
columnList: [
{
@ -2428,6 +2575,110 @@
fixed: '',
},
],
columnRevisionList: [
{
userId: this.$store.state.user.name,
functionId: 104001,
serialNumber: '104001Table8EngChgLevel',
tableId: "104001Table8",
tableName: "物料版本表",
columnProp: 'engChgLevel',
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: '104001Table8BomType',
tableId: "104001Table8",
tableName: "物料版本表",
columnProp: 'bomType',
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: '104001Table8EffPhaseInDate',
tableId: "104001Table8",
tableName: "物料版本表",
columnProp: 'effPhaseInDate',
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: '104001Table8EffPhaseOutDate',
tableId: "104001Table8",
tableName: "物料版本表",
columnProp: 'effPhaseOutDate',
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: '104001Table8NoteText',
tableId: "104001Table8",
tableName: "物料版本表",
columnProp: 'noteText',
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: '104001Table8EngRevision',
tableId: "104001Table8",
tableName: "物料版本表",
columnProp: 'engRevision',
headerAlign: "center",
align: "center",
columnLabel: '工程版本',
columnHidden: false,
columnImage: false,
columnSortable: true,
sortLv: 0,
status: true,
fixed: '',
},
],
// ======== ========
rules: {
partNo: [
@ -2517,7 +2768,9 @@
manufacturerModelFlag: false,
updateItemModelFlag: false,
fastAddFlag: false,
locationModelFlag: false
locationModelFlag: false,
updateRevisionModelFlag: false,
copyPartModelFlag: false
}
},
@ -2534,6 +2787,78 @@
},
methods: {
//
inventoryPartClick (tab, event) {
this.refreshInventoryPartTable()
},
// table
refreshInventoryPartTable () {
if (this.inventoryPartTable === 'Revisions') {
this.queryPartRevisionList()
}
},
// bom
queryPartRevisionList () {
let tempData = {
site: this.modalData.site,
partNo: this.modalData.partNo,
// partType: this.modalData.partType
}
queryPartRevisionList(tempData).then(({data}) => {
if (data && data.code === 0) {
this.revisionList = data.rows
} else {
this.revisionList = []
}
})
},
// bom
updateRevisionModal (row) {
this.revisionData = row
this.updateRevisionModelFlag = true
},
// bom
updateRevision () {
updateRevision(this.revisionData).then(({data}) => {
if (data && data.code === 0) {
this.queryPartRevisionList()
this.updateRevisionModelFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
//
toBecomeOfficialPart () {
toBecomeOfficialPart(this.modalData).then(({data}) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
//
queryMasterField () {
// masterPart
@ -2991,8 +3316,8 @@
regionOfOrigin: '',
regionOfOriginDesc: '',
durabilityWeek: '',
customsStarNo: '',
customsStarDesc: '',
customsStatNo: '',
customsStatDesc: '',
durabilityDay: '',
intrastatConvFactor: '',
umDesc: '',
@ -3096,8 +3421,8 @@
regionOfOrigin: row.regionOfOrigin,
regionOfOriginDesc: row.regionOfOriginDesc,
durabilityWeek: '',
customsStarNo: row.customsStarNo,
customsStarDesc: row.customsStarDesc,
customsStatNo: row.customsStatNo,
customsStatDesc: row.customsStatDesc,
durabilityDay: row.durabilityDay,
intrastatConvFactor: row.intrastatConvFactor,
umDesc: row.umDesc,
@ -3134,7 +3459,8 @@
overReportTolerance: row.overReportTolerance,
fixedLeadTimeHour: row.fixedLeadTimeHour,
density: row.density,
variableLeadTimeHour: row.variableLeadTimeHour
variableLeadTimeHour: row.variableLeadTimeHour,
createDate: row.createDate
}
this.modalDisableFlag = true
this.modalFlag = true
@ -3705,6 +4031,56 @@
})
},
//
toCopyPartModal () {
this.copyPartData = {
site: this.modalData.site,
partNo: this.modalData.partNo,
partDesc: this.modalData.partDesc,
copyGeneral: 'Y',
copyCosts: '',
copyPlanningData: '',
copyManufacturing: '',
copyDefaultLocation: '',
previousVersion: this.modalData,
createBy: this.$store.state.user.name
}
this.copyPartModelFlag = true
},
//
copyPart () {
if (this.copyPartData.partNo === '' || this.copyPartData.partNo == null) {
this.$message.warning('请输入物料编码!')
return
}
if (this.copyPartData.partDesc === '' || this.copyPartData.partDesc == null) {
this.$message.warning('请输入物料名称!')
return
}
if (this.copyPartData.copyGeneral === '' || this.copyPartData.copyGeneral == null) {
this.$message.warning('General信息必选!')
return
}
copyPart(this.copyPartData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.copyPartModelFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
// ======== ========
/**
* 单机选中物料信息
@ -3880,7 +4256,7 @@
} else if (val === 128) {
strVal = this.modalData.regionOfOrigin
} else if (val === 129) {
strVal = this.modalData.customsStarNo
strVal = this.modalData.customsStatNo
} else if (val === 131) {
strVal = this.modalData.partCostGroupId
} else if (val === 132) {
@ -3954,8 +4330,8 @@
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
this.modalData.customsStatNo = val.customs_stat_no
this.modalData.customsStatDesc = val.customs_stat_desc
} else if (this.tagNo === 131) {
this.modalData.partCostGroupId = val.part_cost_group_id
this.modalData.partCostGroupDesc = val.part_cost_group_desc
@ -4019,5 +4395,6 @@
-moz-appearance: textfield;
padding-right: 5px !important;
}
</style>

983
src/views/modules/part/routingManagement.vue
File diff suppressed because it is too large
View File

Loading…
Cancel
Save