Browse Source

RFQ bug

java8
han\hanst 5 months ago
parent
commit
f1ca97cebb
  1. 21
      src/views/modules/part/quicklyCreateBom.vue
  2. 28
      src/views/modules/quote/detail/primary/quoteDetailBom.vue

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

@ -11,10 +11,10 @@
<el-input v-model="searchData.partDesc" readonly style="width: 300px"></el-input>
</el-form-item>
<el-form-item label=" ">
<el-button type="primary" @click="queryPartListInfo">新增</el-button>
<el-button type="primary" @click="queryPartListInfo">选择物料</el-button>
</el-form-item>
<el-form-item label=" ">
<el-button type="info" @click="updatePartModal">维护</el-button>
<el-button type="primary" @click="updatePartModal">维护</el-button>
</el-form-item>
<el-form-item label=" ">
<el-button type="primary" @click="handleBatchUpdatePart">物料属性批量维护</el-button>
@ -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
},

28
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 {
<div>
<div style="margin-bottom: 10px">
<el-link style="margin-right: 20px;cursor: pointer" @click="handleCheckedVersion" v-if="quoteDetail.status === '草稿'">切换版本</el-link>
<el-link style="margin-right: 20px;cursor: pointer" @click="handleRefreshBomTree" type="success" v-if="quoteDetail.status === '草稿'">刷新BOM树</el-link>
<el-checkbox v-model="isAllBom">全级BOM结构</el-checkbox>
</div>
<el-container>

Loading…
Cancel
Save