|
|
@@ -1126,8 +1126,7 @@
|
|
|
<h4>配置参数</h4>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
- <el-col :span="10"
|
|
|
- v-for="(domain, index) in attributionform.fields" :key="domain.index">
|
|
|
+ <el-col :span="10" v-for="(domain, index) in attributionform.fields" :key="domain.index">
|
|
|
<el-form-item :label="domain.label + ':'" :prop="'fields.' + index + '.value'" :rules="{
|
|
|
required: true, message: domain.label + '不能为空', trigger: 'blur'
|
|
|
}">
|
|
|
@@ -1900,7 +1899,7 @@ export default {
|
|
|
children: "children",
|
|
|
},
|
|
|
options: [], //保险公司下拉列表
|
|
|
- activeTabs: "scheme",
|
|
|
+ activeTabs: "first",
|
|
|
operType: "ADD", //'ADD','EDIT'
|
|
|
dialogTitle: "新增协议",
|
|
|
attributionformRules: {
|
|
|
@@ -1933,14 +1932,14 @@ export default {
|
|
|
cooperationChannels: [
|
|
|
{ required: true, message: "请选择合作渠道", trigger: "blur" },
|
|
|
],
|
|
|
- dockingPhone: [{ required: true, message: "请添加对接人", trigger: "blur" }],
|
|
|
+ dockingPerson: [{ required: true, message: "请添加对接人", trigger: "blur" }],
|
|
|
withTax: [
|
|
|
{ required: true, message: "请选择含增值税结算", trigger: "blur" },
|
|
|
],
|
|
|
- startdate: [
|
|
|
+ startDate: [
|
|
|
{ required: true, message: "请输入协议生效日期", trigger: "blur" },
|
|
|
],
|
|
|
- enddate: [
|
|
|
+ endDate: [
|
|
|
{ required: true, message: "请输入协议失效日期", trigger: "blur" },
|
|
|
],
|
|
|
matchType: [
|
|
|
@@ -1949,9 +1948,12 @@ export default {
|
|
|
moneytype: [
|
|
|
{ required: true, message: "请选择佣金发放方式", trigger: "blur" },
|
|
|
],
|
|
|
- moneytime: [
|
|
|
+ moneyTime: [
|
|
|
{ required: true, message: "请选择结算周期", trigger: "blur" },
|
|
|
],
|
|
|
+ validStatus: [
|
|
|
+ { required: true, message: "请选择", trigger: "blur" },
|
|
|
+ ],
|
|
|
},
|
|
|
|
|
|
//------------协议下拉框数据 begin-----------------
|
|
|
@@ -2144,7 +2146,7 @@ export default {
|
|
|
if (res.code == '200') {
|
|
|
console.log(res)
|
|
|
let scheme = res.data.scheme;
|
|
|
- this.agreement = res.data.agreement;
|
|
|
+ this.agreement = res.data.agreement;//协议信息
|
|
|
this.costform.scheme = scheme;
|
|
|
this.UnderwritingRules = res.data.underwritingRules;
|
|
|
this.attributionform = res.data.ptlAgreementAttribution;
|
|
|
@@ -2155,7 +2157,7 @@ export default {
|
|
|
return ele;
|
|
|
})
|
|
|
}
|
|
|
- this.roductList1=[];
|
|
|
+ this.roductList1 = [];
|
|
|
scheme.map(ele => {
|
|
|
this.roductList1.push(ele.productId)
|
|
|
return ele;
|
|
|
@@ -2245,13 +2247,17 @@ 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') {
|
|
|
+ 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,
|
|
|
@@ -2276,7 +2282,7 @@ export default {
|
|
|
if (this.operType == "EDIT") {
|
|
|
let item = this.costform.scheme[lineindex].productCosts[outindex].factor;
|
|
|
item.map(ele => {
|
|
|
- if (ele.factorType == '2') {
|
|
|
+ if (ele.factorType == '2' && ele.factor.length != 0) {
|
|
|
console.log(ele)
|
|
|
this.personFactorForm = ele.factor[0];
|
|
|
return ele;
|
|
|
@@ -2308,7 +2314,7 @@ export default {
|
|
|
if (this.operType == "EDIT") {
|
|
|
let item = this.costform.scheme[lineindex].productCosts[outindex].factor;
|
|
|
item.map(ele => {
|
|
|
- if (ele.factorType == '3') {
|
|
|
+ if (ele.factorType == '3' && ele.factor.length != 0) {
|
|
|
this.insuranceFactorForm = ele.factor[0];
|
|
|
return ele;
|
|
|
}
|
|
|
@@ -2331,7 +2337,7 @@ export default {
|
|
|
if (this.operType == "EDIT") {
|
|
|
let item = this.costform.scheme[lineindex].productCosts[outindex].factor;
|
|
|
item.map(ele => {
|
|
|
- if (ele.factorType == '4') {
|
|
|
+ if (ele.factorType == '4' && ele.factor.length != 0) {
|
|
|
this.otherFactorForm = ele.factor[0];
|
|
|
return ele;
|
|
|
}
|
|
|
@@ -2699,45 +2705,51 @@ export default {
|
|
|
this.UnderwritingRules[1].rulesFactor[1].factor[0].OwnerId.parameter = OwnerId3;
|
|
|
this.UnderwritingRules[1].rulesFactor[1].factor[0].ApplicantId.parameter = ApplicantId3;
|
|
|
this.UnderwritingRules[1].rulesFactor[1].factor[0].InsureId.parameter = InsureId3;
|
|
|
- if (this.operType == 'ADD') {
|
|
|
- let params = {
|
|
|
- agreement: this.agreement,
|
|
|
- scheme: this.costform.scheme,
|
|
|
- underwritingRules: this.UnderwritingRules,
|
|
|
- attribution: this.attributionform,
|
|
|
- dept: this.dept
|
|
|
- }
|
|
|
- console.log(params)
|
|
|
- this.$api.insCompany.addagreement(params).then(res => {
|
|
|
- if (res.code == '200') {
|
|
|
- this.$message({
|
|
|
- message: res.msg,
|
|
|
- type: 'success'
|
|
|
- });
|
|
|
- this.agreementdialogVisible = false;
|
|
|
- this.findPage();
|
|
|
+ this.$refs["addAgreementRef"].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ if (this.operType == 'ADD') {
|
|
|
+
|
|
|
+ let params = {
|
|
|
+ agreement: this.agreement,
|
|
|
+ scheme: this.costform.scheme,
|
|
|
+ underwritingRules: this.UnderwritingRules,
|
|
|
+ attribution: this.attributionform,
|
|
|
+ dept: this.dept
|
|
|
+ }
|
|
|
+ console.log(params)
|
|
|
+ this.$api.insCompany.addagreement(params).then(res => {
|
|
|
+ if (res.code == '200') {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ this.agreementdialogVisible = false;
|
|
|
+ this.findPage();
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ let upparams = {
|
|
|
+ agreement: this.agreement,
|
|
|
+ scheme: this.costform.scheme,
|
|
|
+ underwritingRules: this.UnderwritingRules,
|
|
|
+ attribution: this.attributionform,
|
|
|
+ dept: this.dept
|
|
|
+ }
|
|
|
+ console.log(upparams)
|
|
|
+ this.$api.insCompany.updateagreement(this.agreementId, upparams).then(res => {
|
|
|
+ if (res.code == '200') {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ this.agreementdialogVisible = false;
|
|
|
+ this.findPage();
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
- })
|
|
|
- } else {
|
|
|
- let upparams = {
|
|
|
- agreement: this.agreement,
|
|
|
- scheme: this.costform.scheme,
|
|
|
- underwritingRules: this.UnderwritingRules,
|
|
|
- attribution: this.attributionform,
|
|
|
- dept: this.dept
|
|
|
}
|
|
|
- console.log(upparams)
|
|
|
- this.$api.insCompany.updateagreement(this.agreementId, upparams).then(res => {
|
|
|
- if (res.code == '200') {
|
|
|
- this.$message({
|
|
|
- message: res.msg,
|
|
|
- type: 'success'
|
|
|
- });
|
|
|
- this.agreementdialogVisible = false;
|
|
|
- this.findPage();
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
+ })
|
|
|
+
|
|
|
},
|
|
|
//分页条数
|
|
|
handleSizeChange(val) {
|