|
|
@ -53,7 +53,6 @@ |
|
|
type="selection" |
|
|
type="selection" |
|
|
header-align="center" |
|
|
header-align="center" |
|
|
align="center" |
|
|
align="center" |
|
|
:selectable="selectFlag" |
|
|
|
|
|
width="50"> |
|
|
width="50"> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
@ -821,7 +820,6 @@ |
|
|
type="selection" |
|
|
type="selection" |
|
|
header-align="center" |
|
|
header-align="center" |
|
|
align="center" |
|
|
align="center" |
|
|
:selectable="selectFlag" |
|
|
|
|
|
width="50"> |
|
|
width="50"> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
@ -2689,9 +2687,7 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
created () { |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
created () {}, |
|
|
|
|
|
|
|
|
activated() { |
|
|
activated() { |
|
|
if (this.$route.params && this.$route.params.type && this.$route.params.type === 'quote') { |
|
|
if (this.$route.params && this.$route.params.type && this.$route.params.type === 'quote') { |
|
|
@ -2729,6 +2725,7 @@ export default { |
|
|
this.queryLoading = false |
|
|
this.queryLoading = false |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// ======== 分页相关方法 ======== |
|
|
// ======== 分页相关方法 ======== |
|
|
// 每页数 |
|
|
// 每页数 |
|
|
sizeChangeHandle (val) { |
|
|
sizeChangeHandle (val) { |
|
|
@ -2880,27 +2877,19 @@ export default { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// ======== 页签切换相关方法 ======== |
|
|
// ======== 页签切换相关方法 ======== |
|
|
/** |
|
|
|
|
|
* 明细页签选择替换 |
|
|
|
|
|
* @param tab |
|
|
|
|
|
* @param event |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 明细页签选择替换 |
|
|
tabDetailClick (tab, event) { |
|
|
tabDetailClick (tab, event) { |
|
|
// 刷新列表数据 |
|
|
// 刷新列表数据 |
|
|
this.refreshDetailTable() |
|
|
this.refreshDetailTable() |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* 子明细页签选择替换 |
|
|
|
|
|
* @param tab |
|
|
|
|
|
* @param event |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 子明细页签选择替换 |
|
|
tabSubDetailClick (tab, event) { |
|
|
tabSubDetailClick (tab, event) { |
|
|
// 刷新列表数据 |
|
|
// 刷新列表数据 |
|
|
this.refreshSubDetailTable() |
|
|
this.refreshSubDetailTable() |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* 刷新明细页签的table数据 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 刷新明细页签的table数据 |
|
|
refreshDetailTable () { |
|
|
refreshDetailTable () { |
|
|
if (this.detailTable === 'routing_detail') { |
|
|
if (this.detailTable === 'routing_detail') { |
|
|
|
|
|
|
|
|
@ -2908,9 +2897,8 @@ export default { |
|
|
this.searchRoutingTools() |
|
|
this.searchRoutingTools() |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* 刷新子明细页签的table数据 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 刷新子明细页签的table数据 |
|
|
refreshSubDetailTable () { |
|
|
refreshSubDetailTable () { |
|
|
if (this.subDetailTable === 'routing_sub_detail') { |
|
|
if (this.subDetailTable === 'routing_sub_detail') { |
|
|
|
|
|
|
|
|
@ -2918,16 +2906,8 @@ export default { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// ======== 列表数据操作方法 ======== |
|
|
// ======== 列表数据操作方法 ======== |
|
|
/** |
|
|
|
|
|
* 未知 |
|
|
|
|
|
* @returns {boolean} |
|
|
|
|
|
*/ |
|
|
|
|
|
selectFlag () { |
|
|
|
|
|
return true |
|
|
|
|
|
}, |
|
|
|
|
|
/** |
|
|
|
|
|
* 获取数据列表 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 获取数据列表 |
|
|
getDataList () { |
|
|
getDataList () { |
|
|
//如果是跳转过来的 要判断 |
|
|
//如果是跳转过来的 要判断 |
|
|
if (localStorage.getItem('routeData')) { |
|
|
if (localStorage.getItem('routeData')) { |
|
|
@ -2960,19 +2940,15 @@ export default { |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* 复选列表信息 |
|
|
|
|
|
* @param val |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 复选列表信息 |
|
|
selectionRouting (val) { |
|
|
selectionRouting (val) { |
|
|
this.routingSelections = val |
|
|
this.routingSelections = val |
|
|
this.$refs.selectDiv.setLengthselected(this.routingSelections.length) |
|
|
this.$refs.selectDiv.setLengthselected(this.routingSelections.length) |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* 查询 routingTools |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 查询 routingTools |
|
|
searchRoutingTools () { |
|
|
searchRoutingTools () { |
|
|
searchRoutingTools(this.modalData).then(({data}) => { |
|
|
searchRoutingTools(this.modalData).then(({data}) => { |
|
|
if (data && data.code === 0) { |
|
|
if (data && data.code === 0) { |
|
|
@ -2984,9 +2960,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// ======== 新增/编辑模态框 ======== |
|
|
// ======== 新增/编辑模态框 ======== |
|
|
/** |
|
|
|
|
|
* routing新增模态框 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// routing新增模态框 |
|
|
addModal () { |
|
|
addModal () { |
|
|
this.modalData = { |
|
|
this.modalData = { |
|
|
flag: '1', |
|
|
flag: '1', |
|
|
@ -3032,9 +3006,8 @@ export default { |
|
|
this.modalDisableFlag = false |
|
|
this.modalDisableFlag = false |
|
|
this.modalFlag = true |
|
|
this.modalFlag = true |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* routing编辑模态框 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// routing编辑模态框 |
|
|
async updateModal (row) { |
|
|
async updateModal (row) { |
|
|
this.modalData = { |
|
|
this.modalData = { |
|
|
flag: '2', |
|
|
flag: '2', |
|
|
@ -3072,9 +3045,8 @@ export default { |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* 新增替代模态框 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 新增替代模态框 |
|
|
saveRoutingDetail () { |
|
|
saveRoutingDetail () { |
|
|
if (this.modalData.partNo === '' || this.modalData.partNo == null) { |
|
|
if (this.modalData.partNo === '' || this.modalData.partNo == null) { |
|
|
this.$message.warning('请先选择Routing物料!') |
|
|
this.$message.warning('请先选择Routing物料!') |
|
|
@ -3127,9 +3099,8 @@ export default { |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* 替代编辑模态框 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 替代编辑模态框 |
|
|
updateRoutingDetail () { |
|
|
updateRoutingDetail () { |
|
|
if (this.modalData.partNo === '' || this.modalData.partNo == null) { |
|
|
if (this.modalData.partNo === '' || this.modalData.partNo == null) { |
|
|
this.$message.warning('请先选择Routing物料!') |
|
|
this.$message.warning('请先选择Routing物料!') |
|
|
@ -3181,9 +3152,8 @@ export default { |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* 新增子明细模态框 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 新增子明细模态框 |
|
|
saveComponentModal () { |
|
|
saveComponentModal () { |
|
|
if (this.detailData.alternativeNo === '' || this.detailData.alternativeNo == null) { |
|
|
if (this.detailData.alternativeNo === '' || this.detailData.alternativeNo == null) { |
|
|
this.$message.warning('请先选择替代!') |
|
|
this.$message.warning('请先选择替代!') |
|
|
@ -3240,9 +3210,7 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 编辑模态框 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 编辑模态框 |
|
|
updateComponentModal (row) { |
|
|
updateComponentModal (row) { |
|
|
// if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') { |
|
|
// if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') { |
|
|
// this.$message.warning('不可编辑的替代状态!') |
|
|
// this.$message.warning('不可编辑的替代状态!') |
|
|
@ -3284,9 +3252,8 @@ export default { |
|
|
this.componentDisableFlag = true |
|
|
this.componentDisableFlag = true |
|
|
this.componentSaveModal = true |
|
|
this.componentSaveModal = true |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* routingTool 新增模态框 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// routingTool 新增模态框 |
|
|
saveRoutingTool () { |
|
|
saveRoutingTool () { |
|
|
this.routingToolData = { |
|
|
this.routingToolData = { |
|
|
flag: '1', |
|
|
flag: '1', |
|
|
@ -3313,9 +3280,8 @@ export default { |
|
|
this.saveRoutingToolModal = true |
|
|
this.saveRoutingToolModal = true |
|
|
this.saveRoutingToolDisableModal = false |
|
|
this.saveRoutingToolDisableModal = false |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* routingTool 编辑模态框 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// routingTool 编辑模态框 |
|
|
updateToolModal (row) { |
|
|
updateToolModal (row) { |
|
|
this.routingToolData = { |
|
|
this.routingToolData = { |
|
|
flag: '2', |
|
|
flag: '2', |
|
|
@ -3344,9 +3310,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// ======== 新增/编辑/删除方法 ======== |
|
|
// ======== 新增/编辑/删除方法 ======== |
|
|
/** |
|
|
|
|
|
* routing新增/编辑 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// routing新增/编辑 |
|
|
saveData () { |
|
|
saveData () { |
|
|
if (this.modalData.partNo === '' || this.modalData.partNo == null) { |
|
|
if (this.modalData.partNo === '' || this.modalData.partNo == null) { |
|
|
this.$message.warning('请选择物料编码!') |
|
|
this.$message.warning('请选择物料编码!') |
|
|
@ -3433,23 +3397,18 @@ export default { |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* 新增编辑模态框关闭 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 新增编辑模态框关闭 |
|
|
closeModal () { |
|
|
closeModal () { |
|
|
//this.getDataList() |
|
|
|
|
|
this.modalFlag = false |
|
|
this.modalFlag = false |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* 新增编辑模态框关闭 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 新增编辑模态框关闭 |
|
|
closeModalX (done) { |
|
|
closeModalX (done) { |
|
|
//this.getDataList() |
|
|
|
|
|
done() |
|
|
done() |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* routing删除 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// routing删除 |
|
|
delModal () { |
|
|
delModal () { |
|
|
if(this.routingSelections.length === 0){ |
|
|
if(this.routingSelections.length === 0){ |
|
|
this.$message.warning('请勾选要删除的Routing!') |
|
|
this.$message.warning('请勾选要删除的Routing!') |
|
|
@ -3479,12 +3438,10 @@ export default { |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}).catch(() => { |
|
|
|
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* 查询物料 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 查询物料 |
|
|
queryPartList () { |
|
|
queryPartList () { |
|
|
this.partData.limit = this.pageSize2 |
|
|
this.partData.limit = this.pageSize2 |
|
|
this.partData.page = this.pageIndex2 |
|
|
this.partData.page = this.pageIndex2 |
|
|
@ -3532,10 +3489,7 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 双击选中物料 |
|
|
|
|
|
* @param row |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 双击选中物料 |
|
|
getRowData (row) { |
|
|
getRowData (row) { |
|
|
this.modalData.partNo = row.partNo |
|
|
this.modalData.partNo = row.partNo |
|
|
this.modalData.partDesc = row.partDesc |
|
|
this.modalData.partDesc = row.partDesc |
|
|
@ -3553,9 +3507,8 @@ export default { |
|
|
this.partModelFlag = false |
|
|
this.partModelFlag = false |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* 工艺类型改变 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 工艺类型改变 |
|
|
routingTypeChange () { |
|
|
routingTypeChange () { |
|
|
// 获取物料的routing版本号 |
|
|
// 获取物料的routing版本号 |
|
|
getRottingRevision(this.modalData).then(({data}) => { |
|
|
getRottingRevision(this.modalData).then(({data}) => { |
|
|
@ -3568,19 +3521,16 @@ export default { |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* 选中工序 |
|
|
|
|
|
* @param row |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 选中工序 |
|
|
getComponentRowData (row) { |
|
|
getComponentRowData (row) { |
|
|
this.routingToolData.operationId = row.operationId |
|
|
this.routingToolData.operationId = row.operationId |
|
|
this.routingToolData.operationNo = row.operationNo |
|
|
this.routingToolData.operationNo = row.operationNo |
|
|
this.routingToolData.operationName = row.operationName |
|
|
this.routingToolData.operationName = row.operationName |
|
|
this.componentPartModelFlag = false |
|
|
this.componentPartModelFlag = false |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* 工序列表 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 工序列表 |
|
|
queryOperationList () { |
|
|
queryOperationList () { |
|
|
if (this.routingToolData.alternativeNo === '' || this.routingToolData.alternativeNo == null) { |
|
|
if (this.routingToolData.alternativeNo === '' || this.routingToolData.alternativeNo == null) { |
|
|
this.$message.warning('请先选择替代!') |
|
|
this.$message.warning('请先选择替代!') |
|
|
@ -3667,9 +3617,7 @@ export default { |
|
|
this.toolModelFlag = false |
|
|
this.toolModelFlag = false |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 替代列表 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 替代列表 |
|
|
queryAlternativeList () { |
|
|
queryAlternativeList () { |
|
|
// 查询所有替代 |
|
|
// 查询所有替代 |
|
|
queryAlternativeListByPartNo(this.modalData).then(({data}) => { |
|
|
queryAlternativeListByPartNo(this.modalData).then(({data}) => { |
|
|
@ -3682,27 +3630,22 @@ export default { |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* 表格的新增 |
|
|
|
|
|
* @param row |
|
|
|
|
|
* @param rowIndex |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 表格的新增 |
|
|
rowClassName({ row, rowIndex }) { |
|
|
rowClassName({ row, rowIndex }) { |
|
|
row.xh = rowIndex + 1 |
|
|
row.xh = rowIndex + 1 |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* 单选框选中数据 |
|
|
|
|
|
* @param selection |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 单选框选中数据 |
|
|
componentSelectionChange(selection) { |
|
|
componentSelectionChange(selection) { |
|
|
this.checkedDetail = selection |
|
|
this.checkedDetail = selection |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
toolSelectionChange (selection) { |
|
|
toolSelectionChange (selection) { |
|
|
this.checkedTool = selection |
|
|
this.checkedTool = selection |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* 删除子物料 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 删除子物料 |
|
|
deleteComponentPart () { |
|
|
deleteComponentPart () { |
|
|
// if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') { |
|
|
// if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') { |
|
|
// this.$message.warning('不可编辑的替代状态!') |
|
|
// this.$message.warning('不可编辑的替代状态!') |
|
|
@ -3736,23 +3679,20 @@ export default { |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}).catch(() => { |
|
|
|
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* 子物料 |
|
|
|
|
|
* @param row |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 子物料 |
|
|
componentClickRow (row) { |
|
|
componentClickRow (row) { |
|
|
this.$refs.componentTable.toggleRowSelection(row) |
|
|
this.$refs.componentTable.toggleRowSelection(row) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
toolClickRow (row) { |
|
|
toolClickRow (row) { |
|
|
this.$refs.toolTable.toggleRowSelection(row) |
|
|
this.$refs.toolTable.toggleRowSelection(row) |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* 新增子明细方法 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 新增子明细方法 |
|
|
componentDataSave (isClose) { |
|
|
componentDataSave (isClose) { |
|
|
if (this.componentData.partNo === '' || this.componentData.partNo == null) { |
|
|
if (this.componentData.partNo === '' || this.componentData.partNo == null) { |
|
|
this.$message.warning('请选择主记录物料编码!') |
|
|
this.$message.warning('请选择主记录物料编码!') |
|
|
@ -3858,9 +3798,8 @@ export default { |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* 回车事件 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 回车事件 |
|
|
focusNextInput (index, type) { |
|
|
focusNextInput (index, type) { |
|
|
let aaa = '' |
|
|
let aaa = '' |
|
|
if (this.subDetailList.length - 1 === index) { |
|
|
if (this.subDetailList.length - 1 === index) { |
|
|
@ -3872,9 +3811,8 @@ export default { |
|
|
this.$refs[aaa].focus() |
|
|
this.$refs[aaa].focus() |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* 保存主表信息 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 保存主表信息 |
|
|
saveRoutingHeader () { |
|
|
saveRoutingHeader () { |
|
|
if (this.modalData.partNo === '' || this.modalData.partNo == null) { |
|
|
if (this.modalData.partNo === '' || this.modalData.partNo == null) { |
|
|
this.$message.warning('请先选择Routing物料!') |
|
|
this.$message.warning('请先选择Routing物料!') |
|
|
@ -3932,9 +3870,7 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 复制Routing的模态框 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 复制Routing的模态框 |
|
|
copyRoutingRevision () { |
|
|
copyRoutingRevision () { |
|
|
this.copyRoutingData = { |
|
|
this.copyRoutingData = { |
|
|
site: this.modalData.site, |
|
|
site: this.modalData.site, |
|
|
@ -3966,9 +3902,8 @@ export default { |
|
|
} |
|
|
} |
|
|
this.copyRoutingModelFlag = true |
|
|
this.copyRoutingModelFlag = true |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* 复制Routing的方法 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 复制Routing的方法 |
|
|
copyRouting () { |
|
|
copyRouting () { |
|
|
if (this.copyRoutingData.partNo === '' || this.copyRoutingData.partNo == null) { |
|
|
if (this.copyRoutingData.partNo === '' || this.copyRoutingData.partNo == null) { |
|
|
this.$message.warning('请选择Routing物料!') |
|
|
this.$message.warning('请选择Routing物料!') |
|
|
@ -4009,9 +3944,8 @@ export default { |
|
|
this.copyLoading = false |
|
|
this.copyLoading = false |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* 复制alternative的模态框 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 复制alternative的模态框 |
|
|
copyRoutingAlternative () { |
|
|
copyRoutingAlternative () { |
|
|
this.copyAlternativeData = { |
|
|
this.copyAlternativeData = { |
|
|
site: this.detailData.site, |
|
|
site: this.detailData.site, |
|
|
@ -4049,9 +3983,7 @@ export default { |
|
|
this.copyAlternativeModelFlag = true |
|
|
this.copyAlternativeModelFlag = true |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 工艺指导模态框 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 工艺指导模态框 |
|
|
workGuidelineModal (row) { |
|
|
workGuidelineModal (row) { |
|
|
this.workGuidelineData = { |
|
|
this.workGuidelineData = { |
|
|
site: this.modalData.site, |
|
|
site: this.modalData.site, |
|
|
@ -4068,9 +4000,8 @@ export default { |
|
|
this.getRoutingWorkGuideline() |
|
|
this.getRoutingWorkGuideline() |
|
|
this.queryWorkGuidelineModal = true |
|
|
this.queryWorkGuidelineModal = true |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* 获取 workGuideline |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 获取 workGuideline |
|
|
getRoutingWorkGuideline () { |
|
|
getRoutingWorkGuideline () { |
|
|
getRoutingWorkGuideline(this.workGuidelineData).then(({data}) => { |
|
|
getRoutingWorkGuideline(this.workGuidelineData).then(({data}) => { |
|
|
if (data && data.code === 0) { |
|
|
if (data && data.code === 0) { |
|
|
@ -4080,16 +4011,13 @@ export default { |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* 复选列表信息 |
|
|
|
|
|
* @param val |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 复选列表信息 |
|
|
selectionWorkGuideline (val) { |
|
|
selectionWorkGuideline (val) { |
|
|
this.workGuidelineSelections = val |
|
|
this.workGuidelineSelections = val |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* workGuideline 新增模态框 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// workGuideline 新增模态框 |
|
|
saveWorkGuideline () { |
|
|
saveWorkGuideline () { |
|
|
this.saveWorkGuidelineData = { |
|
|
this.saveWorkGuidelineData = { |
|
|
flag: '1', |
|
|
flag: '1', |
|
|
@ -4125,9 +4053,8 @@ export default { |
|
|
this.saveWorkGuidelineModal = true |
|
|
this.saveWorkGuidelineModal = true |
|
|
this.workGuidelineDisableModal = false |
|
|
this.workGuidelineDisableModal = false |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* workGuideline 编辑模态框 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// workGuideline 编辑模态框 |
|
|
updateWorkGuidelineModal (row) { |
|
|
updateWorkGuidelineModal (row) { |
|
|
this.saveWorkGuidelineData = { |
|
|
this.saveWorkGuidelineData = { |
|
|
flag: '2', |
|
|
flag: '2', |
|
|
@ -4157,9 +4084,8 @@ export default { |
|
|
this.saveWorkGuidelineModal = true |
|
|
this.saveWorkGuidelineModal = true |
|
|
this.workGuidelineDisableModal = true |
|
|
this.workGuidelineDisableModal = true |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* workGuideline 新增方法 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// workGuideline 新增方法 |
|
|
workGuidelineCommit () { |
|
|
workGuidelineCommit () { |
|
|
if (this.saveWorkGuidelineData.guidelineSeq === '' || this.saveWorkGuidelineData.guidelineSeq == null) { |
|
|
if (this.saveWorkGuidelineData.guidelineSeq === '' || this.saveWorkGuidelineData.guidelineSeq == null) { |
|
|
this.$message.warning('请输入序号!') |
|
|
this.$message.warning('请输入序号!') |
|
|
@ -4221,9 +4147,8 @@ export default { |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* 删除 workGuideline |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 删除 workGuideline |
|
|
deleteModal () { |
|
|
deleteModal () { |
|
|
if(this.workGuidelineSelections.length === 0){ |
|
|
if(this.workGuidelineSelections.length === 0){ |
|
|
this.$message.warning('请勾选要删除的工艺指导!') |
|
|
this.$message.warning('请勾选要删除的工艺指导!') |
|
|
@ -4254,14 +4179,10 @@ export default { |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}).catch(() => { |
|
|
|
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 复制alternative的方法 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 复制alternative的方法 |
|
|
copyAlternative () { |
|
|
copyAlternative () { |
|
|
if (this.copyAlternativeData.partNo === '' || this.copyAlternativeData.partNo == null) { |
|
|
if (this.copyAlternativeData.partNo === '' || this.copyAlternativeData.partNo == null) { |
|
|
this.$message.warning('请选择Routing物料!') |
|
|
this.$message.warning('请选择Routing物料!') |
|
|
@ -4279,10 +4200,6 @@ export default { |
|
|
this.$message.warning('请填写替代编码!') |
|
|
this.$message.warning('请填写替代编码!') |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
// if (this.copyAlternativeData.alternativeDescription === '' || this.copyAlternativeData.alternativeDescription == null) { |
|
|
|
|
|
// this.$message.warning('请填写替代名称!') |
|
|
|
|
|
// return |
|
|
|
|
|
// } |
|
|
|
|
|
this.copyAlternativeData.previousVersion = this.detailData |
|
|
this.copyAlternativeData.previousVersion = this.detailData |
|
|
this.copyLoading = true |
|
|
this.copyLoading = true |
|
|
copyAlternative(this.copyAlternativeData).then(({data}) => { |
|
|
copyAlternative(this.copyAlternativeData).then(({data}) => { |
|
|
@ -4306,9 +4223,7 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 新增替代方法 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 新增替代方法 |
|
|
detailDataSave () { |
|
|
detailDataSave () { |
|
|
if (this.saveDetailData.partNo === '' || this.saveDetailData.partNo == null) { |
|
|
if (this.saveDetailData.partNo === '' || this.saveDetailData.partNo == null) { |
|
|
this.$message.warning('请先选择Routing物料!') |
|
|
this.$message.warning('请先选择Routing物料!') |
|
|
@ -4376,11 +4291,9 @@ export default { |
|
|
this.saveDetailLoading = false |
|
|
this.saveDetailLoading = false |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* 删除替代 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 删除替代 |
|
|
deleteRoutingDetail () { |
|
|
deleteRoutingDetail () { |
|
|
if (this.detailData.alternativeNo === '' || this.detailData.alternativeNo == null) { |
|
|
if (this.detailData.alternativeNo === '' || this.detailData.alternativeNo == null) { |
|
|
this.$message.warning('请选择要删除的替代编码!') |
|
|
this.$message.warning('请选择要删除的替代编码!') |
|
|
@ -4413,12 +4326,10 @@ export default { |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}).catch(() => { |
|
|
|
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* 修改替代状态为 Buildable |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 修改替代状态为 Buildable |
|
|
updateStatusToBuildable () { |
|
|
updateStatusToBuildable () { |
|
|
this.$confirm(`是否修改状态为Buildable?`, '提示', { |
|
|
this.$confirm(`是否修改状态为Buildable?`, '提示', { |
|
|
confirmButtonText: '确定', |
|
|
confirmButtonText: '确定', |
|
|
@ -4443,12 +4354,10 @@ export default { |
|
|
this.alternativeChange() |
|
|
this.alternativeChange() |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}).catch(() => { |
|
|
|
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* 修改替代状态为 Obsolete |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 修改替代状态为 Obsolete |
|
|
updateStatusToObsolete () { |
|
|
updateStatusToObsolete () { |
|
|
this.$confirm(`是否修改状态为Obsolete?`, '提示', { |
|
|
this.$confirm(`是否修改状态为Obsolete?`, '提示', { |
|
|
confirmButtonText: '确定', |
|
|
confirmButtonText: '确定', |
|
|
@ -4472,12 +4381,10 @@ export default { |
|
|
this.alternativeChange() |
|
|
this.alternativeChange() |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}).catch(() => { |
|
|
|
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* 替代改变事件 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 替代改变事件 |
|
|
alternativeChange () { |
|
|
alternativeChange () { |
|
|
queryRoutingComponent(this.detailData).then(({data}) => { |
|
|
queryRoutingComponent(this.detailData).then(({data}) => { |
|
|
if (data && data.code === 0) { |
|
|
if (data && data.code === 0) { |
|
|
@ -4517,9 +4424,7 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 新增 routingTool |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 新增 routingTool |
|
|
routingToolSave () { |
|
|
routingToolSave () { |
|
|
if (this.routingToolData.alternativeNo === '' || this.routingToolData.alternativeNo == null) { |
|
|
if (this.routingToolData.alternativeNo === '' || this.routingToolData.alternativeNo == null) { |
|
|
this.$message.warning('请选择替代!') |
|
|
this.$message.warning('请选择替代!') |
|
|
@ -4573,9 +4478,8 @@ export default { |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* 删除 routingTool |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 删除 routingTool |
|
|
deleteRoutingTool () { |
|
|
deleteRoutingTool () { |
|
|
if (this.checkedTool.length === 0) { |
|
|
if (this.checkedTool.length === 0) { |
|
|
this.$message.warning('请选择要删除的工具!') |
|
|
this.$message.warning('请选择要删除的工具!') |
|
|
@ -4605,7 +4509,6 @@ export default { |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}).catch(() => { |
|
|
|
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
@ -4631,26 +4534,9 @@ export default { |
|
|
this.componentData.laborSetupTime = val |
|
|
this.componentData.laborSetupTime = val |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
handleInputB (value, type) { |
|
|
|
|
|
const reg = /^(([1-9]?\d{0,1}(\.\d{1,2})?)|100|100\.(0){1,2})$/ |
|
|
|
|
|
if (type === 1) { |
|
|
|
|
|
if (reg.test(value) === true) { |
|
|
|
|
|
this.componentData.efficiencyFactor = value |
|
|
|
|
|
} else if (value > 100) { |
|
|
|
|
|
this.componentData.efficiencyFactor = 100 |
|
|
|
|
|
} else { |
|
|
|
|
|
this.componentData.efficiencyFactor = 0 |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// ======== chooseList相关方法 ======== |
|
|
// ======== chooseList相关方法 ======== |
|
|
/** |
|
|
|
|
|
* 获取基础数据列表S |
|
|
|
|
|
* @param val |
|
|
|
|
|
* @param type |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 获取基础数据列表S |
|
|
getBaseList (val, type) { |
|
|
getBaseList (val, type) { |
|
|
this.tagNo = val |
|
|
this.tagNo = val |
|
|
this.tagNo1 = type |
|
|
this.tagNo1 = type |
|
|
@ -4672,10 +4558,8 @@ export default { |
|
|
this.$refs.baseList.init(val, strVal) |
|
|
this.$refs.baseList.init(val, strVal) |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* 列表方法的回调 |
|
|
|
|
|
* @param val |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 列表方法的回调 |
|
|
getBaseData (val) { |
|
|
getBaseData (val) { |
|
|
if (this.tagNo === 118) { |
|
|
if (this.tagNo === 118) { |
|
|
if (this.tagNo1 === 1) { |
|
|
if (this.tagNo1 === 1) { |
|
|
@ -4790,9 +4674,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// ======== 导出相关方法 ======== |
|
|
// ======== 导出相关方法 ======== |
|
|
/** |
|
|
|
|
|
* 导出excel |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 导出excel |
|
|
async createExportData () { |
|
|
async createExportData () { |
|
|
this.searchData.limit = -1 |
|
|
this.searchData.limit = -1 |
|
|
this.searchData.page = 1 |
|
|
this.searchData.page = 1 |
|
|
|