Ver Fonte

fix:保险公司结算-合作公司名称,年月日充值内容无法清空bug修复

test há 2 anos atrás
pai
commit
535def2dde

+ 272 - 207
src/views/FinancialManagement/CarInsurance/CompanySettlement/CarInsurance/DocumentaryFeesSettled.vue

@@ -1,165 +1,227 @@
 <template>
   <!--布局容器-->
   <div style="width: 99%; margin-top: 0px">
-    <templateTable class="invoiceAnd"  :formList="formList" :searchData.sync="searchData" :tableConfig="tableConfig" :data="tableData"
-      @findPage="findPage" @resetForm="resetForm" @handleSearchList="handleSearchList" :pagination="pageData">
+    <templateTable
+      class="invoiceAnd"
+      :formList="formList"
+      :searchData.sync="searchData"
+      :tableConfig="tableConfig"
+      :data="tableData"
+      @findPage="findPage"
+      @handleResetForm="handleResetForm"
+      @handleSearchList="handleSearchList"
+      :pagination="pageData"
+    >
       <template slot="data">
-        <yearMonthYay ref="yearMonthYay" @getYearData="getYearData" @getMonthData="getMonthData" @getDayData="getDayData">
+        <yearMonthYay
+          ref="yearMonthYay"
+          @getYearData="getYearData"
+          @getMonthData="getMonthData"
+          @getDayData="getDayData"
+        >
         </yearMonthYay>
       </template>
       <template slot="保司机构">
-        <el-cascader v-model="pageData.partnerCompaniesIdList" size="small" :show-all-levels="false" ize="small"
-          :options="ztreeNodes" :props='{
+        <el-cascader
+          v-model="pageData.partnerCompaniesIdList"
+          size="small"
+          :show-all-levels="false"
+          ize="small"
+          :options="ztreeNodes"
+          :props="{
             checkStrictly: true,
-            value: "id",
-            label: "name",
-            children: "children",
-        }' clearable filterable></el-cascader>
+            value: 'id',
+            label: 'name',
+            children: 'children',
+          }"
+          clearable
+          filterable
+        ></el-cascader>
       </template>
     </templateTable>
-    <el-dialog title="记录" :visible.sync="dialogVisiblerecord" width="30%" :before-close="handleCloserecord">
-      <templateTable ref="templateTable1" :pagination="pageDatarecord" @getList="getListrecord"
-        :tableConfig="tableConfigDetailrecord" :data="formTableDatarecord" @findPage="findPageDetailrecord">
+    <el-dialog
+      title="记录"
+      :visible.sync="dialogVisiblerecord"
+      width="30%"
+      :before-close="handleCloserecord"
+    >
+      <templateTable
+        ref="templateTable1"
+        :pagination="pageDatarecord"
+        @getList="getListrecord"
+        :tableConfig="tableConfigDetailrecord"
+        :data="formTableDatarecord"
+        @findPage="findPageDetailrecord"
+      >
         <template slot="imageUrl" slot-scope="scope">
-          <img v-if="scope.row.imageUrl" :src="`${process + scope.row.imageUrl}`" class="imageclass" @click.stop="showViewer=true; ProViewImg=process + scope.row.imageUrl" />
+          <img
+            v-if="scope.row.imageUrl"
+            :src="`${process + scope.row.imageUrl}`"
+            class="imageclass"
+            @click.stop="
+              showViewer = true;
+              ProViewImg = process + scope.row.imageUrl;
+            "
+          />
         </template>
       </templateTable>
       <span slot="footer" class="dialog-footer">
-        <el-button size="small" @click="dialogVisiblerecord = false">取消</el-button>
+        <el-button size="small" @click="dialogVisiblerecord = false"
+          >取消</el-button
+        >
       </span>
     </el-dialog>
-    <el-dialog title="明细" :visible.sync="dialogVisiblerecordDetail" width="70%" :before-close="handleCloserecorddetail">
-            <templateTable ref="templateTable1"   :pagination="pageDatarecorddetail" @getList="getListrecorddetail"
-                :tableConfig="tableConfigDetailrecorddetail" :data="recordDetailData" @findPage="findPageDetailrecorddatail">
-            </templateTable>
-            <span slot="footer" class="dialog-footer">
-                <el-button size="small" @click="dialogVisiblerecordDetail = false">取消</el-button>
-            </span>
-        </el-dialog>
-        <el-image-viewer v-if="showViewer" :on-close="closeViewer"  :z-index="9999" :url-list="[ProViewImg]" />
+    <el-dialog
+      title="明细"
+      :visible.sync="dialogVisiblerecordDetail"
+      width="70%"
+      :before-close="handleCloserecorddetail"
+    >
+      <templateTable
+        ref="templateTable1"
+        :pagination="pageDatarecorddetail"
+        @getList="getListrecorddetail"
+        :tableConfig="tableConfigDetailrecorddetail"
+        :data="recordDetailData"
+        @findPage="findPageDetailrecorddatail"
+      >
+      </templateTable>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="small" @click="dialogVisiblerecordDetail = false"
+          >取消</el-button
+        >
+      </span>
+    </el-dialog>
+    <el-image-viewer
+      v-if="showViewer"
+      :on-close="closeViewer"
+      :z-index="9999"
+      :url-list="[ProViewImg]"
+    />
   </div>
 </template>
 <script>
-import templateTable from '@/components/TemplateTable/index.vue'
-import { mapState } from 'vuex'
-import yearMonthYay from '../../PlatformSettlement/yearMonthYay.vue'
+import templateTable from "@/components/TemplateTable/index.vue";
+import { mapState } from "vuex";
+import yearMonthYay from "../../PlatformSettlement/yearMonthYay.vue";
 
 export default {
   name: "baosi",
-  components: { templateTable, yearMonthYay,
+  components: {
+    templateTable,
+    yearMonthYay,
     "el-image-viewer": () =>
-      import("element-ui/packages/image/src/image-viewer")
-   },
-  created() {
+      import("element-ui/packages/image/src/image-viewer"),
   },
+  created() {},
   computed: {
     ...mapState({
-      perms: state => state.user.perms
-    })
+      perms: (state) => state.user.perms,
+    }),
   },
   data() {
     return {
-      process:process.env.BASE_URL,
-      ztreeNodes:[],
-      showViewer:false,
-      ProViewImg:[],
-      recordDetailData:[],
+      process: process.env.BASE_URL,
+      ztreeNodes: [],
+      showViewer: false,
+      ProViewImg: [],
+      recordDetailData: [],
       pageDatarecorddetail: {
-                pageNum: 1,
-                pageSize: 20,
-                totalSize:0
-            },
+        pageNum: 1,
+        pageSize: 20,
+        totalSize: 0,
+      },
       dialogVisiblerecordDetail: false,
       dialogVisiblerecord: false,
       tableConfigDetailrecorddetail: {
-                columns: [
-                    {
-                        prop: "licenseno",
-                        label: "车牌号",
-                        type: "text"
-                    },
-                    {
-                        prop: "policyno",
-                        label: "交强保单号",
-                        type: "text"
-                    },
-                    {
-                        prop: "syPolicyno",
-                        label: "商业保单号",
-                        type: "text"
-                    },
-                    {
-                        prop: "insuredName",
-                        label: "被保人",
-                        type: "text"
-                    },
-                    {
-                        prop: "jqPremium",
-                        label: "交强保费",
-                        type: "text"
-                    },
-                    {
-                        prop: "syPremium",
-                        label: "商业保费",
-                        type: "text"
-                    },
-                    {
-                        prop: "jqOtherCostsProportion",
-                        label: "交强跟单比例",
-                        type: "text"
-                    }, {
-                        prop: "syOtherCostsProportion",
-                        label: "商业跟单比例",
-                        type: "text"
-                    },
-                    {
-                        prop: "jqOtherCostsPremium",
-                        label: "交强跟单金额",
-                        type: "text"
-                    },
-                    {
-                        prop: "syOtherCostsPremium",
-                        label: "商业跟单金额",
-                        type: "text"
-                    },
-                    {
-                        prop: "otherFeevalue",
-                        label: "总跟单费",
-                        type: "text"
-                    },
-                ],
-                loading: true,
-                isPaginationShow:true
-            },
+        columns: [
+          {
+            prop: "licenseno",
+            label: "车牌号",
+            type: "text",
+          },
+          {
+            prop: "policyno",
+            label: "交强保单号",
+            type: "text",
+          },
+          {
+            prop: "syPolicyno",
+            label: "商业保单号",
+            type: "text",
+          },
+          {
+            prop: "insuredName",
+            label: "被保人",
+            type: "text",
+          },
+          {
+            prop: "jqPremium",
+            label: "交强保费",
+            type: "text",
+          },
+          {
+            prop: "syPremium",
+            label: "商业保费",
+            type: "text",
+          },
+          {
+            prop: "jqOtherCostsProportion",
+            label: "交强跟单比例",
+            type: "text",
+          },
+          {
+            prop: "syOtherCostsProportion",
+            label: "商业跟单比例",
+            type: "text",
+          },
+          {
+            prop: "jqOtherCostsPremium",
+            label: "交强跟单金额",
+            type: "text",
+          },
+          {
+            prop: "syOtherCostsPremium",
+            label: "商业跟单金额",
+            type: "text",
+          },
+          {
+            prop: "otherFeevalue",
+            label: "总跟单费",
+            type: "text",
+          },
+        ],
+        loading: true,
+        isPaginationShow: true,
+      },
       formTableDatarecord: [],
       tableConfigDetailrecord: {
         columns: [
           {
             prop: "settlementTime",
             label: "进账日期",
-            type: "text"
+            type: "text",
           },
           {
             prop: "expendAmount",
             label: "进帐金额",
-            type: "text"
+            type: "text",
           },
           {
             name: "imageUrl",
             label: "进帐截图",
-            type: "slot"
+            type: "slot",
           },
-
         ],
         loading: true,
-        isPaginationShow: true
+        isPaginationShow: true,
       },
       pageDatarecord: {
         pageNum: 1,
         pageSize: 20,
-        totalSize: 0
+        totalSize: 0,
       },
-      year: '',
+      year: "",
       searchData: {},
       formList: [
         {
@@ -171,7 +233,7 @@ export default {
           label: "合作公司名称",
           name: "保司机构",
           type: "slot",
-          },
+        },
         {
           label: "年月日",
           name: "data",
@@ -183,70 +245,74 @@ export default {
           {
             prop: "companyName",
             label: "保险公司名称",
-            type: "text"
+            type: "text",
           },
           {
             prop: "partnerCompaniesName",
             label: "合作公司名称",
-            type: "text"
+            type: "text",
           },
           {
             prop: "otherFeevalue",
             label: "总跟单费",
-            type: "text"
+            type: "text",
           },
           {
             prop: "allInvoicCommissionFeevalue",
             label: "已开票金额",
-            type: "text"
+            type: "text",
           },
           {
             prop: "readyCommissionFeevalue",
             label: "已开票已结算",
-            type: "text"
+            type: "text",
           },
           {
             prop: "expendAmount",
             label: "实收金额 ",
-            type: "text"
+            type: "text",
           },
           {
             prop: "taxesFees",
             label: "税费",
-            type: "text"
+            type: "text",
           },
           {
             prop: "invoicCommissionFeevalue",
             label: "已开票未结算",
-            type: "text"
+            type: "text",
           },
           {
             prop: "noInvoicCommissionFeevalue",
             label: "未开票",
-            type: "text"
+            type: "text",
           },
           {
             prop: "unSettledAmount",
             label: "未结算金额",
-            type: "text"
+            type: "text",
           },
         ],
         loading: true,
         isPaginationShow: true,
         showSummary: true,
-        tableHeight: 'none',
+        tableHeight: "none",
         optBtns: [
           {
-            type: 'primary',
-            label: '记录',
-            click: (row, index) => { return this.haldRecord(row) },
+            type: "primary",
+            label: "记录",
+            click: (row, index) => {
+              return this.haldRecord(row);
+            },
           },
           {
-              type: 'primary',
-              label: '明细',
-              click: (row, index) => { return this.haldRecordDetail(row) },
-          }
-        ]
+            type: "primary",
+            label: "明细",
+            click: (row, index) => {
+              return this.haldRecordDetail(row);
+            },
+          },
+        ],
       },
       tableData: [],
       formData: {},
