Browse Source

2025/8/26

java8
Aoi_Tori 5 months ago
parent
commit
7ab2e626b1
  1. 67
      src/views/modules/part/quicklyCreateBom.vue

67
src/views/modules/part/quicklyCreateBom.vue

@ -1020,14 +1020,14 @@
</el-select>
</el-form-item>
<el-form-item label="生效日期" v-if="copyData.routingFlag==='Y'||copyData.bomFlag==='Y'" prop="effPhaseInDate">
<el-date-picker style="width: 7vw" v-model="copyData.effPhaseInDate" type="date" value-format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker>
<el-date-picker style="width: 7vw" v-model="copyData.effPhaseInDate" clearable type="date" value-format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker>
</el-form-item>
<el-form-item label="失效日期" v-if="copyData.routingFlag==='Y'||copyData.bomFlag==='Y'" prop="effPhaseOutDate">
<el-date-picker style="width: 7vw" v-model="copyData.effPhaseOutDate" type="date" value-format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker>
<el-form-item label="失效日期" v-if="copyData.routingFlag==='Y'||copyData.bomFlag==='Y'">
<el-date-picker style="width: 7vw" v-model="copyData.effPhaseOutDate" clearable type="date" value-format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker>
</el-form-item>
</el-form>
</fieldset>
<fieldset style="width: 55vw">
<fieldset style="width: 57vw">
<legend>被复制的物料</legend>
<el-form :inline="true" label-position="top" :model="copyData">
<el-form-item>
@ -1430,13 +1430,29 @@ export default {
site: this.$store.state.user.site,
partNo: '',
partDesc: '',
umId2: null,
productGroupId1: null,
productGroupId2: null,
productGroupId3: null,
codeNo: null,
familyID: null,
partType2: null,
routingType: 'Manufacturing',
bomType: 'Manufacturing',
effPhaseInDate: null,
effPhaseOutDate: null,
phaseOutDate: null,
phaseInDate: null,
previousVersion: {},
nodeFlag: false,
mainPart: '',
nodeId: '',
engChgLevel: null,
bomFlag: 'N',
routingFlag: 'N',
routingRevision: null,
active: '',
createBy: '',
routingFlag: 'Y',
bomFlag: 'Y',
page: 1,
limit: 10
}
@ -1540,13 +1556,6 @@ export default {
trigger: ['blur', 'change']
}
],
effPhaseOutDate: [
{
required: true,
message: ' ',
trigger: ['blur', 'change']
}
],
effPhaseInDate: [
{
required: true,
@ -1610,15 +1619,22 @@ export default {
codeNo: null,
familyID: null,
partType2: null,
routingType: 'Manufacturing',
bomType: 'Manufacturing',
effPhaseInDate: null,
effPhaseOutDate: null,
phaseOutDate: null,
phaseInDate: null,
previousVersion: {},
nodeFlag: false,
mainPart: '',
nodeId: '',
engChgLevel: null,
routingRevision: null,
active: '',
createBy: '',
routingFlag: 'N',
bomFlag: 'N',
routingFlag: 'Y',
bomFlag: 'Y',
page: 1,
limit: 10
},
@ -4817,8 +4833,8 @@ export default {
},
bomInfoRowDblClick1(row){
// this.copyData.previousVersion.engChgLevel = row.engChgLevel
this.$set(this.copyData.previousVersion, 'engChgLevel', row.engChgLevel)
this.$set(this.copyData.previousVersion, 'bomType', row.bomType)
},
routingInfoRowDblClick(row){
@ -4844,6 +4860,7 @@ export default {
routingInfoRowDblClick1(row){
this.copyData.previousVersion.routingRevision = row.routingRevision
this.copyData.previousVersion.routingType = row.routingType
},
routingInfoRowClick(row) {
@ -5037,6 +5054,10 @@ export default {
this.copyData.partNo = this.partCurrentRow.partNo
this.copyData.partDesc = this.partCurrentRow.partDesc
this.copyData.buNo = this.partCurrentRow.buNo
this.copyData.bomType = 'Manufacturing'
this.copyData.routingType = 'Manufacturing'
this.copyData.effPhaseInDate = new Date()
this.copyData.effPhaseOutDate = new Date()
this.copyVisible = true
},
@ -5089,6 +5110,14 @@ export default {
this.$message.warning('请先选择要复制的料号!')
return
}
if (this.copyData.bomFlag&&this.copyData.bomFlag==='Y'&&!this.copyData.previousVersion.engChgLevel) {
this.$message.warning('请选择要复制的BOM版本!')
return
}
if (this.copyData.routingFlag&&this.copyData.routingFlag==='Y'&&!this.copyData.previousVersion.routingRevision) {
this.$message.warning('请选择要复制的routing版本!')
return
}
let flag = true
if (!this.copyData.partNo||this.copyData.partNo==='') {
//
@ -5129,9 +5158,6 @@ export default {
})
}
if (this.copyData.bomFlag&&this.copyData.bomFlag==='Y') {
this.copyData.previousVersion.noteText = this.bomCurrentRow1.noteText
this.copyData.previousVersion.engChgLevel = this.bomCurrentRow1.engChgLevel
this.copyData.previousVersion.bomType = this.bomCurrentRow1.bomType
await copyBom(this.copyData).then(({data}) => {
if (data && data.code === 0) {
this.$message({
@ -5151,9 +5177,6 @@ export default {
})
}
if (this.copyData.routingFlag&&this.copyData.routingFlag==='Y') {
this.copyData.previousVersion.noteText = this.routingCurrentRow1.noteText
this.copyData.previousVersion.routingRevision = this.routingCurrentRow1.routingRevision
this.copyData.previousVersion.routingType = this.routingCurrentRow1.routingType
this.copyData.phaseInDate = this.copyData.effPhaseInDate
this.copyData.phaseOutDate = this.copyData.effPhaseOutDate
await copyRouting(this.copyData).then(({data}) => {

Loading…
Cancel
Save