Browse Source

20241126

java8
qiezi 1 year ago
parent
commit
de10233be3
  1. 24
      src/views/modules/quote/detail/primary/quoteDetailBom.vue
  2. 123
      src/views/modules/quote/detail/primary/quoteDetailCost.vue
  3. 4
      src/views/modules/quote/detail/quoteDetail.vue
  4. 23
      src/views/modules/quote/primary/quoteTable.vue
  5. 10
      src/views/modules/quote/quoteDetailReport.vue

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

@ -127,7 +127,8 @@ export default {
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 90, columnWidth: 90,
}, {
},
{
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 5011, functionId: 5011,
serialNumber: '5011Table4ShrinkageFactor', serialNumber: '5011Table4ShrinkageFactor',
@ -144,7 +145,26 @@ export default {
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 90, columnWidth: 90,
}, {
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table4YieldRate',
tableId: "5011Table4",
tableName: "报价材料信息",
columnProp: 'yieldRate',
headerAlign: "center",
align: "right",
columnLabel: '良率%',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 90,
},
{
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 5011, functionId: 5011,
serialNumber: '5011Table4PrintUnitName', serialNumber: '5011Table4PrintUnitName',

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

@ -1,6 +1,7 @@
<script> <script>
import {queryQuoteDetailAllCost} from "../../../../../api/quote/quoteDetail"; import {queryQuoteDetailAllCost} from "../../../../../api/quote/quoteDetail";
import ChooseListEam from "../../../common/Chooselist_eam.vue"; import ChooseListEam from "../../../common/Chooselist_eam.vue";
import {Decimal} from "decimal.js";
export default { export default {
name: "quoteDetailCost", name: "quoteDetailCost",
@ -64,9 +65,26 @@ export default {
type:undefined, type:undefined,
isShowOtherCost:false, isShowOtherCost:false,
isShowRatePrice:false,
} }
}, },
methods:{ 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.exchangeRate2 && this.quoteDetail.exchangeRate2 > 0){
this.quoteDetail.quoteCurrencyTotalCost2 = new Decimal(this.quoteDetail.quoteTotalCost).div(this.quoteDetail.exchangeRate2).toNumber();
}
},
computeTotalCost(){ computeTotalCost(){
// //
this.quoteDetail.totalCost = this.quoteDetail.totalCost =
@ -77,6 +95,7 @@ export default {
this.quoteDetail.adjustToolCost + this.quoteDetail.adjustToolCost +
this.quoteDetail.manageCost + this.quoteDetail.manageCost +
this.quoteDetail.otherCost; this.quoteDetail.otherCost;
this.computeCurrencyTotalCost();
this.computeProfitAmount(); this.computeProfitAmount();
}, },
computeQuoteTotalCost(){ computeQuoteTotalCost(){
@ -89,6 +108,7 @@ export default {
this.quoteDetail.adjustToolCost + this.quoteDetail.adjustToolCost +
this.quoteDetail.manageCost + this.quoteDetail.manageCost +
this.quoteDetail.otherCost; this.quoteDetail.otherCost;
this.computeQuoteCurrencyTotalCost();
this.computeQuoteProfitAmount(); this.computeQuoteProfitAmount();
}, },
computeProfitAmount(){ computeProfitAmount(){
@ -204,8 +224,6 @@ export default {
this.computeTotalCost(); this.computeTotalCost();
}, },
'quoteDetail.adjustBomUnYield'(newValue, oldValue){ 'quoteDetail.adjustBomUnYield'(newValue, oldValue){
console.log(oldValue)
console.log(newValue)
if (newValue === undefined || newValue === null){ if (newValue === undefined || newValue === null){
this.quoteDetail.adjustBomUnYield = 0; this.quoteDetail.adjustBomUnYield = 0;
} }
@ -257,12 +275,14 @@ export default {
if (newValue === undefined || newValue === null){ if (newValue === undefined || newValue === null){
this.quoteDetail.profitRate = 0; this.quoteDetail.profitRate = 0;
} }
this.quoteDetail.quoteProfitRate = newValue;
this.computeProfitAmount(); this.computeProfitAmount();
}, },
'quoteDetail.quoteProfitRate'(newValue, oldValue){ 'quoteDetail.quoteProfitRate'(newValue, oldValue){
if (newValue === undefined || newValue === null){ if (newValue === undefined || newValue === null){
this.quoteDetail.quoteProfitRate = 0; this.quoteDetail.quoteProfitRate = 0;
} }
this.quoteDetail.profitRate = newValue;
this.computeQuoteProfitAmount(); this.computeQuoteProfitAmount();
}, },
'quoteDetail.taxRate'(newValue, oldValue){ 'quoteDetail.taxRate'(newValue, oldValue){
@ -281,11 +301,35 @@ export default {
if (newValue === undefined || newValue === null){ if (newValue === undefined || newValue === null){
this.quoteDetail.exchangeRate1 = 0; this.quoteDetail.exchangeRate1 = 0;
} }
this.computeCurrencyTotalCost();
this.computeQuoteCurrencyTotalCost();
}, },
'quoteDetail.exchangeRate2'(newValue, oldValue){ 'quoteDetail.exchangeRate2'(newValue, oldValue){
if (newValue === undefined || newValue === null){ if (newValue === undefined || newValue === null){
this.quoteDetail.exchangeRate2 = 0; this.quoteDetail.exchangeRate2 = 0;
} }
this.computeCurrencyTotalCost();
this.computeQuoteCurrencyTotalCost();
},
'quoteDetail.quoteCurrencyTotalCost1'(newValue, oldValue){
if (newValue === undefined || newValue === null){
this.quoteDetail.quoteCurrencyTotalCost1 = 0;
}
},
'quoteDetail.quoteCurrencyTotalCost2'(newValue, oldValue){
if (newValue === undefined || newValue === null){
this.quoteDetail.quoteCurrencyTotalCost2 = 0;
}
},
'quoteDetail.currencyTotalCost1'(newValue, oldValue){
if (newValue === undefined || newValue === null){
this.quoteDetail.currencyTotalCost1 = 0;
}
},
'quoteDetail.currencyTotalCost2'(newValue, oldValue){
if (newValue === undefined || newValue === null){
this.quoteDetail.currencyTotalCost2 = 0;
}
}, },
}, },
@ -309,6 +353,7 @@ export default {
<el-checkbox v-model="isShowCost">显示系统自动计算结果</el-checkbox> <el-checkbox v-model="isShowCost">显示系统自动计算结果</el-checkbox>
<el-checkbox v-model="isShowOtherCost">显示其他成本</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"> <el-form :model="quoteDetail" ref="costForm" :rules="rules" label-position="top" label-width="120px">
<fieldset v-show="isShowCost" <fieldset v-show="isShowCost"
@ -392,6 +437,18 @@ export default {
v-model="quoteDetail.adjustToolCost" :disabled="quoteDetail.status === '下达'" :step="0" :precision="4" :min="0"/> v-model="quoteDetail.adjustToolCost" :disabled="quoteDetail.status === '下达'" :step="0" :precision="4" :min="0"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4" v-show="!showQuoteCost">
<el-form-item label="标准总成本:" prop="totalCost" :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/>
</el-form-item>
</el-col>
</el-row> </el-row>
</fieldset> </fieldset>
<fieldset style="margin-top: 5px;border: 1px solid #777;" v-if="isShowOtherCost"> <fieldset style="margin-top: 5px;border: 1px solid #777;" v-if="isShowOtherCost">
@ -421,18 +478,6 @@ export default {
v-model="quoteDetail.otherCost" :disabled="quoteDetail.status === '下达'" :step="0" :precision="4" :min="0"/> v-model="quoteDetail.otherCost" :disabled="quoteDetail.status === '下达'" :step="0" :precision="4" :min="0"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4" v-show="!showQuoteCost">
<el-form-item label="标准总成本:" prop="totalCost" :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/>
</el-form-item>
</el-col>
</el-row> </el-row>
</fieldset> </fieldset>
<fieldset style="margin-top: 5px;border: 1px solid #777;"> <fieldset style="margin-top: 5px;border: 1px solid #777;">
@ -476,7 +521,7 @@ export default {
<legend>利润</legend> <legend>利润</legend>
<el-row :gutter="10" > <el-row :gutter="10" >
<el-col :span="4" v-show="!showQuoteCost"> <el-col :span="4" v-show="!showQuoteCost">
<el-form-item label="标准利润率%:" prop="profitRate" :show-message="false">
<el-form-item label="利润率%:" prop="profitRate" :show-message="false">
<el-input-number style="width: 100%;" :controls="false" <el-input-number style="width: 100%;" :controls="false"
v-model="quoteDetail.profitRate" :disabled="quoteDetail.status === '下达'" :step="0" :min="0"/> v-model="quoteDetail.profitRate" :disabled="quoteDetail.status === '下达'" :step="0" :min="0"/>
</el-form-item> </el-form-item>
@ -488,7 +533,7 @@ export default {
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4" v-show="showQuoteCost"> <el-col :span="4" v-show="showQuoteCost">
<el-form-item label="报价利润率%:" prop="quoteProfitRate" :show-message="false">
<el-form-item label="利润率%:" prop="quoteProfitRate" :show-message="false">
<el-input-number style="width: 100%;" :controls="false" <el-input-number style="width: 100%;" :controls="false"
v-model="quoteDetail.quoteProfitRate" :disabled="quoteDetail.status === '下达'" :step="0" :min="0"/> v-model="quoteDetail.quoteProfitRate" :disabled="quoteDetail.status === '下达'" :step="0" :min="0"/>
</el-form-item> </el-form-item>
@ -516,24 +561,41 @@ export default {
v-model="quoteDetail.unitPrice" :step="0" :min="0" :precision="6" disabled/> v-model="quoteDetail.unitPrice" :step="0" :min="0" :precision="6" disabled/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4">
<el-col :span="4" v-if="isShowRatePrice">
<el-form-item label="标准税率%:" prop="taxRate" :show-message="false"> <el-form-item label="标准税率%:" prop="taxRate" :show-message="false">
<el-input-number style="width: 100%;" :controls="false" <el-input-number style="width: 100%;" :controls="false"
v-model="quoteDetail.taxRate" :disabled="quoteDetail.status === '下达'" :step="0" :min="0"/> v-model="quoteDetail.taxRate" :disabled="quoteDetail.status === '下达'" :step="0" :min="0"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4">
<el-col :span="4" v-if="isShowRatePrice">
<el-form-item label="标准含税总额:" prop="taxTotalPrice" :show-message="false"> <el-form-item label="标准含税总额:" prop="taxTotalPrice" :show-message="false">
<el-input-number style="width: 100%;" :controls="false" <el-input-number style="width: 100%;" :controls="false"
v-model="quoteDetail.taxTotalPrice" :step="0" :precision="4" :min="0" disabled/> v-model="quoteDetail.taxTotalPrice" :step="0" :precision="4" :min="0" disabled/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4">
<el-col :span="4" v-if="isShowRatePrice">
<el-form-item label="标准含税单价:" prop="taxUnitPrice" :show-message="false"> <el-form-item label="标准含税单价:" prop="taxUnitPrice" :show-message="false">
<el-input-number style="width: 100%;" :controls="false" <el-input-number style="width: 100%;" :controls="false"
v-model="quoteDetail.taxUnitPrice" :step="0" :precision="6" :min="0" disabled/> v-model="quoteDetail.taxUnitPrice" :step="0" :precision="6" :min="0" disabled/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4" v-if="isShowRatePrice">
<el-form-item label=" ">
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="标准币种成本1:" prop="currencyTotalCost1" :show-message="false">
<el-input-number style="width: 100%;" :controls="false"
v-model="quoteDetail.currencyTotalCost1" :step="0" :min="0" :precision="6" disabled/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="标准币种成本2:" prop="currencyTotalCost2" :show-message="false">
<el-input-number style="width: 100%;" :controls="false"
v-model="quoteDetail.currencyTotalCost2" :step="0" :min="0" :precision="6" disabled/>
</el-form-item>
</el-col>
</el-row> </el-row>
<el-row :gutter="10" v-show="showQuoteCost"> <el-row :gutter="10" v-show="showQuoteCost">
<el-col :span="4"> <el-col :span="4">
@ -548,24 +610,41 @@ export default {
v-model="quoteDetail.quoteUnitPrice" :step="0" :min="0" :precision="6" disabled/> v-model="quoteDetail.quoteUnitPrice" :step="0" :min="0" :precision="6" disabled/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4">
<el-col :span="4" v-if="isShowRatePrice">
<el-form-item label="报价税率%:" prop="quoteTaxRate" :show-message="false"> <el-form-item label="报价税率%:" prop="quoteTaxRate" :show-message="false">
<el-input-number style="width: 100%;" :controls="false" <el-input-number style="width: 100%;" :controls="false"
v-model="quoteDetail.quoteTaxRate" :disabled="quoteDetail.status === '下达'" :step="0" :min="0"/> v-model="quoteDetail.quoteTaxRate" :disabled="quoteDetail.status === '下达'" :step="0" :min="0"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4">
<el-col :span="4" v-if="isShowRatePrice">
<el-form-item label="报价含税总额:" prop="quoteTaxTotalPrice" :show-message="false"> <el-form-item label="报价含税总额:" prop="quoteTaxTotalPrice" :show-message="false">
<el-input-number style="width: 100%;" :controls="false" <el-input-number style="width: 100%;" :controls="false"
v-model="quoteDetail.quoteTaxTotalPrice" :step="0" :precision="4" :min="0" disabled/> v-model="quoteDetail.quoteTaxTotalPrice" :step="0" :precision="4" :min="0" disabled/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4">
<el-col :span="4" v-if="isShowRatePrice">
<el-form-item label="报价含税单价:" prop="quoteTaxUnitPrice" :show-message="false"> <el-form-item label="报价含税单价:" prop="quoteTaxUnitPrice" :show-message="false">
<el-input-number style="width: 100%;" :controls="false" <el-input-number style="width: 100%;" :controls="false"
v-model="quoteDetail.quoteTaxUnitPrice" :step="0" :precision="6" :min="0" disabled/> v-model="quoteDetail.quoteTaxUnitPrice" :step="0" :precision="6" :min="0" disabled/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4" v-if="isShowRatePrice">
<el-form-item label=" ">
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="报价币种成本1:" prop="quoteCurrencyTotalCost1" :show-message="false">
<el-input-number style="width: 100%;" :controls="false"
v-model="quoteDetail.quoteCurrencyTotalCost1" :step="0" :min="0" :precision="6" disabled/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="报价币种成本2:" prop="quoteCurrencyTotalCost2" :show-message="false">
<el-input-number style="width: 100%;" :controls="false"
v-model="quoteDetail.quoteCurrencyTotalCost2" :step="0" :min="0" :precision="6" disabled/>
</el-form-item>
</el-col>
</el-row> </el-row>
</fieldset> </fieldset>
</el-form> </el-form>

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

@ -72,6 +72,10 @@ export default {
currency2:undefined, currency2:undefined,
exchangeRate1:undefined, exchangeRate1:undefined,
exchangeRate2:undefined, exchangeRate2:undefined,
currencyTotalCost1:0,
currencyTotalCost2:0,
quoteCurrencyTotalCost1:0,
quoteCurrencyTotalCost2:0,
moq:'Standard 250K', moq:'Standard 250K',
remark:'', remark:'',
}, },

23
src/views/modules/quote/primary/quoteTable.vue

@ -53,6 +53,20 @@ export default {
}).then(() => { }).then(() => {
this.$emit('againQuote',row) this.$emit('againQuote',row)
}) })
},
handleJumpToDetailReport(row){
if (this.$router.resolve('quote-quoteDetailReport').resolved.name === '404') {
this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',});
} else {
let params = {
name: "quote-quoteDetailReport",
params: {
type:'quote',
quoteVersionNo:row.quoteVersionNo,
}
}
this.$router.push(params)
}
} }
} }
} }
@ -71,8 +85,13 @@ export default {
:min-width="item.columnWidth" :min-width="item.columnWidth"
:label="item.columnLabel"> :label="item.columnLabel">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
<template v-if="item.columnProp === 'quoteVersionNo'">
<el-link @click="handleJumpToDetailReport(scope.row)">{{ scope.row[item.columnProp] }}</el-link>
</template>
<template v-else>
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column

10
src/views/modules/quote/quoteDetailReport.vue

@ -40,7 +40,8 @@ export default {
customerNo: '', customerNo: '',
customerDesc: '', customerDesc: '',
partNo: '', partNo: '',
partDesc: ''
partDesc: '',
quoteVersionNo: '',
}, },
no: 1, no: 1,
size: 20, size: 20,
@ -414,6 +415,13 @@ export default {
this.getSiteAndBuByUserName(); this.getSiteAndBuByUserName();
this.handleQuery(); this.handleQuery();
}, },
activated() {
console.log(this.queryForm)
if (this.$route.params.type && this.$route.params.type === 'quote'){
this.queryForm.quoteVersionNo = this.$route.params.quoteVersionNo;
this.handleQuery();
}
},
watch: { watch: {
currentRow(newVal, oldVal) { currentRow(newVal, oldVal) {
if (newVal) { if (newVal) {

Loading…
Cancel
Save