@@ -254,112 +320,113 @@ export default {
         pageNum: 1,
         pageSize: 20,
         agreementType: 2,
-        isNotCar: '0',
-        isNotDocumentary: '1'
+        isNotCar: "0",
+        isNotDocumentary: "1",
       },
     };
   },
   created() {
-    this.$api.insCompany.findLeftInsTree( {
+    this.$api.insCompany
+      .findLeftInsTree({
         classname: "",
-        type: '1',
-        }).then((res) => {
-      this.ztreeNodes = res.data;
-    });
+        type: "1",
+      })
+      .then((res) => {
+        this.ztreeNodes = res.data;
+      });
     this.findPage();
   },
   methods: {
     closeViewer() {
       this.showViewer = false;
     },
-    resetForm() {
-            this.formData={}
-            this.pageData.partnerCompaniesIdList=[]
-            this.$refs.yearMonthYay.clear()
-        },
+    handleResetForm() {
+      this.formData = {};
+      this.pageData.partnerCompaniesIdList = [];
+      this.$refs.yearMonthYay.clear();
+    },
     handleCloserecorddetail() {
-            this.dialogVisiblerecordDetail = false
-        },
+      this.dialogVisiblerecordDetail = false;
+    },
     haldRecordDetail(row) {
-            this.dialogVisiblerecordDetail = true
-            this.findPageDetailrecorddatail(row)
-        },
-        getListrecorddetail(data) {
-            this.findPageDetailrecorddatail(data)
-        },
-        findPageDetailrecorddatail(data) {
-            this.tableConfigDetailrecorddetail.loading = true;
-            this.$api.task
-                .fncplyFeeQuery({
-                  partnerCompaniesId: data.partnerCompaniesId,
-                  agreementType: '2',
-                  // handlingFeesStatus: '1',
-                  isNotDocumentary: '1',
-                  isNotCar:'0',
-                  ...this.pageDatarecorddetail
-                })
-                .then(res => {
-                    if (res.code == 200) {
-                      this.recordDetailData = res.data.content;
-                      this.pageDatarecorddetail = {
-                        pageNum: res.data.pageNum,
-                        pageSize: res.data.pageSize,
-                        totalSize: res.data.totalSize,
-                      }
-                        this.tableConfigDetailrecorddetail.loading = false;
-                    }
-                    else {
-                        this.tableConfigDetailrecorddetail.loading = false;
-                        this.$message.error(res.msg)
-                    }
-                });
-        },
+      this.dialogVisiblerecordDetail = true;
+      this.findPageDetailrecorddatail(row);
+    },
+    getListrecorddetail(data) {
+      this.findPageDetailrecorddatail(data);
+    },
+    findPageDetailrecorddatail(data) {
+      this.tableConfigDetailrecorddetail.loading = true;
+      this.$api.task
+        .fncplyFeeQuery({
+          partnerCompaniesId: data.partnerCompaniesId,
+          agreementType: "2",
+          // handlingFeesStatus: '1',
+          isNotDocumentary: "1",
+          isNotCar: "0",
+          ...this.pageDatarecorddetail,
+        })
+        .then((res) => {
+          if (res.code == 200) {
+            this.recordDetailData = res.data.content;
+            this.pageDatarecorddetail = {
+              pageNum: res.data.pageNum,
+              pageSize: res.data.pageSize,
+              totalSize: res.data.totalSize,
+            };
+            this.tableConfigDetailrecorddetail.loading = false;
+          } else {
+            this.tableConfigDetailrecorddetail.loading = false;
+            this.$message.error(res.msg);
+          }
+        });
+    },
     haldRecord(row) {
-      this.findPageDetailrecord(row)
-      this.dialogVisiblerecord = true
+      this.findPageDetailrecord(row);
+      this.dialogVisiblerecord = true;
     },
     findPageDetailrecord(data) {
-      this.tableConfigDetailrecord.loading = true
+      this.tableConfigDetailrecord.loading = true;
+      this.$api.task;
+      // .settlementFeesQuery({
       this.$api.task
-        // .settlementFeesQuery({
-          this.$api.task.fncSettlementQueryRecord({
+        .fncSettlementQueryRecord({
           partnerCompaniesId: data.partnerCompaniesId,
-          agreementType: '2',
-          handlingFeesStatus: '1',
-          settlementStatus:'2',
-          isNotCar:'0',
-          ...this.pageDatarecord
+          agreementType: "2",
+          handlingFeesStatus: "1",
+          settlementStatus: "2",
+          isNotCar: "0",
+          ...this.pageDatarecord,
         })
-        .then(res => {
+        .then((res) => {
           if (res.code == 200) {
             this.formTableDatarecord = res.data;
             this.pageDatarecord = {
               pageNum: res.data.pageNum,
               pageSize: res.data.pageSize,
               totalSize: res.data.totalSize,
-            }
+            };
             this.tableConfigDetailrecord.loading = false;
-          }
-          else {
+          } else {
             this.tableConfigDetail.loading = false;
-            this.$message.error(res.msg)
+            this.$message.error(res.msg);
           }
         });
     },
     getListrecord(data) {
-      this.findPageDetailrecord()
+      this.findPageDetailrecord();
     },
     handleCloserecord() {
-      this.dialogVisiblerecord = false
+      this.dialogVisiblerecord = false;
     },
     getYearData(val) {
-      this.formData.year = val
+      this.formData.year = val;
     },
     getMonthData(val) {
-      this.formData.month = val
+      this.formData.month = val;
     },
     getDayData(val) {
-      this.formData.day = val
+      this.formData.day = val;
     },
     // 查询
     handleSearchList(data) {
@@ -370,16 +437,15 @@ export default {
       this.tableConfig.loading = true;
       this.$api.task
         .allOtherAmount({ ...this.pageData, ...data, ...this.formData })
-        .then(res => {
+        .then((res) => {
           if (res.code == 200) {
-            this.tableData = res.data ? res.data : []
+            this.tableData = res.data ? res.data : [];
             // this.pageData.pageNum = res.data.pageNum;
             // this.pageData.pageSize = res.data.pageSize;
             // this.pageData.totalSize = res.data.totalSize;
             this.tableConfig.loading = false;
-          }
-          else {
-            this.$message.error(res.msg)
+          } else {
+            this.$message.error(res.msg);
           }
         });
     },
@@ -391,19 +457,18 @@ export default {
       this.pageData.pageNum = val;
       this.findPage();
     },
-
-  }
+  },
 };
 </script>
 
 <style scoped>
-.invoiceAnd>>>.el-table__body-wrapper {
+.invoiceAnd >>> .el-table__body-wrapper {
   overflow-y: auto !important;
   height: auto !important;
 }
-  .imageclass {
-    max-width: 100px;
-    max-height: 50px;
-    text-align: center;
-  } 
+.imageclass {
+  max-width: 100px;
+  max-height: 50px;
+  text-align: center;
+}
 </style>

+ 387 - 309
src/views/FinancialManagement/CarInsurance/CompanySettlement/CarInsurance/DocumentaryUnsettled.vue

@@ -1,19 +1,40 @@
 <template>
   <!--布局容器-->
   <div class="InvoicedAndSettled" style="width: 99%; margin-top: 0px">
-    <templateTable :formList="formList" :searchData.sync="searchData" :tableConfig="tableConfig" :data="tableData"
-      @findPage="findPage" @handleSearchList="handleSearchList"  @resetForm="resetForm" :pagination="pageData">
+    <templateTable
+      :formList="formList"
+      :searchData.sync="searchData"
+      :tableConfig="tableConfig"
+      :data="tableData"
+      @findPage="findPage"
+      @handleSearchList="handleSearchList"
+      @handleResetForm="handleResetForm"
+      :pagination="pageData"
+    >
       <template slot="data">
-          <yearMonthYay ref="yearMonthYay" @getYearData="getYearData"  @getMonthData="getMonthData"  @getDayData="getDayData"></yearMonthYay>
+        <yearMonthYay
+          ref="yearMonthYay"
+          @getYearData="getYearData"
+          @getMonthData="getMonthData"
+          @getDayData="getDayData"
+        ></yearMonthYay>
       </template>
       <template slot="保司机构">
-        <el-cascader v-model="pageData.partnerCompaniesIdList" size="small" :show-all-levels="false" ize="small"
-          :options="ztreeNodes" :props='{
+        <el-cascader
+          v-model="pageData.partnerCompaniesIdList"
+          size="small"
+          :show-all-levels="false"
+          ize="small"
+          :options="ztreeNodes"
+          :props="{
             checkStrictly: true,
-            value: "id",
-            label: "name",
-            children: "children",
-        }' clearable filterable></el-cascader>
+            value: 'id',
+            label: 'name',
+            children: 'children',
+          }"
+          clearable
+          filterable
+        ></el-cascader>
       </template>
     </templateTable>
 
@@ -22,11 +43,18 @@
       title="详情"
       :visible.sync="dialogVisibleNewDetail"
       width="80%"
-      :before-close="handleCloseNew">
-        <templateTable ref="templateTable" :formList="formList1" @handleSearchList="handleSearchList1" :tableConfig="tableConfigDetailNew" :data="formTableDataNew"
-        @findPage="findPageNewDetail" >
-        </templateTable>
-        <span slot="footer" class="dialog-footer">
+      :before-close="handleCloseNew"
+    >
+      <templateTable
+        ref="templateTable"
+        :formList="formList1"
+        @handleSearchList="handleSearchList1"
+        :tableConfig="tableConfigDetailNew"
+        :data="formTableDataNew"
+        @findPage="findPageNewDetail"
+      >
+      </templateTable>
+      <span slot="footer" class="dialog-footer">
         <el-button size="small" @click="handleCloseNew">取消</el-button>
       </span>
     </el-dialog>
@@ -35,39 +63,77 @@
       title="结算"
       :visible.sync="dialogVisible"
       width="70%"
-      :before-close="handleClose">
-
+      :before-close="handleClose"
+    >
       <!-- 上传凭证 -->
-      <el-upload  action="#" class="upload-demo"  :limit="1" :auto-upload="false"
-        :on-change="drivingupload"  ref="upload3"  accept=".png, .jpg, .jpeg" :file-list="fileList">
+      <el-upload
+        action="#"
+        class="upload-demo"
+        :limit="1"
+        :auto-upload="false"
+        :on-change="drivingupload"
+        ref="upload3"
+        accept=".png, .jpg, .jpeg"
+        :file-list="fileList"
+      >
         <el-button size="small" type="primary">点击上传</el-button>
       </el-upload>
 
-      <templateTable ref="templateTable" :tableConfig="tableConfigDetail" :data="formTableData" @findPage="findPageDetail" >
+      <templateTable
+        ref="templateTable"
+        :tableConfig="tableConfigDetail"
+        :data="formTableData"
+        @findPage="findPageDetail"
+      >
         <template slot="settlementAmount" slot-scope="scope">
-          <el-input v-model="scope.row.invoicCommissionFeevalue" style="width:120px" size="mini"></el-input>
+          <el-input
+            v-model="scope.row.invoicCommissionFeevalue"
+            style="width: 120px"
+            size="mini"
+          ></el-input>
         </template>
       </templateTable>
       <span slot="footer" class="dialog-footer">
-      <el-button  size="small" @click="submitBalance" type="primary">结算</el-button>
-      <el-button  size="small" @click="dialogVisible = false">取消</el-button>
-    </span>
-  </el-dialog>
-  
-  <el-dialog title="记录" :visible.sync="dialogVisiblerecord" width="30%" :before-close="handleCloserecord">
-      <templateTable ref="templateTable1" @getList="getListrecord"
-        :tableConfig="tableConfigDetailrecord" :data="formTableDatarecord" @findPage="findPageDetailrecord">
+        <el-button size="small" @click="submitBalance" type="primary"
+          >结算</el-button
+        >
+        <el-button size="small" @click="dialogVisible = false">取消</el-button>
+      </span>
+    </el-dialog>
+
+    <el-dialog
+      title="记录"
+      :visible.sync="dialogVisiblerecord"
+      width="30%"
+      :before-close="handleCloserecord"
+    >
+      <templateTable
+        ref="templateTable1"
+        @getList="getListrecord"
+        :tableConfig="tableConfigDetailrecord"
+        :data="formTableDatarecord"
+        @findPage="findPageDetailrecord"
+      >
         <template slot="imageUrl" slot-scope="scope">
-          <img v-if="scope.row.imageUrl" :src="`${process + scope.row.imageUrl}`" class="imageclass" @click.stop="showViewer=true; ProViewImg=process + scope.row.imageUrl" />
+          <img
+            v-if="scope.row.imageUrl"
+            :src="`${process + scope.row.imageUrl}`"
+            class="imageclass"
+            @click.stop="
+              showViewer = true;
+              ProViewImg = process + scope.row.imageUrl;
+            "
+          />
         </template>
       </templateTable>
       <span slot="footer" class="dialog-footer">
-        <el-button size="small" @click="dialogVisiblerecord = false">取消</el-button>
+        <el-button size="small" @click="dialogVisiblerecord = false"
+          >取消</el-button
+        >
       </span>
     </el-dialog>
 
-
-  <!-- <el-dialog
+    <!-- <el-dialog
       title="结算"
       :visible.sync="dialogVisiblebalance"
       width="20%"
@@ -99,91 +165,91 @@
   </div>
 </template>
 <script>
-import templateTable from '@/components/TemplateTable/index.vue'
-import { mapState } from 'vuex'
-import yearMonthYay from '../../PlatformSettlement/yearMonthYay.vue'
+import templateTable from "@/components/TemplateTable/index.vue";
+import { mapState } from "vuex";
+import yearMonthYay from "../../PlatformSettlement/yearMonthYay.vue";
 
 export default {
   name: "baosi",
-  components: {  templateTable,yearMonthYay },
-  created() {
-  },
+  components: { templateTable, yearMonthYay },
+  created() {},
   computed: {
     ...mapState({
-      perms: state => state.user.perms
-    })
+      perms: (state) => state.user.perms,
+    }),
   },
   data() {
     return {
-      process:process.env.BASE_URL,
-      fileList:[],
-      batchData:{},
-      ztreeNodes:[],
-      year: '',
-      findPageDetailList:{},
+      process: process.env.BASE_URL,
+      fileList: [],
+      batchData: {},
+      ztreeNodes: [],
+      year: "",
+      findPageDetailList: {},
       searchData: {},
-      dialogVisiblebalance:false,
-      form:{},
-      openBalanceDetail:{},
+      dialogVisiblebalance: false,
+      form: {},
+      openBalanceDetail: {},
       formList: [
-                {
-                    label: "保险公司",
-                    prop: "companyName",
-                    type: "company",
-                },
-                {
-                    label: "合作公司名称",
-                    name: "保司机构",
-                    type: "slot",
-                    },
-                {
-                    label: "年月日",
-                    name: "data",
-                    type: "slot",
-                    },
-            ],
+        {
+          label: "保险公司",
+          prop: "companyName",
+          type: "company",
+        },
+        {
+          label: "合作公司名称",
+          name: "保司机构",
+          type: "slot",
+        },
+        {
+          label: "年月日",
+          name: "data",
+          type: "slot",
+        },
+      ],
       tableConfig: {
         columns: [
           {
             prop: "companyName",
             label: "保险公司名称",
-            type: "text"
+            type: "text",
           },
           {
             prop: "partnerCompaniesName",
             label: "保司机构",
-            type: "text"
+            type: "text",
           },
           {
             prop: "allInvoicCommissionFeevalue",
             label: "已开票跟单费",
-            type: "text"
+            type: "text",
           },
           {
             prop: "readyCommissionFeevalue",
             label: "已开票已结算跟单费",
-            type: "text"
+            type: "text",
           },
           {
             prop: "invoicCommissionFeevalue",
             label: "已开票未结算跟单费",
-            type: "text"
+            type: "text",
           },
         ],
         loading: true,
         isPaginationShow: true,
         isShowIndex: true,
         showSummary: true,
-        tableHeight: 'auto',
+        tableHeight: "auto",
         optBtns: [
-            {
-              type: 'primary',
-              label: '详情',
-              // click: (row, index) => { return this.haldDetail(row) },
-              click: (row, index) => { return this.haldNewDetail(row) },
-
-          }
-        ]
+          {
+            type: "primary",
+            label: "详情",
+            // click: (row, index) => { return this.haldDetail(row) },
+            click: (row, index) => {
+              return this.haldNewDetail(row);
+            },
+          },
+        ],
       },
       tableData: [],
       formData: {},
@@ -191,71 +257,72 @@ export default {
         pageNum: 1,
         pageSize: 20,
         agreementType: 2,
-        isNotCar: '0',
-        isNotDocumentary: '1'
+        isNotCar: "0",
+        isNotDocumentary: "1",
       },
-      dialogVisible:false,
-      formTableData:[],
-      tableConfigDetail:{
+      dialogVisible: false,
+      formTableData: [],
+      tableConfigDetail: {
         columns: [
           {
             prop: "yearMonthSignDate",
             label: "年月",
-            type: "text"
+            type: "text",
           },
           {
             prop: "invoicId",
             label: "开票号",
-            type: "text"
+            type: "text",
           },
           {
             prop: "invoicingMethod",
             label: " 开票方式",
             type: "statMap",
-            options:[{
-              label: "保司开票",
-              value: "0",
-            }, {
-              label: "掌柜开票",
-              value: "1",
-            }]
+            options: [
+              {
+                label: "保司开票",
+                value: "0",
+              },
+              {
+                label: "掌柜开票",
+                value: "1",
+              },
+            ],
           },
           {
             prop: "settlementAmount",
             label: "开票金额",
-            type: "text"
+            type: "text",
           },
           {
             prop: "taxPoints",
             label: "税点",
-            type: "text"
+            type: "text",
           },
           {
             prop: "createTime",
             label: "开票时间",
-            type: "text"
+            type: "text",
           },
           {
             prop: "invoicedSettledAmount",
             label: "开票已结算金额",
-            type: "text"
+            type: "text",
           },
           {
             prop: "invoicedNotSettledAmount",
             label: "开票未结算金额",
-            type: "text"
+            type: "text",
           },
           {
             name: "settlementAmount",
             label: "结算金额",
-            type: "slot"
+            type: "slot",
           },
-
         ],
-        loading: true
+        loading: true,
       },
 
-
       // 新详情
       dialogVisibleNewDetail: false,
       formList1: [
@@ -265,18 +332,18 @@ export default {
           type: "select",
           options: [
             {
-              label: '开票未结算',
-              value: '0'
+              label: "开票未结算",
+              value: "0",
             },
             {
-              label: '开票已结算',
-              value: '1'
+              label: "开票已结算",
+              value: "1",
             },
             {
-              label: '开票结算清',
-              value: '2'
+              label: "开票结算清",
+              value: "2",
             },
-          ]
+          ],
         },
       ],
       tableConfigDetailNew: {
@@ -284,85 +351,98 @@ export default {
           {
             prop: "invoicId",
             label: "开票号",
-            type: "text"
+            type: "text",
           },
           {
             prop: "invoicingMethod",
             label: "开票方式",
             type: "statMap",
-            options:[{
-              label: "保司开票",
-              value: "0",
-            }, {
-              label: "掌柜开票",
-              value: "1",
-            }]
+            options: [
+              {
+                label: "保司开票",
+                value: "0",
+              },
+              {
+                label: "掌柜开票",
+                value: "1",
+              },
+            ],
           },
           {
             prop: "totalAmount",
             label: "开票金额",
-            type: "text"
+            type: "text",
           },
           {
             prop: "invoicedSettledAmount",
             label: "开票已结算金额",
-            type: "text"
+            type: "text",
           },
           {
             prop: "invoicedNotSettledAmount",
             label: "开票未结算金额",
-            type: "text"
+            type: "text",
           },
           {
             prop: "completionStatus",
             label: "结算状态",
             type: "statMap",
-            options:[{
-              label: "开票未结算",
-              value: "0",
-            }, {
-              label: "开票已结算",
-              value: "1",
-            }, {
-              label: "开票结算清",
-              value: "2",
-            }]
+            options: [
+              {
+                label: "开票未结算",
+                value: "0",
+              },
+              {
+                label: "开票已结算",
+                value: "1",
+              },
+              {
+                label: "开票结算清",
+                value: "2",
+              },
+            ],
           },
         ],
         loading: true,
         isShowIndex: true,
-        operationWidth: '130',
-        tableHeight:'auto',
-        optBtns:[
+        operationWidth: "130",
+        tableHeight: "auto",
+        optBtns: [
           {
-            type:'primary',
-            label:'结算',
-            hide:(row) => {
-                return row.completionStatus != '2'
+            type: "primary",
+            label: "结算",
+            hide: (row) => {
+              return row.completionStatus != "2";
             },
             // click:(row, index) => {return this.openBalanceFun(row)},
-            click:(row, index) => {return this.haldDetail(row)},
+            click: (row, index) => {
+              return this.haldDetail(row);
+            },
           },
           {
-            type:'primary',
-            label:'记录',
-            hide:(row) => {
-                return row.completionStatus != '0'
+            type: "primary",
+            label: "记录",
+            hide: (row) => {
+              return row.completionStatus != "0";
+            },
+            click: (row, index) => {
+              return this.haldRecord(row);
             },
-            click:(row, index) => {return this.haldRecord(row)},
           },
           {
-            type:'primary',
-            label:'作废',
-            hide:(row) => {
-                return row.completionStatus == '0'
+            type: "primary",
+            label: "作废",
+            hide: (row) => {
+              return row.completionStatus == "0";
             },
-            click:(row, index) => {return this.haldDelete(row)},
-          }
-      ]
+            click: (row, index) => {
+              return this.haldDelete(row);
+            },
+          },
+        ],
       },
       formTableDataNew: [],
-      settlementSumId: '',
+      settlementSumId: "",
       findPageDetailListNew: {},
       // 记录
       dialogVisiblerecord: false,
@@ -371,272 +451,271 @@ export default {
           {
             prop: "settlementTime",
             label: "进账日期",
-            type: "text"
+            type: "text",
           },
           {
             prop: "settlementAmount",
             label: "进帐金额",
-            type: "text"
+            type: "text",
           },
           {
             name: "imageUrl",
             label: "进帐截图",
-            type: "slot"
+            type: "slot",
           },
-
         ],
         loading: true,
-        isPaginationShow: true
+        isPaginationShow: true,
       },
       formTableDatarecord: [],
     };
   },
   created() {
-    this.$api.insCompany.findLeftInsTree( {
+    this.$api.insCompany
+      .findLeftInsTree({
         classname: "",
-        type: '1',
-        }).then((res) => {
-      this.ztreeNodes = res.data;
-    });
+        type: "1",
+      })
+      .then((res) => {
+        this.ztreeNodes = res.data;
+      });
     this.findPage();
   },
   methods: {
     // 作废
     haldDelete(row) {
-      this.$api.task.settlementSumFeesVoidInvoicing({
-        id: row.id
-      }).then(res => {
-        if (res.code == 200) {
-          this.handleCloseNew()
-          this.findPage()
-        } else {
-          this.$message.error(res.msg)
-        }
-      })
+      this.$api.task
+        .settlementSumFeesVoidInvoicing({
+          id: row.id,
+        })
+        .then((res) => {
+          if (res.code == 200) {
+            this.handleCloseNew();
+            this.findPage();
+          } else {
+            this.$message.error(res.msg);
+          }
+        });
     },
     // 记录
     haldRecord(row) {
-      this.settlementSumId = row.id
-      this.dialogVisiblerecord = true
-      this.findPageDetailrecord(row)
+      this.settlementSumId = row.id;
+      this.dialogVisiblerecord = true;
+      this.findPageDetailrecord(row);
     },
     handleCloserecord() {
-      this.dialogVisiblerecord = false
+      this.dialogVisiblerecord = false;
     },
     getListrecord(data) {
-      this.findPageDetailrecord({...data})
+      this.findPageDetailrecord({ ...data });
     },
     findPageDetailrecord(data) {
-      this.tableConfigDetailrecord.loading = true
-      
+      this.tableConfigDetailrecord.loading = true;
+
       // this.$api.task.fncSettlementSumFees({
-        this.$api.task.fncSettlementQueryRecord({
-        settlementSumId: this.settlementSumId,
-        settlementStatus: '2',
-      })
-      .then(res => {
-        if (res.code == 200) {
-          this.formTableDatarecord = res.data
-          this.tableConfigDetailrecord.loading = false
-        } else {
-          this.$message.error(res.msg)
-          this.tableConfigDetailrecord = false
-        }
-      })
+      this.$api.task
+        .fncSettlementQueryRecord({
+          settlementSumId: this.settlementSumId,
+          settlementStatus: "2",
+        })
+        .then((res) => {
+          if (res.code == 200) {
+            this.formTableDatarecord = res.data;
+            this.tableConfigDetailrecord.loading = false;
+          } else {
+            this.$message.error(res.msg);
+            this.tableConfigDetailrecord = false;
+          }
+        });
     },
     // 结算提交按钮
     submitBalance() {
       let subData = {
         multipleSelection: this.formTableData,
         settlementSumId: this.settlementSumId,
-        settlementImageId: this.batchData.id
-      }
-       subData.multipleSelection.forEach(val => {
-        val.createTime = null
-       })
-      this.$api.task.batchSumBalance(subData).then(res => {
+        settlementImageId: this.batchData.id,
+      };
+      subData.multipleSelection.forEach((val) => {
+        val.createTime = null;
+      });
+      this.$api.task.batchSumBalance(subData).then((res) => {
         if (res.code == 200) {
-          this.$message.success('操作成功')
-          this.handleClose()
-          this.handleCloseNew()
+          this.$message.success("操作成功");
+          this.handleClose();
+          this.handleCloseNew();
           this.findPage();
         } else {
-          this.$message.error(res.msg)
+          this.$message.error(res.msg);
         }
-      })
+      });
     },
     // 新详情
