Browse Source

2024-12-10

master
qiezi 1 year ago
parent
commit
3370c2d560
  1. 1
      src/main.js
  2. 55
      src/views/modules/quote/detail/primary/quoteDetailCost.vue

1
src/main.js

@ -26,6 +26,7 @@ import echarts from "echarts";
import highlightContainer from './utils/highlight'; import highlightContainer from './utils/highlight';
import field from './utils/field'; import field from './utils/field';
import 'element-ui/lib/theme-chalk/divider.css' import 'element-ui/lib/theme-chalk/divider.css'
import 'element-ui/lib/popover'
Vue.prototype.$echarts = echarts; Vue.prototype.$echarts = echarts;
Vue.component('downloadExcel', JsonExcel) Vue.component('downloadExcel', JsonExcel)

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

@ -65,6 +65,11 @@ export default {
tagNo:undefined, tagNo:undefined,
type:undefined, type:undefined,
allCheckedLabel:['工具','测试','其他','包装','运输'],
// selectionChecked:[],
checkAll:false,
selection:undefined,
} }
}, },
methods:{ methods:{
@ -185,6 +190,13 @@ export default {
} }
}) })
}, },
changeAllCheck(val){
if (val){
this.selectionChecked = [...this.allCheckedLabel]
}else {
this.selectionChecked = [];
}
},
}, },
watch:{ watch:{
'quoteDetail.adjustPartCost'(newValue, oldValue){ 'quoteDetail.adjustPartCost'(newValue, oldValue){
@ -301,7 +313,26 @@ export default {
this.quoteDetail.currencyTotalCost2 = 0; 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() { mounted() {
this.$nextTick(()=>{ this.$nextTick(()=>{
@ -314,7 +345,27 @@ export default {
<template> <template>
<div> <div>
<el-button :loading="computeLoading" type="primary" :disabled="quoteDetail.status === '下达'" @click="handleQueryAllCost"> </el-button>
<el-row :gutter="10">
<el-col :span="2">
<el-button :loading="computeLoading" style="width: 80px" type="primary" :disabled="quoteDetail.status === '下达'" @click="handleQueryAllCost"> </el-button>
</el-col>
<el-col :span="2">
<el-popover
placement="bottom-start"
width="100"
trigger="hover">
<div>
<el-checkbox :indeterminate="selectionChecked.length > 0 && selectionChecked.length < allCheckedLabel.length" v-model="checkAll" @change="changeAllCheck"> 全选 </el-checkbox>
</div>
<el-checkbox-group v-model="selectionChecked">
<div v-for="label in allCheckedLabel">
<el-checkbox :label="label" :key="label">{{label}}</el-checkbox>
</div>
</el-checkbox-group>
<a slot="reference">计入材料成本</a>
</el-popover>
</el-col>
</el-row>
<!-- <el-select v-model="showQuoteCost">--> <!-- <el-select v-model="showQuoteCost">-->
<!-- <el-option label="报价成本" :value="true"></el-option>--> <!-- <el-option label="报价成本" :value="true"></el-option>-->

Loading…
Cancel
Save