lihongxiao 2 лет назад
Родитель
Сommit
7b24e510c6

+ 6 - 4
src/components/TemplateTable/index.vue

@@ -83,8 +83,8 @@
 
     <slot v-if="custom" show-overflow-tooltip ></slot>
 
-    <el-table :show-summary="tableConfig.showSummary||false" :data="data" border size="small" style="width: 100%" :height="tableConfig.tableHeight ||tableHeight" v-loading="tableConfig.loading"
-      element-loading-text="数据加载中" element-loading-spinner="el-icon-loading" @selection-change="handleSelectionChange"
+    <el-table ref="table" :show-summary="tableConfig.showSummary||false" :data="data" border size="small" style="width: 100%" :height="tableConfig.tableHeight ||tableHeight" v-loading="tableConfig.loading"
+      element-loading-text="数据加载中" element-loading-spinner="el-icon-loading" @selection-change="handleSelectionChange"  @select-all="selectAll"
       :row-style="{ height: '55px' }" :cell-style="{ padding: '0px' }"
       :header-cell-style="{ background: '#F2F7FC', fontWeight: '700', color: '#606266' }" :cell-class-name="rowClass">
       <el-table-column type="selection" :width="tableConfig.selectionWidth || '50'" v-if="tableConfig.isCheckBox"
@@ -317,9 +317,11 @@ export default {
     },
     // 表格多选
     handleSelectionChange(currentRow) {
-      this.$emit('selectionChange', currentRow);
+      this.$emit('selectionChange', currentRow,this.$refs.table);
+    },
+    selectAll(currentRow) {
+      this.$emit('selectAll', currentRow,this.$refs.table);
     },
-
     handleSizeChange(value) {
       this.pagination.pageSize = value;
       this.pagination.pageNum = 1;

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

@@ -1376,3 +1376,39 @@ export const importAsyncQuery = (data) => {
     data
   })
 }
+export const bxImportOther = (data) => {
+  return axios({
+    url: "/fnc/plyFee/bxImportOther",
+    method: "post",
+    data
+  })
+}
+export const ptTotalAmount = (data) => {
+  return axios({
+    url: "/fnc/plyFee/ptTotalAmount",
+    method: "post",
+    data
+  })
+}
+export const bxNoOtherImportData = (data) => {
+  return axios({
+    url: "/fnc/plyFee/bxNoOtherImportData",
+    method: "post",
+    data
+  })
+}
+
+export const noBxImportOther = (data) => {
+  return axios({
+    url: "/fnc/plyFee/noBxImportOther",
+    method: "post",
+    data
+  })
+}
+export const bxOtherImportData = (data) => {
+  return axios({
+    url: "/fnc/plyFee/bxOtherImportData",
+    method: "post",
+    data
+  })
+}

+ 11 - 2
src/views/FinancialManagement/AcountWithdrawal/WithdrawalReview.vue

@@ -115,8 +115,15 @@ export default {
                 })
         },
         handleButton2({ row, index }) {
-            this.$api.task
-                .auditByBankNumber({id:row.id,auditStatus:'2'})
+            this.$prompt('输入驳回原因', '提示', {
+                confirmButtonText: '取消',
+                  cancelButtonText: '确定',
+                  inputPattern: /^.+$/,
+                  distinguishCancelAndClose: true,
+                inputErrorMessage: '输入驳回原因!'
+                }).then(({ value }) => {
+                    this.$api.task
+                .auditByBankNumber({id:row.id,auditStatus:'2',remark : value})
                 .then(res => {
                     if (res.code == 200) {
                         this.findPage()
@@ -129,6 +136,8 @@ export default {
                         this.$message.error(res.msg)
                     }
                 })
+            }) 
+           
         },
     }
 };

+ 371 - 19
src/views/FinancialManagement/CarInsurance/CompanySettlement/CarInsurance/DocumentaryFeesDetail.vue

@@ -145,6 +145,69 @@
     <el-button   size="small" type="primary" @click="onSubmitAdd">保存</el-button>
   </span>
   </el-dialog>
