|
|
@ -141,10 +141,11 @@ |
|
|
<el-form-item> |
|
|
<el-form-item> |
|
|
<el-button type="primary" @click="saveRoutingDetail()" style="margin-left: 7px">新增</el-button> |
|
|
<el-button type="primary" @click="saveRoutingDetail()" style="margin-left: 7px">新增</el-button> |
|
|
<el-button type="primary" @click="deleteRoutingDetail()">删除</el-button> |
|
|
<el-button type="primary" @click="deleteRoutingDetail()">删除</el-button> |
|
|
|
|
|
<el-button type="primary" @click="updateRoutingDetail()">编辑</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"> |
|
|
<el-form-item :label="'替代编码'" prop="alternativeNo" :rules="rules.alternativeNo"> |
|
|
|
|
|
|
|
|
<el-form-item :label="'替代编码'"> |
|
|
<el-select v-model="detailData.alternativeNo" @change="alternativeChange()" style="width: 221px"> |
|
|
<el-select v-model="detailData.alternativeNo" @change="alternativeChange()" style="width: 221px"> |
|
|
<el-option |
|
|
<el-option |
|
|
v-for = "(i, index) in detailDataList" |
|
|
v-for = "(i, index) in detailDataList" |
|
|
@ -155,12 +156,19 @@ |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="'替代名称'"> |
|
|
<el-form-item :label="'替代名称'"> |
|
|
<el-input v-model="detailData.alternativeDescription" style="width: 221px"></el-input> |
|
|
|
|
|
|
|
|
<el-input v-model="detailData.alternativeDescription" readonly style="width: 221px"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item :label="'状态'"> |
|
|
|
|
|
<el-select v-model="detailData.status" disabled style="width: 221px"> |
|
|
|
|
|
<el-option label="暂定" value="Tentative"></el-option> |
|
|
|
|
|
<el-option label="创建" value="Buildable"></el-option> |
|
|
|
|
|
<el-option label="销毁" value="Obsolete"></el-option> |
|
|
|
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<el-form :inline="true" label-position="top" :model="detailData" style="margin-left: 7px"> |
|
|
<el-form :inline="true" label-position="top" :model="detailData" style="margin-left: 7px"> |
|
|
<el-form-item label="备注"> |
|
|
<el-form-item label="备注"> |
|
|
<el-input type="textarea" v-model="detailData.detailNoteText" :rows="3" resize='none' show-word-limit style="width: 1073px;height: 20px"></el-input> |
|
|
|
|
|
|
|
|
<el-input type="textarea" v-model="detailData.detailNoteText" :rows="3" resize='none' show-word-limit readonly style="width: 1073px;height: 20px"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
</el-tab-pane> |
|
|
</el-tab-pane> |
|
|
@ -221,12 +229,19 @@ |
|
|
<!-- 明细新增模态框 --> |
|
|
<!-- 明细新增模态框 --> |
|
|
<el-dialog title="新增替代" :close-on-click-modal="false" v-drag :visible.sync="saveDetailModalFlag" width="650px"> |
|
|
<el-dialog title="新增替代" :close-on-click-modal="false" v-drag :visible.sync="saveDetailModalFlag" width="650px"> |
|
|
<el-form :inline="true" label-position="top" :model="saveDetailData" :rules="detailRules" style="margin-left: 5px"> |
|
|
<el-form :inline="true" label-position="top" :model="saveDetailData" :rules="detailRules" style="margin-left: 5px"> |
|
|
<el-form-item :label="'替代编码'" prop="alternativeNo" :rules="detailRules.alternativeNo"> |
|
|
|
|
|
|
|
|
<el-form-item :label="'替代编码'" prop="alternativeNo" :disabled="saveDetailModalDisable" :rules="detailRules.alternativeNo"> |
|
|
<el-input v-model="saveDetailData.alternativeNo" style="width: 221px"></el-input> |
|
|
<el-input v-model="saveDetailData.alternativeNo" style="width: 221px"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="'替代名称'" prop="alternativeDescription" :rules="detailRules.alternativeDescription"> |
|
|
<el-form-item :label="'替代名称'" prop="alternativeDescription" :rules="detailRules.alternativeDescription"> |
|
|
<el-input v-model="saveDetailData.alternativeDescription" style="width: 221px"></el-input> |
|
|
<el-input v-model="saveDetailData.alternativeDescription" style="width: 221px"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item :label="'状态'" prop="status" :rules="detailRules.status"> |
|
|
|
|
|
<el-select v-model="saveDetailData.status" style="width: 235px"> |
|
|
|
|
|
<el-option label="暂定" value="Tentative"></el-option> |
|
|
|
|
|
<el-option label="创建" value="Buildable"></el-option> |
|
|
|
|
|
<el-option label="销毁" value="Obsolete"></el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<el-form :inline="true" label-position="top" :model="saveDetailData" style="margin-left: 5px"> |
|
|
<el-form :inline="true" label-position="top" :model="saveDetailData" style="margin-left: 5px"> |
|
|
<el-form-item label="备注"> |
|
|
<el-form-item label="备注"> |
|
|
@ -422,6 +437,7 @@ import { |
|
|
saveRoutingHeader, // 新增routing主信息 |
|
|
saveRoutingHeader, // 新增routing主信息 |
|
|
queryRoutingDetail, // 查routing明细 |
|
|
queryRoutingDetail, // 查routing明细 |
|
|
routingDetailSave, // routing明细新增 |
|
|
routingDetailSave, // routing明细新增 |
|
|
|
|
|
routingDetailUpdate, // routing明细编辑 |
|
|
routingDetailDelete, // routing明细删除 |
|
|
routingDetailDelete, // routing明细删除 |
|
|
queryPartList, // 查询物料清单 |
|
|
queryPartList, // 查询物料清单 |
|
|
queryRoutingComponent, // 查询routing子明细 |
|
|
queryRoutingComponent, // 查询routing子明细 |
|
|
@ -518,7 +534,8 @@ export default { |
|
|
forStdLotByDay: '', |
|
|
forStdLotByDay: '', |
|
|
forLotByDay: '', |
|
|
forLotByDay: '', |
|
|
minLotQty: '', |
|
|
minLotQty: '', |
|
|
noteText: '', |
|
|
|
|
|
|
|
|
detailNoteText: '', |
|
|
|
|
|
status: '', |
|
|
createDate: '', |
|
|
createDate: '', |
|
|
createBy: '', |
|
|
createBy: '', |
|
|
updateDate: '', |
|
|
updateDate: '', |
|
|
@ -568,6 +585,7 @@ export default { |
|
|
operationName: '', |
|
|
operationName: '', |
|
|
}, |
|
|
}, |
|
|
saveDetailData: { |
|
|
saveDetailData: { |
|
|
|
|
|
flag: '', |
|
|
site: this.$store.state.user.site, |
|
|
site: this.$store.state.user.site, |
|
|
partNo: '', |
|
|
partNo: '', |
|
|
routingRevision: '', |
|
|
routingRevision: '', |
|
|
@ -584,6 +602,7 @@ export default { |
|
|
forLotByDay: '', |
|
|
forLotByDay: '', |
|
|
minLotQty: '', |
|
|
minLotQty: '', |
|
|
detailNoteText: '', |
|
|
detailNoteText: '', |
|
|
|
|
|
status: '', |
|
|
createDate: '', |
|
|
createDate: '', |
|
|
createBy: '', |
|
|
createBy: '', |
|
|
updateDate: '', |
|
|
updateDate: '', |
|
|
@ -1129,7 +1148,9 @@ export default { |
|
|
message: ' ', |
|
|
message: ' ', |
|
|
trigger: 'change' |
|
|
trigger: 'change' |
|
|
} |
|
|
} |
|
|
], |
|
|
|
|
|
|
|
|
] |
|
|
|
|
|
}, |
|
|
|
|
|
detailRules: { |
|
|
alternativeNo: [ |
|
|
alternativeNo: [ |
|
|
{ |
|
|
{ |
|
|
required: true, |
|
|
required: true, |
|
|
@ -1137,16 +1158,14 @@ export default { |
|
|
trigger: 'change' |
|
|
trigger: 'change' |
|
|
} |
|
|
} |
|
|
], |
|
|
], |
|
|
}, |
|
|
|
|
|
detailRules: { |
|
|
|
|
|
alternativeNo: [ |
|
|
|
|
|
|
|
|
alternativeDescription: [ |
|
|
{ |
|
|
{ |
|
|
required: true, |
|
|
required: true, |
|
|
message: ' ', |
|
|
message: ' ', |
|
|
trigger: 'change' |
|
|
trigger: 'change' |
|
|
} |
|
|
} |
|
|
], |
|
|
], |
|
|
alternativeDescription: [ |
|
|
|
|
|
|
|
|
status: [ |
|
|
{ |
|
|
{ |
|
|
required: true, |
|
|
required: true, |
|
|
message: ' ', |
|
|
message: ' ', |
|
|
@ -1184,7 +1203,8 @@ export default { |
|
|
modalDisableFlag: false, |
|
|
modalDisableFlag: false, |
|
|
partModelFlag: false, |
|
|
partModelFlag: false, |
|
|
componentPartModelFlag: false, |
|
|
componentPartModelFlag: false, |
|
|
saveDetailModalFlag :false, |
|
|
|
|
|
|
|
|
saveDetailModalFlag: false, |
|
|
|
|
|
saveDetailModalDisable: false, |
|
|
componentSaveModal: false, |
|
|
componentSaveModal: false, |
|
|
componentDisableFlag: false |
|
|
componentDisableFlag: false |
|
|
} |
|
|
} |
|
|
@ -1324,6 +1344,7 @@ export default { |
|
|
forLotByDay: '', |
|
|
forLotByDay: '', |
|
|
minLotQty: '', |
|
|
minLotQty: '', |
|
|
detailNoteText: '', |
|
|
detailNoteText: '', |
|
|
|
|
|
status: 'Tentative', |
|
|
createBy: this.$store.state.user.name |
|
|
createBy: this.$store.state.user.name |
|
|
} |
|
|
} |
|
|
this.subDetailList = [] |
|
|
this.subDetailList = [] |
|
|
@ -1364,6 +1385,113 @@ export default { |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
/** |
|
|
|
|
|
* 新增替代模态框 |
|
|
|
|
|
*/ |
|
|
|
|
|
saveRoutingDetail () { |
|
|
|
|
|
if (this.modalData.partNo === '' || this.modalData.partNo == null) { |
|
|
|
|
|
this.$message.warning('请先选择Routing物料!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
if (this.modalData.routingRevision === '' || this.modalData.routingRevision == null) { |
|
|
|
|
|
this.$message.warning('请先填写Routing版本号!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
if (this.modalData.routingType === '' || this.modalData.routingType == null) { |
|
|
|
|
|
this.$message.warning('请先选择工艺类型!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
this.saveDetailData = { |
|
|
|
|
|
flag: '1', |
|
|
|
|
|
site: this.$store.state.user.site, |
|
|
|
|
|
partNo: this.modalData.partNo, |
|
|
|
|
|
routingRevision: this.modalData.routingRevision, |
|
|
|
|
|
routingType: this.modalData.routingType, |
|
|
|
|
|
alternativeNo: '', |
|
|
|
|
|
alternativeDescription: '', |
|
|
|
|
|
routTemplateId: '', |
|
|
|
|
|
planDate: '', |
|
|
|
|
|
fixedLeadTimeDay: '', |
|
|
|
|
|
fixedLeadTimeHour: '', |
|
|
|
|
|
variableLeadTimeDay: '', |
|
|
|
|
|
variableLeadTimeHour: '', |
|
|
|
|
|
forStdLotByDay: '', |
|
|
|
|
|
forLotByDay: '', |
|
|
|
|
|
minLotQty: '', |
|
|
|
|
|
detailNoteText: '', |
|
|
|
|
|
status: 'Tentative', |
|
|
|
|
|
createDate: '', |
|
|
|
|
|
createBy: this.$store.state.user.name, |
|
|
|
|
|
} |
|
|
|
|
|
// 查询routing主信息 |
|
|
|
|
|
queryRoutingHeader(this.modalData).then(({data}) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
if (data.rows.length > 0) { |
|
|
|
|
|
this.saveDetailModalFlag = true |
|
|
|
|
|
this.saveDetailModalDisable = false |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message.warning('请先保存Routing主记录!') |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$alert(data.msg, '提示', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
/** |
|
|
|
|
|
* 替代编辑模态框 |
|
|
|
|
|
*/ |
|
|
|
|
|
updateRoutingDetail () { |
|
|
|
|
|
if (this.modalData.partNo === '' || this.modalData.partNo == null) { |
|
|
|
|
|
this.$message.warning('请先选择Routing物料!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
if (this.modalData.routingRevision === '' || this.modalData.routingRevision == null) { |
|
|
|
|
|
this.$message.warning('请先填写Routing版本号!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
if (this.modalData.routingType === '' || this.modalData.routingType == null) { |
|
|
|
|
|
this.$message.warning('请先选择工艺类型!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
this.saveDetailData = { |
|
|
|
|
|
flag: '2', |
|
|
|
|
|
site: this.detailData.site, |
|
|
|
|
|
partNo: this.detailData.partNo, |
|
|
|
|
|
routingRevision: this.detailData.routingRevision, |
|
|
|
|
|
routingType: this.detailData.routingType, |
|
|
|
|
|
alternativeNo: this.detailData.alternativeNo, |
|
|
|
|
|
alternativeDescription: this.detailData.alternativeDescription, |
|
|
|
|
|
routTemplateId: this.detailData.routTemplateId, |
|
|
|
|
|
planDate: this.detailData.planDate, |
|
|
|
|
|
fixedLeadTimeDay: this.detailData.fixedLeadTimeDay, |
|
|
|
|
|
fixedLeadTimeHour: this.detailData.fixedLeadTimeHour, |
|
|
|
|
|
variableLeadTimeDay: this.detailData.variableLeadTimeDay, |
|
|
|
|
|
variableLeadTimeHour: this.detailData.variableLeadTimeHour, |
|
|
|
|
|
forStdLotByDay: this.detailData.forStdLotByDay, |
|
|
|
|
|
forLotByDay: this.detailData.forLotByDay, |
|
|
|
|
|
minLotQty: this.detailData.minLotQty, |
|
|
|
|
|
detailNoteText: this.detailData.detailNoteText, |
|
|
|
|
|
status: this.detailData.status, |
|
|
|
|
|
updateBy: this.$store.state.user.name, |
|
|
|
|
|
} |
|
|
|
|
|
// 查询routing主信息 |
|
|
|
|
|
queryRoutingHeader(this.modalData).then(({data}) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
if (data.rows.length > 0) { |
|
|
|
|
|
this.saveDetailModalFlag = true |
|
|
|
|
|
this.saveDetailModalDisable = true |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message.warning('请先保存Routing主记录!') |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$alert(data.msg, '提示', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
/** |
|
|
/** |
|
|
* 新增子明细模态框 |
|
|
* 新增子明细模态框 |
|
|
*/ |
|
|
*/ |
|
|
@ -1372,6 +1500,10 @@ export default { |
|
|
this.$message.warning('请先选择替代!') |
|
|
this.$message.warning('请先选择替代!') |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') { |
|
|
|
|
|
this.$message.warning('不可编辑的替代状态!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
this.componentData = { |
|
|
this.componentData = { |
|
|
flag: '1', |
|
|
flag: '1', |
|
|
site: this.$store.state.user.site, |
|
|
site: this.$store.state.user.site, |
|
|
@ -1409,6 +1541,10 @@ export default { |
|
|
* 编辑模态框 |
|
|
* 编辑模态框 |
|
|
*/ |
|
|
*/ |
|
|
updateComponentModal (row) { |
|
|
updateComponentModal (row) { |
|
|
|
|
|
if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') { |
|
|
|
|
|
this.$message.warning('不可编辑的替代状态!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
this.componentData = { |
|
|
this.componentData = { |
|
|
flag: '2', |
|
|
flag: '2', |
|
|
site: row.site, |
|
|
site: row.site, |
|
|
@ -1470,13 +1606,17 @@ export default { |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
if (this.modalData.routingRevision === '' || this.modalData.routingRevision == null) { |
|
|
if (this.modalData.routingRevision === '' || this.modalData.routingRevision == null) { |
|
|
this.$message.warning('请填写BOM版本号!') |
|
|
|
|
|
|
|
|
this.$message.warning('请填写Routing版本号!') |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
if (this.detailData.alternativeNo === '' || this.detailData.alternativeNo == null) { |
|
|
if (this.detailData.alternativeNo === '' || this.detailData.alternativeNo == null) { |
|
|
this.$message.warning('请选择替代!') |
|
|
this.$message.warning('请选择替代!') |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
if (this.detailData.status === '' || this.detailData.status == null) { |
|
|
|
|
|
this.$message.warning('请选择替代状态!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
let tempData = { |
|
|
let tempData = { |
|
|
site: this.$store.state.user.site, |
|
|
site: this.$store.state.user.site, |
|
|
partNo: this.modalData.partNo, |
|
|
partNo: this.modalData.partNo, |
|
|
@ -1489,6 +1629,7 @@ export default { |
|
|
alternativeNo: this.detailData.alternativeNo, |
|
|
alternativeNo: this.detailData.alternativeNo, |
|
|
alternativeDescription: this.detailData.alternativeDescription, |
|
|
alternativeDescription: this.detailData.alternativeDescription, |
|
|
detailNoteText: this.detailData.detailNoteText, |
|
|
detailNoteText: this.detailData.detailNoteText, |
|
|
|
|
|
status: this.detailData.status, |
|
|
createBy: this.$store.state.user.name, |
|
|
createBy: this.$store.state.user.name, |
|
|
updateBy: this.$store.state.user.name, |
|
|
updateBy: this.$store.state.user.name, |
|
|
informationList: this.subDetailList |
|
|
informationList: this.subDetailList |
|
|
@ -1540,7 +1681,7 @@ export default { |
|
|
let tempArr = [] |
|
|
let tempArr = [] |
|
|
tempArr.push(this.modalData) |
|
|
tempArr.push(this.modalData) |
|
|
if (this.modalData.flag === '1') { |
|
|
if (this.modalData.flag === '1') { |
|
|
this.$confirm(`是否不保存且删除该条BOM记录?`, '提示', { |
|
|
|
|
|
|
|
|
this.$confirm(`是否不保存且删除该条Routing记录?`, '提示', { |
|
|
confirmButtonText: '确定', |
|
|
confirmButtonText: '确定', |
|
|
cancelButtonText: '取消', |
|
|
cancelButtonText: '取消', |
|
|
type: 'warning' |
|
|
type: 'warning' |
|
|
@ -1577,7 +1718,7 @@ export default { |
|
|
let tempArr = [] |
|
|
let tempArr = [] |
|
|
tempArr.push(this.modalData) |
|
|
tempArr.push(this.modalData) |
|
|
if (this.modalData.flag === '1') { |
|
|
if (this.modalData.flag === '1') { |
|
|
this.$confirm(`是否不保存且删除该条BOM记录?`, '提示', { |
|
|
|
|
|
|
|
|
this.$confirm(`是否不保存且删除该条Routing记录?`, '提示', { |
|
|
confirmButtonText: '确定', |
|
|
confirmButtonText: '确定', |
|
|
cancelButtonText: '取消', |
|
|
cancelButtonText: '取消', |
|
|
type: 'warning' |
|
|
type: 'warning' |
|
|
@ -1706,6 +1847,10 @@ export default { |
|
|
* 删除子物料 |
|
|
* 删除子物料 |
|
|
*/ |
|
|
*/ |
|
|
deleteComponentPart () { |
|
|
deleteComponentPart () { |
|
|
|
|
|
if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') { |
|
|
|
|
|
this.$message.warning('不可编辑的替代状态!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
if (this.checkedDetail.length === 0) { |
|
|
if (this.checkedDetail.length === 0) { |
|
|
this.$message.warning('请选择要删除子物料!') |
|
|
this.$message.warning('请选择要删除子物料!') |
|
|
return |
|
|
return |
|
|
@ -1889,57 +2034,6 @@ export default { |
|
|
this.saveHeaderLoading = false |
|
|
this.saveHeaderLoading = false |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* 新增替代模态框 |
|
|
|
|
|
*/ |
|
|
|
|
|
saveRoutingDetail () { |
|
|
|
|
|
if (this.modalData.partNo === '' || this.modalData.partNo == null) { |
|
|
|
|
|
this.$message.warning('请先选择Routing物料!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
if (this.modalData.routingRevision === '' || this.modalData.routingRevision == null) { |
|
|
|
|
|
this.$message.warning('请先填写Routing版本号!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
if (this.modalData.routingType === '' || this.modalData.routingType == null) { |
|
|
|
|
|
this.$message.warning('请先选择工艺类型!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
this.saveDetailData = { |
|
|
|
|
|
site: this.$store.state.user.site, |
|
|
|
|
|
partNo: this.modalData.partNo, |
|
|
|
|
|
routingRevision: this.modalData.routingRevision, |
|
|
|
|
|
routingType: this.modalData.routingType, |
|
|
|
|
|
alternativeNo: '', |
|
|
|
|
|
alternativeDescription: '', |
|
|
|
|
|
routTemplateId: '', |
|
|
|
|
|
planDate: '', |
|
|
|
|
|
fixedLeadTimeDay: '', |
|
|
|
|
|
fixedLeadTimeHour: '', |
|
|
|
|
|
variableLeadTimeDay: '', |
|
|
|
|
|
variableLeadTimeHour: '', |
|
|
|
|
|
forStdLotByDay: '', |
|
|
|
|
|
forLotByDay: '', |
|
|
|
|
|
minLotQty: '', |
|
|
|
|
|
detailNoteText: '', |
|
|
|
|
|
createDate: '', |
|
|
|
|
|
createBy: this.$store.state.user.name, |
|
|
|
|
|
} |
|
|
|
|
|
// 查询routing主信息 |
|
|
|
|
|
queryRoutingHeader(this.modalData).then(({data}) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
if (data.rows.length > 0) { |
|
|
|
|
|
this.saveDetailModalFlag = true |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message.warning('请先保存Routing主记录!') |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$alert(data.msg, '提示', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
/** |
|
|
/** |
|
|
* 新增替代方法 |
|
|
* 新增替代方法 |
|
|
*/ |
|
|
*/ |
|
|
@ -1964,26 +2058,53 @@ export default { |
|
|
this.$message.warning('请填写替代名称!') |
|
|
this.$message.warning('请填写替代名称!') |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
if (this.saveDetailData.status === '' || this.saveDetailData.status == null) { |
|
|
|
|
|
this.$message.warning('请选择替代状态!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
this.saveDetailLoading = true |
|
|
this.saveDetailLoading = true |
|
|
routingDetailSave(this.saveDetailData).then(({data}) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.detailDataList = data.rows |
|
|
|
|
|
this.detailData = this.saveDetailData |
|
|
|
|
|
this.subDetailList = [] |
|
|
|
|
|
this.saveDetailModalFlag = false |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: '操作成功', |
|
|
|
|
|
type: 'success', |
|
|
|
|
|
duration: 1500, |
|
|
|
|
|
onClose: () => {} |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
this.saveDetailLoading = false |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
if (this.saveDetailData.flag === '1') { |
|
|
|
|
|
routingDetailSave(this.saveDetailData).then(({data}) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.detailDataList = data.rows |
|
|
|
|
|
this.detailData = this.saveDetailData |
|
|
|
|
|
this.subDetailList = [] |
|
|
|
|
|
this.saveDetailModalFlag = false |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: '操作成功', |
|
|
|
|
|
type: 'success', |
|
|
|
|
|
duration: 1500, |
|
|
|
|
|
onClose: () => {} |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
this.saveDetailLoading = false |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
routingDetailUpdate(this.saveDetailData).then(({data}) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.detailDataList = data.rows.detailDataList |
|
|
|
|
|
this.detailData = data.rows.detailData |
|
|
|
|
|
this.subDetailList = data.rows.subDetailList |
|
|
|
|
|
this.saveDetailModalFlag = false |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: '操作成功', |
|
|
|
|
|
type: 'success', |
|
|
|
|
|
duration: 1500, |
|
|
|
|
|
onClose: () => {} |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
this.saveDetailLoading = false |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
/** |
|
|
/** |
|
|
* 删除替代 |
|
|
* 删除替代 |
|
|
|