|
|
|
@ -23,8 +23,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('104003001:save')" type="primary" @click="addModal()">新增</el-button> |
|
|
|
<el-button v-if="isAuth('104003001:delete')" type="primary" @click="delModal()">删除</el-button> |
|
|
|
<download-excel |
|
|
|
:fields="fields()" |
|
|
|
:data="exportData" |
|
|
|
@ -70,13 +70,11 @@ |
|
|
|
<el-link style="cursor:pointer;" v-if="!item.columnHidden" @click="toPartMenu(scope.row.ifsPartNo)"> |
|
|
|
{{ scope.row[item.columnProp] }} |
|
|
|
</el-link> |
|
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
|
|
|
style="width: 100px; height: 80px"/></span> |
|
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> |
|
|
|
</div> |
|
|
|
<div v-else> |
|
|
|
<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> |
|
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
@ -84,10 +82,11 @@ |
|
|
|
fixed="right" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
width="120" |
|
|
|
width="135" |
|
|
|
label="操作"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-link style="cursor: pointer" @click="updateModal(scope.row)">编辑</el-link> |
|
|
|
<el-link v-if="isAuth('104003001:details')" style="cursor: pointer" @click="detailsModal(scope.row)">详情</el-link> |
|
|
|
<el-link v-if="isAuth('104003001:update')" style="cursor: pointer" @click="updateModal(scope.row)">编辑</el-link> |
|
|
|
<el-link style="cursor: pointer" @click="checkOutToBom(scope.row.plmPartNo)">切换BOM</el-link> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
@ -108,14 +107,12 @@ |
|
|
|
</el-pagination> |
|
|
|
|
|
|
|
<!-- routing新增/编辑模态框 --> |
|
|
|
<el-dialog :close-on-click-modal="false" top="8vh" v-drag :before-close="closeModalX" :visible.sync="modalFlag" |
|
|
|
width="1110px"> |
|
|
|
<el-dialog :close-on-click-modal="false" top="8vh" v-drag :before-close="closeModalX" :visible.sync="modalFlag" width="1110px"> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 5px"> |
|
|
|
<el-form-item prop="partNo" :rules="rules.partNo"> |
|
|
|
<span v-if="!modalDisableFlag" slot="label" @click="queryPartList"><a herf="#">物料编码</a></span> |
|
|
|
<span v-else slot="label">物料编码</span> |
|
|
|
<el-input v-model="modalData.partNo" :disabled="modalDisableFlag" @blur="partNoBlur" |
|
|
|
style="width: 221px"></el-input> |
|
|
|
<el-input v-model="modalData.partNo" :disabled="modalDisableFlag" @blur="partNoBlur" style="width: 221px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'物料名称'" prop="partDesc" :rules="rules.partDesc"> |
|
|
|
<el-input v-model="modalData.partDesc" disabled style="width: 221px"></el-input> |
|
|
|
@ -124,16 +121,14 @@ |
|
|
|
<el-input v-model="modalData.printUnit" disabled style="width: 221px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'工艺类型'" prop="routingType" :rules="rules.routingType"> |
|
|
|
<el-select v-model="modalData.routingType" @change="routingTypeChange" :disabled="modalDisableFlag" |
|
|
|
style="width: 120px"> |
|
|
|
<el-select v-model="modalData.routingType" @change="routingTypeChange" :disabled="modalDisableFlag" style="width: 120px"> |
|
|
|
<el-option label="Manufacturing" value="Manufacturing"></el-option> |
|
|
|
<el-option label="Repair" value="Repair"></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="modalData" :rules="rules" |
|
|
|
style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item label="生效日期" prop="phaseInDate" :rules="rules.phaseInDate"> |
|
|
|
<el-date-picker |
|
|
|
style="width: 221px" |
|
|
|
@ -158,39 +153,34 @@ |
|
|
|
<el-input v-model="modalData.routingRevision" type="number" disabled style="width: 221px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-button v-if="modalData.flag === '1' && headerSaveFlag" :loading="saveHeaderLoading" type="primary" |
|
|
|
@click="saveRoutingHeader" style="margin-top: 23px;width: 120px">保存 |
|
|
|
<el-button v-if="modalData.flag === '1' && headerSaveFlag" :loading="saveHeaderLoading" type="primary" @click="saveRoutingHeader" style="margin-top: 23px;width: 120px">保存 |
|
|
|
</el-button> |
|
|
|
<el-button v-else-if="modalData.flag === '2'" type="primary" @click="copyRoutingRevision" |
|
|
|
style="margin-top: 23px;width: 120px">Copy |
|
|
|
<el-button v-else-if="modalData.flag === '2'" type="primary" @click="copyRoutingRevision" 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;"> |
|
|
|
<el-form-item label="备注"> |
|
|
|
<el-input type="textarea" v-model="modalData.noteText" :rows="3" resize='none' show-word-limit |
|
|
|
style="width: 1082px;height: 20px"></el-input> |
|
|
|
<el-input type="textarea" v-model="modalData.noteText" :rows="3" resize='none' show-word-limit style="width: 1082px;height: 20px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-tabs v-model="detailTable" style="margin-top: 50px; width: 100%" type="border-card" |
|
|
|
@tab-click="tabDetailClick" class="detail-tab"> |
|
|
|
<el-tabs v-model="detailTable" style="margin-top: 50px; width: 100%" type="border-card" @tab-click="tabDetailClick" class="detail-tab"> |
|
|
|
<!-- Routing明细信息页签 --> |
|
|
|
<el-tab-pane label="Routings" name="routing_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="saveRoutingDetail" style="margin-left: 7px">新增</el-button> |
|
|
|
<el-button type="primary" @click="deleteRoutingDetail">删除</el-button> |
|
|
|
<el-button type="primary" @click="updateRoutingDetail">编辑</el-button> |
|
|
|
<el-button v-if="modalData.flag === '2'" type="primary" @click="copyRoutingAlternative">Copy</el-button> |
|
|
|
<el-button v-if="detailData.status === 'Tentative' || detailData.status === 'Obsolete'" type="primary" |
|
|
|
@click="updateStatusToBuildable">Build |
|
|
|
<el-button v-if="detailData.status === 'Tentative' || detailData.status === 'Obsolete'" type="primary" @click="updateStatusToBuildable">Build |
|
|
|
</el-button> |
|
|
|
<el-button |
|
|
|
v-if="detailData.status === 'Buildable' && (modalData.effPhaseOutDate == null || modalData.effPhaseOutDate === '')" |
|
|
|
type="primary" @click="updateStatusToObsolete">Retire |
|
|
|
</el-button> |
|
|
|
<el-button v-if="modalData.flag === '2' && detailData.officialFlag !== 'Y'" type="primary" |
|
|
|
@click="toBecomeOfficialRouting" :loading="toBecomeOfficialLoading">转正式Routing |
|
|
|
<el-button v-if="modalData.flag === '2' && detailData.officialFlag !== 'Y'" type="primary" @click="toBecomeOfficialRouting" :loading="toBecomeOfficialLoading">转正式Routing |
|
|
|
</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
@ -214,15 +204,15 @@ |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" :model="detailData" style="margin-left: 7px"> |
|
|
|
<el-form-item label="备注"> |
|
|
|
<el-input type="textarea" v-model="detailData.detailNoteText" :rows="3" resize='none' show-word-limit |
|
|
|
readonly 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> |
|
|
|
</el-tab-pane> |
|
|
|
<!-- Routing工具页签 --> |
|
|
|
<el-tab-pane label="Routing Tools" name="routing_tool"> |
|
|
|
<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="saveRoutingTool" style="margin-left: 7px">新增</el-button> |
|
|
|
<el-button type="primary" @click="deleteRoutingTool">删除</el-button> |
|
|
|
</el-form-item> |
|
|
|
@ -248,11 +238,11 @@ |
|
|
|
: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> |
|
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
v-if="modalData.flag !== '3'" |
|
|
|
fixed="right" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
@ -265,12 +255,12 @@ |
|
|
|
</el-table> |
|
|
|
</el-tab-pane> |
|
|
|
</el-tabs> |
|
|
|
<el-tabs v-show="detailTable === 'routing_detail'" v-model="subDetailTable" style="width: 100%; min-height: 330px" |
|
|
|
type="border-card" @tab-click="tabSubDetailClick" class="sub_detail-tab"> |
|
|
|
<el-tabs v-show="detailTable === 'routing_detail'" v-model="subDetailTable" style="width: 100%; min-height: 330px" type="border-card" @tab-click="tabSubDetailClick" class="sub_detail-tab"> |
|
|
|
<!-- Routing子明细信息页签 --> |
|
|
|
<el-tab-pane label="Operations" name="routing_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> |
|
|
|
@ -297,11 +287,11 @@ |
|
|
|
: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> |
|
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
v-if="modalData.flag !== '3'" |
|
|
|
fixed="right" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
@ -316,17 +306,15 @@ |
|
|
|
</el-tab-pane> |
|
|
|
</el-tabs> |
|
|
|
<el-footer style="height:30px;margin-top:20px;text-align:center"> |
|
|
|
<el-button :loading="saveAllLoading" type="primary" @click="saveData()">保存</el-button> |
|
|
|
<el-button v-if="modalData.flag !== '3'" :loading="saveAllLoading" type="primary" @click="saveData()">保存</el-button> |
|
|
|
<el-button type="primary" @click="closeModal">关闭</el-button> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- 明细新增模态框 --> |
|
|
|
<el-dialog title="替代" :close-on-click-modal="false" v-drag :visible.sync="saveDetailModalFlag" width="730px"> |
|
|
|
<el-form :inline="true" label-position="top" :model="saveDetailData" :rules="detailRules" |
|
|
|
style="margin-left: 5px"> |
|
|
|
<el-form-item :label="'替代编码'" prop="alternativeNo" :disabled="saveDetailModalDisable" |
|
|
|
:rules="detailRules.alternativeNo"> |
|
|
|
<el-form :inline="true" label-position="top" :model="saveDetailData" :rules="detailRules" style="margin-left: 5px"> |
|
|
|
<el-form-item :label="'替代编码'" prop="alternativeNo" :disabled="saveDetailModalDisable" :rules="detailRules.alternativeNo"> |
|
|
|
<el-input v-model="saveDetailData.alternativeNo" style="width: 221px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'替代名称'" prop="alternativeDescription" :rules="detailRules.alternativeDescription"> |
|
|
|
@ -338,8 +326,7 @@ |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" :model="saveDetailData" style="margin-left: 5px"> |
|
|
|
<el-form-item label="备注"> |
|
|
|
<el-input type="textarea" v-model="saveDetailData.detailNoteText" :rows="3" resize='none' show-word-limit |
|
|
|
style="width: 690px;height: 20px"></el-input> |
|
|
|
<el-input type="textarea" v-model="saveDetailData.detailNoteText" :rows="3" resize='none' show-word-limit style="width: 690px;height: 20px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-footer style="height:35px;margin-top:65px;text-align:center"> |
|
|
|
@ -3421,6 +3408,30 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 详情 |
|
|
|
async detailsModal (row) { |
|
|
|
this.modalData = { |
|
|
|
...row, |
|
|
|
flag: '3', |
|
|
|
updateBy: this.$store.state.user.name |
|
|
|
} |
|
|
|
// 查routing明细 |
|
|
|
queryRoutingDetail(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.detailTable = 'routing_detail' |
|
|
|
this.modalDisableFlag = true |
|
|
|
this.modalFlag = true |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 新增替代模态框 |
|
|
|
saveRoutingDetail() { |
|
|
|
if (this.modalData.partNo === '' || this.modalData.partNo == null) { |
|
|
|
|