|
|
@@ -1282,32 +1282,32 @@
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="过户车">
|
|
|
<el-radio-group v-model="CostfactorForm.transfer" size="mini">
|
|
|
- <el-radio-button label="1">是</el-radio-button>
|
|
|
- <el-radio-button label="0">否</el-radio-button>
|
|
|
+ <el-radio-button label="1" @click.native.prevent="clickTransferType('1')">是</el-radio-button>
|
|
|
+ <el-radio-button label="0" @click.native.prevent="clickTransferType('0')">否</el-radio-button>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="新旧车">
|
|
|
<el-radio-group v-model="CostfactorForm.oldAndNew" size="mini">
|
|
|
- <el-radio-button label="1">新</el-radio-button>
|
|
|
- <el-radio-button label="0">旧</el-radio-button>
|
|
|
+ <el-radio-button label="1" @click.native.prevent="clickOldAndNewType('1')">新</el-radio-button>
|
|
|
+ <el-radio-button label="0" @click.native.prevent="clickOldAndNewType('0')">旧</el-radio-button>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="新能源">
|
|
|
<el-radio-group v-model="CostfactorForm.newEnergy" size="mini">
|
|
|
- <el-radio-button label="1">新</el-radio-button>
|
|
|
- <el-radio-button label="0">油</el-radio-button>
|
|
|
+ <el-radio-button label="1" @click.native.prevent="clickNewEnergyType('1')">新</el-radio-button>
|
|
|
+ <el-radio-button label="0" @click.native.prevent="clickNewEnergyType('0')">油</el-radio-button>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="续保">
|
|
|
<el-radio-group v-model="CostfactorForm.renewal" size="mini">
|
|
|
- <el-radio-button label="1">是</el-radio-button>
|
|
|
- <el-radio-button label="0">否</el-radio-button>
|
|
|
+ <el-radio-button label="1" @click.native.prevent="clickRenewalType('1')">是</el-radio-button>
|
|
|
+ <el-radio-button label="0" @click.native.prevent="clickRenewalType('0')">否</el-radio-button>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -1326,19 +1326,22 @@
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="使用性质">
|
|
|
- <el-checkbox-group v-model="natureOfUseList" @change="natureOfUseListChange">
|
|
|
- <el-checkbox label="营业"></el-checkbox>
|
|
|
- <el-checkbox label="非营业"></el-checkbox>
|
|
|
+ <el-checkbox :indeterminate="isIndeterminateFyy" v-model="checkAllFyy" @change="handleCheckAllChangeFyy">非营业全选</el-checkbox>
|
|
|
+ <el-checkbox :indeterminate="isIndeterminateYy" v-model="checkAllYy" @change="handleCheckAllChangeYy">营业全选</el-checkbox>
|
|
|
+ <div style="margin: 15px 0;"></div>
|
|
|
+ <el-checkbox-group v-model="checkedUserNatureFyy" @change="handleCheckedFyyChange">
|
|
|
+ <el-checkbox label="家庭自用"></el-checkbox>
|
|
|
+ <el-checkbox label="非营业机关、事业"></el-checkbox>
|
|
|
+ <el-checkbox label="非营业企业"></el-checkbox>
|
|
|
+ <el-checkbox label="非营业个人"></el-checkbox>
|
|
|
+ </el-checkbox-group>
|
|
|
+ <el-checkbox-group v-model="checkedUserNatureYy" @change="handleCheckedYyChange">
|
|
|
<el-checkbox label="营业出租"></el-checkbox>
|
|
|
<el-checkbox label="营业租赁"></el-checkbox>
|
|
|
<el-checkbox label="营业公交"></el-checkbox>
|
|
|
<el-checkbox label="营业客运"></el-checkbox>
|
|
|
<el-checkbox label="营业货运"></el-checkbox>
|
|
|
<el-checkbox label="营业旅游"></el-checkbox>
|
|
|
- <el-checkbox label="家庭自用"></el-checkbox>
|
|
|
- <el-checkbox label="非营业机关、事业"></el-checkbox>
|
|
|
- <el-checkbox label="非营业企业"></el-checkbox>
|
|
|
- <el-checkbox label="非营业个人"></el-checkbox>
|
|
|
</el-checkbox-group>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -1451,6 +1454,16 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ //调整使用性质联动勾选-starting
|
|
|
+ isIndeterminateYy:false,
|
|
|
+ checkAllYy:false,
|
|
|
+ userNatureYy:['营业出租','营业租赁','营业公交','营业客运','营业货运','营业旅游'],
|
|
|
+ checkedUserNatureYy:[],
|
|
|
+ isIndeterminateFyy:false,
|
|
|
+ checkAllFyy:false,
|
|
|
+ userNatureFyy:['家庭自用','非营业机关、事业','非营业企业','非营业个人'],
|
|
|
+ checkedUserNatureFyy:[],
|
|
|
+ //调整使用性质联动勾选-ending
|
|
|
supplierType: "1",//协议类型
|
|
|
//===========================================
|
|
|
licenseNo1: "",
|
|
|
@@ -1555,7 +1568,6 @@ export default {
|
|
|
value2: [],
|
|
|
value3: [],
|
|
|
vehicleCategoryList: [],
|
|
|
- natureOfUseList: [],
|
|
|
areanumberplateList: [],
|
|
|
//===========================================
|
|
|
form: {},
|
|
|
@@ -2116,6 +2128,101 @@ export default {
|
|
|
this.changeTreeWidth(250); // 初始化树的宽度
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleCheckAllChangeYy(val) {
|
|
|
+ this.checkedUserNatureYy = val ? this.userNatureYy : [];
|
|
|
+ this.isIndeterminateYy = false;
|
|
|
+ //处理最终给后台的传输数据
|
|
|
+ let currentNatureOfUse=this.CostfactorForm.natureOfUse?this.CostfactorForm.natureOfUse.split(','):[];
|
|
|
+ if(val){
|
|
|
+ currentNatureOfUse.push(this.checkedUserNatureYy);
|
|
|
+ }else{
|
|
|
+ for(let delItem of this.userNatureYy){
|
|
|
+ currentNatureOfUse=currentNatureOfUse.filter(item=>item!=delItem);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ let data = "";
|
|
|
+ currentNatureOfUse.map(ele => {
|
|
|
+ data += ele + ",";
|
|
|
+ return
|
|
|
+ })
|
|
|
+ this.CostfactorForm.natureOfUse = data.slice(0, -1)
|
|
|
+ },
|
|
|
+ handleCheckAllChangeFyy(val) {
|
|
|
+ this.checkedUserNatureFyy = val ? this.userNatureFyy : [];
|
|
|
+ this.isIndeterminateFyy = false;
|
|
|
+
|
|
|
+ //处理最终给后台的传输数据
|
|
|
+ let currentNatureOfUse=this.CostfactorForm.natureOfUse?this.CostfactorForm.natureOfUse.split(','):[];
|
|
|
+ if(val){
|
|
|
+ currentNatureOfUse.push(this.checkedUserNatureFyy);
|
|
|
+ }else{
|
|
|
+ for(let delItem of this.userNatureFyy){
|
|
|
+ currentNatureOfUse=currentNatureOfUse.filter(item=>item!=delItem);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ let data = "";
|
|
|
+ currentNatureOfUse.map(ele => {
|
|
|
+ data += ele + ",";
|
|
|
+ return
|
|
|
+ })
|
|
|
+ this.CostfactorForm.natureOfUse = data.slice(0, -1)
|
|
|
+ },
|
|
|
+
|
|
|
+ handleCheckedYyChange(value) {
|
|
|
+ let checkedCount = value.length;
|
|
|
+ this.checkAllYy = checkedCount === this.userNatureYy.length;
|
|
|
+ this.isIndeterminateYy = checkedCount > 0 && checkedCount < this.userNatureYy.length;
|
|
|
+ //处理最终给后台的传输数据
|
|
|
+ let currentNatureOfUse=this.CostfactorForm.natureOfUse?this.CostfactorForm.natureOfUse.split(','):[];
|
|
|
+ //先删除所有营业的
|
|
|
+ for(let delItem of this.userNatureYy){
|
|
|
+ currentNatureOfUse=currentNatureOfUse.filter(item=>item!=delItem);
|
|
|
+ }
|
|
|
+ //再添加本次营业选中的
|
|
|
+ currentNatureOfUse.push(value);
|
|
|
+ let data = "";
|
|
|
+ currentNatureOfUse.map(ele => {
|
|
|
+ data += ele + ",";
|
|
|
+ return
|
|
|
+ })
|
|
|
+ this.CostfactorForm.natureOfUse = data.slice(0, -1)
|
|
|
+ },
|
|
|
+ handleCheckedFyyChange(value) {
|
|
|
+ let checkedCount = value.length;
|
|
|
+ this.checkAllFyy = checkedCount === this.userNatureFyy.length;
|
|
|
+ this.isIndeterminateFyy = checkedCount > 0 && checkedCount < this.userNatureFyy.length;
|
|
|
+ //处理最终给后台的传输数据
|
|
|
+ let currentNatureOfUse=this.CostfactorForm.natureOfUse?this.CostfactorForm.natureOfUse.split(','):[];
|
|
|
+ //先删除所有非营业的
|
|
|
+ for(let delItem of this.userNatureFyy){
|
|
|
+ currentNatureOfUse=currentNatureOfUse.filter(item=>item!=delItem);
|
|
|
+ }
|
|
|
+ //再添加本次营业选中的
|
|
|
+ currentNatureOfUse.push(value);
|
|
|
+ let data = "";
|
|
|
+ currentNatureOfUse.map(ele => {
|
|
|
+ data += ele + ",";
|
|
|
+ return
|
|
|
+ })
|
|
|
+ this.CostfactorForm.natureOfUse = data.slice(0, -1)
|
|
|
+ },
|
|
|
+ //过户车新增点击取消选中的逻辑,取消选中时,值默认给9
|
|
|
+ clickTransferType(e){
|
|
|
+ e == this.CostfactorForm.transfer ? this.CostfactorForm.transfer = '9' : this.CostfactorForm.transfer = e
|
|
|
+ },
|
|
|
+ //新旧车新增点击取消选中的逻辑,取消选中时,值默认给9
|
|
|
+ clickOldAndNewType(e){
|
|
|
+ e == this.CostfactorForm.oldAndNew ? this.CostfactorForm.oldAndNew = '9' : this.CostfactorForm.oldAndNew = e
|
|
|
+ },
|
|
|
+ //新能源新增点击取消选中的逻辑,取消选中时,值默认给9
|
|
|
+ clickNewEnergyType(e){
|
|
|
+ e == this.CostfactorForm.newEnergy ? this.CostfactorForm.newEnergy = '9' : this.CostfactorForm.newEnergy = e
|
|
|
+ },
|
|
|
+ //续保新增点击取消选中的逻辑,取消选中时,值默认给9
|
|
|
+ clickRenewalType(e){
|
|
|
+ e == this.CostfactorForm.renewal ? this.CostfactorForm.renewal = '9' : this.CostfactorForm.renewal = e
|
|
|
+ },
|
|
|
+
|
|
|
//改变费用起期时,同步清空对应费用止期,重新填写
|
|
|
cleanEndDate(schemeindex, productCostsindex){
|
|
|
this.costform.scheme[schemeindex].productCosts[productCostsindex].costsEndDate=null;
|
|
|
@@ -2339,12 +2446,55 @@ export default {
|
|
|
this.CostfactorForm[key] = ""
|
|
|
}
|
|
|
this.vehicleCategoryList = [];
|
|
|
- this.natureOfUseList = [];
|
|
|
+ this.checkedUserNatureFyy=[];
|
|
|
+ this.checkedUserNatureYy=[];
|
|
|
+ this.value1="";
|
|
|
} else {
|
|
|
let item = this.costform.scheme[lineindex].productCosts[outindex];
|
|
|
this.vehicleCategoryList = item.vehicleCategory?item.vehicleCategory.split(","):[];
|
|
|
- this.natureOfUseList = item.natureOfUse?item.natureOfUse.split(","):[];
|
|
|
- this.value1 = item.licenseNumber != '' ? item.licenseNumber.split(",") : [];
|
|
|
+ this.checkedUserNatureFyy=[];
|
|
|
+ this.checkedUserNatureYy=[];
|
|
|
+ let natureOfUseList = item.natureOfUse?item.natureOfUse.split(","):[];
|
|
|
+ //根据协议中使用性质进行默认带出赋值
|
|
|
+ for(let natureUseItem of natureOfUseList){
|
|
|
+ for(let fyyItem of this.userNatureFyy){
|
|
|
+ if(fyyItem===natureUseItem){
|
|
|
+ this.checkedUserNatureFyy.push(fyyItem);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for(let yyItem of this.userNatureYy){
|
|
|
+ if(yyItem===natureUseItem){
|
|
|
+ this.checkedUserNatureYy.push(yyItem);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //处理 全选、半选按钮的显示
|
|
|
+ if(this.checkedUserNatureFyy.length>0){
|
|
|
+ if(this.userNatureFyy.length==this.checkedUserNatureFyy.length){
|
|
|
+ this.isIndeterminateFyy=false;
|
|
|
+ this.checkAllFyy=true;
|
|
|
+ }else{
|
|
|
+ this.isIndeterminateFyy=true;
|
|
|
+ this.checkAllFyy=false;
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ this.isIndeterminateFyy=false;
|
|
|
+ this.checkAllFyy=false;
|
|
|
+ }
|
|
|
+ if(this.checkedUserNatureYy.length>0){
|
|
|
+ if(this.userNatureYy.length==this.checkedUserNatureYy.length){
|
|
|
+ this.isIndeterminateYy=false;
|
|
|
+ this.checkAllYy=true;
|
|
|
+ }else{
|
|
|
+ this.isIndeterminateYy=true;
|
|
|
+ this.checkAllYy=false;
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ this.isIndeterminateYy=false;
|
|
|
+ this.checkAllYy=false;
|
|
|
+ }
|
|
|
+
|
|
|
+ this.value1 = item.licenseNumber ? item.licenseNumber.split(",") : [];
|
|
|
const {
|
|
|
transfer, newEnergy, oldAndNew, renewal, minSeats, maxSeats, minTruckTonnage, maxTruckTonnage, minPurchasePrice, maxPurchasePrice, minApprovedLoadCapacity, maxApprovedLoadCapacity, minCompulsoryInsurancePremium, maxCompulsoryInsurancePremium, minTaxAmount, maxTaxAmount, minTheThreePremium, maxTheThreePremium, minOnboardProductsPremium, maxOnboardProductsPremium, minCommercialInsuranceDiscount, maxCommercialInsuranceDiscount, minCompulsoryInsuranceDiscount, maxCompulsoryInsuranceDiscount, minScore, maxScore, minLossRation, maxLossRation,containNoLicense
|
|
|
} = item;
|
|
|
@@ -2382,14 +2532,6 @@ export default {
|
|
|
})
|
|
|
this.CostfactorForm.vehicleCategory = data.slice(0, -1)
|
|
|
},
|
|
|
- natureOfUseListChange(e) {
|
|
|
- let data = "";
|
|
|
- e.map(ele => {
|
|
|
- data += ele + ",";
|
|
|
- return
|
|
|
- })
|
|
|
- this.CostfactorForm.natureOfUse = data.slice(0, -1)
|
|
|
- },
|
|
|
//弹框打开事件,清空表单
|
|
|
closeDialog() {
|
|
|
//不管新增,还是编辑 关闭窗口后,都清空临时数据 以免编辑后新增默认带出上一次打开协议中信息
|