+  <el-dialog  :visible.sync="dialogVisibleradio" width="40%" >
+      <el-upload style="margin-bottom:10px" action="#" class="upload-demo" :limit="1" :auto-upload="false"
+            :on-change="drivinguploadRadio"  ref="upload3" :file-list="fileListRadio">
+            <el-button size="small" type="primary">点击上传</el-button>
+          </el-upload>
+          <p>总金额:{{ tableDataRadio.allAmount }}</p>
+          <el-table
+          :data="tableDataRadio.resultList"
+          border
+          style="width: 100%">
+          <el-table-column
+            prop="licenseno"
+            label="车牌号">
+          </el-table-column>
+          <el-table-column
+            prop="policyno"
+            label="交强保单号">
+          </el-table-column>
+          <el-table-column
+            prop="syPolicyno"
+            label="商业保单号">
+          </el-table-column>
+            <el-table-column
+            prop="jqOtherCostsPremium"
+            label="交强跟单金额">
+          </el-table-column>
+            <el-table-column
+            prop="syOtherCostsPremium"
+            label="商业跟单金额">
+          </el-table-column>
+        </el-table>
+    </el-dialog>
+    <el-dialog  :visible.sync="dialogVisibleprogress" width="25%" >
+      <el-upload style="margin-bottom:10px" action="#" class="upload-demo" :limit="1" :auto-upload="false"
+            :on-change="drivinguploadprogress" :on-progress="handleProgress" ref="upload3" :file-list="fileList">
+            <el-button size="small" type="primary">点击上传</el-button>
+          </el-upload>
+      <el-progress  :percentage="progressPercent" :text-inside="true" :stroke-width="16" status="exception"> </el-progress>
+    </el-dialog>
+    <el-dialog :visible.sync="dialogVisibleBatch" width="45%" :before-close="handleCloseBatch">
+     上传凭证:
+          <el-upload
+                action="#"
+                style="margin-bottom:10px;display:inline-block"
+                :auto-upload="false"
+                accept=".png, .jpg, .jpeg"
+                :show-file-list="false"
+                list-type="picture-card"
+                :on-change="drivinguploadBatchs">
+                <img v-if="fileListBatchImg" :src="fileListBatchImg"  class="avatar">
+                <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+              </el-upload>
+      <templateTable ref="templateTable1" :tableConfig="tableConfigbatch" :data="batchData" @findPage="findPagegbatch"
+        :pagination="pageDataPro" @getList="getListgbatch" @selectionChange="selectionChange" @selectAll="selectAll">
+        <template slot="uploadUrl" slot-scope="scope">
+          <span @click="uploadUrlClick(scope.row.uploadUrl)">{{ scope.row.uploadUrl }}</span>
+        </template>
+      </templateTable>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="small" @click="dialogVisibleBatch = false">取 消</el-button>
+        <el-button size="small" type="primary" @click="handleSumbit()">确 定</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 <script>
@@ -164,6 +227,9 @@ export default {
   },
   data() {
     return {
+      tableDataRadio:{},
+      fileListRadio:[],
+      dialogVisibleradio:false,
       optionProps: {
         //公司下拉列表配置
         checkStrictly: true,
@@ -263,15 +329,27 @@ export default {
         name:'新增',
         click:(row, index) => {return this.newAdd()},
       },
+      {
+          name: '导入',
+          click: (row, index) => { return this.handImport() },
+        },
       {
         name:'导出',
         click:(row, index) => {return this.handExport()},
       },
+      {
+          name: '对账任务',
+          click: (row, index) => { return this.balanceFunPro() },
+        },
       {
         name:'批量修改',
         slot:true,
         // click:(row, index) => {return this.handBatch()},
-      }
+      },
+      {
+        name:'批量修改比例',
+        click:(row, index) => {return this.handBatchratio()},
+      },
     ],
       tableData: [],
       pageData: {
@@ -286,7 +364,7 @@ export default {
         columns: [
           {
             prop: "orderno",
-            label: "订单号(子订单)",
+            label: "子订单号",
             type: "text"
           },
           {
@@ -294,6 +372,16 @@ export default {
             label: "签单日期",
             type: "text"
           },
+          {
+            prop: "jqStartDate",
+            label: "交强起保日期",
+            type: "text"
+          },
+          {
+            prop: "syStartDate",
+            label: "商业起保日期",
+            type: "text"
+          },
           {
             prop: "licenseno",
             label: "车牌",
@@ -301,7 +389,12 @@ export default {
           },
           {
             prop: "insuredName",
-            label: "被保人",
+            label: "被保险人",
+            type: "text"
+          },
+          {
+            prop: "riskcode",
+            label: "险种",
             type: "text"
           },
           {
@@ -311,7 +404,12 @@ export default {
           },
           {
             prop: "partnerCompaniesName",
-            label: "合作公司名称",
+            label: "保司机构",
+            type: "text"
+          },
+          {
+            prop: "agreementName",
+            label: "协议名称",
             type: "text"
           },
           {
@@ -329,29 +427,24 @@ export default {
             label: "交强保费",
             type: "text"
           },
-          {
-            prop: "syPremium",
-            label: "商业保费",
-            type: "text"
-          },
           {
             prop: "jqNoTaxPremium",
             label: "交强不含税保费",
             type: "text"
           },
           {
-            prop: "syNoTaxPremium",
-            label: "商业不含税保费",
+            prop: "taxamount",
+            label: "车船税",
             type: "text"
           },
           {
-            prop: "otherFeevalue",
-            label: "跟单费金额",
+            prop: "syPremium",
+            label: "商业保费",
             type: "text"
           },
           {
-            prop: "otherFeerate",
-            label: "跟单费比例",
+            prop: "syNoTaxPremium",
+            label: "商业不含税保费",
             type: "text"
           },
           {
@@ -374,6 +467,63 @@ export default {
             label: "商业跟单金额",
             type: "text"
           },
+          {
+            prop: "otherFeevalue",
+            label: "跟单费金额",
+            type: "text"
+          },
+          {
+            prop: "createTime",
+            label: "创建日期",
+            type: "text"
+          },
+          {
+            prop: "settlementTime",
+            label: "结算日期",
+            type: "text"
+          },
+          {
+            prop: "settlementUserName",
+            label: "结算人",
+            type: "text"
+          },
+          {
+            prop: "updateUserName",
+            label: "修改人",
+            type: "text"
+          },
+          {
+            prop: "handlingFeesStatus",
+            label: "结算状态",
+            type: "select",
+            options:[
+            {
+              label:'已结算',
+              value:'1'
+            },{
+              label:'未结算',
+              value:'0'
+            },
+          ],
+          },{
+            prop: "settleOtherStatus",
+            label: "对账状态",
+            type: "select",
+            options:[
+            {
+              label:'已对账',
+              value:'1'
+            },{
+              label:'未对账',
+              value:'0'
+            },
+          ],
+          },
+          {
+            prop: "settlementImageId",
+            label: "对账截图",
+            type: "text"
+          },
         ],
         isPaginationShow:true,
         loading: true,
@@ -385,10 +535,67 @@ export default {
             click:(row, index) => {return this.haldUpload(row)},
         },
         ]
-      }
+      },
+      pageDataPro: {
+        pageNum: 1,
+        pageSize: 20,
+      },
+      progressPercent:0,
+      options: [{
+        label: "保司开票",
+        value: "0",
+      }, {
+        label: "掌柜开票",
+        value: "1",
+      }],
+      fileList:[],
+      batchData:[],
+      dialogVisibleBatch:false,
+      dialogVisibleprogress:false,
+      fileListBatchId:'',
+      fileListBatchImg:"",
+      tableConfigbatch: {
+        columns: [
+          {
+            prop: "id",
+            label: "任务id",
+            type: "text"
+          },
+          {
+            prop: "createdAt",
+            label: "开始时间",
+            type: "text"
+          },
+          {
+            prop: "completedAt",
+            label: "完成时间",
+            type: "text"
+          },
+          {
+            prop: "status",
+            label: "状态",
+            type: "text"
+          },
+          {
+            prop: "totalAmount",
+            label: "开票金额",
+            type: "text"
+          },
+          {
+            name: "uploadUrl",
+            label: "导出路径",
+            type: "slot"
+          },
+        ],
+        loading: true,
+        isCheckBox: true,
+        isPaginationShow: true,
+      },
     };
   },
   created() {
+
+    
     this.findPage();
     this.getDicType("InsInsuranceKind"); //险种类型
     this.getDicType("agreementType"); //险种类型
@@ -406,6 +613,137 @@ export default {
     });
   },
   methods: {
+    handleSumbit() {
+    if(!this.selectionList[0].uploadUrl){
+      this.$message.error('请选择有导出路径的数据!')
+      return false
+    }
+    let data = {
+      isNotCar: '0',
+      selectIds: this.selectionList.map(e => e.id),
+      settlementImageId:this.fileListBatchId
+    }
+    this.$api.task.batchInvoicing(data)
+      .then(res => {
+        if (res.code == 200) {
+          this.$message({
+            message: '操作成功' || res.msg,
+            type: 'success'
+          })
+          this.findPage()
+          this.dialogVisibleBatch = false
+        }
+        else {
+          this.$message.error(res.msg)
+        }
+});
+},
+    drivinguploadBatchs(file, fileList){
+      let fileRaw = file.raw;
+      this.fileListBatchImg = window.URL.createObjectURL(fileRaw);
+      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.fileListBatchId=res.data.id
+        }
+        else{
+          this.$message.error(res.msg)
+        }
+      });
+    },
+    handleCloseBatch() {
+      this.dialogVisibleBatch = false
+    },
+    selectAll (selection,ref){
+          ref.clearSelection()
+          return
+    },
+    uploadUrlClick(e) {
+      let url = process.env.BASE_URL +e; // 3.创建一个临时的url指向blob对象
+      let a = document.createElement("a");
+      a.href = url;
+      a.download = "导出文件.xlsx";
+      a.click();
+      window.URL.revokeObjectURL(url);
+    },
+    balanceFunPro() {
+      this.batchData = []
+      this.fileListBatchImg=''
+      this.dialogVisibleBatch = true
+      this.findPagegbatch()
+    },
+    findPagegbatch() {
+      this.tableConfigbatch.loading = true
+      this.$api.task.importAsyncQuery({...this.pageDataPro,handStatus:2})
+        .then(res => {
+          if (res.code == 200) {
+            this.tableConfigbatch.loading = false
+            this.batchData = res.data.content
+            this.pageDataPro.pageNum = res.data.pageNum;
+            this.pageDataPro.pageSize = res.data.pageSize;
+            this.pageDataPro.totalSize = res.data.totalSize;
+          }
+          else {
+            this.tableConfigbatch.loading = false
+            this.$message.error(res.msg)
+          }
+        });
+    },
+    getListgbatch(data) {
+      this.pageDataPro = data
+      this.findPagegbatch()
+    },
+    handleProgress(event) {
+        if (this.progressPercent < 99) {
+            this.progressPercent = parseInt(event.percent)
+        }
+    },
+    drivinguploadprogress(file, fileList) {
+      this.progressPercent = 0
+      const params = new FormData(); // 声明formData数据类型
+      params.append("multipartFile", file.raw);
+      params.append("type", "image");
+      params.append("isNotCar", "0");
+      this.$api.task.bxOtherImportData(params).then(res => {
+        if (res.code == "200") {
+          this.fileList=fileList
+          this.progressPercent =100
+        }
+        else {
+          this.fileList=[]
+          this.progressPercent =0
+          this.$message.error(res.msg)
+        }
+      });
+    },
+    handImport(){
+      this.fileList=[]
+      this.dialogVisibleprogress=true
+      this.progressPercent = 0
+    },
+    handBatchratio(){
+      this.dialogVisibleradio=true
+      this.tableDataRadio={}
+      this.fileListRadio=[]
+    },
+    drivinguploadRadio(file, fileList){
+      this.fileListRadio=[]
+      const params = new FormData(); // 声明formData数据类型
+      params.append("multipartFile", file.raw);
+      params.append("type", "file");
+      params.append("isNotCar", "0");
+      this.$api.task.bxImportOther(params).then(res => {
+        if (res.code == "200") {
+          this.tableDataRadio=res.data
+        }
+        else{
+          this.$message.error(res.msg)
+        }
+      });
+    },
     getDicType(type) {
       this.$api.insCompany.dicType(type).then((res) => {
         if (res.code == 200) {
@@ -441,8 +779,12 @@ export default {
             }
           });
     },
-    selectionChange(val){
-      this.selectionList=val
+    selectionChange(val,ref) {
+      if(val.length > 1){
+          const del_row = val.shift()
+          ref.toggleRowSelection(del_row,false) //设置这一行取消选中
+        }
+    this.selectionList = val;      
     },
     drivingupload(file, fileList){
       this.fileList=[]
@@ -558,6 +900,7 @@ export default {
           }
         });
     },