-    
+
     haldNewDetail(row) {
-      this.dialogVisibleNewDetail= true
-      this.findPageDetailListNew = row
-      this.findPageNewDetail(row)
+      this.dialogVisibleNewDetail = true;
+      this.findPageDetailListNew = row;
+      this.findPageNewDetail(row);
     },
     findPageNewDetail(data) {
-      this.$api.task.settlementSumFeesQuery({
-          settlementStatus: '1',
-          completionStatus: data.settlementStatus || '0',
+      this.$api.task
+        .settlementSumFeesQuery({
+          settlementStatus: "1",
+          completionStatus: data.settlementStatus || "0",
           partnerCompaniesId: data.partnerCompaniesId,
-          isNotCar: '0',
+          isNotCar: "0",
         })
-        .then(res => {
-          if (res.code==200) {
+        .then((res) => {
+          if (res.code == 200) {
             this.formTableDataNew = res.data.content;
             this.tableConfigDetailNew.loading = false;
-          }
-          else{
+          } else {
             this.tableConfigDetailNew.loading = false;
-            this.$message.error(res.msg)
+            this.$message.error(res.msg);
           }
         });
     },
     handleSearchList1(data) {
-      this.findPageNewDetail({...this.findPageDetailListNew, ...data})
+      this.findPageNewDetail({ ...this.findPageDetailListNew, ...data });
     },
     handleCloseNew() {
-      this.dialogVisibleNewDetail= false
+      this.dialogVisibleNewDetail = false;
     },
 
-
-    drivingupload(file, fileList){
-      this.fileList=[]
+    drivingupload(file, fileList) {
+      this.fileList = [];
       const params = new FormData(); // 声明formData数据类型
       params.append("multipartFile", file.raw);
       params.append("type", "image");
       // params.append("isNotCar", "0");
-      this.$api.letter.uploadFile(params).then(res => {
+      this.$api.letter.uploadFile(params).then((res) => {
         if (res.code == "200") {
-          this.batchData =res.data
-          this.fileList = fileList
-        }
-        else{
-          this.fileList=[]
-          this.$message.error(res.msg)
+          this.batchData = res.data;
+          this.fileList = fileList;
+        } else {
+          this.fileList = [];
+          this.$message.error(res.msg);
         }
       });
     },
-    handVoid(row){
-      this.$api.task
-        .yaidlnvoicing({id:row.id})
-        .then(res => {
-            if (res.code==200) {
-                this.dialogVisible=false
-                this.$message({
-                    message: res.msg ||'操作成功',
-                    type: 'success'
-                })
-            }
-            else{
-                this.$message.error(res.msg)
-            }
-        });
+    handVoid(row) {
+      this.$api.task.yaidlnvoicing({ id: row.id }).then((res) => {
+        if (res.code == 200) {
+          this.dialogVisible = false;
+          this.$message({
+            message: res.msg || "操作成功",
+            type: "success",
+          });
+        } else {
+          this.$message.error(res.msg);
+        }
+      });
     },
-    getYearData(val){
-      this.formData.year=val
+    getYearData(val) {
+      this.formData.year = val;
     },
-    getMonthData(val){
-      this.formData.month=val
+    getMonthData(val) {
+      this.formData.month = val;
     },
-    getDayData(val){
-      this.formData.day=val
+    getDayData(val) {
+      this.formData.day = val;
     },
     // 查询
     handleSearchList(data) {
       this.findPage(data);
     },
-    resetForm() {
-            this.formData={}
-            this.$refs.yearMonthYay.clear()
-        },
+    handleResetForm() {
+      this.formData = {};
+      this.pageData.partnerCompaniesIdList = [];
+      this.$refs.yearMonthYay.clear();
+    },
     //列表数据
     findPage(data) {
       this.tableConfig.loading = true;
       this.$api.task
-        .allOtherAmount({...this.pageData,...data,...this.formData})
-        .then(res => {
-          if (res.code==200) {
-            this.tableData = res.data?res.data:[]
+        .allOtherAmount({ ...this.pageData, ...data, ...this.formData })
+        .then((res) => {
+          if (res.code == 200) {
+            this.tableData = res.data ? res.data : [];
             // this.pageData.pageNum = res.data.pageNum;
             // this.pageData.pageSize = res.data.pageSize;
             // this.pageData.totalSize = res.data.totalSize;
             this.tableConfig.loading = false;
-          }
-          else{
-            this.$message.error(res.msg)
+          } else {
+            this.$message.error(res.msg);
           }
         });
     },
     closdialogVisible() {
       this.dialogVisible = false;
     },
-    haldDetail(row){
-      this.dialogVisible=true
-      this.findPageDetailList=row
-      this.settlementSumId = row.id
-      this.findPageDetail(row)
+    haldDetail(row) {
+      this.dialogVisible = true;
+      this.findPageDetailList = row;
+      this.settlementSumId = row.id;
+      this.findPageDetail(row);
     },
     findPageDetail(data) {
-      this.tableConfigDetail.loading=true
+      this.tableConfigDetail.loading = true;
       this.$api.task
         // .otherSettldetail({
-          .fncSettlementFeesQuery({
-          partnerCompaniesId:data.partnerCompaniesId,
-          handlingFeesStatus:'1',
-          settlementStatus: '1',
-          isNotCar:0,
-          settlementSumId: data.id
+        .fncSettlementFeesQuery({
+          partnerCompaniesId: data.partnerCompaniesId,
+          handlingFeesStatus: "1",
+          settlementStatus: "1",
+          isNotCar: 0,
+          settlementSumId: data.id,
         })
-        .then(res => {
-          if (res.code==200) {
-            res.data.content.forEach(ele => {
-              ele.invoicCommissionFeevalue = 0
+        .then((res) => {
+          if (res.code == 200) {
+            res.data.content.forEach((ele) => {
+              ele.invoicCommissionFeevalue = 0;
             });
             this.formTableData = res.data.content;
             this.tableConfigDetail.loading = false;
-          }
-          else{
+          } else {
             this.tableConfigDetail.loading = false;
-            this.$message.error(res.msg)
+            this.$message.error(res.msg);
           }
         });
     },
-    handleClose(){
-      this.findPage()
-      this.dialogVisible=false
-    },  
+    handleClose() {
+      this.findPage();
+      this.dialogVisible = false;
+    },
     handleClosebalance() {
       this.dialogVisiblebalance = false;
     },
     balanceSumbit() {
       this.$api.task
-        .batchBalance({...this.openBalanceDetail,
-          otherFeevalue:this.findPageDetailList.otherFeevalue,
-          partnerCompaniesId:this.findPageDetailList.partnerCompaniesId,
-          companyId:this.findPageDetailList.companyId,
-          isNotCar:'0',
-          handlingFeesStatus:'1',
-          settlementImageId:this.batchData.id,
-          ...this.form})
-        .then(res => {
-          if (res.code==200) {
-            this.findPageDetail(this.findPageDetailList)
-            this.dialogVisiblebalance=false
+        .batchBalance({
+          ...this.openBalanceDetail,
+          otherFeevalue: this.findPageDetailList.otherFeevalue,
+          partnerCompaniesId: this.findPageDetailList.partnerCompaniesId,
+          companyId: this.findPageDetailList.companyId,
+          isNotCar: "0",
+          handlingFeesStatus: "1",
+          settlementImageId: this.batchData.id,
+          ...this.form,
+        })
+        .then((res) => {
+          if (res.code == 200) {
+            this.findPageDetail(this.findPageDetailList);
+            this.dialogVisiblebalance = false;
             this.$message({
-              message: '操作成功' || res.msg,
-               type: 'success'
-            })
-          }
-          else{
-            this.$message.error(res.msg)
+              message: "操作成功" || res.msg,
+              type: "success",
+            });
+          } else {
+            this.$message.error(res.msg);
           }
         });
     },
     // 结算
     openBalanceFun(row) {
-      this.openBalanceDetail=row
-      this.dialogVisiblebalance=true
+      this.openBalanceDetail = row;
+      this.dialogVisiblebalance = true;
     },
-    
+
     tablePageChange(val) {
       this.pageData.pageSize = val;
       this.findPage();
@@ -645,14 +724,13 @@ export default {
       this.pageData.pageNum = val;
       this.findPage();
     },
-   
-  }
+  },
 };
 </script>
     
 <style scoped lang="scss">
-  .InvoicedAndSettled>>>.el-table__body-wrapper {
-    overflow-y: auto !important;
-    height: auto !important;
-  }
+.InvoicedAndSettled >>> .el-table__body-wrapper {
+  overflow-y: auto !important;
+  height: auto !important;
+}
 </style>

+ 752 - 645
src/views/FinancialManagement/CarInsurance/CompanySettlement/CarInsurance/InvoicedAndSettled.vue

@@ -1,679 +1,786 @@
 <template>
-    <!--布局容器-->
-    <div  style="width: 99%; margin-top: 0px">
-        <templateTable class="invoiceAnd" :formList="formList"  :tableConfig="tableConfig" :data="tableData"
-            @findPage="findPage" @handleSearchList="handleSearchList" @resetForm="resetForm" :pagination="pageData" @getList="getList">
-            <template slot="data">
-                <yearMonthYay ref="yearMonthYay" @getYearData="getYearData" @getMonthData="getMonthData"
-                    @getDayData="getDayData"></yearMonthYay>
-            </template>
-            <template slot="保司机构">
-        <el-cascader v-model="pageData.partnerCompaniesIdList" size="small" :show-all-levels="false" ize="small"
-          :options="ztreeNodes" :props='{
+  <!--布局容器-->
+  <div style="width: 99%; margin-top: 0px">
+    <templateTable
+      class="invoiceAnd"
+      :formList="formList"
+      :tableConfig="tableConfig"
+      :data="tableData"
+      @findPage="findPage"
+      @handleSearchList="handleSearchList"
+      @handleResetForm="handleResetForm"
+      :pagination="pageData"
+      @getList="getList"
+    >
+      <template slot="data">
+        <yearMonthYay
+          ref="yearMonthYay"
+          @getYearData="getYearData"
+          @getMonthData="getMonthData"
+          @getDayData="getDayData"
+        ></yearMonthYay>
+      </template>
+      <template slot="保司机构">
+        <el-cascader
+          v-model="pageData.partnerCompaniesIdList"
+          size="small"
+          :show-all-levels="false"
+          ize="small"
+          :options="ztreeNodes"
+          :props="{
             checkStrictly: true,
-            value: "id",
-            label: "name",
-            children: "children",
-        }' clearable filterable></el-cascader>
+            value: 'id',
+            label: 'name',
+            children: 'children',
+          }"
+          clearable
+          filterable
+        ></el-cascader>
       </template>
-        </templateTable>
-        <el-dialog title="详情" :visible.sync="dialogVisible" width="80%" :before-close="handleClose">
-            <templateTable ref="templateTable" :formList="formList1" @handleSearchList="handleSearchList1"
-                :tableConfig="tableConfigDetail" :data="formTableData" @findPage="findPageDetail">
-                <template slot="开票方式" slot-scope="scope">
-                <span>{{ scope.row.invoicingMethod == 0 ? '保司开票' : scope.row.invoicingMethod == 1 ? '掌柜开票' : scope.row.invoicingMethod }}</span>
-              </template>
-              <template slot="结算状态" slot-scope="scope">
-                <span>{{ scope.row.completionStatus == 0 ? '开票未结算' : scope.row.completionStatus == 1 ? '开票已结算' : scope.row.completionStatus == 2 ? '开票结算清' : scope.row.completionStatus }}</span>
-              </template>
-            </templateTable>
-            <span slot="footer" class="dialog-footer">
-                <el-button size="small" @click="dialogVisible = false">取消</el-button>
-            </span>
-        </el-dialog>
-        <el-dialog title="记录" :visible.sync="dialogVisiblerecord" width="30%" :before-close="handleCloserecord">
-            <templateTable ref="templateTable1"   :pagination="pageDatarecord" @getList="getListrecord"
-                :tableConfig="tableConfigDetailrecord" :data="formTableDatarecord" @findPage="findPageDetailrecord">
-                <template slot="imageUrl" slot-scope="scope">
-                    <img v-if="scope.row.imageUrl" :src='scope.row.imageUrl' class="imageclass"  @click.stop="showViewer=true;ProViewImg=scope.row.imageUrl" />
-                </template>
-            </templateTable>
-            <span slot="footer" class="dialog-footer">
-                <el-button size="small" @click="dialogVisiblerecord = false">取消</el-button>
-            </span>
-        </el-dialog>
-        <el-dialog title="明细" :visible.sync="dialogVisiblerecordDetail" width="70%" :before-close="handleCloserecorddetail">
-            <templateTable ref="templateTable1"   :pagination="pageDatarecorddetail" @getList="getListrecorddetail"
-                :tableConfig="tableConfigDetailrecorddetail" :data="recordDetailData" @findPage="findPageDetailrecorddatail">
-            </templateTable>
+    </templateTable>
+    <el-dialog
+      title="详情"
+      :visible.sync="dialogVisible"
+      width="80%"
+      :before-close="handleClose"
+    >
+      <templateTable
+        ref="templateTable"
+        :formList="formList1"
+        @handleSearchList="handleSearchList1"
+        :tableConfig="tableConfigDetail"
+        :data="formTableData"
+        @findPage="findPageDetail"
+      >
+        <template slot="开票方式" slot-scope="scope">
+          <span>{{
+            scope.row.invoicingMethod == 0
+              ? "保司开票"
+              : scope.row.invoicingMethod == 1
+              ? "掌柜开票"
+              : scope.row.invoicingMethod
+          }}</span>
+        </template>
+        <template slot="结算状态" slot-scope="scope">
+          <span>{{
+            scope.row.completionStatus == 0
+              ? "开票未结算"
+              : scope.row.completionStatus == 1
+              ? "开票已结算"
+              : scope.row.completionStatus == 2
+              ? "开票结算清"
+              : scope.row.completionStatus
+          }}</span>
+        </template>
+      </templateTable>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="small" @click="dialogVisible = false">取消</el-button>
+      </span>
+    </el-dialog>
+    <el-dialog
+      title="记录"
+      :visible.sync="dialogVisiblerecord"
+      width="30%"
+      :before-close="handleCloserecord"
+    >
+      <templateTable
+        ref="templateTable1"
+        :pagination="pageDatarecord"
+        @getList="getListrecord"
+        :tableConfig="tableConfigDetailrecord"
+        :data="formTableDatarecord"
+        @findPage="findPageDetailrecord"
+      >
+        <template slot="imageUrl" slot-scope="scope">
+          <img
+            v-if="scope.row.imageUrl"
+            :src="scope.row.imageUrl"
+            class="imageclass"
+            @click.stop="
+              showViewer = true;
+              ProViewImg = scope.row.imageUrl;
+            "
+          />
+        </template>
+      </templateTable>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="small" @click="dialogVisiblerecord = false"
+          >取消</el-button
+        >
+      </span>
+    </el-dialog>
+    <el-dialog
+      title="明细"
+      :visible.sync="dialogVisiblerecordDetail"
+      width="70%"
+      :before-close="handleCloserecorddetail"
+    >
+      <templateTable
+        ref="templateTable1"
+        :pagination="pageDatarecorddetail"
+        @getList="getListrecorddetail"
+        :tableConfig="tableConfigDetailrecorddetail"
+        :data="recordDetailData"
+        @findPage="findPageDetailrecorddatail"
+      >
+      </templateTable>
 
-            <span slot="footer" class="dialog-footer">
-                <el-button size="small" @click="dialogVisiblerecordDetail = false">取消</el-button>
-            </span>
-        </el-dialog>
-        <el-dialog
-          title="结算"
-          :visible.sync="dialogVisiblebalance"
-          width="20%"
-          :before-close="handleClosebalance">
-          <el-form ref="form" :model="form" label-width="85px">
-            <el-form-item label="进账金额:">
-              <el-input v-model="form.settlementAmount" style="width:220px"></el-input>
-            </el-form-item>
-            <el-form-item label="进账日期:">
-              <el-date-picker
-                v-model="form.settlementTime"
-                type="date"
-                placeholder="选择日期"
-                value-format="yyyy-MM-dd">
-              </el-date-picker>
-            </el-form-item>
-            <el-form-item label="上传凭证:" >
-                  <el-upload  action="#" class="upload-demo"  :limit="1" :auto-upload="false"
-                    :on-change="drivingupload"  ref="upload3"  accept=".png, .jpg, .jpeg" :file-list="fileList">
-                    <el-button size="small" type="primary">点击上传</el-button>
-                  </el-upload>
-              </el-form-item>
-          </el-form>
-          <span slot="footer" class="dialog-footer">
-          <el-button  size="small" @click="dialogVisiblebalance = false">取消</el-button>
-          <el-button type="primary" size="small" @click="balanceSumbit">确定</el-button>
-        </span>
-      </el-dialog>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="small" @click="dialogVisiblerecordDetail = false"
+          >取消</el-button
+        >
+      </span>
+    </el-dialog>
+    <el-dialog
+      title="结算"
+      :visible.sync="dialogVisiblebalance"
+      width="20%"
+      :before-close="handleClosebalance"
+    >
+      <el-form ref="form" :model="form" label-width="85px">
+        <el-form-item label="进账金额:">
+          <el-input
+            v-model="form.settlementAmount"
+            style="width: 220px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="进账日期:">
+          <el-date-picker
+            v-model="form.settlementTime"
+            type="date"
+            placeholder="选择日期"
+            value-format="yyyy-MM-dd"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="上传凭证:">
+          <el-upload
+            action="#"
+            class="upload-demo"
+            :limit="1"
+            :auto-upload="false"
+            :on-change="drivingupload"
+            ref="upload3"
+            accept=".png, .jpg, .jpeg"
+            :file-list="fileList"
+          >
+            <el-button size="small" type="primary">点击上传</el-button>
+          </el-upload>
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="small" @click="dialogVisiblebalance = false"
+          >取消</el-button
+        >
+        <el-button type="primary" size="small" @click="balanceSumbit"
+          >确定</el-button
+        >
+      </span>
+    </el-dialog>
 
-        <el-image-viewer v-if="showViewer"  :on-close="closeViewer"  :z-index="9999" :url-list="[ProViewImg]" />
-    </div>
+    <el-image-viewer
+      v-if="showViewer"
+      :on-close="closeViewer"
+      :z-index="9999"
+      :url-list="[ProViewImg]"
+    />
+  </div>
 </template>
 <script>
-import KtCommonTable from "@/views/Core/KtCommonTable.vue";//表格组件
-import templateTable from '@/components/TemplateTable/index.vue'
-import { mapState } from 'vuex'
-import yearMonthYay from '../../PlatformSettlement/yearMonthYay.vue'
+import KtCommonTable from "@/views/Core/KtCommonTable.vue"; //表格组件
+import templateTable from "@/components/TemplateTable/index.vue";
+import { mapState } from "vuex";
+import yearMonthYay from "../../PlatformSettlement/yearMonthYay.vue";
 
 export default {
-    name: "baosi",
-    components: { KtCommonTable, templateTable, yearMonthYay,
-        "el-image-viewer": () =>
-      import("element-ui/packages/image/src/image-viewer")
-     },
-    created() {
-    },
-    computed: {
-        ...mapState({
-            perms: state => state.user.perms
-        })
-    },
-    data() {
-        return {
-            process: process.env.BASE_URL,
-            batchData:{},
-            fileList:[],
-            dialogVisiblebalance:false,
-            ztreeNodes:[],
-            showViewer:false,
-            ProViewImg:[],
-            formList: [
-                {
-                    label: "保险公司",
-                    prop: "companyName",
-                    type: "company",
-                },
-                {
-                    label: "保司机构",
-                    name: "保司机构",
-                    type: "slot",
-                    },
-                {
-                    label: "年月日",
-                    name: "data",
-                    type: "slot",
-                },
-            ],
-            tableConfigDetailrecord: {
-                columns: [
-                    {
-                        prop: "settlementTime",
-                        label: "进账日期",
-                        type: "text"
-                    },
-                    {
-                        prop: "settlementAmount",
-                        label: "进帐金额",
-                        type: "text"
-                    },
-                    {
-                        name: "imageUrl",
-                        label: "凭证",
-                        type: "slot"
-                    },
-                ],
-                loading: true,
-                isPaginationShow:true
+  name: "baosi",
+  components: {
+    KtCommonTable,
+    templateTable,
+    yearMonthYay,
+    "el-image-viewer": () =>
+      import("element-ui/packages/image/src/image-viewer"),
+  },
+  created() {},
+  computed: {
+    ...mapState({
+      perms: (state) => state.user.perms,
+    }),
+  },
+  data() {
+    return {
+      process: process.env.BASE_URL,
+      batchData: {},
+      fileList: [],
+      dialogVisiblebalance: false,
+      ztreeNodes: [],
+      showViewer: false,
+      ProViewImg: [],
+      formList: [
+        {
+          label: "保险公司",
+          prop: "companyName",
+          type: "company",
+        },
+        {
+          label: "保司机构",
+          name: "保司机构",
+          type: "slot",
+        },
+        {
+          label: "年月日",
+          name: "data",
+          type: "slot",
+        },
+      ],
+      tableConfigDetailrecord: {
+        columns: [
+          {
+            prop: "settlementTime",
+            label: "进账日期",
+            type: "text",
+          },
+          {
+            prop: "settlementAmount",
+            label: "进帐金额",
+            type: "text",
+          },
+          {
+            name: "imageUrl",
+            label: "凭证",
+            type: "slot",
+          },
+        ],
+        loading: true,
+        isPaginationShow: true,
+      },
+      tableConfigDetailrecorddetail: {
+        columns: [
+          {
+            prop: "licenseno",
+            label: "车牌号",
+            type: "text",
+          },
+          {
+            prop: "policyno",
+            label: "交强保单号",
+            type: "text",
+          },
+          {
+            prop: "syPolicyno",
+            label: "商业保单号",
+            type: "text",
+          },
+          {
+            prop: "insuredName",
+            label: "被保人",
+            type: "text",
+          },
+          {
+            prop: "jqPremium",
+            label: "交强保费",
+            type: "text",
+          },
+          {
+            prop: "syPremium",
+            label: "商业保费",
+            type: "text",
+          },
+          {
+            prop: "jqSuperviseCostsProportion",
+            label: "交强手续费比例",
+            type: "text",
+          },
+          {
+            prop: "sySuperviseCostsProportion",
+            label: "商业手续费比例",
+            type: "text",
+          },
+          {
+            prop: "jqSuperviseCostsPremiums",
+            label: "交强手续费金额",
+            type: "text",
+          },
+          {
+            prop: "sySuperviseCostsPremiums",
+            label: "商业手续费金额",
+            type: "text",
+          },
+          {
+            prop: "commissionFeevalue",
+            label: "总手续费金额",
+            type: "text",
+          },
+        ],
+        loading: true,
+        isPaginationShow: true,
+      },
+      tableConfig: {
+        columns: [
+          {
+            prop: "companyName",
+            label: "保险公司名称",
+            type: "text",
+          },
+          {
+            prop: "partnerCompaniesName",
+            label: "合作公司名称",
+            type: "text",
+          },
+
+          {
+            prop: "commissionFeevalue",
+            label: "总金额",
+            type: "text",
+          },
+          {
+            prop: "allInvoicCommissionFeevalue",
+            label: "已开票金额",
+            type: "text",
+          },
+          {
+            prop: "readyCommissionFeevalue",
+            label: "已开票已结算",
+            type: "text",
+          },
+          {
+            prop: "invoicCommissionFeevalue",
+            label: "已开票未结算",
+            type: "text",
+          },
+          {
+            prop: "noInvoicCommissionFeevalue",
+            label: "未开票",
+            type: "text",
+          },
+          {
+            prop: "unSettledAmount",
+            label: "未结算金额",
+            type: "text",
+          },
+        ],
+        loading: true,
+        isPaginationShow: true,
+        showSummary: true,
+        isShowIndex: true,
+        tableHeight: "auto",
+        // optBtns: [
+        //     {
+        //         type: 'primary',
+        //         label: '结算',
+        //         click: (row, index) => { return this.balanceFun(row) },
+        //     }
+        // ]
+        optBtns: [
+          {
+            type: "primary",
+            label: "详情",
+            click: (row, index) => {
+              return this.haldDetail(row);
             },
-            tableConfigDetailrecorddetail: {
-                columns: [
-                    {
-                        prop: "licenseno",
-                        label: "车牌号",
-                        type: "text"
-                    },
-                    {
-                        prop: "policyno",
-                        label: "交强保单号",
-                        type: "text"
-                    },
-                    {
-                        prop: "syPolicyno",
-                        label: "商业保单号",
-                        type: "text"
-                    },
-                    {
-                        prop: "insuredName",
-                        label: "被保人",
-                        type: "text"
-                    },
-                    {
-                        prop: "jqPremium",
-                        label: "交强保费",
-                        type: "text"
-                    },
-                    {
-                        prop: "syPremium",
-                        label: "商业保费",
-                        type: "text"
-                    },
-                    {
-                        prop: "jqSuperviseCostsProportion",
-                        label: "交强手续费比例",
-                        type: "text"
-                    }, {
-                        prop: "sySuperviseCostsProportion",
-                        label: "商业手续费比例",
-                        type: "text"
-                    },
-                    {
-                        prop: "jqSuperviseCostsPremiums",
-                        label: "交强手续费金额",
-                        type: "text"
-                    },
-                    {
-                        prop: "sySuperviseCostsPremiums",
-                        label: "商业手续费金额",
-                        type: "text"
-                    },
-                    {
-                        prop: "commissionFeevalue",
-                        label: "总手续费金额",
-                        type: "text"
-                    }
-                ],
-                loading: true,
-                isPaginationShow:true
+          },
+        ],
+      },
+      tableData: [],
+      pageData: {
+        pageNum: 1,
+        pageSize: 20,
+        agreementType: "2",
+        isNotCar: "0",
+        isNotDocumentary: "0",
+        handlingFeesStatus: "0",
+      },
+      pageDatarecord: {
+        pageNum: 1,
+        pageSize: 20,
+        totalSize: 0,
+      },
+      pageDatarecorddetail: {
+        pageNum: 1,
+        pageSize: 20,
+        totalSize: 0,
+      },
+      formList1: [
+        {
+          label: "结算状态",
+          prop: "settlementStatus",
+          type: "select",
+          options: [
+            {
+              label: "开票未结算",
+              value: "0",
             },
-            tableConfig: {
-                columns: [
-                    {
-                        prop: "companyName",
-                        label: "保险公司名称",
-                        type: "text"
-                    },
-                    {
-                        prop: "partnerCompaniesName",
-                        label: "合作公司名称",
-                        type: "text"
-                    },
-
-                    {
-                        prop: "commissionFeevalue",
-                        label: "总金额",
-                        type: "text"
-                    },
-                    {
-                        prop: "allInvoicCommissionFeevalue",
-                        label: "已开票金额",
-                        type: "text"
-                    },
-                    {
-                        prop: "readyCommissionFeevalue",
-                        label: "已开票已结算",
-                        type: "text"
-                    },
-                    {
-                        prop: "invoicCommissionFeevalue",
-                        label: "已开票未结算",
-                        type: "text"
-                    },
-                    {
-                        prop: "noInvoicCommissionFeevalue",
-                        label: "未开票",
-                        type: "text"
-                    },
-                    {
-                        prop: "unSettledAmount",
-                        label: "未结算金额",
-                        type: "text"
-                    },
-                ],
-                loading: true,
-                isPaginationShow: true,
-                showSummary: true,
-                isShowIndex: true,
-                tableHeight: 'auto',
-                // optBtns: [
-                //     {
-                //         type: 'primary',
-                //         label: '结算',
-                //         click: (row, index) => { return this.balanceFun(row) },
-                //     }
-                // ]
-                optBtns: [
-                    {
-                        type: 'primary',
-                        label: '详情',
-                        click: (row, index) => { return this.haldDetail(row) },
-                    }
-                ]
+            {
+              label: "开票已结算",
+              value: "1",
             },
-            tableData: [],
-            pageData: {
-                pageNum: 1,
-                pageSize: 20,
-                agreementType: '2',
-                isNotCar: '0',
-                isNotDocumentary: '0',
-                handlingFeesStatus: '0'
+            {
+              label: "开票结算清",
+              value: "2",
             },
-            pageDatarecord: {
-                pageNum: 1,
-                pageSize: 20,
-                totalSize:0
+          ],
+        },
+      ],
+      tableConfigDetail: {
+        columns: [
+          {
+            prop: "invoicId",
+            label: "开票号",
+            type: "text",
+          },
+          {
+            prop: "invoicingMethod",
+            label: "开票方式",
+            // type: "text"
+            name: "开票方式",
+            type: "slot",
+          },
+          {
+            prop: "invoicCommissionFeevalue",
+            label: "开票金额",
+            type: "text",
+          },
+          {
+            prop: "invoicedSettledAmount",
+            label: "已开票已结算金额",
+            type: "text",
+          },
+          {
+            prop: "invoicedNotSettledAmount",
+            label: "已开票未结算金额",
+            type: "text",
+          },
+          {
+            prop: "completionStatus",
+            label: "结算状态",
+            name: "结算状态",
+            type: "slot",
+          },
+          // {
+          //   prop: "invoicTime",
+          //   label: "开票时间",
+          //   type: "text"
+          // },
+        ],
+        loading: true,
+        isShowIndex: true,
+        operationWidth: 150,
+        optBtns: [
+          {
+            type: "primary",
+            label: "结算",
+            hide: (row) => {
+              return row.completionStatus != "2";
             },
-            pageDatarecorddetail: {
-                pageNum: 1,
-                pageSize: 20,
-                totalSize:0
+            click: (row, index) => {
+              return this.balanceFun(row);
             },
-            formList1: [
-                {
-                    label: "结算状态",
-                    prop: "settlementStatus",
-                    type: "select",
-                    options: [
-                      {
-                        label: '开票未结算',
-                        value: '0'
-                      },
-                      {
-                        label: '开票已结算',
-                        value: '1'
-                      },
-                      {
-                        label: '开票结算清',
-                        value: '2'
-                      },
-                    ]
-                },
-
-            ],
-            tableConfigDetail: {
-                columns: [
-                    {
-                        prop: "invoicId",
-                        label: "开票号",
-                        type: "text"
-                    },
-                    {
-                        prop: "invoicingMethod",
-                        label: "开票方式",
-                        // type: "text"
-                        name: '开票方式',
-                        type: 'slot'
-                    },
-                    {
-                        prop: "invoicCommissionFeevalue",
-                        label: "开票金额",
-                        type: "text"
-                    },
-                    {
-                        prop: "invoicedSettledAmount",
-                        label: "已开票已结算金额",
-                        type: "text"
-                    },
-                    {
-                        prop: "invoicedNotSettledAmount",
-                        label: "已开票未结算金额",
-                        type: "text"
-                    },
-                    {
-                        prop: "completionStatus",
-                        label: "结算状态",
-                        name: "结算状态",
-                        type: "slot"
-                    },
-                    // {
-                    //   prop: "invoicTime",
-                    //   label: "开票时间",
-                    //   type: "text"
-                    // },
-
-                ],
-                loading: true,
-                isShowIndex: true,
-                operationWidth: 150,
-                optBtns:[
-                    {
-                        type:'primary',
-                        label:'结算',
-                        hide: (row) => {
-                            return row.completionStatus != '2'
-                        },
-                        click:(row, index) => {return this.balanceFun(row)},
-                    },
-                    {
-                        type:'primary',
-                        label:'作废',
-                        hide: (row) => {
-                        return row.completionStatus == '0'
-                        },
-                        click:(row, index) => {return this.handVoid(row)},
-                    },
-                    {
-                        type:'primary',
-                        label:'记录',
-                        hide: (row) => {
-                        return row.completionStatus != '0'
-                        },
-                        click:(row, index) => {return this.haldRecord(row)},
-                    },
-                    {
-                        type:'primary',
-                        label:'明细',
-                        hide: (row) => {
-                        return row.completionStatus != '0'
-                        },
-                        click:(row, index) => {return this.haldRecordDetail(row)},
-                    },
-                ]
+          },
+          {
+            type: "primary",
+            label: "作废",
+            hide: (row) => {
+              return row.completionStatus == "0";
             },
-            dialogVisible: false,
-            dialogVisiblerecord: false,
-            dialogVisiblerecordDetail:false,
-            formData: {},
-            formDetail: {},
-            formTableData: [],
-            formTableDatarecord:[],
-            recordDetailData:[],
-            recorddetailid:'',
-            form:{},
-
-        };
-    },
-    created() {
-        this.$api.insCompany.findLeftInsTree( {
+            click: (row, index) => {
+              return this.handVoid(row);
+            },
+          },
+          {
+            type: "primary",
+            label: "记录",
+            hide: (row) => {
+              return row.completionStatus != "0";
+            },
+            click: (row, index) => {
+              return this.haldRecord(row);
+            },
+          },
+          {
+            type: "primary",
+            label: "明细",
+            hide: (row) => {
+              return row.completionStatus != "0";
+            },
+            click: (row, index) => {
+              return this.haldRecordDetail(row);
+            },
+          },
+        ],
+      },
+      dialogVisible: false,
+      dialogVisiblerecord: false,
+      dialogVisiblerecordDetail: false,
+      formData: {},
+      formDetail: {},
+      formTableData: [],
+      formTableDatarecord: [],
+      recordDetailData: [],
+      recorddetailid: "",
+      form: {},
+    };
+  },
+  created() {
+    this.$api.insCompany
+      .findLeftInsTree({
         classname: "",
-        type: '1',
-        }).then((res) => {
-      this.ztreeNodes = res.data;
-    });
-        this.findPage();
+        type: "1",
+      })
+      .then((res) => {
+        this.ztreeNodes = res.data;
+      });
+    this.findPage();
+  },
+  methods: {
+    handVoid(row) {
+      this.$api.task.yaidlnvoicing({ id: row.id }).then((res) => {
+        if (res.code == 200) {
+          this.dialogVisible = false;
+          this.$message({
+            message: res.msg || "操作成功",
+            type: "success",
+          });
+        } else {
+          this.$message.error(res.msg);
+        }
+      });
     },
-    methods: {
-        handVoid(row){
-            this.$api.task
-            .yaidlnvoicing({id:row.id})
-            .then(res => {
-                if (res.code==200) {
-                    this.dialogVisible=false
-                    this.$message({
-                        message: res.msg ||'操作成功',
-                        type: 'success'
-                    })
-                }
-                else{
-                    this.$message.error(res.msg)
-                }
-            });
-        },
-        balanceSumbit() {
-            if (!this.form.settlementAmount || this.form.settlementAmount <= 0) {
-                this.$message.error('请输入金额')
-                return
-            }
-            this.$api.task
-                .batchBxBalance({...this.openBalanceDetail,
-                otherFeevalue:this.formDetail.otherFeevalue,
-                partnerCompaniesId:this.formDetail.partnerCompaniesId,
-                companyId:this.formDetail.companyId,
-                isNotCar:'0',
-                handlingFeesStatus:'1',
-                settlementImageId:this.batchData.id,
-                ...this.form})
-                .then(res => {
-                if (res.code==200) {
-                    this.haldDetail(this.formDetail)
-                    this.dialogVisiblebalance=false
-                    this.$message({
-                        message: res.msg ||'操作成功',
-                        type: 'success'
-                    })
-                }
-                else{
-                    this.$message.error(res.msg)
-                }
-                });
-            },
-        // 结算
-        balanceFun(row) {
-            this.openBalanceDetail=row
-            this.fileList=[]
-            this.dialogVisiblebalance=true
-        },
-        drivingupload(file, fileList){
-            this.fileList=[]
-            const params = new FormData(); // 声明formData数据类型
-            params.append("multipartFile", file.raw);
-            params.append("type", "image");
-            // params.append("isNotCar", "0");
-            this.$api.letter.uploadFile(params).then(res => {
-            if (res.code == "200") {
-                this.batchData =res.data
-                this.fileList = fileList
-            }
-            else{
-                this.fileList=[]
-                this.$message.error(res.msg)
-            }
+    balanceSumbit() {
+      if (!this.form.settlementAmount || this.form.settlementAmount <= 0) {
+        this.$message.error("请输入金额");
+        return;
+      }
+      this.$api.task
+        .batchBxBalance({
+          ...this.openBalanceDetail,
+          otherFeevalue: this.formDetail.otherFeevalue,
+          partnerCompaniesId: this.formDetail.partnerCompaniesId,
+          companyId: this.formDetail.companyId,
+          isNotCar: "0",
+          handlingFeesStatus: "1",
+          settlementImageId: this.batchData.id,
+          ...this.form,
+        })
+        .then((res) => {
+          if (res.code == 200) {
+            this.haldDetail(this.formDetail);
+            this.dialogVisiblebalance = false;
+            this.$message({
+              message: res.msg || "操作成功",
+              type: "success",
             });
-        },
+          } else {
+            this.$message.error(res.msg);
+          }
+        });
+    },
+    // 结算
+    balanceFun(row) {
+      this.openBalanceDetail = row;
+      this.fileList = [];
+      this.dialogVisiblebalance = true;
+    },
+    drivingupload(file, fileList) {
+      this.fileList = [];
+      const params = new FormData(); // 声明formData数据类型
+      params.append("multipartFile", file.raw);
+      params.append("type", "image");
+      // params.append("isNotCar", "0");
+      this.$api.letter.uploadFile(params).then((res) => {
+        if (res.code == "200") {
+          this.batchData = res.data;
+          this.fileList = fileList;
+        } else {
+          this.fileList = [];
+          this.$message.error(res.msg);
+        }
+      });
+    },
     handleClosebalance() {
       this.dialogVisiblebalance = false;
     },
     closeViewer() {
       this.showViewer = false;
     },
-        getYearData(val) {
-            this.formData.year = val
-        },
-        getMonthData(val) {
-            this.formData.month = val
-        },
-        getDayData(val) {
-            this.formData.day = val
-        },
-        handleSearchList1(data) {
-            this.findPageDetail({ ...this.formDetail, ...data })
-        },
-        haldDetail(row) {
-            this.dialogVisible = true
-            this.formDetail = row
-            this.findPageDetail(row)
-        },
-        findPageDetail(data) {
-            this.tableConfigDetail.loading = true
-            this.$api.task
-                .invicdetai({
-                    partnerCompaniesId: data.partnerCompaniesId,
-                    agreementType: '2',
-                    isNotCar: '0',
-                    isNotDocumentary: '0',
-                    handlingFeesStatus: '0',
-                    isSettlement: '1',
-                    // settlementStatus:data.settlementStatus,
-                    completionStatus:data.settlementStatus || '2',
-                    settlementStatus: '1'
-                })
-                .then(res => {
-                    if (res.code == 200) {
-                        this.formTableData = res.data;
-                        this.tableConfigDetail.loading = false;
-                    }
-                    else {
-                        this.tableConfigDetail.loading = false;
-                        this.$message.error(res.msg)
-                    }
-                });
-        },
-        findPageDetailrecord(data) {
-            this.tableConfigDetailrecord.loading = true
-            this.$api.task
-            .settlementFeesGetRecord(this.recorddetailid)
-            .then(res => {
-                if (res.code == 200) {
-                    res.data.forEach(ele => {
-                        if (ele.imageUrl) {
-                            ele.imageUrl= process.env.BASE_URL+ele.imageUrl
-                        }
-                    });
-                    this.formTableDatarecord = res.data
-                    this.tableConfigDetailrecord.loading = false;
-                }
-                else {
-                    this.tableConfigDetail.loading = false;
-                    this.$message.error(res.msg)
-                }
+    getYearData(val) {
+      this.formData.year = val;
+    },
+    getMonthData(val) {
+      this.formData.month = val;
+    },
+    getDayData(val) {
+      this.formData.day = val;
+    },
+    handleSearchList1(data) {
+      this.findPageDetail({ ...this.formDetail, ...data });
+    },
+    haldDetail(row) {
+      this.dialogVisible = true;
+      this.formDetail = row;
+      this.findPageDetail(row);
+    },
+    findPageDetail(data) {
+      this.tableConfigDetail.loading = true;
+      this.$api.task
+        .invicdetai({
+          partnerCompaniesId: data.partnerCompaniesId,
+          agreementType: "2",
+          isNotCar: "0",
+          isNotDocumentary: "0",
+          handlingFeesStatus: "0",
+          isSettlement: "1",
+          // settlementStatus:data.settlementStatus,
+          completionStatus: data.settlementStatus || "2",
+          settlementStatus: "1",
+        })
+        .then((res) => {
+          if (res.code == 200) {
+            this.formTableData = res.data;
+            this.tableConfigDetail.loading = false;
+          } else {
+            this.tableConfigDetail.loading = false;
+            this.$message.error(res.msg);
+          }
+        });
+    },
+    findPageDetailrecord(data) {
+      this.tableConfigDetailrecord.loading = true;
+      this.$api.task
+        .settlementFeesGetRecord(this.recorddetailid)
+        .then((res) => {
+          if (res.code == 200) {
+            res.data.forEach((ele) => {
+              if (ele.imageUrl) {
+                ele.imageUrl = process.env.BASE_URL + ele.imageUrl;
+              }
             });
-        },
-        getListrecord(data) {
-            this.findPageDetailrecord(data)
-        },
-        handleClose() {
-            this.dialogVisible = false
-        },
-        handleCloserecord() {
-            this.dialogVisiblerecord = false
-        },
-        handleCloserecorddetail() {
-            this.dialogVisiblerecordDetail = false
-        },
-        haldRecord(row) {
-            this.dialogVisiblerecord = true
-            this.recorddetailid = row.id
-            this.findPageDetailrecord()
-        },
-        haldRecordDetail(row) {
-            this.dialogVisiblerecordDetail = true
-            this.recorddetailid = row.id
-            this.getListrecorddetail()
-        },
-        getListrecorddetail(data) {
-            this.findPageDetailrecorddatail(data)
-        },
-        findPageDetailrecorddatail(data) {
-            this.tableConfigDetailrecorddetail.loading = true;
-            this.$api.task
-            .fncplyFeeQuery({
-                    partnerCompaniesId: this.formDetail.partnerCompaniesId,
-                    agreementType: '2',
-                    isNotCar: '0',
-                    handlingFeesStatus: '0',
-                    id:this.recorddetailid,
-                    ...this.pageDatarecorddetail,
-                    ...data})
-                .then(res => {
-                    if (res.code == 200) {
-                        this.tableConfigDetailrecorddetail.loading = false;
-                        this.recordDetailData = res.data.content ? res.data.content : []
-                        this.pageDatarecorddetail = {
-                            pageNum: res.data.pageNum,
-                            pageSize: res.data.pageSize,
-                            totalSize: res.data.totalSize
-                        }
-                    }
-                    else {
-                        this.tableConfigDetailrecorddetail.loading = false;
-                        this.$message.error(res.msg)
-                    }
-                });
-        },
-        // 查询
-        handleSearchList(data) {
-            this.findPage(data);
-        },
-        resetForm() {
-            this.formData={}
-            this.pageData.partnerCompaniesIdList=[]
-            this.$refs.yearMonthYay.clear()
-        },
-        //列表数据
-        findPage(data) {
-            // if (data) {
-            //     this.pageData.pageNum = data.pageNum;
-            //     this.pageData.pageSize = data.pageSize;
-            // }
-            this.tableConfig.loading = true;
-            this.$api.task
-                .totalBxAmount({ ...this.pageData, ...this.formData,...data })
-                .then(res => {
-                    if (res.code == 200) {
-                        this.tableData = res.data ? res.data : []
-                        // this.pageData.pageNum = res.data.pageNum;
-                        // this.pageData.pageSize = res.data.pageSize;
-                        // this.pageData.totalSize = res.data.totalSize;
-                        this.tableConfig.loading = false;
-                    }
-                    else {
-                        this.tableConfig.loading = false;
-                        this.$message.error(res.msg)
-                    }
-                });
-        },
-        getList(data) {
-            this.findPage(data)
-        },
-
-        // 结算
-        // balanceFun(row) {
-        //     this.$api.task
-        //         .batchBxBalance({ ids: row.ids })
-        //         .then(res => {
-        //             if (res.code == 200) {
-        //                 this.$message({
-        //                     message: res.msg || '操作成功',
-        //                     type: 'success'
-        //                 })
-        //             }
-        //             else {
-        //                 this.$message.error(res.msg)
-        //             }
-        //         });
-        // },
-        tablePageChange(val) {
-            this.pageData.pageSize = val;
-            this.findPage();
-        },
-        tableCurrentChange(val) {
-            this.pageData.pageNum = val;
-            this.findPage();
-        },
+            this.formTableDatarecord = res.data;
+            this.tableConfigDetailrecord.loading = false;
+          } else {
+            this.tableConfigDetail.loading = false;
+            this.$message.error(res.msg);
+          }
+        });
+    },
+    getListrecord(data) {
+      this.findPageDetailrecord(data);
+    },
+    handleClose() {
+      this.dialogVisible = false;
+    },
+    handleCloserecord() {
+      this.dialogVisiblerecord = false;
+    },
+    handleCloserecorddetail() {
+      this.dialogVisiblerecordDetail = false;
+    },
+    haldRecord(row) {
+      this.dialogVisiblerecord = true;
+      this.recorddetailid = row.id;
+      this.findPageDetailrecord();
+    },
+    haldRecordDetail(row) {
+      this.dialogVisiblerecordDetail = true;
+      this.recorddetailid = row.id;
+      this.getListrecorddetail();
+    },
+    getListrecorddetail(data) {
+      this.findPageDetailrecorddatail(data);
+    },
+    findPageDetailrecorddatail(data) {
+      this.tableConfigDetailrecorddetail.loading = true;
+      this.$api.task
+        .fncplyFeeQuery({
+          partnerCompaniesId: this.formDetail.partnerCompaniesId,
+          agreementType: "2",
+          isNotCar: "0",
+          handlingFeesStatus: "0",
+          id: this.recorddetailid,
+          ...this.pageDatarecorddetail,
+          ...data,
+        })
+        .then((res) => {
+          if (res.code == 200) {
+            this.tableConfigDetailrecorddetail.loading = false;
+            this.recordDetailData = res.data.content ? res.data.content : [];
+            this.pageDatarecorddetail = {
+              pageNum: res.data.pageNum,
+              pageSize: res.data.pageSize,
+              totalSize: res.data.totalSize,
+            };
+          } else {
+            this.tableConfigDetailrecorddetail.loading = false;
+            this.$message.error(res.msg);
+          }
+        });
+    },
+    // 查询
+    handleSearchList(data) {
+      this.findPage(data);
+    },
+    handleResetForm() {
+      this.formData = {};
+      this.pageData.partnerCompaniesIdList = [];
+      this.$refs.yearMonthYay.clear();
+    },
+    //列表数据
+    findPage(data) {
+      // if (data) {
+      //     this.pageData.pageNum = data.pageNum;
+      //     this.pageData.pageSize = data.pageSize;
+      // }
+      this.tableConfig.loading = true;
+      this.$api.task
+        .totalBxAmount({ ...this.pageData, ...this.formData, ...data })
+        .then((res) => {
+          if (res.code == 200) {
+            this.tableData = res.data ? res.data : [];
+            // this.pageData.pageNum = res.data.pageNum;
+            // this.pageData.pageSize = res.data.pageSize;
+            // this.pageData.totalSize = res.data.totalSize;
+            this.tableConfig.loading = false;
+          } else {
+            this.tableConfig.loading = false;
+            this.$message.error(res.msg);
+          }
+        });
+    },
+    getList(data) {
+      this.findPage(data);
+    },
 
-    }
+    // 结算
+    // balanceFun(row) {
+    //     this.$api.task
+    //         .batchBxBalance({ ids: row.ids })
+    //         .then(res => {
+    //             if (res.code == 200) {
+    //                 this.$message({
+    //                     message: res.msg || '操作成功',
+    //                     type: 'success'
+    //                 })
+    //             }
+    //             else {
+    //                 this.$message.error(res.msg)
+    //             }
+    //         });
+    // },
+    tablePageChange(val) {
+      this.pageData.pageSize = val;
+      this.findPage();
+    },
+    tableCurrentChange(val) {
+      this.pageData.pageNum = val;
+      this.findPage();
+    },
+  },
 };
 </script>
 
 <style scoped>
-.invoiceAnd>>>.el-table__body-wrapper {
-    overflow-y: auto !important;
-    height: auto !important;
+.invoiceAnd >>> .el-table__body-wrapper {
+  overflow-y: auto !important;
+  height: auto !important;
 }
 
 .imageclass {

+ 652 - 551
src/views/FinancialManagement/CarInsurance/CompanySettlement/CarInsurance/InvoicingUnsettled.vue

@@ -1,637 +1,738 @@
 <template>
-    <!--布局容器-->
-    <div class="InvoicedAndSettled" style="width: 99%; margin-top: 0px">
-        <templateTable :formList="formList" :searchData.sync="searchData" :tableConfig="tableConfig" :data="tableData"
-            @findPage="findPage" @handleSearchList="handleSearchList"  @resetForm="resetForm" :pagination="pageData" @getList="getList">
-            <template slot="data">
-                <yearMonthYay ref="yearMonthYay" @getYearData="getYearData"  @getMonthData="getMonthData"  @getDayData="getDayData"></yearMonthYay>
-            </template>
-            <template slot="保司机构">
-              <el-cascader v-model="pageData.partnerCompaniesIdList" size="small" :show-all-levels="false" ize="small"
-                :options="ztreeNodes" :props='{
-                  checkStrictly: true,
-                  value: "id",
-                  label: "name",
-                  children: "children",
-              }' clearable filterable></el-cascader>
-            </template>
-        </templateTable>
-        <el-dialog title="详情" :visible.sync="dialogVisible" width="80%" :before-close="handleClose">
-          <templateTable ref="templateTable" :formList="formList1" @handleSearchList="handleSearchList1" :tableConfig="tableConfigDetail" :data="formTableData"
-            @findPage="findPageDetail" >
-              <template slot="开票方式" slot-scope="scope">
-                <span>{{ scope.row.invoicingMethod == 0 ? '保司开票' : scope.row.invoicingMethod == 1 ? '掌柜开票' : scope.row.invoicingMethod }}</span>
-              </template>
-              <template slot="结算状态" slot-scope="scope">
-                <span>{{ scope.row.completionStatus == 0 ? '开票未结算' : scope.row.completionStatus == 1 ? '开票已结算' : scope.row.completionStatus == 2 ? '开票结算清' : scope.row.completionStatus }}</span>
-              </template>
-          </templateTable>
-          <span slot="footer" class="dialog-footer">
-            <el-button  size="small" @click="dialogVisible = false">取消</el-button>
-          </span>
-        </el-dialog>
-        <el-dialog title="记录" :visible.sync="dialogVisiblerecord" width="30%" :before-close="handleCloserecord">
-            <templateTable ref="templateTable1"   :pagination="pageDatarecord" @getList="getListrecord"
-                :tableConfig="tableConfigDetailrecord" :data="formTableDatarecord" @findPage="findPageDetailrecord">
-                <template slot="imageUrl" slot-scope="scope">
-                    <img v-if="scope.row.imageUrl" :src='scope.row.imageUrl' class="imageclass"  @click.stop="showViewer=true;ProViewImg=scope.row.imageUrl" />
-                </template>
-            </templateTable>
-            <span slot="footer" class="dialog-footer">
-                <el-button size="small" @click="dialogVisiblerecord = false">取消</el-button>
-            </span>
-        </el-dialog>
-        <el-dialog title="明细" :visible.sync="dialogVisiblerecordDetail" width="50%" :before-close="handleCloserecorddetail">
-            <templateTable ref="templateTable1"   :pagination="pageDatarecorddetail" @getList="getListrecorddetail"
-                :tableConfig="tableConfigDetailrecorddetail" :data="recordDetailData" @findPage="findPageDetailrecorddatail">
-            </templateTable>
+  <!--布局容器-->
+  <div class="InvoicedAndSettled" style="width: 99%; margin-top: 0px">
+    <templateTable
+      :formList="formList"
+      :searchData.sync="searchData"
+      :tableConfig="tableConfig"
+      :data="tableData"
+      @findPage="findPage"
+      @handleSearchList="handleSearchList"
+      @handleResetForm="handleResetForm"
+      :pagination="pageData"
+      @getList="getList"
+    >
+      <template slot="data">
+        <yearMonthYay
+          ref="yearMonthYay"
+          @getYearData="getYearData"
+          @getMonthData="getMonthData"
+          @getDayData="getDayData"
+        ></yearMonthYay>
+      </template>
+      <template slot="保司机构">
+        <el-cascader
+          v-model="pageData.partnerCompaniesIdList"
+          size="small"
+          :show-all-levels="false"
+          ize="small"
+          :options="ztreeNodes"
+          :props="{
+            checkStrictly: true,
+            value: 'id',
+            label: 'name',
+            children: 'children',
+          }"
+          clearable
+          filterable
+        ></el-cascader>
+      </template>
+    </templateTable>
+    <el-dialog
+      title="详情"
+      :visible.sync="dialogVisible"
+      width="80%"
+      :before-close="handleClose"
+    >
+      <templateTable
+        ref="templateTable"
+        :formList="formList1"
+        @handleSearchList="handleSearchList1"
+        :tableConfig="tableConfigDetail"
+        :data="formTableData"
+        @findPage="findPageDetail"
+      >
+        <template slot="开票方式" slot-scope="scope">
+          <span>{{
+            scope.row.invoicingMethod == 0
+              ? "保司开票"
+              : scope.row.invoicingMethod == 1
+              ? "掌柜开票"
+              : scope.row.invoicingMethod
+          }}</span>
+        </template>
+        <template slot="结算状态" slot-scope="scope">
+          <span>{{
+            scope.row.completionStatus == 0
+              ? "开票未结算"
+              : scope.row.completionStatus == 1
+              ? "开票已结算"
+              : scope.row.completionStatus == 2
+              ? "开票结算清"
+              : scope.row.completionStatus
+          }}</span>
+        </template>
+      </templateTable>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="small" @click="dialogVisible = false">取消</el-button>
+      </span>
+    </el-dialog>
+    <el-dialog
+      title="记录"
+      :visible.sync="dialogVisiblerecord"
+      width="30%"
+      :before-close="handleCloserecord"
+    >
+      <templateTable
+        ref="templateTable1"
+        :pagination="pageDatarecord"
+        @getList="getListrecord"
+        :tableConfig="tableConfigDetailrecord"
+        :data="formTableDatarecord"
+        @findPage="findPageDetailrecord"
+      >
+        <template slot="imageUrl" slot-scope="scope">
+          <img
+            v-if="scope.row.imageUrl"
+            :src="scope.row.imageUrl"
+            class="imageclass"
+            @click.stop="
+              showViewer = true;
+              ProViewImg = scope.row.imageUrl;
+            "
+          />
+        </template>
+      </templateTable>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="small" @click="dialogVisiblerecord = false"
+          >取消</el-button
+        >
+      </span>
+    </el-dialog>
+    <el-dialog
+      title="明细"
+      :visible.sync="dialogVisiblerecordDetail"
+      width="50%"
+      :before-close="handleCloserecorddetail"
+    >
+      <templateTable
+        ref="templateTable1"
+        :pagination="pageDatarecorddetail"
+        @getList="getListrecorddetail"
+        :tableConfig="tableConfigDetailrecorddetail"
+        :data="recordDetailData"
+        @findPage="findPageDetailrecorddatail"
+      >
+      </templateTable>
 
-            <span slot="footer" class="dialog-footer">
-                <el-button size="small" @click="dialogVisiblerecordDetail = false">取消</el-button>
-            </span>
-        </el-dialog>
-      <el-dialog
-          title="结算"
-          :visible.sync="dialogVisiblebalance"
-          width="20%"
-          :before-close="handleClosebalance">
-          <el-form ref="form" :model="form" label-width="85px">
-            <el-form-item label="进账金额:">
-              <el-input v-model="form.settlementAmount" style="width:220px"></el-input>
-            </el-form-item>
-            <el-form-item label="进账日期:">
-              <el-date-picker
-                v-model="form.settlementTime"
-                type="date"
-                placeholder="选择日期"
-                value-format="yyyy-MM-dd">
-              </el-date-picker>
-            </el-form-item>
-            <el-form-item label="上传凭证:" >
-                  <el-upload  action="#" class="upload-demo"  :limit="1" :auto-upload="false"
-                    :on-change="drivingupload"  ref="upload3"  accept=".png, .jpg, .jpeg" :file-list="fileList">
-                    <el-button size="small" type="primary">点击上传</el-button>
-                  </el-upload>
-              </el-form-item>
-          </el-form>
-          <span slot="footer" class="dialog-footer">
-          <el-button  size="small" @click="dialogVisiblebalance = false">取消</el-button>
-          <el-button type="primary" size="small" @click="balanceSumbit">确实</el-button>
-        </span>
-      </el-dialog>
-    </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="small" @click="dialogVisiblerecordDetail = false"
+          >取消</el-button
+        >
+      </span>
+    </el-dialog>
+    <el-dialog
+      title="结算"
+      :visible.sync="dialogVisiblebalance"
+      width="20%"
+      :before-close="handleClosebalance"
+    >
+      <el-form ref="form" :model="form" label-width="85px">
+        <el-form-item label="进账金额:">
+          <el-input
+            v-model="form.settlementAmount"
+            style="width: 220px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="进账日期:">
+          <el-date-picker
+            v-model="form.settlementTime"
+            type="date"
+            placeholder="选择日期"
+            value-format="yyyy-MM-dd"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="上传凭证:">
+          <el-upload
+            action="#"
+            class="upload-demo"
+            :limit="1"
+            :auto-upload="false"
+            :on-change="drivingupload"
+            ref="upload3"
+            accept=".png, .jpg, .jpeg"
+            :file-list="fileList"
+          >
+            <el-button size="small" type="primary">点击上传</el-button>
+          </el-upload>
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="small" @click="dialogVisiblebalance = false"
+          >取消</el-button
+        >
+        <el-button type="primary" size="small" @click="balanceSumbit"
+          >确实</el-button
+        >
+      </span>
+    </el-dialog>
+  </div>
 </template>
 <script>
-import templateTable from '@/components/TemplateTable/index.vue'
-import { mapState } from 'vuex'
-import yearMonthYay from '../../PlatformSettlement/yearMonthYay.vue'
+import templateTable from "@/components/TemplateTable/index.vue";
+import { mapState } from "vuex";
+import yearMonthYay from "../../PlatformSettlement/yearMonthYay.vue";
 
 export default {
-    name: "InvoicingUnsettled",
-    components: {  templateTable,yearMonthYay },
-    created() {
-    },
-    computed: {
-        ...mapState({
-            perms: state => state.user.perms
-        })
-    },
-    data() {
-        return {
-          // 记录 明细
-          dialogVisiblerecord: false,
-          dialogVisiblerecordDetail: false,
-          formTableDatarecord:[],
-          recordDetailData:[],
-          pageDatarecord: {
-                pageNum: 1,
-                pageSize: 20,
-                totalSize:0
-            },
-            pageDatarecorddetail: {
-                pageNum: 1,
-                pageSize: 20,
-                totalSize:0
-            },
-            tableConfigDetailrecord: {
-                columns: [
-                    {
-                        prop: "settlementTime",
-                        label: "进账日期",
-                        type: "text"
-                    },
-                    {
-                        prop: "settlementAmount",
-                        label: "进帐金额",
-                        type: "text"
-                    },
-                    {
-                        name: "imageUrl",
-                        label: "凭证",
-                        type: "slot"
-                    },
-                ],
-                loading: true,
-                isPaginationShow:true
-            },
-            tableConfigDetailrecorddetail: {
-                columns: [
-                    {
-                        prop: "syPolicyno",
-                        label: "商业保单号",
-                        type: "text"
-                    },
-                    {
-                        prop: "policyno",
-                        label: "交强保单号",
-                        type: "text"
-                    },
-                    {
-                        prop: "licenseno",
-                        label: "车牌号",
-                        type: "text"
-                    },
-                    {
-                        prop: "insuredName",
-                        label: "被保人",
-                        type: "text"
-                    },
-                    {
-                        prop: "jqPremium",
-                        label: "交强保费",
-                        type: "text"
-                    },
-                    {
-                        prop: "syPremium",
-                        label: "商业保费",
-                        type: "text"
-                    },
-                    {
-                        prop: "jqSuperviseCostsProportion",
-                        label: "交强手续费比例",
-                        type: "text"
-                    },
-                    {
-                        prop: "jqSuperviseCostsPremiums",
-                        label: "交强手续费金额",
-                        type: "text"
-                    }, {
-                        prop: "sySuperviseCostsProportion",
-                        label: "商业手续费比例",
-                        type: "text"
-                    },
-                    {
-                        prop: "sySuperviseCostsPremiums",
-                        label: "商业手续费金额",
-                        type: "text"
-                    },
-                ],
-                loading: true,
-                isPaginationShow:true
-            },
-      ztreeNodes:[],
-      fileList:[],
-            dialogVisiblebalance:false,
-            form:{},
-            formTableData:[],
-      tableConfigDetail:{
+  name: "InvoicingUnsettled",
+  components: { templateTable, yearMonthYay },
+  created() {},
+  computed: {
+    ...mapState({
+      perms: (state) => state.user.perms,
+    }),
+  },
+  data() {
+    return {
+      // 记录 明细
+      dialogVisiblerecord: false,
+      dialogVisiblerecordDetail: false,
+      formTableDatarecord: [],
+      recordDetailData: [],
+      pageDatarecord: {
+        pageNum: 1,
+        pageSize: 20,
+        totalSize: 0,
+      },
+      pageDatarecorddetail: {
+        pageNum: 1,
+        pageSize: 20,
+        totalSize: 0,
+      },
+      tableConfigDetailrecord: {
+        columns: [
+          {
+            prop: "settlementTime",
+            label: "进账日期",
+            type: "text",
+          },
+          {
+            prop: "settlementAmount",
+            label: "进帐金额",
+            type: "text",
+          },
+          {
+            name: "imageUrl",
+            label: "凭证",
+            type: "slot",
+          },
+        ],
+        loading: true,
+        isPaginationShow: true,
+      },
+      tableConfigDetailrecorddetail: {
+        columns: [
+          {
+            prop: "syPolicyno",
+            label: "商业保单号",
+            type: "text",
+          },
+          {
+            prop: "policyno",
+            label: "交强保单号",
+            type: "text",
+          },
+          {
+            prop: "licenseno",
+            label: "车牌号",
+            type: "text",
+          },
+          {
+            prop: "insuredName",
+            label: "被保人",
+            type: "text",
+          },
+          {
+            prop: "jqPremium",
+            label: "交强保费",
+            type: "text",
+          },
+          {
+            prop: "syPremium",
+            label: "商业保费",
+            type: "text",
+          },
+          {
+            prop: "jqSuperviseCostsProportion",
+            label: "交强手续费比例",
+            type: "text",
+          },
+          {
+            prop: "jqSuperviseCostsPremiums",
+            label: "交强手续费金额",
+            type: "text",
+          },
+          {
+            prop: "sySuperviseCostsProportion",
+            label: "商业手续费比例",
+            type: "text",
+          },
+          {
+            prop: "sySuperviseCostsPremiums",
+            label: "商业手续费金额",
+            type: "text",
+          },
+        ],
+        loading: true,
+        isPaginationShow: true,
+      },
+      ztreeNodes: [],
+      fileList: [],
+      dialogVisiblebalance: false,
+      form: {},
+      formTableData: [],
+      tableConfigDetail: {
         columns: [
           {
             prop: "invoicId",
             label: "开票号",
-            type: "text"
+            type: "text",
           },
           {
             prop: "invoicingMethod",
             label: "开票方式",
             // type: "text"
-            name: '开票方式',
-            type: 'slot'
+            name: "开票方式",
+            type: "slot",
           },
           {
             prop: "invoicCommissionFeevalue",
             label: "开票金额",
-            type: "text"
+            type: "text",
           },
           {
             prop: "invoicedSettledAmount",
             label: "已开票已结算金额",
-            type: "text"
+            type: "text",
           },
           {
             prop: "invoicedNotSettledAmount",
             label: "已开票未结算金额",
-            type: "text"
+            type: "text",
           },
           {
             prop: "completionStatus",
             label: "结算状态",
             name: "结算状态",
-            type: "slot"
+            type: "slot",
           },
           // {
           //   prop: "invoicTime",
           //   label: "开票时间",
           //   type: "text"
           // },
-         
         ],
         loading: true,
         isShowIndex: true,
         operationWidth: 150,
-        tableHeight:'auto',
-        optBtns:[
+        tableHeight: "auto",
+        optBtns: [
           {
-            type:'primary',
-            label:'结算',
+            type: "primary",
+            label: "结算",
             hide: (row) => {
-                return row.completionStatus != '2'
+              return row.completionStatus != "2";
             },
-            click:(row, index) => {return this.balanceFun(row)},
-        },
-        {
-            type:'primary',
-            label:'作废',
-            hide: (row) => {
-              return row.completionStatus == '0'
+            click: (row, index) => {
+              return this.balanceFun(row);
             },
-            click:(row, index) => {return this.handVoid(row)},
-        },
-        {
-            type:'primary',
-            label:'记录',
+          },
+          {
+            type: "primary",
+            label: "作废",
             hide: (row) => {
-              return row.completionStatus != '0'
+              return row.completionStatus == "0";
             },
-            click:(row, index) => {return this.haldRecord(row)},
-        },
-        {
-            type:'primary',
-            label:'明细',
+            click: (row, index) => {
+              return this.handVoid(row);
+            },
+          },
+          {
+            type: "primary",
+            label: "记录",
             hide: (row) => {
-              return row.completionStatus != '0'
+              return row.completionStatus != "0";
             },
-            click:(row, index) => {return this.haldRecordDetail(row)},
-        },
-      ]
-      },
-            searchData: {},
-            formList: [
-                {
-                    label: "保险公司",
-                    prop: "companyName",
-                    type: "company",
-                },
-                {
-                    label: "合作公司名称",
-                    name: "保司机构",
-                    type: "slot",
-                    },
-                {
-                    label: "年月日",
-                    name: "data",
-                    type: "slot",
-                    },
-            ],
-            formList1: [
-              {
-                    label: "结算状态",
-                    prop: "settlementStatus",
-                    type: "select",
-                    options: [
-                      {
-                        label: '开票未结算',
-                        value: '0'
-                      },
-                      {
-                        label: '开票已结算',
-                        value: '1'
-                      }, 
-                      {
-                        label: '开票结算清',
-                        value: '2'
-                      },
-                    ]
-                },
-               
-            ],
-            dialogVisible:false,
-            tableConfig: {
-                columns: [
-                    {
-                        prop: "companyName",
-                        label: "保险公司名称",
-                        type: "text"
-                    },
-                    {
-                        prop: "partnerCompaniesName",
-                        label: "保司机构",
-                        type: "text"
-                    },
-                    {
-                        prop: "allInvoicCommissionFeevalue",
-                        label: "已开票手续费",
-                        type: "text"
-                    },
-                    {
-                        prop: "readyCommissionFeevalue",
-                        label: "已开票已结算手续费",
-                        type: "text"
-                    },
-                    {
-                        prop: "invoicCommissionFeevalue",
-                        label: "已开票未结算手续费",
-                        type: "text"
-                    },
-                ],
-                loading: true,
-                isPaginationShow: true,
-                showSummary: true,
-                isShowIndex: true,
-                tableHeight: 'auto',
-                optBtns: [
-                    {
-                        type: 'primary',
-                        label: '详情',
-                        // hide:(row)=>{
-                        //     return !row.invoicCommissionFeevalue?true:false
-                        // },
-                        click: (row, index) => { return this.haldDetail(row) },
-                    }
-                ]
+            click: (row, index) => {
+              return this.haldRecord(row);
             },
-            tableData: [],
-            pageData: {
-                pageNum: 1,
-                pageSize: 20,
-                agreementType: '2',
-                isNotCar: '0',
-                isNotDocumentary : '0',
-                handlingFeesStatus:'0'
+          },
+          {
+            type: "primary",
+            label: "明细",
+            hide: (row) => {
+              return row.completionStatus != "0";
             },
-            formData: {},
-            formDetail:{},
-            batchData:{}
-        };
-    },
-    created() {
-      this.$api.insCompany.findLeftInsTree( {
-        classname: "",
-        type: '1',
-        }).then((res) => {
-      this.ztreeNodes = res.data;
-    });
-        this.findPage();
-    },
-    methods: {
-      // 记录
-      findPageDetailrecord(data) {
-            this.tableConfigDetailrecord.loading = true
-            this.$api.task
-                // .settlementFeesQuery({
-                //     partnerCompaniesId: this.formDetail.partnerCompaniesId,
-                //     agreementType: '2',
-                //     isNotCar: '0',
-                //     handlingFeesStatus: '0',
-                //     settlementStatus:'2',
-                //     id:this.recorddetailid,
-                //     ...data
-                // })
-                .settlementFeesGetRecord(this.recorddetailid)
-                .then(res => {
-                    if (res.code == 200) {
-                        res.data.forEach(ele => {
-                          if (ele.imageUrl) {
-                            ele.imageUrl= process.env.BASE_URL+ele.imageUrl
-                          }
-                        });
-                        // this.formTableDatarecord = res.data.content;
-                        // this.pageDatarecord={
-                        //     pageNum:res.data.pageNum,
-                        //     pageSize:res.data.pageSize,
-                        //     totalSize:res.data.totalSize,
-                        // }
-                        this.formTableDatarecord = res.data
-                        this.tableConfigDetailrecord.loading = false;
-                    }
-                    else {
-                        this.tableConfigDetail.loading = false;
-                        this.$message.error(res.msg)
-                    }
-                });
-        },
-        getListrecord(data) {
-            this.findPageDetailrecord(data)
-        },
-        haldRecord(row) {
-            this.dialogVisiblerecord = true
-            this.recorddetailid = row.id
-            this.findPageDetailrecord()
-        },
-        
-        haldRecordDetail(row) {
-            this.dialogVisiblerecordDetail = true
-            this.recorddetailid = row.id
-            this.getListrecorddetail()
-        },
-        getListrecorddetail(data) {
-            this.findPageDetailrecorddatail(data)
-        },
-        findPageDetailrecorddatail(data) {
-            this.tableConfigDetailrecorddetail.loading = true;
-            this.$api.task
-            .fncplyFeeQuery({
-                    partnerCompaniesId: this.formDetail.partnerCompaniesId,
-                    agreementType: '2',
-                    isNotCar: '0',
-                    handlingFeesStatus: '0',
-                    id:this.recorddetailid,
-                    ...this.pageDatarecorddetail,
-                    ...data})
-                .then(res => {
-                    if (res.code == 200) {
-                        this.tableConfigDetailrecorddetail.loading = false;
-                        this.recordDetailData = res.data.content ? res.data.content : []
-                    }
-                    else {
-                        this.tableConfigDetailrecorddetail.loading = false;
-                        this.$message.error(res.msg)
-                    }
-                });
+            click: (row, index) => {
+              return this.haldRecordDetail(row);
+            },
+          },
+        ],
+      },
+      searchData: {},
+      formList: [
+        {
+          label: "保险公司",
+          prop: "companyName",
+          type: "company",
         },
-      handleCloserecord() {
-            this.dialogVisiblerecord = false
+        {
+          label: "合作公司名称",
+          name: "保司机构",
+          type: "slot",
         },
-        handleCloserecorddetail() {
-            this.dialogVisiblerecordDetail = false
+        {
+          label: "年月日",
+          name: "data",
+          type: "slot",
         },
-      resetForm() {
-            this.formData={}
-            this.$refs.yearMonthYay.clear()
+      ],
+      formList1: [
+        {
+          label: "结算状态",
+          prop: "settlementStatus",
+          type: "select",
+          options: [
+            {
+              label: "开票未结算",
+              value: "0",
+            },
+            {
+              label: "开票已结算",
+              value: "1",
+            },
+            {
+              label: "开票结算清",
+              value: "2",
+            },
+          ],
         },
-      drivingupload(file, fileList){
-        this.fileList=[]
-        const params = new FormData(); // 声明formData数据类型
-        params.append("multipartFile", file.raw);
-        params.append("type", "image");
-        // params.append("isNotCar", "0");
-        this.$api.letter.uploadFile(params).then(res => {
-          if (res.code == "200") {
-            this.batchData =res.data
-            this.fileList = fileList
+      ],
+      dialogVisible: false,
+      tableConfig: {
+        columns: [
+          {
+            prop: "companyName",
+            label: "保险公司名称",
+            type: "text",
+          },
+          {
+            prop: "partnerCompaniesName",
+            label: "保司机构",
+            type: "text",
+          },
+          {
+            prop: "allInvoicCommissionFeevalue",
+            label: "已开票手续费",
+            type: "text",
+          },
+          {
+            prop: "readyCommissionFeevalue",
+            label: "已开票已结算手续费",
+            type: "text",
+          },
+          {
+            prop: "invoicCommissionFeevalue",
+            label: "已开票未结算手续费",
+            type: "text",
+          },
+        ],
+        loading: true,
+        isPaginationShow: true,
+        showSummary: true,
+        isShowIndex: true,
+        tableHeight: "auto",
+        optBtns: [
+          {
+            type: "primary",
+            label: "详情",
+            // hide:(row)=>{
+            //     return !row.invoicCommissionFeevalue?true:false
+            // },
+            click: (row, index) => {
+              return this.haldDetail(row);
+            },
+          },
+        ],
+      },
+      tableData: [],
+      pageData: {
+        pageNum: 1,
+        pageSize: 20,
+        agreementType: "2",
+        isNotCar: "0",
+        isNotDocumentary: "0",
+        handlingFeesStatus: "0",
+      },
+      formData: {},
+      formDetail: {},
+      batchData: {},
+    };
+  },
+  created() {
+    this.$api.insCompany
+      .findLeftInsTree({
+        classname: "",
+        type: "1",
+      })
+      .then((res) => {
+        this.ztreeNodes = res.data;
+      });
+    this.findPage();
+  },
+  methods: {
+    // 记录
+    findPageDetailrecord(data) {
+      this.tableConfigDetailrecord.loading = true;
+      this.$api.task
+        // .settlementFeesQuery({
+        //     partnerCompaniesId: this.formDetail.partnerCompaniesId,
+        //     agreementType: '2',
+        //     isNotCar: '0',
+        //     handlingFeesStatus: '0',
+        //     settlementStatus:'2',
+        //     id:this.recorddetailid,
+        //     ...data
+        // })
+        .settlementFeesGetRecord(this.recorddetailid)
+        .then((res) => {
+          if (res.code == 200) {
+            res.data.forEach((ele) => {
+              if (ele.imageUrl) {
+                ele.imageUrl = process.env.BASE_URL + ele.imageUrl;
+              }
+            });
+            // this.formTableDatarecord = res.data.content;
+            // this.pageDatarecord={
+            //     pageNum:res.data.pageNum,
+            //     pageSize:res.data.pageSize,
+            //     totalSize:res.data.totalSize,
+            // }
+            this.formTableDatarecord = res.data;
+            this.tableConfigDetailrecord.loading = false;
+          } else {
+            this.tableConfigDetail.loading = false;
+            this.$message.error(res.msg);
           }
-          else{
-            this.fileList=[]
-            this.$message.error(res.msg)
+        });
+    },
+    getListrecord(data) {
+      this.findPageDetailrecord(data);
+    },
+    haldRecord(row) {
+      this.dialogVisiblerecord = true;
+      this.recorddetailid = row.id;
+      this.findPageDetailrecord();
+    },
+
+    haldRecordDetail(row) {
+      this.dialogVisiblerecordDetail = true;
+      this.recorddetailid = row.id;
+      this.getListrecorddetail();
+    },
+    getListrecorddetail(data) {
+      this.findPageDetailrecorddatail(data);
+    },
+    findPageDetailrecorddatail(data) {
+      this.tableConfigDetailrecorddetail.loading = true;
+      this.$api.task
+        .fncplyFeeQuery({
+          partnerCompaniesId: this.formDetail.partnerCompaniesId,
+          agreementType: "2",
+          isNotCar: "0",
+          handlingFeesStatus: "0",
+          id: this.recorddetailid,
+          ...this.pageDatarecorddetail,
+          ...data,
+        })
+        .then((res) => {
+          if (res.code == 200) {
+            this.tableConfigDetailrecorddetail.loading = false;
+            this.recordDetailData = res.data.content ? res.data.content : [];
+          } else {
+            this.tableConfigDetailrecorddetail.loading = false;
+            this.$message.error(res.msg);
           }
         });
-      },
-      getYearData(val){
-        this.formData.year=val
-      },
-    getMonthData(val){
-      this.formData.month=val
     },
-    getDayData(val){
-      this.formData.day=val
+    handleCloserecord() {
+      this.dialogVisiblerecord = false;
+    },
+    handleCloserecorddetail() {
+      this.dialogVisiblerecordDetail = false;
+    },
+    handleResetForm() {
+      this.formData = {};
+      this.pageData.partnerCompaniesIdList = [];
+      this.$refs.yearMonthYay.clear();
+    },
+    drivingupload(file, fileList) {
+      this.fileList = [];
+      const params = new FormData(); // 声明formData数据类型
+      params.append("multipartFile", file.raw);
+      params.append("type", "image");
+      // params.append("isNotCar", "0");
+      this.$api.letter.uploadFile(params).then((res) => {
+        if (res.code == "200") {
+          this.batchData = res.data;
+          this.fileList = fileList;
+        } else {
+          this.fileList = [];
+          this.$message.error(res.msg);
+        }
+      });
+    },
+    getYearData(val) {
+      this.formData.year = val;
+    },
+    getMonthData(val) {
+      this.formData.month = val;
+    },
+    getDayData(val) {
+      this.formData.day = val;
     },
     // 查询
     handleSearchList(data) {
-        this.findPage(data);
+      this.findPage(data);
     },
-    handleSearchList1(data){
-        this.findPageDetail({...this.formDetail,...data})
+    handleSearchList1(data) {
+      this.findPageDetail({ ...this.formDetail, ...data });
     },
-    haldDetail(row){
-      this.dialogVisible=true
-      this.formDetail=row
-      this.findPageDetail(row)
+    haldDetail(row) {
+      this.dialogVisible = true;
+      this.formDetail = row;
+      this.findPageDetail(row);
     },
     findPageDetail(data) {
-    this.tableConfigDetail.loading=true
-    this.$api.task
-    .invicdetai({
-        partnerCompaniesId:data.partnerCompaniesId,
-        agreementType: '2',
-        isNotCar: '0',
-        isNotDocumentary : '0',
-        handlingFeesStatus:'0',
-        // settlementStatus:data.settlementStatus,
-        completionStatus:data.settlementStatus || '0',
-        settlementStatus: '1'
+      this.tableConfigDetail.loading = true;
+      this.$api.task
+        .invicdetai({
+          partnerCompaniesId: data.partnerCompaniesId,
+          agreementType: "2",
+          isNotCar: "0",
+          isNotDocumentary: "0",
+          handlingFeesStatus: "0",
+          // settlementStatus:data.settlementStatus,
+          completionStatus: data.settlementStatus || "0",
+          settlementStatus: "1",
+        })
+        .then((res) => {
+          if (res.code == 200) {
+            this.formTableData = res.data;
+            this.tableConfigDetail.loading = false;
+          } else {
+            this.tableConfigDetail.loading = false;
+            this.$message.error(res.msg);
+          }
+        });
+    },
 
-    })
-    .then(res => {
-        if (res.code==200) {
-        this.formTableData = res.data;
-        this.tableConfigDetail.loading = false;
-        }
-        else{
-        this.tableConfigDetail.loading = false;
-        this.$message.error(res.msg)
-        }
-    });
-},
-       
-        //列表数据
-        findPage(data) {
-            // if (data) {
-            //     this.pageData.pageNum = data.pageNum;
-            //     this.pageData.pageSize = data.pageSize;
-            // }
-            this.tableConfig.loading = true;
-            this.$api.task
-                .totalBxAmount({...this.pageData,...this.formData, ...data})
-                .then(res => {
-                    if (res.code==200) {
-                        this.tableData = res.data? res.data:[]
-                        // this.pageData.pageNum = res.data.pageNum;
-                        // this.pageData.pageSize = res.data.pageSize;
-                        // this.pageData.totalSize = res.data.totalSize;
-                        this.tableConfig.loading = false;
-                    }
-                    else{
-                        this.tableConfig.loading = false;
-                        this.$message.error(res.msg)
-                    }
-                });
-        },
-        getList(data) {
-            this.findPage(data)
-        },
-        handleClose(){
-      this.dialogVisible=false
-    }, 
+    //列表数据
+    findPage(data) {
+      // if (data) {
+      //     this.pageData.pageNum = data.pageNum;
+      //     this.pageData.pageSize = data.pageSize;
+      // }
+      this.tableConfig.loading = true;
+      this.$api.task
+        .totalBxAmount({ ...this.pageData, ...this.formData, ...data })
+        .then((res) => {
+          if (res.code == 200) {
+            this.tableData = res.data ? res.data : [];
+            // this.pageData.pageNum = res.data.pageNum;
+            // this.pageData.pageSize = res.data.pageSize;
+            // this.pageData.totalSize = res.data.totalSize;
+            this.tableConfig.loading = false;
+          } else {
+            this.tableConfig.loading = false;
+            this.$message.error(res.msg);
+          }
+        });
+    },
+    getList(data) {
+      this.findPage(data);
+    },
+    handleClose() {
+      this.dialogVisible = false;
+    },
     balanceSumbit() {
       if (!this.form.settlementAmount || this.form.settlementAmount <= 0) {
-        this.$message.error('请输入金额')
-        return
+        this.$message.error("请输入金额");
+        return;
       }
       this.$api.task
-        .batchBxBalance({...this.openBalanceDetail,
-          otherFeevalue:this.formDetail.otherFeevalue,
-          partnerCompaniesId:this.formDetail.partnerCompaniesId,
-          companyId:this.formDetail.companyId,
-          isNotCar:'0',
-          handlingFeesStatus:'1',
-          settlementImageId:this.batchData.id,
-          ...this.form})
-        .then(res => {
-          if (res.code==200) {
-            this.haldDetail(this.formDetail)
-            this.dialogVisiblebalance=false
+        .batchBxBalance({
+          ...this.openBalanceDetail,
+          otherFeevalue: this.formDetail.otherFeevalue,
+          partnerCompaniesId: this.formDetail.partnerCompaniesId,
+          companyId: this.formDetail.companyId,
+          isNotCar: "0",
+          handlingFeesStatus: "1",
+          settlementImageId: this.batchData.id,
+          ...this.form,
+        })
+        .then((res) => {
+          if (res.code == 200) {
+            this.haldDetail(this.formDetail);
+            this.dialogVisiblebalance = false;
             this.$message({
-                message: res.msg ||'操作成功',
-                type: 'success'
-            })
-          }
-          else{
-            this.$message.error(res.msg)
+              message: res.msg || "操作成功",
+              type: "success",
+            });
+          } else {
+            this.$message.error(res.msg);
           }
         });
-    }, 
+    },
     handleClosebalance() {
       this.dialogVisiblebalance = false;
     },
-    handVoid(row){
-      this.$api.task
-                .yaidlnvoicing({id:row.id})
-                .then(res => {
-                    if (res.code==200) {
-                        this.dialogVisible=false
-                        this.$message({
-                            message: res.msg ||'操作成功',
-                            type: 'success'
-                        })
-                    }
-                    else{
-                        this.$message.error(res.msg)
-                    }
-                });
+    handVoid(row) {
+      this.$api.task.yaidlnvoicing({ id: row.id }).then((res) => {
+        if (res.code == 200) {
+          this.dialogVisible = false;
+          this.$message({
+            message: res.msg || "操作成功",
+            type: "success",
+          });
+        } else {
+          this.$message.error(res.msg);
+        }
+      });
     },
-        // 结算
-        balanceFun(row) {
-            this.openBalanceDetail=row
-            this.fileList=[]
-            this.dialogVisiblebalance=true
-        },
-        tablePageChange(val) {
-            this.pageData.pageSize = val;
-            this.findPage();
-        },
-        tableCurrentChange(val) {
-            this.pageData.pageNum = val;
-            this.findPage();
-        },
-
-    }
+    // 结算
+    balanceFun(row) {
+      this.openBalanceDetail = row;
+      this.fileList = [];
+      this.dialogVisiblebalance = true;
+    },
+    tablePageChange(val) {
+      this.pageData.pageSize = val;
+      this.findPage();
+    },
+    tableCurrentChange(val) {
+      this.pageData.pageNum = val;
+      this.findPage();
+    },
+  },
 };
 </script>
   
 <style scoped>
-.InvoicedAndSettled>>>.el-table__body-wrapper {
-    overflow-y: auto !important;
-    height: auto !important;
+.InvoicedAndSettled >>> .el-table__body-wrapper {
+  overflow-y: auto !important;
+  height: auto !important;
 }
 .imageclass {
   width: 200px;

+ 250 - 154
src/views/FinancialManagement/CarInsurance/CompanySettlement/CarInsurance/Notinvoiced.vue

@@ -1,29 +1,70 @@
 <template>
   <!--布局容器-->
   <div class="InvoicedAndSettled" style="width: 99%; margin-top: 0px">
-    <templateTable :formList="formList" :searchData.sync="searchData" :tableConfig="tableConfig" :data="tableData"
-      @findPage="findPage" @handleSearchList="handleSearchList" @resetForm="resetForm" :pagination="pageData">
+    <templateTable
+      :formList="formList"
+      :searchData.sync="searchData"
+      :tableConfig="tableConfig"
+      :data="tableData"
+      @findPage="findPage"
+      @handleSearchList="handleSearchList"
+      @handleResetForm="handleResetForm"
+      :pagination="pageData"
+    >
       <template slot="data">
-        <yearMonthYay ref="yearMonthYay" @getYearData="getYearData" @getMonthData="getMonthData" @getDayData="getDayData">
+        <yearMonthYay
+          ref="yearMonthYay"
+          @getYearData="getYearData"
+          @getMonthData="getMonthData"
+          @getDayData="getDayData"
+        >
         </yearMonthYay>
       </template>
       <template slot="保司机构">
-        <el-cascader v-model="pageData.partnerCompaniesIdList" size="small" :show-all-levels="false" ize="small"
-          :options="ztreeNodes" :props='{
+        <el-cascader
+          v-model="pageData.partnerCompaniesIdList"
+          size="small"
+          :show-all-levels="false"
+          ize="small"
+          :options="ztreeNodes"
+          :props="{
             checkStrictly: true,
-            value: "id",
-            label: "name",
-            children: "children",
-        }' clearable filterable></el-cascader>
+            value: 'id',
+            label: 'name',
+            children: 'children',
+          }"
+          clearable
+          filterable
+        ></el-cascader>
       </template>
     </templateTable>
-    <el-dialog title="开票" :visible.sync="dialogVisible" width="40%" @close="closdialogVisible">
-      <el-form :model="InvoicingData" :rules="rules" ref="InvoicingData" :inline="true" size="small" label-width="90px">
+    <el-dialog
+      title="开票"
+      :visible.sync="dialogVisible"
+      width="40%"
+      @close="closdialogVisible"
+    >
+      <el-form
+        :model="InvoicingData"
+        :rules="rules"
+        ref="InvoicingData"
+        :inline="true"
+        size="small"
+        label-width="90px"
+      >
         <el-row>
           <el-col :span="11">
             <el-form-item label="开票方式" prop="invoicingMethod">
-              <el-select v-model="InvoicingData.invoicingMethod" placeholder="请选择">
-                <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
+              <el-select
+                v-model="InvoicingData.invoicingMethod"
+                placeholder="请选择"
+              >
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                >
                 </el-option>
               </el-select>
             </el-form-item>
@@ -45,9 +86,13 @@
           </el-col> -->
         </el-row>
       </el-form>
-      <el-table show-summary :data="multipleSelection" border style="width: 100%">
-        <el-table-column prop="monthNumber" label="月份">
-        </el-table-column>
+      <el-table
+        show-summary
+        :data="multipleSelection"
+        border
+        style="width: 100%"
+      >
+        <el-table-column prop="monthNumber" label="月份"> </el-table-column>
         <el-table-column prop="allTotalOtherFeevalue" label="总金额">
         </el-table-column>
         <el-table-column prop="invoicCommissionFeevalue" label="已开票">
@@ -61,28 +106,72 @@
         </el-table-column>
       </el-table>
       <span slot="footer" class="dialog-footer">
-        <el-button size="small" @click="dialogVisible = false; multipleSelection = []">取 消</el-button>
-        <el-button size="small" type="primary" @click="submit('InvoicingData')">确 定</el-button>
+        <el-button
+          size="small"
+          @click="
+            dialogVisible = false;
+            multipleSelection = [];
+          "
+          >取 消</el-button
+        >
+        <el-button size="small" type="primary" @click="submit('InvoicingData')"
+          >确 定</el-button
+        >
       </span>
     </el-dialog>
-    <el-dialog title="开票" :visible.sync="myDialogVisible" width="40%" @close="myClosdialogVisible">
-      年度: <el-date-picker size="small" v-model="yeartsStart" :picker-options="startDatePicker" value-format="yyyy"
-        type="year" style="width:150px" placeholder="开始年份">
+    <el-dialog
+      title="开票"
+      :visible.sync="myDialogVisible"
+      width="40%"
+      @close="myClosdialogVisible"
+    >
+      年度:
+      <el-date-picker
+        size="small"
+        v-model="yeartsStart"
+        :picker-options="startDatePicker"
+        value-format="yyyy"
+        type="year"
+        style="width: 150px"
+        placeholder="开始年份"
+      >
       </el-date-picker>
       ~
-      <el-date-picker size="small" v-model="yeartsEnd" value-format="yyyy" style="width:150px"
-        :picker-options="endDatePicker" type="year" placeholder="结束年份">
+      <el-date-picker
+        size="small"
+        v-model="yeartsEnd"
+        value-format="yyyy"
+        style="width: 150px"
+        :picker-options="endDatePicker"
+        type="year"
+        placeholder="结束年份"
+      >
       </el-date-picker>
-      <el-button type="primary" size="small" style="margin-left: 30px" @click="handleQuery()">查询</el-button>
-      <el-button type="primary" size="small" style="margin-left: 20px;margin-bottom: 30px;" @click="handleMerge()"
-        :disabled="multipleSelection.length == 0">合并开票</el-button>
-      <el-table :data="tableDataYear" border ref="multipleTable" @selection-change="handleSelectionChange"
-        style="width: 100%">
-        <el-table-column type="selection" width="55">
-        </el-table-column>
+      <el-button
+        type="primary"
+        size="small"
+        style="margin-left: 30px"
+        @click="handleQuery()"
+        >查询</el-button
+      >
+      <el-button
+        type="primary"
+        size="small"
+        style="margin-left: 20px; margin-bottom: 30px"
+        @click="handleMerge()"
+        :disabled="multipleSelection.length == 0"
+        >合并开票</el-button
+      >
+      <el-table
+        :data="tableDataYear"
+        border
+        ref="multipleTable"
+        @selection-change="handleSelectionChange"
+        style="width: 100%"
+      >
+        <el-table-column type="selection" width="55"> </el-table-column>
         <el-table-column prop="year" label="年份"> </el-table-column>
-        <el-table-column prop="monthNumber" label="月份">
-        </el-table-column>
+        <el-table-column prop="monthNumber" label="月份"> </el-table-column>
         <el-table-column prop="allTotalOtherFeevalue" label="总金额">
         </el-table-column>
         <el-table-column prop="invoicCommissionFeevalue" label="已开票">
@@ -91,50 +180,59 @@
         </el-table-column>
         <el-table-column label="操作">
           <template slot-scope="scope">
-            <el-button @click="handleMonth(scope.row)" type="primary" size="small">当月开票</el-button>
+            <el-button
+              @click="handleMonth(scope.row)"
+              type="primary"
+              size="small"
+              >当月开票</el-button
+            >
           </template>
         </el-table-column>
       </el-table>
       <span slot="footer" class="dialog-footer">
-        <el-button size="small" @click="myDialogVisible = false">取 消</el-button>
+        <el-button size="small" @click="myDialogVisible = false"
+          >取 消</el-button
+        >
       </span>
     </el-dialog>
   </div>
 </template>
 <script>
-import templateTable from '@/components/TemplateTable/index.vue'
-import { mapState } from 'vuex'
-import yearMonthYay from '../../PlatformSettlement/yearMonthYay.vue'
+import templateTable from "@/components/TemplateTable/index.vue";
+import { mapState } from "vuex";
+import yearMonthYay from "../../PlatformSettlement/yearMonthYay.vue";
 
 export default {
   name: "baosi",
   components: { templateTable, yearMonthYay },
-  created() {
-  },
+  created() {},
   computed: {
     ...mapState({
-      perms: state => state.user.perms
-    })
+      perms: (state) => state.user.perms,
+    }),
   },
   data() {
     return {
       myDialogVisible: false,
-      yeartsStart: '',
+      yeartsStart: "",
       tableDataYear: [],
       multipleSelection: [],
-      yeartsEnd: '',
+      yeartsEnd: "",
       startDatePicker: this.beginDate(),
       endDatePicker: this.processDate(),
-      isSingle: '1',
-      year: '',
+      isSingle: "1",
+      year: "",
       searchData: {},
-      options: [{
-        label: "保司开票",
-        value: "0",
-      }, {
-        label: "掌柜开票",
-        value: "1",
-      }],
+      options: [
+        {
+          label: "保司开票",
+          value: "0",
+        },
+        {
+          label: "掌柜开票",
+          value: "1",
+        },
+      ],
       formList: [
         {
           label: "保险公司",
@@ -142,9 +240,9 @@ export default {
           type: "company",
         },
         {
-        label: "合作公司名称",
-        name: "保司机构",
-        type: "slot",
+          label: "合作公司名称",
+          name: "保司机构",
+          type: "slot",
         },
         {
           label: "年月日",
@@ -157,51 +255,53 @@ export default {
           {
             prop: "companyName",
             label: "保险公司名称",
-            type: "text"
+            type: "text",
           },
           {
             prop: "partnerCompaniesName",
             label: "保司机构",
-            type: "text"
+            type: "text",
           },
           {
             prop: "otherFeevalue",
             label: "总跟单费",
-            type: "text"
+            type: "text",
           },
           {
             prop: "allInvoicCommissionFeevalue",
             label: "已开票跟单费",
-            type: "text"
+            type: "text",
           },
           {
             prop: "noInvoicCommissionFeevalue",
             label: "未开票跟单费",
-            type: "text"
+            type: "text",
           },
         ],
         loading: true,
         isPaginationShow: true,
         isShowIndex: true,
         showSummary: true,
-        tableHeight: 'auto',
+        tableHeight: "auto",
         optBtns: [
           {
-            type: 'primary',
-            label: '开票',
+            type: "primary",
+            label: "开票",
             hide: (row) => {
               if (row.otherFeevalue - row.invoicCommissionFeevalue > 0) {
-                return true
+                return true;
               }
             },
-            click: (row, index) => { return this.openBalanceFun(row) },
+            click: (row, index) => {
+              return this.openBalanceFun(row);
+            },
           },
-        ]
+        ],
       },
       tableData: [],
       formData: {},
       InvoicingData: {
-        invoicingMethod: '0'
+        invoicingMethod: "0",
       },
       formDataList: {},
       dialogVisible: false,
@@ -209,86 +309,87 @@ export default {
         pageNum: 1,
         pageSize: 20,
         agreementType: 2,
-        isNotCar: '0',
-        isNotDocumentary: '1'
-
+        isNotCar: "0",
+        isNotDocumentary: "1",
       },
       rules: {
         contractId: [
-          { required: true, message: '请输入开票号', trigger: 'blur' },
+          { required: true, message: "请输入开票号", trigger: "blur" },
         ],
         settlementAmount: [
-          { required: true, message: '请输入开票金额', trigger: 'blur' },
+          { required: true, message: "请输入开票金额", trigger: "blur" },
         ],
         invoicingMethod: [
-          { required: true, message: '请输入开票方式', trigger: 'blur' },
+          { required: true, message: "请输入开票方式", trigger: "blur" },
         ],
       },
-      ztreeNodes:[],
+      ztreeNodes: [],
     };
   },
   created() {
-    this.$api.insCompany.findLeftInsTree( {
+    this.$api.insCompany
+      .findLeftInsTree({
         classname: "",
-        type: '1',
-        }).then((res) => {
-      this.ztreeNodes = res.data;
-    });
+        type: "1",
+      })
+      .then((res) => {
+        this.ztreeNodes = res.data;
+      });
     this.findPage();
   },
   methods: {
-    resetForm() {
-            this.formData={}
-            this.pageData.partnerCompaniesIdList=[]
-            this.$refs.yearMonthYay.clear()
-        },
+    handleResetForm() {
+      this.formData = {};
+      this.pageData.partnerCompaniesIdList = [];
+      this.$refs.yearMonthYay.clear();
+    },
     handleSelectionChange(val) {
       this.multipleSelection = val;
     },
     handleMerge() {
-      this.dialogVisible = true
-      this.isSingle = '2'
+      this.dialogVisible = true;
+      this.isSingle = "2";
       this.InvoicingData = {
-        invoicingMethod: '0'
-      }
+        invoicingMethod: "0",
+      };
     },
     handleMonth(row) {
       this.multipleSelection = [row];
-      this.dialogVisible = true
-      this.isSingle = '1'
+      this.dialogVisible = true;
+      this.isSingle = "1";
       this.InvoicingData = {
-        invoicingMethod: '0'
-      }
+        invoicingMethod: "0",
+      };
     },
     beginDate() {
-      let self = this
+      let self = this;
       return {
         disabledDate(time) {
-          if (self.yeartsEnd !== '') {
-            let fixedTime = new Date(time)
-            return fixedTime.getFullYear() > self.yeartsEnd
+          if (self.yeartsEnd !== "") {
+            let fixedTime = new Date(time);
+            return fixedTime.getFullYear() > self.yeartsEnd;
           }
-        }
-      }
+        },
+      };
     },
     // 提出结束时间必须大于提出开始时间
     processDate() {
-      let self = this
+      let self = this;
       return {
         disabledDate(time) {
-          let fixedTime = new Date(time)
-          return fixedTime.getFullYear() < self.yeartsStart
-        }
-      }
+          let fixedTime = new Date(time);
+          return fixedTime.getFullYear() < self.yeartsStart;
+        },
+      };
     },
     getYearData(val) {
-      this.formData.year = val
+      this.formData.year = val;
     },
     getMonthData(val) {
-      this.formData.month = val
+      this.formData.month = val;
     },
     getDayData(val) {
-      this.formData.day = val
+      this.formData.day = val;
     },
     // 查询
     handleSearchList(data) {
@@ -299,33 +400,31 @@ export default {
       this.tableConfig.loading = true;
       this.$api.task
         .allOtherAmount({ ...this.pageData, ...data, ...this.formData })
-        .then(res => {
+        .then((res) => {
           if (res.code == 200) {
-            this.tableData = res.data ? res.data : []
+            this.tableData = res.data ? res.data : [];
             this.tableConfig.loading = false;
-          }
-          else {
-            this.$message.error(res.msg)
+          } else {
+            this.$message.error(res.msg);
           }
         });
     },
     closdialogVisible() {
       this.dialogVisible = false;
-      this.multipleSelection = []
+      this.multipleSelection = [];
       this.$refs.multipleTable.clearSelection();
-
     },
     myClosdialogVisible() {
       this.myDialogVisible = false;
     },
     handleQuery() {
-      this.otherTimeDetail(this.formDataList)
+      this.otherTimeDetail(this.formDataList);
     },
     // 开票
     openBalanceFun(row) {
-      this.myDialogVisible = true
-      this.otherTimeDetail(row)
-      this.formDataList = row
+      this.myDialogVisible = true;
+      this.otherTimeDetail(row);
+      this.formDataList = row;
     },
     otherTimeDetail(row) {
       let data = {
@@ -335,13 +434,12 @@ export default {
         isNotDocumentary: 1,
         yeartsStart: this.yeartsStart,
         yeartsEnd: this.yeartsEnd,
-      }
-      this.$api.task.otherTimeDetail(data).then(res => {
+      };
+      this.$api.task.otherTimeDetail(data).then((res) => {
         if (res.code == "200") {
-          this.tableDataYear = res.data
-        }
-        else {
-          this.$message.error(res.msg)
+          this.tableDataYear = res.data;
+        } else {
+          this.$message.error(res.msg);
         }
       });
     },
@@ -349,42 +447,41 @@ export default {
       this.$refs[formData].validate((valid) => {
         if (valid) {
           let data = {
-            ...this.formDataList, ...this.InvoicingData, isNotCar: 0, handlingFeesStatus: '1',
+            ...this.formDataList,
+            ...this.InvoicingData,
+            isNotCar: 0,
+            handlingFeesStatus: "1",
             yeartsStart: this.yeartsStart,
             yeartsEnd: this.yeartsEnd,
-            multipleSelection: this.multipleSelection
-          }
-          if (this.isSingle == '2') {
-            this.$api.task.singleInvoic(data).then(res => {
+            multipleSelection: this.multipleSelection,
+          };
+          if (this.isSingle == "2") {
+            this.$api.task.singleInvoic(data).then((res) => {
               if (res.code == "200") {
                 this.$message({
-                  message: res.msg || '操作成功',
-                  type: 'success'
-                })
-                this.dialogVisible = false
-                this.otherTimeDetail(this.formDataList)
-              }
-              else {
-                this.$message.error(res.msg)
+                  message: res.msg || "操作成功",
+                  type: "success",
+                });
+                this.dialogVisible = false;
+                this.otherTimeDetail(this.formDataList);
+              } else {
+                this.$message.error(res.msg);
               }
             });
-          }
-          else {
-            this.$api.task.batchInvoic(data).then(res => {
+          } else {
+            this.$api.task.batchInvoic(data).then((res) => {
               if (res.code == "200") {
                 this.$message({
-                  message: res.msg || '操作成功',
-                  type: 'success'
-                })
-                this.dialogVisible = false
-                this.otherTimeDetail(this.formDataList)
-              }
-              else {
-                this.$message.error(res.msg)
+                  message: res.msg || "操作成功",
+                  type: "success",
+                });
+                this.dialogVisible = false;
+                this.otherTimeDetail(this.formDataList);
+              } else {
+                this.$message.error(res.msg);
               }
             });
           }
-
         } else {
           return false;
         }
@@ -398,13 +495,12 @@ export default {
       this.pageData.pageNum = val;
       this.findPage();
     },
-
-  }
+  },
 };
 </script>
 <style scoped lang="scss">
-  .InvoicedAndSettled>>>.el-table__body-wrapper {
-    overflow-y: auto !important;
-    height: auto !important;
-  }
+.InvoicedAndSettled >>> .el-table__body-wrapper {
+  overflow-y: auto !important;
+  height: auto !important;
+}
 </style>