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

财务管理--车险结算--保险公司结算管理

@dongkboy 2 лет назад
Родитель
Сommit
bbb966b7dd

+ 16 - 0
src/assets/css/common.css

@@ -45,6 +45,22 @@
 .a-start{
 	align-items: flex-start;
 }
+.a-end{
+	align-items: flex-end;
+}
 .f-c{
 	flex-direction: column;
 }
+.p-1{
+  padding: 10px;
+}
+.p-2{
+  padding: 20px;
+}
+.mrgin-1{
+  margin: 10px;
+}
+.mrgin-2{
+  margin: 20px;
+}
+

+ 4 - 2
src/http/api.js

@@ -19,7 +19,8 @@ import * as esminsvehicleinspectioncode from './moudules/esm/esminsvehicleinspec
 
 //产品
 import * as product from './moudules/product/product'
-
+//财务车险结算
+import * as settlement from './moudules/finance/settlement'
 //新车规则维护
 import * as judgerule from './moudules/judgerule'
 
@@ -51,6 +52,7 @@ export default {
     menu,
     dict,
     log,
+    settlement,
     /////////////////////////////
     esmTeam,
     esmagreement,
@@ -74,5 +76,5 @@ export default {
     policy,
     salary,
     letter,
-    cost, //费用核对 
+    cost, //费用核对
 }

+ 61 - 0
src/http/moudules/finance/settlement.js

@@ -0,0 +1,61 @@
+import axios from '../../axios'
+// 保司费用查询
+export const iscompanyCostQuerypage = (data) => {
+  return axios({
+    url: '/fnc/plyFee/queryPage',
+    method: "post",
+    data
+  })
+}
+// 待结算保司费用查询
+export const iscompanyTosettledQuery = (data) => {
+  return axios({
+    url: '/fnc/plySettle/queryPly',
+    method: "post",
+    data
+  })
+}
+// 生成结算单
+export const docGenerate = (data) => {
+  return axios({
+    url: '/fnc/plySettle/generateSettle',
+    method: "post",
+    data
+  })
+}
+// 结算单查询
+export const docQuery = (data) => {
+  return axios({
+    url: '/fnc/plySettle/selectSettle',
+    method: "post",
+    data
+  })
+}
+// 结算单明细查询
+export const docDetails = (data) => {
+  return axios({
+    url: '/fnc/plySettle/selectSettleDetail',
+    method: "post",
+    data
+  })
+}
+
+// 结算单核销
+export const docWriteOff = (data) => {
+  return axios({
+    url: '/fnc/plySettle/hxSettle',
+    method: "post",
+    data
+  })
+}
+// 核销明细查询
+export const WriteOffDetails = (data) => {
+  return axios({
+    url: '/fnc/plySettle/queryHxDetail',
+    method: "post",
+    data
+  })
+}
+
+
+

+ 3 - 3
src/http/moudules/task.js

@@ -469,7 +469,7 @@ export const addorder=(data)=>{
         method:"post",
         data
     })
