Ver Fonte

Merge branch 'dev' of http://www.baoxianzhanggui.com:8090/sxzgd/vue-insagent-pc into dev

lihongxiao há 2 anos atrás
pai
commit
0294f58f23

+ 8 - 0
src/http/moudules/insCompany.js

@@ -572,3 +572,11 @@ export const deleteDrivingInsurance = (data) => {
     data
     data
   })
   })
 }
 }
+//非车规则删除
+export const endDateBatch = (data) => {
+  return axios({
+    url: '/plt/new/agreement/costs/endDateBatch',
+    method: "post",
+    data
+  })
+}

+ 122 - 46
src/views/AgreementManage/CarInsurance/AgreementEntry.vue

@@ -394,7 +394,7 @@
       </div>
       </div>
       <el-form :inline="true" :model="productpageRequest" class="demo-form-inline" size="small">
       <el-form :inline="true" :model="productpageRequest" class="demo-form-inline" size="small">
         <el-form-item label="产品">
         <el-form-item label="产品">
-          <el-select v-model="productpageRequest.productCode" placeholder="选择产品" clearable>
+          <el-select v-model="productpageRequest.productCode" placeholder="选择产品" clearable multiple>
             <el-option v-for="item in productsTypeoptions" :key="item.dictValue" :label="item.dictTag"
             <el-option v-for="item in productsTypeoptions" :key="item.dictValue" :label="item.dictTag"
               :value="item.dictValue"></el-option>
               :value="item.dictValue"></el-option>
           </el-select>
           </el-select>
@@ -425,12 +425,12 @@
           <el-button type="success" @click="expenseCopy">费用复制</el-button>
           <el-button type="success" @click="expenseCopy">费用复制</el-button>
         </el-form-item>
         </el-form-item>
       </el-form>
       </el-form>
-      <kt-common-table :tableHeights="700" :SerialShow="false" :operationWidth="250" :showOperation="true"
-        :showBatchDelete="false" :showBatchSettled="false" :showBatchPrint="false" :data="productPageResult"
+      <kt-common-table :tableHeights="680" :SerialShow="false" :operationWidth="250" :showOperation="true"
+        :showBatchDelete="true" :showBatchSettled="false" :showBatchPrint="false" :data="productPageResult"
         :columns="productColumns" @findPage="productCostFindPage" button2Name="编辑"
         :columns="productColumns" @findPage="productCostFindPage" button2Name="编辑"
-        permsButton2="agreement:input:productCost" @handleButton2="productUpdate" button3Name="删除"
-        permsButton3="agreement:input:productCost" @handleButton3="productDelete" button5Name="轨迹"
-        @handleButton5="trajectory" button3Icon="">
+        permsButton2="agreement:input:productCost" @handleButton2="productUpdate" deleteName="批量修改"
+        @handleDelete="batchUpdate" button3Name="删除" permsButton3="agreement:input:productCost"
+        @handleButton3="productDelete" button5Name="轨迹" @handleButton5="trajectory" button3Icon="">
       </kt-common-table>
       </kt-common-table>
     </el-dialog>
     </el-dialog>
     <!-- 订单轨迹 -->
     <!-- 订单轨迹 -->
@@ -465,6 +465,14 @@
         <el-form ref="productCostForm" :model="productCostForm" label-width="130px" :size="overSize"
         <el-form ref="productCostForm" :model="productCostForm" label-width="130px" :size="overSize"
           :rules="costformRules">
           :rules="costformRules">
           <el-row>
           <el-row>
+            <el-col :span="20" :offset="2" v-if="productCostAddDialogType=='edit'">
+              <el-form-item label="产品">
+                <el-select v-model="productUpdateObj.productId" placeholder="请选择" @change="productUpdateChange">
+                  <el-option v-for="(item,index) in productsTypeoptions" :label="item.dictTag" :value="item.dictValue" :key="index" >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
             <el-col :span="20" :offset="2">
             <el-col :span="20" :offset="2">
               <el-form-item label="费用描述">
               <el-form-item label="费用描述">
                 <el-input type="textarea" v-model="productCostForm.costsDescription" placeholder="输入费用描述内容"></el-input>
                 <el-input type="textarea" v-model="productCostForm.costsDescription" placeholder="输入费用描述内容"></el-input>
@@ -689,14 +697,15 @@
           </el-col>
           </el-col>
           <el-col :span="8">
           <el-col :span="8">
             <el-form-item label="规则起期">
             <el-form-item label="规则起期">
