|
|
|
@ -24,8 +24,8 @@ |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="' '"> |
|
|
|
<el-button :loading="queryLoading" @click="getDataList()">查询</el-button> |
|
|
|
<el-button type="primary" @click="addModal()">新增</el-button> |
|
|
|
<el-button type="primary" @click="delModal()">删除</el-button> |
|
|
|
<el-button v-if="isAuth('104002003:save')" type="primary" @click="addModal()">新增</el-button> |
|
|
|
<el-button v-if="isAuth('104002003:delete')" type="primary" @click="delModal()">删除</el-button> |
|
|
|
<download-excel |
|
|
|
:fields="fields()" |
|
|
|
:data="exportData" |
|
|
|
@ -78,7 +78,8 @@ |
|
|
|
width="120" |
|
|
|
label="操作"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-link style="cursor: pointer" @click="updateModal(scope.row)">编辑</el-link> |
|
|
|
<el-link v-if="isAuth('104002003:update')" style="cursor: pointer" @click="updateModal(scope.row)">编辑</el-link> |
|
|
|
<el-link v-if="isAuth('104002003:details')" style="cursor: pointer" @click="detailsModal(scope.row)">详情</el-link> |
|
|
|
<el-link style="cursor: pointer" @click="checkOutToRouting(scope.row.partNo)">切换Routing</el-link> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
@ -164,7 +165,8 @@ |
|
|
|
<!-- Recipe明细信息页签 --> |
|
|
|
<el-tab-pane label="Product Structure" name="recipe_detail"> |
|
|
|
<el-form label-position="top" style="margin-top: -10px"> |
|
|
|
<el-form-item> |
|
|
|
<el-form-item v-if="modalData.flag === '3'"></el-form-item> |
|
|
|
<el-form-item v-else> |
|
|
|
<el-button type="primary" @click="saveRecipeDetail" style="margin-left: 7px">新增</el-button> |
|
|
|
<el-button type="primary" @click="deleteRecipeDetail">删除</el-button> |
|
|
|
<el-button type="primary" @click="updateRecipeDetail">编辑</el-button> |
|
|
|
@ -213,7 +215,8 @@ |
|
|
|
<!-- Recipe子明细信息页签 --> |
|
|
|
<el-tab-pane label="Components" name="recipe_sub_detail"> |
|
|
|
<el-form label-position="top" style="margin-top: 5px"> |
|
|
|
<el-form-item> |
|
|
|
<el-form-item v-if="modalData.flag === '3'"></el-form-item> |
|
|
|
<el-form-item v-else> |
|
|
|
<el-button type="primary" @click="saveComponentModal" style="margin-left: 7px">新增</el-button> |
|
|
|
<el-button type="primary" @click="deleteComponentPart">删除</el-button> |
|
|
|
</el-form-item> |
|
|
|
@ -244,6 +247,7 @@ |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
v-if="modalData.flag !== '3'" |
|
|
|
fixed="right" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
@ -2943,6 +2947,30 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 详情 |
|
|
|
async detailsModal (row) { |
|
|
|
this.modalData = { |
|
|
|
...row, |
|
|
|
flag: '3', |
|
|
|
updateBy: this.$store.state.user.name, |
|
|
|
} |
|
|
|
this.subDetailTable = 'recipe_sub_detail' |
|
|
|
// 查bom明细 |
|
|
|
queryRecipeDetail(this.modalData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.detailDataList = data.rows.detailList |
|
|
|
this.subDetailList = data.rows.componentList |
|
|
|
this.detailData = data.rows.detailData |
|
|
|
this.modalDisableFlag = true |
|
|
|
this.modalFlag = true |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 替代新增模态框 |
|
|
|
saveRecipeDetail () { |
|
|
|
if (this.modalData.partNo === '' || this.modalData.partNo == null) { |
|
|
|
|