-
+ 新增节点
刷新
批量Build
@@ -91,6 +123,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
保存
@@ -178,6 +239,7 @@ import RoutingCreate from "./routing_create.vue";
import PartCreate from "./part_create.vue";
import {updateInquiryDetailStatusAndPart} from "../../../api/inquiry/inquiryDetail";
import {EventBus} from "../../../main";
+import {getPartItem} from "../../../api/part/partInformation";
export default {
components: {
PartCreate,
@@ -191,12 +253,38 @@ export default {
handler: function (newV, oldV) {
this.nodeData.nodeId = this.nodeData.nodeId.toUpperCase()
}
+ },
+ 'nodeData.pId': {
+ deep: true,
+ handler: function (newV, oldV) {
+ if (!newV || newV.trim().length === 0) {
+ this.childrenNodeList = [];
+ return;
+ }
+ const findNodeById = (nodes, targetId) => {
+ for (let i = 0; i < nodes.length; i++) {
+ const node = nodes[i];
+ if (node.id === targetId) {
+ return node;
+ }
+ if (node.nodeList && node.nodeList.length > 0) {
+ const result = findNodeById(node.nodeList, targetId);
+ if (result) return result;
+ }
+ }
+ return null;
+ };
+ const foundNode = findNodeById(this.treeData1, newV);
+ this.childrenNodeList = foundNode ? foundNode.nodeList : [];
+ }
}
},
data () {
return {
activeTable: 'bom_info',
treeData: [],
+ treeData1: [],
+ childrenNodeList: [],
defaultProps: {
children: "nodeList",
label: "nodeName",
@@ -220,7 +308,8 @@ export default {
site: '',
buNo: '',
partNo: '',
- partDesc: ''
+ partDesc: '',
+ codeNo: '',
},
nodeData: {
flag: '',
@@ -229,8 +318,10 @@ export default {
nodeName: '',
id: '',
pId: '',
+ parentNodeName: '',
createBy: this.$store.state.user.name,
updateBy: this.$store.state.user.name,
+ mainPart: '',
},
partData: {
flag: '',
@@ -255,8 +346,148 @@ export default {
trigger: ['blur','change']
}
],
+ parentNodeName:[
+ {
+ required: true,
+ message: ' ',
+ trigger: ['blur','change']
+ }
+ ],
+ id:[
+ {
+ required: true,
+ message: ' ',
+ trigger: ['blur','change']
+ }
+ ]
},
+ dataList: [
+ {
+ Family: '',
+ Orientation: '',
+ Lanes: '',
+ WebWidth: '',
+ PrintingLanes: null,
+ BodingPitch: null,
+ BondingLanes: null,
+ ConvertingUp: null,
+ }
+ ],
currentNode: {},
+ columnList: [
+ {
+ userId: this.$store.state.user.name,
+ columnProp: 'Family',
+ headerAlign: 'left',
+ align: 'left',
+ columnLabel: 'Family',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 80
+ },
+ {
+ userId: this.$store.state.user.name,
+ columnProp: 'Orientation',
+ headerAlign: 'left',
+ align: 'left',
+ columnLabel: 'Orientation',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 80
+ },
+ {
+ userId: this.$store.state.user.name,
+ columnProp: 'Lanes',
+ headerAlign: 'left',
+ align: 'left',
+ columnLabel: 'Lanes',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 80
+ },
+ {
+ userId: this.$store.state.user.name,
+ columnProp: 'WebWidth',
+ headerAlign: 'left',
+ align: 'right',
+ columnLabel: 'Web width',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 80
+ },
+ {
+ userId: this.$store.state.user.name,
+ columnProp: 'PrintingLanes',
+ headerAlign: 'left',
+ align: 'right',
+ columnLabel: 'Printing lanes',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 80
+ },
+ {
+ userId: this.$store.state.user.name,
+ columnProp: 'BodingPitch',
+ headerAlign: 'left',
+ align: 'right',
+ columnLabel: 'Boding Pitch',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 80
+ },
+ {
+ userId: this.$store.state.user.name,
+ columnProp: 'BondingLanes',
+ headerAlign: 'left',
+ align: 'right',
+ columnLabel: 'Bonding lanes',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 80
+ },
+ {
+ userId: this.$store.state.user.name,
+ columnProp: 'ConvertingUp',
+ headerAlign: 'left',
+ align: 'right',
+ columnLabel: 'Converting up',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 80
+ }
+ ],
partColumnList: [
{
columnProp: 'partNo',
@@ -334,7 +565,8 @@ export default {
buildAllLoading: false,
resetAllLoading: false,
bomLoading: false,
- routingLoading: false
+ routingLoading: false,
+ treeVisible: false
}
},
created () {
@@ -360,7 +592,9 @@ export default {
if (this.$route.query.data) {
this.searchData = this.$route.query.data
this.searchData.partDesc = this.$route.query.data.testPartDesc
+ this.searchData.codeNo = this.$route.query.data.partCodeNo
this.getNodeTree();
+ this.getPartItem()
}
},
methods: {
@@ -391,7 +625,7 @@ export default {
})
},
- // 新增首节点
+ // 新增节点
addTree () {
this.nodeData = {
flag: '1',
@@ -401,25 +635,36 @@ export default {
pId: '0',
createBy: this.$store.state.user.name,
updateBy: this.$store.state.user.name,
+ mainPart: this.searchData.partNo,
+ }
+ this.treeData1 = [
+ {
+ id: '0',
+ nodeName: '首节点',
+ nodeList: []
+ }
+ ]
+ if (Array.isArray(this.treeData) && this.treeData.length > 0) {
+ this.treeData1[0].nodeList = [...this.treeData]
}
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
- },
+ // 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) {
@@ -929,11 +1174,58 @@ export default {
this.authDelete = !deleteFlag
},
+ nodeListTreeCurrentChangeHandle (data, node) {
+ this.nodeData.pId = data.id
+ this.nodeData.parentNodeName = data.nodeName
+ this.treeVisible = false
+ },
+
+ getPartItem() {
+ let tempData = {
+ site: this.$store.state.user.site,
+ buNo: this.searchData.buNo,
+ partNo: this.searchData.partNo,
+ codeNo: this.searchData.codeNo,
+ recordType: 'IP'
+ }
+ getPartItem(tempData).then(({data}) => {
+ if (data && data.code === 0) {
+ for (let i = 0; i < data.rows.length; i++) {
+ 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
+ } else if (data.rows[i].itemDesc === 'Lanes0 web'){
+ this.dataList[0].Lanes = data.rows[i].textValue
+ } else if (data.rows[i].itemDesc === 'Lamination width'){
+ this.dataList[0].WebWidth = data.rows[i].textValue
+ } else if (data.rows[i].itemDesc === 'Printing lanes'){
+ this.dataList[0].PrintingLanes = data.rows[i].numValue
+ } else if (data.rows[i].itemDesc === 'Bonding Pitch'){
+ this.dataList[0].BodingPitch = data.rows[i].numValue
+ } else if (data.rows[i].itemDesc === '绑定列数'){
+ this.dataList[0].BondingLanes = data.rows[i].numValue
+ } else if (data.rows[i].itemDesc === 'CL60k-UP'){
+ this.dataList[0].ConvertingUp = data.rows[i].textValue
+ }
+ }
+ console.log(this.dataList[0])
+ } else {
+ this.dataList = []
+ }
+ })
+ }
+
}
}