diff --git a/src/views/modules/part/quicklyCreateBom.vue b/src/views/modules/part/quicklyCreateBom.vue
index 0b42817..fd4898a 100644
--- a/src/views/modules/part/quicklyCreateBom.vue
+++ b/src/views/modules/part/quicklyCreateBom.vue
@@ -11,10 +11,10 @@
- 新增
+ 选择物料
- 维护
+ 维护
物料属性批量维护
@@ -3568,13 +3568,26 @@ export default {
},
// 获取物料的Bom模板详情
- getInfoByBomTemplate (row) {
+ async getInfoByBomTemplate (row) {
this.searchData.site = row.site
this.searchData.buNo = row.buNo
this.searchData.partNo = row.partNo
this.searchData.partDesc = row.partDesc
this.searchData.testPartId = row.id
- this.getNodeTree()
+ await this.getNodeTree()
+ let tempData = {
+ site: this.$store.state.user.site,
+ buNo: this.searchData.buNo,
+ partNo: this.searchData.partNo,
+ codeNo: this.searchData.codeNo
+ }
+ await partInfoByMainPart(tempData).then(({data}) => {
+ if (data && data.code === 0){
+ this.$set(this, 'partList1', data.rows)
+ this.searchData.codeNo = this.partList1[0].codeNo
+ }
+ })
+ this.getPartItem();
this.partModelFlag = false
},
diff --git a/src/views/modules/quote/detail/primary/quoteDetailBom.vue b/src/views/modules/quote/detail/primary/quoteDetailBom.vue
index bc0cca0..36e5337 100644
--- a/src/views/modules/quote/detail/primary/quoteDetailBom.vue
+++ b/src/views/modules/quote/detail/primary/quoteDetailBom.vue
@@ -2,7 +2,8 @@
import {
queryQuoteDetailBomTree,
queryQuoteDetailBomTreeLevel,
- queryQuoteDetailBomTreeAlternative
+ queryQuoteDetailBomTreeAlternative,
+ refreshQuoteDetailBomTree
} from "@/api/quote/quoteDetailBomTree";
import {queryQuoteDetailBom} from "@/api/quote/quoteDetailBom";
import {changeQuoteDetailBomTree} from "../../../../../api/quote/quoteDetailBomTree";
@@ -507,6 +508,30 @@ export default {
this.quoteDetailBomVisible = false;
this.preValue = undefined
}
+ },
+ handleRefreshBomTree() {
+ this.$confirm('确定要刷新BOM树吗?这将重新从基础BOM数据加载,可能需要一些时间。', '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ this.queryTreeLoading = true;
+ refreshQuoteDetailBomTree(this.quoteDetail).then(({data}) => {
+ if (data && data.code === 0) {
+ this.$message.success('刷新成功');
+ // 重新加载树数据
+ this.handleQueryQuoteDetailBomTree();
+ } else {
+ this.$message.error(data.msg || '刷新失败');
+ this.queryTreeLoading = false;
+ }
+ }).catch((error) => {
+ this.$message.error('刷新失败:' + error);
+ this.queryTreeLoading = false;
+ });
+ }).catch(() => {
+ // 取消刷新
+ });
}
},
created() {
@@ -529,6 +554,7 @@ export default {