Procházet zdrojové kódy

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

lihongxiao před 2 roky
rodič
revize
13a033c7ec

+ 57 - 0
src/http/moudules/report.js

@@ -86,3 +86,60 @@ export const exportInsPlySettleListData = (data) => {
     data
   })
 }
+
+//报表-应付统计(手续费分销费)-查询
+export const getPayApplyUserReport = (data) => {
+  return axios({
+    url: "/report/getPayApplyUserReport",
+    method: "post",
+    data
+  })
+}
+
+
+//报表-应付统计(手续费分销费)-导出
+export const exportPayApplyUserReport = (data) => {
+  return axios({
+    url: "/report/exportPayApplyUserReport",
+    method: "post",
+    data
+  })
+}
+
+//报表-应付统计(手续费分销费)-清单导出
+export const exportPayApplyUserReporttListData = (data) => {
+  return axios({
+    url: "/report/exportPayApplyUserReporttListData",
+    method: "post",
+    data
+  })
+}
+
+
+//报表-应付统计(管理费)-查询
+export const getPayApplyDeptReport = (data) => {
+  return axios({
+    url: "/report/getPayApplyDeptReport",
+    method: "post",
+    data
+  })
+}
+
+
+//报表-应付统计(管理费)-导出
+export const exportPayApplyDeptReport = (data) => {
+  return axios({
+    url: "/report/exportPayApplyDeptReport",
+    method: "post",
+    data
+  })
+}
+
+//报表-应付统计(管理费)-清单导出
+export const exportPayApplyDeptReportListData = (data) => {
+  return axios({
+    url: "/report/exportPayApplyDeptReportListData",
+    method: "post",
+    data
+  })
+}

+ 24 - 0
src/http/moudules/task.js

@@ -754,3 +754,27 @@ export const excelReceivableAndSettlementExport = (data) => {
     data
   })
 }
+//应收表新增
+export const sourceaddReceivable = (data) => {
+  return axios({
+    url: "/InsReceivable/addReceivable",
+    method: "post",
+    data
+  })
+}
+//应收表单条数据删除
+export const sourcedeleteReceivable = (data) => {
+  return axios({
+    url: "/InsReceivable/deleteReceivable",
+    method: "post",
+    data
+  })
+}
+//结算数据导入后是否匹配
+export const isVisibledataMatching = () => {
+  return axios({
+    url: "/InsReceivable/dataMatching",
+    method: "get",
+  })
+}
+

+ 29 - 18
src/views/FinancialManagement/ReconciliationSystem/ReceivablePayableCollection/SettlementSource.vue

