Browse Source

2024-03-14 报价修改

master
zelian_wu 2 years ago
parent
commit
615e82d877
  1. 1
      src/api/quotation/quoteOfRouting.js
  2. 30
      src/views/modules/quotation/sellForQuotation/quotationDetail/quoteRouting.vue
  3. 26
      src/views/modules/quotation/sellForQuotation/quoteDetail.vue

1
src/api/quotation/quoteOfRouting.js

@ -1,3 +1,4 @@
import {createAPI} from "../../utils/httpRequest";
export const getRoutingTreeStructure = (data)=>createAPI(`/quote/routing/tree/list`,'get',data);
export const searchQuoteRoutingHeader = (data)=>createAPI(`/quote/routing/header`,'get',data);

30
src/views/modules/quotation/sellForQuotation/quotationDetail/quoteRouting.vue

@ -46,6 +46,7 @@ export default {
site:this.detail.site,
testPartNo:this.detail.productNo
}
this.treeLoading = true;
getRoutingTreeStructure(params).then(({data})=>{
if (data && data.code === 0){
this.routingTreeStructure = data.rows;
@ -55,12 +56,41 @@ export default {
}else {
this.$message.warning(data.msg)
}
this.treeLoading = false;
}).catch((error)=>{
this.$message.error(error)
this.treeLoading = false;
})
},
changeSelect(){
if (this.selectRouting.length === 0){
this.updateQuoteRoutingList();
return
}
this.$confirm('此操作将更换材料信息, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.updateQuoteRoutingList();
}).catch(() => {
this.selectRouting = JSON.parse(JSON.stringify(this.copyRouting))
this.$nextTick(()=>{
this.$refs.tree.setCurrentKey(`${this.selectRouting[0]}-${this.selectRouting[1]}-${this.selectRouting[2]}`)
})
});
},
updateQuoteRoutingList(){
},
setSelectRouting(val){
if (val.length === 0){
this.getRoutingTreeStructure();
return
}
this.selectRouting = JSON.parse(JSON.stringify(val))
this.getRoutingTreeStructure();
// this.searchQuoteRoutingList();
}
}
}

26
src/views/modules/quotation/sellForQuotation/quoteDetail.vue

@ -12,6 +12,7 @@ import BillOfMateriel from "./quotationDetail/billOfMateriel.vue";
import {Decimal} from "decimal.js";
import {searchQuoteBomHeader, searchQuoteBomList} from "../../../../api/quotation/quoteOfBom";
import QuoteRouting from "./quotationDetail/quoteRouting.vue";
import {searchQuoteRoutingHeader} from "../../../../api/quotation/quoteOfRouting";
export default {
name:'quoteDetail',
@ -273,7 +274,30 @@ export default {
this.$refs.property.getPropertyTemplatesItem();//
this.$refs.tool.initQuotationToolData();//
this.searchQuoteBomList();//bom
this.$refs.routing.getRoutingTreeStructure();
this.searchQuoteRoutingHeader();// routing
})
},
searchQuoteRoutingHeader(){
let params = {
site:this.$store.state.user.site,
quoteDetailId:this.quotationDetail.quotationDetailId,
testPartNo:this.quotationDetail.productNo
}
searchQuoteRoutingHeader(params).then(({data})=>{
if (data && data.code === 0){
let row = data.row
let arr = [];
if (row){
arr[0] = row.version;
arr[1] = row.routingType;
arr[2] = row.alternativeNo;
}
this.$refs.routing.setSelectRouting(arr);
}else {
this.$message.warning(data.msg)
}
}).catch((error)=>{
this.$message.error(error)
})
},
searchQuoteBomList(){

Loading…
Cancel
Save