|
|
|
@ -17,6 +17,7 @@ import { |
|
|
|
} from "../../../../api/quote/quoteGroupDetail"; |
|
|
|
import QuoteDetail from "./quoteDetail.vue"; |
|
|
|
import QuoteDetailCalculation from "./primary/quoteDetailCalculation.vue"; |
|
|
|
import {Decimal} from "decimal.js"; |
|
|
|
|
|
|
|
export default { |
|
|
|
name: "quoteGroupDetail", |
|
|
|
@ -97,6 +98,7 @@ export default { |
|
|
|
saveQuoteDetail:{ |
|
|
|
|
|
|
|
}, |
|
|
|
numberProp:['adjustBomUnYield','adjustLabourCost','adjustFabricateCost','adjustMachineCost','totalCost','weighted','weighted2'], |
|
|
|
dataList:[], |
|
|
|
saveLoading:false, |
|
|
|
queryLoading:false, |
|
|
|
@ -108,8 +110,7 @@ export default { |
|
|
|
type: [{required: true, message: '请选择TP类型', trigger: ['blur','change']}], |
|
|
|
costModel: [{required: true, message: '请选择Cost Model', trigger: ['blur','change']}], |
|
|
|
}, |
|
|
|
columns: [ |
|
|
|
|
|
|
|
columns:[ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 5011, |
|
|
|
@ -119,14 +120,14 @@ export default { |
|
|
|
columnProp: 'partNo', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'left', |
|
|
|
columnLabel: '物料编码', |
|
|
|
columnLabel: 'Quotation Code', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 120 |
|
|
|
columnWidth: 100 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
@ -137,14 +138,14 @@ export default { |
|
|
|
columnProp: 'partDesc', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'left', |
|
|
|
columnLabel: '物料名称', |
|
|
|
columnLabel: 'Description', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 320 |
|
|
|
columnWidth: 170 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
@ -173,14 +174,14 @@ export default { |
|
|
|
columnProp: 'qty', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'right', |
|
|
|
columnLabel: '报价数量', |
|
|
|
columnLabel: 'MOQ', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 100 |
|
|
|
columnWidth: 70 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
@ -191,14 +192,14 @@ export default { |
|
|
|
columnProp: 'adjustBomUnYield', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'right', |
|
|
|
columnLabel: '报价成本', |
|
|
|
columnLabel: 'FG BOM Cost', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 130 |
|
|
|
columnWidth: 100 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
@ -216,7 +217,7 @@ export default { |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 120 |
|
|
|
columnWidth: 60 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
@ -234,7 +235,7 @@ export default { |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 120 |
|
|
|
columnWidth: 60 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
@ -252,7 +253,7 @@ export default { |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 120 |
|
|
|
columnWidth: 60 |
|
|
|
} |
|
|
|
,{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
@ -263,14 +264,14 @@ export default { |
|
|
|
columnProp: 'totalCost', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'right', |
|
|
|
columnLabel: 'Total Cost(RMB.KCT)', |
|
|
|
columnLabel: 'Total Cost', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 140 |
|
|
|
columnWidth: 70 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
@ -288,43 +289,25 @@ export default { |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 140 |
|
|
|
columnWidth: 60 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 5011, |
|
|
|
serialNumber: '5011Table2Weighted', |
|
|
|
serialNumber: '5011Table2Type', |
|
|
|
tableId: '5011Table2', |
|
|
|
tableName: '报价详情信息表', |
|
|
|
columnProp: 'weighted', |
|
|
|
columnProp: 'type', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'right', |
|
|
|
columnLabel: 'Weighted TP for MOQ>250K(USD/KCT)', |
|
|
|
align: 'center', |
|
|
|
columnLabel: 'TP', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 260 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 5011, |
|
|
|
serialNumber: '5011Table2Weighted2', |
|
|
|
tableId: '5011Table2', |
|
|
|
tableName: '报价详情信息表', |
|
|
|
columnProp: 'weighted2', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'right', |
|
|
|
columnLabel: 'Weighted TP for MOQ>5M(USD/KCT)', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 260 |
|
|
|
columnWidth: 80 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
@ -335,14 +318,14 @@ export default { |
|
|
|
columnProp: 'weighted', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'right', |
|
|
|
columnLabel: 'Standard TP for MOQ>250K(USD/KCT)', |
|
|
|
columnLabel: 'MOQ > 250K(USD/KCT)', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 260 |
|
|
|
columnWidth: 83 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
@ -353,14 +336,14 @@ export default { |
|
|
|
columnProp: 'weighted2', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'right', |
|
|
|
columnLabel: 'Standard TP for MOQ>5M(USD/KCT)', |
|
|
|
columnLabel: 'MOQ > 5M (USD/KCT)', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 260 |
|
|
|
columnWidth: 80 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
@ -371,14 +354,14 @@ export default { |
|
|
|
columnProp: 'remark', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'left', |
|
|
|
columnLabel: '备注', |
|
|
|
columnLabel: 'COMMENT', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 200 |
|
|
|
columnWidth: 180 |
|
|
|
}, |
|
|
|
], |
|
|
|
partVisible:false, |
|
|
|
@ -605,6 +588,12 @@ export default { |
|
|
|
handleSelectionChange(val){ |
|
|
|
let ids = val.map((item)=>item.id); |
|
|
|
this.$emit('handleSelectionChange', ids); |
|
|
|
}, |
|
|
|
toFixed(val,fixed){ |
|
|
|
if (!val || isNaN(val) || !fixed){ |
|
|
|
return val |
|
|
|
} |
|
|
|
return new Decimal(val).toFixed(fixed) |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
|
@ -646,7 +635,7 @@ export default { |
|
|
|
style="width: 100%;margin-top: 5px" |
|
|
|
:height="height" |
|
|
|
@selection-change="handleSelectionChange"> |
|
|
|
<el-table-column v-if="!selection" type="index" width="55" align="center" label="序号"></el-table-column> |
|
|
|
<el-table-column v-if="!selection" type="index" width="30" align="center" label="NO"></el-table-column> |
|
|
|
<el-table-column v-else type="selection" align="center" width="55"/> |
|
|
|
<el-table-column |
|
|
|
v-for="(item,index) in columns" :key="index" |
|
|
|
@ -659,11 +648,8 @@ export default { |
|
|
|
:min-width="item.columnWidth" |
|
|
|
:label="item.columnLabel"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template v-if="item.columnLabel === 'Weighted TP for MOQ>250K(USD/KCT)' || item.columnLabel === 'Weighted TP for MOQ>5M(USD/KCT)'"> |
|
|
|
<span v-if="scope.row.type && scope.row.type === 'Weighted TP'"> {{scope.row[item.columnProp] }}</span> |
|
|
|
</template> |
|
|
|
<template v-else-if="item.columnLabel === 'Standard TP for MOQ>250K(USD/KCT)' || item.columnLabel === 'Standard TP for MOQ>5M(USD/KCT)'"> |
|
|
|
<span v-if="!scope.row.type || scope.row.type === 'Standard TP'">{{scope.row[item.columnProp] }}</span> |
|
|
|
<template v-if="numberProp.includes(item.columnProp)"> |
|
|
|
{{ toFixed(scope.row[item.columnProp],scope.row['decimalPlace']) }} |
|
|
|
</template> |
|
|
|
<template v-else> |
|
|
|
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span> |
|
|
|
@ -803,7 +789,7 @@ export default { |
|
|
|
|
|
|
|
<el-dialog title="报价明细" v-drag :visible.sync="drawerVisible" top="10vh" width="1200px" append-to-body :close-on-click-modal="false"> |
|
|
|
<el-table v-loading="queryLoading" |
|
|
|
@row-click="quoteGroupDetailRowClick" :row-style="rowStyle" border :data="dataList" style="width: 100%;margin-top: 5px;" :height="'30vh'"> |
|
|
|
@row-click="quoteGroupDetailRowClick" :row-style="rowStyle" border :data="dataList" style="width: 100%;margin-top: 5px;" height="250px"> |
|
|
|
<el-table-column type="index" width="55" align="center" label="序号"></el-table-column> |
|
|
|
<el-table-column |
|
|
|
v-for="(item,index) in columns" :key="index" |
|
|
|
@ -829,7 +815,7 @@ export default { |
|
|
|
:quote="quote" |
|
|
|
:quote-group-detail="quoteGroupDetail" |
|
|
|
:auth-flag="false" |
|
|
|
:height="'33vh'" |
|
|
|
height="250px" |
|
|
|
@currentQuoteDetailItemNo="handleCurrentQuoteDetailItemNo" |
|
|
|
@reload = "handleQueryQuoteDetail"> |
|
|
|
|
|
|
|
@ -849,4 +835,10 @@ export default { |
|
|
|
height: auto; |
|
|
|
line-height: 1.5; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.el-table /deep/ .cell{ |
|
|
|
height: auto; |
|
|
|
line-height: 1.5; |
|
|
|
} |
|
|
|
</style> |