-              <el-date-picker value-format="yyyy-MM-dd" v-model="underwritingRulesForm.rulesStartDate" type="date" placeholder="选择日期">
+              <el-date-picker value-format="yyyy-MM-dd" v-model="underwritingRulesForm.rulesStartDate" type="date"
+                placeholder="选择日期">
               </el-date-picker>
               </el-date-picker>
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
           <el-col :span="8">
           <el-col :span="8">
             <el-form-item label="规则止期">
             <el-form-item label="规则止期">
-              <el-date-picker value-format="yyyy-MM-dd" v-model="underwritingRulesForm.rulesEndDate" type="date" @change="rulesEndDateChange"
-                placeholder="选择日期">
+              <el-date-picker value-format="yyyy-MM-dd" v-model="underwritingRulesForm.rulesEndDate" type="date"
+                @change="rulesEndDateChange" placeholder="选择日期">
               </el-date-picker>
               </el-date-picker>
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
@@ -719,7 +728,7 @@
           <el-col :span="5">
           <el-col :span="5">
             <el-form-item label="操作人">
             <el-form-item label="操作人">
               <el-input clearable style="width:220px" size="small" placeholder="操作人"
               <el-input clearable style="width:220px" size="small" placeholder="操作人"
-                v-model="productHistoryRecordForm.modifier"></el-input>
+                v-model="productHistoryRecordForm.operator"></el-input>
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
           <el-col :span="5">
           <el-col :span="5">
@@ -797,7 +806,7 @@
           <el-col :span="5">
           <el-col :span="5">
             <el-form-item label="操作人">
             <el-form-item label="操作人">
               <el-input clearable style="width:220px" size="small" placeholder="操作人"
               <el-input clearable style="width:220px" size="small" placeholder="操作人"
-                v-model="productpageRequestForm.modifier"></el-input>
+                v-model="productpageRequestForm.operator"></el-input>
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
           <el-col :span="5">
           <el-col :span="5">
@@ -846,11 +855,21 @@
           </el-select>
           </el-select>
         </el-form-item>
         </el-form-item>
         <el-form-item label="产品">
         <el-form-item label="产品">
-          <el-select v-model="productcopyItemPageRequest.productCode" placeholder="选择产品">
+          <el-select v-model="productcopyItemPageRequest.productCode" placeholder="选择产品" multiple clearable>
             <el-option v-for="item in productsTypeoptions" :key="item.dictValue" :label="item.dictTag"
             <el-option v-for="item in productsTypeoptions" :key="item.dictValue" :label="item.dictTag"
               :value="item.dictValue"></el-option>
               :value="item.dictValue"></el-option>
           </el-select>
           </el-select>
         </el-form-item>
         </el-form-item>
+        <el-form-item label="费用起期">
+          <el-date-picker style="width: 100%" v-model="productcopyItemPageRequest.costStartDate" type="date"
+            placeholder="选择费用开始日期" value-format="yyyy-MM-dd">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="费用止期">
+          <el-date-picker style="width: 100%" v-model="productcopyItemPageRequest.costsEndDate" type="date"
+            placeholder="选择费用结束日期" @change="costsEndDateChange1" value-format="yyyy-MM-dd">
+          </el-date-picker>
+        </el-form-item>
         <el-form-item label="费用描述">
         <el-form-item label="费用描述">
           <el-input v-model="productcopyItemPageRequest.costsDescription" clearable placeholder="费用描述"></el-input>
           <el-input v-model="productcopyItemPageRequest.costsDescription" clearable placeholder="费用描述"></el-input>
         </el-form-item>
         </el-form-item>
@@ -885,6 +904,7 @@
               </el-col>
               </el-col>
             </el-row>
             </el-row>
             <el-row>
             <el-row>
+
               <el-col :span="12">
               <el-col :span="12">
                 <el-form-item label="协议简称" prop="agreementAbbreviation">
                 <el-form-item label="协议简称" prop="agreementAbbreviation">
                   <el-input v-model="agreementsHistoryInfo.agreement.agreementAbbreviation" placeholder="请输入协议简称"
                   <el-input v-model="agreementsHistoryInfo.agreement.agreementAbbreviation" placeholder="请输入协议简称"
