|
|
|
@ -1,10 +1,11 @@ |
|
|
|
<script> |
|
|
|
import {queryQuoteDetailAllCost} from "../../../../../api/quote/quoteDetail"; |
|
|
|
import {Decimal} from "decimal.js"; |
|
|
|
import DictDataSelect from "../../../sys/dict-data-select.vue"; |
|
|
|
|
|
|
|
export default { |
|
|
|
name: "quoteDetailCost", |
|
|
|
components: {}, |
|
|
|
components: {DictDataSelect}, |
|
|
|
props: { |
|
|
|
quoteDetail: { |
|
|
|
type: Object, |
|
|
|
@ -71,28 +72,27 @@ export default { |
|
|
|
tagNo:undefined, |
|
|
|
type:undefined, |
|
|
|
|
|
|
|
allCheckedLabel:['工具','测试','其他','包装&运输'], |
|
|
|
allCheckedLabel:['工具','测试','其他','包装','运输'], |
|
|
|
// selectionChecked:[], |
|
|
|
checkAll:false, |
|
|
|
|
|
|
|
selection:undefined, |
|
|
|
|
|
|
|
totalPartCost:0, |
|
|
|
totalElseCost:0, |
|
|
|
} |
|
|
|
}, |
|
|
|
methods:{ |
|
|
|
computeCurrencyTotalCost(){ |
|
|
|
if (this.quoteDetail.exchangeRate1 && this.quoteDetail.exchangeRate1 > 0){ |
|
|
|
this.quoteDetail.currencyTotalCost1 = new Decimal(this.quoteDetail.totalCost).div(this.quoteDetail.exchangeRate1).toNumber(); |
|
|
|
} |
|
|
|
if (this.quoteDetail.exchangeRate2 && this.quoteDetail.exchangeRate2 > 0){ |
|
|
|
this.quoteDetail.currencyTotalCost2 = new Decimal(this.quoteDetail.totalCost).div(this.quoteDetail.exchangeRate2).toNumber(); |
|
|
|
} |
|
|
|
}, |
|
|
|
computeQuoteCurrencyTotalCost(){ |
|
|
|
if (this.quoteDetail.exchangeRate1 && this.quoteDetail.exchangeRate1 > 0){ |
|
|
|
this.quoteDetail.quoteCurrencyTotalCost1 = new Decimal(this.quoteDetail.quoteTotalCost).div(this.quoteDetail.exchangeRate1).toNumber(); |
|
|
|
} |
|
|
|
// if (this.quoteDetail.exchangeRate1 && this.quoteDetail.exchangeRate1 > 0){ |
|
|
|
// this.quoteDetail.currencyTotalCost1 = new Decimal(this.quoteDetail.totalCost).div(this.quoteDetail.exchangeRate1).toNumber(); |
|
|
|
// } |
|
|
|
// if (this.quoteDetail.exchangeRate2 && this.quoteDetail.exchangeRate2 > 0){ |
|
|
|
// this.quoteDetail.currencyTotalCost2 = new Decimal(this.quoteDetail.totalCost).div(this.quoteDetail.exchangeRate2).toNumber(); |
|
|
|
// } |
|
|
|
// 特殊处理 |
|
|
|
if (this.quoteDetail.exchangeRate2 && this.quoteDetail.exchangeRate2 > 0){ |
|
|
|
this.quoteDetail.quoteCurrencyTotalCost2 = new Decimal(this.quoteDetail.quoteTotalCost).div(this.quoteDetail.exchangeRate2).toNumber(); |
|
|
|
this.quoteDetail.currencyTotalCost2 = new Decimal(this.quoteDetail.taxUnitPrice).div(this.quoteDetail.exchangeRate2).toNumber() |
|
|
|
} |
|
|
|
}, |
|
|
|
computeTotalCost(){ |
|
|
|
@ -112,34 +112,17 @@ export default { |
|
|
|
if (this.selectionChecked.includes('测试')){ |
|
|
|
this.quoteDetail.totalCost += this.quoteDetail.adjustTestCost; |
|
|
|
} |
|
|
|
if (this.selectionChecked.includes('包装&运输')){ |
|
|
|
this.quoteDetail.totalCost += this.quoteDetail.otherCost; |
|
|
|
} |
|
|
|
this.computeCurrencyTotalCost(); |
|
|
|
this.computeProfitAmount(); |
|
|
|
}, |
|
|
|
computeQuoteTotalCost(){ |
|
|
|
// 报价总成本 |
|
|
|
this.quoteDetail.quoteTotalCost = |
|
|
|
this.quoteDetail.adjustBomUnYield + |
|
|
|
this.quoteDetail.adjustMachineCost + |
|
|
|
this.quoteDetail.adjustFabricateCost + |
|
|
|
this.quoteDetail.adjustLabourCost + |
|
|
|
this.quoteDetail.manageCost; |
|
|
|
if (this.selectionChecked.includes('其他')){ |
|
|
|
this.quoteDetail.quoteTotalCost += this.quoteDetail.adjustElseCost; |
|
|
|
} |
|
|
|
if (this.selectionChecked.includes('工具')){ |
|
|
|
this.quoteDetail.quoteTotalCost += this.quoteDetail.adjustToolCost; |
|
|
|
} |
|
|
|
if (this.selectionChecked.includes('测试')){ |
|
|
|
this.quoteDetail.quoteTotalCost += this.quoteDetail.adjustTestCost; |
|
|
|
if (this.selectionChecked.includes('包装')){ |
|
|
|
this.quoteDetail.totalCost += this.quoteDetail.packCost; |
|
|
|
} |
|
|
|
if (this.selectionChecked.includes('包装&运输')){ |
|
|
|
this.quoteDetail.quoteTotalCost += this.quoteDetail.otherCost; |
|
|
|
if (this.selectionChecked.includes('运输')){ |
|
|
|
this.quoteDetail.totalCost += this.quoteDetail.shippingCost; |
|
|
|
} |
|
|
|
this.computeQuoteCurrencyTotalCost(); |
|
|
|
this.computeQuoteProfitAmount(); |
|
|
|
// if (this.selectionChecked.includes('包装&运输')){ |
|
|
|
// this.quoteDetail.totalCost += this.quoteDetail.otherCost; |
|
|
|
// } |
|
|
|
this.computeProfitAmount(); |
|
|
|
this.computeCurrencyTotalCost(); |
|
|
|
}, |
|
|
|
computeProfitAmount(){ |
|
|
|
this.quoteDetail.profitAmount = |
|
|
|
@ -157,9 +140,10 @@ export default { |
|
|
|
this.quoteDetail.unitPrice = |
|
|
|
this.quoteDetail.totalPrice / this.quoteDetail.qty; |
|
|
|
this.quoteDetail.taxTotalPrice = |
|
|
|
this.quoteDetail.totalPrice + this.quoteDetail.totalPrice * (this.quoteDetail.taxRate / 100); |
|
|
|
this.quoteDetail.totalPrice + this.quoteDetail.totalPrice * ((this.quoteDetail.taxRate+this.quoteDetail.exchangeRate1) / 100); |
|
|
|
this.quoteDetail.taxUnitPrice = |
|
|
|
this.quoteDetail.taxTotalPrice / this.quoteDetail.qty; |
|
|
|
this.computeCurrencyTotalCost(); |
|
|
|
}, |
|
|
|
computeQuoteTaxCost(){ |
|
|
|
this.quoteDetail.quoteTotalPrice = |
|
|
|
@ -167,7 +151,7 @@ export default { |
|
|
|
this.quoteDetail.quoteUnitPrice = |
|
|
|
this.quoteDetail.quoteTotalPrice / this.quoteDetail.qty; |
|
|
|
this.quoteDetail.quoteTaxTotalPrice = |
|
|
|
this.quoteDetail.quoteTotalPrice + this.quoteDetail.quoteTotalPrice * (this.quoteDetail.quoteTaxRate / 100); |
|
|
|
this.quoteDetail.quoteTotalPrice + this.quoteDetail.quoteTotalPrice * (this.quoteDetail.quoteTaxRate+this.quoteDetail.exchangeRate1 / 100); |
|
|
|
this.quoteDetail.quoteTaxUnitPrice = |
|
|
|
this.quoteDetail.quoteTaxTotalPrice / this.quoteDetail.qty; |
|
|
|
}, |
|
|
|
@ -197,6 +181,8 @@ export default { |
|
|
|
this.quoteDetail.packCost = data.row.packCost; |
|
|
|
this.quoteDetail.shippingCost = data.row.shippingCost; |
|
|
|
this.quoteDetail.otherCost = data.row.otherCost; |
|
|
|
|
|
|
|
this.computedTotalPartCost();// 重新计算成本 |
|
|
|
}else { |
|
|
|
this.$message.warning(data.msg); |
|
|
|
} |
|
|
|
@ -206,20 +192,6 @@ export default { |
|
|
|
this.computeLoading = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
handleValidate(){ |
|
|
|
this.$refs.costForm.validate((valid,obj)=>{ |
|
|
|
if (!valid){ |
|
|
|
let i = 1; |
|
|
|
for (let item in obj){ |
|
|
|
this.$message.error(obj[item][0].message); |
|
|
|
if (i === 1){ |
|
|
|
return |
|
|
|
} |
|
|
|
i++; |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
changeAllCheck(val){ |
|
|
|
if (val){ |
|
|
|
this.selectionChecked = [...this.allCheckedLabel] |
|
|
|
@ -227,6 +199,40 @@ export default { |
|
|
|
this.selectionChecked = []; |
|
|
|
} |
|
|
|
}, |
|
|
|
computedTotalPartCost(){ |
|
|
|
this.totalPartCost = this.quoteDetail.adjustPartCost; |
|
|
|
if (this.selectionChecked.includes('工具')){ |
|
|
|
this.totalPartCost += this.quoteDetail.adjustToolCost; |
|
|
|
} |
|
|
|
if (this.selectionChecked.includes('测试')){ |
|
|
|
this.totalPartCost += this.quoteDetail.adjustTestCost; |
|
|
|
} |
|
|
|
if (this.selectionChecked.includes('其他')){ |
|
|
|
this.totalPartCost += this.quoteDetail.adjustElseCost; |
|
|
|
} |
|
|
|
if (this.selectionChecked.includes('包装')){ |
|
|
|
this.totalPartCost += this.quoteDetail.packCost; |
|
|
|
} |
|
|
|
if (this.selectionChecked.includes('运输')){ |
|
|
|
this.totalPartCost += this.quoteDetail.shippingCost; |
|
|
|
} |
|
|
|
this.totalElseCost = 0; |
|
|
|
if (!this.selectionChecked.includes('工具')){ |
|
|
|
this.totalElseCost += this.quoteDetail.adjustToolCost; |
|
|
|
} |
|
|
|
if (!this.selectionChecked.includes('测试')){ |
|
|
|
this.totalElseCost += this.quoteDetail.adjustTestCost; |
|
|
|
} |
|
|
|
if (!this.selectionChecked.includes('其他')){ |
|
|
|
this.totalElseCost += this.quoteDetail.adjustElseCost; |
|
|
|
} |
|
|
|
if (!this.selectionChecked.includes('包装')){ |
|
|
|
this.totalElseCost += this.quoteDetail.packCost; |
|
|
|
} |
|
|
|
if (!this.selectionChecked.includes('运输')){ |
|
|
|
this.totalElseCost += this.quoteDetail.shippingCost; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
watch:{ |
|
|
|
'quoteDetail.adjustPartCost'(newValue, oldValue){ |
|
|
|
@ -235,107 +241,78 @@ export default { |
|
|
|
} |
|
|
|
this.computeTotalCost(); |
|
|
|
}, |
|
|
|
'quoteDetail.adjustBomUnYield'(newValue, oldValue){ |
|
|
|
if (newValue === undefined || newValue === null){ |
|
|
|
this.quoteDetail.adjustBomUnYield = 0; |
|
|
|
} |
|
|
|
this.computeQuoteTotalCost(); |
|
|
|
}, |
|
|
|
'quoteDetail.adjustMachineCost'(newValue, oldValue){ |
|
|
|
if (newValue === undefined || newValue === null){ |
|
|
|
this.quoteDetail.adjustMachineCost = 0; |
|
|
|
} |
|
|
|
this.computeTotalCost(); |
|
|
|
this.computeQuoteTotalCost(); |
|
|
|
}, |
|
|
|
'quoteDetail.adjustFabricateCost'(newValue, oldValue){ |
|
|
|
if (newValue === undefined || newValue === null){ |
|
|
|
this.quoteDetail.adjustFabricateCost = 0; |
|
|
|
} |
|
|
|
this.computeTotalCost(); |
|
|
|
this.computeQuoteTotalCost(); |
|
|
|
}, |
|
|
|
'quoteDetail.adjustLabourCost'(newValue, oldValue){ |
|
|
|
if (newValue === undefined || newValue === null){ |
|
|
|
this.quoteDetail.adjustLabourCost = 0; |
|
|
|
} |
|
|
|
this.computeTotalCost(); |
|
|
|
this.computeQuoteTotalCost(); |
|
|
|
}, |
|
|
|
'quoteDetail.adjustToolCost'(newValue, oldValue){ |
|
|
|
if (newValue === undefined || newValue === null){ |
|
|
|
this.quoteDetail.adjustToolCost = 0; |
|
|
|
} |
|
|
|
this.computeTotalCost(); |
|
|
|
this.computeQuoteTotalCost(); |
|
|
|
}, |
|
|
|
'quoteDetail.adjustTestCost'(newValue, oldValue){ |
|
|
|
if (newValue === undefined || newValue === null){ |
|
|
|
this.quoteDetail.adjustTestCost = 0; |
|
|
|
} |
|
|
|
this.computeTotalCost(); |
|
|
|
this.computeQuoteTotalCost(); |
|
|
|
}, |
|
|
|
'quoteDetail.adjustElseCost'(newValue, oldValue){ |
|
|
|
if (newValue === undefined || newValue === null){ |
|
|
|
this.quoteDetail.adjustElseCost = 0; |
|
|
|
} |
|
|
|
this.computeTotalCost(); |
|
|
|
this.computeQuoteTotalCost(); |
|
|
|
}, |
|
|
|
'quoteDetail.manageCost'(newValue, oldValue){ |
|
|
|
if (newValue === undefined || newValue === null){ |
|
|
|
this.quoteDetail.manageCost = 0; |
|
|
|
} |
|
|
|
this.computeTotalCost(); |
|
|
|
this.computeQuoteTotalCost(); |
|
|
|
}, |
|
|
|
'quoteDetail.otherCost'(newValue, oldValue){ |
|
|
|
if (newValue === undefined || newValue === null){ |
|
|
|
this.quoteDetail.otherCost = 0; |
|
|
|
} |
|
|
|
this.computeTotalCost(); |
|
|
|
this.computeQuoteTotalCost(); |
|
|
|
}, |
|
|
|
'quoteDetail.profitRate'(newValue, oldValue){ |
|
|
|
if (newValue === undefined || newValue === null){ |
|
|
|
this.quoteDetail.profitRate = 0; |
|
|
|
} |
|
|
|
this.quoteDetail.quoteProfitRate = newValue; |
|
|
|
this.computeProfitAmount(); |
|
|
|
}, |
|
|
|
'quoteDetail.quoteProfitRate'(newValue, oldValue){ |
|
|
|
if (newValue === undefined || newValue === null){ |
|
|
|
this.quoteDetail.quoteProfitRate = 0; |
|
|
|
} |
|
|
|
this.quoteDetail.profitRate = newValue; |
|
|
|
this.computeQuoteProfitAmount(); |
|
|
|
this.computeTotalCost(); |
|
|
|
}, |
|
|
|
'quoteDetail.taxRate'(newValue, oldValue){ |
|
|
|
if (newValue === undefined || newValue === null){ |
|
|
|
this.quoteDetail.taxRate = 0; |
|
|
|
} |
|
|
|
this.computeTaxCost(); |
|
|
|
}, |
|
|
|
'quoteDetail.quoteTaxRate'(newValue, oldValue){ |
|
|
|
if (newValue === undefined || newValue === null){ |
|
|
|
this.quoteDetail.quoteTaxRate = 0; |
|
|
|
} |
|
|
|
this.computeQuoteTaxCost(); |
|
|
|
this.computeTotalCost(); |
|
|
|
}, |
|
|
|
'quoteDetail.exchangeRate1'(newValue, oldValue){ |
|
|
|
if (newValue === undefined || newValue === null){ |
|
|
|
this.quoteDetail.exchangeRate1 = 0; |
|
|
|
} |
|
|
|
this.computeCurrencyTotalCost(); |
|
|
|
this.computeQuoteCurrencyTotalCost(); |
|
|
|
this.computeTotalCost(); |
|
|
|
}, |
|
|
|
'quoteDetail.exchangeRate2'(newValue, oldValue){ |
|
|
|
if (newValue === undefined || newValue === null){ |
|
|
|
this.quoteDetail.exchangeRate2 = 0; |
|
|
|
} |
|
|
|
this.computeCurrencyTotalCost(); |
|
|
|
this.computeQuoteCurrencyTotalCost(); |
|
|
|
this.computeTotalCost(); |
|
|
|
}, |
|
|
|
'quoteDetail.quoteCurrencyTotalCost1'(newValue, oldValue){ |
|
|
|
if (newValue === undefined || newValue === null){ |
|
|
|
@ -371,7 +348,7 @@ export default { |
|
|
|
this.selection = newVal.join(',') |
|
|
|
this.quoteDetail.calculatedItems = this.selection; |
|
|
|
this.computeTotalCost(); |
|
|
|
this.computeQuoteTotalCost(); |
|
|
|
this.computedTotalPartCost(); |
|
|
|
}, |
|
|
|
get(){ |
|
|
|
if (this.selection === '' || this.selection === undefined || this.selection === null){ |
|
|
|
@ -379,7 +356,7 @@ export default { |
|
|
|
} |
|
|
|
return this.selection.split(',') |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
if (this.quoteDetail.calculatedItems){ |
|
|
|
@ -388,6 +365,7 @@ export default { |
|
|
|
this.$nextTick(()=>{ |
|
|
|
this.computeProfitAmount() |
|
|
|
this.computeQuoteProfitAmount() |
|
|
|
this.computedTotalPartCost();// 重新计算成本 |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
@ -412,44 +390,60 @@ export default { |
|
|
|
</el-checkbox-group> |
|
|
|
<a slot="reference">计入材料成本</a> |
|
|
|
</el-popover> |
|
|
|
|
|
|
|
<!-- <el-select v-model="showQuoteCost">--> |
|
|
|
<!-- <el-option label="报价成本" :value="true"></el-option>--> |
|
|
|
<!-- <el-option label="标准成本" :value="false"></el-option>--> |
|
|
|
<!-- </el-select>--> |
|
|
|
|
|
|
|
<!-- <el-checkbox v-model="isShowCost">显示系统自动计算结果</el-checkbox>--> |
|
|
|
<!-- <el-checkbox v-model="isShowOtherCost">显示其他成本</el-checkbox>--> |
|
|
|
<!-- <el-checkbox v-model="isShowRatePrice">显示税后金额</el-checkbox>--> |
|
|
|
<!--系统自动计算结果--> |
|
|
|
<el-form :model="quoteDetail" ref="costForm" :rules="rules" label-position="top" label-width="120px"> |
|
|
|
<fieldset v-show="isShowCost" |
|
|
|
style="margin-top: 2px;border: 1px solid #777;"> |
|
|
|
<legend>系统自动计算结果(料工费/工具)</legend> |
|
|
|
<div style="display: flex"> |
|
|
|
<fieldset v-show="isShowCost" |
|
|
|
style="margin-top: 5px;border: 1px solid #777;width: 50%"> |
|
|
|
<legend>系统自动计算结果(料工费)</legend> |
|
|
|
<el-row :gutter="10" > |
|
|
|
<el-col :span="8" v-show="!showQuoteCost"> |
|
|
|
<el-form-item label="材料成本:" prop="partCost" :show-message="false"> |
|
|
|
<el-input-number style="width: 100%; " :controls="false" v-model="quoteDetail.partCost" :precision="4" disabled/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="机器成本:" prop="machineCost" :show-message="false"> |
|
|
|
<el-input-number style="width: 100%; " :controls="false" |
|
|
|
v-model="quoteDetail.machineCost" :precision="4" disabled/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="人工成本:" prop="labourCost" :show-message="false"> |
|
|
|
<el-input-number style="width: 100%;" :controls="false" |
|
|
|
v-model="quoteDetail.labourCost" :precision="4" disabled/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</fieldset> |
|
|
|
<fieldset |
|
|
|
style="margin-top: 5px;border: 1px solid #777;width: 50%"> |
|
|
|
<legend>调整后成本(料工费)</legend> |
|
|
|
<el-row :gutter="10" > |
|
|
|
<el-col :span="8" v-show="!showQuoteCost"> |
|
|
|
<el-form-item label="材料成本:" prop="adjustPartCost" :show-message="false"> |
|
|
|
<el-input-number style="width: 100%;" :controls="false" |
|
|
|
v-model="quoteDetail.adjustPartCost" :disabled="quoteDetail.status === '下达'" :step="0" :precision="4" :min="0"/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="机器成本:" prop="adjustMachineCost" :show-message="false"> |
|
|
|
<el-input-number style="width: 100%;" :controls="false" |
|
|
|
v-model="quoteDetail.adjustMachineCost" :disabled="quoteDetail.status === '下达'" :step="0" :precision="4" :min="0"/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="人工成本:" prop="adjustLabourCost" :show-message="false"> |
|
|
|
<el-input-number style="width: 100%;" :controls="false" |
|
|
|
v-model="quoteDetail.adjustLabourCost" :disabled="quoteDetail.status === '下达'" :step="0" :precision="4" :min="0"/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</fieldset> |
|
|
|
</div> |
|
|
|
<fieldset style="margin-top: 5px;border: 1px solid #777;"> |
|
|
|
<legend>其他成本</legend> |
|
|
|
<el-row :gutter="10" > |
|
|
|
<el-col :span="4" v-show="!showQuoteCost"> |
|
|
|
<el-form-item label="材料成本:" prop="partCost" :show-message="false"> |
|
|
|
<el-input-number style="width: 100%; " :controls="false" v-model="quoteDetail.partCost" :precision="4" disabled/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" v-show="showQuoteCost"> |
|
|
|
<el-form-item label="材料报价成本:" prop="bomUnYield" :show-message="false"> |
|
|
|
<el-input-number style="width: 100%; " :controls="false" |
|
|
|
v-model="quoteDetail.bomUnYield" :precision="4" disabled/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label="机器成本:" prop="machineCost" :show-message="false"> |
|
|
|
<el-input-number style="width: 100%; " :controls="false" |
|
|
|
v-model="quoteDetail.machineCost" :precision="4" disabled/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label="人工成本:" prop="labourCost" :show-message="false"> |
|
|
|
<el-input-number style="width: 100%;" :controls="false" |
|
|
|
v-model="quoteDetail.labourCost" :precision="4" disabled/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label="工具成本:" prop="toolCost" :show-message="false"> |
|
|
|
<el-input-number style="width: 100%;" :controls="false" |
|
|
|
@ -468,93 +462,39 @@ export default { |
|
|
|
v-model="quoteDetail.elseCost" :precision="4" disabled/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</fieldset> |
|
|
|
<fieldset |
|
|
|
style="margin-top: 5px;border: 1px solid #777;"> |
|
|
|
<legend>调整后成本(料工费/工具)</legend> |
|
|
|
<el-row :gutter="10" > |
|
|
|
<el-col :span="4" v-show="!showQuoteCost"> |
|
|
|
<el-form-item label="材料成本:" prop="adjustPartCost" :show-message="false"> |
|
|
|
<el-input-number style="width: 100%;" :controls="false" |
|
|
|
v-model="quoteDetail.adjustPartCost" :disabled="quoteDetail.status === '下达'" :step="0" :precision="4" :min="0"/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" v-show="showQuoteCost"> |
|
|
|
<el-form-item label="材料报价成本:" prop="adjustBomUnYield" :show-message="false"> |
|
|
|
<el-input-number style="width: 100%;" :controls="false" |
|
|
|
v-model="quoteDetail.adjustBomUnYield" :disabled="quoteDetail.status === '下达'" :step="0" :precision="4" :min="0"/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label="机器成本:" prop="adjustMachineCost" :show-message="false"> |
|
|
|
<el-input-number style="width: 100%;" :controls="false" |
|
|
|
v-model="quoteDetail.adjustMachineCost" :disabled="quoteDetail.status === '下达'" :step="0" :precision="4" :min="0"/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label="人工成本:" prop="adjustLabourCost" :show-message="false"> |
|
|
|
<el-input-number style="width: 100%;" :controls="false" |
|
|
|
v-model="quoteDetail.adjustLabourCost" :disabled="quoteDetail.status === '下达'" :step="0" :precision="4" :min="0"/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label="工具成本:" prop="adjustToolCost" :show-message="false"> |
|
|
|
<el-input-number style="width: 100%;" :controls="false" |
|
|
|
v-model="quoteDetail.adjustToolCost" :disabled="quoteDetail.status === '下达'" :step="0" :precision="4" :min="0"/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label="测试成本:" prop="adjustTestCost" :show-message="false"> |
|
|
|
<el-form-item label="包装成本:"> |
|
|
|
<el-input-number style="width: 100%;" :controls="false" |
|
|
|
v-model="quoteDetail.adjustTestCost" :disabled="quoteDetail.status === '下达'" :step="0" :precision="4" :min="0"/> |
|
|
|
v-model="quoteDetail.packCost" :step="0" :precision="4" :min="0" disabled/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label="其他成本:" prop="adjustElseost" :show-message="false"> |
|
|
|
<el-input-number style="width: 100%;" :controls="false" |
|
|
|
v-model="quoteDetail.adjustElseCost" :disabled="quoteDetail.status === '下达'" :step="0" :precision="4" :min="0"/> |
|
|
|
<el-form-item label="运输成本:"> |
|
|
|
<el-input-number style="width: 100%; " :controls="false" |
|
|
|
v-model="quoteDetail.shippingCost" :step="0" :precision="4" :min="0" disabled/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</fieldset> |
|
|
|
<fieldset style="margin-top: 5px;border: 1px solid #777;" v-if="isShowOtherCost"> |
|
|
|
<legend>其他成本</legend> |
|
|
|
<fieldset style="margin-top: 5px;border: 1px solid #777;"> |
|
|
|
<legend>总成本</legend> |
|
|
|
<el-row :gutter="10" > |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label="管理成本:" prop="manageCost" :show-message="false"> |
|
|
|
<el-form-item label="总成本:" prop="totalCost" :show-message="false"> |
|
|
|
<el-input-number style="width: 100%;" :controls="false" |
|
|
|
v-model="quoteDetail.manageCost" :disabled="quoteDetail.status === '下达'" :step="0" :precision="4" :min="0"/> |
|
|
|
v-model="quoteDetail.totalCost" :step="0" :precision="4" :min="0" disabled/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label="包装成本:"> |
|
|
|
<el-form-item label="总材料成本:" :show-message="false"> |
|
|
|
<el-input-number style="width: 100%;" :controls="false" |
|
|
|
v-model="quoteDetail.packCost" :step="0" :precision="4" :min="0" disabled/> |
|
|
|
v-model="totalPartCost" :step="0" :precision="4" :min="0" disabled/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label="运输成本:"> |
|
|
|
<el-input-number style="width: 100%; " :controls="false" |
|
|
|
v-model="quoteDetail.shippingCost" :step="0" :precision="4" :min="0" disabled/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label="包装&运输:" prop="otherCost" :show-message="false"> |
|
|
|
<el-input-number style="width: 100%; " :controls="false" |
|
|
|
v-model="quoteDetail.otherCost" :disabled="quoteDetail.status === '下达'" :step="0" :precision="4" :min="0"/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" v-show="!showQuoteCost"> |
|
|
|
<el-form-item label="总成本:" prop="totalCost" :show-message="false"> |
|
|
|
<el-form-item label="额外添加其他成本:" :show-message="false"> |
|
|
|
<el-input-number style="width: 100%;" :controls="false" |
|
|
|
v-model="quoteDetail.totalCost" :step="0" :precision="4" :min="0" disabled/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" v-show="showQuoteCost"> |
|
|
|
<el-form-item label="报价总成本:" prop="quoteTotalCost" :show-message="false"> |
|
|
|
<el-input-number style="width: 100%;" :controls="false" |
|
|
|
v-model="quoteDetail.quoteTotalCost" :step="0" :precision="4" :min="0" disabled/> |
|
|
|
v-model="totalElseCost" :step="0" :precision="4" :min="0" disabled/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
@ -562,95 +502,68 @@ export default { |
|
|
|
<fieldset style="margin-top: 5px;border: 1px solid #777;"> |
|
|
|
<legend>利润</legend> |
|
|
|
<el-row :gutter="10" > |
|
|
|
<el-col :span="4" v-show="!showQuoteCost"> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label="利润率%:" prop="profitRate" :show-message="false"> |
|
|
|
<el-input-number style="width: 100%;" :controls="false" |
|
|
|
v-model="quoteDetail.profitRate" :disabled="quoteDetail.status === '下达'" :step="0" :min="0"/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" v-show="!showQuoteCost"> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label="利润额:" prop="profitAmount" :show-message="false"> |
|
|
|
<el-input-number style="width: 100%;" :controls="false" |
|
|
|
v-model="quoteDetail.profitAmount" :step="0" :precision="4" :min="0" disabled/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" v-show="showQuoteCost"> |
|
|
|
<el-form-item label="利润率%:" prop="quoteProfitRate" :show-message="false"> |
|
|
|
<el-input-number style="width: 100%;" :controls="false" |
|
|
|
v-model="quoteDetail.quoteProfitRate" :disabled="quoteDetail.status === '下达'" :step="0" :min="0"/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" v-show="showQuoteCost"> |
|
|
|
<el-form-item label="利润额:" prop="quoteProfitAmount" :show-message="false"> |
|
|
|
<el-input-number style="width: 100%;" :controls="false" |
|
|
|
v-model="quoteDetail.quoteProfitAmount" :step="0" :precision="4" :min="0" disabled/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</fieldset> |
|
|
|
<fieldset style="margin-top: 5px;border: 1px solid #777;"> |
|
|
|
<legend>最终价格</legend> |
|
|
|
<el-row :gutter="10" v-show="!showQuoteCost"> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label="未税总额:" prop="totalPrice" :show-message="false"> |
|
|
|
<el-input-number style="width: 100%;" :controls="false" |
|
|
|
v-model="quoteDetail.totalPrice" :step="0" :precision="4" :min="0" disabled/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-row :gutter="10"> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label="未税单价:" prop="unitPrice" :show-message="false"> |
|
|
|
<el-input-number style="width: 100%;" :controls="false" |
|
|
|
v-model="quoteDetail.unitPrice" :step="0" :min="0" :precision="6" disabled/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" v-if="isShowRatePrice"> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label="税率%:" prop="taxRate" :show-message="false"> |
|
|
|
<el-input-number style="width: 100%;" :controls="false" |
|
|
|
v-model="quoteDetail.taxRate" :disabled="quoteDetail.status === '下达'" :step="0" :min="0"/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" v-if="isShowRatePrice"> |
|
|
|
<el-form-item label="含税总额:" prop="taxTotalPrice" :show-message="false"> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label="其他税率%:" prop="exchangeRate1" :show-message="false"> |
|
|
|
<el-input-number style="width: 100%;" :controls="false" |
|
|
|
v-model="quoteDetail.taxTotalPrice" :step="0" :precision="4" :min="0" disabled/> |
|
|
|
v-model="quoteDetail.exchangeRate1" :disabled="quoteDetail.status === '下达'" :step="0" :min="0"/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" v-if="isShowRatePrice"> |
|
|
|
<el-form-item label="含税单价:" prop="taxUnitPrice" :show-message="false"> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label="含税单价(CNY):" prop="taxUnitPrice" :show-message="false"> |
|
|
|
<el-input-number style="width: 100%;" :controls="false" |
|
|
|
v-model="quoteDetail.taxUnitPrice" :step="0" :precision="6" :min="0" disabled/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row :gutter="10" v-show="showQuoteCost"> |
|
|
|
<el-row :gutter="10"> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label="未税总额:" prop="quoteTotalPrice" :show-message="false"> |
|
|
|
<el-input-number style="width: 100%;" :controls="false" |
|
|
|
v-model="quoteDetail.quoteTotalPrice" :step="0" :precision="4" :min="0" disabled/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label=" "></el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label="未税单价:" prop="quoteUnitPrice" :show-message="false"> |
|
|
|
<el-input-number style="width: 100%;" :controls="false" |
|
|
|
v-model="quoteDetail.quoteUnitPrice" :step="0" :min="0" :precision="6" disabled/> |
|
|
|
<el-form-item label="币种:"> |
|
|
|
<dict-data-select v-model="quoteDetail.currency2" |
|
|
|
clearable dict-type="plm_customer_information_customer_customer_currency" :use-default-value="true"></dict-data-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" v-if="isShowRatePrice"> |
|
|
|
<el-form-item label="税率%:" prop="quoteTaxRate" :show-message="false"> |
|
|
|
<el-input-number style="width: 100%;" :controls="false" |
|
|
|
v-model="quoteDetail.quoteTaxRate" :disabled="quoteDetail.status === '下达'" :step="0" :min="0"/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" v-if="isShowRatePrice"> |
|
|
|
<el-form-item label="含税总额:" prop="quoteTaxTotalPrice" :show-message="false"> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label="汇率%:"> |
|
|
|
<el-input-number style="width: 100%;" :controls="false" |
|
|
|
v-model="quoteDetail.quoteTaxTotalPrice" :step="0" :precision="4" :min="0" disabled/> |
|
|
|
v-model="quoteDetail.exchangeRate2" :disabled="quoteDetail.status === '下达'" :step="0" :min="0"/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" v-if="isShowRatePrice"> |
|
|
|
<el-form-item label="含税单价:" prop="quoteTaxUnitPrice" :show-message="false"> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label="含税单价:"> |
|
|
|
<el-input-number style="width: 100%;" :controls="false" |
|
|
|
v-model="quoteDetail.quoteTaxUnitPrice" :step="0" :precision="6" :min="0" disabled/> |
|
|
|
v-model="quoteDetail.currencyTotalCost2" disabled :step="0" :min="0" :precision="6"/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
|