Browse Source

2025/7/7

java8
Aoi_Tori 6 months ago
parent
commit
1d076880f3
  1. 136
      src/views/modules/part/quicklyCreateBom.vue

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

@ -19,10 +19,13 @@
<el-form-item label=" ">
<el-button type="info" @click="updateInquiryDetailStatus()">完成</el-button>
</el-form-item>
<!-- <el-form-item label=" ">
<el-button type="primary" @click="handleBatchUpdatePart">物料属性批量维护</el-button>
</el-form-item>-->
</el-form>
<el-table
:height="70"
:data="dataList.slice(0,1)"
:data="dataList"
border
style="width: 100%;">
<el-table-column
@ -90,6 +93,10 @@
<a style="cursor: pointer" @click="queryPartList2(data)">已有料号</a>
<el-divider></el-divider>
<a style="cursor: pointer" @click="addPartModal(data)">新增料号</a>
<el-divider></el-divider>
<a style="cursor: pointer" @click="editTreeItem(data)">修改节点</a>
<el-divider></el-divider>
<a style="cursor: pointer" @click="deleteTreeItem(data)">删除节点</a>
<i style="color:#1c92e0" slot="reference" class="small-operation-btn el-icon-more"/>
</el-popover>
</div>
@ -123,7 +130,7 @@
<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-item label="父节点" prop="pId" :rules="nodeRules.parentNodeName">
<el-form-item v-if="this.nodeData.flag === '1'" label="父节点" prop="pId" :rules="nodeRules.parentNodeName">
<el-popover
ref="nodeListPopover"
placement="bottom-start"
@ -146,7 +153,7 @@
</el-popover>
<el-input style="width: 140px;" v-model="nodeData.parentNodeName" v-popover:nodeListPopover :readonly="true" class="node-list__input"></el-input>
</el-form-item>
<el-form-item label="子节点" :rules="nodeRules.id">
<el-form-item label="子节点" v-if="this.nodeData.flag === '1'" :rules="nodeRules.id">
<el-select v-model="nodeData.id" style="width: 100%;">
<el-option :label="item.nodeName" :value="item.id" v-for="item in childrenNodeList" :key="item.id"></el-option>
<el-option label="无" value="-1"></el-option>
@ -211,6 +218,67 @@
</el-footer>
</el-dialog>
<!-- 物料属性批量维护模态框-->
<el-dialog title="物料属性批量维护" :close-on-click-modal="false" v-drag :visible.sync="batchUpdateFlag" width="900px">
<div class="rq">
<el-button type="primary" @click="batchUpdateEdit">编辑</el-button>
<el-button type="primary" @click="batchUpdateSave">保存</el-button>
<el-table
:height="300"
:data="partList1"
@row-dblclick="getRowData"
border
style="width: 100%;">
<el-table-column
header-align="center"
align="center"
width="150"
fixed="right"
label="操作">
<div class="operation-view" style="display: inline-block; padding: 0px 5px; margin-left: 5px; color: #777777;">
<el-popover
placement="right"
width="80"
trigger="click">
<a style="cursor: pointer" @click="queryPartList2(scope.row)">已有料号</a>
<el-divider></el-divider>
<a style="cursor: pointer" @click="addPartModal(scope.row)">新增料号</a>
<i style="color:#1c92e0" slot="reference" class="small-operation-btn el-icon-more"/>
</el-popover>
</div>
</el-table-column>
<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="batchUpdateFlag=false">关闭</el-button>
</el-footer>
</el-dialog>
<!-- 新增物料 -->
<part-create :init-data="searchData" ref="PartCreate" @refreshPageTables="getBomInfo" @refreshPageTables2="getInfoByBomTemplate" v-drag></part-create>
@ -308,6 +376,7 @@ export default {
pageSize2: 20,
totalPage2: 0,
partList: [],
partList1: [],
searchData: {
site: '',
buNo: '',
@ -367,14 +436,14 @@ export default {
},
dataList: [
{
Family: '',
Orientation: '',
Lanes: '',
WebWidth: '',
PrintingLanes: null,
BodingPitch: null,
BondingLanes: null,
ConvertingUp: null,
// Family: '',
// Orientation: '',
// Lanes: '',
// WebWidth: '',
// PrintingLanes: null,
// BodingPitch: null,
// BondingLanes: null,
// ConvertingUp: null,
}
],
currentNode: {},
@ -570,7 +639,9 @@ export default {
resetAllLoading: false,
bomLoading: false,
routingLoading: false,
treeVisible: false
treeVisible: false,
addNodeFlag: true,
batchUpdateFlag: false
}
},
created () {
@ -579,7 +650,6 @@ export default {
//
this.favoriteIsOk()
//
this.getNodeTree()
// this.searchData = {
// site: '2',
// buNo: '03-RFID',
@ -598,7 +668,7 @@ export default {
this.searchData.partDesc = this.$route.query.data.testPartDesc
this.searchData.codeNo = this.$route.query.data.partCodeNo
this.getNodeTree();
this.getPartItem()
this.getPartItem();
}
},
methods: {
@ -677,6 +747,7 @@ export default {
site: data.site,
nodeId: data.nodeId,
nodeName: data.nodeName,
mainPart: this.searchData.partNo,
createBy: this.$store.state.user.name,
updateBy: this.$store.state.user.name,
}
@ -686,7 +757,7 @@ export default {
//
deleteTreeItem (data) {
this.$confirm('将删除该节点下的子节点数据!', '提示', {
this.$confirm('将删除该节点及其子节点数据!', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@ -1193,9 +1264,9 @@ export default {
recordType: 'IP'
}
getPartItem(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data && data.code === 0 && data.rows.length > 0) {
for (let i = 0; i < data.rows.length; i++) {
if (data.rows[i].itemDesc === 'Family1'){
/*if (data.rows[i].itemDesc === 'Family1'){
this.dataList[0].Family = data.rows[i].textValue
} else if (data.rows[i].itemDesc === 'Family2'){
this.dataList[0].Orientation = data.rows[i].textValue
@ -1211,13 +1282,42 @@ export default {
this.dataList[0].BondingLanes = data.rows[i].numValue
} else if (data.rows[i].itemDesc === 'CL60k-UP'){
this.dataList[0].ConvertingUp = data.rows[i].textValue
}*/
if (data.rows[i].itemDesc === 'Family1'){
this.$set(this.dataList[0], 'Family', data.rows[i].textValue);
} else if (data.rows[i].itemDesc === 'Family2'){
this.$set(this.dataList[0], 'Orientation', data.rows[i].textValue);
} else if (data.rows[i].itemDesc === 'Lanes0 web'){
this.$set(this.dataList[0], 'Lanes', data.rows[i].textValue);
} else if (data.rows[i].itemDesc === 'Lamination width'){
this.$set(this.dataList[0], 'WebWidth', data.rows[i].textValue);
} else if (data.rows[i].itemDesc === 'Printing lanes'){
this.$set(this.dataList[0], 'PrintingLanes', data.rows[i].numValue);
} else if (data.rows[i].itemDesc === 'Bonding Pitch'){
this.$set(this.dataList[0], 'BodingPitch', data.rows[i].numValue);
} else if (data.rows[i].itemDesc === '绑定列数'){
this.$set(this.dataList[0], 'BondingLanes', data.rows[i].numValue);
} else if (data.rows[i].itemDesc === 'CL60k-UP'){
this.$set(this.dataList[0], 'ConvertingUp', data.rows[i].textValue);
}
}
console.log(this.dataList[0])
} else {
this.dataList = []
}
})
},
handleBatchUpdatePart(){
this.batchUpdateFlag = true
},
batchUpdateEdit(){
},
batchUpdateSave(){
}
}

Loading…
Cancel
Save