Browse Source

2025-01-14

快速创建BOM
java8
fengyuan_yang 1 year ago
parent
commit
0f54e389a3
  1. 13
      src/api/part/quicklyCreateBom.js
  2. 2
      src/views/modules/part/bomManagement.vue
  3. 2308
      src/views/modules/part/bom_create.vue
  4. 4
      src/views/modules/part/partInformation.vue
  5. 2016
      src/views/modules/part/part_create.vue
  6. 837
      src/views/modules/part/quicklyCreateBom.vue
  7. 60
      src/views/modules/part/routingManagement.vue
  8. 2528
      src/views/modules/part/routing_create.vue

13
src/api/part/quicklyCreateBom.js

@ -0,0 +1,13 @@
import { createAPI } from "@/utils/httpRequest.js";
export const getNodeTree = data => createAPI(`/part/quicklyBom/getNodeTree`,'post',data)
export const nodeSave = data => createAPI(`/part/quicklyBom/nodeSave`,'post',data)
export const nodeDelete = data => createAPI(`/part/quicklyBom/nodeDelete`,'post',data)
export const nodeEdit = data => createAPI(`/part/quicklyBom/nodeEdit`,'post',data)
export const getBomInformationByPartNo = data => createAPI(`/part/quicklyBom/getBomInformationByPartNo`,'post',data)
export const savePartInfo = data => createAPI(`/part/quicklyBom/savePartInfo`,'post',data)
export const saveBomHeader = data => createAPI(`/part/quicklyBom/saveBomHeader`,'post',data)
export const getRoutingInformationByPartNo = data => createAPI(`/part/quicklyBom/getRoutingInformationByPartNo`,'post',data)
export const saveRoutingHeader = data => createAPI(`/part/quicklyBom/saveRoutingHeader`,'post',data)
export const batchBuildInfo = data => createAPI(`/part/quicklyBom/batchBuildInfo`,'post',data)
export const resetNodePartInfo = data => createAPI(`/part/quicklyBom/resetNodePartInfo`,'post',data)

2
src/views/modules/part/bomManagement.vue

@ -201,7 +201,7 @@
<el-button type="primary" :loading="alternativeLoading" @click="updateBomDetail" style="margin-left: 7px">编辑</el-button> <el-button type="primary" :loading="alternativeLoading" @click="updateBomDetail" style="margin-left: 7px">编辑</el-button>
<el-button v-if="modalData.flag === '2'" type="primary" :loading="alternativeLoading" @click="copyBomAlternative">Copy</el-button> <el-button v-if="modalData.flag === '2'" type="primary" :loading="alternativeLoading" @click="copyBomAlternative">Copy</el-button>
<el-button v-if="detailData.status === 'Tentative' || detailData.status === 'Obsolete'" type="primary" :loading="alternativeLoading" @click="updateStatusToBuildable">Build</el-button> <el-button v-if="detailData.status === 'Tentative' || detailData.status === 'Obsolete'" type="primary" :loading="alternativeLoading" @click="updateStatusToBuildable">Build</el-button>
<el-button v-if="detailData.status === 'Buildable' && (modalData.effPhaseOutDate == null || modalData.effPhaseOutDate === '')" type="primary" :loading="alternativeLoading" @click="updateStatusToObsolete">Retire</el-button>
<el-button v-if="detailData.status === 'Buildable'" type="primary" :loading="alternativeLoading" @click="updateStatusToObsolete">Retire</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">

2308
src/views/modules/part/bom_create.vue
File diff suppressed because it is too large
View File

4
src/views/modules/part/partInformation.vue

