Ver Fonte

财务管理-费用核对-渠道数据列表更改

lihongxiao há 3 anos atrás
pai
commit
812923892f

+ 9 - 0
src/http/moudules/cost.js

@@ -16,6 +16,15 @@ export const importDataAdd = (data) => {
         data,
     })
 }
+//渠道数据excel导入接口
+export const importData = (data) => {
+    return axios({
+        url: "/api/inv/channelsExternalBillsDetails/importData",
+        method: "post",
+        data,
+    })
+}
+
 export const importDataAdd1 = (data,params) => {
     return axios({
         url: "/api/inv/insExternalBills/importData",

+ 94 - 633
src/views/FinancialManagement/CostVerification/Channel.vue

@@ -1,149 +1,54 @@
 <template>
   <!--布局容器-->
   <div class="container" style="width: 99%; margin-top: 0px">
-    <!-- 顶部查询 -->
-    <el-row class="top">
-      <el-form v-model="queryFrom" label-width="95px" class="form">
-        <el-row>
-          <el-col :span="7">
-            <el-form-item label="导入日期:">
-              <el-date-picker
-                v-model="queryFrom.importTime"
-                size="small"
-                type="datetimerange"
-                range-separator="至"
-                start-placeholder="起导入日期"
-                end-placeholder="止导入日期"
-                value-format="yyyy-MM-dd"
-              ></el-date-picker>
-            </el-form-item>
-          </el-col>
-          <el-col :span="8">
-            <el-form-item label-width="95px">
-              <el-button type="primary" size="small" @click='templateDownload'>模板下载</el-button>
-              <div style="display:inline-block;margin:0 10px">
-                <el-upload
-                  class="upload"
-                  ref="upload"
-                  :show-file-list="false"
-                  :limit="1"
-                  action="#"
-                  :http-request="carfrontChange"
-                  :multiple="false"
-                >
-                  <el-button type="primary" size="small" @click="$refs.upload.clearFiles()">excel导入</el-button>
-                </el-upload>
-              </div>
-              <el-button type="primary" size="small" @click="queryStaffInfo">查询</el-button>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-    </el-row>
-
-    <!-- 表格 -->
-    <el-table
-      size="small"
-      :data="tableData"
-      height="590"
-      border
-      v-loading="loading"
-      highlight-current-row
-      stripe
-      ref="expandTable"
-      :header-cell-style="{ background: '#F2F7FC', fontWeight: '700', color: '#606266' }"
-    >
-      <el-table-column prop="id" label="批次号" align="center">
-        <template slot-scope="scope">
-          <span class="batchStyle" @click="redirectDetail(scope.row)">{{ scope.row.id }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column prop="enterpriseName" label="出单渠道" align="center"></el-table-column>
-      <el-table-column prop="mlifta" label="交强险保费" align="center"></el-table-column>
-      <el-table-column prop="vavt" label="车船税" align="center"></el-table-column>
-      <el-table-column prop="cip" label="商业险保费" align="center"></el-table-column>
-      <el-table-column prop="other" label="其他保费" align="center"></el-table-column>
-      <el-table-column prop="inventoryQuantity" label="清单数量" align="center"></el-table-column>
-      <el-table-column prop="createTime" label="导入日期" align="center"></el-table-column>
-      <el-table-column prop="createBy" label="操作人" align="center"></el-table-column>
-      <el-table-column prop="importStatus" label="导入状态" align="center" width="80">
-        <template slot-scope="scope">
-          <span v-if="scope.row.importStatus == 1" style="color: green;">成功</span>
-          <span v-if="scope.row.importStatus == 0" style="color: red;">失败</span>
-        </template>
-      </el-table-column>
-      <el-table-column prop="错误信息" label="错误信息" align="center">
-        <template slot-scope="scope">
-          <el-popover
-            placement="bottom"
-            v-if="scope.row.importStatus == 0"
-            width="200"
-            trigger="click"
-            :content="scope.row.errorMsg"
-          >
-            <el-button slot="reference" type="primary" size="small">查看</el-button>
-          </el-popover>
-        </template>
-      </el-table-column>
-      <el-table-column label="操作" align="center" min-width="150"  >
-        <template slot-scope="scope">
-          <el-button
-            v-if="scope.row.importStatus == 1"
-            size="mini"
-            type="primary"
-            @click="mateFun(scope.row)"
-          >匹配</el-button>
-          <!-- <el-button
-            v-if="scope.row.importStatus == 1"
-            size="mini"
-            type="primary"
-            @click="modifyFun(scope.row)"
-          >修改</el-button> -->
-          <el-button
-            v-if="scope.row.importStatus == 1"
-            size="mini"
-            type="primary"
-            @click="deleteFun( scope.row)"
-          >删除</el-button>
-          <div style="display: inline-block;">
+    <templateTable :formList="formList" :searchData.sync="searchData" :tableConfig="tableConfig" :btnGroup="btnGroup"
+      :data="tableData" @getList="getList" @handleSearchList="handleSearchList" :pagination="queryBatchFrom">
+      <template slot="excel导入" slot-scope="scope">
+        <div style="display:inline-block;margin:0 5px">
+          <el-upload class="upload" ref="upload" :show-file-list="false" :limit="1" action="#"
+            :http-request="carfrontChange" :multiple="false">
+            <el-button type="primary" size="small" @click="$refs.upload.clearFiles()">excel导入</el-button>
+          </el-upload>
+        </div>
+      </template>
+      <template slot="operate" slot-scope="scope">
+        <!-- <div style="display: inline-block;">
             <el-upload
               class="upload"
               ref="reUpload"
               :show-file-list="false"
+              v-if="scope.row.importStatus == 0"
               action="#"
               :http-request="reCarfrontChange"
               :multiple="false"
             >
               <el-button
-                v-if="scope.row.importStatus == 0"
+              style="margin-right:5px"
                 size="mini"
                 type="primary"
                 @click="reImportFun(scope.row)"
               >重新导入</el-button>
             </el-upload>
-          </div>
-        </template>
-      </el-table-column>
-    </el-table>
-    <!-- 分页功能 -->
-    <div class="block">
-      <el-pagination
-        @size-change="tablePageChange"
-        @current-change="tableCurrentChange"
-        :current-page="queryFrom.pageNum"
-        :page-size="queryFrom.pageSize"
-        :page-sizes="[20, 30, 50, 100]"
-        layout="total, sizes, prev, pager, next, jumper"
-        :total="queryFrom.totalSize"
-      ></el-pagination>
-    </div>
-    <el-dialog
-      v-dialogDrag
-      title="修改"
-      :visible.sync="dialogVisible"
-      width="1200px"
-      @close="closeVisible"
-    >
+          </div> -->
+        <el-button size="mini" type="primary" @click="detailBatchFun(scope.row)">详情</el-button>
+          <!-- <el-button
+              size="mini"
+              type="primary"
+              @click="modifyFun(scope.row)"
+            >修改</el-button> -->
+        <!--   <el-button
+            size="mini"
+            type="primary"
+            @click="deleteFun(scope.row)"
+          >删除</el-button>
+          <el-button
+            size="mini"
+            type="primary"
+            @click="exportNum(scope.row)"
+          >导出</el-button> -->
+      </template>
+    </templateTable>
+    <el-dialog v-dialogDrag title="修改" :visible.sync="dialogVisible" width="1200px" @close="closeVisible">
       <div>
         <el-form :model="formData" label-width="180px">
           <el-row>
@@ -174,12 +79,7 @@
             </el-col>
             <el-col :span="8">
               <el-form-item label="清单数量:">
-                <el-input
-                  clearable
-                  size="small"
-                  placeholder="请输入清单数量"
-                  v-model="formData.inventoryQuantity"
-                ></el-input>
+                <el-input clearable size="small" placeholder="请输入清单数量" v-model="formData.inventoryQuantity"></el-input>
               </el-form-item>
             </el-col>
           </el-row>
@@ -190,68 +90,8 @@
         <el-button size="small" type="primary" @click="comfirmDialog">确 定</el-button>
       </span>
     </el-dialog>
-    <el-dialog
-      v-dialogDrag
-      title="批次详情"
-      :visible.sync="dialogBVatchVisible"
-      width="80%"
-      @close="closeBVatchVisibleVisible"
-    >
-      <div class="detailStyle">
-        <el-row>
-          <el-col :span="4">交强险保费:{{formDetailData.mlifta}}</el-col>
-          <el-col :span="4">车船税:{{ formDetailData.vavt }}</el-col>
-          <el-col :span="4">商业险保费:{{ formDetailData.cip }}</el-col>
-          <el-col :span="4">其他保费:{{ formDetailData.other }}</el-col>
-        </el-row>
-        <!-- <el-row style="margin:20px 0">
-          <el-col :span="4">车船税:{{ formDetailData.vavt }}</el-col>
-          <el-col :span="4">手续费:</el-col>
-          <el-col :span="4">其他保费:{{ formDetailData.other }}</el-col>
-          <el-col :span="4">手续费:</el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="16" style="text-align: center;">合计手续费:</el-col>
-        </el-row> -->
-      </div>
-      <el-table
-        size="small"
-        :data="batchData"
-        border
-        highlight-current-row
-        stripe
-        ref="expandTable"
-        :header-cell-style="{ background: '#F2F7FC', fontWeight: '700', color: '#606266' }"
-      >
-        <template v-for="(item,index) in columns">
-          <el-table-column :prop="item.prop" :label="item.label" :key="index"></el-table-column>
-        </template>
-        <el-table-column label="操作" align="center" min-width="60">
-          <template slot-scope="scope">
-            <el-button size="mini" type="primary" @click="detailBatchFun(scope.row)">详情</el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-      <div class="block">
-        <el-pagination
-          @size-change="tablePageBatchChange"
-          @current-change="tableCurrentBatchChange"
-          :current-page="queryBatchFrom.pageNum"
-          :page-size="queryBatchFrom.pageSize"
-          :page-sizes="[20, 30, 50, 100]"
-          layout="total, sizes, prev, pager, next, jumper"
-          :total="queryBatchFrom.totalSize"
-        ></el-pagination>
-      </div>
-    </el-dialog>
-    <el-dialog
-      v-dialogDrag
-      title="详情"
-      :visible.sync="dialogBVatch"
-      width="60%"
-      @close="closdialogBVatchVisible"
-    >
-    <el-row style="margin-bottom:20px">
+    <el-dialog v-dialogDrag title="详情" :visible.sync="dialogBVatch" width="60%" @close="closdialogBVatchVisible">
+      <el-row style="margin-bottom:20px">
         <el-col :span="6">批次号:{{ formBatchDetailData.batchNum }}</el-col>
         <el-col :span="6">保险公司:{{ formBatchDetailData.insCompany }}</el-col>
         <!-- <el-col :span="8">保单号:{{ formBatchDetailData.policyNum }}</el-col> -->
@@ -269,327 +109,63 @@
         <el-col :span="6">付款日期:{{ formBatchDetailData.payDate }}</el-col>
       </el-row>
     </el-dialog>
-    <!-- 匹配页面 -->
-    <el-dialog
-      v-dialogDrag
-      title=" "
-      :visible.sync="dialogMateVisible"
-      width="60%"
-      @close="closdialogMateVisible"
-    >
-      <div style="margin-bottom:20px">
-        <div class="mate-title">匹配数据</div>
-        <div style="width: 90%;height:1px;background:#ccc"></div>
-      </div>
-      <el-table
-        size="small"
-        :data="mateData"
-        border
-        highlight-current-row
-        stripe
-        ref="expandTable"
-        :header-cell-style="{ background: '#F2F7FC', fontWeight: '700', color: '#606266' }"
-      >
-        <template v-for="(item,index) in columns1">
-          <el-table-column :prop="item.prop" :label="item.label" :key="index"></el-table-column>
-        </template>
-        <el-table-column label="操作" align="center" min-width="100"  >
-          <template slot-scope="scope">
-            <el-button
-              size="mini"
-              type="primary"
-              @click="detailBatchFun(scope.row)"
-            >详情</el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-       <!-- 分页功能 -->
-    <div class="block">
-      <el-pagination
-        @size-change="tablePagematch1Change"
-        @current-change="tableCurrentmatch1Change"
-        :current-page="matchPage1.pageNum"
-        :page-size="matchPage1.pageSize"
-        :page-sizes="[10, 30, 50, 100]"
-        layout="total, sizes, prev, pager, next, jumper"
-        :total="matchPage1.totalSize"
-      ></el-pagination>
-    </div>
-      <div style="margin:20px 0">
-        <div class="mate-title" style="background-color: rgb(134, 27, 0);">未匹配数据</div>
-        <div style="width: 90%;height:1px;background:#ccc"></div>
-      </div>
-      <el-table
-        size="small"
-        :data="Unmatched"
-        border
-        highlight-current-row
-        stripe
-        ref="expandTable"
-        :header-cell-style="{ background: '#F2F7FC', fontWeight: '700', color: '#606266' }"
-      >
-        <template v-for="(item,index) in columns1">
-          <el-table-column :prop="item.prop" :label="item.label" :key="index"></el-table-column>
-        </template>
-        <el-table-column label="未匹配原因" align="center" prop="notMatchMsg"></el-table-column>
-        <el-table-column label="操作" align="center" min-width="100"  >
-          <template slot-scope="scope">
-            <el-button
-              size="mini"
-              type="primary"
-              @click="handleUnmatchedFun(scope.row)"
-            >处理</el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-          <!-- 分页功能 -->
-    <div class="block">
-      <el-pagination
-        @size-change="tablePagematch2Change"
-        @current-change="tableCurrentmatch2Change"
-        :current-page="matchPage2.pageNum"
-        :page-size="matchPage2.pageSize"
-        :page-sizes="[10, 30, 50, 100]"
-        layout="total, sizes, prev, pager, next, jumper"
-        :total="matchPage2.totalSize"
-      ></el-pagination>
-    </div>
-      <span slot="footer" class="dialog-footer">
-        <el-button type="primary" size="small" :disabled='isDisabled' @click="confirmReceipt()">确定领取</el-button>
-      </span>
-    </el-dialog>
-    <el-dialog
-      v-dialogDrag
-      title="详情匹配"
-      :visible.sync="dialogBVatchUpdata"
-      width="55%"
-      @close="closdialogBVatceVisible"
-    >
-      <el-form
-        class="demo-ruleForm"
-        :inline="true"
-        :model="mateform"
-        ref="userform"
-        label-width="160px"
-      >
-      <el-row>
-          <el-col :span="12">
-            <el-form-item label="车牌号(保司):">
-              <el-input :disabled="true" v-model="mateform.plateNum2" size="small"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="车牌号(渠道):">
-              <el-input :disabled="true" v-model="mateform.plateNum1" size="small"></el-input>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="12">
-            <el-form-item label="商业保费(保司):">
-              <el-input :disabled="true" v-model="mateform.cip2" size="small"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="商业保费(渠道):">
-              <el-input  v-model="mateform.cip1" size="small"></el-input>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="12">
-            <el-form-item label="交强保费(保司):">
-              <el-input :disabled="true" v-model="mateform.mlifta2" size="small"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="交强保费(渠道):">
-              <el-input v-model="mateform.mlifta1" size="small"></el-input>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="12">
-            <el-form-item label="车船税保费(保司):">
-              <el-input :disabled="true" v-model="mateform.vavt2" size="small"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="车船税保费(渠道):">
-              <el-input v-model="mateform.vavt1" size="small"></el-input>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="12">
-            <el-form-item label="商业费用(保司):">
-              <el-input :disabled="true" v-model="mateform.cipCost2" size="small"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="商业费用(渠道):">
-              <el-input v-model="mateform.cipCost1" size="small"></el-input>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="12">
-            <el-form-item label="交强费用(保司):">
-              <el-input :disabled="true" v-model="mateform.mliftaCost2" size="small"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="交强费用(渠道):">
-              <el-input v-model="mateform.mliftaCost1" size="small"></el-input>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="12">
-            <el-form-item label="车船税费用(保司):">
-              <el-input :disabled="true" v-model="mateform.vavtCost2" size="small"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="车船税费用(渠道):">
-              <el-input v-model="mateform.vavtCost1" size="small"></el-input>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-      <span slot="footer" class="dialog-footer">
-        <el-button size="small" @click="dialogBVatchUpdata = false">取消修改</el-button>
-        <el-button size="small" type="primary" @click="mateSave()">确定修改</el-button>
-      </span>
-    </el-dialog>
   </div>
 </template>
 <script>
-import {mixin} from "./components/mixins.js"
+import { mixin } from "./components/mixins.js"
+import templateTable from '../../../components/TemplateTable/index.vue'
 
 export default {
   name: "channel",
-  mixins: [ mixin ],
+  mixins: [mixin],
+  components: { templateTable },
   created() {
     this.$api.cost.gainTopList().then(res => {
       if (res.data) {
         this.InsCompanyList = res.data;
       }
     });
-    this.getList();
+    this.getList()
   },
   data() {
     return {
-      mateform: {},
       InsCompany: "",
       InsCompanyList: [],
-      queryFrom: {
-        importTime: "",
-        importStartTime: "",
-        importEndTime: "",
-        pageNum: 1,
-        pageSize: 20,
-        totalSize: 0
-      },
       queryBatchFrom: {
-        pageNum: 1,
-        pageSize: 20,
-        totalSize: 0
-      },
-      matchPage1: {
-        pageNum: 1,
-        pageSize: 10,
-        totalSize: 0
-      },
-      matchPage2: {
         pageNum: 1,
         pageSize: 10,
         totalSize: 0
       },
+      searchData: {},
       batchNum: 0,
-      batchNumId: 0,
-      batchNumDetailId: 0,
-      tableData: [],
-      loading: false,
       formData: {},
-      formDetailData: {},
       formBatchDetailData: {},
       dialogVisible: false,
       dialogBVatchVisible: false,
       dialogBVatchUpdata: false,
-      columns1: [
-        {
-          prop: "plateNum1",
-          label: "车牌号"
-        },
-        {
-          prop: "insured",
-          label: "被保险人"
-        },
-        {
-          prop: "insCoverage",
-          label: "险种"
-        },
-        {
-          prop: "mlifta1",
-          label: "交强险保费"
-        },
-        {
-          prop: "vavt1",
-          label: "车船税"
-        },
-        {
-          prop: "cip1",
-          label: "商业保险费"
-        },
-        // {
-        //   prop: "other",
-        //   label: "其他保费"
-        // },
-        {
-          prop: "payDate",
-          label: "付款日期"
-        }
-      ],
-      batchData: [],
+      tableData: [],
       dialogBVatch: false,
-      dialogMateVisible: false,
-      mateData: [],
-      Unmatched: [],
-      isDisabled:false
     };
   },
   methods: {
-    //列表数据
-    getList() {
-      this.loading = true;
-      this.$api.cost.getQueryPage({ ...this.queryFrom, flag: 2 }).then(res => {
-        if (res.data) {
-          this.tableData = res.data.content;
-          this.queryFrom.pageNum = res.data.pageNum;
-          this.queryFrom.pageSize = res.data.pageSize;
-          this.queryFrom.totalSize = res.data.totalSize;
-          this.loading = false;
-        } else {
-          this.loading = false;
-        }
-      });
-    },
     // 查询
     queryStaffInfo() {
       if (
-        this.queryFrom.importTime == undefined ||
-        this.queryFrom.importTime == null ||
-        this.queryFrom.importTime == ""
+        this.queryBatchFrom.importTime == undefined ||
+        this.queryBatchFrom.importTime == null ||
+        this.queryBatchFrom.importTime == ""
       ) {
-        (this.queryFrom.importStartTime = ""),
-          (this.queryFrom.importEndTime = "");
+        (this.queryBatchFrom.importStartTime = ""),
+          (this.queryBatchFrom.importEndTime = "");
       } else {
-        this.queryFrom.importStartTime = this.queryFrom.importTime[0];
-        this.queryFrom.importEndTime = this.queryFrom.importTime[1];
+        this.queryBatchFrom.importStartTime = this.queryBatchFrom.importTime[0];
+        this.queryBatchFrom.importEndTime = this.queryBatchFrom.importTime[1];
       }
       this.getList();
     },
+    closdialogBVatchVisible() {
+      this.dialogBVatch = false
+    },
     // 修改保存页面
     comfirmDialog() {
       this.$api.cost
@@ -605,17 +181,13 @@ export default {
           }
         });
     },
-    // 修改页面
-    modifyFun(row) {
-      this.dialogVisible = true;
-      this.formData = row;
-    },
+
     // 删除
     deleteFun(row) {
       this.$confirm("确认删除?")
         .then(() => {
-          let flag=2
-          this.$api.cost.getDelete({batchNum:row.id,flag}).then(res => {
+          let flag = 2
+          this.$api.cost.getDelete({ batchNum: row.id, flag }).then(res => {
             if (res.code == 200) {
               this.$message({
                 message: "删除成功",
@@ -625,48 +197,31 @@ export default {
             }
           });
         })
-        .catch(() => {});
+        .catch(() => { });
     },
     closeVisible() {
       this.dialogVisible = false;
     },
-    closeBVatchVisibleVisible() {
-      this.dialogBVatchVisible = false;
-    },
-    closdialogBVatceVisible() {
-      this.dialogBVatchUpdata = false;
-    },
-    closdialogMateVisible(){
-      this.dialogMateVisible = false;
-    },
-    closdialogBVatchVisible(){
-      this.dialogBVatch = false;
-    },
-    templateDownload(){
+
+    templateDownload() {
       let a = document.createElement('a')
       a.href = `${process.env.BASE_URL}/template/finance_channel_model_A.xlsx`;
       a.click();
     },
-    getBachList() {
+    getList(data) {
+      this.tableConfig.loading = true;
       this.$api.cost
         .getchanneQueryPageDetails({
-          batchNum: this.batchNumId,
-          ...this.queryBatchFrom
+          ...this.queryBatchFrom, ...data
         })
         .then(res => {
-          this.batchData = res.data.content;
+          this.tableData = res.data.content;
           this.queryBatchFrom.pageNum = res.data.pageNum;
           this.queryBatchFrom.pageSize = res.data.pageSize;
           this.queryBatchFrom.totalSize = res.data.totalSize;
+          this.tableConfig.loading = false;
         });
     },
-    // 批次详情列表
-    redirectDetail(row) {
-      this.dialogBVatchVisible = true;
-      this.formDetailData = row;
-      this.batchNumId = row.id;
-      this.getBachList();
-    },
 
     // 批次详情查看接口
     detailBatchFun(row) {
@@ -678,119 +233,35 @@ export default {
         }
       });
     },
-    confirmReceipt(){
-      this.$api.cost.receiveBatchNum(this.batchNumDetailId).then(res => {
-        if (res.code == 200) {
-          this.dialogMateVisible=false
-          this.$message({
-              message: "领取成功",
-              type: "success"
-            });
-        }
-      });
-    },
-    handleTableDetail() {
-      this.dialogBVatchVisible = true;
-    },
-    mateSave(){
-      let obj={
-        cip:this.mateform.cip1,
-        mlifta:this.mateform.mlifta1,
-        vavt:this.mateform.vavt1,
-        id:this.mateform.id
+    handleSearchList(data) {
+      if (
+        data.importTime == undefined ||
+        data.importTime == null ||
+        data.importTime == ""
+      ) {
+        (data.importStartTime = ""),
+          (data.importEndTime = "");
+      } else {
+        data.importStartTime = data.importTime[0];
+        data.importEndTime = data.importTime[1];
       }
-      this.$api.cost
-        .getchanneEdit(obj)
-        .then(res => {
-          if (res.code == 200) {
-            this.$message({
-              message: "修改成功",
-              type: "success"
-            });
-            this.dialogBVatchUpdata = false;
-            this.mate2(this.batchNumDetailId)
-          }
-        });
-    },
-    // 匹配页面
-    mate1(batchNum){
-      this.$api.cost.getChannelMatchingIns({batchNum,isMatch:1,...this.matchPage1}).then(res => {
-        if (res.code == 200 && res.data) {
-          this.mateData = res.data.content;
-          this.matchPage1.pageNum=res.data.pageNum
-          this.matchPage1.pageSize=res.data.pageSize
-          this.matchPage1.totalSize=res.data.totalSize
-        }
-      });
-    },
-    mate2(batchNum){
-      this.$api.cost.getChannelMatchingIns({batchNum,isMatch:0,...this.matchPage2}).then(res => {
-        if (res.code == 200 && res.data) {
-          if(res.data.content&&res.data.content.length>0){
-            this.isDisabled=true
-          }
-          else{
-            this.isDisabled=false
-          }
-          this.Unmatched = res.data.content;
-          this.matchPage2.pageNum=res.data.pageNum
-          this.matchPage2.pageSize=res.data.pageSize
-          this.matchPage2.totalSize=res.data.totalSize
-        }
-      });
-    },
-    mateFun(row) {
-      this.dialogMateVisible = true;
-      this.batchNumDetailId=row.id
-      this.mate1(row.id)
-      this.mate2(row.id)
-    },
-    handleUnmatchedFun(row) {
-      this.dialogBVatchUpdata = true;
-      this.mateform=row
-    },
-    tablePageChange(val) {
-      this.queryFrom.pageSize = val;
-      this.getList();
-    },
-    tableCurrentChange(val) {
-      this.queryFrom.pageNum = val;
-      this.getList();
+      this.getList(data)
     },
     tablePageBatchChange(val) {
       this.queryBatchFrom.pageSize = val;
-      this.getBachList();
+      this.getList(val);
     },
     tableCurrentBatchChange(val) {
       this.queryBatchFrom.pageNum = val;
-      this.getBachList();
-    },
-    tablePagematch1Change(val) {
-      this.matchPage1.pageSize = val;
-      this.mate1(this.batchNumDetailId);
-    },
-    tableCurrentmatch1Change(val) {
-      this.matchPage2.pageNum = val;
-      this.mate1(this.batchNumDetailId);
-
-    },
-    tablePagematch2Change(val) {
-      this.matchPage2.pageSize = val;
-      this.mate2(this.batchNumDetailId);
-      
-    },
-    tableCurrentmatch2Change(val) {
-      this.matchPage2.pageNum = val;
-      this.mate2(this.batchNumDetailId);
+      this.getList();
     },
-    uploadImport(file,isId,) {
+    uploadImport(file, isId,) {
       const params = new FormData(); // 声明formData数据类型
       params.append("file", file.file);
-      params.append("flag", "2");
       if (isId) {
         params.append("batchNum", this.batchNum);
       }
-      this.$api.cost.importDataAdd(params).then(res => {
+      this.$api.cost.importData(params).then(res => {
         if (res.code == 200) {
           this.$message({
             message: res.msg,
@@ -801,13 +272,25 @@ export default {
           this.$message.error(res.msg);
         }
       });
+    },
+     // 修改页面
+     modifyFun(row) {
+      this.dialogVisible = true;
+      this.formData = {
+        insCompanyId: row.insCompanyId,
+        mlifta: row.mlifta,
+        vavt: row.vavt,
+        other: row.other,
+        inventoryQuantity: row.inventoryQuantity,
+        id:row.id
+      };
     },
     // excel导入
     carfrontChange(file) {
       this.uploadImport(file);
     },
     reCarfrontChange(file) {
-      this.uploadImport(file,1);
+      this.uploadImport(file, 1);
     },
     // 重新导入
     reImportFun(row) {
@@ -818,27 +301,5 @@ export default {
 </script>
 
 <style scoped>
-.detailStyle {
-  color: #666;
-  font-size: 16px;
-  margin-bottom: 20px;
-}
-
-.batchStyle {
-  cursor: pointer;
-}
-
-.batchStyle:hover {
-  color: #8b0000;
-  text-decoration: underline;
-}
 
-.mate-title {
-  display: inline-block;
-  width: 150px;
-  line-height: 35px;
-  background-color: rgb(105, 186, 15);
-  text-align: center;
-  color: #fff;
-}
 </style>

+ 844 - 0
src/views/FinancialManagement/CostVerification/ChannelOld.vue

@@ -0,0 +1,844 @@
+<template>
+  <!--布局容器-->
+  <div class="container" style="width: 99%; margin-top: 0px">
+    <!-- 顶部查询 -->
+    <el-row class="top">
+      <el-form v-model="queryFrom" label-width="95px" class="form">
+        <el-row>
+          <el-col :span="7">
+            <el-form-item label="导入日期:">
+              <el-date-picker
+                v-model="queryFrom.importTime"
+                size="small"
+                type="datetimerange"
+                range-separator="至"
+                start-placeholder="起导入日期"
+                end-placeholder="止导入日期"
+                value-format="yyyy-MM-dd"
+              ></el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label-width="95px">
+              <el-button type="primary" size="small" @click='templateDownload'>模板下载</el-button>
+              <div style="display:inline-block;margin:0 10px">
+                <el-upload
+                  class="upload"
+                  ref="upload"
+                  :show-file-list="false"
+                  :limit="1"
+                  action="#"
+                  :http-request="carfrontChange"
+                  :multiple="false"
+                >
+                  <el-button type="primary" size="small" @click="$refs.upload.clearFiles()">excel导入</el-button>
+                </el-upload>
+              </div>
+              <el-button type="primary" size="small" @click="queryStaffInfo">查询</el-button>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </el-row>
+
+    <!-- 表格 -->
+    <el-table
+      size="small"
+      :data="tableData"
+      height="590"
+      border
+      v-loading="loading"
+      highlight-current-row
+      stripe
+      ref="expandTable"
+      :header-cell-style="{ background: '#F2F7FC', fontWeight: '700', color: '#606266' }"
+    >
+      <el-table-column prop="id" label="批次号" align="center">
+        <template slot-scope="scope">
+          <span class="batchStyle" @click="redirectDetail(scope.row)">{{ scope.row.id }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="enterpriseName" label="出单渠道" align="center"></el-table-column>
+      <el-table-column prop="mlifta" label="交强险保费" align="center"></el-table-column>
+      <el-table-column prop="vavt" label="车船税" align="center"></el-table-column>
+      <el-table-column prop="cip" label="商业险保费" align="center"></el-table-column>
+      <el-table-column prop="other" label="其他保费" align="center"></el-table-column>
+      <el-table-column prop="inventoryQuantity" label="清单数量" align="center"></el-table-column>
+      <el-table-column prop="createTime" label="导入日期" align="center"></el-table-column>
+      <el-table-column prop="createBy" label="操作人" align="center"></el-table-column>
+      <el-table-column prop="importStatus" label="导入状态" align="center" width="80">
+        <template slot-scope="scope">
+          <span v-if="scope.row.importStatus == 1" style="color: green;">成功</span>
+          <span v-if="scope.row.importStatus == 0" style="color: red;">失败</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="错误信息" label="错误信息" align="center">
+        <template slot-scope="scope">
+          <el-popover
+            placement="bottom"
+            v-if="scope.row.importStatus == 0"
+            width="200"
+            trigger="click"
+            :content="scope.row.errorMsg"
+          >
+            <el-button slot="reference" type="primary" size="small">查看</el-button>
+          </el-popover>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center" min-width="150"  >
+        <template slot-scope="scope">
+          <el-button
+            v-if="scope.row.importStatus == 1"
+            size="mini"
+            type="primary"
+            @click="mateFun(scope.row)"
+          >匹配</el-button>
+          <!-- <el-button
+            v-if="scope.row.importStatus == 1"
+            size="mini"
+            type="primary"
+            @click="modifyFun(scope.row)"
+          >修改</el-button> -->
+          <el-button
+            v-if="scope.row.importStatus == 1"
+            size="mini"
+            type="primary"
+            @click="deleteFun( scope.row)"
+          >删除</el-button>
+          <div style="display: inline-block;">
+            <el-upload
+              class="upload"
+              ref="reUpload"
+              :show-file-list="false"
+              action="#"
+              :http-request="reCarfrontChange"
+              :multiple="false"
+            >
+              <el-button
+                v-if="scope.row.importStatus == 0"
+                size="mini"
+                type="primary"
+                @click="reImportFun(scope.row)"
+              >重新导入</el-button>
+            </el-upload>
+          </div>
+        </template>
+      </el-table-column>
+    </el-table>
+    <!-- 分页功能 -->
+    <div class="block">
+      <el-pagination
+        @size-change="tablePageChange"
+        @current-change="tableCurrentChange"
+        :current-page="queryFrom.pageNum"
+        :page-size="queryFrom.pageSize"
+        :page-sizes="[20, 30, 50, 100]"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="queryFrom.totalSize"
+      ></el-pagination>
+    </div>
+    <el-dialog
+      v-dialogDrag
+      title="修改"
+      :visible.sync="dialogVisible"
+      width="1200px"
+      @close="closeVisible"
+    >
+      <div>
+        <el-form :model="formData" label-width="180px">
+          <el-row>
+            <!-- <el-col :span="8">
+              <el-form-item label="出单渠道:">
+                <el-input clearable size="small" placeholder="请输入出单渠道" v-model="formData.mlifta"></el-input>
+              </el-form-item>
+            </el-col> -->
+            <el-col :span="8">
+              <el-form-item label="交强险保费:">
+                <el-input clearable size="small" placeholder="请输入交强险保费" v-model="formData.mlifta"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="车船税:">
+                <el-input clearable size="small" placeholder="请输入车船税" v-model="formData.vavt"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="商业险保费:">
+                <el-input clearable size="small" placeholder="请输入商业险保费" v-model="formData.cip"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="其他保费:">
+                <el-input clearable size="small" placeholder="请输入其他保费" v-model="formData.other"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="清单数量:">
+                <el-input
+                  clearable
+                  size="small"
+                  placeholder="请输入清单数量"
+                  v-model="formData.inventoryQuantity"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="small" @click="dialogVisible = false">取 消</el-button>
+        <el-button size="small" type="primary" @click="comfirmDialog">确 定</el-button>
+      </span>
+    </el-dialog>
+    <el-dialog
+      v-dialogDrag
+      title="批次详情"
+      :visible.sync="dialogBVatchVisible"
+      width="80%"
+      @close="closeBVatchVisibleVisible"
+    >
+      <div class="detailStyle">
+        <el-row>
+          <el-col :span="4">交强险保费:{{formDetailData.mlifta}}</el-col>
+          <el-col :span="4">车船税:{{ formDetailData.vavt }}</el-col>
+          <el-col :span="4">商业险保费:{{ formDetailData.cip }}</el-col>
+          <el-col :span="4">其他保费:{{ formDetailData.other }}</el-col>
+        </el-row>
+        <!-- <el-row style="margin:20px 0">
+          <el-col :span="4">车船税:{{ formDetailData.vavt }}</el-col>
+          <el-col :span="4">手续费:</el-col>
+          <el-col :span="4">其他保费:{{ formDetailData.other }}</el-col>
+          <el-col :span="4">手续费:</el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="16" style="text-align: center;">合计手续费:</el-col>
+        </el-row> -->
+      </div>
+      <el-table
+        size="small"
+        :data="batchData"
+        border
+        highlight-current-row
+        stripe
+        ref="expandTable"
+        :header-cell-style="{ background: '#F2F7FC', fontWeight: '700', color: '#606266' }"
+      >
+        <template v-for="(item,index) in columns">
+          <el-table-column :prop="item.prop" :label="item.label" :key="index"></el-table-column>
+        </template>
+        <el-table-column label="操作" align="center" min-width="60">
+          <template slot-scope="scope">
+            <el-button size="mini" type="primary" @click="detailBatchFun(scope.row)">详情</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div class="block">
+        <el-pagination
+          @size-change="tablePageBatchChange"
+          @current-change="tableCurrentBatchChange"
+          :current-page="queryBatchFrom.pageNum"
+          :page-size="queryBatchFrom.pageSize"
+          :page-sizes="[20, 30, 50, 100]"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="queryBatchFrom.totalSize"
+        ></el-pagination>
+      </div>
+    </el-dialog>
+    <el-dialog
+      v-dialogDrag
+      title="详情"
+      :visible.sync="dialogBVatch"
+      width="60%"
+      @close="closdialogBVatchVisible"
+    >
+    <el-row style="margin-bottom:20px">
+        <el-col :span="6">批次号:{{ formBatchDetailData.batchNum }}</el-col>
+        <el-col :span="6">保险公司:{{ formBatchDetailData.insCompany }}</el-col>
+        <!-- <el-col :span="8">保单号:{{ formBatchDetailData.policyNum }}</el-col> -->
+        <el-col :span="6">车牌号:{{ formBatchDetailData.plateNum }}</el-col>
+        <el-col :span="6">被保险人:{{ formBatchDetailData.insured }}</el-col>
+      </el-row>
+      <el-row style="margin:20px 0">
+        <el-col :span="6">交强险保费:{{ formBatchDetailData.mlifta }}</el-col>
+        <el-col :span="6">商业险保费:{{ formBatchDetailData.cip }}</el-col>
+        <el-col :span="6">车船税:{{ formBatchDetailData.vavt }}</el-col>
+        <el-col :span="6">其他保费:{{ formBatchDetailData.other }}</el-col>
+      </el-row>
+      <el-row>
+        <el-col :span="6">险种:{{ formBatchDetailData.insCoverage }}</el-col>
+        <el-col :span="6">付款日期:{{ formBatchDetailData.payDate }}</el-col>
+      </el-row>
+    </el-dialog>
+    <!-- 匹配页面 -->
+    <el-dialog
+      v-dialogDrag
+      title=" "
+      :visible.sync="dialogMateVisible"
+      width="60%"
+      @close="closdialogMateVisible"
+    >
+      <div style="margin-bottom:20px">
+        <div class="mate-title">匹配数据</div>
+        <div style="width: 90%;height:1px;background:#ccc"></div>
+      </div>
+      <el-table
+        size="small"
+        :data="mateData"
+        border
+        highlight-current-row
+        stripe
+        ref="expandTable"
+        :header-cell-style="{ background: '#F2F7FC', fontWeight: '700', color: '#606266' }"
+      >
+        <template v-for="(item,index) in columns1">
+          <el-table-column :prop="item.prop" :label="item.label" :key="index"></el-table-column>
+        </template>
+        <el-table-column label="操作" align="center" min-width="100"  >
+          <template slot-scope="scope">
+            <el-button
+              size="mini"
+              type="primary"
+              @click="detailBatchFun(scope.row)"
+            >详情</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+       <!-- 分页功能 -->
+    <div class="block">
+      <el-pagination
+        @size-change="tablePagematch1Change"
+        @current-change="tableCurrentmatch1Change"
+        :current-page="matchPage1.pageNum"
+        :page-size="matchPage1.pageSize"
+        :page-sizes="[10, 30, 50, 100]"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="matchPage1.totalSize"
+      ></el-pagination>
+    </div>
+      <div style="margin:20px 0">
+        <div class="mate-title" style="background-color: rgb(134, 27, 0);">未匹配数据</div>
+        <div style="width: 90%;height:1px;background:#ccc"></div>
+      </div>
+      <el-table
+        size="small"
+        :data="Unmatched"
+        border
+        highlight-current-row
+        stripe
+        ref="expandTable"
+        :header-cell-style="{ background: '#F2F7FC', fontWeight: '700', color: '#606266' }"
+      >
+        <template v-for="(item,index) in columns1">
+          <el-table-column :prop="item.prop" :label="item.label" :key="index"></el-table-column>
+        </template>
+        <el-table-column label="未匹配原因" align="center" prop="notMatchMsg"></el-table-column>
+        <el-table-column label="操作" align="center" min-width="100"  >
+          <template slot-scope="scope">
+            <el-button
+              size="mini"
+              type="primary"
+              @click="handleUnmatchedFun(scope.row)"
+            >处理</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+          <!-- 分页功能 -->
+    <div class="block">
+      <el-pagination
+        @size-change="tablePagematch2Change"
+        @current-change="tableCurrentmatch2Change"
+        :current-page="matchPage2.pageNum"
+        :page-size="matchPage2.pageSize"
+        :page-sizes="[10, 30, 50, 100]"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="matchPage2.totalSize"
+      ></el-pagination>
+    </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button type="primary" size="small" :disabled='isDisabled' @click="confirmReceipt()">确定领取</el-button>
+      </span>
+    </el-dialog>
+    <el-dialog
+      v-dialogDrag
+      title="详情匹配"
+      :visible.sync="dialogBVatchUpdata"
+      width="55%"
+      @close="closdialogBVatceVisible"
+    >
+      <el-form
+        class="demo-ruleForm"
+        :inline="true"
+        :model="mateform"
+        ref="userform"
+        label-width="160px"
+      >
+      <el-row>
+          <el-col :span="12">
+            <el-form-item label="车牌号(保司):">
+              <el-input :disabled="true" v-model="mateform.plateNum2" size="small"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="车牌号(渠道):">
+              <el-input :disabled="true" v-model="mateform.plateNum1" size="small"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="商业保费(保司):">
+              <el-input :disabled="true" v-model="mateform.cip2" size="small"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="商业保费(渠道):">
+              <el-input  v-model="mateform.cip1" size="small"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="交强保费(保司):">
+              <el-input :disabled="true" v-model="mateform.mlifta2" size="small"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="交强保费(渠道):">
+              <el-input v-model="mateform.mlifta1" size="small"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="车船税保费(保司):">
+              <el-input :disabled="true" v-model="mateform.vavt2" size="small"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="车船税保费(渠道):">
+              <el-input v-model="mateform.vavt1" size="small"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="商业费用(保司):">
+              <el-input :disabled="true" v-model="mateform.cipCost2" size="small"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="商业费用(渠道):">
+              <el-input v-model="mateform.cipCost1" size="small"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="交强费用(保司):">
+              <el-input :disabled="true" v-model="mateform.mliftaCost2" size="small"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="交强费用(渠道):">
+              <el-input v-model="mateform.mliftaCost1" size="small"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="车船税费用(保司):">
+              <el-input :disabled="true" v-model="mateform.vavtCost2" size="small"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="车船税费用(渠道):">
+              <el-input v-model="mateform.vavtCost1" size="small"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="small" @click="dialogBVatchUpdata = false">取消修改</el-button>
+        <el-button size="small" type="primary" @click="mateSave()">确定修改</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+<script>
+import {mixin} from "./components/mixins.js"
+
+export default {
+  name: "channel",
+  mixins: [ mixin ],
+  created() {
+    this.$api.cost.gainTopList().then(res => {
+      if (res.data) {
+        this.InsCompanyList = res.data;
+      }
+    });
+    this.getList();
+  },
+  data() {
+    return {
+      mateform: {},
+      InsCompany: "",
+      InsCompanyList: [],
+      queryFrom: {
+        importTime: "",
+        importStartTime: "",
+        importEndTime: "",
+        pageNum: 1,
+        pageSize: 20,
+        totalSize: 0
+      },
+      queryBatchFrom: {
+        pageNum: 1,
+        pageSize: 20,
+        totalSize: 0
+      },
+      matchPage1: {
+        pageNum: 1,
+        pageSize: 10,
+        totalSize: 0
+      },
+      matchPage2: {
+        pageNum: 1,
+        pageSize: 10,
+        totalSize: 0
+      },
+      batchNum: 0,
+      batchNumId: 0,
+      batchNumDetailId: 0,
+      tableData: [],
+      loading: false,
+      formData: {},
+      formDetailData: {},
+      formBatchDetailData: {},
+      dialogVisible: false,
+      dialogBVatchVisible: false,
+      dialogBVatchUpdata: false,
+      columns1: [
+        {
+          prop: "plateNum1",
+          label: "车牌号"
+        },
+        {
+          prop: "insured",
+          label: "被保险人"
+        },
+        {
+          prop: "insCoverage",
+          label: "险种"
+        },
+        {
+          prop: "mlifta1",
+          label: "交强险保费"
+        },
+        {
+          prop: "vavt1",
+          label: "车船税"
+        },
+        {
+          prop: "cip1",
+          label: "商业保险费"
+        },
+        // {
+        //   prop: "other",
+        //   label: "其他保费"
+        // },
+        {
+          prop: "payDate",
+          label: "付款日期"
+        }
+      ],
+      batchData: [],
+      dialogBVatch: false,
+      dialogMateVisible: false,
+      mateData: [],
+      Unmatched: [],
+      isDisabled:false
+    };
+  },
+  methods: {
+    //列表数据
+    getList() {
+      this.loading = true;
+      this.$api.cost.getQueryPage({ ...this.queryFrom, flag: 2 }).then(res => {
+        if (res.data) {
+          this.tableData = res.data.content;
+          this.queryFrom.pageNum = res.data.pageNum;
+          this.queryFrom.pageSize = res.data.pageSize;
+          this.queryFrom.totalSize = res.data.totalSize;
+          this.loading = false;
+        } else {
+          this.loading = false;
+        }
+      });
+    },
+    // 查询
+    queryStaffInfo() {
+      if (
+        this.queryFrom.importTime == undefined ||
+        this.queryFrom.importTime == null ||
+        this.queryFrom.importTime == ""
+      ) {
+        (this.queryFrom.importStartTime = ""),
+          (this.queryFrom.importEndTime = "");
+      } else {
+        this.queryFrom.importStartTime = this.queryFrom.importTime[0];
+        this.queryFrom.importEndTime = this.queryFrom.importTime[1];
+      }
+      this.getList();
+    },
+    // 修改保存页面
+    comfirmDialog() {
+      this.$api.cost
+        .getchanneEdit(this.formData)
+        .then(res => {
+          if (res.code == 200) {
+            this.$message({
+              message: "修改成功",
+              type: "success"
+            });
+            this.dialogVisible = false;
+            this.getList();
+          }
+        });
+    },
+    // 修改页面
+    modifyFun(row) {
+      this.dialogVisible = true;
+      this.formData = row;
+    },
+    // 删除
+    deleteFun(row) {
+      this.$confirm("确认删除?")
+        .then(() => {
+          let flag=2
+          this.$api.cost.getDelete({batchNum:row.id,flag}).then(res => {
+            if (res.code == 200) {
+              this.$message({
+                message: "删除成功",
+                type: "success"
+              });
+              this.getList();
+            }
+          });
+        })
+        .catch(() => {});
+    },
+    closeVisible() {
+      this.dialogVisible = false;
+    },
+    closeBVatchVisibleVisible() {
+      this.dialogBVatchVisible = false;
+    },
+    closdialogBVatceVisible() {
+      this.dialogBVatchUpdata = false;
+    },
+    closdialogMateVisible(){
+      this.dialogMateVisible = false;
+    },
+    closdialogBVatchVisible(){
+      this.dialogBVatch = false;
+    },
+    templateDownload(){
+      let a = document.createElement('a')
+      a.href = `${process.env.BASE_URL}/template/finance_channel_model_A.xlsx`;
+      a.click();
+    },
+    getBachList() {
+      this.$api.cost
+        .getchanneQueryPageDetails({
+          batchNum: this.batchNumId,
+          ...this.queryBatchFrom
+        })
+        .then(res => {
+          this.batchData = res.data.content;
+          this.queryBatchFrom.pageNum = res.data.pageNum;
+          this.queryBatchFrom.pageSize = res.data.pageSize;
+          this.queryBatchFrom.totalSize = res.data.totalSize;
+        });
+    },
+    // 批次详情列表
+    redirectDetail(row) {
+      this.dialogBVatchVisible = true;
+      this.formDetailData = row;
+      this.batchNumId = row.id;
+      this.getBachList();
+    },
+
+    // 批次详情查看接口
+    detailBatchFun(row) {
+      let id = row.id;
+      this.dialogBVatch = true;
+      this.$api.cost.detailschanneById(id).then(res => {
+        if (res.code == 200 && res.data) {
+          this.formBatchDetailData = res.data;
+        }
+      });
+    },
+    confirmReceipt(){
+      this.$api.cost.receiveBatchNum(this.batchNumDetailId).then(res => {
+        if (res.code == 200) {
+          this.dialogMateVisible=false
+          this.$message({
+              message: "领取成功",
+              type: "success"
+            });
+        }
+      });
+    },
+    handleTableDetail() {
+      this.dialogBVatchVisible = true;
+    },
+    mateSave(){
+      let obj={
+        cip:this.mateform.cip1,
+        mlifta:this.mateform.mlifta1,
+        vavt:this.mateform.vavt1,
+        id:this.mateform.id
+      }
+      this.$api.cost
+        .getchanneEdit(obj)
+        .then(res => {
+          if (res.code == 200) {
+            this.$message({
+              message: "修改成功",
+              type: "success"
+            });
+            this.dialogBVatchUpdata = false;
+            this.mate2(this.batchNumDetailId)
+          }
+        });
+    },
+    // 匹配页面
+    mate1(batchNum){
+      this.$api.cost.getChannelMatchingIns({batchNum,isMatch:1,...this.matchPage1}).then(res => {
+        if (res.code == 200 && res.data) {
+          this.mateData = res.data.content;
+          this.matchPage1.pageNum=res.data.pageNum
+          this.matchPage1.pageSize=res.data.pageSize
+          this.matchPage1.totalSize=res.data.totalSize
+        }
+      });
+    },
+    mate2(batchNum){
+      this.$api.cost.getChannelMatchingIns({batchNum,isMatch:0,...this.matchPage2}).then(res => {
+        if (res.code == 200 && res.data) {
+          if(res.data.content&&res.data.content.length>0){
+            this.isDisabled=true
+          }
+          else{
+            this.isDisabled=false
+          }
+          this.Unmatched = res.data.content;
+          this.matchPage2.pageNum=res.data.pageNum
+          this.matchPage2.pageSize=res.data.pageSize
+          this.matchPage2.totalSize=res.data.totalSize
+        }
+      });
+    },
+    mateFun(row) {
+      this.dialogMateVisible = true;
+      this.batchNumDetailId=row.id
+      this.mate1(row.id)
+      this.mate2(row.id)
+    },
+    handleUnmatchedFun(row) {
+      this.dialogBVatchUpdata = true;
+      this.mateform=row
+    },
+    tablePageChange(val) {
+      this.queryFrom.pageSize = val;
+      this.getList();
+    },
+    tableCurrentChange(val) {
+      this.queryFrom.pageNum = val;
+      this.getList();
+    },
+    tablePageBatchChange(val) {
+      this.queryBatchFrom.pageSize = val;
+      this.getBachList();
+    },
+    tableCurrentBatchChange(val) {
+      this.queryBatchFrom.pageNum = val;
+      this.getBachList();
+    },
+    tablePagematch1Change(val) {
+      this.matchPage1.pageSize = val;
+      this.mate1(this.batchNumDetailId);
+    },
+    tableCurrentmatch1Change(val) {
+      this.matchPage2.pageNum = val;
+      this.mate1(this.batchNumDetailId);
+
+    },
+    tablePagematch2Change(val) {
+      this.matchPage2.pageSize = val;
+      this.mate2(this.batchNumDetailId);
+      
+    },
+    tableCurrentmatch2Change(val) {
+      this.matchPage2.pageNum = val;
+      this.mate2(this.batchNumDetailId);
+    },
+    uploadImport(file,isId,) {
+      const params = new FormData(); // 声明formData数据类型
+      params.append("file", file.file);
+      params.append("flag", "2");
+      if (isId) {
+        params.append("batchNum", this.batchNum);
+      }
+      this.$api.cost.importDataAdd(params).then(res => {
+        if (res.code == 200) {
+          this.$message({
+            message: res.msg,
+            type: "success"
+          });
+          this.getList();
+        } else {
+          this.$message.error(res.msg);
+        }
+      });
+    },
+    // excel导入
+    carfrontChange(file) {
+      this.uploadImport(file);
+    },
+    reCarfrontChange(file) {
+      this.uploadImport(file,1);
+    },
+    // 重新导入
+    reImportFun(row) {
+      this.batchNum = row.id;
+    }
+  }
+};
+</script>
+
+<style scoped>
+.detailStyle {
+  color: #666;
+  font-size: 16px;
+  margin-bottom: 20px;
+}
+
+.batchStyle {
+  cursor: pointer;
+}
+
+.batchStyle:hover {
+  color: #8b0000;
+  text-decoration: underline;
+}
+
+.mate-title {
+  display: inline-block;
+  width: 150px;
+  line-height: 35px;
+  background-color: rgb(105, 186, 15);
+  text-align: center;
+  color: #fff;
+}
+</style>

+ 98 - 2
src/views/FinancialManagement/CostVerification/components/mixins.js

@@ -1,4 +1,4 @@
-export const  mixin={
+export const mixin = {
     data() {
         return {
             columns: [
@@ -43,9 +43,105 @@ export const  mixin={
                     label: "付款日期"
                 }
             ],
+            formList: [
+                {
+                    label: "导入日期:",
+                    prop: "importTime",
+                    type: "datePicker",
+                    dateType: 'daterange'
+                },
+                {
+                    label: "车牌号",
+                    prop: "plateNum",
+                    type: 'input'
+                },
+                {
+                    prop: "insCoverage",
+                    label: "险种",
+                    type: 'input',
+                },
+            ],
+            tableConfig: {
+                columns: [
+                    {
+                        prop: "batchNum",
+                        label: "id",
+                        type: 'text',
+                    },
+                    // {
+                    //     prop: "policyNum",
+                    //     label: "保单号"
+                    // },
+                    {
+                        prop: "plateNum",
+                        label: "车牌号",
+                        type: 'text',
+                    },
+                    {
+                        prop: "insured",
+                        label: "被保险人",
+                        type: 'text',
+                    },
+                    {
+                        prop: "insCoverage",
+                        label: "险种",
+                        type: 'text',
+                    },
+                    {
+                        prop: "mlifta",
+                        label: "交强险保费",
+                        type: 'text',
+                    },
+                    {
+                        prop: "vavt",
+                        label: "车船税",
+                        type: 'text',
+                    },
+                    {
+                        prop: "cip",
+                        label: "商业保险费",
+                        type: 'text',
+
+                    },
+                    // {
+                    //     prop: "other",
+                    //     label: "其他保费"
+                    // },
+                    {
+                        prop: "payDate",
+                        label: "付款日期",
+                        type: 'text',
+                    }
+                ],
+                loading: true,
+                operateShow: true,
+                isPaginationShow: true,
+                // operationWidth:'150'
+                // optBtns:[
+                //   {
+                //     type:'primary',
+                //     label:'修改',
+                //     hide:(row) => {
+                //      return row.importStatus == 1?true:false
+                //     },
+                //     click:(row, index) => {return this.modifyFun(row)},
+                //   }
+                // ]
+            },
+            btnGroup: [{
+                name: '模板下载',
+                click: () => { return this.templateDownload() },
+            },
+            {
+                name: 'excel导入',
+                slot: true,
+                // click: () => {return this.$refs.upload.clearFiles()}
+            },
+            ],
+
         }
     },
     methods: {
-       
+
     },
 }