+  
     handExport(){
       if( this.$refs.templateTable.searchDataClone){
         let signDateStart=''
@@ -590,5 +933,14 @@ export default {
 };
 </script>
     
-<style scoped></style>
+<style scoped>
+.avatar {
+  border: 1px dashed #d9d9d9;
+  padding: 5px;
+  border-radius: 6px;
+  width: 135px;
+  height: 135px;
+  display: block;
+}
+</style>
     

+ 1 - 1
src/views/FinancialManagement/CarInsurance/CompanySettlement/CarInsurance/DocumentaryFeesSettled.vue

@@ -116,7 +116,7 @@ export default {
             type: "text"
           },
           {
-            prop: "settlementAmount",
+            prop: "expendAmount",
             label: "进帐金额",
             type: "text"
           },

+ 164 - 86
src/views/FinancialManagement/CarInsurance/CompanySettlement/CarInsurance/HandlingFees.vue

@@ -12,6 +12,7 @@
           </el-option>
         </el-select>
       </template> -->
+
       <template slot="保司机构">
         <el-cascader v-model="pageData.partnerCompaniesIdList" size="small" :show-all-levels="false" ize="small"
           :options="ztreeNodes" :props="optionProps" clearable filterable></el-cascader>
@@ -70,10 +71,10 @@
         <el-button size="small" type="primary" @click="onSubmit">保存</el-button>
       </span>
     </el-dialog>
-    <el-dialog :visible.sync="dialogVisibleBatch" width="35%" :before-close="handleCloseBatch">
-      <el-form :model="InvoicingData" :rules="rules" ref="InvoicingData" size="small" label-width="90px">
+    <el-dialog :visible.sync="dialogVisibleBatch" width="45%" :before-close="handleCloseBatch">
+      <el-form :model="InvoicingData" :rules="rules" ref="InvoicingData" size="small" label-width="100px">
         <el-row>
-          <el-col :span="10">
+          <el-col :span="8">
             <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">
@@ -81,50 +82,27 @@
               </el-select>
             </el-form-item>
           </el-col>
-          <el-col :span="10">
+          <el-col :span="8">
             <el-form-item label="税点:" prop="taxPoints">
               <el-input v-model="InvoicingData.taxPoints"></el-input>
             </el-form-item>
           </el-col>
-          <el-col :span="10" v-if="InvoicingData.invoicingMethod == '1'">
+          <el-col :span="8" v-if="InvoicingData.invoicingMethod == '1'">
             <el-form-item label="开票号:" prop="invoicId">
               <el-input v-model="InvoicingData.invoicId"></el-input>
             </el-form-item>
           </el-col>
-          <el-col :span="10">
-            <el-form-item label="总手续费:">
-              <span> {{ batchData.totalAmount }}</span>
-            </el-form-item>
-          </el-col>
-          <el-col :span="10">
-            <el-form-item label="附加原因:">
-              <span> {{ batchData.reason }}</span>
-            </el-form-item>
-          </el-col>
-          <el-col :span="24">
-            <el-form-item label="" label-width="20px">
-              <el-upload style="margin-top:20px" action="#" class="upload-demo" :limit="1" :auto-upload="false"
-                :on-change="drivingupload" ref="upload3" :file-list="fileList">
-                <el-button size="small" type="primary">点击上传</el-button>
-              </el-upload>
-            </el-form-item>
-          </el-col>
-
         </el-row>
       </el-form>
-      <!-- <p >开票号 :<el-input style="width: 200px;" v-model="invoicId" placeholder="请输入开票号"></el-input></p> -->
-
-      <el-table v-if="batchData.resultList" border height="250" :data="batchData.resultList" style="width: 100%">
-        <el-table-column prop="licenseno" label="车牌号">
-        </el-table-column>
-        <el-table-column prop="policyno" label="交强保单号">
-        </el-table-column>
-        <el-table-column label="商业保单号" prop="syPolicyno">
-        </el-table-column>
-      </el-table>
+      <templateTable ref="templateTable1" :tableConfig="tableConfigbatch" :data="batchData" @findPage="findPagegbatch"
+        :pagination="pageDataPro" @getList="getListgbatch" @selectionChange="selectionChange" @selectAll="selectAll">
+        <template slot="uploadUrl" slot-scope="scope">
+          <span @click="uploadUrlClick(scope.row.uploadUrl)">{{ scope.row.uploadUrl }}</span>
+        </template>
+      </templateTable>
       <span slot="footer" class="dialog-footer">
         <el-button size="small" @click="dialogVisibleBatch = false">取 消</el-button>
-        <el-button size="small" type="primary" @click="handleSumbit()">确 定</el-button>
+        <el-button size="small" type="primary" @click="handleSumbit('InvoicingData')">确 定</el-button>
       </span>
     </el-dialog>
     <el-dialog title="新增" :visible.sync="dialogVisibleAdd" width="55%" :before-close="handleCloseadd">
@@ -228,6 +206,14 @@
         <el-button size="small" type="primary" @click="onSubmitAdd">保存</el-button>
       </span>
     </el-dialog>
+    <el-dialog  :visible.sync="dialogVisibleprogress" width="25%" >
+      <el-upload style="margin-bottom:10px" action="#" class="upload-demo" :limit="1" :auto-upload="false"
+            :on-change="drivingupload" :on-progress="handleProgress" ref="upload3" :file-list="fileList">
+            <el-button size="small" type="primary">点击上传</el-button>
+          </el-upload>
+      <el-progress  :percentage="progressPercent" :text-inside="true" :stroke-width="16" status="exception"> </el-progress>
+    </el-dialog>
+
   </div>
 </template>
 <script>
@@ -247,6 +233,9 @@ export default {
   },
   data() {
     return {
+      fileList:[],
+      progressPercent:0,
+      dialogVisibleprogress:false,
       InsInsuranceKindoptions: [],
       ztreeNodes: [],
       optionProps: {
@@ -277,11 +266,11 @@ export default {
         label: "掌柜开票",
         value: "1",
       }],
-      fileList: [],
+      selectionList: [],
       formDataList: {},
       dialogVisible: false,
       formDataId: '',
-      batchData: {},
+      batchData: [],
       moneyList: {},
       searchData: {},
       formList: [
@@ -540,19 +529,60 @@ export default {
           // }
         ]
       },
+      tableConfigbatch: {
+        columns: [
+          {
+            prop: "id",
+            label: "任务id",
+            type: "text"
+          },
+          {
+            prop: "createdAt",
+            label: "开始时间",
+            type: "text"
+          },
+          {
+            prop: "completedAt",
+            label: "完成时间",
+            type: "text"
+          },
+          {
+            prop: "status",
+            label: "状态",
+            type: "text"
+          },
+          {
+            prop: "totalAmount",
+            label: "开票金额",
+            type: "text"
+          },
+          {
+            name: "uploadUrl",
+            label: "导出路径",
+            type: "slot"
+          },
+        ],
+        loading: true,
+        isCheckBox: true,
+        isPaginationShow: true,
+      },
       btnGroup: [
         {
           name: '新增',
           click: (row, index) => { return this.newAdd() },
         },
         {
-          name: '批量开票',
+          name: '任务列表',
           click: (row, index) => { return this.balanceFunPro() },
         },
         {
           name: '模板下载',
           click: (row, index) => { return this.templateDownload() },
         },
+        {
+          name: '导入',
+          click: (row, index) => { return this.handImport() },
+        },
         {
           name: '导出',
           click: (row, index) => { return this.handExport() },
@@ -574,14 +604,14 @@ export default {
       },
       formData: {},
       rules: {
-        voucherNumber: [
-          { required: true, message: '请输入凭证号', trigger: 'blur' },
+        invoicingMethod: [
+          { required: true, message: '请选择开票方式', trigger: 'chang' },
         ],
-        contractId: [
-          { required: true, message: '请输入合同号', trigger: 'blur' },
+        taxPoints: [
+          { required: true, message: '请输入税点', trigger: 'blur' },
         ],
-        contractFileId: [
-          { required: true, message: '请上传合同', trigger: 'blur' },
+        invoicId: [
+          { required: true, message: '请输入开票号', trigger: 'blur' },
         ],
       },
       dockingPersonOption: []
@@ -620,8 +650,8 @@ export default {
     });
   },
   methods: {
-      //下拉数据匹配
-      selectDataMatching(files, name, data) {
+    //下拉数据匹配
+    selectDataMatching(files, name, data) {
       files.forEach(filed => {
         if (filed.prop == name) {
           filed.options = data;
@@ -671,8 +701,8 @@ export default {
       let data = {
         isNotCar: 0,
         isNotDocumentary: 0,
-        companyName:this.formDataAdd.companyId? this.InsCompanyList.find(val => val.id == this.formDataAdd.companyId).name:'',
-        partnerCompaniesName:this.formDataAdd.partnerCompaniesId? this.InsCompanyList.find(val => val.id == this.formDataAdd.partnerCompaniesId).name:'',
+        companyName: this.formDataAdd.companyId ? this.InsCompanyList.find(val => val.id == this.formDataAdd.companyId).name : '',
+        partnerCompaniesName: this.formDataAdd.partnerCompaniesId ? this.InsCompanyList.find(val => val.id == this.formDataAdd.partnerCompaniesId).name : '',
       }
       this.$api.task.fncplyFeeInsert({ ...this.formDataAdd, ...data })
         .then(res => {
@@ -689,48 +719,65 @@ export default {
           }
         });
     },
+    handImport(){
+      this.fileList=[]
+      this.dialogVisibleprogress=true
+      this.progressPercent = 0
+    },
+    handleProgress(event) {
+        if (this.progressPercent < 99) {
+            this.progressPercent = parseInt(event.percent)
+        }
+    },
     drivingupload(file, fileList) {
-      this.fileList = []
+      this.progressPercent = 0
       const params = new FormData(); // 声明formData数据类型
       params.append("multipartFile", file.raw);
       params.append("type", "image");
       params.append("isNotCar", "0");
       this.$api.task.bxImportData(params).then(res => {
         if (res.code == "200") {
-          this.batchData = res.data
-          this.fileList = fileList
+          this.fileList=fileList
+          this.progressPercent =100
         }
         else {
-          this.fileList = []
+          this.fileList=[]
+          this.progressPercent =0
           this.$message.error(res.msg)
         }
       });
     },
-    handleSumbit() {
-      let data = {
-        ...this.InvoicingData,
-        totalAmount: this.batchData.totalAmount,
-        agreementId: this.batchData.agreementId,
-        partnerCompaniesId: this.batchData.partnerCompaniesId,
-        companyId: this.batchData.companyId,
-        isNotCar: '0',
-        ids: this.batchData.ids,
+    handleSumbit(formName) {
 
-      }
-      this.$api.task.batchInvoicing(data)
-        .then(res => {
-          if (res.code == 200) {
-            this.$message({
-              message: '批量开票成功' || res.msg,
-              type: 'success'
-            })
-            this.findPage()
-            this.dialogVisibleBatch = false
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+          if(!this.selectionList[0].uploadUrl){
+            this.$message.error('请选择有导出路径的数据!')
+            return false
           }
-          else {
-            this.$message.error(res.msg)
+          let data = {
+            ...this.InvoicingData,
+            isNotCar: '0',
+            selectIds: this.selectionList.map(e => e.id),
           }
-        });
+          this.$api.task.batchInvoicing(data)
+            .then(res => {
+              if (res.code == 200) {
+                this.$message({
+                  message: '操作成功' || res.msg,
+                  type: 'success'
+                })
+                this.findPage()
+                this.dialogVisibleBatch = false
+              }
+              else {
+                this.$message.error(res.msg)
+              }
+            });
+        } else {
+          return false;
+        }
+      });
     },
     handleCloseBatch() {
       this.dialogVisibleBatch = false
@@ -802,8 +849,7 @@ export default {
     getList(data) {
       this.findPage(data)
     },
-    // 结算
-    balanceFun(row) {
+    handExport(){
 
     },
     tablePageChange(val) {
@@ -817,6 +863,14 @@ export default {
     handExport() {
       this.assembly('bxHandlingExcel', 1)
     },
+    uploadUrlClick(e) {
+      let url = process.env.BASE_URL +e; // 3.创建一个临时的url指向blob对象
+      let a = document.createElement("a");
+      a.href = url;
+      a.download = "导出文件.xlsx";
+      a.click();
+      window.URL.revokeObjectURL(url);
+    },
     assembly(api, type) {
       if (this.$refs.templateTable.searchDataClone) {
         let signDateStart = ''
@@ -854,18 +908,42 @@ export default {
     },
     balanceFunPro() {
       // this.assembly('batchInvoicing',2)
-      this.fileList = []
-      this.batchData = {}
+      this.batchData = []
       this.InvoicingData = {}
-      // this.$api.task.importAsyncQuery(this.pageDataPro)
-      //   .then(res => {
-      //     if (res.code == 200) {
-      //     }
-      //     else {
-      //       this.$message.error(res.msg)
-      //     }
-      //   });
       this.dialogVisibleBatch = true
+      this.findPagegbatch()
+    },
+    selectAll (selection,ref){
+          ref.clearSelection()
+          return
+    },
+    selectionChange(val,ref) {
+      if(val.length > 1){
+          const del_row = val.shift()
+          ref.toggleRowSelection(del_row,false) //设置这一行取消选中
+        }
+    this.selectionList = val;      
+    },
+    findPagegbatch() {
+      this.tableConfigbatch.loading = true
+      this.$api.task.importAsyncQuery({...this.pageDataPro,handStatus:0})
+        .then(res => {
+          if (res.code == 200) {
+            this.tableConfigbatch.loading = false
+            this.batchData = res.data.content
+            this.pageDataPro.pageNum = res.data.pageNum;
+            this.pageDataPro.pageSize = res.data.pageSize;
+            this.pageDataPro.totalSize = res.data.totalSize;
+          }
+          else {
+            this.tableConfigbatch.loading = false
+            this.$message.error(res.msg)
+          }
+        });
+    },
+    getListgbatch(data) {
+      this.pageDataPro = data
+      this.findPagegbatch()
     },
     templateDownload() {
       let a = document.createElement('a')

+ 350 - 13
src/views/FinancialManagement/CarInsurance/CompanySettlement/NoCarInsurance/DocumentaryFeesDetail.vue

@@ -114,6 +114,68 @@
     <el-button   size="small" type="primary" @click="onSubmitAdd">保存</el-button>
   </span>
   </el-dialog>
+  <el-dialog  :visible.sync="dialogVisibleradio" width="40%" >
+      <el-upload style="margin-bottom:10px" action="#" class="upload-demo" :limit="1" :auto-upload="false"
+            :on-change="drivinguploadRadio"  ref="upload3" :file-list="fileListRadio">
+            <el-button size="small" type="primary">点击上传</el-button>
+          </el-upload>
+          <p>总金额:{{ tableDataRadio.allAmount }}</p>
+          <el-table
+          :data="tableDataRadio.resultList"
+          border
+          style="width: 100%">
+          <el-table-column
+            prop="licenseno"
+            label="车牌号">
+          </el-table-column>
+          <el-table-column
+            prop="noPolicyno"
+            label="非车保单号">
+          </el-table-column>
+          <el-table-column
+            prop="noOtherCostsPremium"
+            label="非车跟单金额">
+          </el-table-column>
+            <el-table-column
+            prop="otherFeevalue"
+            label="跟单金额">
+          </el-table-column>
+            <el-table-column
+            prop="otherFeerate"
+            label="跟单比例">
+          </el-table-column>
+        </el-table>
+    </el-dialog>
+    <el-dialog  :visible.sync="dialogVisibleprogress" width="25%" >
+      <el-upload style="margin-bottom:10px" action="#" class="upload-demo" :limit="1" :auto-upload="false"
+            :on-change="drivinguploadprogress" :on-progress="handleProgress" ref="upload3" :file-list="fileList">
+            <el-button size="small" type="primary">点击上传</el-button>
+          </el-upload>
+      <el-progress  :percentage="progressPercent" :text-inside="true" :stroke-width="16" status="exception"> </el-progress>
+    </el-dialog>
+    <el-dialog :visible.sync="dialogVisibleBatch" width="45%" :before-close="handleCloseBatch">
+      上传凭证:<el-upload
+                action="#"
+                style="margin-bottom:10px;display:inline-block"
+                :auto-upload="false"
+                accept=".png, .jpg, .jpeg"
+                :show-file-list="false"
+                list-type="picture-card"
+                :on-change="drivinguploadBatchs">
+                <img v-if="fileListBatchImg" :src="fileListBatchImg"  class="avatar">
+                <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+              </el-upload>
+      <templateTable ref="templateTable1" :tableConfig="tableConfigbatch" :data="batchData" @findPage="findPagegbatch"
+        :pagination="pageDataPro" @getList="getListgbatch" @selectionChange="selectionChange" @selectAll="selectAll">
+        <template slot="uploadUrl" slot-scope="scope">
+          <span @click="uploadUrlClick(scope.row.uploadUrl)">{{ scope.row.uploadUrl }}</span>
+        </template>
+      </templateTable>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="small" @click="dialogVisibleBatch = false">取 消</el-button>
+        <el-button size="small" type="primary" @click="handleSumbit()">确 定</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 <script>
@@ -133,6 +195,10 @@ export default {
   },
   data() {
     return {
+      fileListBatchId:'',
+      tableDataRadio:{},
+      fileListRadio:[],
+      dialogVisibleradio:false,
       ztreeNodes: [],
       InsInsuranceKindoptions: [],
       optionProps: {
@@ -149,6 +215,7 @@ export default {
       selectionList:[],
       year: '',
       searchData: {},
+      fileListBatchImg:'',
       dialogVisible:false,
       formDataId:'',
       formDataList:{},
@@ -237,15 +304,27 @@ export default {
         name:'新增',
         click:(row, index) => {return this.newAdd()},
       },
+      {
+          name: '导入',
+          click: (row, index) => { return this.handImport() },
+        },
       {
         name:'导出',
         click:(row, index) => {return this.handExport()},
       },
+      {
+          name: '对账任务',
+          click: (row, index) => { return this.balanceFunPro() },
+        },
       {
         name:'批量修改',
         slot:true,
         // click:(row, index) => {return this.handBatch()},
-      }
+      },
+      {
+        name:'批量修改比例',
+        click:(row, index) => {return this.handBatchratio()},
+      },
     ],
       tableData: [],
       pageData: {
@@ -260,7 +339,7 @@ export default {
         columns: [
           {
             prop: "orderno",
-            label: "订单号(子订单)",
+            label: "子订单号",
             type: "text"
           },
           {
@@ -275,7 +354,12 @@ export default {
           },
           {
             prop: "insuredName",
-            label: "被保人",
+            label: "被保险人",
+            type: "text"
+          },
+          {
+            prop: "riskcode",
+            label: "险种",
             type: "text"
           },
           {
@@ -285,7 +369,12 @@ export default {
           },
           {
             prop: "partnerCompaniesName",
-            label: "合作公司名称",
+            label: "保司机构",
+            type: "text"
+          },
+          {
+            prop: "agreementName",
+            label: "协议名称",
             type: "text"
           },
           {
@@ -304,13 +393,65 @@ export default {
             type: "text"
           },
           {
-            prop: "otherFeevalue",
-            label: "跟单费金额",
+            prop: "noOtherCostsProportion",
+            label: "非车跟单费比例",
             type: "text"
           },
           {
-            prop: "otherFeerate",
-            label: "跟单费比例",
+            prop: "noSuperviseCostsPremiums",
+            label: "非车跟单费金额",
+            type: "text"
+          },
+          {
+            prop: "createTime",
+            label: "创建日期",
+            type: "text"
+          },
+          {
+            prop: "settlementTime",
+            label: "结算日期",
+            type: "text"
+          },
+          {
+            prop: "settlementUserName",
+            label: "结算人",
+            type: "text"
+          },
+          {
+            prop: "updateUserName",
+            label: "修改人",
+            type: "text"
+          },
+          {
+            prop: "handlingFeesStatus",
+            label: "结算状态",
+            type: "select",
+            options:[
+            {
+              label:'已结算',
+              value:'1'
+            },{
+              label:'未结算',
+              value:'0'
+            },
+          ],
+          },{
+            prop: "settleOtherStatus",
+            label: "对账状态",
+            type: "select",
+            options:[
+            {
+              label:'已对账',
+              value:'1'
+            },{
+              label:'未对账',
+              value:'0'
+            },
+          ],
+          },
+          {
+            prop: "settlementImageId",
+            label: "对账截图",
             type: "text"
           },
         ],
@@ -323,7 +464,60 @@ export default {
             click:(row, index) => {return this.haldUpload(row)},
         },
         ]
-      } 
+      },
+      fileList:[],
+      dialogVisibleprogress:false,
+      batchData:[],
+      dialogVisibleBatch:false,
+      tableConfigbatch: {
+        columns: [
+          {
+            prop: "id",
+            label: "任务id",
+            type: "text"
+          },
+          {
+            prop: "createdAt",
+            label: "开始时间",
+            type: "text"
+          },
+          {
+            prop: "completedAt",
+            label: "完成时间",
+            type: "text"
+          },
+          {
+            prop: "status",
+            label: "状态",
+            type: "text"
+          },
+          {
+            prop: "totalAmount",
+            label: "开票金额",
+            type: "text"
+          },
+          {
+            name: "uploadUrl",
+            label: "导出路径",
+            type: "slot"
+          },
+        ],
+        loading: true,
+        isCheckBox: true,
+        isPaginationShow: true,
+      },
+      pageDataPro: {
+        pageNum: 1,
+        pageSize: 20,
+      },
+      progressPercent:0,
+      options: [{
+        label: "保司开票",
+        value: "0",
+      }, {
+        label: "掌柜开票",
+        value: "1",
+      }],
     };
   },
   created() {
@@ -347,6 +541,133 @@ export default {
     });
   },
   methods: {
+    handleSumbit() {
+    if(!this.selectionList[0].uploadUrl){
+      this.$message.error('请选择有导出路径的数据!')
+      return false
+    }
+    let data = {
+      isNotCar: '1',
+      selectIds: this.selectionList.map(e => e.id),
+      settlementImageId:this.fileListBatchId
+    }
+    this.$api.task.batchInvoicing(data)
+      .then(res => {
+        if (res.code == 200) {
+          this.$message({
+            message: '操作成功' || res.msg,
+            type: 'success'
+          })
+          this.findPage()
+          this.dialogVisibleBatch = false
+        }
+        else {
+          this.$message.error(res.msg)
+        }
+});
+},
+drivinguploadBatchs(file, fileList){
+      let fileRaw = file.raw;
+      this.fileListBatchImg = window.URL.createObjectURL(fileRaw);
+      const params = new FormData(); // 声明formData数据类型
+      params.append("multipartFile", file.raw);
+      params.append("type", "image");
+      params.append("isNotCar", "1");
+      this.$api.letter.uploadFile(params).then(res => {
+        if (res.code == "200") {
+          this.fileListBatchId=res.data.id
+        }
+        else{
+          this.$message.error(res.msg)
+        }
+      });
+    },
+    handleCloseBatch() {
+      this.dialogVisibleBatch = false
+    },
+    uploadUrlClick(e) {
+      let url = process.env.BASE_URL +e; // 3.创建一个临时的url指向blob对象
+      let a = document.createElement("a");
+      a.href = url;
+      a.download = "导出文件.xlsx";
+      a.click();
+      window.URL.revokeObjectURL(url);
+    },
+    balanceFunPro() {
+      this.batchData = []
+      this.fileListBatchImg=''
+      this.dialogVisibleBatch = true
+      this.findPagegbatch()
+    },
+    findPagegbatch() {
+      this.tableConfigbatch.loading = true
+      this.$api.task.importAsyncQuery({...this.pageDataPro,handStatus:3})
+        .then(res => {
+          if (res.code == 200) {
+            this.tableConfigbatch.loading = false
+            this.batchData = res.data.content
+            this.pageDataPro.pageNum = res.data.pageNum;
+            this.pageDataPro.pageSize = res.data.pageSize;
+            this.pageDataPro.totalSize = res.data.totalSize;
+          }
+          else {
+            this.tableConfigbatch.loading = false
+            this.$message.error(res.msg)
+          }
+        });
+    },
+    getListgbatch(data) {
+      this.pageDataPro = data
+      this.findPagegbatch()
+    },
+    handleProgress(event) {
+        if (this.progressPercent < 99) {
+            this.progressPercent = parseInt(event.percent)
+        }
+    },
+    drivinguploadprogress(file, fileList) {
+      this.progressPercent = 0
+      const params = new FormData(); // 声明formData数据类型
+      params.append("multipartFile", file.raw);
+      params.append("type", "image");
+      params.append("isNotCar", "1");
+      this.$api.task.bxNoOtherImportData(params).then(res => {
+        if (res.code == "200") {
+          this.fileList=fileList
+          this.progressPercent =100
+        }
+        else {
+          this.fileList=[]
+          this.progressPercent =0
+          this.$message.error(res.msg)
+        }
+      });
+    },
+    handImport(){
+      this.fileList=[]
+      this.dialogVisibleprogress=true
+      this.progressPercent = 0
+    },
+    handBatchratio(){
+      this.dialogVisibleradio=true
+      this.fileListRadio=[]
+      this.tableDataRadio={}
+    },
+    drivinguploadRadio(file, fileList){
+      this.fileListRadio=fileList
+      const params = new FormData(); // 声明formData数据类型
+      params.append("multipartFile", file.raw);
+      params.append("type", "file");
+      params.append("isNotCar", "1");
+      this.$api.task.bxImportOther(params).then(res => {
+        if (res.code == "200") {
+          this.tableDataRadio=res.data
+        }
+        else{
+          this.$message.error(res.msg)
+        }
+      });
+    },
     getDicType(type) {
       this.$api.insCompany.dicType(type).then((res) => {
         if (res.code == 200) {
@@ -396,11 +717,18 @@ export default {
             }
           });
     },
-    selectionChange(val){
-      this.selectionList=val
+    selectionChange(val,ref) {
+      if(val.length > 1){
+          const del_row = val.shift()
+          ref.toggleRowSelection(del_row,false) //设置这一行取消选中
+        }
+    this.selectionList = val;      
+    },
+    selectAll (selection,ref){
+          ref.clearSelection()
+          return
     },
     drivingupload(file, fileList){
-      this.fileList=[]
       const params = new FormData(); // 声明formData数据类型
       params.append("multipartFile", file.raw);
       params.append("type", "image");
@@ -544,5 +872,14 @@ export default {
 };
 </script>
     
-<style scoped></style>
+<style scoped>
+.avatar {
+  border: 1px dashed #d9d9d9;
+  padding: 5px;
+  border-radius: 6px;
+  width: 135px;
+  height: 135px;
+  display: block;
+}
+</style>
     

+ 1 - 1
src/views/FinancialManagement/CarInsurance/CompanySettlement/NoCarInsurance/DocumentaryFeesSettled.vue

@@ -96,7 +96,7 @@ export default {
             type: "text"
           },
           {
-            prop: "settlementAmount",
+            prop: "expendAmount",
             label: "进帐金额",
             type: "text"
           },

+ 157 - 103
src/views/FinancialManagement/CarInsurance/CompanySettlement/NoCarInsurance/HandlingFees.vue

@@ -61,31 +61,17 @@
               <span> {{ batchData.totalAmount }}</span>
             </el-form-item>
           </el-col>
-          <el-col :span="10">
-            <el-form-item label="附加原因:">
-              <span> {{ batchData.reason }}</span>
-            </el-form-item>
-          </el-col>
-          <el-col :span="24">
-            <el-form-item label="" label-width="20px">
-              <el-upload style="margin-top:20px" action="#" class="upload-demo" :limit="1" :auto-upload="false"
-                :on-change="drivingupload" ref="upload3" :file-list="fileList">
-                <el-button size="small" type="primary">点击上传</el-button>
-              </el-upload>
-            </el-form-item>
-          </el-col>
-
         </el-row>
       </el-form>
-      <el-table v-if="batchData.resultList" border height="250" :data="batchData.resultList" style="width: 100%">
-        <el-table-column prop="licenseno" label="车牌号">
-        </el-table-column>
-        <el-table-column prop="NoPolicyno" label="非车保单号">
-        </el-table-column>
-      </el-table>
+      <templateTable ref="templateTable1" :tableConfig="tableConfigbatch" :data="batchData" @findPage="findPagegbatch"
+        :pagination="pageDataPro" @getList="getListgbatch" @selectionChange="selectionChange" @selectAll="selectAll">
+        <template slot="uploadUrl" slot-scope="scope">
+          <span @click="uploadUrlClick(scope.row.uploadUrl)">{{ scope.row.uploadUrl }}</span>
+        </template>
+      </templateTable>
       <span slot="footer" class="dialog-footer">
         <el-button size="small" @click="dialogVisibleBatch = false">取 消</el-button>
-        <el-button size="small" type="primary" @click="handleSumbit()">确 定</el-button>
+        <el-button size="small" type="primary" @click="handleSumbit('InvoicingData')">确 定</el-button>
       </span>
     </el-dialog>
     <el-dialog title="新增" :visible.sync="dialogVisibleAdd" width="55%" :before-close="handleCloseadd">
@@ -170,6 +156,13 @@
         <el-button size="small" type="primary" @click="onSubmitAdd">保存</el-button>
       </span>
     </el-dialog>
+    <el-dialog  :visible.sync="dialogVisibleprogress" width="25%" >
+      <el-upload style="margin-bottom:10px" action="#" class="upload-demo" :limit="1" :auto-upload="false"
+            :on-change="drivingupload" :on-progress="handleProgress" ref="upload3" :file-list="fileList">
+            <el-button size="small" type="primary">点击上传</el-button>
+          </el-upload>
+      <el-progress  :percentage="progressPercent" :text-inside="true" :stroke-width="16" status="exception"> </el-progress>
+    </el-dialog>
   </div>
 </template>
 <script>
@@ -189,6 +182,10 @@ export default {
   },
   data() {
     return {
+      pageDataPro: {
+        pageNum: 1,
+        pageSize: 20,
+      },
       ztreeNodes: [],
       InsInsuranceKindoptions: [],
       optionProps: {
@@ -336,6 +333,43 @@ export default {
           type: "datePicker",
         },
       ],
+      tableConfigbatch: {
+        columns: [
+          {
+            prop: "id",
+            label: "任务id",
+            type: "text"
+          },
+          {
+            prop: "createdAt",
+            label: "开始时间",
+            type: "text"
+          },
+          {
+            prop: "completedAt",
+            label: "完成时间",
+            type: "text"
+          },
+          {
+            prop: "status",
+            label: "状态",
+            type: "text"
+          },
+          {
+            prop: "totalAmount",
+            label: "开票金额",
+            type: "text"
+          },
+          {
+            name: "uploadUrl",
+            label: "导出路径",
+            type: "slot"
+          },
+        ],
+        loading: true,
+        isCheckBox: true,
+        isPaginationShow: true,
+      },
       tableConfig: {
         columns: [
           {
@@ -368,40 +402,21 @@ export default {
             label: "险种",
             type: "text"
           },
+          {
+            prop: "companyName",
+            label: "保险公司名称",
+            type: "text"
+          },
           {
             prop: "partnerCompaniesName",
             label: "保司机构",
             type: "text"
           },
           {
-            prop: "companyId",
-            label: "保险公司",
-            type: "text"
-          }, {
-            prop: "agreementId",
-            label: "协议号",
+            prop: "agreementName",
+            label: "协议名称",
             type: "text"
-
           },
-          // {
-          //   prop: "policyno",
-          //   label: "交强保单号",
-          //   type: "text"
-
-          // },{
-          //   prop: "syPolicyno",
-          //   label: "商业保单号",
-          //   type: "text"
-          // },
-          // {
-          //   prop: "jqPremium",
-          //   label: "交强险保费",
-          //   type: "text"
-          // },{
-          //   prop: "syPremium",
-          //   label: "商业险保费",
-          //   type: "text"
-          // },
           {
             label: "非车保单号",
             prop: "noPolicyno",
@@ -417,20 +432,6 @@ export default {
             label: "非车不含税保费",
             type: "text"
           },
-          // {
-          //   prop: "commissionFeerate",
-          //   label: "手续费比例",
-          //   type: "text"
-          // },
-          // {
-          //   prop: "jqSuperviseCostsProportion",
-          //   label: "交强手续费比例",
-          //   type: "text"
-          // },{
-          //   prop: "sySuperviseCostsProportion",
-          //   label: "商业手续费比例",
-          //   type: "text"
-          // },
           {
             prop: "noSuperviseCostsProportion",
             label: "非车手续费比例",
@@ -438,7 +439,7 @@ export default {
           },
           {
             prop: "noSuperviseCostsPremiums",
-            label: "手续费金额",
+            label: "非车手续费金额",
             type: "text"
 
           }, {
@@ -459,10 +460,6 @@ export default {
             prop: "updateUserId",
             label: "修改人",
             type: "text"
-          }, {
-            label: "对接人",
-            prop: "dockingPerson",
-            type: "text",
           }, {
             prop: "handlingFeesStatus",
             label: "结算状态",
@@ -499,19 +496,24 @@ export default {
           click: (row, index) => { return this.newAdd() },
         },
         {
-          name: '批量开票',
+          name: '任务列表',
           click: (row, index) => { return this.balanceFunPro() },
         },
         {
           name: '模板下载',
           click: (row, index) => { return this.templateDownload() },
         },
+        {
+          name: '导入',
+          click: (row, index) => { return this.handImport() },
+        },
         {
           name: '导出',
           click: (row, index) => { return this.handExport() },
         }
       ],
       tableData: [],
+      selectionList:[],
       dialogVisible: false,
       pageData: {
         pageNum: 1,
@@ -523,21 +525,23 @@ export default {
       },
       formData: {},
       rules: {
-        voucherNumber: [
-          { required: true, message: '请输入凭证号', trigger: 'blur' },
+        invoicingMethod: [
+          { required: true, message: '请选择开票方式', trigger: 'chang' },
         ],
-        contractId: [
-          { required: true, message: '请输入合同号', trigger: 'blur' },
+        taxPoints: [
+          { required: true, message: '请输入税点', trigger: 'blur' },
         ],
-        contractFileId: [
-          { required: true, message: '请上传合同', trigger: 'blur' },
+        invoicId: [
+          { required: true, message: '请输入开票号', trigger: 'blur' },
         ],
       },
       dialogVisibleBatch: false,
       totalAmount: '',
       batchData: {},
-      fileList: [],
-      dockingPersonOption: []
+      dockingPersonOption: [],
+      fileList:[],
+      progressPercent:0,
+      dialogVisibleprogress:false,
 
     };
   },
@@ -574,6 +578,38 @@ export default {
     });
   },
   methods: {
+    selectAll (selection,ref){
+          ref.clearSelection()
+          return
+    },
+    selectionChange(val,ref) {
+      if(val.length > 1){
+          const del_row = val.shift()
+          ref.toggleRowSelection(del_row,false) //设置这一行取消选中
+        }
+    this.selectionList = val;      
+    },
+    findPagegbatch() {
+      this.tableConfigbatch.loading = true
+      this.$api.task.importAsyncQuery({...this.pageDataPro,handStatus:1})
+        .then(res => {
+          if (res.code == 200) {
+            this.tableConfigbatch.loading = false
+            this.batchData = res.data.content
+            this.pageDataPro.pageNum = res.data.pageNum;
+            this.pageDataPro.pageSize = res.data.pageSize;
+            this.pageDataPro.totalSize = res.data.totalSize;
+          }
+          else {
+            this.tableConfigbatch.loading = false
+            this.$message.error(res.msg)
+          }
+        });
+    },
+    getListgbatch(data) {
+      this.pageDataPro = data
+      this.findPagegbatch()
+    },
       //下拉数据匹配
       selectDataMatching(files, name, data) {
       files.forEach(filed => {
@@ -643,19 +679,30 @@ export default {
           }
         });
     },
+    handImport(){
+      this.fileList=[]
+      this.dialogVisibleprogress=true
+      this.progressPercent = 0
+    },
+    handleProgress(event) {
+        if (this.progressPercent < 99) {
+            this.progressPercent = parseInt(event.percent)
+        }
+    },
     drivingupload(file, fileList) {
-      this.fileList = []
+      this.progressPercent = 0
       const params = new FormData(); // 声明formData数据类型
       params.append("multipartFile", file.raw);
       params.append("type", "image");
       params.append("isNotCar", "1");
       this.$api.task.bxImportNoData(params).then(res => {
         if (res.code == "200") {
-          this.batchData = res.data
-          this.fileList = fileList
+          this.fileList=fileList
+          this.progressPercent =100
         }
         else {
-          this.fileList = []
+          this.fileList=[]
+          this.progressPercent =0
           this.$message.error(res.msg)
         }
       });
@@ -787,34 +834,41 @@ export default {
     },
     balanceFunPro() {
       // this.assembly('batchInvoicing',2)
-      this.fileList = []
+      this.batchData = []
+      this.InvoicingData = {}
       this.dialogVisibleBatch = true
+      this.findPagegbatch()
     },
-    handleSumbit() {
-      let data = {
-        ...this.InvoicingData,
-        totalAmount: this.batchData.totalAmount,
-        agreementId: this.batchData.agreementId,
-        partnerCompaniesId: this.batchData.partnerCompaniesId,
-        companyId: this.batchData.companyId,
-        isNotCar: '1',
-        ids: this.batchData.ids,
-      }
-      // this.$api.task.batchInvoicing( {ids:this.batchData.ids,invoicId:this.invoicId})
-      this.$api.task.batchInvoicing(data)
-        .then(res => {
-          if (res.code == 200) {
-            this.$message({
-              message: '批量开票成功' || res.msg,
-              type: 'success'
-            })
-            this.findPage()
-            this.dialogVisibleBatch = false
+    handleSumbit(formName) {
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+          if(!this.selectionList[0].uploadUrl){
+            this.$message.error('请选择有导出路径的数据!')
+            return false
           }
-          else {
-            this.$message.error(res.msg)
+          let data = {
+            ...this.InvoicingData,
+            isNotCar: '1',
+            selectIds: this.selectionList.map(e => e.id),
           }
-        });
+          this.$api.task.batchInvoicing(data)
+            .then(res => {
+              if (res.code == 200) {
+                this.$message({
+                  message: '操作成功' || res.msg,
+                  type: 'success'
+                })
+                this.findPage()
+                this.dialogVisibleBatch = false
+              }
+              else {
+                this.$message.error(res.msg)
+              }
+            });
+        } else {
+          return false;
+        }
+      });
     },
   }
 };

+ 35 - 39
src/views/FinancialManagement/CarInsurance/PlatformSettlement/NonVehicleBalance.vue

@@ -28,7 +28,13 @@
       </el-option>
     </el-select>
     </template>
-
+    <div v-if="!Object.keys(totalList).length == 0">
+        <el-row class="customStyle">
+          <el-col :span="4">总手续费:{{ totalList.commissionFeevalue }}</el-col>
+          <el-col :span="4">已结算金额:{{ totalList.readyCommissionFeevalue }}</el-col>
+          <el-col :span="4">未结算金额:{{ totalList.noInvoicCommissionFeevalue }}</el-col>
+        </el-row>
+      </div>
     </templateTable>
     <el-dialog
       v-dialogDrag
@@ -212,6 +218,7 @@ export default {
   },
   data() {
     return {
+      totalList:{},
       importData:{},
       fileList:[],
       dialogVisibleImport:false,
@@ -344,15 +351,14 @@ export default {
             type: "text"
           },
           {
-            prop: "companyName",
-            label: "保险公司",
+            prop: "riskcode",
+            label: "险种",
             type: "text",
-            width:'100',
           },
           {
-            prop: "riskcode",
-            label: "险种",
-            type: "text"
+            prop: "companyName",
+            label: "保险公司名称",
+            type: "text",
           },
           {
             prop: "partnerCompaniesName",
@@ -367,7 +373,7 @@ export default {
         },
           {
             prop: "agreementName",
-            label: "协议号",
+            label: "协议名称",
             type: "text"
           },
           {
@@ -386,7 +392,7 @@ export default {
 
           },{
             prop: "jqPremium",
-            label: "交强险保费",
+            label: "交强保费",
             type: "text"
           },{
             prop: "taxamount",
@@ -394,7 +400,7 @@ export default {
             type: "text"
           },{
             prop: "syPremium",
-            label: "商业险保费",
+            label: "商业保费",
             type: "text"
 
           },{
@@ -414,7 +420,7 @@ export default {
 
           },{
             prop: "jqOtherCostsProportion",
-            label: "交强非跟单比例",
+            label: "交强跟单费比例",
             type: "text"
 
           },{
@@ -444,7 +450,7 @@ export default {
 
           },{
             prop: "noOtherCostsProportion",
-            label: "非车非跟单比例",
+            label: "非车跟单费比例",
             type: "text"
 
           },{
@@ -454,7 +460,7 @@ export default {
 
           },{
             prop: "otherFeevalue",
-            label: "非跟单金额",
+            label: "跟单费金额",
             type: "text"
 
           },{
@@ -479,7 +485,7 @@ export default {
             type: "text"
           },{
             prop: "handlingFeesStatus",
-            label: "手续费结算状态",
+            label: "结算状态",
             type: "statMap",
             options:[{
               value:'1',
@@ -680,30 +686,6 @@ export default {
     },
     // 查询
     handleSearchList(data) {
-        // let signDateStart=''
-        // let signDateEnd=''
-        // if(data && data.signDate && data.signDate.length>0){
-        //   signDateStart=data.signDate[0]
-        //   signDateEnd=data.signDate[1]
-        // }
-        // else{
-        //   signDateStart=''
-        //   signDateEnd=''
-        // }
-        // this.$api.task
-        //   .totalAmount({...this.formData,...this.pageData,...data,signDateStart,signDateEnd})
-        //   .then(res => {
-        //     if (res.code==200) {
-        //         this.moneyList=res.data
-        //     }
-        //     else{
-        //       this.$message.error(res.msg)
-        //     }
-        //   });
-      this.findPage(data);
-    },
-    //列表数据
-    findPage(data) {
       let signDateStart=''
       let signDateEnd=''
       if(data && data.signDate && data.signDate.length>0){
@@ -714,9 +696,23 @@ export default {
         signDateStart=''
         signDateEnd=''
       }
+      this.$api.task
+        .ptTotalAmount({ ...data,...this.pageData,signDateStart,signDateEnd })
+        .then(res => {
+          if (res.code == 200) {
+            this.totalList = res.data ? res.data : []
+          }
+          else {
+            this.$message.error(res.msg)
+          }
+        });
+      this.findPage({...data,signDateStart,signDateEnd});
+    },
+    //列表数据
+    findPage(data) {
       this.tableConfig.loading = true;
       this.$api.task
-        .plyFeeQuery({...this.pageData,...data,... this.formData,signDateStart,signDateEnd} )
+        .plyFeeQuery({...this.pageData,...data,... this.formData} )
         .then(res => {
           if (res.code==200) {
             this.tableData = res.data.content;