Просмотр исходного кода

1.新增车险数据导出
2.新增新车规则维护

haizhouwang 2 лет назад
Родитель
Сommit
8850fe3d04

+ 2 - 1
config/dev.env.js

@@ -5,10 +5,11 @@ const prodEnv = require('./prod.env')
 module.exports = merge(prodEnv, {
   NODE_ENV: '"development"',
   ENV_CONFIG:'"dev"',
-  BASE_URL: '"http://39.98.239.48/web-api"',//测试服务器
+  // BASE_URL: '"http://39.98.239.48/web-api"',//测试服务器
   // BASE_URL:'"http://sxzgkj.baoxianzhanggui.com/web-api"'//正式服务器
   // BASE_URL: '"http://192.168.0.115:8080/"' //凯森
   // BASE_URL: '"http:///192.168.0.253:8082/"',//田智
+  BASE_URL: '"http:///192.168.0.36:8080/"',//靖燕龙
 })
 
 

+ 2 - 0
src/http/api.js

@@ -15,6 +15,7 @@ import * as esmuserinternal from './moudules/esm/esmuserinternal'
 import * as esmagreement from './moudules/esm/esmagreement'
 import * as esmagreementprod from './moudules/esm/esmagreementprod'
 import * as esmcompose from './moudules/esm/esmcompose'
+import * as esminsvehicleinspectioncode from './moudules/esm/esminsvehicleinspectioncode'
 
 //产品
 import * as product from './moudules/product/product'
@@ -56,6 +57,7 @@ export default {
     esmagreementprod,
 	  esmcompose,
     esmuserinternal,
+    esminsvehicleinspectioncode,
     ////////////产品////////////////
     product,
     ////////////新车规则维护////////////////

+ 36 - 0
src/http/moudules/esm/esminsvehicleinspectioncode.js

@@ -0,0 +1,36 @@
+import axios from '../../axios'
+
+
+//验车码查询列表
+export const display = (data) => {
+    return axios({
+        url: '/esmInsVehicleInspectionCode/display',
+        method: 'post',
+        data
+    })
+}
+
+//验车码修改
+export const remove = (id) => {
+    return axios({
+        url: '/esmInsVehicleInspectionCode/remove/'+id,
+        method: 'delete'
+    })
+}
+
+//验车码删除
+export const modification = (id) => {
+    return axios({
+        url: '/esmInsVehicleInspectionCode/modification/'+id,
+        method: 'delete'
+    })
+}
+
+//验车码新增
+export const submit = (data) => {
+    return axios({
+        url: '/esmInsVehicleInspectionCode/submit',
+        method: 'post',
+        data
+    })
+}

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

@@ -732,6 +732,14 @@ export const obtainWarranty = (data) => {
         data
     })
 }
+//车险数据导出
+export const orderExportExcel = (data) => {
+    return axios({
+        url: "/insurance/order/orderExportExcel",
+        method: "post",
+        data
+    })
+}
 /***
     爬虫统一调用模块
  */

+ 152 - 0
src/views/FinancialManagement/InsuranceData/InsuranceDataExport.vue