@@ -1187,6 +1207,18 @@
         <el-button size="small" type="primary" @click="nonVehicleRuleObjectSubmit">确 定</el-button>
         <el-button size="small" type="primary" @click="nonVehicleRuleObjectSubmit">确 定</el-button>
       </span>
       </span>
     </el-dialog>
     </el-dialog>
+    <el-dialog title="批量操作" :visible.sync="batchdialogVisible" width="30%">
+      <div class="dis">
+        <span>费用止期:</span>
+        <el-date-picker size="small" style="width: 300px" v-model="batchCostEndDate" type="date" placeholder="选择结束日期"
+          value-format="yyyy-MM-dd">
+        </el-date-picker>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="small" @click="batchdialogVisible = false">取 消</el-button>
+        <el-button size="small" type="primary" @click="batchCostsubmit">确 定</el-button>
+      </span>
+    </el-dialog>
   </div>
   </div>
 </template>
 </template>
 <script>
 <script>
@@ -1207,17 +1239,13 @@ export default {
   },
   },
   data() {
   data() {
     return {
     return {
-      data: [
-        {
-          projectCode: "02746045001001",
-          projectName: "国任VIP驾乘-非营运客车",
-          children: [
-            {
-              id: 222,
-            }
-          ],
-        }
-      ],
+      productUpdateObj:{
+        productId:"",
+        productName:"",
+      },
+      batchCostEndDate: '',
+      batchCostIds: [],
+      batchdialogVisible: false,//批量弹窗
       nonVehicleRuleObject: {
       nonVehicleRuleObject: {
         parentId: "",
         parentId: "",
         parentName: "",
         parentName: "",
@@ -1469,6 +1497,7 @@ export default {
         { prop: "costsEndDate", label: "费用止期", minWidth: 160 },
         { prop: "costsEndDate", label: "费用止期", minWidth: 160 },
         { prop: "costsDescription", label: "费用描述", minWidth: 220 },
         { prop: "costsDescription", label: "费用描述", minWidth: 220 },
         { prop: "desc", label: "费用因子描述", minWidth: 520 },
         { prop: "desc", label: "费用因子描述", minWidth: 520 },
+        { prop: "priorityLevel", label: "方案优先级", minWidth: 120 },
         { prop: "isAudit", label: "审核状态", minWidth: 160, formatter: this.auditTypeFormation },
         { prop: "isAudit", label: "审核状态", minWidth: 160, formatter: this.auditTypeFormation },
         {
         {
           prop: "jqCarCostsProportion",
           prop: "jqCarCostsProportion",
@@ -1592,14 +1621,16 @@ export default {
           minWidth: 160,
           minWidth: 160,
         },
         },
 
 
-        { prop: "priorityLevel", label: "方案优先级", minWidth: 120 },
+
       ],
       ],
       productcopyItemColumns: [
       productcopyItemColumns: [
         //数据列
         //数据列
         { prop: "productName", label: " 产品名称", minWidth: 160 },
         { prop: "productName", label: " 产品名称", minWidth: 160 },
         { prop: "costsStartDate", label: "费用起期", minWidth: 160 },
         { prop: "costsStartDate", label: "费用起期", minWidth: 160 },
         { prop: "costsEndDate", label: "费用止期", minWidth: 160 },
         { prop: "costsEndDate", label: "费用止期", minWidth: 160 },
+        { prop: "costsDescription", label: "费用描述", minWidth: 220 },
         { prop: "desc", label: "费用因子描述", minWidth: 520 },
         { prop: "desc", label: "费用因子描述", minWidth: 520 },
+        { prop: "priorityLevel", label: "方案优先级", minWidth: 120 },
         {
         {
           prop: "jqCarCostsProportion",
           prop: "jqCarCostsProportion",
           label: "费用比例(交强)",
           label: "费用比例(交强)",
@@ -1721,9 +1752,7 @@ export default {
           label: "非车出口比例五级",
           label: "非车出口比例五级",
           minWidth: 160,
           minWidth: 160,
         },
         },
-        { prop: "costsDescription", label: "费用描述", minWidth: 220 },
 
 
-        { prop: "priorityLevel", label: "方案优先级", minWidth: 120 },
       ],
       ],
       productFilterList: [],
       productFilterList: [],
       labelWidth: "160px",
       labelWidth: "160px",
@@ -1860,7 +1889,7 @@ export default {
       //分页数据
       //分页数据
       productpageRequest: {
       productpageRequest: {
         isAudit: null,
         isAudit: null,
-        productCode: "",
+        productCode: [],
         costStartDate: "",
         costStartDate: "",
         costsEndDate: "",
         costsEndDate: "",
         costsDescription: "",
         costsDescription: "",
@@ -1868,8 +1897,10 @@ export default {
         pageSize: 20,
         pageSize: 20,
       },
       },
       productcopyItemPageRequest: {
       productcopyItemPageRequest: {
-        productCode: "",
+        productCode: [],
         agreementId: "",
         agreementId: "",
+        costStartDate: "",
+        costsEndDate: "",
         costsDescription: "",
         costsDescription: "",
         pageNum: 1,
         pageNum: 1,
         pageSize: 20,
         pageSize: 20,
@@ -2136,7 +2167,7 @@ export default {
       underwritingRulesHistoryOperatorTime: "",
       underwritingRulesHistoryOperatorTime: "",
       // 轨迹
       // 轨迹
       ddgjdialogVisible: false,
       ddgjdialogVisible: false,
-      trajectoryTable: []
+      trajectoryTable: [],
     };
     };
   },
   },
   computed: {
   computed: {
@@ -2235,6 +2266,10 @@ export default {
     this.findLeftTreeData();
     this.findLeftTreeData();
   },
   },
   methods: {
   methods: {
+    productUpdateChange(e) {
+      let name = this.productsTypeoptions.find(item => item.dictValue == e).dictTag;
+      this.productUpdateObj.productName=name;
+    },
     accidentAddRule() {
     accidentAddRule() {
       this.nonVehicleRuledialogVisible = true;
       this.nonVehicleRuledialogVisible = true;
       this.nonVehicleRuledialogType = "add";
       this.nonVehicleRuledialogType = "add";
@@ -2395,6 +2430,16 @@ export default {
         });
         });
       }
       }
     },
     },
+    costsEndDateChange1(e) {
+      let tempStartDate = this.productcopyItemPageRequest.costStartDate;
+      if (!tempStartDate) {
+        this.productcopyItemPageRequest.costsEndDate = null;
+        this.$message({
+          message: "起期不能为空",
+          type: "error",
+        });
+      }
+    },
     productcopyItemQuery() {
     productcopyItemQuery() {
       this.productcopyItemFindPage();
       this.productcopyItemFindPage();
     },
     },
@@ -2771,10 +2816,35 @@ export default {
     expenseCopy() {
     expenseCopy() {
       this.productCostCopyDialogVisible = true;
       this.productCostCopyDialogVisible = true;
       this.productcopyItemPageRequest.agreementId = "";
       this.productcopyItemPageRequest.agreementId = "";
-      this.productcopyItemPageRequest.productCode = "";
+      this.productcopyItemPageRequest.productCode = [];
       this.productcopyItemResult = [];
       this.productcopyItemResult = [];
 
 
     },
     },
+    //产品批量编辑
+    batchUpdate(data) {
+      this.batchCostIds = data;
+      this.batchdialogVisible = true;
+    },
+    batchCostsubmit() {
+      this.$api.insCompany.endDateBatch({
+        ids: this.batchCostIds,
+        costsEndDate: this.batchCostEndDate,
+      }).then((res) => {
+        if (res.code == '200') {
+          this.batchdialogVisible = false;
+          this.productCostFindPage();
+          this.$message({
+            type: 'success',
+            message: res.msg,
+          });
+        } else {
+          this.$message({
+            type: 'error',
+            message: res.msg,
+          });
+        }
+      });
+    },
     //产品编辑
     //产品编辑
     productUpdate({ row, column }) {
     productUpdate({ row, column }) {
       this.$api.insCompany.productcostFactorQuery(row.id).then((res) => {
       this.$api.insCompany.productcostFactorQuery(row.id).then((res) => {
@@ -2793,12 +2863,14 @@ export default {
             }
             }
             return val;
             return val;
           })
           })
-          this.$nextTick(() => {
-            this.dynamicFormArray = obj.costsAttrLinks;
-            obj.productId = [obj.productId]
-            obj.productName = [obj.productName]
-            this.productCostForm = obj;
-          });
+          this.dynamicFormArray = obj.costsAttrLinks;
+
+          this.productCostForm = obj;
+          this.productUpdateObj.productId= this.productCostForm.productId;
+          this.productUpdateObj.productName= this.productCostForm.productName;
+          this.productCostForm.productId = [this.productCostForm.productId]
+          this.productCostForm.productName = [this.productCostForm.productName]
+          console.log(this.productCostForm)
           this.productCostAddDialogType = "edit";
           this.productCostAddDialogType = "edit";
           this.productCostAddDialogTitle = "产品编辑";
           this.productCostAddDialogTitle = "产品编辑";
           this.productCostAddVehicleFactorVisible = true;
           this.productCostAddVehicleFactorVisible = true;
@@ -3098,6 +3170,10 @@ export default {
                 }
                 }
               });
               });
           } else {
           } else {
+            if(this.productUpdateObj.productId){
+              this.productCostForm.productId=[this.productUpdateObj.productId];
+              this.productCostForm.productName=[this.productUpdateObj.productName];
+            }
             this.$api.insCompany
             this.$api.insCompany
               .productCostUpdate(this.productCostForm)
               .productCostUpdate(this.productCostForm)
               .then((res) => {
               .then((res) => {
@@ -3249,16 +3325,16 @@ export default {
         if (res.code == 200) {
         if (res.code == 200) {
           this[type + "options"] = res.data.ddList;
           this[type + "options"] = res.data.ddList;
           //如果是产品编码,费用方案用的,单独塞进去一个兜底配置other
           //如果是产品编码,费用方案用的,单独塞进去一个兜底配置other
-          if (type == "productsType") {
-            for (let item of this.productsTypeoptions) {
-              this.productsTypeRuleoptions.push(item);
-            }
-            let productItem = {};
-            productItem.dictTag = "兜底配置";
-            productItem.dictValue = "039999";
-            productItem.sort = 5;
-            this.productsTypeoptions.push(productItem);
-          }
+          // if (type == "productsType") {
+          //   for (let item of this.productsTypeoptions) {
+          //     this.productsTypeRuleoptions.push(item);
+          //   }
+          //   let productItem = {};
+          //   productItem.dictTag = "兜底配置";
+          //   productItem.dictValue = "039999";
+          //   productItem.sort = 5;
+          //   this.productsTypeoptions.push(productItem);
+          // }
         }
         }
       });
       });
     },
     },

+ 3 - 2
src/views/AgreementManage/CarInsurance/ProductCostExamine.vue

@@ -468,8 +468,6 @@ export default {
           label: "非车出口比例五级",
           label: "非车出口比例五级",
           minWidth: 160,
           minWidth: 160,
         },
         },
-
-
         { prop: "priorityLevel", label: "方案优先级", minWidth: 120 },
         { prop: "priorityLevel", label: "方案优先级", minWidth: 120 },
       ],
       ],
       batchSizeList:[],
       batchSizeList:[],