@@ -340,7 +340,7 @@ export default {
   data() {
     return {
       signDateTime: [],
-      agencySettlementTime:[],
+      agencySettlementTime: [],
       pageRequest: {
         //查询的默认条件
         pageNum: 1,
@@ -352,14 +352,14 @@ export default {
         jqPolicyId: "",
         syPolicyId: "",
         nonCarPolicyId: "",
-        channel:"",
-        channelClassification:"",
-        insuredName:"",
-        agencySettlementTime:"",
+        channel: "",
+        channelClassification: "",
+        insuredName: "",
+        agencySettlementTime: "",
       },
       // 右侧列表查询数据Start
       dialogFormVisible: false,
-      dialogUpdateVisible:false,
+      dialogUpdateVisible: false,
       pageResult: [],
       updateform: {
         channel: "",
@@ -374,13 +374,13 @@ export default {
         commercialExportRatio: "",
         nonVehicleExportRatio: "",
       },
-      batchSizeForm:{
-        businessOwner:"",
-        compulsoryExportRatio:"",
-        commercialExportRatio:"",
-        nonVehicleExportRatio:"",
+      batchSizeForm: {
+        businessOwner: "",
+        compulsoryExportRatio: "",
+        commercialExportRatio: "",
+        nonVehicleExportRatio: "",
       },
-      batchSizeList:[],
+      batchSizeList: [],
       columns: [
         //数据列
         { prop: "id", label: " 编号", minWidth: 160 },
@@ -424,18 +424,16 @@ export default {
     signDateChange(e) {
       if (e == null) {
         this.pageRequest.signDate = "";
-      }else{
+      } else {
         this.pageRequest.signDate = e.toString();
       }
     },
-    agencySettlementTimeChange(e){
+    agencySettlementTimeChange(e) {
       if (e == null) {
         this.pageRequest.agencySettlementTime = "";
-
-      }else{
+      } else {
         this.pageRequest.agencySettlementTime = e.toString();
       }
-
     },
     //保险公司查询
     companyInt() {
@@ -459,6 +457,7 @@ export default {
                 message: res.msg,
               });
               this.findPage();
+              this.isVisibleexecuteMethod();
             } else {
               this.$message({
                 type: "error",
@@ -469,12 +468,24 @@ export default {
         }
       });
     },
+    //是否匹配
+    isVisibleexecuteMethod() {
+      this.$api.task.isVisibledataMatching().then((res) => {
+        if (res.data) {
+          this.$alert(res.msg, "匹配提示", {
+            confirmButtonText: "关闭",
+            callback: (action) => {},
+          });
+        } else {
+        }
+      });
+    },
     handleTableSettled(ids) {
       this.batchSizeList = ids;
       Object.keys(this.batchSizeForm).forEach((key) => {
         this.batchSizeForm[key] = "";
       });
-      this.dialogUpdateVisible=true;
+      this.dialogUpdateVisible = true;
     },
     BulkUpdate() {
       let params = {

+ 380 - 3
src/views/FinancialManagement/ReconciliationSystem/ReceivablePayableCollection/Source.vue

@@ -141,6 +141,13 @@
         </el-row>
       </el-form>
       <div class="flex j-end" style="margin-right: 100px">
+        <el-button
+          type="success"
+          size="small"
+          @click="createOrUpdateVisible = true"
+          style="margin-right: 20px"
+          >新增数据</el-button
+        >
         <el-button
           type="primary"
           size="small"
@@ -162,7 +169,7 @@
     <el-main ref="elMain" style="padding: 0px">
       <kt-common-table
         :SerialShow="false"
-        :operationWidth="150"
+        :operationWidth="180"
         :showOperation="true"
         permsDelete="sys:user:delete"
         :showBatchDelete="true"
@@ -183,10 +190,14 @@
         button1Background="#E6A23C"
         @handleButton1="sourceUpdate"
         button1Icon=""
+        button2Name="删除"
+        button2Background="#F56C6C"
+        @handleButton2="sourceDelete"
+        button2Icon=""
       >
       </kt-common-table>
     </el-main>
-    <el-dialog title="信息修改" :visible.sync="dialogFormVisible" width="60%">
+    <el-dialog title="信息修改" :visible.sync="dialogFormVisible" width="80%">
       <el-form
         :model="updateform"
         :inline="true"
@@ -295,6 +306,287 @@
         >
       </div>
     </el-dialog>
+    <el-dialog
+      title="信息修改"
+      :visible.sync="createOrUpdateVisible"
+      width="90%"
+    >
+      <el-form
+        :model="createOrUpdateForm"
+        :inline="true"
+        label-width="130px"
+        size="small"
+      >
+        <el-form-item label="保险公司">
+          <el-select
+            v-model="createOrUpdateForm.insuranceId"
+            filterable
+            placeholder="请选择保险公司"
+            class="widths"
+            @change="conmpanydropdownEvent"
+            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-form-item label="保司机构">
+          <el-input
+            v-model="createOrUpdateForm.insuranceDept"
+            autocomplete="off"
+            placeholder="录入保司机构"
+            class="widths"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="保司机构代码">
+          <el-input
+            v-model="createOrUpdateForm.insuranceDeptId"
+            autocomplete="off"
+            placeholder="录入保司机构代码"
+            class="widths"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="险种">
+          <el-input
+            v-model="createOrUpdateForm.risk"
+            autocomplete="off"
+            placeholder="录入险种"
+            class="widths"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="交强保单号">
+          <el-input
+            v-model="createOrUpdateForm.jqPolicyId"
+            autocomplete="off"
+            placeholder="录入交强保单号"
+            class="widths"
+          ></el-input>
+        </el-form-item>
+
+        <el-form-item label="交强险保费">
+          <el-input
+            v-model="createOrUpdateForm.jqPremiumTax"
+            autocomplete="off"
+            placeholder="录入交强险保费"
+            class="widths"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="商业保单号">
+          <el-input
+            v-model="createOrUpdateForm.syPolicyId"
+            autocomplete="off"
+            placeholder="录入商业保单号"
+            class="widths"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="商业险保费">
+          <el-input
+            v-model="createOrUpdateForm.syPremiumTax"
+            autocomplete="off"
+            placeholder="录入商业险保费"
+            class="widths"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="非车保单号">
+          <el-input
+            v-model="createOrUpdateForm.nonCarPolicyId"
+            autocomplete="off"
+            placeholder="录入非车保单号"
+            class="widths"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="非车保费">
+          <el-input
+            v-model="createOrUpdateForm.nonCarPremiumTax"
+            autocomplete="off"
+            placeholder="录入非车保费"
+            class="widths"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="被保险人">
+          <el-input
+            v-model="createOrUpdateForm.insuredName"
+            autocomplete="off"
+            placeholder="录入被保险人"
+            class="widths"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="车牌号">
+          <el-input
+            v-model="createOrUpdateForm.licenseno"
+            autocomplete="off"
+            placeholder="录入车牌号"
+            class="widths"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="出单日期">
+          <el-date-picker
+            v-model="createOrUpdateForm.signingTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            style="width: 250px"
+            clearable
+            placeholder="选择出单日期"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="结算日期">
+          <el-date-picker
+            v-model="createOrUpdateForm.clearingTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            clearable
+            placeholder="选择结算日期"
+            style="width: 250px"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="车船税">
+          <el-input
+            v-model="createOrUpdateForm.taxamount"
+            autocomplete="off"
+            placeholder="录入车船税"
+            class="widths"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="交强应收比例">
+          <el-input
+            v-model="createOrUpdateForm.jqReceivableRatio"
+            autocomplete="off"
+            placeholder="录入交强应收比例"
+            class="widths"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="交强手续费比例">
+          <el-input
+            v-model="createOrUpdateForm.jqPremiumRatio"
+            autocomplete="off"
+            placeholder="录入交强手续费比例"
+            class="widths"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="交强非跟单比例">
+          <el-input
+            v-model="createOrUpdateForm.jqNonCopyingRatio"
+            autocomplete="off"
+            placeholder="录入交强非跟单比例"
+            class="widths"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="商业应收比例">
+          <el-input
+            v-model="createOrUpdateForm.syReceivableRatio"
+            autocomplete="off"
+            placeholder="录入商业应收比例"
+            class="widths"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="商业手续费比例">
+          <el-input
+            v-model="createOrUpdateForm.syPremiumRatio"
+            autocomplete="off"
+            placeholder="录入商业手续费比例"
+            class="widths"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="商业非跟单比例">
+          <el-input
+            v-model="createOrUpdateForm.syNonCopyingRatio"
+            autocomplete="off"
+            placeholder="录入商业非跟单比例"
+            class="widths"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="非车应收比例">
+          <el-input
+            v-model="createOrUpdateForm.nonCarReceivableRatio"
+            autocomplete="off"
+            placeholder="录入非车应收比例"
+            class="widths"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="非车手续费比例">
+          <el-input
+            v-model="createOrUpdateForm.nonCarPremiumRatio"
+            autocomplete="off"
+            placeholder="录入非车手续费比例"
+            class="widths"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="非车非跟单比例">
+          <el-input
+            v-model="createOrUpdateForm.nonCarNonCopyingRatio"
+            autocomplete="off"
+            placeholder="录入非车非跟单比例"
+            class="widths"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="最大交强应付比例">
+          <el-input
+            v-model="createOrUpdateForm.maxJqReceivableRatio"
+            autocomplete="off"
+            placeholder="录入最大交强应付比例"
+            class="widths"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="最大商业应付比例">
+          <el-input
+            v-model="createOrUpdateForm.maxSyReceivableRatio"
+            autocomplete="off"
+            placeholder="录入最大商业应付比例"
+            class="widths"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="最大非车应付比例">
+          <el-input
+            v-model="createOrUpdateForm.maxNonCarReceivableRatio"
+            autocomplete="off"
+            placeholder="录入最大非车应付比例"
+            class="widths"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="补贴比例">
+          <el-input
+            v-model="createOrUpdateForm.subsidyRatio"
+            autocomplete="off"
+            placeholder="录入补贴比例"
+            class="widths"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="结算状态">
+          <el-select
+            v-model="createOrUpdateForm.clearingState"
+            placeholder="请选择状态"
+            class="widths"
+          >
+            <el-option label="未结算" value="0"></el-option>
+            <el-option label="已结算" value="1"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="保司结算状态">
+          <el-select
+            v-model="createOrUpdateForm.insuranceClearingState"
+            placeholder="请选择状态"
+            class="widths"
+          >
+            <el-option label="未结算" value="0"></el-option>
+            <el-option label="已结算" value="1"></el-option>
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button size="small" @click="createOrUpdateVisible = false"
+          >取 消</el-button
+        >
+        <el-button size="small" type="primary" @click="insertData"
+          >提交</el-button
+        >
+      </div>
+    </el-dialog>
   </div>
 </template>
 <script>
@@ -325,10 +617,44 @@ export default {
         insuranceClearingState: "",
         insuranceDept: "", //保司机构
       },
+      createOrUpdateVisible: false,
       dialogUpdateVisible: false,
       dialogFormVisible: false,
       // 右侧列表查询数据Start
       pageResult: [],
+      createOrUpdateForm: {
+        insuranceId: "", //保司编码
+        insuranceName: "", //保司名称
+        insuranceDept: "", //保司机构
+        insuranceDeptId: "", //保司机构代码
+        risk: "", //险种
+        jqPolicyId: "", //交强保单号
+        jqPremiumTax: "", //交强险保费
+        syPolicyId: "", //商业保单号
+        syPremiumTax: "", //商业险保费
+        nonCarPolicyId: "", //非车保单号
+        nonCarPremiumTax: "", //非车保费
+        insuredName: "", //被保险人
+        licenseno: "", //车牌号
+        signingTime: "", //出单日期
+        clearingTime: "", //结算日期
+        taxamount: "", //车船税
+        jqReceivableRatio: "", //交强应收比例
+        jqPremiumRatio: "", //交强手续费比例
+        jqNonCopyingRatio: "", //交强非跟单比例
+        syReceivableRatio: "", //商业应收比例
+        syPremiumRatio: "", //商业手续费比例
+        syNonCopyingRatio: "", //商业非跟单比例
+        nonCarReceivableRatio: "", //非车应收比例
+        nonCarPremiumRatio: "", //非车手续费比例
+        nonCarNonCopyingRatio: "", //非车非跟单比例
+        maxJqReceivableRatio: "", //最大交强应付比例
+        maxSyReceivableRatio: "", //最大商业应付比例
+        maxNonCarReceivableRatio: "", //最大非车应付比例
+        subsidyRatio: "", //补贴比例
+        clearingState: "", //结算状态
+        insuranceClearingState: "", //保司结算状态
+      },
       updateform: {
         risk: "",
         jqPremiumTax: "",
@@ -423,6 +749,33 @@ export default {
   },
   mounted() {},
   methods: {
+    //新增数据
+    insertData() {
+      this.$api.task
+        .sourceaddReceivable(this.createOrUpdateForm)
+        .then((res) => {
+          if (res.code == "200") {
+            this.$message({
+              type: "success",
+              message: res.msg,
+            });
+            this.createOrUpdateVisible = false;
+            this.findPage();
+          } else {
+            this.$message({
+              type: "error",
+              message: res.msg,
+            });
+          }
+        });
+    },
+    conmpanydropdownEvent(val) {
+      const selectedLabel = this.companyList.find(
+        (option) => option.id === val
+      ).name;
+      this.createOrUpdateForm.insuranceName = selectedLabel;
+    },
+    //接口传值处理
     clearingTimeChange(e) {
       if (e == null) {
         this.pageRequest.clearingTime = "";
@@ -458,7 +811,7 @@ export default {
                 type: "success",
                 message: res.msg,
               });
-              this.findPage();
+              this.this.findPage();
             } else {
               this.$message({
                 type: "error",
@@ -532,6 +885,30 @@ export default {
       this.dialogFormVisible = true;
       this.updateform = row;
     },
+    sourceDelete({ row, column }) {
+      this.$confirm("是否确认删除?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          this.$api.task.sourcedeleteReceivable([row.id]).then((res) => {
+            if (res.code == "200") {
+              this.$message({
+                type: "success",
+                message: res.msg,
+              });
+              this.findPage();
+            } else {
+              this.$message({
+                type: "error",
+                message: res.msg,
+              });
+            }
+          });
+        })
+        .catch(() => {});
+    },
     updateSubmit() {
       this.$api.task.SourceUpdate(this.updateform).then((res) => {
         if (res.code == "200") {

+ 371 - 0
src/views/Report/StatisticalReport/AccountsPayableStatistics.vue

@@ -0,0 +1,371 @@
+<template>
+  <div class="page-container">
+    <div class="queryForm"  style="padding-top:10px;padding-left:15px;">
+      <el-form size="mini" ref="queryForm" :model="queryForm" label-width="120px">
+        <el-row>
+          <el-col :span="6" style="height: 40px;">
+            <el-form-item label="所属机构">
+              <el-cascader class="widths" :options="institutionOptions" v-model="queryForm.deptId" :props="{
+              checkStrictly: true, value: 'id',
+              label: 'name',
+            }" @change="handleChange" clearable></el-cascader>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6" style="height: 40px;">
+            <el-form-item label="所属团队">
+              <el-select v-model="queryForm.teamCode" @focus="queryTeamCode" @clear="cleanTeamCode" filterable  class="widths" clearable>
+                <el-option v-for="val in teamCodeOptions" :key='val.id' :label="val.name" :value="val.id" ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6" style="height: 40px;">
+            <el-form-item label="业务员">
+              <el-select v-model="queryForm.userId" @focus="queryUserCode"  filterable  class="widths" clearable>
+                <el-option v-for="val in userCodeOptions" :key='val.id' :label="val.name" :value="val.id" ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6" style="height: 40px;">
+            <el-form-item label="保险公司">
+              <el-select v-model="queryForm.insCompany"  filterable  class="widths" clearable>
+                <el-option v-for="val in insureComList" :key='val.id' :label="val.name" :value="val.id" ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12" style="height: 40px;">
+            <el-form-item label="签单日期">
+              <el-date-picker v-model="quoteDate" style="width:100%" @change="changeQuoteDate" type="daterange" align="left" value-format="yyyy-MM-dd"
+                              range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"> </el-date-picker>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="2" class="u-f u-f-je" style="height: 40px;">
+            <el-button type="primary" icon="el-icon-arrow-left" size="mini" @click="returnUpper">返回上层</el-button>
+          </el-col>
+          <el-col :span="22" class="u-f u-f-je" style="height: 40px;">
+            <el-button type="primary" style="margin-right: 40px;" @click="queryData">查询</el-button>
+          </el-col>
+        </el-row>
+      </el-form>
+    </div>
+
+    <!-- 数据列表显示区域 -->
+    <el-table size="mini" border stripe :data="dataList" :height="clientHeight" v-loading="loading" :stripe="true"
+              :header-cell-style="{background:'#F2F7FC',fontWeight: '700',color:'#606266',textAlign: 'center'}"
+              :cell-style="{textAlign: 'center'}" style="width: 100%;margin-bottom: 60px;">
+      <el-table-column  fixed  label="机构名称" width="170">
+        <template slot-scope="scope">
+          <i class="el-icon-paperclip"></i>
+          <span style="margin-left: 10px" @click="drillingData(scope.row,'jg')">{{ scope.row.institution }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column   fixed label="团队名称" width="170">
+        <template slot-scope="scope">
+          <i class="el-icon-paperclip" v-if="scope.row.deptname"></i>
+          <span style="margin-left: 10px" @click="drillingData(scope.row,'td')">{{ scope.row.deptname }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="username" fixed  label="业务员名称" width="170"></el-table-column>
+      <el-table-column prop="waitPayCostsPremiums"  label="待付手续费" width="100"></el-table-column>
+      <el-table-column prop="paidCostsPremiums"  label="已付手续费" width="100"></el-table-column>
+      <el-table-column prop="sumCostsPremiums"  label="手续费合计" width="100"></el-table-column>
+      <el-table-column prop="waitPayRetailPremiums"  label="待付分销费" width="100"></el-table-column>
+      <el-table-column prop="paidRetailPremiums"  label="已付分销费" width="100"></el-table-column>
+      <el-table-column prop="sumRetailPremiums"  label="分销费合计" width="100"></el-table-column>
+      <el-table-column   fixed="right" label="操作" width="180">
+        <template slot-scope="scope">
+          <el-button type="primary" size="small" @click="exportListExcel(scope.row)">本行清单导出</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <!-- 底部分页 -->
+    <div class="bottomFixed">
+      <el-row>
+        <el-col :span="2">
+          <el-button type="primary" style="margin-right: 40px;" @click="exportExcel">全部导出</el-button>
+        </el-col>
+        <el-col :span="22">
+          <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+                         :page-sizes="[10, 20, 50, 100]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="totalSum">
+          </el-pagination>
+        </el-col>
+
+      </el-row>
+
+    </div>
+
+  </div>
+</template>
+
+<script>
+  export default {
+    data() {
+      return {
+        loading: false,
+        insureComList:[], //保险公司列表
+        institutionOptions: [],//所属机构列表
+        teamCodeOptions:[],//所属团队列表
+        userCodeOptions:[],//所属业务员列表
+        clientHeight:0,//表格高度
+        currentPage: 1, //当前页面
+        pageSize: 10, //每页显示条数
+        totalSum: 0, //全部的数据条数
+        quoteDate:"",//签单日期
+        //查询的表单
+        queryForm: {
+          deptId: "",
+          teamCode:"",
+          insCompany:"",
+          userId: "",
+          quoteStartDate: "",
+          quoteEndDate: "",
+          pageNum: 1,
+          pageSize: 10,
+          isDrilling:"0",//是否下钻查询
+          isReturnBack:"0"//是否返回上层
+        },
+        dataList: [],//查询结果数据
+        //返回上层查询对象
+        returnForm:{
+          deptId: "",
+          teamCode:"",
+        }
+      };
+    },
+    created(){
+      // 设置表格的高度
+      this.clientHeight = (document.documentElement.clientHeight - 350)+'px';
+      //获取机构树
+      this.$api.report.findDeptTree().then((res) => {
+        this.institutionOptions = res.data;
+      });
+      //获取保险公司
+      this.$api.letter.gainTopList().then(res=>{
+        this.insureComList=res.data
+      })
+    },
+    mounted() {
+      const that = this;
+      // 设置表格的高度
+      window.onresize = function temp() {
+        that.clientHeight = (document.documentElement.clientHeight - 350)+'px';
+      };
+    },
+    methods: {
+      //返回上层
+      returnUpper(){
+        this.queryForm.isDrilling="1";
+        this.queryForm.isReturnBack="1";
+        this.queryForm.deptId= this.returnForm.deptId;
+        this.queryForm.teamCode= this.returnForm.teamCode;
+        this.findPage();
+      },
+      // 按照查询条件查询
+      drillingData(obj,type) {
+        this.queryForm.pageNum = 1;
+        this.queryForm.pageSize = 10;
+        this.queryForm.isDrilling="1";
+        this.queryForm.userId="";
+        this.queryForm.teamCode="";
+        this.queryForm.deptId="";
+        this.queryForm.isReturnBack="0";
+        if(type=='jg'){
+          this.queryForm.deptId=obj.institutionId;
+        }else if(type='td'){
+          this.queryForm.deptId=obj.institutionId;
+          this.queryForm.teamCode=obj.deptId;
+        }
+        this.findPage();
+      },
+      cleanTeamCode(){
+        //级联清空 业务员
+        this.queryForm.userId='';
+      },
+      queryUserCode(e){
+        if((this.queryForm.teamCode ==null || this.queryForm.teamCode=='') ){
+          this.userCodeOptions=[];
+          this.$message.error('请先选择所属团队!')
+          return
+        }
+        this.$api.report.findUserList(this.queryForm.teamCode).then((res) => {
+          if (res.code == "200") {
+            this.userCodeOptions = res.data;
+          } else {
+            this.$message.error(res.msg)
+          }
+        })
+      },
+      queryTeamCode(e){
+        if((this.queryForm.deptId ==null || this.queryForm.deptId=='') ){
+          this.teamCodeOptions=[];
+          this.$message.error('请先选择所属机构!')
+          return
+        }
+        this.$api.report.findTeamList(this.queryForm.deptId).then((res) => {
+          if (res.code == "200") {
+            this.teamCodeOptions = res.data;
+          } else {
+            this.$message.error(res.msg)
+          }
+        })
+
+      },
+      //联级选择器触发事件
+      handleChange(val) {
+        if (val.length !== 0) {
+          this.queryForm.deptId = val.at(-1);
+        }
+        else {
+          this.queryForm.deptId = ''
+          //级联清空 团队  业务员
+          this.queryForm.teamCode='';
+          this.queryForm.userId='';
+        }
+      },
+      //报价日期处理
+      changeQuoteDate(e) {
+        if (e === null) {
+          this.queryForm.quoteStartDate = e;
+          this.queryForm.quoteEndDate = e;
+        } else {
+          this.queryForm.quoteStartDate = e[0];
+          this.queryForm.quoteEndDate = e[1];
+        }
+      },
+      // 按照查询条件查询
+      queryData() {
+        if((this.queryForm.deptId ==null || this.queryForm.deptId=='') ){
+          this.$message.error('所属机构必须录入!')
+          return
+        }
+        if((this.quoteDate ==null || this.quoteDate=='') ){
+          this.$message.error('签单日期必须录入!')
+          return
+        }
+        this.queryForm.pageNum = 1;
+        this.queryForm.pageSize = 10;
+        this.queryForm.isDrilling="0";
+        this.queryForm.isReturnBack="0";
+        this.findPage();
+      },
+      //数据
+      findPage() {
+        this.loading = true;
+        this.$api.report.getPayApplyUserReport(this.queryForm).then((res) => {
+          if (res.code == "200") {
+            this.loading = false;
+            this.dataList = res.data.content;
+            for(let item of this.dataList){
+              this.returnForm.deptId=item.institutionId;
+              this.returnForm.teamCode=item.deptId;
+            }
+            this.currentPage = res.data.pageNum;
+            this.totalSum = res.data.totalSize;
+          } else {
+            this.$message.error(res.msg)
+            this.loading = false;
+          }
+        })
+      },
+      // 每页条数发生改变
+      handleSizeChange(val) {
+        this.pageSize = val;
+        this.currentPage = 1;
+        this.queryForm.pageNum = 1;
+        this.queryForm.pageSize = val;
+        this.findPage();
+      },
+      // 当前页发生改变
+      handleCurrentChange(val) {
+        this.currentPage = val;
+        this.queryForm.pageNum = val;
+        this.findPage();
+      },
+
+      //全部导出
+      exportExcel(){
+        if((this.queryForm.deptId ==null || this.queryForm.deptId=='') ){
+          this.$message.error('所属机构必须录入!')
+          return
+        }
+        if((this.quoteDate ==null || this.quoteDate=='')  ){
+          this.$message.error('签单日期必须录入!')
+          return
+        }
+        this.$api.report.exportPayApplyUserReport(this.queryForm).then(res=>{
+          let url = process.env.BASE_URL+'/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);
+        })
+      },
+
+      //清单导出
+      exportListExcel(obj){
+        let  queryListForm={}
+        queryListForm.quoteStartDate=this.queryForm.quoteStartDate;
+        queryListForm.quoteEndDate=this.queryForm.quoteEndDate;
+        queryListForm.insCompany=this.queryForm.insCompany;
+        queryListForm.deptId=obj.institutionId;
+        queryListForm.teamCode=obj.deptId;
+        queryListForm.userId=obj.userId;
+        this.$api.report.exportPayApplyUserReporttListData(queryListForm).then(res=>{
+          let url = process.env.BASE_URL+'/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>
+  /* 底部固定分页 */
+  .bottomFixed {
+    height: 50px;
+    position: fixed;
+    bottom: 0;
+    width: 100%;
+    background: #fff;
+  }
+
+  /* 顶部查询条件样式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 */
+
+  .el-form-item{
+    margin-bottom: 0px!important;
+  }
+  .el-dialog__body{
+    padding: 10px 20px!important;
+  }
+
+  /deep/ .el-select{
+    width: 100%;
+  }
+
+  /deep/ .el-cascader--mini{
+    width: 100%;
+  }
+</style>

+ 17 - 26
src/views/Sys/Deptall.vue

@@ -37,19 +37,11 @@
             size="small"
             style="margin-left: 30px"
           >
-            <el-form-item label="机构:">
-              <el-cascader
-                class="widths"
-                :options="institutionOptions"
+            <el-form-item label="机构编码:">
+              <el-input
                 v-model="peopledeptid"
-                :props="{
-                  checkStrictly: true,
-                  value: 'id',
-                  label: 'name',
-                }"
-                @change="handleChange"
-                clearable
-              ></el-cascader>
+                placeholder="请输入机构编码"
+              ></el-input>
             </el-form-item>
             <el-form-item label="来源:">
               <el-select v-model="managementSource" placeholder="选择来源">
@@ -116,6 +108,18 @@
             width="150"
           >
           </el-table-column>
+          <el-table-column
+            prop="managementSource"
+            label="来源"
+            align="center"
+            width="150"
+          >
+            <template slot-scope="scope">
+              <span v-if="scope.row.managementSource == '1'">渠道</span>
+              <span v-if="scope.row.managementSource == '2'">个代</span>
+              <span v-if="scope.row.managementSource == '3'">服务</span>
+            </template>
+          </el-table-column>
           <el-table-column prop="address" label="机构地址" align="center">
           </el-table-column>
           <el-table-column
@@ -568,7 +572,6 @@ export default {
     this.getDictItems("comattribute");
     this.getDictItems("comtype");
     this.getQueryTree(); //获取省市区数据
-    this.deptInt(); //获取机构数据
   },
   mounted() {
     this.changeTreeWidth(); // 初始化树的宽度
@@ -622,7 +625,6 @@ export default {
       comleveloptions: [],
       comattributeoptions: [],
       comtypeoptions: [],
-      institutionOptions: [], //机构数据
       //------------下拉框数据   end-----------------
 
       //---dialog begin ----
@@ -779,18 +781,6 @@ export default {
     };
   },
   methods: {
-    deptInt() {
-      this.$api.dept.findDeptTree(this.peopledeptid, "").then((res) => {
-        this.institutionOptions = res.data;
-      });
-    },
-    handleChange(val) {
-      if (val.length !== 0) {
-        this.peopledeptid = val.at(-1);
-      } else {
-        this.peopledeptid = "9";
-      }
-    },
     //点击每一行的事件
     rowClick(row, treeNode) {
       //点每行展开折叠
@@ -1156,6 +1146,7 @@ export default {
         data: comtype,
       });
     },
+
     // 提交表单
     submitForm() {
       let that = this;