@@ -0,0 +1,152 @@
+<template>
+    <div>
+      <el-main ref="elMain" style="padding: 0px;">
+            <!-- 工具区域Start -->
+            <el-form class="queryForm" ref="queryFormRef" :model="queryForm" label-width="80px">
+            <el-row style="margin-bottom: 15px;">
+              <el-col :span="8">
+                <el-form-item label="录入时间">
+                  <el-date-picker value-format="yyyy-MM-dd" v-model="queryForm.date" style="margin-left: 20px;" size="mini"
+                    type="daterange" align="left" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
+                  </el-date-picker>
+                </el-form-item>
+              </el-col>
+              <el-col :span="4">
+                <el-form-item label="订单状态">
+                  <el-select v-model="queryForm.orderStatus" disabled class="widths" size="mini" clearable>
+                    <el-option v-for="val in optionsStatus" :key='val.dictValue' :label="val.dictTag" :value="val.dictValue" ></el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              </el-row>
+            </el-form>
+            <kt-button label="导出Excel" :perms="permsDelete" size="small" type="danger" @click="handlePrint()"
+           style="float: left;margin-left: 50px;" />
+      </el-main>
+    </div>
+  </template>
+  <script>
+  import KtButton from "@/views/Core/KtButton";
+  export default {
+    components: {
+      KtButton,
+    },
+    data() {
+      return {
+        queryForm:{},
+        permsDelete:"sys:user:delete",
+        optionsStatus:[],
+      };
+    },
+    created() {
+      this.$api.insCompany.dicType('insOrderStatus').then(res=>{
+      this.optionsStatus=res.data.ddList
+      let filterArr = res.data.ddList.filter(item=>{
+        return item.dictTag == '已承保'
+      })
+      if(filterArr.length){
+        this.queryForm.orderStatus = filterArr[0].dictValue
+      }
+    })
+    },
+    mounted() {
+    
+    },
+    methods: {
+        // 导出excel
+	  handlePrint(){
+        console.log(this.queryForm.date)
+        if(this.queryForm.date!=null){
+            this.queryForm.startDate=this.queryForm.date[0]
+            this.queryForm.endDate=this.queryForm.date[1]
+        }
+        let params = {
+            endDate:this.queryForm.endDate,
+            orderstatus:this.queryForm.orderStatus,
+            startDate:this.queryForm.startDate
+        }
+        this.$api.letter.orderExportExcel(params).then(res=>{
+            let url = 'http:///192.168.0.36:8080/upload/'+res.data // 3.创建一个临时的url指向blob对象
+            // 4.创建url之后可以模拟对此文件对象的一系列操作,例如:预览、下载
+            let a = document.createElement("a");
+            a.href = url;
+            a.download = "导出订单.xlsx";
+            a.click();
+            // 5.释放这个临时的对象url
+            window.URL.revokeObjectURL(url);					
+	  	})
+	  },
+    },
+  };
+  </script>
+  <style scoped lang="scss">
+  .el-divider {
+    margin: 10px 0px 15px !important;
+  }
+  
+  .queryForm .el-row {
+    margin: 0px;
+  }
+  
+  .queryForm .el-form-item {
+    margin-bottom: 0px;
+  }
+  
+  .products {
+  
+    // margin: 20px;
+    .productCosts {
+      text-align: center;
+  
+      span {
+        font-weight: bold;
+      }
+    }
+  }
+  
+  .ruleStyle{
+    /deep/ .el-divider__text{
+      color: red;
+    }
+  }
+  
+  .products>div {
+    margin: 5px;
+  }
+  
+  .productstitle {
+    width: 100%;
+    border-bottom: 2px solid #409eff;
+    text-align: center;
+  
+  }
+  
+  .productstitle>div {
+    width: 100px;
+    height: 26px;
+    line-height: 30px;
+    background: #409eff;
+    color: #fff;
+    border-top-right-radius: 15px;
+    padding: 2px;
+    font-size: 12px;
+  }
+  
+  /deep/ {
+    .el-button--warning {
+      color: #fff;
+      background-color: #ee7000;
+      border-color: #ee7000;
+  
+      &:hover {
+        color: #fff;
+        background-color: #ee6f00ce;
+        border-color: #ee6f00ce;
+      }
+    }
+  }
+  .apistyle /deep/ .el-form-item__label{
+    min-width: 180px;
+  }
+  </style>
+  

+ 358 - 0
src/views/ProductManage/Carverificationcode/ValidateEntry.vue

