|
|
|
@ -98,7 +98,7 @@ export default { |
|
|
|
saveQuoteDetail:{ |
|
|
|
|
|
|
|
}, |
|
|
|
numberProp:['adjustBomUnYield','adjustLabourCost','adjustFabricateCost','adjustMachineCost','adjustToolCost','totalCost','weighted','weighted2'], |
|
|
|
numberProp:['adjustBomUnYield','adjustLabourCost','adjustFabricateCost','adjustMachineCost','adjustToolCost','totalCost','totalCostUSD','weighted','weighted2'], |
|
|
|
dataList:[], |
|
|
|
saveLoading:false, |
|
|
|
queryLoading:false, |
|
|
|
@ -110,7 +110,7 @@ export default { |
|
|
|
type: [{required: true, message: '请选择TP类型', trigger: ['blur','change']}], |
|
|
|
costModel: [{required: true, message: '请选择Cost Model', trigger: ['blur','change']}], |
|
|
|
}, |
|
|
|
columns:[ |
|
|
|
columnList:[ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 5011, |
|
|
|
@ -291,6 +291,24 @@ export default { |
|
|
|
fixed: '', |
|
|
|
columnWidth: 75 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 5011, |
|
|
|
serialNumber: '5011Table2TotalCost', |
|
|
|
tableId: '5011Table2', |
|
|
|
tableName: '报价详情信息表', |
|
|
|
columnProp: 'totalCostUSD', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'right', |
|
|
|
columnLabel: 'Total Cost(USD/KCT)', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 75 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 5011, |
|
|
|
@ -379,7 +397,7 @@ export default { |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 290 |
|
|
|
columnWidth: 215 |
|
|
|
}, |
|
|
|
], |
|
|
|
partVisible:false, |
|
|
|
@ -638,6 +656,23 @@ export default { |
|
|
|
this.saveQuoteDetail.partNo = newVal.toUpperCase(); |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
computed:{ |
|
|
|
columns:{ |
|
|
|
get(){ |
|
|
|
let val = this.dataList.every(item=>!isNaN(item.adjustToolCost) && item.adjustToolCost > 0); |
|
|
|
if (val){ |
|
|
|
return this.columnList |
|
|
|
} |
|
|
|
return this.columnList.filter(item=>item.columnProp !== 'adjustToolCost') |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
beforeUpdate() { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.table1.doLayout() |
|
|
|
this.$refs.table2.doLayout() |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
@ -649,6 +684,7 @@ export default { |
|
|
|
<el-table |
|
|
|
v-loading="queryLoading" |
|
|
|
border |
|
|
|
ref="table1" |
|
|
|
:data="dataList" |
|
|
|
style="width: 100%;margin-top: 5px" |
|
|
|
:height="height" |
|
|
|
@ -806,7 +842,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" |
|
|
|
<el-table v-loading="queryLoading" ref="table2" |
|
|
|
@row-click="quoteGroupDetailRowClick" :row-style="rowStyle" border :data="dataList" style="width: 100%;margin-top: 5px;" height="250px"> |
|
|
|
<el-table-column |
|
|
|
v-for="(item,index) in columns" :key="index" |
|
|
|
@ -819,9 +855,14 @@ export default { |
|
|
|
:min-width="item.columnWidth" |
|
|
|
:label="item.columnLabel"> |
|
|
|
<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="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> |
|
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
|
|
|
style="width: 100px; height: 80px"/></span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
|