diff --git a/src/views/modules/part/bomSearch3.vue b/src/views/modules/part/bomSearch3.vue
index 884ea51..1f96cf7 100644
--- a/src/views/modules/part/bomSearch3.vue
+++ b/src/views/modules/part/bomSearch3.vue
@@ -93,11 +93,13 @@
+ ref="tree">
@@ -207,7 +209,7 @@ export default {
// ======== 选中的当前行数据 ========
headerCurrentRow: {},
defaultProps: {
- children: "informationList",
+ children: "list",
label: "id",
},
// ======== 数据列表 ========
@@ -756,7 +758,7 @@ export default {
* @param e
* @param node
*/
- handleNodeClick (e, node) {
+ handleNodeClick (e) {
// 查询替代子物料
getComponentPartList(e).then(({data}) => {
if (data && data.code === 0) {
@@ -809,8 +811,14 @@ export default {
getAlternativeTree(this.headerCurrentRow).then(({data}) => {
if (data && data.code === 0) {
this.treeData = data.rows
+ if (this.treeData.length > 0) {
+ this.$nextTick(() => {
+ this.$refs.tree.setCurrentKey(this.treeData[0].id);
+ this.handleNodeClick(this.treeData[0])
+ })
+ }
} else {
- this.treeData = []
+ this.$message.warning(data.msg)
}
})
},
diff --git a/src/views/modules/part/partInformation.vue b/src/views/modules/part/partInformation.vue
index 7324b66..71b504a 100644
--- a/src/views/modules/part/partInformation.vue
+++ b/src/views/modules/part/partInformation.vue
@@ -177,21 +177,34 @@
-
+
+ 物料分类
+
+
+
+
物料分类
-
-
-
+
商品组1
-
+
+ 商品组1
+
+
+
+
+ 商品组2
+
+
+
+
商品组2
@@ -203,7 +216,7 @@
-
+
属性模板
@@ -904,47 +917,71 @@
-
-
-
+
+ 物料分类
+
+
+
+
物料分类
-
-
-
+
商品组1
-
+
+ 商品组1
+
+
+
+
+ 商品组2
+
+
+
+
商品组2
@@ -80,9 +93,9 @@
-
+
属性模板
- 属性模板
+ 属性模板
@@ -1865,13 +1878,6 @@ export default {
trigger: ['blur','change']
}
],
- manufacturerName: [
- {
- required: true,
- message: ' ',
- trigger: ['blur','change']
- }
- ],
active: [
{
required: true,
@@ -1879,28 +1885,28 @@ export default {
trigger: ['blur','change']
}
],
- agentName: [
+ partType2: [
{
required: true,
message: ' ',
trigger: ['blur','change']
}
],
- partType2: [
+ familyID: [
{
required: true,
message: ' ',
trigger: ['blur','change']
}
],
- productGroupId4: [
+ productGroupId1: [
{
required: true,
message: ' ',
trigger: ['blur','change']
}
],
- lotTrackingCode: [
+ productGroupId2: [
{
required: true,
message: ' ',
@@ -2026,11 +2032,31 @@ export default {
this.$message.warning('请选择BU!')
return
}
+ if (this.modalData.active === '' || this.modalData.active == null) {
+ this.$message.warning('请选择是否在用!')
+ return
+ }
+ if (this.modalData.partType2 === '' || this.modalData.partType2 == null) {
+ this.$message.warning('请选择零件类型!')
+ return
+ }
if (this.modalData.umId2 === '' || this.modalData.umId2 == null) {
this.$message.warning('请选择计量单位!')
return
}
- if (this.modalData.tblBaseFlag === 'Y' && this.modalData.codeNo === '') {
+ if (this.modalData.partType2 === 'Purchased (raw)' && (this.modalData.familyID === '' || this.modalData.familyID == null)) {
+ this.$message.warning('请选择物料分类!')
+ return
+ }
+ if (this.modalData.partType2 !== 'Purchased (raw)' && (this.modalData.productGroupId1 === '' || this.modalData.productGroupId1 == null)) {
+ this.$message.warning('请选择商品组1!')
+ return
+ }
+ if (this.modalData.partType2 !== 'Purchased (raw)' && (this.modalData.productGroupId2 === '' || this.modalData.productGroupId2 == null)) {
+ this.$message.warning('请选择商品组2!')
+ return
+ }
+ if (this.modalData.codeNo === '' || this.modalData.codeNo == null) {
this.$message.warning('请选择属性模板!')
return
}