|
|
@@ -5,7 +5,7 @@
|
|
|
<!-- 左侧树Start -->
|
|
|
<SplitArea :size="leftSplitWidth" :minSize="200">
|
|
|
<el-radio-group v-model="supplierType" @input="supplierChange" size="mini">
|
|
|
- <el-radio v-for="(item,index) in supplierTypeEnumoptions" :key="index" :label="item.dictValue">{{
|
|
|
+ <el-radio v-for="(item, index) in supplierTypeEnumoptions" :key="index" :label="item.dictValue">{{
|
|
|
item.dictTag }}</el-radio>
|
|
|
</el-radio-group>
|
|
|
<el-divider></el-divider>
|
|
|
@@ -80,7 +80,8 @@
|
|
|
</Split>
|
|
|
</el-main>
|
|
|
<!-- 新增协议的对话框 -->
|
|
|
- <el-dialog :title="dialogTitle" v-dialogDrag :visible.sync="agreementdialogVisible" width="60%" @close="closeDialog()">
|
|
|
+ <el-dialog :title="dialogTitle" v-dialogDrag :visible.sync="agreementdialogVisible" width="60%"
|
|
|
+ @close="closeDialog()">
|
|
|
<el-row style="margin-bottom: 10px;" v-if="agreement.agreestatuButtonSizes == '2'">
|
|
|
<el-col :span="4" style="text-align: right"><label style="margin-right: 10px;">退回修改原因:</label></el-col>
|
|
|
<el-col :span="20" style="color: red;">
|
|
|
@@ -88,7 +89,7 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<!-- 内容主体区域 -->
|
|
|
- <el-tabs v-model="activeTabs" type="card" @tab-remove="removeProductTab">
|
|
|
+ <el-tabs v-model="activeTabs" type="card">
|
|
|
<el-tab-pane label="协议信息" name="first">
|
|
|
<el-form :size="overSize" :model="agreement" :rules="addAgreementRules" ref="addAgreementRef"
|
|
|
label-width="130px">
|
|
|
@@ -125,9 +126,9 @@
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="合作公司" prop="partnerCompaniesId">
|
|
|
- <el-cascader :disabled="operType == 'EDIT'" style="width: 100%;"
|
|
|
- v-model="agreement.partnerCompaniesId" :show-all-levels="false" :options="options"
|
|
|
- :props="optionProps" @change="handleChange" clearable filterable></el-cascader>
|
|
|
+ <el-cascader :disabled="operType == 'EDIT'" style="width: 100%;" v-model="agreement.partnerCompaniesId"
|
|
|
+ :show-all-levels="false" :options="options" :props="optionProps" @change="handleChange" clearable
|
|
|
+ filterable></el-cascader>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
@@ -220,9 +221,6 @@
|
|
|
<el-checkbox v-for="item in productList" :label="item.id" :key="item.id"
|
|
|
@change="event => pruductChange(event, item)">{{ item.name }}</el-checkbox>
|
|
|
</el-checkbox-group>
|
|
|
- <!-- <el-button type="success" :size="overSize" style="margin-left: 20px;"
|
|
|
- @click="otherproductsdialogVisible = true">
|
|
|
- <i class="el-icon-s-operation"></i> 其他产品费用</el-button> -->
|
|
|
</div>
|
|
|
<div>
|
|
|
<el-form ref="costform" :model="costform" label-width="100px" :size="overSize" :rules="costformRules">
|
|
|
@@ -247,7 +245,8 @@
|
|
|
@click="insuranceFactor(schemeindex, productCostsindex, '3')">保费因子</el-button>
|
|
|
<el-button type="warning" :size="overSize"
|
|
|
@click="otherFactor(schemeindex, productCostsindex, '4')">其他因子</el-button>
|
|
|
- <!-- <el-button type="warning" :size="overSize" @click="wholeFactor(schemeindex, productCostsindex)">全部因子</el-button> -->
|
|
|
+ <el-button type="warning" :size="overSize"
|
|
|
+ @click="wholeFactor(schemeindex, productCostsindex)">全部因子</el-button>
|
|
|
<el-button v-if="productCostsindex != 0" type="danger" :size="overSize"
|
|
|
@click="deleteproductCosts(productCostsindex)">删除方案</el-button>
|
|
|
</div>
|
|
|
@@ -1498,7 +1497,7 @@
|
|
|
<el-button :size="overSize" type="primary" @click="otherFactorsubmit()">保存</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
- <!-- <el-dialog title="全部因子" :visible.sync="wholeVisible" width="50%">
|
|
|
+ <el-dialog title="全部因子" :visible.sync="wholeVisible" width="50%">
|
|
|
<div class="flex f-c products" style="padding: 0 20px;">
|
|
|
<div class="productstitle flex j-s">
|
|
|
<div><span>车辆因子</span></div>
|
|
|
@@ -1833,7 +1832,7 @@
|
|
|
<el-button :size="overSize" @click="wholeVisible = false">取 消</el-button>
|
|
|
<el-button :size="overSize" type="primary" @click="otherFactorsubmit()">保存</el-button>
|
|
|
</span>
|
|
|
- </el-dialog> -->
|
|
|
+ </el-dialog>
|
|
|
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -1872,10 +1871,7 @@ export default {
|
|
|
pageNum: 1,
|
|
|
pageSize: 20,
|
|
|
totalSize: null,
|
|
|
- queryInfo: {
|
|
|
|
|
|
- associationCompaniesId: "",
|
|
|
- },
|
|
|
agreementdialogVisible: false, //控制协议对话框显示
|
|
|
otherproductsdialogVisible: false,//其他产品费用对话框显示
|
|
|
VehicleFactorVisible: false,//费用车辆因子 显示/隐藏
|
|
|
@@ -2340,7 +2336,6 @@ export default {
|
|
|
watch: {
|
|
|
containsSubChecked(val) {
|
|
|
if (val) {
|
|
|
- this.queryInfo.associationCompaniesId = "";
|
|
|
this.findPage();
|
|
|
} else {
|
|
|
this.pageRequest.columnFilters.inscode.value = this.currentTreeNode.id;
|
|
|
@@ -2400,7 +2395,7 @@ export default {
|
|
|
this.peopledeptid = "9";
|
|
|
}
|
|
|
//获取所有下拉框数据
|
|
|
- this.agreement.associationCompaniesId = "";
|
|
|
+ this.agreement.partnerCompaniesId = "";
|
|
|
this.getDicType("agreementType");//协议类型
|
|
|
this.getDicType("matchType");//保单日期类型
|
|
|
this.getDicType("moneyType");//佣金发放方式
|
|
|
@@ -2447,7 +2442,7 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
agreementTypeChange(value) {
|
|
|
- this.agreement.agreementType=value;
|
|
|
+ this.agreement.agreementType = value;
|
|
|
},
|
|
|
//修改开关事件
|
|
|
isEditchange(val, id) {
|
|
|
@@ -2575,17 +2570,13 @@ export default {
|
|
|
VehicleFactor(lineindex, outindex, id) {
|
|
|
if (this.operType == "EDIT") {
|
|
|
let item = this.costform.scheme[lineindex].productCosts[outindex].factor;
|
|
|
-
|
|
|
item.map(ele => {
|
|
|
if (ele.factorType == '1' && ele.factor.length != 0) {
|
|
|
- console.log(ele)
|
|
|
this.productVehicleFactorForm = ele.factor[0];
|
|
|
return ele;
|
|
|
}
|
|
|
})
|
|
|
this.VehicleFactorVisible = true;
|
|
|
- console.log(this.productVehicleFactorForm)
|
|
|
-
|
|
|
} else {
|
|
|
this.VehicleFactorlineindex = lineindex,
|
|
|
this.VehicleFactoroutindex = outindex,
|
|
|
@@ -2682,8 +2673,8 @@ export default {
|
|
|
this.otherFactorVisible = true;
|
|
|
}
|
|
|
},
|
|
|
- wholeFactor(lineindex,outindex) {
|
|
|
- console.log(lineindex,outindex)
|
|
|
+ wholeFactor(lineindex, outindex) {
|
|
|
+ console.log(lineindex, outindex)
|
|
|
this.wholeVisible = true;
|
|
|
},
|
|
|
VehicleFactorsubmit() {//车辆因子暂存
|
|
|
@@ -2749,7 +2740,7 @@ export default {
|
|
|
if (this.operType == "ADD") {
|
|
|
this.insure = '满足拒保'
|
|
|
for (let key in this.agreement) {
|
|
|
- if (key != "associationCompaniesId") {
|
|
|
+ if (key != "partnerCompaniesId") {
|
|
|
this.agreement[key] = ""
|
|
|
}
|
|
|
}
|
|
|
@@ -2791,35 +2782,6 @@ export default {
|
|
|
);
|
|
|
this.rightSplitWidth = 100 - this.leftSplitWidth;
|
|
|
},
|
|
|
- /**Split 结束 */
|
|
|
- // 改变费用
|
|
|
- changeProdFee(index) {
|
|
|
- if (this.operType == "EDIT") {
|
|
|
- for (let i = 0; i < this.productTabs[index].prodfees.length; i++) {
|
|
|
- if (this.productTabs[index].prodfees[i].keeprate == "") {
|
|
|
- this.productTabs[index].prodfees[i].keeprate = 0;
|
|
|
- }
|
|
|
- if (this.productTabs[index].prodfees[i].addrate == "") {
|
|
|
- this.productTabs[index].prodfees[i].addrate = 0;
|
|
|
- }
|
|
|
- }
|
|
|
- let mm = this.productTabs[index].productrate;
|
|
|
- for (let i = 0; i < this.productTabs[index].prodfees.length; i++) {
|
|
|
- mm =
|
|
|
- mm -
|
|
|
- this.productTabs[index].prodfees[i].keeprate -
|
|
|
- this.productTabs[index].prodfees[i].addrate;
|
|
|
- }
|
|
|
- this.productTabs[index].feerate = mm.toFixed(2); //佣金出口
|
|
|
- this.productTabs[index].keeprate = (
|
|
|
- this.productTabs[index].productrate - mm
|
|
|
- ).toFixed(2); //公司预留佣金
|
|
|
- if (this.productTabs[index].feerate < 0) {
|
|
|
- this.$message.error("费用分配不能超出产品佣金总额");
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- //--tree begin-------
|
|
|
// 获取树数据
|
|
|
findLeftTreeData: function () {
|
|
|
let params = {
|
|
|
@@ -2843,7 +2805,6 @@ export default {
|
|
|
onZTreeClick: function (evt, treeId, treeNode) {
|
|
|
// 点击事件
|
|
|
this.containsSubChecked = false;
|
|
|
- this.queryInfo.partnerCompaniesId = treeNode.id;
|
|
|
this.agreement.partnerCompaniesId = treeNode.id;
|
|
|
|
|
|
this.findPage();
|
|
|
@@ -2895,13 +2856,16 @@ export default {
|
|
|
let parmas = {
|
|
|
pageNum: this.pageNum,
|
|
|
pageSize: this.pageSize,
|
|
|
- associationCompaniesId: this.queryInfo.associationCompaniesId
|
|
|
+ partnerCompaniesId: this.agreement.partnerCompaniesId,
|
|
|
+ companiesType: this.supplierType,
|
|
|
}
|
|
|
this.$api.insCompany.agreementPage(parmas).then(res => {
|
|
|
- this.pageResult = res.data.content;
|
|
|
- this.pageNum = res.data.pageNum;
|
|
|
- this.pageSize = res.data.pageSize;
|
|
|
- this.totalSize = res.data.totalSize;
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.pageResult = res.data.content;
|
|
|
+ this.pageNum = res.data.pageNum;
|
|
|
+ this.pageSize = res.data.pageSize;
|
|
|
+ this.totalSize = res.data.totalSize;
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
// 右侧列表的方法End
|
|
|
@@ -2955,10 +2919,10 @@ export default {
|
|
|
handleChange(value) {
|
|
|
|
|
|
this.agreement.partnerCompaniesId = value[value.length - 1];
|
|
|
- if(this.supplierType == '1'){
|
|
|
- this.agreement.agreementType="1";
|
|
|
- }else if(this.supplierType == '0'){
|
|
|
- this.agreement.agreementType="2";
|
|
|
+ if (this.supplierType == '1') {
|
|
|
+ this.agreement.agreementType = "1";
|
|
|
+ } else if (this.supplierType == '0') {
|
|
|
+ this.agreement.agreementType = "2";
|
|
|
}
|
|
|
},
|
|
|
prodhandleChange(value) {
|
|
|
@@ -2969,10 +2933,10 @@ export default {
|
|
|
this.operType = "ADD";
|
|
|
this.dialogTitle = "新增协议";
|
|
|
this.agreementdialogVisible = true;
|
|
|
- if(this.supplierType == '1'){
|
|
|
- this.agreement.agreementType="1";
|
|
|
- }else if(this.supplierType == '0'){
|
|
|
- this.agreement.agreementType="2";
|
|
|
+ if (this.supplierType == '1') {
|
|
|
+ this.agreement.agreementType = "1";
|
|
|
+ } else if (this.supplierType == '0') {
|
|
|
+ this.agreement.agreementType = "2";
|
|
|
}
|
|
|
},
|
|
|
closeVisible() {
|
|
|
@@ -2993,27 +2957,6 @@ export default {
|
|
|
handleTableDeleteFlag(data) {
|
|
|
return this.$message({ message: "咦,没删除成功", type: "info" });
|
|
|
},
|
|
|
- removeProductTab(targetName) {
|
|
|
- let tabs = this.productTabs;
|
|
|
- let activeName = this.productTabsValue;
|
|
|
- if (activeName === targetName) {
|
|
|
- tabs.forEach((tab, index) => {
|
|
|
- if (tab.productid === targetName) {
|
|
|
- let nextTab = tabs[index + 1] || tabs[index - 1];
|
|
|
- if (nextTab) {
|
|
|
- activeName = nextTab.productid;
|
|
|
- } else {
|
|
|
- this.activeTabs = "second";
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- this.productTabsValue = activeName;
|
|
|
- this.productTabs = tabs.filter((tab) => tab.productid !== targetName);
|
|
|
- if (this.productTabs.length == 0) {
|
|
|
- this.activeTabs = "second";
|
|
|
- }
|
|
|
- },
|
|
|
//第二个弹框End
|
|
|
checkForm(formNameIndex) {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
@@ -3061,6 +3004,7 @@ export default {
|
|
|
type: 'success'
|
|
|
});
|
|
|
this.agreementdialogVisible = false;
|
|
|
+ this.agreement.partnerCompaniesId = "";
|
|
|
this.findPage();
|
|
|
}
|
|
|
})
|
|
|
@@ -3080,6 +3024,7 @@ export default {
|
|
|
type: 'success'
|
|
|
});
|
|
|
this.agreementdialogVisible = false;
|
|
|
+ this.agreement.partnerCompaniesId = "";
|
|
|
this.findPage();
|
|
|
}
|
|
|
})
|