-    
+
 }
 export const updateorder=(data)=>{
     return axios({
@@ -477,7 +477,7 @@ export const updateorder=(data)=>{
         method:"post",
         data
     })
-    
+
 }
 //渠道结算模块
 export const  payableStatement= (data)=>{
@@ -583,6 +583,6 @@ export const delPoster = (data) => {
     return axios({
         url: '/sysPoster/delPoster?id='+data,
         method:"post",
-        
+
     })
 }

+ 20 - 28
src/views/Core/KtCommonTable.vue

@@ -49,29 +49,14 @@
             @click="handleEdit(scope.$index, scope.row)" />
           <kt-button v-if="deleteButtonName" icon="fa fa-trash" :label="deleteButtonName" :perms="permsDelete"
             :size="size" type="danger" @click="handleDeleteFlag(scope.$index, scope.row)" />
-          <kt-button style="
-              background: rgb(14, 194, 22);
-              border: 1px solid rgb(14, 194, 22);
-              color: #ffffff;
-            " v-if="button3Name" :label="button3Name" :perms="permsButton3" icon="fa fa-edit" :size="size"
-            @click="handleButton3(scope.$index, scope.row)" />
-          <kt-button style="
-              background: rgb(222, 80, 76);
-              border: 1px solid rgb(222, 80, 76);
-              color: #ffffff;
-            " icon="fa fa-edit" v-if="button2Name" :label="button2Name" :perms="permsButton2" :size="size"
-            @click="handleButton2(scope.$index, scope.row)" />
-          <kt-button style="
-              background: #f56c6c;
-              border: 1px solid #f56c6c;
-              color: #ffffff;
-            " icon="fa fa-trash" v-if="button1Name" :label="button1Name" :perms="permsButton1" :size="size"
+          <kt-button :style="{ background: button1Background+'', border: '1px solid'+button1Background, color:'#fff'}"  v-if="button1Name" :label="button1Name" :perms="permsButton1" :size="size"
             @click="handleButton1(scope.$index, scope.row)" />
-            <kt-button style="
-              background: #1e87ed;
-              border: 1px solid #1e87ed;
-              color: #ffffff;
-            " v-if="button4Name" :label="button4Name" :perms="permsButton4" :size="size"
+            <kt-button :style="{ background: button2Background, border: '1px solid'+button2Background, color:'#fff'}"  v-if="button2Name" :label="button2Name" :perms="permsButton2" :size="size"
+            @click="handleButton2(scope.$index, scope.row)" />
+            <kt-button :style="{ background: button3Background, border: '1px solid'+button3Background, color:'#fff'}" v-if="button3Name" :label="button3Name" :perms="permsButton3"  :size="size"
+            @click="handleButton3(scope.$index, scope.row)" />
+
+            <kt-button  :style="{ background: button4Background, border: '1px solid'+button4Background, color:'#fff'}" v-if="button4Name" :label="button4Name" :perms="permsButton4" :size="size"
             @click="handleButton4(scope.$index, scope.row)" />
         </template>
       </el-table-column>
@@ -82,7 +67,7 @@
       <kt-button class="debutton" :label="$t('action.batchDelete')" :perms="permsDelete" :size="size" type="danger"
         @click="handleBatchDelete()" :disabled="selections.length === 0" style="float: left"
         v-if="showBatchDelete & showOperation" />
-      <kt-button label="批量结算" :perms="permsDelete" :size="size" type="danger" @click="handleBatchSettled()"
+      <kt-button :label="settledName" :perms="permsDelete" :size="size" type="danger" @click="handleBatchSettled()"
         :disabled="selections.length === 0" style="float: left" v-if="showBatchSettled" />
       <kt-button label="导出Excel" :perms="permsDelete" :size="size" type="danger" @click="handleBatchPrint()"
         :disabled="selections.length === 0" style="float: left" v-if="showBatchPrint" />
@@ -111,8 +96,12 @@ export default {
       type: Boolean,
       default: false,
     },
+   settledName:{
+    //批量按钮name
+    type: String,
+   },
     showBatchPrint: {
-      //显示批量结算
+      //显示批量导出
       type: Boolean,
       default: false,
     },
@@ -149,6 +138,9 @@ export default {
     button3Background: {
       type: String,
     },
+    button4Background: {
+      type: String,
+    },
     editButtonName: {
       type: String,
     },
@@ -162,7 +154,7 @@ export default {
     },
     keyName: String, //主键字段名
     columns: Array, // 表格列配置
-    data: Object, // 表格分页数据
+    data: {}, // 表格分页数据
     permsEdit: String, // 编辑权限标识
     permsDelete: String, // 删除权限标识
     size: {
@@ -431,13 +423,13 @@ export default {
     },
     //批量结算
     handleBatchSettled: function () {
-      console.log(this.selections.length);
       let _keyName = "orderno";
       if (!!this.keyName) {
         _keyName = this.keyName;
       }
-      let ids = this.selections.map((item) => item[_keyName]).toString();
-      this.$emit("handleSettled", ids);
+      let idlist=[];
+      this.selections.map((item) => idlist.push(item.policyno));
+      this.$emit("handleSettled", idlist);
     },
     //批量打印
     handleBatchPrint: function () {

+ 4 - 5
src/views/Core/KtTable.vue

@@ -1,12 +1,12 @@
 <template>
   <div>
     <!--表格栏-->
-    <el-table :data="data.content" :highlight-current-row="highlightCurrentRow" @selection-change="selectionChange" 
+    <el-table :data="data.content" :highlight-current-row="highlightCurrentRow" @selection-change="selectionChange"
           @current-change="handleCurrentChange" v-loading="loading" :element-loading-text="$t('action.loading')" :border="border" :stripe="stripe"
           :show-overflow-tooltip="showOverflowTooltip" :max-height="maxHeight" :height="height" :size="size" :align="align" style="width:100%;" >
       <el-table-column type="selection" width="40" v-if="showBatchDelete & showOperation"></el-table-column>
       <el-table-column v-for="column in columns" header-align="center" align="center"
-        :prop="column.prop" :label="column.label" :width="column.width" :min-width="column.minWidth" 
+        :prop="column.prop" :label="column.label" :width="column.width" :min-width="column.minWidth"
         :fixed="column.fixed" :key="column.prop" :type="column.type" :formatter="column.formatter"
         :sortable="column.sortable==null?true:column.sortable">
       </el-table-column>
@@ -19,15 +19,14 @@
     </el-table>
     <!--分页栏-->
     <div class="toolbar" style="padding:10px;">
-      <kt-button :label="$t('action.batchDelete')" :perms="permsDelete" :size="size" type="danger" @click="handleBatchDelete()" 
+      <kt-button :label="$t('action.batchDelete')" :perms="permsDelete" :size="size" type="danger" @click="handleBatchDelete()"
         :disabled="this.selections.length===0" style="float:left;" v-if="showBatchDelete & showOperation"/>
-      <el-pagination layout="total, prev, pager, next, jumper" @current-change="refreshPageRequest" 
+      <el-pagination layout="total, prev, pager, next, jumper" @current-change="refreshPageRequest"
         :current-page="pageRequest.pageNum" :page-size="pageRequest.pageSize" :total="data.totalSize" style="float:right;">
       </el-pagination>
     </div>
   </div>
 </template>
-
 <script>
 import KtButton from "@/views/Core/KtButton"
 export default {

+ 360 - 0
src/views/FinancialManagement/CarInsurance/CompanySettlement/DocGenerate.vue

@@ -0,0 +1,360 @@
+<template>
+  <div>
+    <div class="retrieval p-2">
+      <el-form
+        :inline="true"
+        :model="pageRequest"
+        class="demo-form-inline"
+        size="small"
+        label-width="90px"
+      >
+        <el-row>
+          <el-col
+            :xs="xscell"
+            :sm="smcell"
+            :md="mdcell"
+            :lg="lgcell"
+            :xl="xlcell"
+          >
+            <el-form-item label="保险公司:">
+              <el-select
+                v-model="pageRequest.companyId"
+                filterable
+                class="widths"
+                clearable
+              >
+                <el-option
+                  v-for="val in companyList"
+                  :key="val.id"
+                  :label="val.name"
+                  :value="val.id"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col
+            :xs="xscell"
+            :sm="smcell"
+            :md="mdcell"
+            :lg="lgcell"
+            :xl="xlcell"
+          >
+            <el-form-item label="机构:">
+              <el-cascader
+                class="widths"
+                :options="institutionOptions"
+                v-model="pageRequest.deptId"
+                :props="{
+                  checkStrictly: true,
+                  value: 'id',
+                  label: 'name',
+                }"
+                @change="handleChange"
+                clearable
+              ></el-cascader>
+            </el-form-item>
+          </el-col>
+          <el-col
+            :xs="xscell"
+            :sm="smcell"
+            :md="mdcell"
+            :lg="lgcell"
+            :xl="xlcell"
+          >
+            <el-form-item label="出单时间:">
+              <el-date-picker
+                class="widths"
+                v-model="dateTime"
+                type="daterange"
+                @change="DateChange"
+                range-separator="至"
+                value-format="yyyy-MM-dd"
+                start-placeholder="开始日期"
+                end-placeholder="结束日期"
+              >
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col
+            :xs="xscell"
+            :sm="smcell"
+            :md="mdcell"
+            :lg="lgcell"
+            :xl="xlcell"
+          >
+            <el-button type="primary" size="small" @click="onSubmit"
+              >查询</el-button
+            >
+          </el-col>
+        </el-row>
+      </el-form>
+    </div>
+    <el-main ref="elMain" style="padding: 0px">
+      <kt-common-table
+        :showOperation="false"
+        permsDelete="sys:user:delete"
+        :showBatchDelete="false"
+        :showBatchSettled="true"
+        :showBatchPrint="false"
+        permsButton1="sys:user:edit"
+        permsButton2="sys:user:edit"
+        permsButton3="sys:user:edit"
+        :data="pageResult"
+        :columns="columns"
+        @findPage="findPage"
+        keyName="policyno"
+        settledName="批量生成"
+        @handleSettled="handleTableSettled"
+        @handlePrint="handlePrint"
+      >
+      </kt-common-table>
+    </el-main>
+    <el-dialog :visible.sync="dialogVisible" width="30%" class="saomazhifucodeClass">
+      <el-result icon="success" title="生成成功" :subTitle="'结算单号:'+docOrderid">
+      </el-result>
+    </el-dialog>
+  </div>
+</template>
+<script>
+import KtCommonTable from "@/views/Core/KtCommonTable.vue"; //表格组件
+import KtButton from "@/views/Core/KtButton";
+import CommonUtil from "@/utils/comutil.js";
+export default {
+  components: {
+    KtCommonTable,
+    KtButton,
+  },
+  data() {
+    return {
+      xlcell: 6,
+      lgcell: 12,
+      mdcell: 12,
+      smcell: 24,
+      xscell: 24,
+      pageRequest: {
+        //查询的默认条件
+        pageNum: 1,
+        pageSize: 20,
+        companyId: "",
+        deptId: "",
+        startDate: "",
+        endDate: "",
+      },
+      dateTime: "",
+      companyList: [],
+      institutionOptions: [],
+      dialogVisible: false,
+      docOrderid:"",
+      // 右侧列表查询数据Start
+      pageResult: [],
+      columns: [
+        //数据列
+        { prop: "orderno", label: "订单号", minWidth: 160 },
+        { prop: "policyno", label: "保单号", minWidth: 160 },
+        { prop: "deptId", label: "机构", minWidth: 160 },
+        { prop: "riskcode", label: "险种", minWidth: 100 },
+
+        {
+          prop: "companyName",
+          label: "保险公司",
+          minWidth: 100,
+          formatter: this.inscompanyFormatter,
+        },
+        { prop: "agreementId", label: "协议号", minWidth: 160 },
+        { prop: "licenseno", label: "车牌号", minWidth: 160 },
+        { prop: "payDate", label: "出单日期", minWidth: 160 , formatter: this.timeFormatter,},
+        { prop: "taxamount", label: "车船税", minWidth: 160 },
+        { prop: "noTaxPremium", label: "不含税保费", minWidth: 160 },
+        { prop: "commissionFeerate", label: "手续费费用比例", minWidth: 160 },
+        { prop: "otherFeerate", label: "其他费用比例", minWidth: 160 },
+        { prop: "commissionFeevalue", label: "手续费费用", minWidth: 160 },
+        { prop: "otherFeevalue", label: "其他费用", minWidth: 160 },
+        { prop: "allFeeValue", label: "总费用", minWidth: 160 },
+        { prop: "finalFeeValue", label: "已结算费用", minWidth: 160 },
+      ],
+    };
+  },
+  created() {
+    this.companyquery(); //公司数据
+    this.deptQuery(); //机构数据
+  },
+  mounted() {},
+  methods: {
+    //查询
+    onSubmit() {
+      this.$api.settlement
+        .iscompanyTosettledQuery(this.pageRequest)
+        .then((res) => {
+          if (res.code=='200') {
+            this.pageResult = res.data;
+          } else {
+            this.$message({
+              message: "无数据",
+              type: "warning",
+            });
+          }
+        });
+    },
+    //保险公司查询
+    companyquery() {
+      this.$api.letter.gainTopList().then((res) => {
+        this.companyList = res.data;
+      });
+    },
+    //机构查询
+    deptQuery() {
+      this.$api.dept.findDeptTree().then((res) => {
+        this.institutionOptions = res.data;
+      });
+    },
+    DateChange(e) {
+      this.pageRequest.startDate = e[0];
+      this.pageRequest.endDate = e[1];
+    },
+
+    handlePrint() {
+      this.$api.task.excelExport(this.pageRequest).then((res) => {
+        console.log(res);
+        let blob = new Blob([res], {
+          type: "application/vnd.ms-excel",
+        }); // 2.获取请求返回的response对象中的blob 设置文件类型,这里以excel为例
+        let url = window.URL.createObjectURL(blob); // 3.创建一个临时的url指向blob对象
+        // 4.创建url之后可以模拟对此文件对象的一系列操作,例如:预览、下载
+        let a = document.createElement("a");
+        a.href = url;
+        a.download = "手续费管理清单.xlsx";
+        a.click();
+        // 5.释放这个临时的对象url
+        window.URL.revokeObjectURL(url);
+      });
+    },
+    //联级选择器触发事件
+    handleChange(val) {
+      console.log(val);
+      if (val.length !== 0) {
+        this.pageRequest.deptId = val.at(-1);
+      } else {
+        this.pageRequest.deptId = "";
+      }
+    },
+    //-- formatter begin--
+    agreetypeFormatter(row, column) {
+      //协议类型
+      let agreetype = row.agreetype;
+      return CommonUtil.getDataName({
+        dataList: this.agreementtypeoptions,
+        value: "value",
+        label: "label",
+        data: agreetype,
+      });
+    },
+    inscompanyFormatter(row, column) {
+      //协议类型
+      let inscompany = row.inscompany;
+      return CommonUtil.getDataName({
+        dataList: this.global.insCompanyList,
+        value: "code",
+        label: "name",
+        data: inscompany,
+      });
+    },
+    timeFormatter(row, column) {
+      let time = this.transformTime(row.createTime);
+      return time;
+    },
+    totalmoenyFormatter(row, column) {
+      //协议类型
+      let inscompany = row.inscompany;
+      return (row.feeamount + row.disamount).toFixed(2);
+    },
+    //点击查询按钮
+    //--数据字典 begin --
+    getDictItems: function (typeName) {
+      let that = this;
+      that.$api.dict
+        .findByLableName(typeName)
+        .then(function (res) {
+          console.log(res);
+          that[typeName + "options"] = res.data; // 把获取到的数据赋给this.data
+        })
+        .catch(function (error) {
+          that[typeName + "options"] = [];
+        });
+    },
+    //--数据字典 end --
+    // 右侧列表的方法Start
+    findPage(data) {
+      // 获取分页数据
+      let that = this;
+      that.$api.settlement
+        .iscompanyTosettledQuery(that.pageRequest)
+        .then((res) => {
+          that.pageResult = res.data;
+        })
+        .then(data != null ? data.callback : "");
+    },
+    transformTime(date) {
+      var d = new Date(date);
+      var strYear = d.getFullYear();
+      var strMonth = d.getMonth() + 1;
+      var strDay = d.getDate();
+      var hh = d.getHours();
+      var minutes = d.getMinutes(); // 分
+      var Seconds = d.getSeconds();
+      if (hh < 10) {
+        hh = "0" + hh;
+      }
+      if (minutes < 10) {
+        minutes = "0" + minutes;
+      }
+      if (Seconds < 10) {
+        Seconds = "0" + Seconds;
+      }
+      if (strMonth < 10) {
+        strMonth = "0" + strMonth;
+      }
+      if (strDay < 10) {
+        strDay = "0" + strDay;
+      }
+      var datetime =
+        strYear +
+        "-" +
+        strMonth +
+        "-" +
+        strDay +
+        " " +
+        hh +
+        ":" +
+        minutes +
+        ":" +
+        Seconds;
+      return datetime;
+    },
+    handleTableSettled(ids) {
+      this.$api.settlement
+        .docGenerate(ids)
+        .then((res) => {
+          if(res.code=='200'){
+            this.docOrderid=res.msg;
+            this.dialogVisible = true;
+            this.onSubmit();
+          }
+        });
+    },
+  },
+};
+</script>
+
+
+<style lang="scss" scoped>
+.widths {
+  width: 230px;
+}
+.widths1 {
+  width: 300px;
+}
+/deep/ .saomazhifucodeClass .el-dialog__body,
+  .saomazhifucodeClass .el-dialog__header {
+    padding: 0;
+  }
+</style>

+ 712 - 0
src/views/FinancialManagement/CarInsurance/CompanySettlement/DocQuery.vue

@@ -0,0 +1,712 @@
+<template>
+  <div>
+    <div class="retrieval p-2">
+      <el-form
+        :inline="true"
+        :model="pageRequest"
+        class="demo-form-inline flex a-start u-f-sa"
+        size="small"
+        label-width="90px"
+      >
+        <el-row>
+          <el-col
+            :xs="xscell"
+            :sm="smcell"
+            :md="mdcell"
+            :lg="lgcell"
+            :xl="xlcell"
+          >
+            <el-form-item label="保险公司:">
+              <el-select
+                v-model="pageRequest.companyId"
+                filterable
+                class="widths"
+                clearable
+              >
+                <el-option
+                  v-for="val in companyList"
+                  :key="val.id"
+                  :label="val.name"
+                  :value="val.id"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col
+            :xs="xscell"
+            :sm="smcell"
+            :md="mdcell"
+            :lg="lgcell"
+            :xl="xlcell"
+          >
+            <el-form-item label="机构:">
+              <el-cascader
+                class="widths"
+                :options="institutionOptions"
+                v-model="pageRequest.deptId"
+                :props="{
+                  checkStrictly: true,
+                  value: 'id',
+                  label: 'name',
+                }"
+                @change="handleChange"
+                clearable
+              ></el-cascader>
+            </el-form-item>
+          </el-col>
+          <el-col
+            :xs="xscell"
+            :sm="smcell"
+            :md="mdcell"
+            :lg="lgcell"
+            :xl="xlcell"
+          >
+            <el-form-item label="结算月份:">
+              <el-date-picker
+                class="widths"
+                v-model="dateTime"
+                type="month"
+                @change="DateChange"
+                value-format="yyyy-MM-dd"
+                placeholder="选择月"
+              >
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col
+            :xs="xscell"
+            :sm="smcell"
+            :md="mdcell"
+            :lg="lgcell"
+            :xl="xlcell"
+          >
+            <el-form-item label="结算单号:">
+              <el-input
+                v-model="pageRequest.settleno"
+                placeholder="请输入车牌号"
+                class="widths"
+                clearable
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col
+            :xs="xscell"
+            :sm="smcell"
+            :md="mdcell"
+            :lg="lgcell"
+            :xl="xlcell"
+          >
+            <el-form-item label="结算状态:">
+              <el-select
+                class="widths"
+                v-model="pageRequest.status"
+                placeholder="请选择结算单状态"
+              >
+                <el-option label="未核销" value="0"></el-option>
+                <el-option label="部分核销" value="1"></el-option>
+                <el-option label="已核销" value="2"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col
+            :xs="xscell"
+            :sm="smcell"
+            :md="mdcell"
+            :lg="lgcell"
+            :xl="4"
+            :offset="2"
+          >
+            <el-button type="primary" size="small" @click="onSubmit"
+              >查询</el-button
+            >
+          </el-col>
+        </el-row>
+      </el-form>
+    </div>
+    <el-main ref="elMain" style="padding: 0px">
+      <kt-common-table
+        :operationWidth="300"
+        permsDelete="sys:user:delete"
+        :showBatchDelete="false"
+        :showBatchSettled="false"
+        :showBatchPrint="false"
+        permsButton1="sys:user:edit"
+        permsButton2="sys:user:edit"
+        permsButton3="sys:user:edit"
+        :data="pageResult"
+        :columns="columns"
+        @findPage="findPage"
+        button1Name="结算明细"
+        button1Background="#409EFF"
+        @handleButton1="docDetails"
+        button3Name="核销"
+        button3Background="#F56C6C"
+        @handleButton3="writeOff"
+        button2Name="核销明细"
+        button2Background="#E6A23C"
+        @handleButton2="writeOffDetails"
+        @handleSettled="handleTableSettled"
+        @handlePrint="handlePrint"
+      >
+      </kt-common-table>
+    </el-main>
+    <el-dialog title="结算单明细" :visible.sync="docDetialsVisible" width="90%">
+      <el-table
+        size="small"
+        :data="docDetialslist"
+        height="500"
+        border
+        style="width: 100%"
+        v-loading="loading"
+        :header-cell-style="{
+          background: '#F2F7FC',
+          fontWeight: '900',
+          color: '#606266',
+        }"
+        highlight-current-row
+      >
+        <el-table-column
+          prop="settleno"
+          label="结算单号"
+          align="center"
+        ></el-table-column>
+        <el-table-column
+          prop="companyName"
+          label="保险公司"
+          align="center"
+        ></el-table-column>
+        <el-table-column
+          prop="deptName"
+          label="机构"
+          align="center"
+        ></el-table-column>
+        <el-table-column
+          prop="licenseno"
+          label="车牌号"
+          align="center"
+        ></el-table-column>
+        <el-table-column
+          prop="orderno"
+          label="订单号"
+          align="center"
+        ></el-table-column>
+        <el-table-column
+          prop="policyno"
+          label="保单号"
+          align="center"
+        ></el-table-column>
+        <el-table-column
+          prop="riskcode"
+          label="险种"
+          align="center"
+        ></el-table-column>
+        <el-table-column
+          prop="taxamount"
+          label="车船税"
+          align="center"
+        ></el-table-column>
+        <el-table-column
+          prop="allFeeValue"
+          label="总费用"
+          align="center"
+        ></el-table-column>
+        <el-table-column
+          prop="noTaxPremium"
+          label="不含税保费"
+          align="center"
+        ></el-table-column>
+        <el-table-column
+          prop="commissionFeerate"
+          label="手续费比例"
+          align="center"
+        ></el-table-column>
+        <el-table-column
+          prop="commissionFeevalue"
+          label="手续费金额"
+          align="center"
+        ></el-table-column>
+        <el-table-column
+          prop="otherFeerate"
+          label="其他费用比例"
+          align="center"
+        ></el-table-column>
+        <el-table-column
+          prop="otherFeevalue"
+          label="其他费用金额"
+          align="center"
+        ></el-table-column>
+        <el-table-column
+          prop="doingFeeValue"
+          label="正在结算费用"
+          align="center"
+        ></el-table-column>
+        <el-table-column
+          prop="finalFeeValue"
+          label="已结算费用"
+          align="center"
+        ></el-table-column>
+        <el-table-column prop="createTime" label="插入时间" align="center">
+          <template slot-scope="scope">
+            <span>{{ transformTime(scope.row.createTime) }}</span>
+          </template>
+        </el-table-column>
+      </el-table>
+    </el-dialog>
+    <el-dialog title="核销" :visible.sync="writeOffVisible" width="70%">
+      <el-form
+        :model="writeOffRequest"
+        label-width="130px"
+        size="small"
+        :rules="writeRules"
+        ref="writeForm"
+      >
+        <el-form-item label="结算号:" prop="settleno">
+          <el-input
+            v-model="writeOffRequest.settleno"
+            autocomplete="off"
+            class="widths"
+            disabled
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="核销费用类型:" prop="feeType">
+          <el-select
+            class="widths"
+            v-model="writeOffRequest.feeType"
+            placeholder="请选择核销类型"
+          >
+            <el-option label="手续费" value="S"></el-option>
+            <el-option label="其他费用" value="O"></el-option>
+            <el-option label="手续费+其他费用" value="A"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="核销金额:" prop="amount">
+          <el-input
+            type="number"
+            v-model="writeOffRequest.amount"
+            autocomplete="off"
+            placeholder="输入金额"
+            class="widths"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="发票号:" prop="checkno">
+          <el-input
+            v-model="writeOffRequest.checkno"
+            autocomplete="off"
+            placeholder="输入发票号"
+            class="widths"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="核销说明:">
+          <el-input type="textarea" v-model="writeOffRequest.remark"></el-input>
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="small" @click="writeOffVisible = false"
+          >取 消</el-button
+        >
+        <el-button
+          size="small"
+          type="primary"
+          @click="writeOffsubmit('writeForm')"
+          >确 定</el-button
+        >
+      </span>
+    </el-dialog>
+    <el-dialog title="核销明细" :visible.sync="writeDetialsVisible" width="90%">
+      <el-table
+        size="small"
+        :data="writeOffDetailslist"
+        height="500"
+        border
+        style="width: 100%"
+        v-loading="loading"
+        :header-cell-style="{
+          background: '#F2F7FC',
+          fontWeight: '900',
+          color: '#606266',
+        }"
+        highlight-current-row
+      >
+      <el-table-column
+          prop="settleno"
+          label="结算单号"
+          align="center"
+        ></el-table-column>
+        <el-table-column
+          prop="amount"
+          label="核销金额"
+          align="center"
+        ></el-table-column>
+        <el-table-column
+          prop="checkno"
+          label="发票号"
+          align="center"
+        ></el-table-column>
+
+
+        <el-table-column
+          prop="feeType"
+          label="核销费用类型"
+          align="center"
+        >
+        <template slot-scope="scope">
+            <span v-if="scope.row.feeType=='S'">手续费</span>
+            <span v-if="scope.row.feeType=='O'">其他费用</span>
+            <span v-if="scope.row.feeType=='A'">手续费+其他费用</span>
+          </template>
+
+      </el-table-column>
+        <el-table-column
+          prop="operator"
+          label="核销操作人"
+          align="center"
+        ></el-table-column>
+
+        <el-table-column
+          prop="remark"
+          label="核销说明"
+          align="center"
+        ></el-table-column>
+        <el-table-column prop="createTime" label="核销时间" align="center">
+          <template slot-scope="scope">
+            <span>{{ transformTime(scope.row.createTime) }}</span>
+          </template>
+        </el-table-column>
+      </el-table>
+    </el-dialog>
+  </div>
+</template>
+<script>
+import KtCommonTable from "@/views/Core/KtCommonTable.vue"; //表格组件
+import KtButton from "@/views/Core/KtButton";
+import CommonUtil from "@/utils/comutil.js";
+export default {
+  components: {
+    KtCommonTable,
+    KtButton,
+  },
+  data() {
+    return {
+      loading: false,
+      xlcell: 8,
+      lgcell: 12,
+      mdcell: 12,
+      smcell: 24,
+      xscell: 24,
+      docDetialsVisible: false,
+      writeOffVisible: false,
+      writeDetialsVisible: false,
+      pageRequest: {
+        //查询的默认条件
+        pageNum: 1,
+        pageSize: 20,
+        deptId: "",
+        settleno: "", //结算单号
+        settleMonth: "", //月份
+        status: "", //状态
+        companyId: "",
+        startDate: "",
+        endDate: "",
+      },
+      writeOffRequest: {
+        settleno: "", //结算单号
+        feeType: "", //核销费用类型
+        amount: "", //核销金额
+        checkno: "", //发票号
+        remark: "", //核销说明
+      },
+
+      dateTime: "",
+      companyList: [],
+      institutionOptions: [],
+      //////////////////////////////////
+      dataForm: {
+        ordernos: "",
+        settleno: "",
+        settletime: "",
+        remark: "",
+      },
+      Writestatus: [
+        {
+          label: "未核销",
+          value: 0,
+        },
+        {
+          label: "部分核销",
+          value: 1,
+        },
+        {
+          label: "已核销",
+          value: 2,
+        },
+      ],
+
+      // 右侧列表查询数据Start
+      pageResult: [],
+      docDetialslist: [], //结算明细列表
+      writeOffDetailslist:[],
+      columns: [
+        //数据列
+        { prop: "settleno", label: "结算号", minWidth: 160 },
+        {
+          prop: "companyName",
+          label: "保险公司",
+          minWidth: 100,
+        },
+        { prop: "deptId", label: "机构", minWidth: 160 },
+        { prop: "settleMonth", label: "结算月份", minWidth: 160 },
+        { prop: "settleBatch", label: "结算批次", minWidth: 160 },
+        { prop: "commissionFeevalue", label: "手续费费用", minWidth: 160 },
+        { prop: "otherFeevalue", label: "其他费用", minWidth: 160 },
+        { prop: "allFeeValue", label: "总费用", minWidth: 160 },
+        {
+          prop: "status",
+          label: "状态",
+          minWidth: 160,
+          formatter: this.statustypeFormatter,
+        },
+        {
+          prop: "createTime",
+          label: "生成时间",
+          minWidth: 160,
+          formatter: this.timeFormatter,
+        },
+        { prop: "operator", label: "生成人", minWidth: 160 },
+      ],
+      writeRules: {
+        settleno: [
+          { required: true, message: "请输入结算单号", trigger: "blur" },
+        ],
+        feeType: [
+          { required: true, message: "请选择核销类型", trigger: "change" },
+        ],
+        amount: [
+          {
+            required: true,
+            message: "请输入核销金额",
+            trigger: "blur",
+          },
+        ],
+        checkno: [{ required: true, message: "请输入发票号", trigger: "blur" }],
+      },
+    };
+  },
+  created() {
+    this.companyquery();
+    this.deptQuery();
+  },
+  mounted() {},
+  methods: {
+    onSubmit() {
+      this.$api.settlement.docQuery(this.pageRequest).then((res) => {
+        if (res.data.content.length > 0) {
+          this.pageResult = res.data;
+        } else {
+          this.$message({
+            message: "无数据",
+            type: "warning",
+          });
+        }
+      });
+    },
+    //机构查询
+    deptQuery() {
+      this.$api.dept.findDeptTree().then((res) => {
+        this.institutionOptions = res.data;
+      });
+    },
+    //联级选择器触发事件
+    handleChange(val) {
+      console.log(val);
+      if (val.length !== 0) {
+        this.pageRequest.deptId = val.at(-1);
+      } else {
+        this.pageRequest.deptId = "";
+      }
+    },
+    companyquery() {
+      this.$api.letter.gainTopList().then((res) => {
+        this.companyList = res.data;
+      });
+    },
+    DateChange(e) {
+      this.pageRequest.startDate = e;
+      this.pageRequest.endDate = e.slice(0, 8) + "31";
+    },
+    docDetails({ row, index }) {
+      let settleno = row.settleno;
+      this.$api.settlement.docDetails({ settleno: settleno }).then((res) => {
+        this.docDetialslist = res.data.content;
+        this.docDetialsVisible = true;
+      });
+    },
+    writeOff({ row, index }) {
+      this.writeOffRequest.settleno = row.settleno;
+      this.writeOffVisible = true;
+    },
+    writeOffDetails({ row, index }) {
+      let settleno = row.settleno;
+      this.$api.settlement.WriteOffDetails({ settleno: settleno }).then((res) => {
+        this.writeOffDetailslist=res.data;
+        this.writeDetialsVisible = true;
+      });
+    },
+    writeOffsubmit(formName) {
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+          this.$api.settlement.docWriteOff(this.writeOffRequest).then((res) => {
+            if (res.code == "200") {
+              this.$message({
+                message: res.msg,
+                type: "success",
+              });
+              this.writeOffVisible = false;
+            } else {
+              this.$message({
+                message: res.msg,
+                type: "error",
+              });
+            }
+          });
+        }
+      });
+    },
+    handlePrint() {
+      this.$api.task.excelExport(this.pageRequest).then((res) => {
+        console.log(res);
+        let blob = new Blob([res], {
+          type: "application/vnd.ms-excel",
+        }); // 2.获取请求返回的response对象中的blob 设置文件类型,这里以excel为例
+        let url = window.URL.createObjectURL(blob); // 3.创建一个临时的url指向blob对象
+        // 4.创建url之后可以模拟对此文件对象的一系列操作,例如:预览、下载
+        let a = document.createElement("a");
+        a.href = url;
+        a.download = "手续费管理清单.xlsx";
+        a.click();
+        // 5.释放这个临时的对象url
+        window.URL.revokeObjectURL(url);
+      });
+    },
+    timeFormatter(row, column) {
+      let time = this.transformTime(row.createTime);
+      return time;
+    },
+    statustypeFormatter(row, column) {
+      let status = row.status;
+      return CommonUtil.getDataName({
+        dataList: this.Writestatus,
+        value: "value",
+        label: "label",
+        data: status,
+      });
+    },
+    //-- formatter begin--
+    agreetypeFormatter(row, column) {
+      //协议类型
+      let agreetype = row.agreetype;
+      return CommonUtil.getDataName({
+        dataList: this.agreementtypeoptions,
+        value: "value",
+        label: "label",
+        data: agreetype,
+      });
+    },
+    inscompanyFormatter(row, column) {
+      //协议类型
+      let inscompany = row.inscompany;
+      return CommonUtil.getDataName({
+        dataList: this.global.insCompanyList,
+        value: "code",
+        label: "name",
+        data: inscompany,
+      });
+    },
+    totalmoenyFormatter(row, column) {
+      //协议类型
+      let inscompany = row.inscompany;
+      return (row.feeamount + row.disamount).toFixed(2);
+    },
+    //-- formatter end--
+
+    //点击查询按钮
+    transformTime(date) {
+      var d = new Date(date);
+      var strYear = d.getFullYear();
+      var strMonth = d.getMonth() + 1;
+      var strDay = d.getDate();
+      var hh = d.getHours();
+      var minutes = d.getMinutes(); // 分
+      var Seconds = d.getSeconds();
+      if (hh < 10) {
+        hh = "0" + hh;
+      }
+      if (minutes < 10) {
+        minutes = "0" + minutes;
+      }
+      if (Seconds < 10) {
+        Seconds = "0" + Seconds;
+      }
+      if (strMonth < 10) {
+        strMonth = "0" + strMonth;
+      }
+      if (strDay < 10) {
+        strDay = "0" + strDay;
+      }
+      var datetime =
+        strYear +
+        "-" +
+        strMonth +
+        "-" +
+        strDay +
+        " " +
+        hh +
+        ":" +
+        minutes +
+        ":" +
+        Seconds;
+      return datetime;
+    },
+    //--数据字典 begin --
+    getDictItems: function (typeName) {
+      let that = this;
+      that.$api.dict
+        .findByLableName(typeName)
+        .then(function (res) {
+          console.log(res);
+          that[typeName + "options"] = res.data; // 把获取到的数据赋给this.data
+        })
+        .catch(function (error) {
+          that[typeName + "options"] = [];
+        });
+    },
+    //--数据字典 end --
+
+    // 右侧列表的方法Start
+    findPage(data) {
+      // 获取分页数据
+      let that = this;
+      that.$api.settlement
+        .docQuery(that.pageRequest)
+        .then((res) => {
+          that.pageResult = res.data;
+        })
+        .then(data != null ? data.callback : "");
+    },
+
+    handleTableSettled(ids) {
+      this.dataForm.ordernos = ids;
+    },
+  },
+};
+</script>
+
+
+<style scoped>
+.widths {
+  width: 230px;
+}
+
+.widths1 {
+  width: 300px;
+}
+</style>