@ -171,8 +171,6 @@
</el-form> </el-form>
<el-tabs v-model="inventoryPartTable" style="width: 100%;height: 305px;" type="border-card" @tab-click="inventoryPartClick"> <el-tabs v-model="inventoryPartTable" style="width: 100%;height: 305px;" type="border-card" @tab-click="inventoryPartClick">
<el-tab-pane label="General" name="General"> <el-tab-pane label="General" name="General">
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: -5px;">
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: -5px;"> <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: -5px;">
<el-form-item prop="umId2"> <el-form-item prop="umId2">
<span style="cursor: pointer" slot="label" @click="getBaseList(510)"><a herf="#">计量单位</a></span> <span style="cursor: pointer" slot="label" @click="getBaseList(510)"><a herf="#">计量单位</a></span>
@ -2346,7 +2344,7 @@
*/ */
addOrDelItem () { addOrDelItem () {
if (!this.attributeDialog) { if (!this.attributeDialog) {
this.$message.warning('请保存更改!')
this.$message.warning('请保存属性更改!')
return return
} }
this.itemSelections1 = null this.itemSelections1 = null

2016
src/views/modules/part/part_create.vue
File diff suppressed because it is too large
View File

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

@ -0,0 +1,837 @@
<template>
<div class="white-body-view">
<el-row :gutter="5">
<!-- 树形结构 -->
<el-col :span="7" :style="{height: this.height + 54 + 'px'}" style="display: block;overflow-y: scroll">
<el-card style="width: 99%">
<div slot="header" style="height: 20px;margin-top: -10px">
<el-button size="mini" type="primary" @click="addTree">添加</el-button>
<el-button size="mini" type="info" @click="getNodeTree">刷新</el-button>
<el-button size="mini" type="primary" :loading="buildAllLoading" @click="batchBuild">批量Build</el-button>
<el-button size="mini" type="primary" :loading="resetAllLoading" @click="resetNodePart">重置物料</el-button>
</div>
<div class="scroll-bar item">
<el-tree
id="my-tree"
class="tree-view structure-tree scroll-bar"
highlight-current
check-strictly
:data="treeData"
:default-expand-all=true
:props="defaultProps"
:expand-on-click-node=false
@node-click="handleNodeClick"
:auto-expand-parent=false>
<span slot-scope="{ node, data }" class="custom-tree-node">
<span class="tooltip">
<span class="add-f-s-14">{{ data.nodeName }}</span>
</span>
<div class="operation-view" style="display: inline-block; padding: 0px 5px; margin-left: 5px; color: #777777;">
<i style="color:#1c92e0" class="small-operation-btn el-icon-plus" @click="addTreeItem(data)"/>
<i style="color:#1c92e0" class="small-operation-btn el-icon-edit" @click="editTreeItem(data)"/>
<i style="color:#1c92e0" class="small-operation-btn el-icon-delete" @click="deleteTreeItem(data)"/>
<el-popover
placement="right"
width="80"
trigger="click">
<a style="cursor: pointer" @click="queryPartList2(data)">已有料号</a>
<el-divider></el-divider>
<a style="cursor: pointer" @click="addPartModal(data)">新增料号</a>
<i style="color:#1c92e0" slot="reference" class="small-operation-btn el-icon-more"/>
</el-popover>
</div>
</span>
</el-tree>
</div>
</el-card>
</el-col>
<!-- 数据 -->
<el-col :span="17">
<!-- 页签 -->
<el-tabs v-model="activeTable" style="width: 100%" type="border-card" @tab-click="refreshCurrentTabTable" class="customer-tab">
<!-- BOM页签 -->
<el-tab-pane label="产品BOM管理" name="bom_info">
<bom-create v-loading="bomLoading" ref="BomCreate" @refreshNode="refreshNode" @refreshBomLoading="refreshBomLoading" v-drag></bom-create>
</el-tab-pane>
<!-- Routing页签 -->
<el-tab-pane label="工艺路线管理" name="routing_info">
<routing-create v-loading="routingLoading" ref="RoutingCreate" @refreshRoutingLoading="refreshRoutingLoading" v-drag></routing-create>
</el-tab-pane>
</el-tabs>
</el-col>
</el-row>
<!-- 节点新增模态框 -->
<el-dialog title="节点" :close-on-click-modal="false" v-drag :visible.sync="nodeModalFlag" width="430px">
<el-form :inline="true" label-position="top" :model="nodeData" :rules="nodeRules" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="节点编码" prop="nodeId" :rules="nodeRules.nodeId">
<el-input v-model="nodeData.nodeId" :disabled="nodeModalDisableFlag" style="width: 140px"></el-input>
</el-form-item>
<el-form-item label="节点名称" prop="nodeName" :rules="nodeRules.nodeName">
<el-input v-model="nodeData.nodeName" style="width: 230px"></el-input>
</el-form-item>
</el-form>
<el-footer style="height:40px;margin-top: 10px;text-align:center">
<el-button type="primary" @click="saveNodeData()">保存</el-button>
<el-button type="primary" @click="nodeModalFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<!-- 物料模态框 -->
<el-dialog title="物料清单" :close-on-click-modal="false" v-drag :visible.sync="partModelFlag" width="900px">
<div class="rq">
<el-form :inline="true" label-position="top" :model="partData">
<el-form-item :label="'物料编码'">
<el-input v-model="partData.partNo" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'物料名称'">
<el-input v-model="partData.partDesc" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="' '">
<el-button type="primary" @click="queryPartList">查询</el-button>
</el-form-item>
</el-form>
<el-table
:height="300"
:data="partList"
@row-dblclick="getRowData"
border
style="width: 100%;">
<el-table-column
v-for="(item,index) in partColumnList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
: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>
</template>
</el-table-column>
</el-table>
<!-- 分页插件 -->
<el-pagination
@size-change="sizeChangeHandle2"
@current-change="currentChangeHandle2"
:current-page="pageIndex2"
:page-sizes="[20, 50, 100, 200, 500]"
:page-size="pageSize2"
:total="totalPage2"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
</div>
<el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="partModelFlag=false">关闭</el-button>
</el-footer>
</el-dialog>
<!-- 新增物料 -->
<part-create ref="PartCreate" @refreshPageTables="getBomInfo" v-drag></part-create>
<!-- chooseList模态框 -->
<ChooseList ref="baseList" @getBaseData="getBaseData"></ChooseList>
</div>
</template>
<script>
import {
getNodeTree,
nodeSave,
nodeDelete,
nodeEdit,
batchBuildInfo,
resetNodePartInfo
} from "@/api/part/quicklyCreateBom.js"
import {
queryPartListBom, // BOM
} from "@/api/part/bomManagement.js"
import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js'
import ChooseList from '@/views/modules/common/Chooselist_eam'
import {Decimal} from "decimal.js";
import BomCreate from "./bom_create.vue";
import RoutingCreate from "./routing_create.vue";
import PartCreate from "./part_create.vue";
export default {
components: {
PartCreate,
BomCreate,
RoutingCreate,
ChooseList
},
watch: {
nodeData: {
deep: true,
handler: function (newV, oldV) {
this.nodeData.nodeId = this.nodeData.nodeId.toUpperCase()
}
}
},
data () {
return {
activeTable: 'bom_info',
treeData: [],
defaultProps: {
children: "nodeList",
label: "nodeName",
},
menuId: this.$route.meta.menuId,
//
favorite: false,
exportData: [],
exportName: "节点" + this.dayjs().format('YYYYMMDDHHmmss'),
exportHeader: ["节点"],
exportFooter: [],
height: 200,
pageIndex: 1,
pageSize: 20,
totalPage: 0,
pageIndex2: 1,
pageSize2: 20,
totalPage2: 0,
partList: [],
nodeData: {
flag: '',
site: this.$store.state.user.site,
nodeId: '',
nodeName: '',
id: '',
pId: '',
createBy: this.$store.state.user.name,
updateBy: this.$store.state.user.name,
},
partData: {
site: '',
partNo: '',
partDesc: '',
page: 1,
limit: 10
},
nodeRules:{
nodeId:[
{
required: true,
message: ' ',
trigger: ['blur','change']
}
],
nodeName:[
{
required: true,
message: ' ',
trigger: ['blur','change']
}
],
},
currentNode: {},
partColumnList: [
{
columnProp: 'partNo',
headerAlign: "center",
align: "center",
columnLabel: '物料编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
columnProp: 'partDesc',
headerAlign: "center",
align: "center",
columnLabel: '物料名称',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
columnWidth: 300
},
{
columnProp: 'spec',
headerAlign: "center",
align: "center",
columnLabel: '规格型号',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
columnWidth: 300
},
{
columnProp: 'printUnitName',
headerAlign: "center",
align: "center",
columnLabel: '计量单位',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
columnWidth: 100
},
{
columnProp: 'partType2',
headerAlign: "center",
align: "center",
columnLabel: '零件类型',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
columnWidth: 100
},
{
columnProp: 'yieldRate',
headerAlign: "center",
align: "right",
columnLabel: '良品率',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
columnWidth: 100
},
],
// loading
//
nodeModalFlag: false,
nodeModalDisableFlag: false,
partModelFlag: false,
buildAllLoading: false,
resetAllLoading: false,
bomLoading: false,
routingLoading: false
}
},
created () {
//
this.getButtonAuthData()
//
this.favoriteIsOk()
//
this.getNodeTree()
},
mounted () {
this.$nextTick(() => {
this.height = window.innerHeight - 151
})
},
methods: {
//
sizeChangeHandle2 (val) {
this.pageSize2 = val
this.pageIndex2 = 1
this.queryPartList()
},
//
currentChangeHandle2 (val) {
this.pageIndex2 = val
this.queryPartList()
},
//
getNodeTree () {
let tempData = {
site: this.$store.state.user.site,
pId: '0'
}
getNodeTree(tempData).then(({data}) => {
if (data && data.code === 0) {
this.treeData = data.rows
}
})
},
//
addTree () {
this.nodeData = {
flag: '1',
site: this.$store.state.user.site,
nodeId: '',
nodeName: '',
pId: '0',
createBy: this.$store.state.user.name,
updateBy: this.$store.state.user.name,
}
this.nodeModalDisableFlag = false
this.nodeModalFlag = true
},
//
addTreeItem (data) {
this.nodeData = {
flag: '1',
site: this.$store.state.user.site,
nodeId: '',
nodeName: '',
pId: data.id,
createBy: this.$store.state.user.name,
updateBy: this.$store.state.user.name,
}
this.nodeModalDisableFlag = false
this.nodeModalFlag = true
},
//
editTreeItem (data) {
this.nodeData = {
flag: '2',
site: data.site,
nodeId: data.nodeId,
nodeName: data.nodeName,
createBy: this.$store.state.user.name,
updateBy: this.$store.state.user.name,
}
this.nodeModalDisableFlag = true
this.nodeModalFlag = true
},
//
deleteTreeItem (data) {
this.$confirm('将删除该节点下的子节点数据!', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
nodeDelete(data).then(({data}) => {
if (data && data.code === 0) {
this.getNodeTree()
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
})
},
// /
saveNodeData () {
if (this.nodeData.nodeId === '' || this.nodeData.nodeId == null) {
this.$message.warning('请输入节点编码!')
return
}
if (this.nodeData.nodeName === '' || this.nodeData.nodeName == null) {
this.$message.warning('请输入节点名称!')
return
}
if(this.nodeData.flag === '1') {
nodeSave(this.nodeData).then(({data}) => {
if (data && data.code === 0) {
this.getNodeTree()
this.nodeModalFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
} else {
nodeEdit(this.nodeData).then(({data}) => {
if (data && data.code === 0) {
this.getNodeTree()
this.nodeModalFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}
},
// build
batchBuild () {
let tempData = {
site: this.$store.state.user.site
}
this.$confirm('将所有节点的BOM和Routing状态改为Build!', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.buildAllLoading = true
batchBuildInfo(tempData).then(({data}) => {
if (data && data.code === 0) {
this.refreshCurrentTabTable()
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
this.buildAllLoading = false
})
})
},
//
resetNodePart() {
let tempData = {
site: this.$store.state.user.site
}
this.$confirm('将重置所有节点的关联物料!', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.resetAllLoading = true
resetNodePartInfo(tempData).then(({data}) => {
if (data && data.code === 0) {
this.currentNode = {}
this.getNodeTree()
this.refreshCurrentTabTable()
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
this.resetAllLoading = false
})
})
},
/**
* 刷新页签的table数据
*/
refreshCurrentTabTable () {
if (this.activeTable === 'bom_info') {
if (this.currentNode.partNo != null && this.currentNode.partNo.length > 0) {
this.getBomInfo2(this.currentNode)
} else {
this.$nextTick(() => {
this.$refs.BomCreate.init2()
})
}
} else if (this.activeTable === 'routing_info') {
if (this.currentNode.partNo != null && this.currentNode.partNo.length > 0) {
this.getRoutingInfo(this.currentNode)
} else {
this.$nextTick(() => {
this.$refs.RoutingCreate.init2()
})
}
}
},
queryPartList2(data) {
this.currentNode = data
this.queryPartList()
},
//
queryPartList () {
this.partData.limit = this.pageSize2
this.partData.page = this.pageIndex2
this.partData.site = this.nodeData.site
queryPartListBom(this.partData).then(({data}) => {
if (data && data.code === 0) {
this.partList = data.page.list
this.pageIndex2 = data.page.currPage
this.pageSize2 = data.page.pageSize
this.totalPage2 = data.page.totalCount
this.partModelFlag = true
} else {
this.partList = []
}
})
},
//
getRowData (row) {
let tempData = {
site: row.site,
buNo: row.buNo,
partNo: row.partNo,
bomType: 'Manufacturing',
partDesc: row.partDesc,
printUnit: row.printUnit,
printUnitName: row.printUnitName,
shrinkageFactor: new Decimal(100).sub(new Decimal(row.yieldRate)).toNumber(),
nodeId: this.currentNode.nodeId,
offFlag: '1'
}
//
this.$nextTick(() => {
this.$refs.BomCreate.init(tempData)
})
this.partModelFlag = false
},
//
addPartModal (data) {
this.currentNode = data
//
this.$nextTick(() => {
this.$refs.PartCreate.init()
})
},
// BOM
getBomInfo (row) {
let tempData = {
site: row.site,
buNo: row.buNo,
partNo: row.partNo,
bomType: 'Manufacturing',
nodeId: this.currentNode.nodeId,
offFlag: '1'
}
//
this.$nextTick(() => {
this.$refs.BomCreate.init(tempData)
})
},
// Routing
getRoutingInfo (row) {
this.routingLoading = true
let tempData = {
site: row.site,
buNo: row.buNo,
partNo: row.partNo,
partDesc: row.partDesc,
printUnit: row.printUnit,
printUnitName: row.printUnitName,
routingType: 'Manufacturing',
}
//
this.$nextTick(() => {
this.$refs.RoutingCreate.init(tempData)
})
},
//
handleNodeClick (e, node) {
this.currentNode = e
if (e.partNo != null && e.partNo.length > 0) {
if (this.activeTable === 'routing_info') {
this.getRoutingInfo(e)
} else {
this.getBomInfo2(e)
}
} else {
if (this.activeTable === 'routing_info') {
this.$nextTick(() => {
this.$refs.RoutingCreate.init2()
})
} else {
this.$nextTick(() => {
this.$refs.BomCreate.init2()
})
}
}
},
// BOM
getBomInfo2 (row) {
this.bomLoading = true
let tempData = {
site: row.site,
buNo: row.buNo,
partNo: row.partNo,
bomType: 'Manufacturing',
nodeId: this.currentNode.nodeId,
offFlag: '2'
}
//
this.$nextTick(() => {
this.$refs.BomCreate.init(tempData)
})
},
// BOMloading
refreshBomLoading () {
this.bomLoading = false
},
// Routingloading
refreshRoutingLoading () {
this.routingLoading = false
},
//
refreshNode (partNo) {
this.getNodeTree()
this.currentNode.partNo = partNo
},
// S
getBaseList (val, type) {
this.tagNo = val
this.$nextTick(() => {
let strVal = ''
if (val === 215) {
strVal = this.componentData.issueToLoc
}
this.$refs.baseList.init(val, strVal)
})
},
//
getBaseData (val) {
if (this.tagNo === 215) {
this.componentData.issueToLoc = val.location_id
this.componentData.issueToLocName = val.location_name
}
},
//
focusNextInput (index, type) {
let aaa = ''
if (this.subDetailList.length - 1 === index) {
aaa = `${type}0`
} else {
aaa = `${type}${index + 1}`
}
this.$nextTick(() => {
this.$refs[aaa].focus()
})
},
//
favoriteIsOk () {
let userFavorite = {
userId: this.$store.state.user.id,
languageCode: this.$i18n.locale
}
userFavoriteList(userFavorite).then(({data}) => {
for (let i = 0; i < data.list.length; i++) {
if (this.$route.meta.menuId === data.list[i].menuId) {
this.favorite = true
}
}
})
},
// OR
favoriteFunction() {
let userFavorite = {
userId: this.$store.state.user.id,
functionId: this.$route.meta.menuId,
}
if (this.favorite) {
removeUserFavorite(userFavorite).then(({data}) => {
this.$message.success(data.msg)
this.favorite = false
})
} else {
//
saveUserFavorite(userFavorite).then(({data}) => {
this.$message.success(data.msg)
this.favorite = true
})
}
},
//
getButtonAuthData () {
let searchFlag = this.isAuth(this.menuId+":search")
let saveFlag = this.isAuth(this.menuId+":save")
let updateFlag = this.isAuth(this.menuId+":update")
let deleteFlag = this.isAuth(this.menuId+":delete")
//
this.authSearch = !searchFlag
this.authSave = !saveFlag
this.authUpdate = !updateFlag
this.authDelete = !deleteFlag
},
}
}
</script>
<style lang="scss" scoped>
.white-body-view {
width: 100%;
min-width: 320px;
}
.structure-tree {
.el-scrollbar .el-scrollbar__wrap {
overflow-x: hidden;
}
#my-tree .el-tree > .el-tree-node {
min-width: 100%;
display: inline-block;
}
.el-tree-node__content {
margin-bottom: 10px;
}
.tooltip {
margin-right: 5px;
font-size: 13px;
border-radius: 4px;
box-sizing: border-box;
white-space: nowrap;
padding: 4px;
}
.operation-view {
display: inline-block;
padding: 0px 5px;
margin-left: 5px;
color: #777777;
}
.small-operation-btn {
margin: 0px 3px;
}
}
.el-icon-plus:hover {
color: #1c92e0;
}
.el-icon-edit:hover {
color: #1c92e0;
}
.el-icon-delete:hover {
color: #1c92e0;
}
::v-deep .el-tree {
color: #333333;
}
.el-table /deep/ .cell{
height: auto;
line-height: 1.5;
}
/deep/ .customer-tab .el-tabs__item {
height: 35px;
line-height: 38px;
font-size: 13px;
}
</style>

60
src/views/modules/part/routingManagement.vue

@ -258,7 +258,8 @@
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<el-footer style="height:30px;margin-top:20px;text-align:center"> <el-footer style="height:30px;margin-top:20px;text-align:center">
<el-button :loading="saveAllLoading" type="primary" @click="saveData">保存</el-button>
<el-button :loading="saveAllLoading" type="primary" @click="saveData(true)">应用</el-button>
<el-button :loading="saveAllLoading" type="primary" @click="saveData(false)">保存</el-button>
<el-button type="primary" @click="closeModal">关闭</el-button> <el-button type="primary" @click="closeModal">关闭</el-button>
</el-footer> </el-footer>
</el-dialog> </el-dialog>
@ -2692,7 +2693,7 @@ export default {
/** /**
* routing新增/编辑 * routing新增/编辑
*/ */
saveData () {
saveData (isClose) {
if (this.modalData.partNo === '' || this.modalData.partNo == null) { if (this.modalData.partNo === '' || this.modalData.partNo == null) {
this.$message.warning('请选择物料编码!') this.$message.warning('请选择物料编码!')
return return
@ -2738,45 +2739,29 @@ export default {
updateBy: this.$store.state.user.name, updateBy: this.$store.state.user.name,
informationList: this.subDetailList informationList: this.subDetailList
} }
if (this.modalData.flag === '1') {
this.saveAllLoading = true
routingManagementSave(tempData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.modalFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
this.saveAllLoading = true
routingManagementSave(tempData).then(({data}) => {
if (data && data.code === 0) {
if (isClose) {
this.updateModal(data.rows)
} else { } else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
this.saveAllLoading = false
})
} else {
this.saveAllLoading = true
routingManagementEdit(tempData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList() this.getDataList()
this.modalFlag = false this.modalFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
} }
this.saveAllLoading = false
})
}
this.modalFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
this.saveAllLoading = false
})
}, },
/** /**
@ -3063,7 +3048,6 @@ export default {
} else { } else {
this.componentDataSave2(isClose) this.componentDataSave2(isClose)
} }
}, },
componentDataSave2 (isClose) { componentDataSave2 (isClose) {

2528
src/views/modules/part/routing_create.vue
File diff suppressed because it is too large
View File

Loading…
Cancel
Save