diff --git a/src/main.js b/src/main.js index e1df72b..1e0f6fa 100644 --- a/src/main.js +++ b/src/main.js @@ -26,6 +26,7 @@ import echarts from "echarts"; import highlightContainer from './utils/highlight'; import field from './utils/field'; import 'element-ui/lib/theme-chalk/divider.css' +import 'element-ui/lib/popover' Vue.prototype.$echarts = echarts; Vue.component('downloadExcel', JsonExcel) diff --git a/src/views/modules/quote/detail/primary/quoteDetailCost.vue b/src/views/modules/quote/detail/primary/quoteDetailCost.vue index f8d4801..5587de3 100644 --- a/src/views/modules/quote/detail/primary/quoteDetailCost.vue +++ b/src/views/modules/quote/detail/primary/quoteDetailCost.vue @@ -65,6 +65,11 @@ export default { tagNo:undefined, type:undefined, + allCheckedLabel:['工具','测试','其他','包装','运输'], + // selectionChecked:[], + checkAll:false, + + selection:undefined, } }, methods:{ @@ -185,6 +190,13 @@ export default { } }) }, + changeAllCheck(val){ + if (val){ + this.selectionChecked = [...this.allCheckedLabel] + }else { + this.selectionChecked = []; + } + }, }, watch:{ 'quoteDetail.adjustPartCost'(newValue, oldValue){ @@ -301,7 +313,26 @@ export default { this.quoteDetail.currencyTotalCost2 = 0; } }, - + selectionChecked(newVal,oldVal){ + if (newVal.length === this.allCheckedLabel.length){ + this.checkAll = true; + }else { + this.checkAll = false; + } + } + }, + computed:{ + selectionChecked:{ + set(newVal){ + this.selection = newVal.join(',') + }, + get(){ + if (this.selection === '' || this.selection === undefined || this.selection === null){ + return [] + } + return this.selection.split(',') + } + } }, mounted() { this.$nextTick(()=>{ @@ -314,7 +345,27 @@ export default {