@@ -630,6 +628,9 @@ export default {
       if (data && data.pageRequest) {
       if (data && data.pageRequest) {
         this.productpageRequest.pageNum = data.pageRequest.pageNum;
         this.productpageRequest.pageNum = data.pageRequest.pageNum;
         this.productpageRequest.pageSize = data.pageRequest.pageSize;
         this.productpageRequest.pageSize = data.pageRequest.pageSize;
+      }else{
+        this.productpageRequest.pageNum = 1;
+        this.productpageRequest.pageSize = 20;
       }
       }
       if (this.date != null) {
       if (this.date != null) {
         this.productpageRequest.createStartTime = this.date[0];
         this.productpageRequest.createStartTime = this.date[0];

+ 3 - 2
src/views/Task/daikeComponents/KtLetter.vue

@@ -5985,8 +5985,9 @@ export default {
         params.discount = this.totalCompanyList[num].discount;
         params.discount = this.totalCompanyList[num].discount;
         params.lastCompanyId = this.lastCompanyId;
         params.lastCompanyId = this.lastCompanyId;
       }
       }
-      if (namesimple == "华农财险" ) {
-        params.accidentalDrivingVo.quantity = params.accidentalDrivingVo.allQuantity;
+      if (namesimple == "华农财险" && this.huanongaccidentalDrivingVo.allQuantity) {
+        params.accidentalDrivingVo.quantity = this.accidentFormHN.allQuantity;
+        params.accidentalDrivingVo.allQuantity = this.accidentFormHN.allQuantity;
       }
       }
       this.$api.letter[api](params).then(res => {
       this.$api.letter[api](params).then(res => {
         this.totalCompanyList[num].msg = res.msg;
         this.totalCompanyList[num].msg = res.msg;