@@ -0,0 +1,358 @@
+<template>
+    <div>
+      <el-main ref="elMain" style="padding: 0px">
+        <!-- 工具区域Start -->
+        <el-row style="margin: 0px 20px">
+          <kt-button
+            style="
+              background-color: #52c578;
+              border: #52c578;
+              margin-left: 15px;
+              margin-bottom: 20px;
+            "
+            icon="fa fa-plus"
+            label="添加"
+            type="primary"
+            perms="sys:dept:add"
+            @click="handleAddjudgeRule"
+          />
+        </el-row>
+        <kt-common-table
+          permsEdit="judgeRule:judgeRule:edit"
+          permsDelete="judgeRule:judgeRule:delete"
+          :data="pageResult"
+          :columns="columns"
+          editButtonName="编辑"
+          deleteButtonName="删除"
+          :showBatchDelete="false"
+          @findPage="findPage"
+          @handleEdit="handleTableEdit"
+          @handleDeleteFlag="handleTableDeleteFlag"
+        >
+        </kt-common-table>
+      </el-main>
+  
+      <!-- 新增对话框 -->
+      <el-dialog
+        :title="dialogTitle"
+        v-dialogDrag
+        :visible.sync="judgeRuleDialogVisible"
+        width="800px"
+        @open="closeDialog"
+      >
+        <el-form
+          :model="dataForm"
+          :rules="dataFormRules"
+          ref="dataForm"
+          @keyup.enter.native="submitForm"
+          label-width="100px"
+          size="small"
+        >
+          <el-row>
+            <el-col :span="10">
+              <el-form-item label="归属保司" prop="companyId">
+                <el-select
+                  v-model="dataForm.companyId"
+                  placeholder="请选择归属保司"
+                  filterable
+                >
+                  <el-option
+                    v-for="item in prodInsurance"
+                    :key="item.id"
+                    :label="item.name"
+                    :value="item.id"
+                  ></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="10" :offset="2">
+              <el-form-item label="验车码" prop="vehicleInspectionCode">
+                <el-input
+                  type="text"
+                  @change="judgValue"
+                  v-model="dataForm.vehicleInspectionCode"
+                  placeholder="请输入验车码"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+        <span slot="footer" class="dialog-footer">
+          <el-button size="small" @click="judgeRuleDialogVisible = false"
+            >取 消</el-button
+          >
+          <el-button size="small" type="primary" @click="submitForm"
+            >确 定</el-button
+          >
+        </span>
+      </el-dialog>
+    </div>
+  </template>
+    <script>
+  import KtButton from "@/views/Core/KtButton"; //按钮权限组件
+  import KtCommonTable from "@/views/Core/KtCommonTable.vue"; //表格组件
+  export default {
+    components: {
+      KtButton,
+      KtCommonTable,
+    },
+    data() {
+      return {
+        // 右侧列表查询数据Start
+        pageResult: {},
+        pageRequest: {
+          //查询的默认条件
+          pageNum: 1,
+          pageSize: 20,
+        },
+        columns: [
+          // 数据列
+          {
+            prop: "companyName",
+            label: "保险公司名称",
+            minWidth: 80,
+            sortable: false,
+          },
+          {
+            prop: "vehicleInspectionCode",
+            label: "验车码",
+            minWidth: 80,
+            sortable: false,
+          },
+        ],
+        // 产品字段
+        dataForm: {
+          companyId: "", //保险公司名称
+          vehicleInspectionCode: "", //新车判断单位值
+        },
+        dataFormRules: {
+          
+        },
+        judgeRuleDialogVisible: false, //控制产品对话框
+        operType: "ADD", //'ADD','EDIT'
+        dialogTitle: "新增",
+        prodInsurance: [], //归属保司字典
+        id: "",
+        unitTypeData: [], //新车判断单位字典数据
+      };
+    },
+    created() {
+      this.dictList();
+    },
+    watch: {},
+    methods: {
+      /**
+       * 获取系统字典
+       */
+      dictList(data) {
+        this.$api.dict
+          .dictList()
+          .then((res) => {
+            //获取新车判断单位字典数据
+            let dataArr = res.filter((item) => {
+              return item.dictType == "newCarJudgingUnit";
+            });
+            dataArr.length > 0 ? (this.unitTypeData = dataArr[0].ddList) : "";
+          })
+          .then(data != null ? data.callback : "");
+      },
+      /**
+       * 判断修改单位值
+       */
+      judgValue(e) {
+        if (e < 1 && e != "") {
+          this.$message({
+            message: "单位值不能小于等于0",
+            type: "error",
+          });
+          this.dataForm.vehicleInspectionCode = "";
+        }
+      },
+      /**
+       * 字典归属保司数据
+       */
+      insCompanyquery() {
+        return new Promise((resolve, reject) => {
+          if (this.prodInsurance.length > 0) {
+            resolve();
+            return;
+          }
+          this.$api.insCompany.gainTopList("1").then((res) => {
+            this.prodInsurance = res.data;
+            resolve();
+          });
+        });
+      },
+      /**
+       * 列表编辑按钮
+       */
+      handleTableEdit({ row, index }) {
+        this.operType = "EDIT"; //'ADD','EDIT'
+        this.dialogTitle = "编辑";
+        this.dataForm = {
+          companyId: row.companyId,
+          unitTypeCode: row.unitTypeCode,
+          vehicleInspectionCode: row.vehicleInspectionCode,
+        };
+        this.id = row.id;
+        this.judgeRuleDialogVisible = true;
+      },
+      /**
+       * 列表删除按钮
+       **/
+      handleTableDeleteFlag(data) {
+        this.$confirm("此操作将删除该数据, 是否继续?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+          .then(() => {
+            this.$api.esminsvehicleinspectioncode.modification(data.row.id).then((res) => {
+              if (res.code == 200) {
+                this.$message({
+                  type: "success",
+                  message: "删除成功!",
+                });
+                this.findPage();
+              } else {
+                this.$message({
+                  type: "warning",
+                  message: res.msg,
+                });
+              }
+            });
+          })
+          .catch(() => {
+            this.$message({
+              type: "info",
+              message: "已取消删除",
+            });
+          });
+      },
+      /**
+       * 新增按钮
+       */
+      handleAddjudgeRule() {
+        this.operType = "ADD"; //'ADD','EDIT'
+        this.dialogTitle = "新增";
+        this.judgeRuleDialogVisible = true;
+      },
+      /**
+       * 获取列表数据
+       */
+      findPage(data) {
+        this.insCompanyquery().then(() => {
+          if (data && data.pageRequest) {
+            this.pageRequest.pageNum = data.pageRequest.pageNum;
+            this.pageRequest.pageSize = data.pageRequest.pageSize;
+          }
+          this.$api.esminsvehicleinspectioncode.display(this.pageRequest).then((res) => {
+            console.log(res)
+              if (res.code == 200) {
+                /**
+                 * 当页数大于1时,点击删除按钮删除当前页最后一条时让当前页数见一在重新请求数据strat
+                 */
+                if (
+                  res.data.content.length == 0 &&
+                  this.pageRequest.pageNum > 1
+                ) {
+                  this.pageRequest.pageNum = this.pageRequest.pageNum - 1;
+                  this.findPage();
+                }
+                /**
+                 * 当页数大于1时,点击删除按钮删除当前页最后一条时让当前页数见一在重新请求数据end
+                 */
+                res.data.content.forEach((item) => {
+                  //保险公司id跟名称转换
+                  let filterData = this.prodInsurance.filter((filItem) => {
+                    return item.companyId == filItem.id;
+                  });
+                  if (filterData.length) {
+                    item.companyName = filterData[0].name;
+                  } else {
+                    item.companyName = item.companyId;
+                  }
+                });
+                this.pageResult = res.data;
+              }
+            })
+            .then(data != null ? data.callback : "");
+        });
+      },
+      /**
+       * 弹框显示
+       */
+      closeDialog() {
+        if (this.operType == "ADD") {
+          for (let key in this.dataForm) {
+            this.dataForm[key] = "";
+          }
+        }
+      },
+      /**
+       * 提交数据
+       */
+      submitForm() {
+        this.$refs.dataForm.validate((valid) => {
+          if (valid) {
+            if (this.operType == "ADD") {
+              //新增
+              this.$api.esminsvehicleinspectioncode.submit(this.dataForm).then((res) => {
+                if (res.code == 200) {
+                  this.$message({
+                    message: "操作成功",
+                    type: "success",
+                  });
+                  this.findPage();
+                  this.judgeRuleDialogVisible = false;
+                } else {
+                  this.$message({
+                    message: res.msg,
+                    type: "error",
+                  });
+                }
+              });
+            } else {
+              //编辑
+              this.$api.judgerule
+                .remove(this.id, this.dataForm)
+                .then((res) => {
+                  if (res.code == 200) {
+                    this.$message({
+                      message: "修改成功",
+                      type: "success",
+                    });
+                    this.findPage();
+                    this.judgeRuleDialogVisible = false;
+                  } else {
+                    this.$message({
+                      message: "操作失败",
+                      type: "error",
+                    });
+                  }
+                });
+            }
+          }
+        });
+      },
+    },
+  };
+  </script>
+    
+    <style scoped>
+  /* 顶部查询条件样式Start */
+  .queryFrom .el-row {
+    margin: 10px 0px;
+  }
+  
+  .queryFrom .el-form-item {
+    margin-bottom: 0px;
+  }
+  
+  .queryFrom .queryButton .el-form-item__content {
+    margin-left: 40px !important;
+  }
+  
+  /* 顶部查询条件样式End */
+  </style>
+    

+ 1 - 1
src/views/ProductManage/Newcarrule/MaintenanceRule.vue

@@ -24,7 +24,7 @@
         :columns="columns"
         editButtonName="编辑"
         deleteButtonName="删除"
-        :showBatchDelete="true"
+        :showBatchDelete="false"
         @findPage="findPage"
         @handleEdit="handleTableEdit"
         @handleDeleteFlag="handleTableDeleteFlag"