Browse Source

20240910

java8
qiezi 1 year ago
parent
commit
7201901258
  1. 2
      src/api/quote/quoteDetail.js
  2. 45
      src/views/modules/quote/detail/primary/quoteDetailBom.vue
  3. 30
      src/views/modules/quote/detail/primary/quoteDetailCost.vue
  4. 37
      src/views/modules/quote/detail/primary/quoteDetailRouting.vue
  5. 149
      src/views/modules/quote/detail/quoteDetail.vue

2
src/api/quote/quoteDetail.js

@ -11,3 +11,5 @@ export const updateQuoteDetail = (data) => createAPI(`/quote/detail/update`,'pos
export const deleteQuoteDetail = (data) => createAPI(`/quote/detail/remove/${data.id}`,'post',data)
export const queryQuoteDetailAllCost = (data) => createAPI(`/quote/detail/cost`,'post',data)
export const queryQuoteDetailYield = (data) => createAPI(`/quote/detail/yield`,'post',data)

45
src/views/modules/quote/detail/primary/quoteDetailBom.vue

@ -195,10 +195,10 @@ export default {
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table4UnitPrice',
serialNumber: '5011Table4ActualPrice',
tableId: "5011Table4",
tableName: "报价材料信息",
columnProp: 'unitPrice',
columnProp: 'actualPrice',
headerAlign: "center",
align: "right",
columnLabel: '单位实际成本',
@ -219,22 +219,22 @@ export default {
columnProp: 'quotePrice',
headerAlign: "center",
align: "right",
columnLabel: '材料总成本',
columnLabel: '材料标准总成本',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: 'right',
columnWidth: 90,
columnWidth: 100,
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table4QuotePrice',
serialNumber: '5011Table4ActualQuotePrice',
tableId: "5011Table4",
tableName: "报价材料信息",
columnProp: 'quotePrice',
columnProp: 'actualQuotePrice',
headerAlign: "center",
align: "right",
columnLabel: '材料实际总成本',
@ -244,7 +244,7 @@ export default {
sortLv: 0,
status: true,
fixed: 'right',
columnWidth: 90,
columnWidth: 100,
},
],
props:{
@ -316,23 +316,32 @@ export default {
handleCheckedVersion(){
this.handleQueryQuoteDetailBomTreeVersion();
let node = this.$refs.tree.getCurrentNode();
this.bomEngChgLevel = {
partNo: node.partNo,
bomType: node.bomType,
buNo: node.buNo,
site: node.site,
engChgLevel: node.engChgLevel,
alternativeNo: node.alternativeNo,
if (node){
this.bomEngChgLevel = {
partNo: node.partNo,
bomType: node.bomType,
buNo: node.buNo,
site: node.site,
engChgLevel: node.engChgLevel,
alternativeNo: node.alternativeNo,
}
}
this.versionVisible = true
},
handleQueryQuoteDetailBomTreeVersion(){
let node = this.$refs.tree.getCurrentNode();
let params = {
site:node.site,
partNo:node.partNo,
bomType:node.bomType,
buNo:node.buNo,
site:this.quoteDetail.site,
partNo:this.quoteDetail.partNo,
buNo:this.quoteDetail.buNo,
}
if (node){
params = {
site:node.site,
partNo:node.partNo,
bomType:node.bomType,
buNo:node.buNo,
}
}
queryQuoteDetailBomTreeLevel(params).then(({data})=>{
if (data && data.code === 0){

30
src/views/modules/quote/detail/primary/quoteDetailCost.vue

@ -15,9 +15,13 @@ export default {
},
data(){
return {
computeLoading:false,
rules:{
adjustPartCost: [
{ required: true, message: "请输入材料成本", trigger: ["blur","change"] }
{ required: true, message: "请输入材料标准成本", trigger: ["blur","change"] }
],
adjustBomUnYield: [
{ required: true, message: "请输入材料实际成本", trigger: ["blur","change"] }
],
adjustMachineCost: [
{ required: true, message: "请输入机器成本", trigger: ["blur","change"] }
@ -50,6 +54,7 @@ export default {
computeTotalCost(){
this.quoteDetail.totalCost =
this.quoteDetail.adjustPartCost +
this.quoteDetail.adjustBomUnYield +
this.quoteDetail.adjustMachineCost +
this.quoteDetail.adjustFabricateCost +
this.quoteDetail.adjustLabourCost +
@ -77,8 +82,13 @@ export default {
let params = {
...this.quoteDetail
}
this.computeLoading = true
queryQuoteDetailAllCost(params).then(({data})=>{
if (data && data.code === 0){
this.quoteDetail.partCost = data.row.unitQuotePrice;
this.quoteDetail.adjustPartCost = data.row.unitQuotePrice;
this.quoteDetail.bomUnYield = data.row.actualQuotePrice;
this.quoteDetail.adjustBomUnYield = data.row.actualQuotePrice;
this.quoteDetail.toolCost = data.row.toolCost;
this.quoteDetail.adjustToolCost = data.row.toolCost;
this.quoteDetail.packCost = data.row.packCost;
@ -87,8 +97,10 @@ export default {
}else {
this.$message.warning(data.msg);
}
this.computeLoading = false
}).catch((error)=>{
this.$message.error(error);
this.computeLoading = false
})
}
},
@ -99,6 +111,12 @@ export default {
}
this.computeTotalCost();
},
'quoteDetail.adjustBomUnYield'(newValue, oldValue){
if (newValue === undefined || newValue === null){
this.quoteDetail.adjustPartCost = 0;
}
this.computeTotalCost();
},
'quoteDetail.adjustMachineCost'(newValue, oldValue){
if (newValue === undefined || newValue === null){
this.quoteDetail.adjustMachineCost = 0;
@ -154,7 +172,7 @@ export default {
<template>
<div>
<el-button type="primary" @click="handleQueryAllCost"> </el-button>
<el-button :loading="computeLoading" type="primary" @click="handleQueryAllCost"> </el-button>
<!--系统自动计算结果-->
<el-form :model="quoteDetail" ref="costForm" :rules="rules" label-position="top" label-width="120px">
<fieldset
@ -168,9 +186,9 @@ export default {
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="材料实际成本:" prop="partCost" :show-message="false">
<el-form-item label="材料实际成本:" prop="bomUnYield" :show-message="false">
<el-input-number style="width: 100%; " :controls="false"
v-model="quoteDetail.partCost" :precision="4" disabled/>
v-model="quoteDetail.bomUnYield" :precision="4" disabled/>
</el-form-item>
</el-col>
<el-col :span="4">
@ -210,9 +228,9 @@ export default {
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="材料实际成本:" prop="adjustPartCost" :show-message="false">
<el-form-item label="材料实际成本:" prop="adjustBomUnYield" :show-message="false">
<el-input-number style="width: 100%;" :controls="false"
v-model="quoteDetail.adjustPartCost" :step="0" :precision="4" :min="0"/>
v-model="quoteDetail.adjustBomUnYield" :step="0" :precision="4" :min="0"/>
</el-form-item>
</el-col>
<el-col :span="4">

37
src/views/modules/quote/detail/primary/quoteDetailRouting.vue

@ -319,6 +319,24 @@ export default {
fixed: '',
columnWidth: 100,
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table5ResourceNum',
tableId: "5011Table5",
tableName: "报价工艺信息",
columnProp: 'resourceNum',
headerAlign: "center",
align: "right",
columnLabel: '机台数量',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100,
},
{
userId: this.$store.state.user.name,
functionId: 5011,
@ -562,14 +580,19 @@ export default {
}
if (this.dataList.length > 0){
row = this.dataList[0];
}else {
this.$message.warning("为维护BOM结构")
return;
}
this.routing = {
partNo: node.partNo,
buNo: node.buNo,
site: node.site,
routingType: row.routingType,
routingRevision: row.routingRevision,
alternativeNo: row.alternativeNo,
if (node){
this.routing = {
partNo: node.partNo,
buNo: node.buNo,
site: node.site,
routingType: row.routingType,
routingRevision: row.routingRevision,
alternativeNo: row.alternativeNo,
}
}
this.handleQueryVersionList();
this.versionVisible = true;

149
src/views/modules/quote/detail/quoteDetail.vue

@ -3,7 +3,7 @@ import ProjectPartTable from "../../../../components/selector/table/projectPartT
import {queryProjectPart} from "../../../../api/project/projectPart";
import {
deleteQuoteDetail,
queryQuoteDetail,
queryQuoteDetail, queryQuoteDetailYield,
saveQuoteDetail,
updateQuoteDetail
} from "../../../../api/quote/quoteDetail";
@ -231,6 +231,43 @@ export default {
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table2BomUnYield',
tableId: '5011Table2',
tableName: '报价详情信息表',
columnProp: 'bomUnYield',
headerAlign: 'center',
align: 'right',
columnLabel: 'BOM Unyield',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table2AdjustBomUnYield',
tableId: '5011Table2',
tableName: '报价详情信息表',
columnProp: 'adjustBomUnYield',
headerAlign: 'center',
align: 'right',
columnLabel: '调整的BOM Unyield',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 130
},
{
userId: this.$store.state.user.name,
functionId: 5011,
@ -301,7 +338,8 @@ export default {
status: true,
fixed: '',
columnWidth: 120
},{
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table2OtherCost',
@ -474,6 +512,96 @@ export default {
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table2ProcessTime',
tableId: '5011Table2',
tableName: '报价详情信息表',
columnProp: 'processTime',
headerAlign: 'center',
align: 'right',
columnLabel: '处理时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table2Yield',
tableId: '5011Table2',
tableName: '报价详情信息表',
columnProp: 'yield',
headerAlign: 'center',
align: 'right',
columnLabel: 'Yield',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table2BomYield',
tableId: '5011Table2',
tableName: '报价详情信息表',
columnProp: 'bomYield',
headerAlign: 'center',
align: 'right',
columnLabel: 'BOM Yield',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table2ParentAttritionRate',
tableId: '5011Table2',
tableName: '报价详情信息表',
columnProp: 'parentAttritionRate',
headerAlign: 'center',
align: 'right',
columnLabel: '母件损耗率',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table2ChildAttritionRate',
tableId: '5011Table2',
tableName: '报价详情信息表',
columnProp: 'childAttritionRate',
headerAlign: 'center',
align: 'right',
columnLabel: '子件损耗率',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 5011,
@ -722,6 +850,7 @@ export default {
createBy:this.saveQuoteDetail.createBy,
active:'Y',
status:'草稿',
internalInquiryNo:this.quote.insideInquiryNo,
}
this.saveLoading = true;
saveQuoteDetail(params).then(({data})=>{
@ -761,6 +890,21 @@ export default {
this.$message.error(error);
})
},
handleComputeYield(row){
let params = {
id: row.id,
}
queryQuoteDetailYield(params).then(({data})=>{
if (data && data.code === 0){
this.$message.success(data.msg);
this.handleQueryQuoteDetail();
}else {
this.$message.warning(data.msg);
}
}).catch((error)=>{
this.$message.error(error);
})
}
},
watch:{
quote(newVal,oldVal){
@ -798,6 +942,7 @@ export default {
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="120">
<template slot-scope="scope">
<a type="text" @click="handleComputeYield(scope.row)">计算</a>
<a type="text" @click="handleSaveQuoteDetail(scope.row)">编辑</a>
<a type="text" @click="handleDeleteQuoteDetail(scope.row)">删除</a>
</template>

Loading…
Cancel
Save