+ 258 - 0
src/views/FinancialManagement/CarInsurance/CompanySettlement/ExpensesList.vue

@@ -0,0 +1,258 @@
+<template>
+	<div>
+    <div class="retrieval p-2 ">
+      <el-form :inline="true" :model="pageRequest" class="demo-form-inline  flex  a-start u-f-sa" size="small" label-width="90px">
+      <el-row>
+        <el-col :xs="xscell" :sm="smcell" :md="mdcell" :lg="lgcell" :xl="xlcell">
+          <el-form-item label="保险公司:">
+            <el-select v-model="pageRequest.companyId" filterable  class="widths" clearable>
+              <el-option v-for="val in companyList" :key='val.id' :label="val.name" :value="val.id" ></el-option>
+            </el-select>
+          </el-form-item>
+
+        </el-col>
+        <el-col :xs="xscell" :sm="smcell" :md="mdcell" :lg="lgcell" :xl="xlcell">
+          <el-form-item label="出单时间:">
+            <el-date-picker class="widths"
+      v-model="dateTime"
+      type="daterange"
+      @change="DateChange"
+      range-separator="至"
+      value-format="yyyy-MM-dd"
+      start-placeholder="开始日期"
+      end-placeholder="结束日期">
+    </el-date-picker>
+          </el-form-item>
+        </el-col>
+        <el-col :xs="xscell" :sm="smcell" :md="mdcell" :lg="lgcell" :xl="xlcell">
+          <el-form-item label="车牌号:">
+            <el-input v-model="pageRequest.licenseno" placeholder="请输入车牌号" class="widths" clearable></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :xs="xscell" :sm="smcell" :md="mdcell" :lg="lgcell" :xl="xlcell">
+          <el-form-item label="协议号:">
+            <el-input v-model="pageRequest.agreementId" placeholder="请输入协议号" class="widths" clearable></el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+    <el-button type="primary" size="small" @click="onSubmit">查询</el-button>
+
+    </el-form>
+    </div>
+		<el-main ref="elMain" style="padding: 0px;">
+      <kt-common-table  permsDelete="sys:user:delete" :showOperation="false"  :showBatchDelete="false" :showBatchSettled="true" :showBatchPrint="false" permsButton1="sys:user:edit" permsButton2="sys:user:edit" permsButton3="sys:user:edit" :data="pageResult" :columns="columns" @findPage="findPage"    @handleSettled="handleTableSettled" @handlePrint="handlePrint">
+        </kt-common-table>
+		</el-main>
+	</div>
+</template>
+<script>
+import KtCommonTable from "@/views/Core/KtCommonTable.vue"; //表格组件
+import KtButton from "@/views/Core/KtButton";
+import CommonUtil from "@/utils/comutil.js";
+export default {
+  components: {
+    KtCommonTable,
+    KtButton,
+  },
+  data() {
+    return {
+      xlcell: 6,
+      lgcell: 12,
+      mdcell: 12,
+      smcell: 24,
+      xscell: 24,
+      pageRequest: {
+        //查询的默认条件
+        pageNum: 1,
+        pageSize: 20,
+        companyId:"",
+        agreementId:"",
+        startDate:"",
+        endDate:"",
+        licenseno:"",
+      },
+      dateTime:"",
+      companyList:[],
+      //////////////////////////////////
+      dataForm: {
+        ordernos: "",
+        settleno: "",
+        settletime: "",
+        remark: "",
+      },
+
+      // 右侧列表查询数据Start
+      pageResult: [],
+
+      columns: [
+        //数据列
+        { prop: "orderno", label: "订单号", minWidth: 160 },
+        { prop: "policyno", label: "保单号", minWidth: 160 },
+        { prop: "deptId", label: "机构", minWidth: 160 },
+        { prop: "riskcode", label: "险种", minWidth: 100 },
+
+        {
+          prop: "companyName",
+          label: "保险公司",
+          minWidth: 100,
+          formatter: this.inscompanyFormatter,
+        },
+        { prop: "agreementId", label: "协议号", minWidth: 80 },
+        { prop: "licenseno", label: "车牌号", minWidth: 120 },
+        { prop: "payDate", label: "出单日期", minWidth: 160 },
+        { prop: "taxamount", label: "车船税", minWidth: 100 },
+        { prop: "noTaxPremium", label: "不含税保费", minWidth: 100 },
+        { prop: "commissionFeerate", label: "手续费费用比例", minWidth: 120 },
+        { prop: "otherFeerate", label: "其他费用比例", minWidth: 100 },
+        { prop: "commissionFeevalue", label: "手续费费用", minWidth: 100 },
+        { prop: "otherFeevalue", label: "其他费用", minWidth: 100 },
+        { prop: "allFeeValue", label: "总费用", minWidth: 100 },
+        { prop: "finalFeeValue", label: "已结算费用", minWidth: 100 },
+      ],
+    };
+  },
+  created() {
+    this.companyquery();
+  },
+  mounted() {},
+  methods: {
+    onSubmit(){
+      this.$api.settlement.iscompanyCostQuerypage(this.pageRequest).then(res=>{
+        if (res.code=='200') {
+          this.pageResult=res.data;
+        }else{
+          this.$message({
+          message: '无数据',
+          type: 'warning'
+        });
+        }
+      })
+    },
+    companyquery(){
+      this.$api.letter.gainTopList().then(res=>{
+      this.companyList=res.data
+    })
+    },
+    DateChange(e){
+      this.pageRequest.startDate=e[0];
+      this.pageRequest.endDate=e[1]
+    },
+
+    handlePrint() {
+      this.$api.task.excelExport(this.pageRequest).then((res) => {
+        console.log(res);
+        let blob = new Blob([res], {
+          type: "application/vnd.ms-excel",
+        }); // 2.获取请求返回的response对象中的blob 设置文件类型,这里以excel为例
+        let url = window.URL.createObjectURL(blob); // 3.创建一个临时的url指向blob对象
+        // 4.创建url之后可以模拟对此文件对象的一系列操作,例如:预览、下载
+        let a = document.createElement("a");
+        a.href = url;
+        a.download = "手续费管理清单.xlsx";
+        a.click();
+        // 5.释放这个临时的对象url
+        window.URL.revokeObjectURL(url);
+      });
+    },
+    //-- formatter begin--
+    agreetypeFormatter(row, column) {
+      //协议类型
+      let agreetype = row.agreetype;
+      return CommonUtil.getDataName({
+        dataList: this.agreementtypeoptions,
+        value: "value",
+        label: "label",
+        data: agreetype,
+      });
+    },
+    inscompanyFormatter(row, column) {
+      //协议类型
+      let inscompany = row.inscompany;
+      return CommonUtil.getDataName({
+        dataList: this.global.insCompanyList,
+        value: "code",
+        label: "name",
+        data: inscompany,
+      });
+    },
+    totalmoenyFormatter(row, column) {
+      //协议类型
+      let inscompany = row.inscompany;
+      return (row.feeamount + row.disamount).toFixed(2);
+    },
+    //-- formatter end--
+
+    //点击查询按钮
+
+    //--数据字典 begin --
+    getDictItems: function (typeName) {
+      let that = this;
+      that.$api.dict
+        .findByLableName(typeName)
+        .then(function (res) {
+          console.log(res);
+          that[typeName + "options"] = res.data; // 把获取到的数据赋给this.data
+        })
+        .catch(function (error) {
+          that[typeName + "options"] = [];
+        });
+    },
+    //--数据字典 end --
+
+    // 右侧列表的方法Start
+    findPage(data) {
+      // 获取分页数据
+      let that = this;
+      that.$api.settlement
+        .iscompanyCostQuerypage(that.pageRequest)
+        .then((res) => {
+          that.pageResult = res.data;
+        })
+        .then(data != null ? data.callback : "");
+    },
+    /** 按钮事件 */
+    handleButton1({ row, index }) {
+      this.dialogVisible = true;
+      this.dataForm.ordernos = row.orderno;
+    },
+
+    handleTableSettled(ids) {
+      console.log(ids)
+      this.dialogVisible = true;
+      this.dataForm.ordernos = ids;
+    },
+    dialogSubmit() {
+      if (!this.dataForm.settleno) {
+        return this.$message.error("请输入凭证号");
+      }
+      var param = {
+        ordernos: this.dataForm.ordernos,
+        settleno: this.dataForm.settleno,
+      };
+      this.$api.task.insFeeSettle(param).then((res) => {
+        this.$message.success("凭证号保存成功");
+        this.dialogVisible = false;
+        this.findPage();
+      });
+    },
+    closeDialog() {
+      this.$refs["dataForm"].resetFields();
+      for (let key in this.dataForm) {
+        this.dataForm[key] = "";
+      }
+    },
+  },
+};
+</script>
+
+
+<style scoped>
+.widths {
+  width: 230px;
+}
+
+.widths1 {
+  width: 300px;
+}
+
+</style>